5

I'm using the report class with twoside parameter. I'm using fancyhdr to configure the headers/footer.

I'm using the glossaries package to generate a glossary. The glossary is the only chapter in my document for which the title does not appear in upper case in the header.

Here is how I print the glossary:

\clearpage
\phantomsection
\addcontentsline{toc}{chapter}{Glossary}

\printglossary

I'm using exactly the same code for the index and the title just works great.

Is there a way I can force the title to upper case in the header ?

EDIT: I created a MWE:

\documentclass{report}

\usepackage{fancyhdr}

\pagestyle{fancy}
\fancyhead{}
\fancyhead[LE,RO]{\slshape \nouppercase{\rightmark}}
\fancyhead[LO,RE]{\slshape \leftmark}

\fancypagestyle{plain}{
    \fancyhead{}
    \fancyhead[LE,RO]{\slshape \rightmark}
    \fancyhead[LO,RE]{\slshape \leftmark}
}

\usepackage{glossaries}
\makeglossaries

\newglossaryentry{test}{
  name=test,
  description={test}
}

\begin{document}

\chapter{Introduction}
Ceci est un \gls{test}. 

\printglossary

\end{document}
5
  • Try \usepackage[ucmark=true]{glossaries}; the default is false. Alternatively issue \glsucmarktrue after loading the package.
    – Werner
    Oct 22, 2012 at 19:47
  • I tried both right now, but neither of them change anything. Oct 22, 2012 at 20:05
  • @BaptisteWicht Can you add a minimal working example (MWE) that illustrates the problem. Oct 22, 2012 at 21:05
  • Sorry for that. I added one to the post. Oct 22, 2012 at 22:56
  • 1
    @BaptisteWicht: It could be that you need to update your packages. glossaries on CTAN is listed as 3.03.
    – Werner
    Oct 22, 2012 at 23:02

1 Answer 1

5

You can use the ucmark package option:

\documentclass{report}
\usepackage{fancyhdr}

\pagestyle{fancy}
\fancyhead{}
\fancyhead[LE,RO]{\slshape \nouppercase{\rightmark}}
\fancyhead[LO,RE]{\slshape \leftmark}

\fancypagestyle{plain}{
    \fancyhead{}
    \fancyhead[LE,RO]{\slshape \rightmark}
    \fancyhead[LO,RE]{\slshape \leftmark}
}

\usepackage[ucmark]{glossaries}
\makeglossaries

\newglossaryentry{test}{
  name=test,
  description={test}
}

\begin{document}

\chapter{Introduction}
Ceci est un \gls{test}. 

\printglossary

\end{document}

enter image description here

Another option is to directly redefine \glossarymark (in fact, this is what the ucmark option does):

\makeatletter
\renewcommand{\glossarymark}[1]{%
   \@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}
\makeatother
4
  • I have "LaTeX Error: Unknown option ucmark' for package glossaries'", when I do that. Apparently, my glossaries package is outdated, will try to update it. Oct 22, 2012 at 23:08
  • @BaptisteWicht yes, you need to update the package. Oct 22, 2012 at 23:11
  • There are no more recent versions of glossaries on my system, so I emulated ucmark with renewing glossarymark. Thanks. Oct 22, 2012 at 23:20
  • 1
    @BaptisteWicht you can get the most recent version from CTAN: glossaries. As for redefining \glossarymark, I've added this option to my answer. Oct 22, 2012 at 23:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .