|
Department of Engineering |
|
|
Glossaries and Acronyms with LaTeX using glosstex
n.b. This page, written in 2004, uses glosstex which has since been
superceded by the glossaries package
Simple Use
Put the following into a file called doc.tex
\documentclass{article}
\usepackage{glosstex}
\begin{document}
% print acronym list
\printglosstex(acr)
\section{Introduction}
This document is typeset using \gls{LaTeX}.
% use \glosstex to add an entry to the glossary - nothing appears in the text
The database file\glosstex{gdf-file} for use with
% use \gls to add an entry to the glossary and the text
\gls{GlossTeX} is a flat
% use \ac to add an entry to the acronym list and the text
\ac{ASCII} file.
% print glossary
\printglosstex(glo)
\end{document}
and put this into a file called definitions.gdf. Make sure
that the @entry strings are at the start of lines.
@entry{LaTeX, \LaTeX{}} \LaTeX{} is a \TeX{}-format.
@entry{GlossTeX} is an add-on.
@entry{ASCII, ASCII, American Standard Code for Information
Interchange} ASCII is a character encoding.
@entry{gdf-file} The file containing glossary definitions
Then do
latex doc
glosstex doc definitions.gdf
makeindex doc.gxs -o doc.glx -s glosstex.ist
latex doc
The resulting file should have a table of acronyms, some text, and
then a glossary.
Note that the command lines required might be slightly different at
your site - the example above works on CUED Unix Teaching System.
Behind the scenes
Lots can go wrong, so it worth knowing something about the underlying
mechanism.
These intermediate log files contain a lot of extraneous information, but
may also contain important hints that help when things go wrong.
Features
Calling the package using
\usepackage[refpage]{glosstex}
adds page numbers to the Glossary. For details on further customisation options see the "Using Glosstex" document.