summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/glossaries-extra/sample-external.tex
blob: e3e5fda1d3d22b832ab0eda4d693abecbc44f87e (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
% 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}