Debian Codegraph @

texmf-dist/doc/latex/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example152.tex

raw
1 % This file is embedded in glossaries-extra-manual.pdf
2 % Example 152 Using bib2gls: abbreviations
3 % Label: "ex:bib2glsabbrvs"
4 % arara: pdflatex
5 % arara: bib2gls
6 % arara: pdflatex
7 % arara: pdfcrop
8 \documentclass[12pt]{article}
9 \pagestyle{empty}
10 \begin{filecontents*}{abbrvs.bib}
11 @string{ssi={server-side includes}}
12 @string{html={hypertext markup language}}
13
14 @abbreviation{shtml,
15 short="shtml",
16 fulllong = ssi # " enabled " # html,
17 nestedlong = "\glsps{ssi} enabled \glsps{html}",
18 description={a combination of \gls{html} and \gls{ssi}}
19 }
20
21 @abbreviation{html,
22 short ="html",
23 long = html,
24 description={a markup language for creating web pages}
25 }
26
27 @abbreviation{ssi,
28 short="ssi",
29 long = ssi,
30 description={a simple interpreted server-side scripting language}
31 }
32
33 @abbreviation{xml,
34 short={xml},
35 long={extensible markup language},
36 description={a simple text-base format for representing structured information}
37 }
38
39 @abbreviation{mathml,
40 short={m\BibGlsNoCaseChange{ath}ml},
41 long={mathematical markup language},
42 description={an \gls{xml}-based language for describing mathematical notation}
43 }
44 \end{filecontents*}
45 \usepackage[T1]{fontenc}
46 \usepackage[colorlinks]{hyperref}
47 \usepackage[record=nameref]{glossaries-extra}
48
49 \setabbreviationstyle{long-em-short-em}
50
51 \GlsXtrLoadResources[
52 src={abbrvs},
53 field-aliases={nestedlong=long},
54 ignore-fields={description},
55 short-case-change=uc
56 ]
57
58
59 \begin{document}
60 \tableofcontents
61 \section{\Glsfmtlong{shtml}}
62 First use: \gls{shtml}, \gls{html}, \gls{ssi}, \gls{mathml}.
63
64 Next use: \gls{shtml}, \gls{html}, \gls{ssi}, \gls{mathml}. All caps: \GLS{mathml}.
65
66 \printunsrtglossaries
67 \end{document}