Debian Codegraph @

texmf-dist/doc/latex/glossaries-extra/samples/sample-suppl-main-hyp.tex

raw
1 % arara: pdflatex
2 % arara: makeglossaries
3 % arara: pdflatex
4 \documentclass{article}
5
6 \usepackage[colorlinks]{hyperref}
7 \usepackage{glossaries-extra}
8
9 \makeglossaries
10
11 \glssetcategoryattribute{supplementary}{externallocation}{sample-suppl-hyp.pdf}
12
13 \newglossaryentry{sample}{category={supplementary},
14 name={sample},description={an example}}
15
16 \begin{document}
17 \section{Sample}
18 Some \gls{sample} text.
19
20 Test link: \hyperref{sample-suppl-hyp.pdf}{}{section.II.S.2}{S.2}.
21
22 In this document, \verb|\theHsection| is in the form: \theHsection.
23
24 In the other document, it's in the form II.S.2 so
25 \texttt{theHvalue} is needed to ensure the hyperlink is correct.
26
27 \printglossaries
28 \glsadd[format=glsxtrsupphypernumber,thevalue={S.2},theHvalue={II.S.2},counter=section]{sample}
29 \end{document}
30