[texhax] alignment of parbox and fbox

Uwe Lück uwe.lueck at web.de
Sun Sep 13 07:39:22 CEST 2009

At 17:35 08.09.09, Lars Madsen wrote:
>bill lam wrote:
>>On Tue, 08 Sep 2009, Uwe Lück wrote:
>>>Put \vphantom{p} into the first line of the first and third \parbox -- Uwe.
>>
>>Pardon me for being dense. Could you kindly show me how to do that
>>with the sample source?
>
>change
>
>\bf To:
>
>to
>
>\bf \vphantom{p}To:

To my own surprise, I notice that \vphantom is tricky in the following
respect: It may cause a vertical skip, unless horizontal mode has been
entered before, maybe by \leavevmode, or by /ending/ the line with
\vphantom{p}.

Generally, I think I should have recommended \leavevmode\mathstrut. This
yields better spacing below a p' than \vphantom{p}'.

This is not the whole story, just one hint to the fact that (documentation
of) LaTeX doesn't tell you everything about LaTeX's engine TeX. Similarly:

At 01:56 09.09.09, Pierre MacKay wrote:
>\vphantom and \strut are basic parts of plain.tex, and go back to the
>1980s, probaby even to TeX78.  This is a warning not to neglect the index
>of the TeXbook.  It is very hard to get consistent spacing in either
>horizontal or vertical mode if you don't have the resource of these two macros.

... -- Uwe.