[texhax] calculate length using macro in picture environment to use elsewhere

William Adams will.adams at frycomm.com
Wed Sep 2 19:04:03 CEST 2009


(Also posted this to comp.text.tex --- my apologies to those who see  
it twice. I'm at the end of my rope)

I'm trying to do this, but the length outside of the picture  
environment is 0.0 pt.

Why?

\documentclass{minimal}
\begin{document}
\newsavebox{\testbox}
\newlength{\testboxHT}
\newcommand{\testcommand}[1]%
{\sbox{\testbox}{#1}\settoheight{\testboxHT}{\usebox{\testbox}}\the 
\testboxHT\usebox{\testbox}}
\begin{picture}(0,0)\put(0,0){%
\testcommand{test}
}
\end{picture}\\
\the\testboxHT
\end{document}

William

-- 
William Adams
senior graphic designer
Fry Communications
Sphinx of black quartz, judge my vow.



More information about the texhax mailing list