[texhax] Finding the widest string

Joseph Wright joseph.wright at morningstar2.co.uk
Tue May 4 17:33:59 CEST 2010

On 04/05/2010 16:14, José Romildo Malaquias wrote:
> What excatly are \dimen@ and \z@ ? Are they a pre-defined dimension and
> a pre-defined box, respectively? If so, can they be freely used in my
> code? Using them would affect any other part of the system, for
> instance, other macros that also use them?
> In the above example we found the snippet \wid at fmt{#1} of code, where
> the macro \wid at fmt was defined to be a macro that is passed as argument,
> so one cannot tell what it is in advance. What about if this macro also
> makes use of \dimen@ or \z@, using their current value or setting new
> values to them?

Both \dimen@ and \z@ are defined by the LaTeX kernel (and I think the 
plain format). \z@ is equal to 0 pt, and can be used as either "0" or "0 
pt": it should never be altered. \dimen@ is the name given to \dimen0, 
and it is used as a scratch dimension: set it and use is straight away, 
or something else might alter the content.
Joseph Wright

More information about the texhax mailing list