% This file is embedded in glossaries-extra-manual.pdf
% Example 96 Link text styles: outer, middle, inner, hyperlinks and post-link hook
% Label: "ex:linktextstyles"
% arara: pdflatex
% arara: pdfcrop
\documentclass[14pt]{extarticle}
\pagestyle{empty}
 \usepackage{courier}
\usepackage[T1]{fontenc}
\usepackage{xcolor}
\usepackage{soul}
\usepackage[colorlinks]{hyperref}
\usepackage[nogroupskip]{glossaries-extra}
% outer formatting:
\renewcommand{\glstextformat}[1]{\texttt{#1}}
% middle formatting:
\renewcommand{\glsxtrregularfont}[1]{\textbf{#1}}
\renewcommand{\glsxtrabbreviationfont}[1]{\textit{#1}}
% inner formatting:
\renewcommand{\glsxtrdefaultentrytextfmt}[1]{\hl{#1}}
% post-link hook for 'general' category:
\glsdefpostlink{general}{\glsxtrpostlinkAddDescOnFirstUse}
% define entries:
\newglossaryentry{sample}{name={sample},description={an example}}
\newabbreviation{html}{HTML}{hypertext markup language}
\newacronym{nasa}{NASA}{National Aeronautics and Space Administration} 
\begin{document}
 First use: \gls{sample}, \gls{html}, \gls{nasa}. 

Next use: \gls{sample}, \gls{html}, \gls{nasa}. 

\printunsrtglossaries 
\end{document}
