On Monday 15 July 2002 11:54 pm, David Kastrup wrote:
> Angus Leeming <[EMAIL PROTECTED]> writes:
> > On Sunday 14 July 2002 1:13 am, David Kastrup wrote:
> > > Could you adjust your local copy of prlyx.def (and, more importantly,
> > > the scripts that evaluate its output) so that it will not finish the
> > > lines with a period?
> > >
> > > I'll probably commit to CVS tomorrow, have to do a bit of testing
> > > before.
> >
> > When you do so, could you post the new copy here. It's better to
> > have /exactly/ the same file to work with when developing a parser
> > for it.
>
> Yes, it would.  Unfortunately, it is not that easy.
>
> > I'll probably add prlyx.def to the LyX repository until you formally
> > release the next version of preview.sty. Thereafter I'll strike it
> > off again.
>
> The problem is that the output that is now generated by your copy of
> prlyx.def is in the new preview.dtx version generated both by a
> changed tightpage option as well as the lyx option.  So you would
> need to distribute also a changed tightpage option.  Unless you are
> not really looking at the Tightpage info, because you either
> disregard it in ascender/image size calculations, or you just take
> its default values of 0.5 PostScript points as additional borders in
> the image beyond those specified by the TeX dimensions into account.
>
> Ugly.  I'll try to get the next release out this week to cut off the
> need for separate distribution.  It would be nice if you told me
> whether the stuff generated from the current CVS version (you can just
> unpack it as described in README.preview, ignoring the
> autoconf/configure/Makefile stuff) does the trick for you before I
> release it.
>
> Thanks,

David,
I installed the cvs version of preview.sty et al. without any problems.
Running latex on a "snippet" file and then grepping the resultant log file 
shows:

aleem@pneumon:tmp-> grep review 1lyxpreview.log
**1lyxpreview.tex
(1lyxpreview.tex
))) (/usr/local/teTeX/share/texmf/tex/latex/preview-latex/preview.sty
Package: preview 2002/07/15 preview-latex CVS-1.59
(/usr/local/teTeX/share/texmf/tex/latex/preview-latex/prtightpage.def
\PreviewBorder=\dimen106
) (/usr/local/teTeX/share/texmf/tex/latex/preview-latex/prlyx.def) 
(/usr/local/
teTeX/share/texmf/tex/latex/preview-latex/prshowlabels.def
No file 1lyxpreview.aux.
Preview: Fontsize 10pt
Preview: Tightpage -32890 -32890 32890 32890
Preview: Snippet 1 492688 0 744653
Preview: Snippet 2 1441792 163840 16026923
Preview: Snippet 3 282168 0 377591
Preview: Snippet 4 1619363 449545 16026923
Output written on 1lyxpreview.dvi (4 pages, 1744 bytes).

So, I'd say that all is fine.

I don't follow your Tightpage description and certainly haven't used it to 
date. 

FYI, I simply take the ratio af=ascent/ (ascent + descent), where
ascent is the first number following Snippet X and descent is the number 
following it. So:
Preview: Snippet 1 af=1
Preview: Snippet 2 af=0.89795918367
Preview: Snippet 3 af=1
Preview: Snippet 4 af=0.78271387611

I calculate ascent and descent info as:
        ascent = af * image->getHeight();
        descent = image->getHeight() - ascent;
where image->getHeight() returns the height of the image in the PPM file.

How would I use the Tightpage info in this prescription?

Angus

ps, If you're planning on releasing preview-latex 0.73 in the next week or 
so, then that 's great. 

Reply via email to