# Glossaries conflict with memoir

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

-
\let\theglossary\relax might do –  egreg Mar 3 '14 at 17:43

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}

-
thanks I had tried \let\theglossary\relax but had not realised the need for the \let\endtheglossary\relax line too –  Tom Brien Mar 3 '14 at 18:10

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.

-

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.

-