# Hyperref, amsmath, and horizontal spacing at start of a numbered equation

When amsmath is loaded before hyperref (which I thought was the preferred order), spacing within the equation environment is altered:

\documentclass{article}
\usepackage{amsmath}
\usepackage{hyperref}
\begin{document}
$$-x = -x$$
\end{document}

gives , where the first minus sign seems to be taken as a binary operator, rather than a unary sign. When hyperref is loaded before amsmath, the spacing is identical on both sides of the equation. What is going on? Is the fix simply to load the packages in the opposite order?

(In fact, I set \pagestyle{empty}\hsize=70pt to get the number close enough to get a good-loooking cropped output.)

• This is most likely due to hyperref inserting an anchor, which is seen as an operand to -. Loading amsmath after hyperref removes this insertion. A simple fix would just be to force the first element to be a unary operator {-}. – Werner Aug 3 '13 at 6:07

$${-}x = -x$$