Glossary in Latex
Glossary in Latex
http://texblog.org/2007/11/01/glossary-in-latex/
Home
About
LaTeX Installation
Posting Questions
TeX Resources
Glossary in Latex
By tom
November 1, 2007
search
go
A glossary is a nice thing to have in a report and usually very helpful. As you probably can imaging, it is very easy to create in Latex. Nevertheless, there are a few things to be done, especially generating the glossary-files. First you have to tell Latex to use the glossary package and to create the glo-file containing all the glossar-entries in your document:
\usepackage{glossary} \makeglossary
Twitter
Follow @thurnherr
Categories
Bibtex Figure & table
Email Subscription
Join 173 other followers
Next you have to add glossary entries to your document. They are of the following form:
\glossary{name={entry name}, description={entry description}}
Sweave
Tag Cloud
Note: Usually, the glossary-entry should be added to keywords where they first appear. A glossary-entry produces by default the following format:
"entry name" "entry description (on multiple lines if necessary)", "page number"
Calendar
M T 5 6 November 2007 W T F S 1 7 8 2 9 3 S 4
figure
10 11
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 Oct Dec
And finally you have to tell Latex where to place you glossary inside the document which is done by the following command at the location you want to produce the glossary:
\printglossary
LaTeX
Blogroll
Command Reference LaTex Minimal Example Latex Symbols LED (Windows editor) MacTex (Mac distribution) Miktex (Windows distribution) Tex on Stack Exchange TexShop (Mac editor) The LaTeX Project
Optinally, you can reference to the glossary in the index (toc-file) by adding the following command after \printglossary":
\addcontentsline{toc}{chapter}{Glossary}
usepackage
What you do first is generate your PDF once. An ist-file as well as a glossary file (*.glo) are generated. The glossary-file contains all the glossary entries found in the document in plain text. Next you type the following command in the command-line:
makeindex document.glo -s document.ist -t document.glg -o document.gls
Top Posts
Lists: Enumerate, itemize, description and how to change them Placing figures/tables side-by-side (\minipage) Placing figures/tables side-by-side (\subfigure) Header/Footer in Latex with Fancyhdr Creating two columns in article, report or book
generating the two files with the extensions *.gls and *.glg. If entries are ignored or rejected, which can be seen either in the glg-file or directly in the output of the makeindex-command, you have to check your glossary entries. The important of the two files is the *.gls-file, as it is used by Latex for the actual glossary. You now need to re-generate the PDF and if everything works fine, your glossary should appear where you wanted it. Good luck:-)
1 of 7
1/16/2012 11:54 AM
http://texblog.org/2007/11/01/glossary-in-latex/
Rate This
Like this:
This entry was posted on Thursday, November 1st, 2007 at 10:21 pm and tagged with addcontentsline, glossary, LaTeX, makeglossary, printglossary, tableofcontent and posted in Introduction, LaTeX, Package. You can follow any responses to this entry through the RSS 2.0 feed.
aalderinkg
November 2nd, 2007 at 8:55 am
I think the glossary style isnt part of the standard TeTeX distribution (At least not on the distribution Ive running on my Solaris machine). This might discourage people to use it. If other people are in need of the package, you can find it on the CTAN repositories under tex-archive/macros/latex/contrib /glossary There is a manual included, explaining exactly how to get everything set up
Reply
Geri
March 2nd, 2008 at 6:30 pm
Tony Ludlow
March 6th, 2008 at 9:26 pm
Very helpful, and brilliant timing to anticipate my problems. It worked the first time like a dream, but when I tried the second time it says (when running my new makeindex.bat) that it cannot parse output. Should I delete one or more of the files? Which?
2 of 7
1/16/2012 11:54 AM
http://texblog.org/2007/11/01/glossary-in-latex/
Reply
tom
April 3rd, 2008 at 6:00 pm
Hi Tony, If your glossary entries have changed you may want to restart the procedure again. I would suggest, you remove all the glossaryrelated files first. Tom
Reply
annmucc
April 7th, 2008 at 6:23 pm
Hi all, I am trying to generate a glossray with the above insturctions. However, the .gls and .glg files are not being created. I am using LEd as an interface, if that may be the clue to my problems Thanks Ann
Reply
tom
April 7th, 2008 at 9:04 pm
Hi Ann, I tried it with both, Latex and PDFLatex before using makeindex in the command line and it worked? Make sure you have the .gloand .ist-files. Next you have to change directory in the command line to your document directory. Does makeindex produce any error in the command line? Alternatively to the command line procedure, you can define your own command in LEd. Go to the LEd install directory and open the Batches-directory. Inside you will find a file user1.bat, which you drag-and-drop into LEd. You simply have to replace the line saying: @echo off by makeindex document.glo -s document.ist -t document.glg -o document.gls, where document has to be replaced by the filename of your tex-file. After saving, you can execute the user command 1 (U1) in the top right corner, if you have the standard LEd layout. If you cannot see it, make sure you have the Latex Compile additional-toolbar. OK? Cheers, Tom
Reply
annmucc
May 5th, 2008 at 10:03 am
Hi Tom Thanks for the tips. I managed to get the glossary However, I am also getting the page number written at the end of the glossray enry (as it shows in the default). Does anyone know how this can be removed in an easy way? Thanks Ann
Reply
annmucc
May 5th, 2008 at 10:13 am
Hey Ok just figured out how to do it with some help from google and brother (THis is my first time using Latex, and my IT skills are nothing special, but I am enjoying it) You have to write [number=none] between \usepackage and
3 of 7
1/16/2012 11:54 AM
http://texblog.org/2007/11/01/glossary-in-latex/
{glossary}
Reply
Martoni
July 30th, 2008 at 3:35 pm
Thanks for your usefull howto, but in my distribution (ubuntu) the makeindex command doesnt work. Arguments order must be changed: makeindex -s document.ist -t document.glg -o document.gls document.glo
Reply
zzzzz
August 7th, 2008 at 4:30 pm
Nice package shame theres not an emacs shortcut for compiling the glossary
Reply
Victor
February 13th, 2009 at 4:25 am
A tip for Kile users: Go to Configure Kile in settings, under Tools, select Build, New Tool Name: Glossary (or as you want) Command: makeindex Options: %S.glo -s %S.ist -t %S.glg -o %S.gls Then you can add this in the QuickBuild configuration so that the glossary is automatically generated at each build Cheers Victor
Reply
Owen
February 18th, 2009 at 3:11 pm
josh
March 22nd, 2009 at 1:31 pm
thank you very much, its unbelievable how you can explain 55 pages instructions into less than one page.
Reply
anonym
May 19th, 2009 at 6:41 am
Kionar
March 31st, 2010 at 8:13 am
The glossaries package has replaced the now obsolete glossary package
Reply
Rashed
April 6th, 2010 at 8:38 pm
4 of 7
1/16/2012 11:54 AM
http://texblog.org/2007/11/01/glossary-in-latex/
Logava
November 25th, 2010 at 5:45 am
glosName
April 7th, 2011 at 2:11 pm
Hi, i cant find how to rename glossary. I want it says somthing else then glossary on top of the list. Thank you
Reply
tom
April 13th, 2011 at 4:02 am
Hi, You can rename the glossary name using the following command: \renewcommand{\glossaryname}{Your Glossary} Make sure you add the command before \printglossary, but inside the document. Tom.
Reply
glosName
April 20th, 2011 at 8:23 pm
John
April 30th, 2011 at 7:18 pm
I am a relatively new user to LaTeX and am trying to help one of my students format a masters thesis. We have everything formatted but the glossary and the running header. I believe Ive followed the instructions for making a glossary, but I dont understand how to access the .glo file. The sample.tex and the other files seem to work, and I get a sample.glo file. However, when I click on that file is asks me to choose application. When I open in it TeXshop, I can see the makeindex pulldown menu, but cant typeset. This would be easiest if someone did a screencast of the entire process, from downloading the glossary zip file to the entire installation and run. There are so many LaTeX help sites, but Ive tried about eight so far and cant seem to get an glossary to show up. Thoughts?
Reply
tom
May 1st, 2011 at 5:19 am
Hi John, In order to create the glossary, once you see the *.glo file in your folder, you will need to open a terminal-window and navigate to that folder. In there, type the makeindexcommand given above, while replacing document with your own document name. In the output you should then see something like: Scanning input file document.glo....done (4 entries accepted, 0 rejected).. Go back to TeXShop after that and re-typeset (LaTeX) your document to include the glossary
5 of 7
1/16/2012 11:54 AM
http://texblog.org/2007/11/01/glossary-in-latex/
in your document. This version of glossary will perfectly do. However, I should mention that there is a newer version called glossaries. You can find an introduction here. Also, Im not sure when and how to use the MakeIndex command in TeXShop, but it will definitely not work with glossary, at least the way I describe it above. Hope this clarifies some of your questions. If not, dont hesitate to post another comment. Thanks, Tom.
Reply
Rianda
July 6th, 2011 at 9:09 am
Is it possible to put figures in the glossary? For instance, I would explain a notion using a figure.
Reply
Rianda
July 6th, 2011 at 9:11 am
Leave a Reply
Notify me of follow-up comments via email. Notify me of new posts via email.
Post Comment
6 of 7
1/16/2012 11:54 AM
http://texblog.org/2007/11/01/glossary-in-latex/
Blog Stats
2,730,964 hits
7 of 7
1/16/2012 11:54 AM