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 am having an issue with glossaries producing the warning when used with the memoir class

Package glossaries Warning: overriding `theglossary' environment on input line 4761.

A minimum working example is:

\documentclass{memoir}
\let\printglossary\relax
\usepackage{glossaries}
\makeglossaries
\begin{document}
Hello World
\printglossary
\end{document}

The \let\printglossary\relax covers the warning Package glossaries Warning: Overriding \printglossary on input line 4536, however this approach will not work for the theglossary warning. I realise that this warning is not an error and could just be ignored but I would rather prefer to work out a way of suppressing it. Thanks

share|improve this question
    
\let\theglossary\relax might do –  egreg Mar 3 at 17:43

3 Answers 3

up vote 7 down vote accepted

With the same style as for \printglossary, you can use

\documentclass{memoir}

\let\printglossary\relax
\let\theglossary\relax
\let\endtheglossary\relax

\usepackage{glossaries}
\makeglossaries
\begin{document}
Hello World
\printglossary
\end{document}

I wouldn't silence off all warnings by glossaries. With silence you can override the relevant messages by

\documentclass{memoir}

\usepackage{silence}
\WarningFilter{glossaries}{Overriding \printglossary}
\WarningFilter{glossaries}{overriding `theglossary'}

\usepackage{glossaries}
\makeglossaries
\begin{document}
Hello World
\printglossary
\end{document}
share|improve this answer
    
thanks I had tried \let\theglossary\relax but had not realised the need for the \let\endtheglossary\relax line too –  Tom Brien Mar 3 at 18:10

Update to glossaries version 4.04 and use the noredefwarn package option:

\documentclass{memoir}

\usepackage[noredefwarn]{glossaries}

\makeglossaries

\begin{document}

Hello World

\printglossary

\end{document}

glossaries also has a nowarn option that suppresses warnings, but if something unexpected happens it's best to switch the warnings back on.

share|improve this answer

You can use the package silence.

Issue \WarningsOff* before loading glossaries and \WarningsOn after it.

MWE:

\documentclass{memoir}
\usepackage{silence}
\WarningsOff*
\usepackage{glossaries}
\WarningsOn
\makeglossaries
\begin{document}
Hello World
\printglossary
\end{document} 

In this way those warnings are gone and all the rest of them in the document are still there.

share|improve this answer

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.