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 must begin with a backslash, \
.
This will show 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’.
© 2007–2018 Karl Berry
Public Domain Software
http://latexref.xyz/_005csettoheight.html