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:
\documentclass{article}
\usepackage{mathtools}
\usepackage{breqn}
\usepackage{hyperref}
\begin{document}
\section{Content}
\begin{figure}
\mbox{Figure content}
%%% Version 1, causes "Rerun to get cross-references right" warning every time
%%% if hyperref, mathtools, and breqn loaded simultaneously.
%\caption{dirac\_example.m}
%%% Version 2, works fine
\caption{dirac\textunderscore{}example.m}
%%% Version 3, works fine
%\newcommand{\mycaption}{dirac\_example.m}
%\caption{\mycaption{}}
\label{dirac}
\end{figure}
\end{document}
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:
- Tried with original TL 2010 DVD.
- Tried with current packages, updated this morning from CTAN.
- 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.