Debian Codegraph @

texmf-dist/doc/latex/glossaries-extra/samples/sample-abbr-styles.tex

raw
1 % arara: pdflatex
2 % arara: makeglossaries
3 % arara: pdflatex
4 % arara: pdflatex
5
6 \documentclass{report}
7
8 \usepackage[left=1cm,right=0.5cm,marginpar=2.5cm,includemp]{geometry}
9 \usepackage[T1]{fontenc}
10 \usepackage{relsize}
11 \usepackage{fontawesome}
12 \usepackage{etoolbox}
13 \usepackage{xcolor}
14 \usepackage{soul}
15 \usepackage[colorlinks,linkcolor=magenta]{hyperref}
16 \usepackage{glossaries-extra}
17
18 \newcommand*{\warningsym}{\textcolor{red}{\faExclamationTriangle}}
19
20 % If you get any undefined control sequences or undefined
21 % style errors, make sure you have the latest versions of
22 % glossaries-extra.sty and glossaries.sty
23
24 \makeglossaries
25
26 % This command is used for short forms for styles
27 % that don't have a designated command:
28 \renewcommand{\glsabbrvdefaultfont}[1]{\textsf{#1}}
29
30 % This command is used on first use for short forms
31 % for styles that don't have a designated command:
32 %\renewcommand{\glsfirstabbrvdefaultfont}[1]{\textsf{#1}}
33
34 % This command is used for long forms for styles
35 % that don't have a designated command:
36 \renewcommand{\glslongdefaultfont}[1]{\textsf{#1}}
37
38 % This command is used on first use for long forms
39 % for styles that don't have a designated command:
40 %\renewcommand{\glsfirstlongdefaultfont}[1]{\textsf{#1}}
41
42 % Test command for "outer" formatting (applied with textformat key)
43 \newcommand*{\sampleformat}[1]{\textbf{\color{teal}#1}}
44
45 % These commands are used by the '-hyphen' styles.
46 % For example, to switch to small-caps for the short form:
47 %\renewcommand{\glsabbrvhyphenfont}{\glsabbrvscfont}
48 %\renewcommand{\glsxtrhyphensuffix}{\glsxtrscsuffix}
49 % and emphasize the long form
50 %\renewcommand{\glslonghyphenfont}{\emph}
51
52 \renewcommand{\glsxtrabbrvfootnote}[2]{%
53 \footnote{\glshyperlink[\glsfmtshort{#1}]{#1}: #2}%
54 }
55
56 \glssetcategoryattributes{long-hyphen-short-hyphen}{markwords,markshortwords}{true}
57 \glssetcategoryattributes{long-hyphen-postshort-hyphen}{markwords,markshortwords}{true}
58 \glssetcategoryattributes{long-hyphen-short-hyphen-desc}{markwords,markshortwords}{true}
59 \glssetcategoryattributes{long-hyphen-postshort-hyphen-desc}{markwords,markshortwords}{true}
60 \glssetcategoryattributes{short-hyphen-long-hyphen}{markwords,markshortwords}{true}
61 \glssetcategoryattributes{short-hyphen-postlong-hyphen}{markwords,markshortwords}{true}
62 \glssetcategoryattributes{short-hyphen-long-hyphen-desc}{markwords,markshortwords}{true}
63 \glssetcategoryattributes{short-hyphen-postlong-hyphen-desc}{markwords,markshortwords}{true}
64 \glssetcategoryattributes{long-hyphen-noshort-desc-noreg}{markwords,markshortwords}{true}
65 \glssetcategoryattributes{long-hyphen-noshort-noreg}{markwords,markshortwords}{true}
66
67 \newcommand{\stylelist}{}
68
69 \newcommand{\teststyle}[1]{%
70 \listadd{\stylelist}{#1}%
71 \setabbreviationstyle[#1]{#1}%
72 \newabbreviation[category=#1,%
73 %sort={#1},% order by style name
74 user1={user text}%
75 ]{sample-#1}{short fm}{long form}%
76 \csdef{glsxtrpostdesc#1}{ [style: #1]}%
77 }
78
79 \newcommand{\testdescstyle}[1]{%
80 \listadd{\stylelist}{#1}%
81 \setabbreviationstyle[#1]{#1}%
82 \newabbreviation[category=#1,%
83 %sort={#1},% order by style name
84 user1={user text},%
85 description={sample description}]{sample-#1}{short fm}{long form}%
86 \csdef{glsxtrpostdesc#1}{ [style: #1]}%
87 }
88
89 \teststyle{long-short}
90 \teststyle{short-long}
91 %\teststyle{footnote}% synonym: short-footnote
92 \teststyle{short-footnote}
93 %\teststyle{postfootnote}% synonym: short-postfootnote
94 \teststyle{short-postfootnote}
95 %\teststyle{short}% synonym: short-nolong
96 \teststyle{short-nolong}
97 \teststyle{short-nolong-noreg}
98 \teststyle{nolong-short}
99 \teststyle{nolong-short-noreg}
100 %\teststyle{long}% synonym: long-noshort
101 \teststyle{long-noshort}
102 \teststyle{long-noshort-noreg}
103 \teststyle{long-only-short-only}
104 \teststyle{long-short-sc}
105 \teststyle{short-sc-long}
106 %\teststyle{short-sc}% synonym: short-sc-nolong
107 \teststyle{short-sc-nolong}
108 \teststyle{nolong-short-sc}
109 \teststyle{long-noshort-sc}
110 %\teststyle{long-sc}% deprecated synonym of long-noshort-sc
111 \teststyle{short-sc-footnote}
112 %\teststyle{footnote-sc}% deprecated synonym of short-sc-footnote
113 \teststyle{short-sc-postfootnote}
114 %\teststyle{postfootnote-sc}% deprecated synonym of short-sc-postfootnote
115 \teststyle{long-short-sm}
116 \teststyle{short-sm-long}
117 %\teststyle{short-sm}% synonym: short-sm-nolong
118 \teststyle{short-sm-nolong}
119 \teststyle{nolong-short-sm}
120 %\teststyle{long-sm}% deprecated synonym of long-noshort-sm
121 \teststyle{long-noshort-sm}
122 \teststyle{short-sm-footnote}
123 %\teststyle{footnote-sm}% deprecated synonym of short-sm-footnote
124 \teststyle{short-sm-postfootnote}
125 %\teststyle{postfootnote-sm}% deprecated synonym of short-sm-postfootnote
126 \teststyle{long-short-em}
127 \teststyle{long-em-short-em}
128 \teststyle{short-em-long}
129 \teststyle{short-em-long-em}
130 \teststyle{short-em-nolong}
131 %\teststyle{short-em}% synonym: short-em-nolong
132 \teststyle{nolong-short-em}
133 \teststyle{long-noshort-em}
134 %\teststyle{long-em}% deprecated synonym of long-noshort-em
135 \teststyle{long-em-noshort-em}
136 \teststyle{long-em-noshort-em-noreg}
137 \teststyle{short-em-footnote}
138 %\teststyle{footnote-em}% deprecated synonym of short-em-footnote
139 \teststyle{short-em-postfootnote}
140 %\teststyle{postfootnote-em}% deprecated synonym of short-em-postfootnote
141 \teststyle{long-short-user}
142 \teststyle{long-postshort-user}
143 \teststyle{short-long-user}
144 \teststyle{short-postlong-user}
145 \teststyle{long-hyphen-short-hyphen}
146 \teststyle{long-hyphen-postshort-hyphen}
147 \teststyle{short-hyphen-long-hyphen}
148 \teststyle{short-hyphen-postlong-hyphen}
149 \teststyle{long-hyphen-noshort-noreg}
150
151 \testdescstyle{long-short-desc}
152 \testdescstyle{short-long-desc}
153 %\teststyle{footnote-desc}% synonym: short-footnote-desc
154 \testdescstyle{short-footnote-desc}
155 %\teststyle{postfootnote-desc}% synonym: short-postfootnote-desc
156 \testdescstyle{short-postfootnote-desc}
157 %\testdescstyle{short-desc}% synonym: short-nolong-desc
158 \testdescstyle{short-nolong-desc}
159 \testdescstyle{short-nolong-desc-noreg}
160 %\testdescstyle{long-desc}% synonym: long-noshort-desc
161 \testdescstyle{long-noshort-desc}
162 \testdescstyle{long-noshort-desc-noreg}
163 \testdescstyle{long-only-short-only-desc}
164 \testdescstyle{long-short-sc-desc}
165 \testdescstyle{short-sc-long-desc}
166 %\testdescstyle{short-sc-desc}% synonym: short-sc-nolong-desc
167 \testdescstyle{short-sc-nolong-desc}
168 \testdescstyle{long-noshort-sc-desc}
169 %\testdescstyle{long-desc-sc}% deprecated synonym of long-noshort-sc-desc
170 \testdescstyle{short-sc-footnote-desc}
171 \testdescstyle{short-sc-postfootnote-desc}
172 \testdescstyle{long-short-sm-desc}
173 \testdescstyle{short-sm-long-desc}
174 %\testdescstyle{short-sm-desc}% synonym: short-sm-nolong-desc
175 \testdescstyle{short-sm-nolong-desc}
176 \testdescstyle{long-noshort-sm-desc}
177 %\testdescstyle{long-desc-sm}% deprecated synonym of long-noshort-sm-desc
178 \testdescstyle{short-sm-footnote-desc}
179 \testdescstyle{short-sm-postfootnote-desc}
180 \testdescstyle{long-short-em-desc}
181 \testdescstyle{long-em-short-em-desc}
182 \testdescstyle{short-em-long-desc}
183 \testdescstyle{short-em-long-em-desc}
184 %\testdescstyle{short-em-desc}% synonym: short-em-nolong-desc
185 \testdescstyle{short-em-nolong-desc}
186 \testdescstyle{long-noshort-em-desc}
187 %\testdescstyle{long-desc-em}% deprecated synonym of long-noshort-em-desc
188 \testdescstyle{short-em-footnote-desc}
189 \testdescstyle{short-em-postfootnote-desc}
190 \testdescstyle{long-em-noshort-em-desc}
191 \testdescstyle{long-em-noshort-em-desc-noreg}
192 \testdescstyle{long-short-user-desc}
193 \testdescstyle{long-postshort-user-desc}
194 \testdescstyle{short-long-user-desc}
195 \testdescstyle{short-postlong-user-desc}
196 \testdescstyle{long-hyphen-short-hyphen-desc}
197 \testdescstyle{long-hyphen-postshort-hyphen-desc}
198 \testdescstyle{short-hyphen-long-hyphen-desc}
199 \testdescstyle{short-hyphen-postlong-hyphen-desc}
200 \testdescstyle{long-hyphen-noshort-desc-noreg}
201
202 \newcommand{\marg}[1]{\{\textnormal{\emph{#1}}\}}
203 \pagestyle{headings}
204
205 \makeatletter
206 \renewcommand{\l@section}{\@dottedtocline {1}{1.5em}{3.3em}}
207 \makeatother
208
209 \begin{document}
210 \pagenumbering{roman}
211 This is a test document demonstrating abbreviation styles
212 provided by the \textsf{glossaries-extra} package. Hyperlinks
213 are shown in
214 \makeatletter
215 \textcolor{\@linkcolor}{\@linkcolor}.
216 \makeatother
217
218 Some of the styles just use the default formatting commands (which don't
219 change the font). To make the default setting clearer, this document has done:
220 \begin{verbatim}
221 \renewcommand{\glslongdefaultfont}[1]{\textsf{#1}}
222 \renewcommand{\glsabbrvdefaultfont}[1]{\textsf{#1}}
223 \end{verbatim}
224 So any text in this document that's rendered in sans-serif would normally not have any font
225 change implemented.
226
227 There are additional font changing tests implemented with outer text formatting
228 (the textformat key) and inner text formatting (the innertextformat key).
229
230 The hyperlink may be placed outside the outer formatting (hyperoutside=true) or
231 inside of the outer formatting (hyperoutside=false). Note that when the
232 hyperlink is outside, the text colour change applied by the sample formatting
233 command (teal) overrides the colour change applied by the hyperlink colour
234 setting (magenta). The outer text format can also be changed globally
235 by redefining \verb|\glstextformat| or via the \verb|textformat| attribute.
236 (Order of precedence: textformat option, textformat attribute,
237 \verb|\glstextformat|.)
238
239 The inner formatting is implemented within the abbreviation style, so it won't
240 show up in custom styles that don't implement it. The outer formatting isn't
241 applied to the post-link hook. The inner formatting may be applied to the
242 post-link hook, depending whether or not it's supported by the abbreviation
243 style.
244
245 The outer text format is tested with the custom command defined as:
246 \begin{verbatim}
247 \newcommand*{\sampleformat}[1]{\textbf{\color{teal}#1}}
248 \end{verbatim}
249 The inner text format is tested with \verb|\hl| provided by soul.sty.
250 (Complex commands such as those provided by soul can only be used
251 in the inner text format. The outer format has the text content too
252 deeply embedded for those commands to process.)
253
254 Each test entry is defined using
255 \begin{verbatim}
256 \newabbreviation[category=#1,user1={user text}]%
257 {sample-#1}{short}{long form}%
258 \end{verbatim}
259 for the non\texttt{-desc} styles or
260 \begin{verbatim}
261 \newabbreviation[category=#1,user1={user text},%
262 description={sample description}]%
263 {sample-#1}{short}{long form}%
264 \end{verbatim}
265 for the \texttt{-desc} styles (where \verb|#1| is the style label).
266 Note that many of the entries will have duplicate sort values, so
267 don't build this with \texttt{xindy}. You can change the ordering
268 in the glossary to that it's sorted according to the style name
269 by changing the above definitions to:
270 \begin{verbatim}
271 \newabbreviation[category=#1,user1={user text},sort={#1}]%
272 {sample-#1}{short}{long form}%
273 \newabbreviation[category=#1,user1={user text},sort={#1},%
274 description={sample description}]%
275 {sample-#1}{short}{long form}%
276 \end{verbatim}
277
278 To assist with distinguishing between the various styles,
279 the post-description hook (used after displaying the description in
280 the glossary) is set to \verb*| [style: #1]| for all categories,
281 and the footnote command \verb|\glsxtrabbrvfootnote| has been
282 redefined to include the short form hyperlinked to the glossary.
283
284 The test entries that use the \texttt{-hyphen} styles have had the
285 \texttt{markwords} attribute set. This is designed to trigger
286 compound word hyphenation if the inserted text (through the final
287 optional argument of \verb|\gls|) starts with a hyphen.
288
289 \raisebox{2ex}{\hypertarget{warningnote}{}}%
290 \renewcommand*{\GlossariesAbbrStyleTooComplexWarning}[2]{%
291 \warningsym\marginpar{\hyperlink{warningnote}{\warningsym} too complex}}%
292 The symbol \warningsym\ indicates that a warning would normally be
293 issued at that point in the document for a style that's too complex
294 to support the given command.
295
296 \tableofcontents
297
298 \pagenumbering{arabic}
299 \chapter{First Use}
300 First use of \verb|\gls|.
301
302 \forglsentries{\thislabel}{\glscategory{\thislabel}:
303 \gls{\thislabel}.\glspar}
304
305 \section{textformat=sampleformat, hyperoutside=true}
306
307 \glsresetall
308 \forglsentries{\thislabel}{\glscategory{\thislabel}:
309 \gls[textformat=sampleformat,hyperoutside=true]{\thislabel}.\glspar}
310
311 \section{textformat=sampleformat, hyperoutside=false}
312
313 \glsresetall
314 \forglsentries{\thislabel}{\glscategory{\thislabel}:
315 \gls[textformat=sampleformat,hyperoutside=false]{\thislabel}.\glspar}
316
317 \section{innertextformat=hl}
318
319 \glsresetall
320 \forglsentries{\thislabel}{\glscategory{\thislabel}:
321 \gls[innertextformat=hl]{\thislabel}.\glspar}
322
323 \chapter{Next Use}
324 Next use of \verb|\gls|.
325
326 \forglsentries{\thislabel}{\glscategory{\thislabel}:
327 \gls{\thislabel}.\glspar}
328
329 \section{textformat=sampleformat, hyperoutside=true}
330
331 \forglsentries{\thislabel}{\glscategory{\thislabel}:
332 \gls[textformat=sampleformat,hyperoutside=true]{\thislabel}.\glspar}
333
334 \section{textformat=sampleformat, hyperoutside=false}
335
336 \forglsentries{\thislabel}{\glscategory{\thislabel}:
337 \gls[textformat=sampleformat,hyperoutside=false]{\thislabel}.\glspar}
338
339 \section{innertextformat=hl}
340
341 \forglsentries{\thislabel}{\glscategory{\thislabel}:
342 \gls[innertextformat=hl]{\thislabel}.\glspar}
343
344 \chapter{First Use With Insert}
345 First use of \texttt{\string\gls\marg{label}[-insert]}. The conditional
346 \verb|\ifglsxtrinsertinside| is used by some styles to
347 determine whether or not to include the inserted material
348 inside the font changing command used by the style.
349 The default is: \ifglsxtrinsertinside true\else false\fi.
350
351 In this test chapter, each entry is reset, then displayed with
352 \begin{verbatim}
353 \glsxtrinsertinsidefalse
354 \end{verbatim}
355 then reset and displayed with
356 \begin{verbatim}
357 \glsxtrinsertinsidetrue
358 \end{verbatim}
359 (following the semi-colon). Some styles may only obey this
360 conditional for particular commands. (For example, the inline
361 commands like \verb|\glsxtrfull| may behave differently to
362 commands like \verb|\gls|.)
363
364 Some of the styles just use the default font commands (which don't
365 change the font) so there's no noticeable difference. To make the
366 differences more noticeable this document has done:
367 \begin{verbatim}
368 \renewcommand{\glslongdefaultfont}[1]{\textsf{#1}}
369 \renewcommand{\glsabbrvdefaultfont}[1]{\textsf{#1}}
370 \end{verbatim}
371
372 \forglsentries{\thislabel}{\glscategory{\thislabel}:
373 \glsreset{\thislabel}\glsxtrinsertinsidefalse
374 \gls{\thislabel}[-insert];
375 \glsreset{\thislabel}\glsxtrinsertinsidetrue
376 \gls{\thislabel}[-insert].\glspar}
377
378 \section{textformat=sampleformat, hyperoutside=true}
379
380 \forglsentries{\thislabel}{\glscategory{\thislabel}:
381 \glsreset{\thislabel}\glsxtrinsertinsidefalse
382 \gls[textformat=sampleformat,hyperoutside=true]{\thislabel}[-insert];
383 \glsreset{\thislabel}\glsxtrinsertinsidetrue
384 \gls[textformat=sampleformat,hyperoutside=true]{\thislabel}[-insert].\glspar}
385
386 \section{textformat=sampleformat, hyperoutside=false}
387
388 \forglsentries{\thislabel}{\glscategory{\thislabel}:
389 \glsreset{\thislabel}\glsxtrinsertinsidefalse
390 \gls[textformat=sampleformat,hyperoutside=false]{\thislabel}[-insert];
391 \glsreset{\thislabel}\glsxtrinsertinsidetrue
392 \gls[textformat=sampleformat,hyperoutside=false]{\thislabel}[-insert].\glspar}
393
394
395 \section{innertextformat=hl}
396
397 \forglsentries{\thislabel}{\glscategory{\thislabel}:
398 \glsreset{\thislabel}\glsxtrinsertinsidefalse
399 \gls[innertextformat=hl]{\thislabel}[-insert];
400 \glsreset{\thislabel}\glsxtrinsertinsidetrue
401 \gls[innertextformat=hl]{\thislabel}[-insert].\glspar}
402
403
404 \chapter{Next Use With Insert}
405 Next use of \texttt{\string\gls\marg{label}[-insert]}.
406
407 In this test chapter, each entry is displayed
408 with \verb|\glsxtrinsertinsidefalse| and then displayed with
409 \verb|\glsxtrinsertinsidetrue|
410 (following the semi-colon). Some styles don't check this
411 conditional.
412
413 \forglsentries{\thislabel}{\glscategory{\thislabel}:
414 \glsxtrinsertinsidefalse
415 \gls{\thislabel}[-insert];
416 \glsxtrinsertinsidetrue
417 \gls{\thislabel}[-insert].\glspar}
418
419 \section{textformat=sampleformat, hyperoutside=true}
420
421 \forglsentries{\thislabel}{\glscategory{\thislabel}:
422 \glsxtrinsertinsidefalse
423 \gls[textformat=sampleformat,hyperoutside=true]{\thislabel}[-insert];
424 \glsxtrinsertinsidetrue
425 \gls[textformat=sampleformat,hyperoutside=true]{\thislabel}[-insert].\glspar}
426
427 \section{textformat=sampleformat, hyperoutside=false}
428
429 \forglsentries{\thislabel}{\glscategory{\thislabel}:
430 \glsxtrinsertinsidefalse
431 \gls[textformat=sampleformat,hyperoutside=false]{\thislabel}[-insert];
432 \glsxtrinsertinsidetrue
433 \gls[textformat=sampleformat,hyperoutside=false]{\thislabel}[-insert].\glspar}
434
435 \section{innertextformat=hl}
436
437 \forglsentries{\thislabel}{\glscategory{\thislabel}:
438 \glsxtrinsertinsidefalse
439 \gls[innertextformat=hl]{\thislabel}[-insert];
440 \glsxtrinsertinsidetrue
441 \gls[innertextformat=hl]{\thislabel}[-insert].\glspar}
442
443 \chapter{Full Form}
444 Full form using \verb|\glsxtrfull| (inline full style).
445 This may differ from the display form used by \verb|\gls|
446 on first use, depending on the style.
447
448 \forglsentries{\thislabel}{\glscategory{\thislabel}:
449 \glsxtrfull{\thislabel}.\glspar}
450
451 \section{textformat=sampleformat, hyperoutside=true}
452
453 \forglsentries{\thislabel}{\glscategory{\thislabel}:
454 \glsxtrfull[textformat=sampleformat,hyperoutside=true]{\thislabel}.\glspar}
455
456 \section{textformat=sampleformat, hyperoutside=false}
457
458 \forglsentries{\thislabel}{\glscategory{\thislabel}:
459 \glsxtrfull[textformat=sampleformat,hyperoutside=false]{\thislabel}.\glspar}
460
461 \section{innertextformat=hl}
462
463 \forglsentries{\thislabel}{\glscategory{\thislabel}:
464 \glsxtrfull[innertextformat=hl]{\thislabel}.\glspar}
465
466 \chapter{Short Form}
467 Short form using \verb|\glsxtrshort|.
468 This may differ from the display form used by \verb|\gls|
469 on subsequent use, depending on the style.
470
471 \forglsentries{\thislabel}{\glscategory{\thislabel}:
472 \glsxtrshort{\thislabel}.\glspar
473 }
474
475 \section{textformat=sampleformat, hyperoutside=true}
476
477 \forglsentries{\thislabel}{\glscategory{\thislabel}:
478 \glsxtrshort[textformat=sampleformat,hyperoutside=true]{\thislabel}.\glspar
479 }
480
481 \section{textformat=sampleformat, hyperoutside=false}
482
483 \forglsentries{\thislabel}{\glscategory{\thislabel}:
484 \glsxtrshort[textformat=sampleformat,hyperoutside=false]{\thislabel}.\glspar
485 }
486
487 \section{innertextformat=hl}
488
489 \forglsentries{\thislabel}{\glscategory{\thislabel}:
490 \glsxtrshort[innertextformat=hl]{\thislabel}.\glspar
491 }
492
493
494 \chapter{Long Form}
495 Long form using \verb|\glsxtrlong|.
496
497 \forglsentries{\thislabel}{\glscategory{\thislabel}:
498 \glsxtrlong{\thislabel}.\glspar}
499
500 \section{textformat=sampleformat, hyperoutside=true}
501
502 \forglsentries{\thislabel}{\glscategory{\thislabel}:
503 \glsxtrlong[textformat=sampleformat,hyperoutside=true]{\thislabel}.\glspar}
504
505 \section{textformat=sampleformat, hyperoutside=false}
506
507 \forglsentries{\thislabel}{\glscategory{\thislabel}:
508 \glsxtrlong[textformat=sampleformat,hyperoutside=false]{\thislabel}.\glspar}
509
510 \section{innertextformat=hl}
511
512 \forglsentries{\thislabel}{\glscategory{\thislabel}:
513 \glsxtrlong[innertextformat=detokenize]{\thislabel}.\glspar}
514
515 \chapter{Full Form With Insert}
516 Full form using \texttt{\string\glsxtrfull\marg{label}[-insert]} (inline full style).
517 In this test chapter, each entry is displayed
518 with \verb|\glsxtrinsertinsidefalse| and then displayed with
519 \verb|\glsxtrinsertinsidetrue|
520 (following the semi-colon).
521
522 \forglsentries{\thislabel}{\glscategory{\thislabel}:
523 \glsxtrinsertinsidefalse
524 \glsxtrfull{\thislabel}[-insert];
525 \glsxtrinsertinsidetrue
526 \glsxtrfull{\thislabel}[-insert].\glspar}
527
528 \section{textformat=sampleformat, hyperoutside=true}
529
530 \forglsentries{\thislabel}{\glscategory{\thislabel}:
531 \glsxtrinsertinsidefalse
532 \glsxtrfull[textformat=sampleformat,hyperoutside=true]{\thislabel}[-insert];
533 \glsxtrinsertinsidetrue
534 \glsxtrfull[textformat=sampleformat,hyperoutside=true]{\thislabel}[-insert].\glspar}
535
536 \section{textformat=sampleformat, hyperoutside=false}
537
538 \forglsentries{\thislabel}{\glscategory{\thislabel}:
539 \glsxtrinsertinsidefalse
540 \glsxtrfull[textformat=sampleformat,hyperoutside=false]{\thislabel}[-insert];
541 \glsxtrinsertinsidetrue
542 \glsxtrfull[textformat=sampleformat,hyperoutside=false]{\thislabel}[-insert].\glspar}
543
544 \section{innertextformat=hl}
545
546 \forglsentries{\thislabel}{\glscategory{\thislabel}:
547 \glsxtrinsertinsidefalse
548 \glsxtrfull[innertextformat=hl]{\thislabel}[-insert];
549 \glsxtrinsertinsidetrue
550 \glsxtrfull[innertextformat=hl]{\thislabel}[-insert].\glspar}
551
552 \chapter{Short Form With Insert}
553 Short form using \texttt{\string\glsxtrshort\marg{label}[-insert]}.
554
555 In this test chapter, each entry is displayed
556 with \verb|\glsxtrinsertinsidefalse| and then displayed with
557 \verb|\glsxtrinsertinsidetrue|
558 (following the semi-colon).
559
560 \forglsentries{\thislabel}{\glscategory{\thislabel}:
561 \glsxtrinsertinsidefalse
562 \glsxtrshort{\thislabel}[-insert];
563 \glsxtrinsertinsidetrue
564 \glsxtrshort{\thislabel}[-insert].\glspar}
565
566 \section{textformat=sampleformat, hyperoutside=true}
567
568 \forglsentries{\thislabel}{\glscategory{\thislabel}:
569 \glsxtrinsertinsidefalse
570 \glsxtrshort[textformat=sampleformat,hyperoutside=true]{\thislabel}[-insert];
571 \glsxtrinsertinsidetrue
572 \glsxtrshort[textformat=sampleformat,hyperoutside=true]{\thislabel}[-insert].\glspar}
573
574 \section{textformat=sampleformat, hyperoutside=false}
575
576 \forglsentries{\thislabel}{\glscategory{\thislabel}:
577 \glsxtrinsertinsidefalse
578 \glsxtrshort[textformat=sampleformat,hyperoutside=false]{\thislabel}[-insert];
579 \glsxtrinsertinsidetrue
580 \glsxtrshort[textformat=sampleformat,hyperoutside=false]{\thislabel}[-insert].\glspar}
581
582 \section{innertextformat=hl}
583
584 \forglsentries{\thislabel}{\glscategory{\thislabel}:
585 \glsxtrinsertinsidefalse
586 \glsxtrshort[innertextformat=hl]{\thislabel}[-insert];
587 \glsxtrinsertinsidetrue
588 \glsxtrshort[innertextformat=hl]{\thislabel}[-insert].\glspar}
589
590 \chapter{Long Form With Insert}
591 Long form using \texttt{\string\glsxtrlong\marg{label}[-insert]}.
592 Note that the \texttt{hyphen} styles with the \texttt{markwords}
593 attribute don't adjust in this case.
594
595 In this test chapter, each entry is displayed
596 with \verb|\glsxtrinsertinsidefalse| and then displayed with
597 \verb|\glsxtrinsertinsidetrue|
598 (following the semi-colon).
599
600 \forglsentries{\thislabel}{\glscategory{\thislabel}:
601 \glsxtrinsertinsidefalse
602 \glsxtrlong{\thislabel}[-insert];
603 \glsxtrinsertinsidetrue
604 \glsxtrlong{\thislabel}[-insert].\glspar}
605
606 \section{textformat=sampleformat, hyperoutside=true}
607
608 \forglsentries{\thislabel}{\glscategory{\thislabel}:
609 \glsxtrinsertinsidefalse
610 \glsxtrlong[textformat=sampleformat,hyperoutside=true]{\thislabel}[-insert];
611 \glsxtrinsertinsidetrue
612 \glsxtrlong[textformat=sampleformat,hyperoutside=true]{\thislabel}[-insert].\glspar}
613
614 \section{textformat=sampleformat, hyperoutside=false}
615
616 \forglsentries{\thislabel}{\glscategory{\thislabel}:
617 \glsxtrinsertinsidefalse
618 \glsxtrlong[textformat=sampleformat,hyperoutside=false]{\thislabel}[-insert];
619 \glsxtrinsertinsidetrue
620 \glsxtrlong[textformat=sampleformat,hyperoutside=false]{\thislabel}[-insert].\glspar}
621
622 \section{innertextformat=hl}
623
624 \forglsentries{\thislabel}{\glscategory{\thislabel}:
625 \glsxtrinsertinsidefalse
626 \glsxtrlong[innertextformat=hl]{\thislabel}[-insert];
627 \glsxtrinsertinsidetrue
628 \glsxtrlong[innertextformat=hl]{\thislabel}[-insert].\glspar}
629 \glsxtrinsertinsidefalse
630
631 \chapter{First Form}
632 First form using \verb|\glsfirst|. This may be different
633 from the first use of \verb|\gls| depending on the style.
634 In general, it's better not to use \verb|\glsfirst| with
635 abbreviations. Use \verb|\gls| (possibly with a reset)
636 or \verb|\glsxtrfull| instead.
637 Some styles are too complicated to work with \verb|\glsfirst|.
638
639 \forglsentries{\thislabel}{\glscategory{\thislabel}:
640 \glsfirst{\thislabel}.\glspar}
641
642 \section{textformat=sampleformat, hyperoutside=true}
643
644 \forglsentries{\thislabel}{\glscategory{\thislabel}:
645 \glsfirst[textformat=sampleformat,hyperoutside=true]{\thislabel}.\glspar}
646
647 \section{textformat=sampleformat, hyperoutside=false}
648
649 \forglsentries{\thislabel}{\glscategory{\thislabel}:
650 \glsfirst[textformat=sampleformat,hyperoutside=false]{\thislabel}.\glspar}
651
652 \section{innertextformat=hl}
653
654 \forglsentries{\thislabel}{\glscategory{\thislabel}:
655 \glsfirst[innertextformat=hl]{\thislabel}.\glspar}
656
657 \chapter{Text Form}
658 Text form using \verb|\glstext|. This may be different
659 from the subsequent use of \verb|\gls| depending on the style.
660 In general, it's better not to use \verb|\glstext| with
661 abbreviations. Use \verb|\gls| (possibly with an unset)
662 or \verb|\glsxtrshort| instead.
663
664 \forglsentries{\thislabel}{\glscategory{\thislabel}:
665 \glstext{\thislabel}.\glspar}
666
667 \section{textformat=sampleformat, hyperoutside=true}
668
669 \forglsentries{\thislabel}{\glscategory{\thislabel}:
670 \glstext[textformat=sampleformat, hyperoutside=true]{\thislabel}.\glspar}
671
672 \section{textformat=sampleformat, hyperoutside=false}
673
674 \forglsentries{\thislabel}{\glscategory{\thislabel}:
675 \glstext[textformat=sampleformat, hyperoutside=false]{\thislabel}.\glspar}
676
677 \section{innertextformat=hl}
678
679 \forglsentries{\thislabel}{\glscategory{\thislabel}:
680 \glstext[innertextformat=hl]{\thislabel}.\glspar}
681
682 \chapter{First Form With Insert}
683 First form using \texttt{\string\glsfirst\marg{label}[-insert]}.
684 This is different from the first use of \verb|\gls|
685 as can be seen by the location of the inserted material.
686 (There's no check for the conditional
687 \verb|\ifglsxtrinsertinside|.) In general it's best not
688 to use \verb|\glsfirst| with abbreviations. Use either
689 \verb|\gls| (possibly with a reset) or \verb|\glsxtrfull|.
690
691 \forglsentries{\thislabel}{\glscategory{\thislabel}:
692 \glsfirst{\thislabel}[-insert].\glspar}
693
694 \section{textformat=sampleformat, hyperoutside=true}
695
696 \forglsentries{\thislabel}{\glscategory{\thislabel}:
697 \glsfirst[textformat=sampleformat,hyperoutside=true]{\thislabel}[-insert].\glspar}
698
699 \section{textformat=sampleformat, hyperoutside=false}
700
701 \forglsentries{\thislabel}{\glscategory{\thislabel}:
702 \glsfirst[textformat=sampleformat,hyperoutside=false]{\thislabel}[-insert].\glspar}
703
704 \section{innertextformat=hl}
705
706 \forglsentries{\thislabel}{\glscategory{\thislabel}:
707 \glsfirst[innertextformat=hl]{\thislabel}[-insert].\glspar}
708
709 \chapter{Text Form With Insert}
710 Text form using \texttt{\string\glstext\marg{label}[-insert]}.
711 This doesn't check for the conditional
712 \verb|\ifglsxtrinsertinside|.
713 In general, it's better not to use \verb|\glstext| with
714 abbreviations. Use \verb|\gls| (possibly with an unset)
715 or \verb|\glsxtrshort| instead.
716
717 \forglsentries{\thislabel}{\glscategory{\thislabel}:
718 \glstext{\thislabel}[-insert].\glspar}
719
720 \section{textformat=sampleformat, hyperoutside=true}
721
722 \forglsentries{\thislabel}{\glscategory{\thislabel}:
723 \glstext[textformat=sampleformat,hyperoutside=true]{\thislabel}[-insert].\glspar}
724
725 \section{textformat=sampleformat, hyperoutside=false}
726
727 \forglsentries{\thislabel}{\glscategory{\thislabel}:
728 \glstext[textformat=sampleformat,hyperoutside=false]{\thislabel}[-insert].\glspar}
729
730 \section{innertextformat=hl}
731
732 \forglsentries{\thislabel}{\glscategory{\thislabel}:
733 \glstext[innertextformat=hl]{\thislabel}[-insert].\glspar}
734
735 \chapter{Summary}
736
737 \renewcommand{\do}[1]{\section{#1}
738 \subsection{First Use}
739 \texttt{\string\gls\marg{label}} / \texttt{\string\Gls\marg{label}} /
740 \texttt{\string\GLS\marg{label}}:
741 \gls[prereset]{sample-#1};
742 \Gls[prereset]{sample-#1};
743 \GLS[prereset]{sample-#1}.\par\noindent
744 With insert:
745 \gls[prereset]{sample-#1}[-insert];
746 \Gls[prereset]{sample-#1}[-insert];
747 \GLS[prereset]{sample-#1}[-insert].\par\noindent
748 Plural \texttt{\string\glspl\marg{label}} / \texttt{\string\Glspl\marg{label}} /
749 \texttt{\string\GLSpl\marg{label}}:
750 \glspl[prereset]{sample-#1};
751 \Glspl[prereset]{sample-#1};
752 \GLSpl[prereset]{sample-#1}.\par\noindent
753 With insert:
754 \glspl[prereset]{sample-#1}[-insert];
755 \Glspl[prereset]{sample-#1}[-insert];
756 \GLSpl[prereset]{sample-#1}[-insert].
757 \subsection{Next Use}
758 \texttt{\string\gls\marg{label}} / \texttt{\string\Gls\marg{label}} /
759 \texttt{\string\GLS\marg{label}}:
760 \gls{sample-#1};
761 \Gls{sample-#1};
762 \GLS{sample-#1}.\par\noindent
763 With insert:
764 \gls{sample-#1}[-insert];
765 \Gls{sample-#1}[-insert];
766 \GLS{sample-#1}[-insert].\par\noindent
767 Plural \texttt{\string\glspl\marg{label}} / \texttt{\string\Glspl\marg{label}} /
768 \texttt{\string\GLSpl\marg{label}}:
769 \glspl{sample-#1};
770 \Glspl{sample-#1};
771 \GLSpl{sample-#1}.\par\noindent
772 With insert:
773 \glspl{sample-#1}[-insert];
774 \Glspl{sample-#1}[-insert];
775 \GLSpl{sample-#1}[-insert].
776 \subsection{Full Inline}
777 \texttt{\string\glsxtrfull\marg{label}} /
778 \texttt{\string\Glsxtrfull\marg{label}} /
779 \texttt{\string\GLSxtrfull\marg{label}}:
780 \glsxtrfull{sample-#1};
781 \Glsxtrfull{sample-#1};
782 \GLSxtrfull{sample-#1}.\par\noindent
783 With insert:
784 \glsxtrfull{sample-#1}[-insert];
785 \Glsxtrfull{sample-#1}[-insert];
786 \GLSxtrfull{sample-#1}[-insert].\par\noindent
787 Plural \texttt{\string\glsxtrfullpl\marg{label}} /
788 \texttt{\string\Glsxtrfullpl\marg{label}} /
789 \texttt{\string\GLSxtrfullpl\marg{label}}:
790 \glsxtrfullpl{sample-#1};
791 \Glsxtrfullpl{sample-#1};
792 \GLSxtrfullpl{sample-#1}.\par\noindent
793 Plural with insert:
794 \glsxtrfullpl{sample-#1}[-insert];
795 \Glsxtrfullpl{sample-#1}[-insert];
796 \GLSxtrfullpl{sample-#1}[-insert].
797 \subsection{Short}
798 \texttt{\string\glsxtrshort\marg{label}} /
799 \texttt{\string\Glsxtrshort\marg{label}} /
800 \texttt{\string\GLSxtrshort\marg{label}}:
801 \glsxtrshort{sample-#1};
802 \Glsxtrshort{sample-#1};
803 \GLSxtrshort{sample-#1}.\par\noindent
804 With insert:
805 \glsxtrshort{sample-#1}[-insert];
806 \Glsxtrshort{sample-#1}[-insert];
807 \GLSxtrshort{sample-#1}[-insert].\par\noindent
808 Plural \texttt{\string\glsxtrshortpl\marg{label}} /
809 \texttt{\string\Glsxtrshortpl\marg{label}} /
810 \texttt{\string\GLSxtrshortpl\marg{label}}:
811 \glsxtrshortpl{sample-#1};
812 \Glsxtrshortpl{sample-#1};
813 \GLSxtrshortpl{sample-#1}.\par\noindent
814 Plural with insert:
815 \glsxtrshortpl{sample-#1}[-insert];
816 \Glsxtrshortpl{sample-#1}[-insert];
817 \GLSxtrshortpl{sample-#1}[-insert].
818 \subsection{Long}
819 \texttt{\string\glsxtrlong\marg{label}} /
820 \texttt{\string\Glsxtrlong\marg{label}} /
821 \texttt{\string\GLSxtrlong\marg{label}}:
822 \glsxtrlong{sample-#1};
823 \Glsxtrlong{sample-#1};
824 \GLSxtrlong{sample-#1}.\par\noindent
825 With insert:
826 \glsxtrlong{sample-#1}[-insert];
827 \Glsxtrlong{sample-#1}[-insert];
828 \GLSxtrlong{sample-#1}[-insert].\par\noindent
829 Plural \texttt{\string\glsxtrlongpl\marg{label}} /
830 \texttt{\string\Glsxtrlongpl\marg{label}} /
831 \texttt{\string\GLSxtrlongpl\marg{label}}:
832 \glsxtrlongpl{sample-#1};
833 \Glsxtrlongpl{sample-#1};
834 \GLSxtrlongpl{sample-#1}.\par\noindent
835 Plural with insert:
836 \glsxtrlongpl{sample-#1}[-insert];
837 \Glsxtrlongpl{sample-#1}[-insert];
838 \GLSxtrlongpl{sample-#1}[-insert].
839 \subsection{Other}
840 Name: \glsentryname{sample-#1}.\par\noindent
841 Sort: \texttt{\glsentrysort{sample-#1}}.\par\noindent
842 Description: \glsentrydesc{sample-#1}.\par
843 }
844
845 \dolistloop{\stylelist}
846 \printglossaries
847 \end{document}