My problem may have a similar root cause as this question, and although I've got a working solution I'm happy with, I'm puzzled as to why this happens at all. MWE:

\mbox{Figure content}
%%% Version 1, causes "Rerun to get cross-references right" warning every time
%%% if hyperref, mathtools, and breqn loaded simultaneously.
%%% Version 2, works fine
%%% Version 3, works fine

As noted in the comments, the first version of my figure caption causes pdflatex to constantly throw "Rerun to get cross-references right" warnings. Removing either of hyperref or breqn made the problem go away, and obviously, replacing the escaped underscore with a \textunderscore{} or another definition fixed the problem as well.

Things I've tried already:

  1. Tried with original TL 2010 DVD.
  2. Tried with current packages, updated this morning from CTAN.
  3. Tried moving breqn after hyperref.

No difference on any of those. All exhibited the error, and though I've not tried reinstalling the original DVD, I assume what works on my updated install would work there, too.

  • 3
    First of all mathtools is irrelevant (it seems), and breqn is just evil. I'll pass your example on the the breqn maintainers (I'm one, but I mostly work with mathtools)
    – daleif
    Mar 3, 2011 at 20:25
  • I could have sworn that I had to include mathtools to make breqn work, but on further review, I must have had something else going on. breqn does stand alone. Mar 3, 2011 at 21:50

1 Answer 1


The problem is that when the .aux file is read at document start, the catcode of _ is 11, while at the end it's 12. Indeed, putting `\catcode_=11 just before\end{document}` "cures" the problem.

I suspect this has something to do with the LaTeX3 part of breqn, where the catcode of _ is indeed set to 11. And putting


after loading breqn shows 11, while after \begin{document} it shows 12.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .