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!

1 Answer 1


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,

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.