3

I'd like to obtain this positioning for the glossary title (considering that the rest of the document is in memoir, twocolumns): example glossary title

On the basis of this question i made a MWE, where I get a weird error: the title shows up two times. Every attempt to modify \glossarysection has been unsuccessful until now

error double glossary title

\documentclass[twocolumn]{memoir}
\usepackage[hyperfirst=true,acronym,section=chapter]{glossaries}
\usepackage{multicol}

\renewcommand*{\glossarysection}[2][]{%
\onecolumn % added to display multicols correctly
  \begin{multicols}{3}[\chapter*{#2}]
  \setlength\glsdescwidth{0.6\linewidth}%
  \glossarymark{\glossarytoctitle}%
}
\renewcommand*{\glossarypostamble}{\end{multicols}}
\makeglossaries

\newglossarystyle{Style1}{%
\glossarystyle{index}}

\newglossaryentry{ppm}{name=ppm,description={parts per million}} 
\newglossaryentry{ppb}{name=ppb,description={parts per billion}} 

\begin{document}

The units are expressed in \gls{ppm}.
The units are expressed in \gls{ppb}.

\printglossary[type=main,style=Style1]

\end{document}
Bernard
  • 271,350
peppino
  • 109

1 Answers1

2

glossaries defines \glossarymark as a command with one argument if it is not already defined but memoiralready defines it as a command without arguments!

So the line

\glossarymark{\glossarytoctitle}%

really executes just \glossarymark (making a mark for a running header) followed by {\glossarytoctitle} which is simply generating the glossary toc title and thus typesetting it inside the multicol.

I'm not quite sure why glossaries defines \glossarymark in that way, from a quick look at the documentation that seems to be some compatibility setting for older versions (maybe), because the correct official command in the documentation is \glsglossarymark these days.

So if you replace the above line by

\glsglossarymark{\glossarytoctitle}%

then it will come out correctly. The same should probably done in the answer you have started from. The reason that it works there is that the compatibility setting kicks in if the book class is used and \glossarymark gets defined with one argument.