I have written a latex document, and in this document I reference to equations, tables, and figures. Everything works perfectly.
Now I discovered that I have to use a specific template. Therefore I copy-past my latex code into the template .tex file, and now equation reference is broken. References to tables and figures still work, the bibliography is still fine, but any reference to an equation ends up with a (??).
I am not sure what could be causing this, maybe some loaded packages? (I only load hyperref last).
This is the list of packages I load:
\documentclass[11pt,a4paper,english,oneside]{book}
\usepackage{etex}
\usepackage[left=1in, right=1in]{geometry}
\usepackage[Lenny]{fncychap}
\usepackage[utf8]{inputenc}
\usepackage[british]{babel}
\usepackage{dsfont}
\usepackage{fancyhdr}
\usepackage{booktabs}
\usepackage[hang,bottom,stable,multiple]{footmisc}
\usepackage{appendix}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage[sort,round]{natbib}
\usepackage{etoolbox}
\usepackage{amsthm}
\usepackage{thmtools}
\usepackage{setspace}
\usepackage{lipsum}
\usepackage{datetime}
%\usepackage{tocloft}
\usepackage{graphicx,listings,xcolor,textcomp}
\usepackage{mcode}
\usepackage[margin=10pt, font=small, labelfont=bf, labelsep=endash]{caption}
\usepackage{chngcntr}
\usepackage{epstopdf}
\usepackage{xparse}
\usepackage{cleveref}
\usepackage{array,hhline}
\usepackage{rotating}
\usepackage{tabularx}
\usepackage{arydshln}
\usepackage{tikz}
\usepackage{multirow}
\usepackage{csquotes}
\usepackage{wrapfig}
%instructions to make the algorithm pseudo-code package work
\usepackage{algorithm}
\usepackage[noend]{algpseudocode}
\makeatletter
\def\BState{\State\hskip-\ALG@thistlm}
\makeatother
\usepackage{hyperref}
Please tell me what other informations I should include.
\documentclass{...}
and ending with\end{document}
. – samcarter_is_at_topanswers.xyz Nov 21 '17 at 10:06cleveref
needs to be loaded afterhyperref
– samcarter_is_at_topanswers.xyz Nov 21 '17 at 10:10