summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example131.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example131.tex')
-rw-r--r--macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example131.tex85
1 files changed, 85 insertions, 0 deletions
diff --git a/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example131.tex b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example131.tex
new file mode 100644
index 0000000000..96558df711
--- /dev/null
+++ b/macros/latex/contrib/glossaries-extra/glossaries-extra-manual-examples/glossaries-extra-manual-example131.tex
@@ -0,0 +1,85 @@
+% This file is embedded in glossaries-extra-manual.pdf
+% Example 131 Multi-entries: skipping elements (prefix and post-link hooks)
+% arara: pdflatex
+% arara: makeglossaries
+% arara: pdflatex
+% arara: pdfcrop
+\documentclass[12pt]{article}
+\pagestyle{empty}
+\usepackage[colorlinks]{hyperref}
+\usepackage[stylemods,style=long]{glossaries-extra}
+
+
+\makeglossaries
+
+
+\setabbreviationstyle{long-postshort-sc-user}
+
+
+\newabbreviation{ssi}{ssi}{server-side includes}
+\newabbreviation{html}{html}{hypertext markup language}
+
+
+\newrobustcmd{\combinedpre}[1]{\glsps{#1}}
+\newrobustcmd{\combinedpost}[1]{\glsps{#1}}
+
+
+\newabbreviation{shtml}{shtml}
+{{}\combinedpre{ssi} enabled \combinedpost{html}}
+
+
+\glssetcategoryattribute{combinedabbrv}{multioptions}
+ {%
+ mpostlinkelement=main,
+ usedskipothers
+ }
+
+
+\multiglossaryentry
+ [category=combinedabbrv]
+ {shtml}[shtml]{ssi,shtml,html}
+
+
+\mglsdefcategoryprefix{combinedabbrv}{%
+ \renewcommand{\combinedpre}[1]{\ignorespaces}%
+ \renewcommand{\combinedpost}[1]{\unskip}%
+}
+\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}.
+
+
+Individual entry first use: \gls{shtml}.
+
+
+Resetting all\glsresetall\mglsresetall:
+
+
+Multi-entry first use: \mgls{shtml}.
+
+
+Multi-entry next use: \mgls{shtml}.
+
+
+Individual elements: \gls{ssi} and \gls{html}.
+
+
+Resetting all\glsresetall\mglsresetall:
+
+
+Individual entry first use: \gls{shtml}.
+
+
+Multi-entry first use: \mgls{shtml}. (Wrong!)
+
+
+\printglossaries
+\end{document}