summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/glossaries/samples/sample-FnDesc.tex
blob: 746eb7b858c5daa975f78a0835232103d95543dc (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
% This file is public domain
% If you are using arara, you need the following directives:
% arara: pdflatex: { synctex: on }
% arara: makeglossaries
% arara: pdflatex: { synctex: on }
\documentclass{report}

\usepackage[colorlinks]{hyperref}
\usepackage[hyperfirst=false]{glossaries}

\makeglossaries

\renewcommand*{\glsentryfmt}{%
  \glsgenentryfmt
  \ifglsused{\glslabel}{}{\footnote{\glsentrydesc{\glslabel}}}%
}

\newglossaryentry{sample}{name={sample},description={an example
description}}

\begin{document}
\chapter{Sample Chapter}

First use: \gls{sample}.

Next use: \gls{sample}.

\printglossaries
\end{document}