9

The definition of a \strut in LaTeX is given in the source as:

211 \newbox\strutbox
212 \def\strut{\relax\ifmmode\copy\strutbox\else\unhcopy\strutbox\fi}

Shoudn't a \strutbox, give an empty box? AS you can see from the example below, it prints the ligature ae, if I include fixltx2e and the ligature ff if I don't. \strut works as expected.

\documentclass[11pt]{article} 
\usepackage{fixltx2e}
\begin{document}
    \strutbox
    \texttt{\strutbox} 
    \textit{\strutbox}
\end{document}
12

You need to use \copy\strutbox to get the box. The definition \newbox\strutbox merely allocates a box number for the strutbox, then assigns that number to \strutbox using \chardef. Hence \strutbox in isolation typesets the character in the current font with the same number as the box number allocated to strutbox.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.