Debian Codegraph @

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

raw
1 % This file is embedded in glossaries-extra-manual.pdf
2 % Example 155 Using bib2gls: one resource set
3 % Label: "ex:bib2gls"
4 % arara: pdflatex
5 % arara: bib2gls
6 % arara: pdflatex
7 % arara: pdfcrop
8 \documentclass[12pt]{article}
9 \pagestyle{empty}
10 \begin{filecontents*}{terms.bib}
11 @entry{bird,
12 name={bird},
13 description={feathered animal},
14 seealso={duck,goose}
15 }
16
17 @entry{duck,
18 name={duck},
19 description={a waterbird with short legs}
20 }
21
22 @entry{goose,
23 name = "goose",
24 plural = "geese",
25 description={a waterbird with a long neck}
26 }
27
28 @index{example}
29 \end{filecontents*}
30 \begin{filecontents*}{abbrvs.bib}
31 @string{ssi={server-side includes}}
32 @string{html={hypertext markup language}}
33
34 @abbreviation{shtml,
35 short="shtml",
36 fulllong = ssi # " enabled " # html,
37 nestedlong = "\glsps{ssi} enabled \glsps{html}",
38 description={a combination of \gls{html} and \gls{ssi}}
39 }
40
41 @abbreviation{html,
42 short ="html",
43 long = html,
44 description={a markup language for creating web pages}
45 }
46
47 @abbreviation{ssi,
48 short="ssi",
49 long = ssi,
50 description={a simple interpreted server-side scripting language}
51 }
52
53 @abbreviation{xml,
54 short={xml},
55 long={extensible markup language},
56 description={a simple text-base format for representing structured information}
57 }
58
59 @abbreviation{mathml,
60 short={m\BibGlsNoCaseChange{ath}ml},
61 long={mathematical markup language},
62 description={an \gls{xml}-based language for describing mathematical notation}
63 }
64 \end{filecontents*}
65 \begin{filecontents*}{symbols.bib}
66 @preamble{"\providecommand{\mtx}[1]{\boldsymbol{#1}}"}
67
68 @symbol{M,
69 name={\ensuremath{\mtx{M}}},
70 description={a matrix}
71 }
72
73 @symbol{v,
74 name={\ensuremath{\vec{v}}},
75 description={a vector}
76 }
77
78 @symbol{S,
79 name={\ensuremath{\mathcal{S}}},
80 description={a set}
81 }
82 \end{filecontents*}
83 \usepackage[T1]{fontenc}
84 \usepackage[record]{glossaries-extra}
85
86 \setabbreviationstyle{long-short-sc-desc}
87
88 \GlsXtrLoadResources[src={terms,abbrvs,symbols},
89 field-aliases={fulllong=long},
90 description-case-change=firstuc,
91 post-description-dot=all
92 ]
93
94
95 \begin{document}
96 \gls{bird}
97
98 \gls{shtml}
99
100 \gls{M}
101
102 \GlsXtrSetDefaultNumberFormat{glsignore}
103 \printunsrtglossaries
104 \end{document}