[Tex/LaTex] amsmath package clash

amsmathcleverefpackages

Just this afternoon I seem to have a package clash that resulted in all my equation numbers disappearing. I seem to have resolved the issue by putting \usepackage{amsmath} at the top of the preamble rather than halfway down, where it has been for the last couple of years. In particular, it seems I need to load amsmath before cleveref. I am sure this is new today. I am now worried that there might be some other package clash caused by moving amsmath to the top (although it seems to be compiling OK now).

M(non-W)E

\documentclass{report}

\usepackage{cleveref}
\usepackage{amsmath}

\begin{document}

\begin{equation}
  \label{eq:j}
  J = \frac{1}{2}(a - b)
\end{equation}

I want to reference \cref{eq:j}

\end{document}

Does this work for anyone else? I use MikTex2.9 by the way. Are there likely to be any other package clashes caused by moving amsmath to the top?

Including my full package list just in case anyone can spot something wrong:

\documentclass[12pt, a4paper, oneside, fleqn]{report}

\usepackage{amsmath}
\usepackage{setspace}                % allow different line spacing
\usepackage[showframe, top=2.5cm, left=3.5cm, bottom=2.5cm, right=2.5cm, includehead]
\usepackage{hyphenat}
\usepackage[T1]{fontenc}   % allows < > to work properly
\usepackage{textcomp}
\usepackage{lmodern}       % gives bold italic font
\usepackage{import}        % import files from subdirectories
\usepackage[toc]{glossaries} % add a glossary
\usepackage[subfigure,titles]{tocloft}
\usepackage[noabbrev]{cleveref}      % reference object types automatically
\usepackage{url}                     % split URLs across lines
\usepackage{graphicx}      % needed for including graphics
\usepackage{epstopdf}
\usepackage{grffile}
\usepackage{placeins}      % insert floatbarriers
\usepackage[singlelinecheck=0,font={sf,small},labelfont=bf]{caption, subfig}
\usepackage{fancyhdr}
\usepackage{appendix}               % allow formatting of appendix titles
\usepackage{subdepth}                   % allow more levels of subsection
\usepackage{sectsty}          % put section headings in sans-serif font
\usepackage{mathtools}
\usepackage{xfrac}                   % allow placement of fractions in text
\usepackage{xspace}                  % automatically put spaces after defined symbols
\usepackage{siunitx}          % good unit formatting
\usepackage{array,booktabs}
\usepackage{enumitem}
\usepackage[round]{natbib}
\usepackage[british]{babel}

Best Answer

amsmath isn't usually a problem when loaded near the top. however, mathtools loads amsmath, so a better approach would be to simply load mathtools at the top, and omit loading amsmath.

Related Question