As egreg said, look at the nomencl
and glossaries
packages.
Quick and dirty for nomencl
:
\documentclass{article}
\usepackage[refpage]{nomencl}
\makenomenclature
\begin{document}
Here is some text, where we use APC.\nomenclature{APC}{antigeen-presenterende cel}
\printnomenclature
\end{document}
Run
pdflatex; makeindex -s nomencl.ist -t liselot.nlg -o liselot.nls liselot.nlo; pdflatex
on it to obtain
Quick and dirty for glossaries
:
\documentclass{article}
\usepackage{glossaries}
\makeglossaries
\newglossaryentry{apc}{%
name={APC},%
description={antigeen-presenterende cel}%
}
\begin{document}
Here is some text, where we use \gls{apc}.
\printglossary[style=long]
\end{document}
Run
pdflatex; makeindex -s liselot2.ist -t liselot2.glg -o liselot2.gls liselot2.glo; pdflatex
on it to obtain
Make your own "abbreviations" environment. For example
\documentclass{article}
\newcommand{\abbrlabel}[1]{\makebox[3cm][l]{\textbf{#1}\ \dotfill}}
\newenvironment{abbreviations}{\begin{list}{}{\renewcommand{\makelabel}{\abbrlabel}}}{\end{list}}
\begin{document}
\begin{abbreviations}
\item[US] United States
\item[EU] European Union
\item[Gvmt] Government
\end{abbreviations}
\end{document}
Adjust the size of the makebox
to suit your entries. If you don't like the dots, then remove the \dotfill
command.
If you want to make this look more like the table of contents, then we have to make another slightly more complicated command to do the dots instead of plain TeX's \dotfill
.
\makeatletter
\newcommand{\tocfill}{\cleaders\hbox{$\m@th \mkern\@dotsep mu . \mkern\@dotsep mu$}\hfill}
\makeatother
\newcommand{\abbrlabel}[1]{\makebox[3cm][l]{\textbf{#1}\ \tocfill}}
This uses the LaTeX parameter \@dotsep
which controls the spacing of the dots in the table of contents. With \abbrlabel
defined with \tocfill
we get this.
To control the vertical spacing, we need to adjust the standard list dimension \itemsep
which is added to the skip between each item. We can set this to what ever we want, as part of the environment definition. With these extra bells and whistles, the example looks like this:
\documentclass{article}
\makeatletter
\newcommand{\tocfill}{\cleaders\hbox{$\m@th \mkern\@dotsep mu . \mkern\@dotsep mu$}\hfill}
\makeatother
\newcommand{\abbrlabel}[1]{\makebox[3cm][l]{\textbf{#1}\ \tocfill}}
\newenvironment{abbreviations}{\begin{list}{}{\renewcommand{\makelabel}{\abbrlabel}%
\setlength{\itemsep}{0pt}}}{\end{list}}
\begin{document}
\begin{abbreviations}
\item[US] United States
\item[EU] European Union
\item[Gvmt] Government
\end{abbreviations}
\end{document}
and produces this slightly tighter list.
The only remaining problems are to make sure the new environment fits into its surroundings neatly and to cope with unusually long explanations of abbreviations. This requires some extra fiddling with the margins of the list environment, like this.
\documentclass{article}
\usepackage{calc}
\usepackage{lipsum}
\makeatletter
\newcommand{\tocfill}{\cleaders\hbox{$\m@th \mkern\@dotsep mu . \mkern\@dotsep mu$}\hfill}
\makeatother
\newcommand{\abbrlabel}[1]{\makebox[3cm][l]{\textbf{#1}\ \tocfill}}
\newenvironment{abbreviations}{\begin{list}{}{\renewcommand{\makelabel}{\abbrlabel}%
\setlength{\labelwidth}{3cm}\setlength{\leftmargin}{\labelwidth+\labelsep}%
\setlength{\itemsep}{0pt}}}{\end{list}}
\begin{document}
\noindent\lipsum[1]
\begin{abbreviations}
\item[US] United States
\item[EU] European Union
\item[Gvmt] Government. \lipsum[2]
\end{abbreviations}
\lipsum[3]
\end{document}
Here we've added the lipsum
package for the filler text, and calc
to allow us to use the +
sign in setting the \leftmargin
length.
For customizations like this, the Latex Companion is an indispensable reference.
Best Answer
The
glossaries
package allows glossaries as well as lists of acronyms. Here's a full example (note: compile it withpdflatex <myfile>
makeglossaries <myfile>
pdflatex <myfile>
):