bachotex2010-jacko-pjacko-pearl1.tex
bachotex2010-jacko-pjacko-pearl1.tex
—
TeX document,
1 KB (1312 bytes)
Zawartość pliku
%%% A simple quest
% Quest 1: Is the output of those two cases the same?
\noindent
\vbox to1cm{\hsize.4\hsize text}%
\vbox to1cm{\hsize.4\hsize \write16{}text}
% No, it is quite different.
% Both are underfulled which makes \TeX\ trying to
% abuse glues stretchability. Is there some glue? See the .log file.
% \vbox(28.45274+0.0)x469.75499
% .\hbox(6.15079+0.0)x469.75499, glue set 432.25494fil
% ..etc.
% vs
% \vbox(28.45274+0.0)x469.75499, glue set 22.30196
% .\write*{}
% .\glue(\parskip) 0.0 plus 1.0
% .\hbox(6.15079+0.0)x469.75499, glue set 432.25494fil
% ..etc.
% In the second case there is \parskip implicitly inserted before the paragraph.
% But there is no glue if the the paragraph starts at the top of the list
% (there is even more fun with \vtop, see pearls 2007 and 2008).
\vskip2in
% Quest 2: Are those two cases efectively the same
\noindent
\setbox0\hbox{\vrule height1cmwidth1cm}\ht0 0mm \box0
\setbox0\vbox{\hrule height1cmwidth1cm}\ht0 0mm \box0
% No, they are quite different.
% In the case of \hbox, the contents is positioned
% starting from the box reference point, which is not affected by changing box
% height. Within \vbox, the contents position starts at the top of the box, which
% we've just changed (see DEK page 388).
\end
Akcje Dokumentu
