Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question
add comment

1 Answer

up vote 10 down vote accepted

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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