summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/glossaries-extra/samples/sample-external.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/glossaries-extra/samples/sample-external.tex')
-rw-r--r--macros/latex/contrib/glossaries-extra/samples/sample-external.tex38
1 files changed, 38 insertions, 0 deletions
diff --git a/macros/latex/contrib/glossaries-extra/samples/sample-external.tex b/macros/latex/contrib/glossaries-extra/samples/sample-external.tex
new file mode 100644
index 0000000000..e3e5fda1d3
--- /dev/null
+++ b/macros/latex/contrib/glossaries-extra/samples/sample-external.tex
@@ -0,0 +1,38 @@
+% arara: pdflatex
+% arara: makeglossaries
+% arara: pdflatex
+\documentclass{article}
+
+\usepackage[colorlinks]{hyperref}
+\usepackage{glossaries-extra}
+
+\newignoredglossary*{external}
+
+\glssetcategoryattribute{external}{targeturl}{\glsentryuseri{\glslabel}}
+
+\makeglossaries
+
+\newglossaryentry{sample}{name={sample},description={an example}}
+
+\newcommand*{\newexternalentry}[3]{%
+ \newglossaryentry{#1}{type={external},category={external},user1={#2},#3}%
+}
+
+\newcommand*{\glsxtrpostlinkexternal}{%
+ \glsxtrpostlinkAddDescOnFirstUse
+}
+
+\newexternalentry{bib2gls}{https://github.com/nlct/bib2gls}
+{name={bib2gls},
+ description={command line application to convert from .bib to .glstex}
+}
+
+
+\begin{document}
+An internal example: \gls{sample}.
+
+An external example: \gls{bib2gls}.
+
+\printglossaries
+
+\end{document}