[Tex/LaTex] \printnoidxglossaries vs \printglossaries

glossariestexmaker

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)

enter image description here

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 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:

Akronyme BLK Belastungskollektiv. 1 DL Dauerlauf. 1 Fzg-DL Fahrzeug Dauerlauf. 1

Page 3:

Formelverzeichnis Bezeichnung Beschreibung Symbol Seiten Re Streckgrenze Pa 1

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:

Abkürzungsverzeichnis BLK Belastungskollektiv DL Dauerlauf Fzg-DL Fahrzeug Dauerlauf

Page 3 now looks like:

Formelverzeichnis Bezeichnung Beschreibung Symbol Seiten Re Streckgrenze Pa Rm Zugfestigkeit Pa

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.