Debian Codegraph @

texmf-dist/doc/latex/glossaries/samples/sampleAcrDesc.tex

raw
1 % This file is public domain
2 % If you want to use arara, you need the following directives:
3 % arara: pdflatex: { synctex: on }
4 % arara: makeglossaries
5 % arara: pdflatex: { synctex: on }
6 % arara: pdflatex: { synctex: on }
7 %
8 %http://mirrors.ctan.org/macros/latex/contrib/glossaries/glossaries-user.html#sampleAcrDesc
9 \documentclass[a4paper]{report}
10
11 \usepackage[T1]{fontenc}% need support for bold smallcaps
12 \usepackage[colorlinks,plainpages=false]{hyperref}
13 \usepackage[acronym,% create 'acronym' glossary type
14 % The package option "nomain" is used here to suppress the
15 % main glossary, since this example doesn't use it. If you
16 % want to use the main glossary, remove the "nomain" option.
17 nomain,%
18 style=altlist, % use altlist style
19 toc, % add the glossary to the table of contents
20 ]{glossaries}
21
22 \makeglossaries
23
24 % Change the acronym style to long-sc-short-desc:
25 \setacronymstyle{long-sc-short-desc}
26
27 % Change the "see" items so that they use \acronymfont:
28 \renewcommand*{\glsseeitemformat}[1]{\acronymfont{\glsentrytext{#1}}}
29
30 \newacronym[description={Statistical pattern recognition
31 technique~\protect\cite{svm}} % acronym's description
32 ]{svm}{svm}{support vector machine}
33
34 \newacronym
35 [description={Statistical pattern recognition technique
36 using the ``kernel trick''},% acronym's description
37 see={[see also]{svm}}
38 ]
39 {ksvm}{ksvm}{kernel support vector machine}
40
41 \begin{document}
42 \tableofcontents
43
44 \chapter{Support Vector Machines}
45
46 The \gls{svm} is used widely in the area of pattern recognition.
47 % plural form with initial letter in uppercase:
48 \Glspl{svm} are \ldots\ (but beware, converting the initial letter to
49 upper case for a small caps acronym is sometimes considered
50 poor style).
51
52 Short version: \acrshort{svm}. Long version: \acrlong{svm}. Full
53 version: \acrfull{svm}. Description: \glsentrydesc{svm}.
54
55 This is the entry in uppercase: \GLS{svm}.
56
57 \chapter{Kernel Support Vector Machines}
58
59 % Instead of using the clumsy \ifglsused, you might find it simpler
60 % to use glossaries-prefix.sty
61
62 The \gls{ksvm} is \ifglsused{svm}{an}{a} \gls{svm} that uses
63 the so called ``kernel trick''. This is the entry's description without
64 a link: \glsentrydesc{ksvm}.
65
66 \glsresetall
67 Possessive: \gls{ksvm}['s].
68 Make the glossary entry number bold for this
69 one \gls[format=hyperbf]{svm}.
70
71 \begin{thebibliography}{1}
72 \bibitem{svm} \ldots
73 \end{thebibliography}
74
75 \printglossary
76
77 \end{document}