[Tex/LaTex] amsmath package clash


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).





  J = \frac{1}{2}(a - b)

I want to reference \cref{eq:j}


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

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