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?
Best Answer
Issue
\pagestyle{ruled}
before loading theglossaries
package. (I've tested my solution with a glossary with about 30 entries, and its page style is indeedruled
.)Partial explanation: Both
memoir
andglossaries
define the\glossarymark
macro.glossaries
adds some compatibility code in casememoir
is used, and so it seems the sensible thing to choose a page style first and then letglossaries
do its work.