I've tried searching and can't find this anywhere, but sorry if it's been asked before.
I'm using the memoir class to write a thesis using LaTeX (which I'm fairly new to) and I've got a section in my appendix with some solutions to an equation, so I've titled the section using
\section{Solutions to equation in section~\ref{sec:xxxxx}}
This displays as it should at the start of the section, so the cross-reference isn't broken, but in the header at the top of odd pages the reference doesn't work; it prints as
A.2. SOLUTIONS TO EQUATION IN SECTION ??
I can't find any way to fix this, short of manually changing it using %\sectionmark{} or removing the cross-reference.
Can anyone give me some suggestions?
Edit: It turns out the hyperref package is causing the problems (if I disable that package it works). I need hyperlinks to external websites in the document so I can't disable the hyperref package. I'm looking for solutions online but I'd appreciate any help in the meantime.
EDIT BY LOCKSTEP: Here's a MWE showing the problem. Note that the problem is not related to the memoir class -- it also shows up with article (if one uses \pagestyle{headings}).
\documentclass{memoir}
\usepackage{hyperref}
\begin{document}
\section{foo}\label{sec:foo}
\cleardoublepage
\section{Solutions to equation in section~\ref{sec:foo}}
\end{document}
\documentclass{memoir}\begin{document}\section{foo}\label{sec:foo}\cleardoublepage\section{Solutions to equation in section~\ref{sec:foo}}\end{document}– lockstep Feb 24 '13 at 13:03