Personal tools

You are here: Home / bachotex2008-david-kastrup-pearl1.tex

# bachotex2008-david-kastrup-pearl1.tex

bachotex2008-david-kastrup-pearl1.tex — TeX document, 1 KB (1242 bytes)

## File contents

%%% fixing \vtop

\catcode\|13
\def\stripit#1>{}
\def|#1|{{\tt\toks0{#1}\edef\next{\the\toks0}%
\expandafter\stripit\meaning\next}\unskip}
|\vtop| happens to lose the correct top of line information when it
starts with a whatsit.  We can reconstitute this in the following
manner\footnote*{The trick here is to use |\vsplit| which pads the
followup box sufficiently to reach a given line height on the top
line. We essentially tell it to make this line fit |\maxdimen| minus
a safety margin and see how far it gets.  Then we remove the padding
with another split and start the box with a strut that establishes the
corrected height.}:

\def\fvtop#{\vtop\bgroup
\setbox0\vbox\bgroup
\aftergroup\fvboxii
\let\next=}

\def\fvboxii{\setbox0\vtop{\break\unvbox0}%
\dimen0=\maxdimen
{\splittopskip\dimen0 \setbox0\vsplit0to0pt}%
{\splittopskip-\maxdimen\setbox0\vsplit0to0pt}%
\end`