Angus Leeming <[EMAIL PROTECTED]> writes:

> David, we've been having a discussion about vertical space and previews. To 
> fill you in and save you from trawling needlessly through the list, here's a 
> synopsis.
> 
> Attached are two small screenshots, one of the LyX screen wih
> previews turned on and one of the corresponding xdvi view.
> 
> Note the extra vertical space inserted in the dvi file between the
> equation in display mode and the next line of text.
> 
> I tried to get the preview to behave in a similar manner to the dvi
> output by modifying each snippet of math in display mode so:
> 
> \begin{preview}
> \abovedisplayskip 12pt plus 3pt minus 9pt
> \[ some-snippet \]
> \belowdisplayskip 12pt plus 3pt minus 9pt
> \end{preview}
> 
> To my surprise, this has no effect at all. preview.sty just ignores
> the spacing.

Yes.  preview.sty extracts the material that is previewed.
Adding/arranging appropriate line spacing remains the task of the
respective editor.  Since the material that preview.sty extracts is
not originally intended to be typeset as a separate entity but is
placed by LaTeX's typesetting algorithms as if it appeared mid-page,
it usually is extracted with excessive and inconsistent spacing around
it.  preview.sty takes some pains to strip everything off that might
be spurious.

> My alternative suggestion to extend the descent value by an
> arbitrary amount was vetoed. The concensus (on the LyX list of
> course!) was that this really should be handled by preview.sty.
> 
> Why isn't this just "automatic". Do you plan to add this to
> preview.sty?

preview.sty goes to some lengths in order to remove the spacing that
for quite a few applications interferes with previews integrating
nicely into the general text layout/line spacing.  It would not be as
much a matter of "addition" to preview.sty, but removal of existing
functionality.  Since TeX's algorithms distribute the spacing with
the intention of making the text appear correct in the view of a
(non-existing) environment on the page, it would not give good
results if those were left in.

For example, depending on the line length of preceding lines, TeX
either adds \abovedisplayshortskip or \abovedisplayskip.  It does not
make sense to reproduce this difference when the line above is not
part of the preview.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
Email: [EMAIL PROTECTED]


Reply via email to