I accidentally included the hyperref package into my document and it messed up all the \ref commands I had inside of it.

After I realized what was messing with my \ref command I deleted the \usepackage{hyperref} command from my preamble. But now I have the problem that my normal \ref command does not work anymore. There is only a blank space inserted at the location where the number from the \ref command should be.

I have tried to google the problem for hours but was not able to find a good solution.

Here is an example of where the \ref command does not do anything but does not give me an error message either:

A schematic representation of the organization of the plate
can be found in figure \ref{fig:traplate1}.
\caption{Schematic illustration of the 96-well plate}

Does anyone know how to fix my problem? Thank you very much.

  • 3
    You could also try to get it working correctly with hyperref. The standard "\ref going to the wrong location" is usually because you need \phantomsection or to redefine the appropriate \theH_counter_. But with only "it doesn't work", we can't really help you.
    – Teepeemm
    Jul 10 '19 at 14:58
  • If my solution is satisfying, why not confirming it as the right answer? :)
    – skyter
    Nov 27 '19 at 21:31

To reset a document completely, it is always necessary, to delete all the temporary files in the folder (basically everything, which is not the .tex-file), where you compile the document! There are some lists, that LaTeX reuses, which might cause the problem in your case.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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