LaTeX doesn't recognise label for unnumbered section

I'm fairly experienced with LaTeX and can usually solve bigger problems with a quick Google but this one is driving me mad.

In my thesis I have unnumbered sections. I am trying to refer to a subsection by name, using the nameref package.

In my preamble I have \usepackage{hyperref} and \usepackage{nameref} already loaded, and I have recompiled from scratch several times.

The section is defined as

\subsection*{Section Name}\label{sec:eor}


(I have also tried commenting out and moving the \addcontentsline, placing the commands in various orders, pretty much everything I could think of!)

In the text I try to refer to it using \nameref{sec:eor}, both before and after the section heading, but always get an error saying "suppressing empty link...". So the label is not recognised. The same error comes up just using \ref{sec:eor}.

Worst comes to worst I will just type out the section names, but I'd rather not since I haven't settled on the names yet.

TIA for any and all help!

• Welcome to TeX.SE.
– Mico
Jul 2 at 11:23
• it works in standard documents, so show a small but complete example so that we can see what you are doing to break it. Jul 2 at 12:27
• Default \label stores \@currentlabel and \thepage in the aux file (\newlabel). Hyperref adds \@currentlabelname and \@currentHref, plus one free slot for future expansion. You can create a custom \label to store about anything (see pgfplots legend). Jul 2 at 13:12