- Follow the steps provided at LaTeX Matters, namely:
- Put two lines into your preamble (before \begin{document}):
\usepackage{glossary}
\makeglossary - When you define or introduce certain terms, wrap them in a \glossary command like so:
\glossary{name={entry name}, description={entry description}}
The inside curly braces are only necessary if you have commas in the entries. - Place this command where you want the glossary to appear:
\printglossary - If you want your glossary to have an entry in the Table of Contents, then put this with the previous line:
\addcontentsline{toc}{chapter}{Glossary} - Then, instead of running a command as described in the post, follow the next step, which is equivalent, but for TeXnicCenter.
- Prompted by Archiddeon's comment in a LaTex forum, in TeXnicCenter, add a post-processing step to a build profile:
- Select the Build menu then choose Define Output Profiles...
- On the left, select a profile you want to start from
- Click the Copy button down below, enter a new name for the profile and click OK
- Then click on the Postprocessor tab
- Create a new postprocessor step by clicking the little "new folder" icon at the top right
- Then enter a name like "Prepare the glossary" and the following:
Executable: makeindex
Arguments: "%tm.glo" -s "%tm.ist" -t "%tm.glg" -o "%tm.gls" - Click OK until you're back at the main window!
Shedding 'light' on various things, mainly (my) religion, Lisp programming and mathematics.
Saturday, 16 February 2013
Simple Glossaries in LaTeX
I use LaTeX (via MikTeX) and TeXnicCenter
a bit, starting from when I did my PhD. It's a great document
preparation system which has some annoying sides, but I won't go down
that path. I tried to set up a glossary in a document recently, and it
wasn't obvious to me how to do that. I did get it working though. Here's
what I did, so that others (including myself) don't have to figure it
out again:
Labels:
LaTeX
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment