The solution provided to question How to modify Memoir class' headers/footers without redefining everything involves a) redefining the Memoir headings and b) redefining page styles. The latter seems to cause a new problem to appear: I now have two "Glossary" sectional titles when using Glossaries. Here is the MWE:
\documentclass{memoir}
\usepackage{lipsum}
%-----------------------------
\copypagestyle{headingsnobook}{headings}
\makeevenhead{headings}%
{\slshape\leftmark}{}{\thepage}
\makeoddhead{headings}{\rightmark}{}{\thepage}
\makeevenfoot{headings}{}{}{}
\makeoddfoot{headings}{}{}{}
\copypagestyle{plainnotice}{plain}
\makeevenfoot{plainnotice}{}{}{\thepage}
\makeoddfoot{plainnotice}{}{}{\thepage}
\aliaspagestyle{chapter}{plainnotice}
\makeevenhead{headingsnobook}{\leftmark}{}{\thepage}
%-----------------------------
\usepackage{glossaries}
\makeglossaries
\newglossaryentry{test}{%
name={test},
description={A test}}
\begin{document}
% Backmatter
\backmatter
\pagestyle{headingsnobook}
\glsaddall
\printglossaries
\end{document}
Commenting-out the code between the dotted lines as well as \pagestyle{headingsnobook} makes the duplicate title disappear, but I need this code to eventually add Book XX and Part XX to mainmatter headings, but not to backmatter headings, such as in glossaries or indexes. Can the "headingsnobook" page style be defined so as to avoid this?
