Sign up ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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
share|improve this question
cleverref is documented as having to be loaded 'late' – Joseph Wright Jun 20 '14 at 16:15
@JosephWright I can't understand it though, I didn't change anything about the order of those two. I'd been playing around with my bibligraphy and added hyphenat but even removing that made no difference. I know I didn't change the order because I pulled the old file out of dropbox ;-) – FionaSmith Jun 20 '14 at 16:30
What about mathtools - it loads amsmath. So, if you had mathtools loaded before cleveref everything would have worked fine. Did you change any other package orders? – Werner Jun 20 '14 at 16:51
@Werner thanks for that also. I have just double checked: at some point I moved tocloft from below 'url' to above cleveref - but it is still there and it doesn't seem to be complaining about that. This package stuff is fraught with danger - that list has been compiled gradually over about five years - how anyone's supposed to remember what clashes with what I don't know! – FionaSmith Jun 20 '14 at 17:39
You load the obsolete package subfigure and also, in a very non standard way, subfig; remove subfigure and move subfig to \usepackage{subfig} by itself. – egreg Jun 20 '14 at 19:53

1 Answer 1

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.