[texhax] On putting \unvbox inside an \hbox

Philip TAYLOR (Webmaster, Ret'd) P.Taylor at Rhul.Ac.Uk
Sat Sep 17 15:35:47 CEST 2011



Michael Barr wrote:

> [T]he following works perfectly well:
> 
> \documentclass{article}
>  \pdfoutput0
> \begin{document}
>  \setbox0=\vbox{test}
>  \setbox2=\hbox{\box0}
>  \box2

\showbox 2

> \box2=
\hbox(6.15079+0.0)x345.0
.\vbox(6.15079+0.0)x345.0 []

Philip Taylor wrote :

>     \setbox 0 = \vbox {I am a vbox}
>     \setbox 2 = \vbox {\unvbox 0 \global \setbox 4 = \lastbox}
>     \showbox 4
>     \unhbox 4
>     \bye

\showbox 4

> \box4=
\hbox(6.94444+0.0)x469.75499, glue set 396.69931fil
.\hbox(0.0+0.0)x20.0
.\tenrm I
.\glue 3.33333 plus 1.66498 minus 1.11221
.\tenrm a
.\tenrm m
.etc.

Do you see the difference, Michael ?
Philip Taylor


More information about the texhax mailing list