As I was Finishing my MSc thesis today I wanted to create a glossary with LaTex, but it was very difficult to find a tutorial or even basic steps to create one, without having to change something, so I decided to create a small “tutorial” on how to create a glossary with LaTeX.
The first step is to include the package :
1 |
\usepackage[nonumberlist]{glossaries} |
1 |
\usepackage{acronym} |
1 |
\makeglossaries |
1 |
\newacronym{gui}{GUI}{Graphical User Interface} |
1 |
\newacronym{sdk}{SDK}{Software Development Kit} |
1 |
\glsaddall |
1 |
\printglossaries |
The first command list all the entries in the glossary, while the second prints the glossary out. In your text you may now use it such as following :
1 |
This is the \gls{gui} of my application. This \gls{gui} will display all the information[...]. |
and this should appear :
1 |
This is the Graphical User Interface (GUI). This GUI will display all the information[...]. |
Compile your LaTeX document a first time and then open a shell an type the following command:
1 |
makeindex Master_Thesis.glo -s Master_Thesis.ist -t Master_Thesis.glg -o Master_Thesis.gls |
Compile your document with LaTeX a second time, and your glossary should appear right there.
and that’s it !
Below is a basic example of a LaTeX file with glossary :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
\documentclass[12pt,a4paper]{report} \usepackage[nonumberlist]{glossaries} \usepackage{acronym} \begin{document} \title{} \date{} \maketitle %Glossary \makeglossaries \newacronym{pdf}{PDF}{Portable Document Format } %Abstract \begin{abstract} \end{abstract} %Acknowledgments \chapter*{Acknowledgements} \tableofcontents \listoffigures \listoftables \glsaddall \printglossaries \end{document} |
Have Fun with LaTeX.
{ 2 } Comments
Fatal error: Uncaught Error: Call to undefined function ereg() in /home/users4/n/noktec/www/noktec/wp-content/themes/barthelme/functions.php:178 Stack trace: #0 /home/users4/n/noktec/www/noktec/wp-content/themes/barthelme/comments.php(34): barthelme_commenter_link() #1 /home/users4/n/noktec/www/noktec/wp-includes/comment-template.php(1554): require('/home/users4/n/...') #2 /home/users4/n/noktec/www/noktec/wp-content/themes/barthelme/single.php(44): comments_template() #3 /home/users4/n/noktec/www/noktec/wp-includes/template-loader.php(106): include('/home/users4/n/...') #4 /home/users4/n/noktec/www/noktec/wp-blog-header.php(19): require_once('/home/users4/n/...') #5 /home/users4/n/noktec/www/noktec/index.php(17): require('/home/users4/n/...') #6 {main} thrown in /home/users4/n/noktec/www/noktec/wp-content/themes/barthelme/functions.php on line 178