[pdftex] why it is boxtype dependent?

pawcoo jackos1 at poczta.onet.pl
Sat Aug 14 22:35:54 CEST 2004

Hello everybody,

please consider the following code. It is not a real macro, just an 
example that shows some pdfTeX feature that I don't understand.


\setbox0\hbox to1in{Aqq\hfil}

  \pdfliteral{q 1 0 0 -1 0 0 cm}% vertical flip
  \dimen0=\ht#1                 % \ht becomes \dp and vice versa
  \pdfliteral{Q 1 0 0 1 72 0 cm}% restore current space



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.

Thanks for any hints.


More information about the pdftex mailing list