[pdftex] why it is boxtype dependent?

Hartmut Henkel hartmut_henkel at gmx.de
Sun Aug 15 11:47:14 CEST 2004


On Sat, 14 Aug 2004, pawcoo wrote:

> Does anybody know why the result of the \upsidedown macro depends on
> the TYPE OF BOX provided as an argument? It produces different output
> for hboxes (register 0) and vboxes (register 1). Of course, the final
> box is the same but the transformation caused by cm operator is
> different. It happens ONLY if we change natural dimensions of
> transformed box. It is NOT a problem to change the macro to make it
> working fine with both types, but I just would like to understand why
> it is so.

You are in the wrong mailing list ;-) This is a TeX-question, see:

\setbox0\hbox to1in{Aqq\hfil}
\setbox1\vbox{\copy0}

\def\upsidedown#1{%
 \dimen0=\ht#1                 % \ht becomes \dp and vice versa
 \ht#1=\dp#1
 \dp#1=\dimen0
 \copy#1
}

[\upsidedown0][\upsidedown1]

\setbox0\hbox to1in{Aqq\hfil}

\setbox1\vbox{\copy0}

\newdimen\ad

\hrule
\leavevmode
\copy1 \ad=\ht1\advance\ad by 10pt \ht1=\ad
\copy1 \ad=\ht1\advance\ad by 10pt \ht1=\ad
\copy1 \ad=\ht1\advance\ad by 10pt \ht1=\ad
\copy1 \ad=\ht1\advance\ad by 10pt \ht1=\ad

\hrule
\bye

Obviously the \hbox keeps hanging at the top of the \vbox, when its
height is changed...

Regards, Hartmut


(P.S. forgive if you received it twice. Some smarthost problem, or the
mailinglist hung?)



More information about the pdftex mailing list