0

The setting is that I need to have two glossaries. They should be separated just by a \medskip and not by a \newpage-break. To stow them properly, I thought of putting them in a single chapter List of symbols.

The manual raises a warning when using the long-table style (e.g. long3col), but only for entries with long descriptions as there won't be a page-break within a cell of a table. However, this does not apply here ...

To suppress the page-break, I followed a comment of this post of nullifying the \newpage-command temporarily (the accepted answer suggested to redefine \glsclearpage, which didn't work in my case and apparently for others neither)

\begingroup\let\newpage\relax
    \printglossary
    \printglossary
\endgroup

The odd thing is that this seems to suppress the appearing of the chapter-title: The first chapter/glossaries produces six pages with a double page-break between the chapter title, the first glossary and the second glossary.

The second chapter/glossary attempt resulted in a page with both glossaries on but without any chapter-title (left); only if text is added, the chapter-title is printed (right):

tightGlossaryWithWithoutText

\documentclass{scrbook}

\usepackage{glossaries}
% define alternative glossaries
\newglossary[ulg]{UppercaseCharacter}{uld}{udn}{List of uppercase characters}
\newglossary[llg]{LowercaseCharacter}{lld}{ldn}{List of lowercase characters}

% Term definitions
\newglossaryentry{A}{name=A, description={This is an uppercase character}, type=UppercaseCharacter}
\newglossaryentry{a}{name=a, description={This is a lowercase character}, type=LowercaseCharacter}

% activateglossaries
\makeglossaries
\setglossarystyle{long3col}


\begin{document} 
    \chapter*{List of symbols}
     % Print the glossaries
    \printglossary[type=UppercaseCharacter] % domain glossary
    \printglossary[type=LowercaseCharacter] % domain glossary

    \chapter*{Tight list of symbols}
    \begingroup\let\newpage\relax
        \printglossary[type=UppercaseCharacter] % domain glossary
        \bigskip
        \printglossary[type=LowercaseCharacter] % domain glossary
    \endgroup
    
    \chapter*{Tight list of symbols + Text}
    dfgfgjfghj
    \begingroup\let\newpage\relax
    \printglossary[type=UppercaseCharacter] % domain glossary
    \printglossary[type=LowercaseCharacter] % domain glossary
    \endgroup%\clearpage


    \chapter{Content}
    UPPERCASE: \gls{A} and lowercase: \gls{a}

\end{document}

It further seems to be impossible to control the vertical spacing within the Tex-primitive group or is this rather because the glossaries are not supposed to be on a single page?

2
  • 1
    What about setting package option section to section, not chapter (its hinted in the linked answer). Would it solve your issue? If toc is concern, there is etoc package to fix that. Commented Sep 8, 2020 at 6:31
  • Thx =) yes, it does help (and I will probably stick with that) but I was hoping for something that explains the odd behavior (I sent so much time on the problem that I am now really curious why it happens^^)
    – Max
    Commented Sep 11, 2020 at 13:17

1 Answer 1

0

Still not knowing why this happens, I came across two options to solve it.

As Tomas Kurlis pointed out in the comments, with the sections options from the glossary-package the issue does not occur:

\documentclass{scrbook}

\usepackage[section]{glossaries}
% define alternative glossaries
\newglossary[ulg]{UppercaseCharacter}{uld}{udn}{List of uppercase characters}
\newglossary[llg]{LowercaseCharacter}{lld}{ldn}{List of lowercase characters}

% Term definitions
\newglossaryentry{A}{name=A, description={This is an uppercase character}, type=UppercaseCharacter}
\newglossaryentry{a}{name=a, description={This is a lowercase character}, type=LowercaseCharacter}

% activateglossaries
\makeglossaries
\setglossarystyle{longheader}

\begin{document} 
    \chapter*{List of symbols}
    % Print the glossaries
    \printglossary[type=UppercaseCharacter] % domain glossary
    \printglossary[type=LowercaseCharacter] % domain glossary
    
    
    \chapter*{Tight list of symbols}
    \begingroup\let\newpage\relax
    \printglossary[type=UppercaseCharacter] % domain glossary
    \bigskip
    \printglossary[type=LowercaseCharacter] % domain glossary
    \endgroup
    
    \chapter*{Tight list of symbols + Text}
    dfgfgjfghj
    \begingroup\let\newpage\relax
    \printglossary[type=UppercaseCharacter] % domain glossary
    \printglossary[type=LowercaseCharacter] % domain glossary
    \endgroup%\clearpage
    
    \chapter{Content}
    UPPERCASE: \gls{A} and lowercase: \gls{a}
\end{document}

glossariesAsSections

If you need them to be chapters and you want to have an empty chapter before print a \phantom{} there. But this is not a usual case (yes, the question was not that smart from me)... It is just odd that the chapter heading does not get rendered but you'll have to live with the distance between the chapter headings because it is handled lie an (invisible) line of text.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .