2

I am struggling using the glossary package and probably have spent one ore maybe two full days finding a hint why it is not working. Now I think it's time to ask the professional tex users over here for some help!

Following minimal example makes latex complain ! Paragraph ended before \@skipmath was complete.

\documentclass[12pt]{scrreprt}
\usepackage[ngerman,english]{babel}

\usepackage[utf8]{inputenc}                     % no difference whether used or not

%\usepackage[xindy={language=german,codepage=duden-utf8}]{glossaries}   % no difference
\usepackage{glossaries}
\makeglossaries

\newglossaryentry{aquivalenzklassenbildung}{
    name={Äquivalenzklassenbildung},
    plural={Äquivalenzklassenbildungen},
    description={ist ein Verfahren, etc.}
}    

%----------------- document -----------------------------
\begin{document}

\selectlanguage{ngerman}

\printglossary


\chapter{Introduction}

\Gls{aquivalenzklassenbildung} is used... and latex reports ``! Paragraph ended before \\@skipmath was complete''.
The same goes for \Glspl{aquivalenzklassenbildung}...

\end{document}

The next thing you need to know is about my tex setup (I guess): I am using TexLive installed from Debian testing repository (currently version 2020.20210202-2)

In order to generate PDFs I usually execute commands like following:

latex example.tex
makeglossaries example
pdflatex example.tex

As mentioned I have tried lots of things and I can not remember everything (to be honest I only can remember very little). I remember that I tried out various things with inputenc as well as encoding the file that contains the glossary entries in ASCII but nothing had the desired effect.

Maybe I need some options for glossaries like \usepackage[xindy={language=german,codepage=duden-utf8}]{glossaries} but not for xindy instead for makeglossaries? I really have no clue how to make german umlauts work within glossary names (btw. not using umlauts for entry names does not seem to be an reasonable workaround for me).

In some posts people where using xindy instead of makeglossaries. This is one thing I have not tried out, yet.

Maybe someone of you has an idea? I'd appreciate every advice you can serve. Even a "use xindy with following options" would be appreciated :-)

Thanks in advance,

Chris

4
  • Hi and welcome to TeX.SX!. It should be pdflatex->makeglossaries->pdflatex. Your MWE works perfectly for me. If you run pdflatex then makeglossaries then pdflatex and it still doesn't work try deleting your auxiliary files, and then try again.
    – Elad Den
    Mar 2 at 14:44
  • the uppercasing commands of glossaries has restrictions. I would avoid to use them for names starting with umlauts, or try ` name={\relax Äquivalenzklassenbildung},` in the definition. Mar 2 at 14:46
  • @UlrikeFischer ok changing \Gls{} into \gls{} did the trick. The \relax before the umlaut also did work! So for this german Word it does not matter if it is referenced by \Gls or \gls as it is always capitalized. But your second suggestion might become handy for other glossary entries. I wish I had asked you earlier. Would have saved a lot of my time! If you could turn your comment into an answer I would gladly accept it as solution ;-)
    – N3m3si5
    Mar 2 at 15:38
  • @EladDen oh, thank you for pointing that out. I did not know that those commands are not meant to be mixed. Thank you very much. Though changing the first latex command into pdflatex did not change the behavior. It is very interesting to read that it is working for you :-D
    – N3m3si5
    Mar 2 at 15:38
2

glossaries uses the mfirstuc package to uppercase the first letter.

Sadly this can't properly handle Umlauts.

Apart from simply avoiding the uppercasing commands like \Gls, you could also try to use the expl3 command \text_uppercase_first:n instead:

\documentclass[12pt]{scrreprt}
\usepackage{mfirstuc}
%----------------- document -----------------------------
\begin{document}

\makefirstuc{\emph{hallo}}
%\makefirstuc{äqui} %errors

\ExplSyntaxOn
\cs_set_eq:NN\makefirstuc\text_titlecase_first:n
\ExplSyntaxOff

\makefirstuc{\emph{hallo}}
\makefirstuc{äqui}


\end{document}

enter image description here

0

Alternatively to the answer of Ulrike Fischer you could try to switch the method of sorting by using the sort key. Works for me. And btw: xindy is no replacement of \makeglossaries instead it is another sort algorithm you can use.

\documentclass[12pt]{scrreprt}
\usepackage[ngerman,english]{babel}
\usepackage[utf8]{inputenc} 

\usepackage[sort=standard]{glossaries}
\newglossaryentry{aquivalenzklassenbildung}{
    name={Äquivalenzklassenbildung},
    plural={äquivalenzklassenbildungen}, % beware the small ä
    description={ist ein Verfahren, etc.},
    sort={aquivalenzklassenbildung},
}   

%----------------- document -----------------------------
\makeglossaries
\begin{document}
    \selectlanguage{ngerman}
    \printglossary
    
    \chapter{Introduction}
    \Gls{aquivalenzklassenbildung} is used as well as \Glspl{aquivalenzklassenbildung} 
\end{document}
1
  • using the sort keyword did not change the latex runaway argument Runaway argument? quivalenzklassenbildung\fi \fi \fi \glsinsert \fi \let \ifKV@glslink@hyper \ET C. ! Paragraph ended before \@skipmath was complete. but thank you very much for clarifying the use of xindy (as mentioned I am not using it and may have got it wrong from some posts). I will keep the sort key word in mind for later use. I am sure it will get handy! Thank you :-)
    – N3m3si5
    Mar 2 at 15:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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