I'm using texmaker on windows and have serious trouble to use glossaries properly using \printglossaries.
After installing and reinstalling activeperl nothing has changed.
whenever I try to output the glossaries nothing shows up.
So I'm using \printnoidxglossaries. Is that a disadvantage or can anyone tell me what the possible reason for the dysfunction of \printglossaries could be.
My main goal is to create multiple glossaries to show the symbols im using in my thesis and the acronyms. Right now I used some replacement solution (table) to solve the problem.
I searched high and low to find a proper explanation how to set something like that up, but to no avail. any help is hughely appreciated!!!
merci in advance
A
Sample for the glossary i wan to create (now as table)
And here the code where i Have tried to create multiple glossaries.
\documentclass[12pt,twoside,booktabs,a4paper]{book}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[acronym,toc,shortcuts]{glossaries}
\newglossary[ch1]{formel}{ch2}{ch3}{Formelverzeichnis}
\makenoidxglossaries
\setacronymstyle{long-short}
\newglossarystyle{formel_altlong4colheader}{%
\setglossarystyle{altlong4colheader}%
%
%------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=formel_altlong4colheader]
\setglossarystyle{formel_altlong4colheader}
\newpage
\gls{BLK}
\gls{DL}
\gls{Fzg-DL}
\gls{re}
\end{document}
Best Answer
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 requireglossaries-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:
If the document is called
myDoc.tex
, then the complete document build process requires: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 formakeindex
:If the document is called
myDoc.tex
then the complete document build process is:Note that there must be a separate
makeindex
call for each glossary. Since this document has two lists, there must be twomakeindex
calls. This is quite cumbersome, so theglossaries
package provides two scripts to runmakeindex
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:The second script is the
makeglossaries-lite
Lua script. This is on CTAN asmakeglossaries-lite.lua
but the TeX distributions may change the extension. (For example, TeX Live on Linux creates a symbolic link calledmakeglossaries-lite
without the extensions.) So if there's no extension, the build process is:but the
.lua
extension is retained you may need to do: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 runmakeindex
: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 thexindy
package option:In this case,
\makeglossaries
is still needed to create the associated files needed byxindy
(an alternative tomakeindex
), but thexindy
package option ensures that the information is written inxindy
's format. The build process is now:Again, this is quite cumbersome, so you can use the
makeglossaries
ormakeglossaries-lite
scripts. In this case,makeglossaries-lite
doesn't work so well as it's not as intelligent asmakeglossaries
, but sincexindy
is a Perl script, there's no advantage to usingmakeglossaries-lite
in this case. So the best document build is: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 justword
), 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 assort=streckgrenze
) so this isn't a problem.4.
bib2gls
(\printunsrtglossaries
)This method requires the
glossaries-extra
extension package and thebib2gls
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:and
symbols.bib
that contains:The document code is much simpler now:
The document build process is now:
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 overxindy
in thatbib2gls
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:
The document build process is simply:
Page 1 now looks like:
Page 3 now looks like:
Note that there are no location (page) lists.
Summary
makeindex
is precompiled and available with all modern TeX distributions).For help integrating the external tools into your document build, see Incorporating makeglossaries or makeglossaries-lite or bib2gls into the document build.