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:
\RequirePackage[l2tabu,orthodox]{nag}\documentclass[11pt,letterpaper,twoside]{book}\usepackage[T1]{fontenc}\usepackage[total={6.25in,10in},left=1.25in,top=0.5in,includehead,includefoot]{geometry}\usepackage[nonumberlist]{glossaries} % Useless option ?\makeglossaries \newglossaryentry{latex}{    name=latex,    description={Is a mark up language specially suited     for scientific documents}} \newglossaryentry{maths}{    name=mathematics,    description={Mathematics is what mathematicians do}} \begin{document} \chapter{Chapter title} \section{Glossary} A word or two \glsaddall % useless command ?\printglossaries \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):
headings_flag 1heading_prefix "{\\large\\sffamily\\bfseries "heading_suffix "}\\nopagebreak\n"% delim_0 " {\\color{gray}\\dotfill} "% delim_1 " {\\color{gray}\\dotfill} "% delim_2 " {\\color{gray}\\dotfill} "

Stefan Kottwitz
Posts: 9444
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: 9444
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: 9444
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: 9444
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.