# glossaries alters main text

Some languages use inflexions and conjugations.

Consider this example:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{glossaries}
\newglossaryentry{tēju} % how the word is found in text
{
name=tēja, %nominative for the glossary entry
description={a drink}
}
\makeglossaries
\begin{document}
Dzert \gls{tēju}.
\printglossaries
\end{document}


after compiling (with xelatex - see glossary with diacritic marks) unfortunately the main text got altered from

"Dzert tēju"

to

"Dzert tēja"

How to fix?

• Your example is not compilable. I doubt that the glossar entry tēju is possible at all -- the glossar entry must use letters only, as far as I know
– user31729
Feb 7, 2019 at 20:00
• Yes, I know. But you can drop inputenc then... Again, I would not use non-ASCII letters as glossary label names
– user31729
Feb 7, 2019 at 20:05
• By the way: name=tēja will print tēja of course, when \gls{tēju} is applied. If you want another case like genitive etc, you have to provide special keys for this. glossaries can not know which case you need here.
– user31729
Feb 7, 2019 at 20:08
• In this example tēju is really just an internal label. It could just as well be replaced with foo and the result would be the same. If you want glossaries to be able to apply the correct declension to your words, extra work is needed, see for example §4.2 and §4.3 of the glossaries manual. Feb 7, 2019 at 20:17
– user31729
Feb 8, 2019 at 15:08

Solution is obtained by using the text option of \newglossaryentry:
\newglossaryentry{tēju} % placeholder for the dictionary entry