From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Mon, 2 Sep 2019 13:46:59 +0900
Subject: Initial commit

---
 .../glossaries-extra/samples/sample-external.tex   | 38 ++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 macros/latex/contrib/glossaries-extra/samples/sample-external.tex

(limited to 'macros/latex/contrib/glossaries-extra/samples/sample-external.tex')

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}
-- 
cgit v1.2.3

