Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

This question already has an answer here:

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}​
share|improve this question

marked as duplicate by Speravir, zeroth, Kurt, mafp, Werner Feb 25 '13 at 2:08

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1  
The following example works for me (compile two times!): \documentclass{memoir}\begin{document}\section{foo}\label{sec:foo}\cleardoublep‌​age\section{Solutions to equation in section~\ref{sec:foo}}\end{document}​ –  lockstep Feb 24 '13 at 13:03
    
I tried that and it worked, so I gradually added in the packages that I'm using in my thesis and it turns out hyperref 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. –  James Feb 24 '13 at 14:55
    
It looks like it's linked to the fact that the default headers in the memoir class use all uppercase characters - changing the label to uppercase seems to fix it and will be sufficient for me. Thanks for the help with tracking this down! –  James Feb 24 '13 at 15:05
1  
I can't self answer yet (needs to be eight hours after my post as I have fewer than 10 reputation points) so I'll add my solution to my orignal post for now. –  James Feb 24 '13 at 15:22
    
I forgot about the self-answer limit. Please be sure to revisit tex.sx in a few days and add a self-answer then -- it's not only about my potential upvote, but about maintaining the proper Q+A format (i.e., questions and answers in separate posts). –  lockstep Feb 24 '13 at 15:25

1 Answer 1

It seems to be linked to the fact that the default headers in the memoir class use all uppercase characters - changing the label to uppercase fixes it. Another option is to use \nouppercaseheads to change the headers so they are no longer uppercase.

share|improve this answer

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