There are actually five methods of generating glossary lists (summarised in section 1.1 Indexing Options of the glossaries
user manual). The first uses \printnoidxglossaries
, the second two use \printglossaries
and the last two (which require glossaries-extra
) use \printunsrtglossaries
. Table 1.1: Glossary Options: Pros and Cons summarizes the advantages and disadvantages of each method.
Using a slightly trimmed version of your MWE, here are all the methods:
1.\printnoidxglossaries
This method doesn't require any external tools, but it's designed for ASCII sort values and it can significantly slow the document build. If the sort value contains fragile commands, you need to use the sanitizesort
setting.
MWE:
\documentclass[12pt,twoside,a4paper]{book}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[acronym,toc,shortcuts]{glossaries}
\newglossary[ch1]{formel}{ch2}{ch3}{Formelverzeichnis}
\makenoidxglossaries
\setacronymstyle{long-short}
%------Acronym---------
\renewcommand*{\acronymname}{Abkürzungsverzeichnis}
\newacronym[shortplural={BLKs},longplural={Belastungskollektive}]{BLK}{BLK}{Belastungskollektiv}
\newacronym{DL}{DL}{Dauerlauf}
\newacronym[shortplural={Fzg-DL},longplural={Fahrzeugdauerläufen}]{Fzg-DL}{Fzg-DL}{Fahrzeug
Dauerlauf}
%-----Formel---
\newglossaryentry{re}
{%
name={$R_e$},
description={Streckgrenze},
symbol={Pa},
sort=streckgrenze,
type=formel
}
\newglossaryentry{rm}
{%
name={$R_m$},
description={Zugfestigkeit},
symbol={Pa},
sort=Zugfestigkeit,
type=formel
}
\begin{document}
\printnoidxglossary[type=acronym]
\printnoidxglossary[type=formel,style=altlong4colheader]
\newpage
\gls{BLK}
\gls{DL}
\gls{Fzg-DL}
\gls{re}
\end{document}
If the document is called myDoc.tex
, then the complete document build process requires:
pdflatex myDoc
pdflatex myDoc
UTF-8 characters, such as ü and ä, won't be correctly sorted.
Page 1:

Page 3:

