diff options
Diffstat (limited to 'macros/latex/contrib/glossaries/samples/sample-inline.tex')
-rw-r--r-- | macros/latex/contrib/glossaries/samples/sample-inline.tex | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/macros/latex/contrib/glossaries/samples/sample-inline.tex b/macros/latex/contrib/glossaries/samples/sample-inline.tex index e6a6e94c87..cfe2a383ce 100644 --- a/macros/latex/contrib/glossaries/samples/sample-inline.tex +++ b/macros/latex/contrib/glossaries/samples/sample-inline.tex @@ -4,6 +4,8 @@ % arara: makeglossaries % arara: pdflatex: { synctex: on } % arara: pdflatex: { synctex: on } +% +%http://mirrors.ctan.org/macros/latex/contrib/glossaries/glossaries-user.html#sample-inline \documentclass[a4paper]{report} \usepackage[plainpages=false,colorlinks]{hyperref} @@ -17,7 +19,9 @@ \makeglossaries -\newglossaryentry{Perl}{name=\texttt{Perl}, +\newcommand{\scriptlang}[1]{\textsf{#1}} + +\newglossaryentry{Perl}{name=\scriptlang{Perl}, sort=Perl, % need a sort key because name contains a command description=A scripting language} @@ -59,6 +63,7 @@ writing. Beginning on new, usually indented, line}} % this isn't necessary, as this form (appending an s) is % the default plural=cows, +user1=kine, % description: description={(\emph{pl.}\ cows, \emph{archaic} kine) an adult female of any bovine animal}} @@ -123,9 +128,16 @@ must be used, e.g.\ in the description of \gls{pagelist}. Plurals are assumed to have the letter s appended, but if this is not the case, as in \glspl{mtrx}, then you need to specify the plural when you define the entry. If a term may have multiple -plurals (for example \glspl{cow}/\glslink{cow}{kine}) then -define the entry with the plural form most likely to be used and -explicitly specify the alternative form using \verb|\glslink|. +plurals (for example \glspl{cow}/\glsuseri{cow}) then +define the entry with the plural form most likely to be used. +The alternative can simply be referenced with \verb|\glslink| +(e.g.\ \glslink{cow}{kine}) +or \verb|\glsdisp| (e.g.\ \glsdisp{cow}{kine}). +Another option is to save the alternative plural in another key. In +this case, the ``user1'' key has been used, but a custom key can be +defined instead. + + \Glspl{seal} and \glspl{sealion} have regular plural forms. \Gls{bravo} is a homograph, but the plural forms are spelt |