TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to move equation labels into the margin for an article I'm working on, and the answers in Theorem Name/Numbering in Margin accomplish exactly what I'm looking for. Here is a small example:



    \makebox[1sp][r]{\maketag@@@{(\ignorespaces#1 \unskip \@@italiccorr)}\hspace*{-1in}}%


Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

    f(x) = x^2 \label{deepinsight}

See \ref{deepinsight} for an example.


When I first tried this, however, I used a box a box of zero width: \makebox[0pt][r]{ .... This almost works, but the resulting equation labels aren't vertically aligned with the equation anymore, as you see here:

Misaligned equation label

After fiddling with this some more I realized that the original solution is using \llap which is probably a better way to get this effect, but I am still curious why a box with zero width is aligned differently than a box with some very small width. Thanks for any explanations or pointers!

share|improve this question
up vote 12 down vote accepted

A zero width equation number is used as a flag to get special handling. Just after describing the detailed rules for equation number placement the TeXBook says:

One consequence of these rules is that you can force an equation number to appear on a line by itself by making its width zero,

share|improve this answer

Your Answer


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.