| 1 |
% This file is embedded in glossaries-extra-manual.pdf |
| 2 |
% Example 97 Link text styles: outer, middle, inner, hyperlinks and post-link hook |
| 3 |
% Label: "ex:linktextstyles" |
| 4 |
% arara: pdflatex |
| 5 |
% arara: pdfcrop |
| 6 |
\documentclass[14pt]{extarticle} |
| 7 |
\pagestyle{empty} |
| 8 |
\usepackage{courier} |
| 9 |
\usepackage[T1]{fontenc} |
| 10 |
\usepackage{xcolor} |
| 11 |
\usepackage{soul} |
| 12 |
\usepackage[colorlinks]{hyperref} |
| 13 |
\usepackage[nogroupskip]{glossaries-extra} |
| 14 |
% outer formatting: |
| 15 |
\renewcommand{\glstextformat}[1]{\texttt{#1}} |
| 16 |
% middle formatting: |
| 17 |
\renewcommand{\glsxtrregularfont}[1]{\textbf{#1}} |
| 18 |
\renewcommand{\glsxtrabbreviationfont}[1]{\textit{#1}} |
| 19 |
% inner formatting: |
| 20 |
\renewcommand{\glsxtrdefaultentrytextfmt}[1]{\hl{#1}} |
| 21 |
% post-link hook for 'general' category: |
| 22 |
\glsdefpostlink{general}{\glsxtrpostlinkAddDescOnFirstUse} |
| 23 |
% define entries: |
| 24 |
\newglossaryentry{sample}{name={sample},description={an example}} |
| 25 |
\newabbreviation{html}{HTML}{hypertext markup language} |
| 26 |
\newacronym{nasa}{NASA}{National Aeronautics and Space Administration} |
| 27 |
\begin{document} |
| 28 |
First use: \gls{sample}, \gls{html}, \gls{nasa}. |
| 29 |
|
| 30 |
Next use: \gls{sample}, \gls{html}, \gls{nasa}. |
| 31 |
|
| 32 |
\printunsrtglossaries |
| 33 |
\end{document} |