0

I am using my own glossary style which is simply an updated version of the existing stlye altlistgroup. The problem is, that I can run into a pagebreak right between a group heading and the first entry of the group. How can I avoid this?

The only flag I found was \glsgroupskip but this seems to handle only the skip between groups and not between the heading of a group and its first entry.

Here is my style definition so far:

\newglossarystyle{thesislist}{%
\setglossarystyle{altlistgroup}%
\renewcommand*{\glossentry}[2]{%
    \item[\glsentryitem{##1}%
    \glstarget{##1}{\glossentryname{##1}]%
    \mbox{}\newline\nobreak\@afterheading
    \glossentrydesc{##1}\glspostdescription\space ##2}%
\renewcommand*{\glsgroupheading}[1]{%
    \item[\glslistgroupheaderfmt{\glsgetgrouptitle{\Large\color{red!40}##1}}]}
}
0

It seems we can fix it with the same solution as for avoiding page breaks between entries and their descriptions. The following does the trick for me:

\renewcommand*{\glsgroupheading}[1]{%
    \item[\glslistgroupheaderfmt{\glsgetgrouptitle{\Large\color{red!40}##1}}]}
    \mbox{}\nopagebreak\@afterheading
}

A similar fix is described in the glossaries manual on p.282: Glossaries User Manual (v. 4.46) but only for glossary entries and not for headings.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.