## LaTeX forum ⇒ General ⇒ Glossary not appearing Topic is solved

LaTeX specific issues not fitting into one of the other forums of this category.
Cham
Posts: 904
Joined: Sat Apr 02, 2011 4:06 pm

### Glossary not appearing

I'm trying to make a glossary (for the first time), but the code isn't working. I don't understand what is wrong. Here's a MWE code to work with:
1. \RequirePackage[l2tabu,orthodox]{nag}
2. \documentclass[11pt,letterpaper,twoside]{book}
3. \usepackage[T1]{fontenc}
5. \usepackage[nonumberlist]{glossaries} % Useless option ?
6. \makeglossaries
7.
8. \newglossaryentry{latex}
9. {
10. name=latex,
11. description={Is a mark up language specially suited
12. for scientific documents}
13. }
14.
15. \newglossaryentry{maths}
16. {
17. name=mathematics,
18. description={Mathematics is what mathematicians do}
19. }
20.
21. \begin{document}
22.
23. \chapter{Chapter title}
24.
25. \section{Glossary}
26.
27. A word or two
28.
29. \glsaddall % useless command ?
30. \printglossaries
31.
32. \end{document}

What am I doing wrong here? The glossary should be showing at the end of that document, but the two entries aren't after a 3 passes compilation.

I suspect that a special file should be located in the same folder as the LaTeX code itself, a bit like what is needed for an index. For reference, here's the code I'm using inside the "index_style.ist" file for my index (I would like a similar style for the glossary):
4. % delim_0 " {\\color{gray}\\dotfill} "
5. % delim_1 " {\\color{gray}\\dotfill} "
6. % delim_2 " {\\color{gray}\\dotfill} "

Stefan Kottwitz
Posts: 9450
Joined: Mon Mar 10, 2008 9:44 pm
Hi Cham,

you need to run makeglossaries or makeindex, not just do LaTeX runs. It's described in the glossaries manual, can you find it there?

Stefan

Cham
Posts: 904
Joined: Sat Apr 02, 2011 4:06 pm
I did used the \makeglossaries command (in the preamble). Yet, it doesn't compile a glossary.

Stefan Kottwitz
Posts: 9450
Joined: Mon Mar 10, 2008 9:44 pm
It is a command with the same name, a perl script, that has to run.

Stefan

Johannes_B
Site Moderator
Posts: 4044
Joined: Thu Nov 01, 2012 4:08 pm
It is an extra auxiliary program.
You have to call it in a similar way you are calling BibTeX.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Stefan Kottwitz
Posts: 9450
Joined: Mon Mar 10, 2008 9:44 pm
It can even added as "compiler" to editors such as TeXworks, so it's a simple click.

Stefan

Cham
Posts: 904
Joined: Sat Apr 02, 2011 4:06 pm
Well, is there a way to make that glossary from within LaTeX only, without calling any other special program ?

If LaTeX could compile an index by itself, it should also be able to create a glossary, isn't ?

Johannes_B
Site Moderator
Posts: 4044
Joined: Thu Nov 01, 2012 4:08 pm
The index needs an external program as well.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Stefan Kottwitz
Posts: 9450
Joined: Mon Mar 10, 2008 9:44 pm
The external script makeglossaries implicitly runs the external program makeindex. It calls makeindex with suitable options for the glossary to make the life easier. It should be explained at the beginning of the glossaries manual.

Stefan

Cham
Posts: 904
Joined: Sat Apr 02, 2011 4:06 pm
Johannes_B wrote:The index needs an external program as well.

I don't understand this. My index is made from within my installation of LaTeX. I don't use any external program for it, and it compiles fine without a glitch.