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.

I'm currently facing a problem concerning sorting of glossaries. I'm writing my thesis in german, so I also have some umlaute like "ä","ö" and "ü" in my acronyms. For example there is an acronym "ÖGD". Now the problem is that the sorting of acronyms doesn't work as expected. The acronyms with the umlaute are at the top of the list. Normally the "Ö" for example should be after the "O". The following MWE illustrates the problem.

I know that there is a parameter -g or -s when using makeindex. The problem is that the glossaries package comes with a makeglossaries-perl script. I don't want to touch the perl-script. So, is there another possibility to get my glossary and acronyms-list sorted right?

\documentclass[a4paper,12pt,ngerman]{scrreprt}

\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{caption}
\usepackage{bibgerm}
\usepackage[ngerman=ngerman-x-latest]{hyphsubst}

\usepackage[style=longheader,toc,acronym,nonumberlist]{glossaries}

\makeglossaries         

\begin{document}    

 \newacronym{B2B}{B2B}{Business to Business}
 \newacronym{oegd}{\"OGD}{\"offentlicher Gesundheitsdienst}
 \newacronym{HL7}{HL7}{Health Level Seven}

\glsaddall

\printglossary[type=\acronymtype]

\end{document}

Currently the acronyms-list is sorted like this:

  • ÖGD
  • B2B
  • HL7
share|improve this question

2 Answers 2

up vote 5 down vote accepted

You can use the sort key to change the sort order. Also you should better put groups around the accents (see the paragraph before section 4.1. in the docu):

\newacronym[sort=OEFFE]{oegd}{{\"O}GD}{{\"o}ffentlicher Gesundheitsdienst}

You can also try to use xindy instead of makeindex.

share|improve this answer

Quoting glossaries' manual from section 2.4 (Sorting options):

sort This is a key = value option where the option can only have one of the following values:

  • standard: entries are sorted according to the value of the sort key used in \newglossaryentry? (if present) or the name key (if sort key is missing);
  • def: entries are sorted in the order in which they were defined (the sort key in \newglossaryentry is ignored);
  • use: entries are sorted according to the order in which they are used in the document (the sort key in \newglossaryentry is ignored).

The default is sort=standard.

This explains the sorting you're getting: the name is used since you didn't specify the sort key and it's not the label you're using but what gets displayed: \"OGD, B2B and HL7. \"O is probably treated as a symbol and thus listed first.

You have at least two options now: specify the sort key as Ulrike proposed, or define them in the order you want and add the sort=def to glossaries' options.

(You might also use \newacronym{OEGD}{ÖGD}{öffentlicher Gesundheitsdienst} since you're allowing utf8 input, anyway, …)

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.