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}
\addcontentsline{toc}{subsection}{Section Name}
(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!