1

So for the book to be typeset, we have a glossary created with glossaries that contains the word Auflage. The fl ligature has to be broken up, because this is a morpheme boundary. So using babel and it's "| feature works throughout my document, but in the glossary, there is an issue, see my MWE:

\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage{glossaries}
\makeglossaries
\newacronym{Auflage}{A.}{Auf"|lage}
\begin{document}
    \gls{Auflage} vs. Auf"|lage
    \printglossaries
\end{document}

And here is the visual result, where |" ends up in the PDF:

Wrong output with glossaries

TobiBS
  • 5,240

1 Answers1

2

The problem is not with the breaking of the ligature itself, but with the " shorthand, which does not work in the glossaries macros. You can get around this by just copying the definition of "| from ngermanb.ldf to a macro:

\documentclass[ngerman]{article}

\usepackage{babel}
\usepackage{glossaries}

\makeatletter
  % Definition of "| shorthand copied from ngerman.ldf.
  \def\ligatureseparator{\textormath{\penalty\@M\discretionary{-}{}{\kern.03em}\bbl@allowhyphens}{}}
\makeatother

\makeglossaries
\newacronym{Auflage}{A.}{Auf\ligatureseparator lage}

\begin{document}

\gls{Auflage} vs. Auf"|lage
\printglossaries

\end{document}

MWE output

schtandard
  • 14,892