diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/glossaries/samples/sample-index.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/glossaries/samples/sample-index.tex | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/sample-index.tex b/Master/texmf-dist/doc/latex/glossaries/samples/sample-index.tex new file mode 100644 index 00000000000..c33ca87c160 --- /dev/null +++ b/Master/texmf-dist/doc/latex/glossaries/samples/sample-index.tex @@ -0,0 +1,60 @@ + % This file is public domain + % If you want to use arara, you need the following directives: + % arara: pdflatex: { synctex: on } + % arara: makeglossaries + % arara: pdflatex: { synctex: on } + % arara: makeglossaries + % arara: pdflatex: { synctex: on } +\documentclass{report} + +\usepackage[colorlinks]{hyperref} +\usepackage[toc]{glossaries} +\usepackage{glossary-mcols} + +\newglossary[ilg]{index}{ind}{idx}{\indexname} + +\makeglossaries + +\newcommand*{\newterm}[2][]{% + \newglossaryentry{#2}{type={index},name={#2},description={\nopostdesc},#1}% +} + + +\newterm[plural={stegosauruses}]{stegosaurus} +\newterm[plural={triceratopses}]{triceratops} +\newterm[plural={apatosauruses}]{apatosaurus} + +\newterm[name={dinosaur}]{ind-dinosaur} +\newterm[name={Triassic}]{ind-triassic} + + +\newglossaryentry{dinosaur}% +{% + name={dinosaur\glsadd{ind-dinosaur}},% + description={One of a group of dinosauria}% +} + +\newglossaryentry{Triassic}% +{% + name={Triassic\glsadd{ind-triassic}},% + description={The first period of the Mesozoic Era} +} + +\begin{document} +\tableofcontents + +\chapter{Dinosaurs} + +\Glspl{dinosaur} are now extinct. They first appeared during the +\gls{Triassic} period. Examples of \glspl{dinosaur} include the +\gls{triceratops}, the \gls{apatosaurus} and the \gls{stegosaurus}. + +\renewcommand*{\glsnamefont}[1]{\textbf{\makefirstuc{#1}}} + +\printglossary[style=long,nogroupskip] + +\renewcommand*{\glsnamefont}[1]{\textmd{#1}} + +\printglossary[type=index,style=mcolindexgroup] + +\end{document} |