summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example130.tex
blob: d6f3de68faec90507ff4cd5d0d6c1dfecf3b4912 (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
% This file is embedded in glossaries-extra-manual.pdf
% Example 130 Multi-entries: skipping elements (unsetting others)
% Label: "ex:multientryskipunsetothers"
% arara: pdflatex
% arara: makeglossaries
% arara: pdflatex
% arara: pdfcrop
\documentclass[12pt]{article}
\pagestyle{empty}
\usepackage[T1]{fontenc}
\usepackage[colorlinks]{hyperref}
\usepackage[stylemods,style=long]{glossaries-extra} 

\makeglossaries


\setabbreviationstyle{long-short-sc}
\newabbreviation{ssi}{ssi}{server-side includes}
\newabbreviation{html}{html}{hypertext markup language} 

\setabbreviationstyle[combinedabbrv]{long-only-short-sc-only}
\newabbreviation
 [category={combinedabbrv},
 description={\glsxtrshort{ssi} enabled \glsxtrshort{html}}]
 {shtml-frag}{shtml}{enabled} 

\glssetcategoryattribute{combinedabbrv}{multioptions}
 {%
 hyper={notmainfirst},
 mglsopts={presetlocal,unsetothers,others={local}},
 usedskipothers,
 firstsuffix={\glsxtrshort{\mglslastmainlabel}}
}


\multiglossaryentry
 [category=combinedabbrv]
 {shtml}[shtml-frag]{ssi,shtml-frag,html} 
\begin{document}
Individual elements first use: \gls{ssi} and \gls{html}. 

Individual elements next use: \gls{ssi} and \gls{html}. 

Multi-entry first use: \mgls{shtml}. 

Multi-entry next use: \mgls{shtml}. 

Resetting all\glsresetall\mglsreset{shtml}: 

Multi-entry first use: \mgls{shtml}. 

Multi-entry next use: \mgls{shtml}. 

Individual elements: \gls{ssi} and \gls{html}.
\printglossaries 
\end{document}