The following code does not produce umlauts as expected.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{glossaries}
\makeglossaries
\newglossaryentry{a}{%
name={A},%
description={a \"a {\"a} ä}%
}
\begin{document}
\glsentrydesc{a}
\end{document}
As you can see, I tried several variants. Oddly enough, in the glossary itself (produced with \printglossary
) all variants for the umlaut work.
How should I use \glsentrydesc
to get a correct result?
Responder1
The description
field is mainly meant for usage in the glossary section and for this reason (safe writing in the .glo
file) it is usually sanitized, that is, transformed into a string.
You can call glossaries
with the following option
\usepackage[sanitize={description=false}]{glossaries}
if you need to call \glsentrydesc
in the text before typesetting the glossary. See section 2.1 in the package documentation.