How to Make a Glossary and Acronyms in LaTeX
Use the glossaries package. Load \usepackage[acronym]{glossaries}, run \makeglossaries, define acronyms with \newacronym and terms with \newglossaryentry, reference them with \gls, and print lists with \printglossary. The package needs an extra makeglossaries pass, which LetX runs automatically.
Example
\usepackage[acronym]{glossaries}
\makeglossaries
\newacronym{gpu}{GPU}{graphics processing unit}
\begin{document}
First use: \gls{gpu}. Later: \gls{gpu}.
\printglossary[type=\acronymtype]
\end{document}Frequently asked questions
Why is my glossary empty?
The glossaries package needs an extra makeglossaries run between compiles. Use latexmk or an editor that runs it automatically (LetX does); otherwise the .glo and .gls files never build.
How do acronyms expand on first use?
\newacronym together with \gls prints the full form with the abbreviation on first use ("graphics processing unit (GPU)") and just the short form thereafter, automatically.
Try the fix in LetX
Open the editor, paste your code, and compile in 1 second to see the error clear — free, in your browser.
Open LetX Free