Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
1  
description is mainly meant for usage in the glossary. Do \usepackage[sanitize={description=false}]{glossaries} if you want to use \glsentrydesc in the text. –  egreg Apr 4 '13 at 16:52
    
@egreg Thanks. This also fixes the case when the description is shown in normal uses with \gls, and changed \glsdisplay(first). If you make it an answer, I will accept it. –  mafp Apr 4 '13 at 19:46

1 Answer 1

up vote 3 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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