| 1 |
% This file is embedded in glossaries-extra-manual.pdf |
| 2 |
% Example 144 Nested glossaries |
| 3 |
% Label: "ex:nested" |
| 4 |
% arara: pdflatex |
| 5 |
% arara: pdfcrop |
| 6 |
\documentclass[12pt]{article} |
| 7 |
\pagestyle{empty} |
| 8 |
\usepackage{fontawesome} |
| 9 |
\usepackage[style=tree]{glossaries-extra} |
| 10 |
\newglossaryentry{pictograph}{name={pictograph}, |
| 11 |
description={picture or symbol representing a word or phrase}} |
| 12 |
\newglossaryentry{mathgreek}{name={Greek symbol}, |
| 13 |
description={mathematical constants or functions}} |
| 14 |
\newignoredglossary*{pictograph} |
| 15 |
\newignoredglossary*{mathgreek} |
| 16 |
\newglossaryentry{cut}{type={pictograph}, |
| 17 |
name={\faCut}, |
| 18 |
description={cut}} |
| 19 |
\newglossaryentry{paste}{type={pictograph}, |
| 20 |
name={\faPaste}, description={paste}} |
| 21 |
\newglossaryentry{alpha}{type={mathgreek}, |
| 22 |
name={\ensuremath{\alpha}}, |
| 23 |
description={alpha}} |
| 24 |
\newglossaryentry{beta}{type={mathgreek}, |
| 25 |
name={\ensuremath{\beta}}, |
| 26 |
description={beta}} |
| 27 |
\begin{document} |
| 28 |
\newcommand{\nestedhandler}[1]{% |
| 29 |
\glsxtrunsrtdo{#1}% |
| 30 |
\ifglossaryexists*{#1}% |
| 31 |
{% |
| 32 |
\printunsrtinnerglossary[type={#1},leveloffset={++1},groups=false]{}{}% |
| 33 |
}% |
| 34 |
{}% |
| 35 |
} |
| 36 |
\printunsrtglossary*{\let\printunsrtglossaryhandler\nestedhandler} |
| 37 |
\end{document} |