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.

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?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

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}
share|improve this answer
    
Yay! It works, thanks. BTW: It does not work when the \pagestyle{ruled} command is invoked again after the \usepackage{glossaries}. –  daniel kullmann Sep 18 '11 at 11:15
    
Is there any other caveat letting you load glossaries before the \pagestyle command? –  rowman Feb 5 '13 at 15:43
    
@rowman None that I know of. OTOH, the one at hand is big enough. ;-) –  lockstep Feb 5 '13 at 15:45
1  
As a note, version 3.17a or later of glossaries has this fixed. –  bombcar Apr 10 at 15:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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