Next: , Previous: , Up: Lengths   [Contents][Index]


14.5 \settoheight

Synopsis:

\settoheight{\len}{text}

Sets the length \len to the height of box that LaTeX gets on typesetting the text argument. The length name \len has to be a control sequence (see Control sequence, control word and control symbol), and as such must begin with a backslash, \ under normal circumstances.

This will print how high the characters go.

\newlength{\alphabetheight}
\settoheight{\alphabetheight}{abcdefghijklmnopqrstuvwxyz}
\the\alphabetheight

If no such length \len has been declared with \newlength, if for example you mistype as \settoheight{\aplhabetheight}{abc...}, then you get something like ‘Undefined control sequence. <argument> \alphabetheight’. If you leave the backslash out of \len, as in \settoheight{alphabetheight}{...} then you get something like ‘Missing number, treated as zero. <to be read again> \setbox’.


Unofficial LaTeX2e reference manual