The problem happens when
- amsmath (or mathtools) is loaded.
- An equation (or any other type of displayed-math environment) environment with labels occurs INSIDE an enumerated item.
- You try to use \autoref to generate a reference to one of those equation labels later.
To fix this problem, I use these lines of code just after I load hyperref in my preamble:
The \AMShreffix (i.e., AMS-href-fix) macro "fixes" the displayed-math environment that you pass it. This example fixes equation, align, and gather. If you want to fix alignat too, add a \AMShreffix{alignat} at the end of those lines. Make similar changes for your other displayed-math environments (e.g., flalign and multline too).\makeatletter
\newcommand{\AMShreffix}[1]{%
\expandafter\let\csname old#1\expandafter\endcsname%
\csname #1\endcsname%
\expandafter\renewcommand\csname #1\endcsname{%
\@hyper@itemfalse\csname old#1\endcsname}}
\makeatother
\AMShreffix{equation}
\AMShreffix{align}
\AMShreffix{gather}
That fix changes all of the improper "item" labels back into proper "Equation" labels.