Here is the basic example.
\documentclass[a4paper,12pt]{report} %We are creating a report
\usepackage[automake]{glossaries} %Load glossaries package
\makeglossaries
%Here we define a set of example acronyms
\newglossaryentry{Aaa}{name={AAA},description={First abbreviation}}
\newglossaryentry{Bbb}{name={BBB},description={Second abbreviation}}
\newglossaryentry{Ccc}{name={CCC},description={Third abbreviation}}
\begin{document}
\printglossary[title={List of Abbreviations}] %Generate List of Abbreviations
\chapter{Sample Chapter}
Here we are using the first abbreviation \gls{Aaa}. This is our second abbreviation \gls{Bbb}. The last one is \gls{Ccc}
\end{document}
The above code snippt provides following output.
List of Abbreviations |
Sample Chapter |
You can pass different parameters to glossaries package load command to achieve various customizations. A list of few as follows. You can find more details from the user manual.
- Remove the dot at the end of each abbreviation - nopostdot
- Remove page number at the end of each abbreviation - nonumberlist
- Prevent abbreviation grouping - nogroupskip
- Add "List of Abbreviations" to Table of Content - toc
Here is the complete example.
\documentclass[a4paper,12pt]{report} %We are creating a report
\usepackage[nopostdot,nogroupskip,style=super,nonumberlist,toc,automake,toc]{glossaries} %Load glossaries package
\makeglossaries
%Here we define a set of example acronyms
\newglossaryentry{Aaa}{name={AAA},description={First abbreviation}}
\newglossaryentry{Bbb}{name={BBB},description={Second abbreviation}}
\newglossaryentry{Ccc}{name={CCC},description={Third abbreviation}}
\begin{document}
\tableofcontents
\onehalfspacing
\printglossary[title={List of Abbreviations}] %Generate List of Abbreviations
\chapter{Sample Chapter}
Here we are using the first abbreviation \gls{Aaa}. This is our second abbreviation \gls{Bbb}. The last one is \gls{Ccc}
\end{document}
Here is the final output.
Table of Contents |
List of Abbreviations |
Sample Chapter |
Happy writing!