I'm attempting to do something similar to Two column glossary, making an extant glossary style wrap into multiple columns. I've followed the suggestion in the comment to the first answer, i.e. use etoolbox
to put the theglossary
environment inside \multicols
. The problem is, only the \AfterEndEnvironment
seems to be doing anything. This code:
\documentclass{article}
\usepackage{glossaries}
\setacronymstyle{long-sc-short}
\newacronym{acr}{acr}{Acronym}
\makeglossaries
\newglossarystyle{twocollong}{
\glossarystyle{long}
\BeforeBeginEnvironment{theglossary}{\begin{multicols}{2}}
\AfterEndEnvironment{theglossary}{\end{multicols}}
}
\begin{document}
Text text
\acrshort{acr}
text text
\printglossary[style=twocollong]
\end{document}
gives me the error that '\begin{document}
is ended by \end{multicols}
'. Commenting out only the \AfterEndEnvironment
line (and leaving in \BeforeBeginEnvironment
) gives me a working document – no errors about \begin{multicols}
being ended by \end{document}
. It seems as if \BeforeBeginEnvironment
isn't inserting anything at all.
What am I doing wrong here?
Best Answer
The following defines a new glossary style based on
mcoltree
that produces a tabular-like appearance:Result: