| 1 |
% This file is embedded in glossaries-user.pdf |
| 2 |
% Example 1 Simple document with no glossary |
| 3 |
% Label: "ex:simplenogloss" |
| 4 |
% arara: pdflatex |
| 5 |
% arara: pdfcrop |
| 6 |
\documentclass[12pt]{article} |
| 7 |
\pagestyle{empty} |
| 8 |
\usepackage[ |
| 9 |
sort=none % no sorting or indexing required |
| 10 |
] {glossaries} |
| 11 |
|
| 12 |
\newglossaryentry |
| 13 |
{cafe}% label |
| 14 |
{% definition: |
| 15 |
name={café}, |
| 16 |
description={small restaurant selling refreshments} |
| 17 |
} |
| 18 |
|
| 19 |
\setacronymstyle{long-short} \newacronym |
| 20 |
{html}% label |
| 21 |
{HTML}% short form |
| 22 |
{hypertext markup language}% long form |
| 23 |
|
| 24 |
|
| 25 |
\newglossaryentry |
| 26 |
{pi}% label |
| 27 |
{% definition: |
| 28 |
name={\ensuremath{\pi}}, |
| 29 |
description={Archimedes' Constant} |
| 30 |
} |
| 31 |
|
| 32 |
% This is a trivial example. For a real document I recommend you use siunitx for units |
| 33 |
\newglossaryentry |
| 34 |
{distance}% label |
| 35 |
{% definition: |
| 36 |
name={distance}, |
| 37 |
description={the length between two points}, |
| 38 |
symbol={m} |
| 39 |
} |
| 40 |
\begin{document} |
| 41 |
First use: \gls{cafe}, \gls{html}, \gls{pi}. Next use: \gls{cafe}, \gls{html}, \gls{pi}. |
| 42 |
|
| 43 |
\Gls{distance} (\glsentrydesc{distance}) is measured in \glssymbol{distance}. |
| 44 |
\end{document} |