# Using amsmath, ntheorem and autonum together cause an overfull hbox

I'm trying to use the combination of amsmath + ntheorem + autonum with the thmmarks option enabled. This causes a bug. The minimal case to reproduce is

\documentclass{article}

\usepackage{amsmath}
\usepackage[amsmath,thmmarks]{ntheorem}
\usepackage{autonum}

\begin{document}
\end{document}


Compiling gives the following error message:

Overfull \hbox (2.22221pt too wide) detected at line 7


Now, I'm not a latex expert but I've been looking at the sources of these packages, and I found that the problem occurs on line 462 in ntheorem.sty, with the following command:

\make@display@tag


Removing this line causes the error to go away. This macro is defined in amsmath.sty:

\def\make@display@tag{%
\if@eqnsw \incr@eqnum \print@eqnum
\else \iftag@ \df@tag \global\let\df@tag\@empty \fi
\fi
\ifmeasuring@
\else
\ifx\df@label\@empty
\else
\@xp\ltx@label\@xp{\df@label}%
\global\let\df@label\@empty
\fi
\fi
}


I do not have enough latex expertise to know how to fix this bug, and where to report it. Anyone has suggestions?

• Removing \make@display@tag will show no equation number in any case, I believe. – egreg Sep 16 '15 at 15:46

Until a better answer arrives, I fixed the error with the following redefinition of \make@display@tag:

\let\ams@make@display@tag=\make@display@tag
\renewcommand{\make@display@tag}{%
\ifdefempty{\df@label}{% can happen with package autonum.
%\ams@make@display@tag% don't execute
}{% not empty, show refs
\ams@make@display@tag%
}%
}


I pieced this together from the internet and have no idea if it's correct. However, it does seem to work. The following also seems to work:

\renewcommand{\make@display@tag}{%
}


However, because the first option is potentially safer, I sticked with that one.

If there are better solutions I would love to hear them.