6

I'm writing my thesis using the memoir package, using \pagestyle{ruled}, and have created glossaries for a glossary and an acronym list. The resulting pdf, contains the superfluous text "Glossary" and "Acronyms" right below the chapter headings of the same name.

I use latexmk to build the pdf, using a custom .latexmkrc:

add_cus_dep('glo', 'gls', 0, 'makeglossaries');
sub makeglossaries {
    system("makeglossaries '$_[0]'");
}

Here is my minimal example:

\documentclass[a4paper]{memoir}
\usepackage[acronym,toc]{glossaries}
\makeglossaries
\pagestyle{ruled}
\newglossaryentry{UML}{name={UML},description={definition}}
\newacronym{XML}{XML}{Extensible Markup Language}
\begin{document}
\chapter{Intro}
text \gls{XML}
\gls{UML}
\printglossaries
\end{document}

Removing the \pagestyle{ruled} line removes the extra text. How do I get rid of the extra text, while still using a ruled pagestyle?

1 Answer 1

4

Issue \pagestyle{ruled} before loading the glossaries package. (I've tested my solution with a glossary with about 30 entries, and its page style is indeed ruled.)

Partial explanation: Both memoir and glossaries define the \glossarymark macro. glossaries adds some compatibility code in case memoir is used, and so it seems the sensible thing to choose a page style first and then let glossaries do its work.

\documentclass[a4paper]{memoir}
\pagestyle{ruled}
\usepackage[acronym,toc]{glossaries}
\makeglossaries
\newglossaryentry{UML}{name={UML},description={definition}}
\newacronym{XML}{XML}{Extensible Markup Language}
\begin{document}
\chapter{Intro}
text \gls{XML}
\gls{UML}
\printglossaries
\end{document}
4
  • Yay! It works, thanks. BTW: It does not work when the \pagestyle{ruled} command is invoked again after the \usepackage{glossaries}. Sep 18, 2011 at 11:15
  • Is there any other caveat letting you load glossaries before the \pagestyle command?
    – rowman
    Feb 5, 2013 at 15:43
  • @rowman None that I know of. OTOH, the one at hand is big enough. ;-)
    – lockstep
    Feb 5, 2013 at 15:45
  • 1
    As a note, version 3.17a or later of glossaries has this fixed.
    – bombcar
    Apr 10, 2014 at 15:46

You must log in to answer this question.

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