Since rm
hasn't been referenced in the document (with, e.g., \gls{rm}
) it doesn't appear in the list.
Symbols are often problematic with this method, but since you've used the sort
key to assign an alphabetic value (sort=streckgrenze
) this shouldn't cause a problem in this case.
This method also can't form ranges in the location (page) lists.
2. makeindex
(\printglossaries
)
This method uses the helper application makeindex
to generate the sorted lists. The command \makeglossaries
is needed to ensure that the appropriate files are created for makeindex
:
\documentclass[12pt,twoside,a4paper]{book}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[acronym,toc,shortcuts]{glossaries}
\newglossary[ch1]{formel}{ch2}{ch3}{Formelverzeichnis}
\makeglossaries
\setacronymstyle{long-short}
%------Acronym---------
\renewcommand*{\acronymname}{Abkürzungsverzeichnis}
\newacronym[shortplural={BLKs},longplural={Belastungskollektive}]{BLK}{BLK}{Belastungskollektiv}
\newacronym{DL}{DL}{Dauerlauf}
\newacronym[shortplural={Fzg-DL},longplural={Fahrzeugdauerläufen}]{Fzg-DL}{Fzg-DL}{Fahrzeug
Dauerlauf}
%-----Formel---
\newglossaryentry{re}
{%
name={$R_e$},
description={Streckgrenze},
symbol={Pa},
sort=streckgrenze,
type=formel
}
\newglossaryentry{rm}
{%
name={$R_m$},
description={Zugfestigkeit},
symbol={Pa},
sort=Zugfestigkeit,
type=formel
}
\begin{document}
\printglossary[type=acronym]
\printglossary[type=formel,style=altlong4colheader]
\newpage
\gls{BLK}
\gls{DL}
\gls{Fzg-DL}
\gls{re}
\end{document}
If the document is called myDoc.tex
then the complete document build process is:
pdflatex myDoc
makeindex -s myDoc.ist -t myDoc.alg -o myDoc.acr myDoc.acn
makeindex -s myDoc.ist -t myDoc.ch1 -o myDoc.ch2 myDoc.ch3
pdflatex myDoc
Note that there must be a separate makeindex
call for each glossary. Since this document has two lists, there must be two makeindex
calls. This is quite cumbersome, so the glossaries
package provides two scripts to run makeindex
the required number of times with the required settings. In both cases the script reads the .aux
file to find out what systems calls need to be made.
The first script is the makeglossaries
Perl script, which needs Perl installed. The build process is now simplified to:
pdflatex myDoc
makeglossaries myDoc
pdflatex myDoc
The second script is the makeglossaries-lite
Lua script. This is on CTAN as makeglossaries-lite.lua
but the TeX distributions may change the extension. (For example, TeX Live on Linux creates a symbolic link called makeglossaries-lite
without the extensions.) So if there's no extension, the build process is:
pdflatex myDoc
makeglossaries-lite myDoc
pdflatex myDoc
but the .lua
extension is retained you may need to do:
pdflatex myDoc
makeglossaries-lite.lua myDoc
pdflatex myDoc
I suspect the problem that you're having is integrating this step into TeXMaker. See Using Texmaker with glossaries on Windows for further help.
Another possibility is to use the automake
package option. This will try to use TeX's shell escape to run makeindex
:
\usepackage[acronym,toc,shortcuts,automake]{glossaries}
The resulting document is the same as in the previous example. Again, this method isn't designed for UTF-8, as makeindex
doesn't have UTF-8 support.
Since makeindex
isn't aware of LaTeX commands, sort values that contain markup can result in odd ordering. For example, the sort value \emph{word}
will be sorted according to the characters \
e
m
p
h
{
w
o
r
d
}
which will put it in the symbols group (rather than in the more intuitive W letter group).
2. xindy
(\printglossaries
)
This method is very similar to the makeindex
method, from the document code point of view, but it requires the xindy
package option:
\documentclass[12pt,twoside,a4paper]{book}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[acronym,toc,shortcuts,xindy]{glossaries}
\newglossary[ch1]{formel}{ch2}{ch3}{Formelverzeichnis}
\makeglossaries
\setacronymstyle{long-short}
%------Acronym---------
\renewcommand*{\acronymname}{Abkürzungsverzeichnis}
\newacronym[shortplural={BLKs},longplural={Belastungskollektive}]{BLK}{BLK}{Belastungskollektiv}
\newacronym{DL}{DL}{Dauerlauf}
\newacronym[shortplural={Fzg-DL},longplural={Fahrzeugdauerläufen}]{Fzg-DL}{Fzg-DL}{Fahrzeug
Dauerlauf}
%-----Formel---
\newglossaryentry{re}
{%
name={$R_e$},
description={Streckgrenze},
symbol={Pa},
sort=streckgrenze,
type=formel
}
\newglossaryentry{rm}
{%
name={$R_m$},
description={Zugfestigkeit},
symbol={Pa},
sort=Zugfestigkeit,
type=formel
}
\begin{document}
\printglossary[type=acronym]
\printglossary[type=formel,style=altlong4colheader]
\newpage
\gls{BLK}
\gls{DL}
\gls{Fzg-DL}
\gls{re}
\end{document}
In this case, \makeglossaries
is still needed to create the associated files needed by xindy
(an alternative to makeindex
), but the xindy
package option ensures that the information is written in xindy
's format. The build process is now:
pdflatex myDoc
xindy -L german -C din5007-utf8 -I xindy -M myDoc -t myDoc.ch1 -o myDoc.ch2 myDoc.ch3
xindy -L german -C din5007-utf8 -I xindy -M myDoc -t myDoc.alg -o myDoc.acr myDoc.acn
pdflatex myDoc
Again, this is quite cumbersome, so you can use the makeglossaries
or makeglossaries-lite
scripts. In this case, makeglossaries-lite
doesn't work so well as it's not as intelligent as makeglossaries
, but since xindy
is a Perl script, there's no advantage to using makeglossaries-lite
in this case. So the best document build is:
pdflatex myDoc
makeglossaries myDoc
pdflatex myDoc
In other words, the document build process is effectively the same as for the previous example.
This method has the advantage over the previous two methods in that it supports UTF-8 and non-English languages, so it should correctly order German words.
The disadvantage with this method its lack of support for symbols. Xindy strips all LaTeX commands and braces from the sort value, which is usually desirable (for example, if you have a sort value of \emph{word}
it's good that xindy treats this as just word
), but it causes a problem when the entire sort value consists solely of commands. For example, \ensuremath{\alpha}
devolves into an empty string, which xindy doesn't like. The other problem is that xindy merges entries with identical sort values, so if stripping commands causes the sort value of one entry to become identical to another, then the entries will be merged.
You've used the sort
key in your symbols (such as sort=streckgrenze
) so this isn't a problem.
4. bib2gls
(\printunsrtglossaries
)
This method requires the glossaries-extra
extension package and the bib2gls
helper application (which requires Java). This uses a different approach to the other methods. All entries are defined in .bib
files.
So you might have the file abbreviations.bib
that contains:
% Encoding: UTF-8
@abbreviation{BLK,
short = {BLK},
long = {Belastungskollektiv},
longplural = {Belastungskollektive}
}
@abbreviation{DL,
short = {DL},
long = {Dauerlauf}
}
@abbreviation{Fzg-DL,
short = {Fzg-DL},
shortplural = {Fzg-DL},
long = {Fahrzeug Dauerlauf},
longplural = {Fahrzeugdauerläufen}
}
and symbols.bib
that contains:
% Encoding: UTF-8
@symbol{re,
name={$R_e$},
description={Streckgrenze},
symbol={Pa}
}
@symbol{rm,
name={$R_m$},
description={Zugfestigkeit},
symbol={Pa}
}
The document code is much simpler now:
\documentclass[12pt,twoside,a4paper]{book}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[abbreviations,shortcuts,record]{glossaries-extra}
\newglossary[ch1]{formel}{ch2}{ch3}{Formelverzeichnis}
\setabbreviationstyle{long-short}
\GlsXtrLoadResources[
src={abbreviations}% entries defined in abbreviations.bib
]
\GlsXtrLoadResources[
src={symbols},% entries defined in abbreviations.bib
type = formel, % put these entries in the 'formel' list
sort-field=description % sort according to the 'description' field
]
\begin{document}
\printunsrtglossary[type=abbreviations,title=Abkürzungsverzeichnis]
\printunsrtglossary[type=formel,style=altlong4colheader]
\newpage
\gls{BLK}
\gls{DL}
\gls{Fzg-DL}
\gls{re}
\end{document}
The document build process is now:
pdflatex myDoc
bib2gls myDoc
pdflatex myDoc
So again you need to find a way to integrate a helper application into your build process. This method has the advantage over the first two in that it supports UTF-8 and non-English sorting. (The document language setting is picked up from the .aux
file.) It also has the advantage over xindy
in that bib2gls
allows empty and identical sort values, but it also has a limited understanding of some basic kernel symbol commands. For example, it will convert \ensuremath{\alpha}
into the mathematical Greek lower case alpha 𝛼. As illustrated in the above (sort-field=description
), you can also sort according to a different field, if that provides a more appropriate order.
5. \printunsrtglossaries
(no sorting)
This final method doesn't do any sorting or indexing. All defined entries are listed, regardless of whether they've been used in the document. Entries are listed in order of definition:
\documentclass[12pt,twoside,a4paper]{book}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[abbreviations,shortcuts,sort=none]{glossaries-extra}
\newglossary[ch1]{formel}{ch2}{ch3}{Formelverzeichnis}
\setabbreviationstyle{long-short}
\newacronym[shortplural={BLKs},longplural={Belastungskollektive}]{BLK}{BLK}{Belastungskollektiv}
\newacronym{DL}{DL}{Dauerlauf}
\newacronym[shortplural={Fzg-DL},longplural={Fahrzeugdauerläufen}]{Fzg-DL}{Fzg-DL}{Fahrzeug
Dauerlauf}
\newglossaryentry{re}
{%
name={$R_e$},
description={Streckgrenze},
symbol={Pa},
type=formel
}
\newglossaryentry{rm}
{%
name={$R_m$},
description={Zugfestigkeit},
symbol={Pa},
type=formel
}
\begin{document}
\printunsrtglossary[type=abbreviations,title=Abkürzungsverzeichnis]
\printunsrtglossary[type=formel,style=altlong4colheader]
\newpage
\gls{BLK}
\gls{DL}
\gls{Fzg-DL}
\gls{re}
\end{document}
The document build process is simply:
pdflatex myDoc
Page 1 now looks like:

Page 3 now looks like:

Note that there are no location (page) lists.
Summary
- Options 1 and 5 are the simplest as they don't require any external tools.
- Options 2, 3 and 4 all require an external tool which needs to be incorporated into your build process. How you do this depends on your text editor.
- Option 2 doesn't require any additional software (
makeindex
is precompiled and available with all modern TeX distributions).
- Option 3 requires Perl.
- Option 4 requires Java.
- Options 3 and 4 work best for UTF-8 non-English sort values.
For help integrating the external tools into your document build, see Incorporating makeglossaries or makeglossaries-lite or bib2gls into the document build.
\documentclass
and ends with\end{document}
glossaries
performance page for a comparison, but you don't need Perl. You can use themakeglossaries-lite
Lua script instead. See also What can interfere with glossaries to prevent printing?makeglossaries
andmakeglossaries-lite
are scripts not commands. (It's a bit confusing since there's also a command called\makeglossaries
that you use in the document.)