GeneralGlossary not appearing

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

Glossary not appearing

Post by Cham »

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:

Code: Select all

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

Code: Select all

headings_flag 1
heading_prefix "{\\large\\sffamily\\bfseries "
heading_suffix "}\\nopagebreak\n"
% delim_0 " {\\color{gray}\\dotfill} "
% delim_1 " {\\color{gray}\\dotfill} "
% delim_2 " {\\color{gray}\\dotfill} "

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10340
Joined: Mon Mar 10, 2008 9:44 pm

Glossary not appearing

Post by Stefan Kottwitz »

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
LaTeX.org admin
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Glossary not appearing

Post by Cham »

I did used the \makeglossaries command (in the preamble). Yet, it doesn't compile a glossary.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10340
Joined: Mon Mar 10, 2008 9:44 pm

Glossary not appearing

Post by Stefan Kottwitz »

It is a command with the same name, a perl script, that has to run.

Stefan
LaTeX.org admin
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Glossary not appearing

Post by Johannes_B »

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.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10340
Joined: Mon Mar 10, 2008 9:44 pm

Glossary not appearing

Post by Stefan Kottwitz »

It can even added as "compiler" to editors such as TeXworks, so it's a simple click.

Stefan
LaTeX.org admin
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Glossary not appearing

Post by Cham »

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 ?
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Glossary not appearing

Post by Johannes_B »

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.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10340
Joined: Mon Mar 10, 2008 9:44 pm

Glossary not appearing

Post by Stefan Kottwitz »

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
LaTeX.org admin
User avatar
Cham
Posts: 937
Joined: Sat Apr 02, 2011 4:06 pm

Glossary not appearing

Post by Cham »

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.
Post Reply