\settoheight (LaTeX2e unofficial reference manual (November 2018))

Next: \settowidth, Previous: \settodepth, 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 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`’.

Unofficial LaTeX2e reference manual