The acronym package

Manages acronyms without an external program: \acro defines them in the acronym environment, and \ac prints the long form at the first use and the short form afterwards.

Loading the package

\usepackage[printonlyused]{acronym}

The list of acronyms is an environment that you write yourself, usually at the start or the end of the document. Each \acro line in it defines one acronym and is also its entry in the list.

No tool such as makeglossaries is involved; two LaTeX runs are enough. In return the list is not sorted: the entries appear in the order in which you wrote them. For sorted lists and a glossary with descriptions, see glossaries.

Main commands

\begin{acronym}[HTML] ... \end{acronym}The list. The optional argument is the longest short form; it sets the width of the first column.
\acro{pdf}[PDF]{Portable Document Format}Defines an acronym: label, short form (optional when it equals the label), long form.
\ac{pdf}First use: long form with the short form in parentheses. After that: the short form.
\acs{pdf}, \acl{pdf}, \acf{pdf}Force the short, the long or the full form.
\acp{pdf}Plural form with an appended s.
\acresetallTreats all acronyms as unused again, for example at the start of a chapter.
printonlyusedOption: the list shows only acronyms that occur in the text. withpage adds the page of the first use.

Complete example

\documentclass{article}
\usepackage[printonlyused]{acronym}
\begin{document}
\section{Text}
A \ac{PDF} file can be shown in a browser next to \ac{HTML} pages.
The second use is short: \ac{PDF}.

\section*{Acronyms}
\begin{acronym}[HTML]
\acro{HTML}{Hypertext Markup Language}
\acro{PDF}{Portable Document Format}
\acro{SVG}{Scalable Vector Graphics}
\end{acronym}
\end{document}
Result
The compiled example

Open in the editor

Compiled with pdfLaTeX from TeX Live 2023. Tools run in this order: pdflatex → pdflatex.

Pitfalls

Related pages