1

If my references do not resolve after repeated compilation, and I have correctly placed the \label{} commands, what else should I consider?

Schweinebacke
  • 26,336
Steven C. Howell
  • 587
  • 1
  • 7
  • 18
  • I originally was adding this to the linked question but @Schweinebacke insisted that despite the same overall problem, it deserved a separate question because it was not the same specific issue. – Steven C. Howell Jul 01 '17 at 12:52
  • 2
    Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – Heiko Oberdiek Jul 01 '17 at 12:54
  • Also related: https://tex.stackexchange.com/questions/338141/cleveref-with-hyperref-uses-wrong-label-when-referring-to-line-in-code-listing, https://tex.stackexchange.com/questions/53191/impact-of-hyperref-when-varioref-and-cleveref-are-used, https://tex.stackexchange.com/questions/113719/cleveref-fails-to-reference-algorithms, https://tex.stackexchange.com/q/1863/16923 – Schweinebacke Jul 01 '17 at 13:05
  • @HeikoOberdiek I would not have been able to create a MWE until after solving the issue b/c I did not know where the issue was coming from. – Steven C. Howell Jul 01 '17 at 13:16
  • @Schweinebacke While I realize these linked post (or the one marked as being an exact duplicate) when I searched the problem I had both on StackExchange and Google, none of these came up. The problem I had was the references did not resolve. I did not think to check the interaction of hyperref and cleveref. These other posts only seem useful after you know what the problem is. – Steven C. Howell Jul 01 '17 at 13:19
  • The way you arrive at a MWE is by removing everything you think doesn't cause the problem. At some point you remove something and your problem is fixed, so you know that's part of the MWE. Eventually, you've removed everything but the 9 lines that show the problem happens, and you've arrived at your MWE. You also realize that it somehow involves the packages hyperref and cleveref, leading you to google that and get your answer. – Teepeemm Jul 05 '17 at 16:29
  • @Teepeemm I understand how to create a MWE. That is essentially how I solved my problem. I wanted to provide information to help the next person who is confused why their references are not resolving but they do have the label commands in the correct place. I am not sure if including hyerref after cleveref is the only way to create this problem. I created this as a place people could find other things to check for, hopefully saving someone the time of creating a MWE. To me the other linked questions and answers are only helpful if you know what the problem already is to begin with. – Steven C. Howell Jul 05 '17 at 17:09

1 Answers1

0

Check if you are importing both hyperref and cleveref. In this case, I found I had to import cleveref second in order for the \cref references to resolve. This blog post introducing cleveref has the following warning at the top of the page:

"Warning: cleveref has to be loaded after hyerref!"

Steven C. Howell
  • 587
  • 1
  • 7
  • 18