8

I used the acronym package (usepackage{acronym}) to create acronyms in my thesis. In the beginning of the document, I define the acronym as, for example, \acrodef{USA}{United States of America}. And then later to use this abbreviation I call it as \ac{USA}. How do we generate a list of Abbreviations (acronyms) as a list of figures and list of tables in LaTeX?

2 Answers 2

10

From the acronym package documentation:

Acronyms can either defined from an environment specifically introduced for that purpose or by direct definitions.The acronym environment allows one to define all the acronyms needed by a document at a single place and is self-documenting, since a table of acronyms is automatically produced.

And

If one does not want an acronym list to be produced at all, acronyms can bedefined directly thanks to the two commands

\newacro{〈acronym〉}[〈short name〉]{〈full> name〉}

\acrodef{〈acronym〉}[〈short name〉]{〈full name〉}

Therefore, use the acronym environment and the \acro command instead of \acrodef if you want to have a list of acronyms.

\documentclass{article}
\usepackage[colorlinks]{hyperref}
\usepackage[printonlyused,withpage]{acronym}
\begin{document}

Some text \ac{USA}

\section{List of Acronyms}
\begin{acronym}
 \acro{USA}{United States of America}
\end{acronym}
\end{document}

Compiling twice, you will get the following result:

enter image description here


For automated sorting and a lot more (formating) options, I'd recommend the glossaries or the glossaries-extra package.

4
  • Thank you for your answer but why did you use \begin{acronym} \acro{USA}{United States of America} \end{acronym}? Can't we use acrodef as I included in my question? yes, I have also read glossaries is powerful but how can we use it together with acronym? Because I have a huge document and all my abbreviations have been defined using acrodef and used with \ac{} command.
    – Brown
    Commented May 22, 2019 at 20:33
  • @Brown: As the quoted parts of the acronym manual show, the \acrodef command can be used if you don't want to have a list of abbreviations. In order to create the MWE in my answer, I just followed the example file on page 7 of the documentation where the arconym environment and the \acro command are used.
    – leandriis
    Commented May 22, 2019 at 20:43
  • Ok thank you again. But is it common to use page numbers with acronyms?
    – Brown
    Commented May 22, 2019 at 20:46
  • @Brown: I don't know, but you can remove the page numbers form the list of acronyms if you remove the withpage option from the acronym package.
    – leandriis
    Commented May 22, 2019 at 20:48
13

I suggest the powerful acro package.

\documentclass{article}
\usepackage{acro}

\DeclareAcronym{usa}{
  short=USA,
  long=United States of America,
}
\DeclareAcronym{eu}{
  short=EU,
  long=European Union,
}
\DeclareAcronym{ussr}{
  short=USSR,
  long=Union of Soviet Socialist Republics,
}

\begin{document}

\ac{usa}, \ac{usa}

\ac{eu}, \ac{eu}

\ac{ussr}, \ac{ussr}

\printacronyms

\end{document}

enter image description here

4
  • Thank you but I am getting an error LaTeX3 Error: Command '\acresetall' already defined!
    – Brown
    Commented May 23, 2019 at 12:48
  • 2
    @Brown You shouldn't load also acronym.
    – egreg
    Commented May 23, 2019 at 12:54
  • 1
    Super late comment, but if the acronym is 6-letters, is there a way to format
    – Akriti
    Commented Jun 1, 2021 at 6:39
  • @Akriti I’m not sure what you mean.
    – egreg
    Commented Jun 1, 2021 at 7:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .