blob: c6a9c5d861248e2d8df12183574aad22fd7e5c58 (
plain)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
% This file is public domain
% If you want to use arara, you need the following directives:
% arara: pdflatex: { synctex: on }
% arara: makeglossaries
% arara: pdflatex: { synctex: on }
\documentclass{report}
\usepackage[colorlinks]{hyperref}
\usepackage[acronym, % create list of acronyms
nomain, % don't need main glossary for this example
style=tree, % need a style that displays the symbol
hyperfirst=false% don't hyperlink first use
]{glossaries}
\makeglossaries
% This is a sample file to illustrate how to define a custom
% acronym. This example defines the acronym so that on first use
% it displays the short form in the text and places the long form
% and its description in a footnote. In the main body of the
% document the short form will be displayed in small caps, but in
% the list of acronyms the short form is displayed in normal
% capitals. To ensure this, the short form should be written in
% lower case when the acronym is defined, and \MakeTextUppercase is
% used when it's displayed in the list of acronyms.
% In the list of acronyms, the long form is used as the name, the
% short form is used as the symbol and the user supplies the
% description when defining the acronym.
\renewcommand*{\CustomAcronymFields}{%
name={\the\glslongtok},%
symbol={\MakeTextUppercase{\the\glsshorttok}},%
text={\textsc{\the\glsshorttok}},%
plural={\textsc{\the\glsshorttok}\noexpand\acrpluralsuffix}%
}
\renewcommand*{\SetCustomDisplayStyle}[1]{%
\defglsentryfmt[#1]{\glsgenentryfmt
\ifglsused{\glslabel}{}{\footnote{\glsentrylong{\glslabel}}}}%
}
% Now set the custom acronym style (to override the default style)
\SetCustomStyle
% Now define the acronyms (must be done after setting the custom
% style)
\newacronym[description={set of tags for use in developing hypertext
documents}]{html}{html}{Hyper Text Markup Language}
\newacronym[description={language used to describe the layout of a
document written in a markup language}]{css}{css}{Cascading Style
Sheet}
\begin{document}
\gls{css}. \gls{html}.
\gls{css}. \gls{html}.
\printglossaries
\end{document}
|