LaTeX forum ⇒ GeneralGlossary not appearing Topic is solved

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

Glossary not appearing

Postby Cham » Tue Mar 19, 2019 5:36 pm

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] [Expand/Collapse] [Download] ({untitled.tex})
  1. \RequirePackage[l2tabu,orthodox]{nag}
  2. \documentclass[11pt,letterpaper,twoside]{book}
  3. \usepackage[T1]{fontenc}
  4. \usepackage[total={6.25in,10in},left=1.25in,top=0.5in,includehead,includefoot]{geometry}
  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):
Code: [Select all] [Expand/Collapse] [Download] ({untitled.tex})
  1. headings_flag 1
  2. heading_prefix "{\\large\\sffamily\\bfseries "
  3. heading_suffix "}\\nopagebreak\n"
  4. % delim_0 " {\\color{gray}\\dotfill} "
  5. % delim_1 " {\\color{gray}\\dotfill} "
  6. % delim_2 " {\\color{gray}\\dotfill} "

User avatar
Stefan Kottwitz
Site Admin
Posts: 9444
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Wed Mar 20, 2019 10:41 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
Site admin

User avatar
Cham
Posts: 904
Joined: Sat Apr 02, 2011 4:06 pm

Postby Cham » Thu Mar 21, 2019 5:31 pm

I did used the \makeglossaries command (in the preamble). Yet, it doesn't compile a glossary.

User avatar
Stefan Kottwitz
Site Admin
Posts: 9444
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Thu Mar 21, 2019 5:56 pm

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

Stefan
Site admin

User avatar
Johannes_B
Site Moderator
Posts: 4044
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Fri Mar 22, 2019 8:23 am

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: 9444
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Sun Mar 24, 2019 9:46 pm

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

Stefan
Site admin

User avatar
Cham
Posts: 904
Joined: Sat Apr 02, 2011 4:06 pm

Postby Cham » Mon Mar 25, 2019 4:27 am

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: 4044
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Mon Mar 25, 2019 7:55 am

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: 9444
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Mon Mar 25, 2019 9:41 am

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
Site admin

User avatar
Cham
Posts: 904
Joined: Sat Apr 02, 2011 4:06 pm

Postby Cham » Mon Mar 25, 2019 11:20 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.


Return to “General”

Who is online

Users browsing this forum: No registered users and 5 guests