| 1 |
% This file is public domain |
| 2 |
% If you want to use arara, you need the following directives: |
| 3 |
% arara: pdflatex: { synctex: on } |
| 4 |
% arara: makeglossaries |
| 5 |
% arara: pdflatex: { synctex: on } |
| 6 |
% |
| 7 |
%http://mirrors.ctan.org/macros/latex/contrib/glossaries/glossaries-user.html#sample-crossref |
| 8 |
\documentclass{article} |
| 9 |
|
| 10 |
\usepackage[colorlinks]{hyperref} |
| 11 |
\usepackage{glossaries} |
| 12 |
|
| 13 |
\makeglossaries |
| 14 |
|
| 15 |
\providecommand{\alsoname}{see also} |
| 16 |
|
| 17 |
\renewcommand{\glsseeitemformat}[1]{\textsc{\glsentryname{#1}}} |
| 18 |
|
| 19 |
\newglossaryentry{pear}{name=pear, |
| 20 |
description={an oddly shaped fruit}} |
| 21 |
|
| 22 |
\newglossaryentry{apple}{name=apple, |
| 23 |
description={firm, round fruit}, |
| 24 |
see=[\alsoname]{pear}} |
| 25 |
|
| 26 |
\newglossaryentry{banana}{name=banana, |
| 27 |
description={a yellow fruit with an even odder shape than |
| 28 |
a \gls{pear}}} |
| 29 |
|
| 30 |
\newglossaryentry{fruit}{name=fruit, |
| 31 |
description={sweet, fleshy product of plant containing seed}} |
| 32 |
|
| 33 |
% An alternative to using the 'see' key: |
| 34 |
\glssee{fruit}{pear,apple,banana} |
| 35 |
|
| 36 |
\newglossaryentry{courgette}{name={courgette}, |
| 37 |
description={type of long, green summer squash}} |
| 38 |
|
| 39 |
% The 'see' key automatically triggers \glssee so this entry will be |
| 40 |
% included even though it's not referenced in the document. |
| 41 |
\newglossaryentry{marrow}{name={marrow}, |
| 42 |
description={long vegetable with thin green skin and white flesh}, |
| 43 |
see={[\alsoname]courgette}} |
| 44 |
|
| 45 |
\newglossaryentry{zucchini}{name={zucchini},description={\nopostdesc}, |
| 46 |
see={courgette}} |
| 47 |
|
| 48 |
\begin{document} |
| 49 |
\gls{pear}, \gls{apple}, \gls{banana} and \gls{courgette}. |
| 50 |
|
| 51 |
\printglossaries |
| 52 |
|
| 53 |
\end{document} |