Re: lyxpreview2bitmap.sh error on grep -E on solaris

2004-05-05 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: >> Also, did your patch for having OK be the default button for >> printing dialog ever get applied to 1.3.x? Angus> Apparently not. I can confirm that the attached patch works. Angus> Shall I apply it? Yes, please. JMarc

Re: lyxpreview2bitmap.sh error on grep -E on solaris

2004-05-05 Thread Angus Leeming
Jean-Marc Lasgouttes wrote: >> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: > > Angus> Bo Peng wrote: >>> Dear developers, >>> >>> It took me a while to set up instant preview on solaris. One >>> problem is that my grep does not have -E option so >>> >>> grep -E 'Preview: [ST]' ${LO

Re: lyxpreview2bitmap.sh error on grep -E on solaris

2004-05-05 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> Bo Peng wrote: >> Dear developers, >> >> It took me a while to set up instant preview on solaris. One >> problem is that my grep does not have -E option so >> >> grep -E 'Preview: [ST]' ${LOGFILE} > ${METRICSFILE} || would fail. >

Re: lyxpreview2bitmap.sh error on grep -E on solaris

2004-05-05 Thread Angus Leeming
Bo Peng wrote: > Dear developers, > > It took me a while to set up instant preview on solaris. One problem > is that my grep does not have -E option so > > grep -E 'Preview: [ST]' ${LOGFILE} > ${METRICSFILE} || > would fail. Deleting -E solves the problem. Fair enough. There's nothing very exten

Re: lyxpreview2bitmap.sh

2003-08-14 Thread Jan-Åke Larsson
Angus Leeming wrote: > I get a bunch of warnings like > > [43/home/angus/preview-latex/devel/dvipng/dvipng warning: at (9633,8) > unimplemented \special{ps::-32891 -32891 32891 32891 1655772 576976 > 22609920}. ps::-32891 > ] > > Which looks to me to be the metrics info that preview.sty generat

Re: lyxpreview2bitmap.sh

2003-08-14 Thread Jan-Åke Larsson
Angus Leeming wrote: > I use it within LyX to calculate the 'ascent fraction' of the > snippet. (A snippet whose base line was in the middle of the image > would have an ascent fraction of 0.5.) The code that does this inside > LyX is (stripped down): > > > This information is used to positio

Re: lyxpreview2bitmap.sh

2003-08-14 Thread Angus Leeming
Jan-Åke Larsson wrote: > Angus Leeming wrote: >> I get a bunch of warnings like >> >> [43/home/angus/preview-latex/devel/dvipng/dvipng warning: at >> [(9633,8) >> unimplemented \special{ps::-32891 -32891 32891 32891 1655772 576976 >> 22609920}. ps::-32891 >> ] >> >> Which looks to me to be the m

Re: lyxpreview2bitmap.sh

2003-08-14 Thread Jan-Åke Larsson
Angus Leeming wrote: > > How about > > \AtBeginDocument{\AtBeginDvi{\pagecolor{rgb 0.980 0.941 0.902}}} > > which would work for both dvips-gs and dvipng, I think? > > and setting the text colour is also possible this way (for those who > have an unusual screen set-up) > > \AtBeginDocument{\AtBe

Re: lyxpreview2bitmap.sh

2003-08-14 Thread Jan-Åke Larsson
Angus Leeming wrote: > > I see. There are two possibilities: > > > > 1) Make dvipng detect usage of the 'tightpage' option and use the > >image metrics within the DVI. > > > > 2) Output the position of the baseline of the first character output > >in each image, in pixels or possibly as a

Re: lyxpreview2bitmap.sh

2003-08-14 Thread Andre Poenitz
On Tue, Aug 05, 2003 at 02:43:28PM +0200, Jean-Marc Lasgouttes wrote: > > "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: > > Angus> If we can get this working properly, then I think I'll throw > Angus> away the dvips,gs,pnmcrop code and require the use of dvipng. > Angus> How's that for

Re: lyxpreview2bitmap.sh

2003-08-14 Thread Angus Leeming
Jan-Åke Larsson wrote: > Angus Leeming wrote: >> > How about >> > \AtBeginDocument{\AtBeginDvi{\pagecolor{rgb 0.980 0.941 0.902}}} >> > which would work for both dvips-gs and dvipng, I think? >> >> and setting the text colour is also possible this way (for those who >> have an unusual screen set-

Re: lyxpreview2bitmap.sh

2003-08-08 Thread Jan-Åke Larsson
Jan-Åke Larsson wrote: > > At the moment, going > > the dvips,gs,pnmcrop route I encode the forground and background > > colours of the lyx screen as postscript specials: > > > > \AtBeginDocument{\AtBeginDvi{% > > \special{!userdict begin/bop-hook{//bop-hook exec > > <00faf0e6>{255 div}foral

Re: lyxpreview2bitmap.sh

2003-08-08 Thread Angus Leeming
Jan-Åke Larsson wrote: > Jan-Åke Larsson wrote: >> > At the moment, going >> > the dvips,gs,pnmcrop route I encode the forground and background >> > colours of the lyx screen as postscript specials: >> > >> > \AtBeginDocument{\AtBeginDvi{% >> > \special{!userdict begin/bop-hook{//bop-hook exec >>

Re: lyxpreview2bitmap.sh

2003-08-05 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> If we can get this working properly, then I think I'll throw Angus> away the dvips,gs,pnmcrop code and require the use of dvipng. Angus> How's that for motivation ;-) Why not allow both? JMarc

Re: lyxpreview2bitmap.sh

2003-08-05 Thread Angus Leeming
Jan-Åke Larsson wrote: >> Since both dvipng and dvips,gs,pnmcrop use the same dvi file, it >> seems to make sense to use the same mechanism. However, if you have >> another mechanism to obtain this info within dvipng, then please do >> tell me. > > I see. There are two possibilities: > > 1) Make

Re: lyxpreview2bitmap.sh

2003-08-04 Thread Angus Leeming
Jan-Åke Larsson wrote: > May I suggest you take a look at "dvipng", available at > http://sourceforge.net/projects/preview-latex/ Jan-Åke, playing with the attached tex file $ latex trial.tex $ dvipng -D$128 -otrial%d.png trial.dvi I get a bunch of warnings like [43/home/angus/preview-latex/d

Re: lyxpreview2bitmap.sh

2003-08-04 Thread Angus Leeming
Jan-Åke Larsson wrote: > A tight bounding box can be produced with > > dvipng -T tight foo.dvi > > But I think the effect is similar to > > pnmcrop > > rather than > > pnmcrop -left | pnmcrop -right pnmcrop buggers up the top/bottom metrics which we would like to use. > I'd planned a switch

Re: lyxpreview2bitmap.sh

2003-08-04 Thread Jan-Åke Larsson
Angus Leeming wrote: > When I was writing this stuff to interat with preview latex, dvipng > was still very young. Do you think that it is now mature enough to > use? I'd think so. It is used in WeBWorK, a tool to distribute homework problems on the web, and has been reported to "produce thousands

Re: lyxpreview2bitmap.sh

2003-08-04 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> You should say ``is there''. Thanks. I found it so ugly... Angus> and I agree, there is no harm in setting LATEX directly. My Angus> reading of 'test' suggests that this is portable and pretty Angus> elegant: Angus> test $LATEX |

Re: lyxpreview2bitmap.sh

2003-08-04 Thread Angus Leeming
Jean-Marc Lasgouttes wrote: >> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: > > Angus> Ta-da! Simple solution to a simple problem. In fact, > analogous Angus> to the LYX_USERDIR_14x environment variable, could > we not get Angus> LyX itself to set a LYX_14X environment variable? > The

Re: lyxpreview2bitmap.sh

2003-08-04 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> Ta-da! Simple solution to a simple problem. In fact, analogous Angus> to the LYX_USERDIR_14x environment variable, could we not get Angus> LyX itself to set a LYX_14X environment variable? Thereafter, Angus> we could simply ask lyx

Re: lyxpreview2bitmap.sh

2003-08-04 Thread Angus Leeming
Jean-Marc Lasgouttes wrote: >> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: > > Angus> Well, I don't think that lyx should fork one script, wait for > Angus> it to finish generating a dvi file and then fork off another > to Angus> generate the bitmaps from it. However we could perhaps

Re: lyxpreview2bitmap.sh

2003-08-04 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> Well, I don't think that lyx should fork one script, wait for Angus> it to finish generating a dvi file and then fork off another to Angus> generate the bitmaps from it. However we could perhaps generate Angus> a temporary file and

Re: lyxpreview2bitmap.sh

2003-08-04 Thread Angus Leeming
Jean-Marc Lasgouttes wrote: >> "Jean-Marc" == Jean-Marc Lasgouttes >> <[EMAIL PROTECTED]> writes: > > Jean-Marc> I think we are trying to do things that are too > Jean-Marc> complicated, and this indicates that we have not found > yet Jean-Marc> the 'right' solution... > > What about the

Re: lyxpreview2bitmap.sh

2003-08-04 Thread Angus Leeming
Jan-Åke Larsson wrote: > Jean-Marc Lasgouttes wrote: >> > "Jan-Åke" == Jan-Åke Larsson <[EMAIL PROTECTED]> writes: >> >> Jan-Åke> May I suggest you take a look at "dvipng", available at >> Jan-Åke> http://sourceforge.net/projects/preview-latex/ >> >> I think angus took a look at it, and I gu

Re: lyxpreview2bitmap.sh

2003-08-04 Thread Angus Leeming
Jan-Åke Larsson wrote: > May I suggest you take a look at "dvipng", available at > http://sourceforge.net/projects/preview-latex/ > > About: > This program makes PNG graphics from DVI files as obtained from TeX > and its relatives. Its benefits include speed; it is the fastest > bitmap-rendering c

Re: lyxpreview2bitmap.sh

2003-08-04 Thread Angus Leeming
Jean-Marc Lasgouttes wrote: > > Angus> Am I not correct to say that the name of the user lyxdir is > set Angus> at configure(old)/make(new) time? Yes, I know I'm correct > to Angus> say this. > > And what about that? > ./lyx -user-dir ~/.my-lyx > > I think we are trying to do things that are to

Re: lyxpreview2bitmap.sh

2003-08-04 Thread Jan-Åke Larsson
Jean-Marc Lasgouttes wrote: > > "Jan-Åke" == Jan-Åke Larsson <[EMAIL PROTECTED]> writes: > > Jan-Åke> May I suggest you take a look at "dvipng", available at > Jan-Åke> http://sourceforge.net/projects/preview-latex/ > > I think angus took a look at it, and I guess lyxpreview2bitmap.sh will >

Re: lyxpreview2bitmap.sh

2003-08-04 Thread Jean-Marc Lasgouttes
> "Jan-Åke" == Jan-Åke Larsson <[EMAIL PROTECTED]> writes: Jan-Åke> May I suggest you take a look at "dvipng", available at Jan-Åke> http://sourceforge.net/projects/preview-latex/ I think angus took a look at it, and I guess lyxpreview2bitmap.sh will eventually use it. However, this does not

Re: lyxpreview2bitmap.sh

2003-08-04 Thread Jan-Åke Larsson
Jean-Marc Lasgouttes wrote: > > "Jean-Marc" == Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: > > Jean-Marc> I think we are trying to do things that are too > Jean-Marc> complicated, and this indicates that we have not found yet > Jean-Marc> the 'right' solution... > > What about the follow

Re: lyxpreview2bitmap.sh

2003-08-04 Thread Jean-Marc Lasgouttes
> "Jean-Marc" == Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: Jean-Marc> I think we are trying to do things that are too Jean-Marc> complicated, and this indicates that we have not found yet Jean-Marc> the 'right' solution... What about the following? 1/ generate your tex file 2/ run the

Re: lyxpreview2bitmap.sh

2003-08-04 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> Jean-Marc Lasgouttes wrote: >>> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: >> Angus> Second thought. Have a shell script that just initialises >> such Angus> variables and call it from lyxpreview2bitmap.sh. Get >> conf

Re: lyxpreview2bitmap.sh

2003-08-04 Thread Angus Leeming
Jean-Marc Lasgouttes wrote: >> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: > > Angus> Second thought. Have a shell script that just initialises > such Angus> variables and call it from lyxpreview2bitmap.sh. Get > configure Angus> to autogenerate this script > > This would not solve

Re: lyxpreview2bitmap.sh

2003-08-04 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> Second thought. Have a shell script that just initialises such Angus> variables and call it from lyxpreview2bitmap.sh. Get configure Angus> to autogenerate this script This would not solve my problem, for example (where I need to u

Re: lyxpreview2bitmap.sh

2003-08-04 Thread Angus Leeming
Jean-Marc Lasgouttes wrote: >> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: > > Angus> If we assume that all 'proper' systems will have a > Angus> lyxrc.defaults file that can be found by > lyxpreview2bitmap.sh, Angus> could we not use this: > > And how would it find that? > > Angus

Re: lyxpreview2bitmap.sh

2003-08-04 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> If we assume that all 'proper' systems will have a Angus> lyxrc.defaults file that can be found by lyxpreview2bitmap.sh, Angus> could we not use this: And how would it find that? Angus> sed -n '/^\\converter *latex *dvi/p' ../lyxr

Re: lyxpreview2bitmap.sh

2003-08-04 Thread Angus Leeming
Jean-Marc Lasgouttes wrote: >> "Dekel" == Dekel Tsur <[EMAIL PROTECTED]> writes: > > Dekel> Is there any objection to change the line LATEX=latex in > Dekel> lyxpreview2bitmap.sh to LATEX=elatex ? > > Dekel> I want this change as latex with Hebrew requires using > elatex. Dekel> As far as I

Re: lyxpreview2bitmap.sh

2003-08-01 Thread Jean-Marc Lasgouttes
> "Dekel" == Dekel Tsur <[EMAIL PROTECTED]> writes: Dekel> Is there any objection to change the line LATEX=latex in Dekel> lyxpreview2bitmap.sh to LATEX=elatex ? Dekel> I want this change as latex with Hebrew requires using elatex. Dekel> As far as I know, there are no side effects when elate