diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/glossaries/samples |
Initial commit
Diffstat (limited to 'macros/latex/contrib/glossaries/samples')
101 files changed, 5865 insertions, 0 deletions
diff --git a/macros/latex/contrib/glossaries/samples/README-samples b/macros/latex/contrib/glossaries/samples/README-samples new file mode 100644 index 0000000000..508aa54f98 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/README-samples @@ -0,0 +1,52 @@ +These are sample files illustrating the use of the glossaries +package. If you are new to this package, start with minimalgls.tex +to check you have glossaries correctly installed and to check that +you understand how to use it. + +1. Run minimalgls.tex through LaTeX ("compile the document") either +by typing + + latex minimalgls + +in a terminal or by using the relevant button or menu item in your +text editor or front-end. This will create the required associated +files but you will not see the glossary. If you use PDFLaTeX you +will also get warnings about non-existent references that look +something like: + +pdfTeX warning (dest): name{glo:aca} has been referenced but does +not exist, +replaced by a fixed one + +These warnings may be ignored on the first run. + +If you get a "Missing \begin{document}" error, then it's most likely +that your version of xkeyval.sty is out of date. Check the log file +for a warning of that nature. If this is the case, please update +your TeX distribution. + +2. Run makeglossaries on the document. This can be done on a +terminal either by typing + + makeglossaries minimalgls + +or by typing + + perl makeglossaries minimalgls + +If you don't have Perl installed you will need to run makeindex +directly: + + makeindex -s minimalgls.ist -t minimalgls.glg -o minimalgls.gls minimalgls.glo + +Another alternative is to use the Java application makeglossariesgui +(http://ctan.org/pkg/makeglossariesgui) which has diagnostic tools +to help determine what has gone wrong if there's a problem. + +3. Repeat step 1. Your document minimalgls.pdf should now have a +glossary. + +If the above seems complicated, you can automate the process using +tools such as latexmk or arara. See +http://www.dickimaw-books.com/latex/thesis/html/build.html for +further details. diff --git a/macros/latex/contrib/glossaries/samples/database1.tex b/macros/latex/contrib/glossaries/samples/database1.tex new file mode 100644 index 0000000000..f9ecc9a420 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/database1.tex @@ -0,0 +1,24 @@ + % This is a sample database of glossary entries + % Only those entries used in the document with \glslink, \gls, + % \glspl, and uppercase variants will have entries in the + % glossary. Note that the type key is not used, as the + % glossary type can be specified in \loadglsentries + +\newglossaryentry{array}{name=array, +description={A list of values identified by a numeric value}} + +\newglossaryentry{binary}{name=binary, +description={Pertaining to numbers represented in base 2}} + +\newglossaryentry{comment}{name=comment, +description={A remark that doesn't affect the meaning of the +code}} + +\newglossaryentry{global}{name=global, +description={Something that maintains its state when it leaves +the current group}} + +\newglossaryentry{local}{name=local, +description={Something that only maintains its state until +it leaves the group in which it was defined/changed}} + diff --git a/macros/latex/contrib/glossaries/samples/database2.tex b/macros/latex/contrib/glossaries/samples/database2.tex new file mode 100644 index 0000000000..55bc08a1c4 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/database2.tex @@ -0,0 +1,22 @@ + % This is a sample database of glossary entries + % Only those entries used in the document with \glslink, \gls, + % \glspl, and uppercase variants will have entries in the + % glossary. Note that the type key is not used, as the + % glossary type can be specified in \loadglsentries + + % Don't need to worry about makeindex special characters +\newglossaryentry{quote}{name={"}, +description={the double quote symbol}} + +\newglossaryentry{at}{name={@}, +description={the ``at'' symbol}} + +\newglossaryentry{excl}{name={!}, +description={the exclamation mark symbol}} + +\newglossaryentry{bar}{name={\ensuremath{|}}, +description={the vertical bar symbol}} + +\newglossaryentry{hash}{name={\#}, +description={the hash symbol}} + diff --git a/macros/latex/contrib/glossaries/samples/glossary-lipsum-examples.pdf b/macros/latex/contrib/glossaries/samples/glossary-lipsum-examples.pdf Binary files differnew file mode 100644 index 0000000000..e42dac1305 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/glossary-lipsum-examples.pdf diff --git a/macros/latex/contrib/glossaries/samples/glossary-lipsum-examples.tex b/macros/latex/contrib/glossaries/samples/glossary-lipsum-examples.tex new file mode 100644 index 0000000000..c8fa373feb --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/glossary-lipsum-examples.tex @@ -0,0 +1,221 @@ + % arara: pdflatex + % arara: makeglossaries + % arara: pdflatex + % arara: bibtex + % arara: pdflatex + % arara: pdflatex +\documentclass{report} + +\usepackage{graphicx} + +\usepackage[colorlinks]{hyperref} +\usepackage[savewrites,nopostdot,toc,acronym,symbols]{glossaries} +\usepackage{glossary-mcols} +\usepackage{glossary-longragged} + +\newglossary*{symbolname}{Entries with Symbols in the Name} +\newglossary*{long}{Long Descriptions} +\newglossary*{multipar}{Multi-Paragraph Descriptions} +\newglossary*{acronymdesc}{Acronyms with Descriptions} +\newglossary*{images}{Descriptions with Images} +\newglossary*{acronymslang}{Acronyms with Translations} + +\newglossary*{parent}{Hierarchical Entries} +\newglossary*{homographs}{Homographs} +\newglossary*{cites}{Entries with Citations} +\newglossary*{urls}{Entries with URLs} + +\DeclareAcronymList{acronymdesc,acronymslang} + +\makeglossaries + +\loadglsentries{example-glossaries-brief} +\loadglsentries[long]{example-glossaries-long} +\loadglsentries[multipar]{example-glossaries-multipar} +\loadglsentries[symbols]{example-glossaries-symbols} +\loadglsentries[symbolname]{example-glossaries-symbolnames} +\loadglsentries[images]{example-glossaries-images} +\loadglsentries[parent]{example-glossaries-parent} +\loadglsentries[homographs]{example-glossaries-childnoname} +\loadglsentries[cites]{example-glossaries-cite} +\loadglsentries[urls]{example-glossaries-url} + +\setacronymstyle{long-short} + +\loadglsentries[acronym]{example-glossaries-acronym} + +\setacronymstyle{long-short-desc} + +\loadglsentries[acronymdesc]{example-glossaries-acronym-desc} + + % define an acronym style for the acronyms with a translation: + +\newacronymstyle{acronymslang}% +{% + \GlsUseAcrEntryDispStyle{long-short}% +} +{% + \GlsUseAcrStyleDefs{short-long}% + \renewcommand*{\genacrfullformat}[2]{% + \glsentrylong{##1}##2\space + (\protect\firstacronymfont{\glsentryshort{##1}}% + \ifglshasfield{useri}{##1}% + {, English: \glsentryuseri{##1}}{})% + }% + \renewcommand*{\Genacrfullformat}[2]{% + \Glsentrylong{##1}##2\space + (\protect\firstacronymfont{\glsentryshort{##1}}% + \ifglshasfield{useri}{##1}% + {, English: \glsentryuseri{##1}}{})% + }% + \renewcommand*{\genplacrfullformat}[2]{% + \glsentrylongpl{##1}##2\space + (\protect\firstacronymfont{\glsentryshortpl{##1}}% + \ifglshasfield{useri}{##1}% + {, English: \glsentryuseri{##1}}{})% + }% + \renewcommand*{\Genplacrfullformat}[2]{% + \Glsentrylongpl{##1}##2\space + (\protect\firstacronymfont{\glsentryshortpl{##1}}% + \ifglshasfield{useri}{##1}% + {, English: \glsentryuseri{##1}}{})% + }% +} + +\setacronymstyle{acronymslang} + +\loadglsentries[acronymslang]{example-glossaries-acronyms-lang} + + % Define a style for the "images" glossary. The image names are + % stored in the user1 key. + % (The image insertion can probably be done more neatly using an + % appropriate package, but this is just a sample file.) + +\newsavebox\glsimagebox +\newlength\glswidth + +\newglossarystyle{images}% +{% + \setglossarystyle{tree}% + \renewenvironment{theglossary}{}{}% + \renewcommand{\glossentry}[2]{% + \ifglshasfield{useri}{##1}% + {\savebox + {\glsimagebox}% + {\includegraphics[height=4\baselineskip]{\glsentryuseri{##1}}}% + \settowidth{\glswidth}{\usebox\glsimagebox}% + \glswidth=\dimexpr\linewidth-\glswidth-1em\relax + \parshape=5 + 0pt \glswidth + 0pt \glswidth + 0pt \glswidth + 0pt \glswidth + 0pt \linewidth\relax + }% + {% + \savebox{\glsimagebox}{}% + }% + \noindent + \makebox[0pt][l]{% + \smash{\makebox[\linewidth][r]{\raisebox{-3\baselineskip}{\usebox\glsimagebox}}}}% + \glsentryitem{##1}\textbf{\glstarget{##1}{\glossentryname{##1}}}% + \space\glossentrydesc{##1}\par + \indexspace + }% + \renewcommand*{\glsgroupskip}{}% +} + + % glossary style for acronyms with a translation + +\newglossarystyle{acronymslang} +{% + \setglossarystyle{long}% + \renewcommand*{\glsgroupskip}{}% + \renewcommand{\glossentry}[2]{% + \glsentryitem{##1}\glstarget{##1}{\glossentryname{##1}} & + \glossentrydesc{##1}\glspostdescription + \ifglshasfield{useri}{##1}{ (English: \glsentryuseri{##1})}{}% + \space ##2\tabularnewline + }% +} + + % glossary style for the cites glossary + +\newglossarystyle{cites} +{% based on list style + \setglossarystyle{list}% + \renewcommand*{\glossentry}[2]{% + \item[\glsentryitem{##1}% + \glstarget{##1}{\glossentryname{##1}}] + \glossentrydesc{##1}\glspostdescription + \ifglshasfield{useri}{##1}{\space + % in the event of multiple cites (as in the vestibulum2 + % sample entry), \glsentryuseri{##1} needs to be expanded + % before being passed to \cite. + \glsletentryfield{\thiscite}{##1}{useri}% + (See \expandafter\cite\expandafter{\thiscite})}{}% + \space ##2}% +} + + % glossary style for the urls glossary + +\newglossarystyle{urls} +{% based on list style + \setglossarystyle{list}% + \renewcommand{\glossentry}[2]{% + \item[\glsentryitem{##1}% + \glstarget{##1}{\glossentryname{##1}}] + \glossentrydesc{##1}\glspostdescription\space##2% + \ifglshasfield{useri}{##1}{\glspar + \glsletentryfield{\thisurl}{##1}{useri}% + \expandafter\url\expandafter{\thisurl}}{}}% +} + +\begin{document} +\tableofcontents + +\chapter{Sample} + +This is a sample document that uses the dummy glossary entries +supplied with the glossaries bundle for testing. + +Here are all the entries (including acronyms): + +\forallglossaries{\thistype}{\section{Glossary `\thistype'} +\forglsentries[\thistype]{\thislabel}{\gls{\thislabel}. }} + +\section{Acronyms Revisited} + +Here are just the acronyms again: +\forallacronyms{\thistype}{\forglsentries[\thistype]{\thislabel}{\gls{\thislabel}. }} + +\printglossary[style=mcolindex,title={Brief Descriptions}] + +\printglossary[type=long,style=list] + +\printglossary[type=multipar,style=altlist] + +\printglossary[type=symbols,style=altlongragged4col,nogroupskip] + +\printglossary[type=symbolname,style=list,nogroupskip] + +\printglossary[type=acronym,style=long] + +\printglossary[type=acronymdesc,style=altlist] + +\printglossary[type=images,style=images] + +\printglossary[type=acronymslang,style=acronymslang] + +\printglossary[type=homographs,style=mcoltreenoname,subentrycounter] + +\printglossary[type=parent,style=tree] + +\printglossary[type=cites,style=cites,nopostdot=false,nogroupskip] + +\printglossary[type=urls,style=urls,nopostdot=false,nogroupskip] + +\bibliographystyle{plain} +\bibliography{xampl} + +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/minimalgls.pdf b/macros/latex/contrib/glossaries/samples/minimalgls.pdf Binary files differnew file mode 100644 index 0000000000..fc55ed5575 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/minimalgls.pdf diff --git a/macros/latex/contrib/glossaries/samples/minimalgls.tex b/macros/latex/contrib/glossaries/samples/minimalgls.tex new file mode 100644 index 0000000000..5053aa0a12 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/minimalgls.tex @@ -0,0 +1,87 @@ + % This file is public domain. + % + % This is a minimal file for testing and debugging + % the glossaries package. Change the class file as + % desired, and add the relevant package options to + % both the class file and the glossaries package. + % Change the sample glossary entry and acronym if + % required. If the problem occurs with an additional + % glossary, add in the relevant \newglossary command + % and a sample entry. + % + % Only add extra packages or commands if they + % contribute to whatever problem you are trying to + % test. + % + % Remember that the document will not be complete + % until you have successfully completed all of the + % following steps: + % 1. latex minimalgls + % 2. makeglossaries minimalgls (note no extension) + % 3. latex minimalgls + % A further run through LaTeX will be required to ensure that + % the table of contents is up to date if the toc option + % is used. + % Alternatively, if you use arara, you can add the following + % directives in your document: + % + % arara: pdflatex: { synctex: on } + % arara: makeglossaries + % arara: pdflatex: { synctex: on } + + % If you require multilingual support you must also install + % the appropriate glossaries language module. The language + % modules are distributed separately. + +\documentclass{article} +\listfiles + +\usepackage[colorlinks]{hyperref} + %\usepackage{glossaries} % abbreviation will go in main glossary + \usepackage[acronym]{glossaries} % make a separate list of acronyms + +\makeglossaries + +\longnewglossaryentry{par}{name={par}}% +{% + A long description with a paragraph break. + + This is the next paragraph. +} + +\newglossaryentry{sample}{name={sample}, +description={a sample entry}} + + % set the acronym style: +\setacronymstyle{long-short} + + % This contrived acronym has non-standard plural forms. + % These are specified in the optional argument. + % Remove the optional argument to revert to the default + % plurals. +\newacronym[\glsshortpluralkey=cas,\glslongpluralkey=contrived +acronyms]{aca}{aca}{a contrived acronym} + + % Keep all definitions in the preamble! + +\begin{document} + +A \gls{sample} entry and \gls{aca}. Second use: \gls{aca}. + +Plurals: \glspl{sample}. Reset acronym\glsreset{aca}. +First use: \glspl{aca}. Second use: \glspl{aca}. + +\glsresetall +First letter upper case: \Gls{sample}. First use: \Gls{aca}. +Subsequent use: \Gls{aca}. +\glsresetall +Plurals: \Glspl{sample}. First use: \Glspl{aca}. Next: \Glspl{aca}. + +If you want paragraph breaks in the description use +\verb|\longnewglossaryentry|, as with entry \gls{par}. + +Title case a particular field: +\glslink{sample}{\glsentrytitlecase{sample}{desc}}. + +\printglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/mwe-acr-desc.pdf b/macros/latex/contrib/glossaries/samples/mwe-acr-desc.pdf Binary files differnew file mode 100644 index 0000000000..7d39d828cb --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/mwe-acr-desc.pdf diff --git a/macros/latex/contrib/glossaries/samples/mwe-acr-desc.tex b/macros/latex/contrib/glossaries/samples/mwe-acr-desc.tex new file mode 100644 index 0000000000..1cb34e284f --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/mwe-acr-desc.tex @@ -0,0 +1,26 @@ + % This file is public domain + % If you want to use arara, you need the following directives: + % arara: pdflatex + % arara: makeglossaries + % arara: pdflatex +\documentclass{article} + +\usepackage{glossaries} + +\makeglossaries + +\setacronymstyle{short-long-desc} + +\newacronym[description={a device that emits a narrow beam of +light}]{laser}{laser}{light amplification by stimulated +emission of radiation} + +\begin{document} + +First use: \gls{laser}. + +Next use: \gls{laser} or \glspl{laser}. + +\printglossaries + +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/mwe-acr.pdf b/macros/latex/contrib/glossaries/samples/mwe-acr.pdf Binary files differnew file mode 100644 index 0000000000..0056b9f4af --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/mwe-acr.pdf diff --git a/macros/latex/contrib/glossaries/samples/mwe-acr.tex b/macros/latex/contrib/glossaries/samples/mwe-acr.tex new file mode 100644 index 0000000000..46b36dcc25 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/mwe-acr.tex @@ -0,0 +1,25 @@ + % This file is public domain + % If you want to use arara, you need the following directives: + % arara: pdflatex + % arara: makeglossaries + % arara: pdflatex +\documentclass{article} + +\usepackage{glossaries} + +\makeglossaries + +\setacronymstyle{long-short} + +\newacronym{laser}{laser}{light amplification by stimulated +emission of radiation} + +\begin{document} + +First use: \gls{laser}. + +Next use: \gls{laser} or \glspl{laser}. + +\printglossaries + +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/mwe-gls.pdf b/macros/latex/contrib/glossaries/samples/mwe-gls.pdf Binary files differnew file mode 100644 index 0000000000..4a1f8d2516 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/mwe-gls.pdf diff --git a/macros/latex/contrib/glossaries/samples/mwe-gls.tex b/macros/latex/contrib/glossaries/samples/mwe-gls.tex new file mode 100644 index 0000000000..9c5e7c6bc4 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/mwe-gls.tex @@ -0,0 +1,20 @@ + % This file is public domain + % If you want to use arara, you need the following directives: + % arara: pdflatex + % arara: makeglossaries + % arara: pdflatex +\documentclass{article} + +\usepackage{glossaries} + +\makeglossaries + +\newglossaryentry{apple}{name={apple},description={a fruit}} + +\begin{document} + +\Gls{apple} or \gls{apple} or \glspl{apple}. + +\printglossaries + +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/sample-FnDesc.pdf b/macros/latex/contrib/glossaries/samples/sample-FnDesc.pdf Binary files differnew file mode 100644 index 0000000000..00eaff2cf3 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-FnDesc.pdf diff --git a/macros/latex/contrib/glossaries/samples/sample-FnDesc.tex b/macros/latex/contrib/glossaries/samples/sample-FnDesc.tex new file mode 100644 index 0000000000..e4c5d87d3d --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-FnDesc.tex @@ -0,0 +1,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} diff --git a/macros/latex/contrib/glossaries/samples/sample-chap-hyperfirst.pdf b/macros/latex/contrib/glossaries/samples/sample-chap-hyperfirst.pdf Binary files differnew file mode 100644 index 0000000000..8ad12720ae --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-chap-hyperfirst.pdf diff --git a/macros/latex/contrib/glossaries/samples/sample-chap-hyperfirst.tex b/macros/latex/contrib/glossaries/samples/sample-chap-hyperfirst.tex new file mode 100644 index 0000000000..4e74e2e059 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-chap-hyperfirst.tex @@ -0,0 +1,59 @@ + % This file is public domain + % If you want to use arara, you need the following directives: + % arara: pdflatex + % arara: makeglossaries + % arara: pdflatex +\documentclass{report} + +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries} + +\makeglossaries + +\glsaddstoragekey{chapter}{0}{\glschapnum} + +\loadglsentries{example-glossaries-brief} + +\renewcommand*{\glslinkpostsetkeys}{% + \edef\currentchap{\arabic{chapter}}% + \ifnum\currentchap=\glschapnum{\glslabel}\relax + % Already used this entry in the current chapter, so switch + % off the hyperlink. + \setkeys{glslink}{hyper=false}% + \else + % Hasn't been used in the current chapter. Update the value + % of the "chapter" field unless the hyperlink has been switched + % off. + \glsifhyperon + {% + \glsfieldxdef{\glslabel}{chapter}{\currentchap}% + }% + {}% + \fi +} + +\begin{document} +\chapter{Sample} + +Use all entries: \forglsentries{\thislabel}{\gls{\thislabel}. } + +Use them again: \forglsentries{\thislabel}{\gls{\thislabel}. } + +\chapter{Another} + +Use all entries: \forglsentries{\thislabel}{\gls{\thislabel}. } + +Use them again: \forglsentries{\thislabel}{\gls{\thislabel}. } + +\chapter{Start with a Star} + +Use all entries but suppress hyperlink: +\forglsentries{\thislabel}{\gls*{\thislabel}. } + +Use all entries: \forglsentries{\thislabel}{\gls{\thislabel}. } + +Use them again: \forglsentries{\thislabel}{\gls{\thislabel}. } + +\printglossaries + +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/sample-crossref.pdf b/macros/latex/contrib/glossaries/samples/sample-crossref.pdf Binary files differnew file mode 100644 index 0000000000..1037320f51 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-crossref.pdf diff --git a/macros/latex/contrib/glossaries/samples/sample-crossref.tex b/macros/latex/contrib/glossaries/samples/sample-crossref.tex new file mode 100644 index 0000000000..8aaca674da --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-crossref.tex @@ -0,0 +1,36 @@ + % 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 } +\documentclass{article} + +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries} + +\makeglossaries + +\renewcommand{\glsseeitemformat}[1]{\textsc{\glsentryname{#1}}} + +\newglossaryentry{pear}{name=pear, +description={an oddly shaped fruit}} + +\newglossaryentry{apple}{name=apple, +description={firm, round fruit}, +see=[see also]{pear}} + +\newglossaryentry{banana}{name=banana, +description={a yellow fruit with an even odder shape than +a \gls{pear}}} + +\newglossaryentry{fruit}{name=fruit, +description={sweet, fleshy product of plant containing seed}} + +\glssee{fruit}{pear,apple,banana} + +\begin{document} +\gls{pear}, \gls{apple} and \gls{banana}. + +\printglossaries + +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/sample-custom-acronym.pdf b/macros/latex/contrib/glossaries/samples/sample-custom-acronym.pdf Binary files differnew file mode 100644 index 0000000000..f84073b018 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-custom-acronym.pdf diff --git a/macros/latex/contrib/glossaries/samples/sample-custom-acronym.tex b/macros/latex/contrib/glossaries/samples/sample-custom-acronym.tex new file mode 100644 index 0000000000..95b78a2773 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-custom-acronym.tex @@ -0,0 +1,152 @@ + % 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 } +\documentclass{report} + +\usepackage[colorlinks]{hyperref} +\usepackage[acronym,% create list of acronyms + % The package option "nomain" is used here to suppress the + % main glossary, since this example doesn't use it. If you + % want to use the main glossary, remove the "nomain" option. + nomain + ]{glossaries} + +\makeglossaries + + % This is a sample file to illustrate how to define a custom + % acronym style. This example defines the acronyms so that on first use + % they display the short form in the text and with the long form + % and description in a footnote. In the main body of the + % document the short form will be displayed in small caps, but in + % the list of acronyms the short form is displayed in normal + % capitals. To ensure this, the short form should be written in + % lower case when the acronym is defined, and \MakeTextUppercase is + % used when it's displayed in the list of acronyms. + +\newacronymstyle{custom-fn}% new style name +{% Check for long form in case of a mixed glossary + \ifglshaslong{\glslabel}{\glsgenacfmt}{\glsgenentryfmt}% +}% +{% Style definitions: + % User needs to supply the description: + \renewcommand*{\GenericAcronymFields}{}% + % Need to ensure hyperlinks are switched off on first use: + \glshyperfirstfalse + % Redefine the commands used by \glsgenacfmt on first use: + \renewcommand*{\genacrfullformat}[2]{% + \firstacronymfont{\glsentryshort{##1}}##2% + \footnote{\glsentrylong{##1}: \glsentrydesc{##1}}% + }% + \renewcommand*{\Genacrfullformat}[2]{% + \firstacronymfont{\Glsentryshort{##1}}##2% + \footnote{\glsentrylong{##1}: \glsentrydesc{##1}}% + }% + \renewcommand*{\genplacrfullformat}[2]{% + \firstacronymfont{\glsentryshortpl{##1}}##2% + \footnote{\glsentrylongpl{##1}: \glsentrydesc{##1}}% + }% + \renewcommand*{\Genplacrfullformat}[2]{% + \firstacronymfont{\Glsentryshortpl{##1}}##2% + \footnote{\glsentrylongpl{##1}: \glsentrydesc{##1}}% + }% + % Redefine the no-link full forms: + \renewcommand*{\glsentryfull}[1]{% + \glsentrylong{##1}\space(\acronymfont{\glsentryshort{##1}})% + }% + \renewcommand*{\Glsentryfull}[1]{% + \Glsentrylong{##1}\space(\acronymfont{\glsentryshort{##1}})% + }% + \renewcommand*{\glsentryfullpl}[1]{% + \glsentrylongpl{##1}\space(\acronymfont{\glsentryshortpl{##1}})% + }% + \renewcommand*{\Glsentryfullpl}[1]{% + \Glsentrylongpl{##1}\space(\acronymfont{\glsentryshortpl{##1}})% + }% + % Redefine the link full forms: + \renewcommand*{\acrfullfmt}[3]{% + \glslink[##1]{##2}{% + \glsentrylong{##2}##3\space(\acronymfont{\glsentryshort{##2}})% + }% + }% + \renewcommand*{\Acrfullfmt}[3]{% + \glslink[##1]{##2}{% + \Glsentrylong{##2}##3\space(\acronymfont{\glsentryshort{##2}})% + }% + }% + \renewcommand*{\ACRfullfmt}[3]{% + \glslink[##1]{##2}{% + \MakeTextUppercase{% + \glsentrylong{##2}##3\space + (\acronymfont{\glsentryshort{##2}})% + }% + }% + }% + \renewcommand*{\acrfullplfmt}[3]{% + \glslink[##1]{##2}{% + \glsentrylongpl{##2}##3\space + (\acronymfont{\glsentryshortpl{##2}})% + }% + }% + \renewcommand*{\Acrfullplfmt}[3]{% + \glslink[##1]{##2}{% + \Glsentrylongpl{##2}##3\space + (\acronymfont{\glsentryshortpl{##2}})% + }% + }% + \renewcommand*{\ACRfullplfmt}[3]{% + \glslink[##1]{##2}{% + \MakeTextUppercase{% + \glsentrylongpl{##2}##3\space + (\acronymfont{\glsentryshortpl{##2}})% + }% + }% + }% + % Use smallcaps for the acronym in the document text: + \renewcommand*{\acronymfont}[1]{\textsc{##1}}% + \renewcommand*{\acrpluralsuffix}{\glstextup{\glspluralsuffix}}% + % Sort acronyms according to the long form: + \renewcommand*{\acronymsort}[2]{##2}% + % Set the name in the list of acronyms to the long form followed by + % the short form (in upper case) in parentheses: + \renewcommand*{\acronymentry}[1]{% + \Glsentrylong{##1}\space(\MakeTextUppercase{\glsentryshort{##1}})}% +} + + % Now set the new acronym style (to override the default style) +\setacronymstyle{custom-fn} + + % Set an appropriate glossary style: +\setglossarystyle{altlist} + + % Now define the acronyms (must be done after setting the custom + % style) + +\newacronym[description={set of tags for use in developing hypertext +documents}]{html}{html}{hyper text markup language} + +\newacronym[description={language used to describe the layout of a +document written in a markup language}]{css}{css}{cascading style +sheet} + +\begin{document} + +\gls{css}. \gls{html}. + +\gls{css}. \gls{html}. + +No-link full forms: \glsentryfull{css}, \Glsentryfull{css}. +Linking full forms: \acrfull{css}, \Acrfull{css}, \ACRfull{css}. +Linking with insert: \acrfull{css}['s], \Acrfull{css}['s], +\ACRfull{css}['s]. + +Now test plurals. + +No-link full forms: \glsentryfullpl{html}, \Glsentryfullpl{html}. +Linking full forms: \acrfullpl{html}, \Acrfullpl{html}, \ACRfullpl{html}. +Linking with insert: \acrfullpl{html}['s], \Acrfullpl{html}['s], +\ACRfullpl{html}['s]. + +\printglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/sample-dot-abbr.pdf b/macros/latex/contrib/glossaries/samples/sample-dot-abbr.pdf Binary files differnew file mode 100644 index 0000000000..c5a28552ae --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-dot-abbr.pdf diff --git a/macros/latex/contrib/glossaries/samples/sample-dot-abbr.tex b/macros/latex/contrib/glossaries/samples/sample-dot-abbr.tex new file mode 100644 index 0000000000..094fcf76dd --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-dot-abbr.tex @@ -0,0 +1,92 @@ + % arara: pdflatex + % arara: makeglossaries + % arara: pdflatex +\documentclass{article} + +\usepackage{glossaries} + +\makeglossaries + +\glsaddstoragekey{abbrtype}{word}{\abbrtype} + +\setacronymstyle{long-short} + +\newcommand*{\newabbr}[1][]{% + \newacronym[abbrtype=initials,#1]} + +\newabbr{eg}{e.g.}{exempli gratia} +\newabbr{ie}{i.e.}{id est} +\newabbr{bsc}{B.Sc.}{Bachelor of Science} +\newabbr{ba}{B.A.}{Bachelor of Arts} +\newabbr{agm}{A.G.M.}{annual general meeting} + +\newacronym{laser}{laser}{light amplification by stimulated +emission of radiation} + + % See the sample-initialisms.tex example file provided with + % glossaries-extra.sty for a better way of doing this. + +\makeatletter +\renewcommand{\glspostlinkhook}{% + \ifglsfieldeq{\glslabel}{abbrtype}{initials}% + {\new@ifnextchar.\doendsentence\doendword} + {}% +} +\makeatother + +\newcommand{\doendsentence}[1]{\spacefactor=10000{}} +\newcommand{\doendword}{\spacefactor=1000{}} + +\begin{document} +This is a sample document that illustrates abbreviations with +full stops (periods) and abbreviations that are words (i.e.\ +acronyms). The examples switch to a typewriter font to make it +easier to see the inter-word and inter-sentence spaces. + +The extension package glossaries-extra.sty provides a better way of +doing this. + +First use: \gls{laser} \gls{eg} \gls{ie} \gls{bsc} \gls{ba} \gls{agm} end of +sentence. + +End of sentence use: + +\ttfamily + +\gls{laser}. \gls{eg}. \gls{ie}. \gls{bsc}. \gls{ba}. \gls{agm}. +Done. + +laser. e.g. i.e. B.Sc. B.A\@. A.G.M\@. Done. + +\rmfamily + +Mid-sentence use: + +\ttfamily + +\gls{laser} \gls{eg} \gls{ie} \gls{bsc} \gls{ba} \gls{agm} Done. + +laser e.g.\ i.e.\ B.Sc.\ B.A. A.G.M. Done. + +\rmfamily + +Check other sentence terminators: + +\ttfamily + +\gls{laser}? \gls{eg}? \gls{ie}? \gls{bsc}! \gls{ba}! \gls{agm}? Done. + +laser? e.g.? i.e.? B.Sc.! B.A.! A.G.M.? Done. + +\rmfamily + +\glsresetall Reset. End of sentence use: + +\ttfamily + +\gls{laser}. \gls{eg}. \gls{ie}. \gls{bsc}. \gls{ba}. \gls{agm}. +Done. + +\rmfamily +\printglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/sample-dual.pdf b/macros/latex/contrib/glossaries/samples/sample-dual.pdf Binary files differnew file mode 100644 index 0000000000..a2061a2b9b --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-dual.pdf diff --git a/macros/latex/contrib/glossaries/samples/sample-dual.tex b/macros/latex/contrib/glossaries/samples/sample-dual.tex new file mode 100644 index 0000000000..0015f9385a --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-dual.tex @@ -0,0 +1,33 @@ + % 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 } +\documentclass{article} + +\usepackage[acronym]{glossaries} + + % \newdualentry[main options]{label}{short}{long}{description} + +\newcommand*{\newdualentry}[5][]{% + \newglossaryentry{main-#2}{name={#4},% + text={#3\glsadd{#2}},% + description={#5},% + #1 + }% + \newacronym{#2}{#3\glsadd{main-#2}}{#4} +} + +\newdualentry{svm}% label + {SVM}% abbreviation + {support vector machine}% long form + {Statistical pattern recognition technique}% description + +\makeglossaries + +\begin{document} + +\gls{svm}. + +\printglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/sample-entrycount.pdf b/macros/latex/contrib/glossaries/samples/sample-entrycount.pdf Binary files differnew file mode 100644 index 0000000000..af2438de51 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-entrycount.pdf diff --git a/macros/latex/contrib/glossaries/samples/sample-entrycount.tex b/macros/latex/contrib/glossaries/samples/sample-entrycount.tex new file mode 100644 index 0000000000..01f331440c --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-entrycount.tex @@ -0,0 +1,35 @@ + % This file is public domain + % If you want to use arara, you need the following directives: + % arara: pdflatex: { synctex: on } + % arara: pdflatex: { synctex: on } + % arara: makeglossaries + % arara: pdflatex: { synctex: on } +\documentclass{article} + +\usepackage[colorlinks]{hyperref} +\usepackage + [nomain,% 'nomain' is used to suppress the main glossary + acronym% 'acronym' is used to create the 'acronym' glossary + ] + {glossaries} +\makeglossaries + +\glsenableentrycount + +\setacronymstyle{long-short} + +\newacronym{html}{HTML}{hypertext markup language} +\newacronym{css}{CSS}{cascading style sheets} +\newacronym{xml}{XML}{extensible markup language} +\newacronym{sql}{SQL}{structured query language} +\newacronym{rdbms}{RDBMS}{relational database management system} +\newacronym{rdsms}{RDSMS}{relational data stream management system} + +\begin{document} +These entries are only used once: \cgls{sql}, \cgls{rdbms}, +\cgls{xml}. These entries are used multiple times: +\cgls{html}, \cgls{html}, \cgls{css}, \cgls{css}, \cgls{css}, +\cgls{rdsms}, \cgls{rdsms}. + +\printglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/sample-entryfmt.pdf b/macros/latex/contrib/glossaries/samples/sample-entryfmt.pdf Binary files differnew file mode 100644 index 0000000000..407ea6961f --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-entryfmt.pdf diff --git a/macros/latex/contrib/glossaries/samples/sample-entryfmt.tex b/macros/latex/contrib/glossaries/samples/sample-entryfmt.tex new file mode 100644 index 0000000000..a057805db1 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-entryfmt.tex @@ -0,0 +1,28 @@ + % 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 } +\documentclass{article} + +\usepackage[colorlinks]{hyperref} +\usepackage[style=tree]{glossaries} + +\makeglossaries + +\renewcommand*{\glsentryfmt}{% + \glsgenentryfmt + \ifglsused{\glslabel}{}{\space (\glsentrysymbol{\glslabel})}% +} + +\newglossaryentry{distance}{name=distance, +description={The length between two points}, +symbol={km}} + +\begin{document} + +First use: \gls{distance}. Next use: \gls{distance}. + +\printglossaries + +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/sample-font-abbr.pdf b/macros/latex/contrib/glossaries/samples/sample-font-abbr.pdf Binary files differnew file mode 100644 index 0000000000..8a9ee959e1 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-font-abbr.pdf diff --git a/macros/latex/contrib/glossaries/samples/sample-font-abbr.tex b/macros/latex/contrib/glossaries/samples/sample-font-abbr.tex new file mode 100644 index 0000000000..c7b04e192b --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-font-abbr.tex @@ -0,0 +1,63 @@ + % arara: pdflatex + % arara: makeglossaries + % arara: pdflatex +\documentclass{article} + +\usepackage{glossaries} + +\makeglossaries + +\glsaddstoragekey{font}{}{\entryfont} + +\newacronymstyle{long-font-short} +{% + \GlsUseAcrEntryDispStyle{long-short}% +} +{% + \GlsUseAcrStyleDefs{long-short}% + \renewcommand*{\genacrfullformat}[2]{% + \glsentrylong{##1}##2\space + ({\entryfont{##1}\glsentryshort{##1}})% + }% + \renewcommand*{\Genacrfullformat}[2]{% + \Glsentrylong{##1}##2\space + ({\entryfont{##1}\glsentryshort{##1}})% + }% + \renewcommand*{\genplacrfullformat}[2]{% + \glsentrylongpl{##1}##2\space + ({\entryfont{##1}\glsentryshortpl{##1}})% + }% + \renewcommand*{\Genplacrfullformat}[2]{% + \Glsentrylongpl{##1}##2\space + ({\entryfont{##1}\glsentryshortpl{##1}})% + }% + \renewcommand*{\acronymfont}[1]{{\entryfont{\glslabel}##1}}% + \renewcommand*{\acronymentry}[1]{{\entryfont{##1}\glsentryshort{##1}}}% +} + +\setacronymstyle{long-font-short} + +\newcommand*{\newitabbr}[1][]{\newacronym[font=\em,#1]} +\newcommand*{\newupabbr}[1][]{\newacronym[#1]} + +\newitabbr{eg}{e.g.}{exempli gratia} +\newitabbr{ie}{i.e.}{id est} + +\newupabbr{bsc}{BSc}{Bachelor of Science} +\newupabbr{ba}{BA}{Bachelor of Arts} +\newupabbr{agm}{AGM}{annual general meeting} + +\begin{document} + +First use: \gls{eg} \gls{ie} \gls{bsc} \gls{ba} \gls{agm}. + +Next use: \gls{eg} \gls{ie} \gls{bsc} \gls{ba} \gls{agm}. + +Short: \acrshort{eg} \acrshort{ie} \acrshort{bsc} \acrshort{ba} +\acrshort{agm}. + +Full: \acrfull{eg} \acrfull{ie} \acrfull{bsc} \acrfull{ba} +\acrfull{agm}. + +\printglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/sample-ignored.pdf b/macros/latex/contrib/glossaries/samples/sample-ignored.pdf Binary files differnew file mode 100644 index 0000000000..23bf60a938 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-ignored.pdf diff --git a/macros/latex/contrib/glossaries/samples/sample-ignored.tex b/macros/latex/contrib/glossaries/samples/sample-ignored.tex new file mode 100644 index 0000000000..090c755c95 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-ignored.tex @@ -0,0 +1,25 @@ + % 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 } +\documentclass{article} + +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries} + +\newignoredglossary{common} + +\makeglossaries + +\newglossaryentry{sample}{name={sample},description={an example}} + +\newglossaryentry{commonex}{type=common,name={common term}} + +\begin{document} + +\gls{sample}. \gls{commonex}. + +\printglossaries + +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/sample-index.pdf b/macros/latex/contrib/glossaries/samples/sample-index.pdf Binary files differnew file mode 100644 index 0000000000..80f293a51b --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-index.pdf diff --git a/macros/latex/contrib/glossaries/samples/sample-index.tex b/macros/latex/contrib/glossaries/samples/sample-index.tex new file mode 100644 index 0000000000..1f2441dbed --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-index.tex @@ -0,0 +1,61 @@ + % 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,index,nohypertypes={index}]{glossaries} +\usepackage{glossary-mcols} + +\makeglossaries + + % define terms for the index + +\newterm[plural={stegosauruses}]{stegosaurus} +\newterm[plural={triceratopses}]{triceratops} +\newterm[plural={apatosauruses}]{apatosaurus} + + % To avoid labels conflicting with the same name in the main glossary + % prefix the index label with "ind-". (This means that the name must + % be set independently.) +\newterm[name={dinosaur}]{ind-dinosaur} +\newterm[name={Triassic}]{ind-triassic} + + % define terms for the main glossary + +\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}. + +Indexed term: \gls{ind-dinosaur}. + +\renewcommand*{\glsnamefont}[1]{\textbf{\makefirstuc{#1}}} + +\printglossary[style=long,nogroupskip] + +\renewcommand*{\glsnamefont}[1]{\textmd{#1}} + +\printindex[style=mcolindexgroup] + +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/sample-inline.pdf b/macros/latex/contrib/glossaries/samples/sample-inline.pdf Binary files differnew file mode 100644 index 0000000000..b6050b20cc --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-inline.pdf diff --git a/macros/latex/contrib/glossaries/samples/sample-inline.tex b/macros/latex/contrib/glossaries/samples/sample-inline.tex new file mode 100644 index 0000000000..08a4198aa5 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-inline.tex @@ -0,0 +1,146 @@ + % 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: pdflatex: { synctex: on } +\documentclass[a4paper]{report} + +\usepackage[plainpages=false,colorlinks]{hyperref} +\usepackage[toc,order=word,subentrycounter]{glossaries} + +\usepackage{glossary-inline} + +\renewcommand*{\glossarysection}[2][]{\textbf{#1}: } +\renewcommand{\glsnamefont}[1]{\textsc{#1}} +\setglossarystyle{inline} + +\makeglossaries + +\newglossaryentry{Perl}{name=\texttt{Perl}, +sort=Perl, % need a sort key because name contains a command +description=A scripting language} + +\newglossaryentry{glossary}{name=glossary, +description={\nopostdesc}, +plural={glossaries}} + +\newglossaryentry{glossarycol}{ +description={collection of glosses}, +sort={2}, +parent={glossary}} + +\newglossaryentry{glossarylist}{ +description={list of technical words}, +sort={1}, +parent={glossary}} + +\newglossaryentry{pagelist}{name=page list, + % description value has to be enclosed in braces + % because it contains commas +description={a list of individual pages or page ranges +(e.g.\ 1,2,4,7-9)}} + +\newglossaryentry{mtrx}{name=matrix, +description={rectangular array of quantities}, + % plural is not simply obtained by appending an s, so specify +plural=matrices} + + % entry with a paragraph break in the description + +\newglossaryentry{par}{name=paragraph, +description={distinct section of piece of +writing. Beginning on new, usually indented, line}} + + % entry with two types of plural. Set the plural form to the + % form most likely to be used. If you want to use a different + % plural, you will need to explicity specify it in \glslink +\newglossaryentry{cow}{name=cow, + % this isn't necessary, as this form (appending an s) is + % the default +plural=cows, + % description: +description={(\emph{pl.}\ cows, \emph{archaic} kine) an adult +female of any bovine animal}} + +\newglossaryentry{bravo}{name={bravo}, +description={\nopostdesc}} + +\newglossaryentry{bravo1}{description={cry of approval (pl.\ bravos)}, +sort={1}, +plural={bravos}, +parent=bravo} + +\newglossaryentry{bravo2}{description={hired ruffian or killer (pl.\ bravoes)}, +sort={2}, +plural={bravoes}, +parent=bravo} + +\newglossaryentry{seal}{name=seal,description={sea mammal with +flippers that eats fish}} + +\newglossaryentry{sealion}{name={sea lion}, +description={large seal}} + +\begin{document} + +\title{Sample Document Using glossary Package} +\author{Nicola Talbot} +\pagenumbering{alph}% prevent duplicate page link names if using PDF +\maketitle + +\pagenumbering{roman} +\tableofcontents + +\chapter{Introduction} +\pagenumbering{arabic} + +This document has a glossary in a footnote\footnote{\printglossaries}. + +A \gls{glossarylist} (definition~\glsrefentry{glossarylist}) is a +very useful addition to any technical document, although a +\gls{glossarycol} (definition~\glsrefentry{glossarycol}) can also +simply be a collection of glosses, which is another thing entirely. +Some documents have multiple \glspl{glossarylist}. + +Once you have run your document through \LaTeX, you +will then need to run the \texttt{.glo} file through +\texttt{makeindex}. You will need to set the output +file so that it creates a \texttt{.gls} file instead +of an \texttt{.ind} file, and change the name of +the log file so that it doesn't overwrite the index +log file (if you have an index for your document). +Rather than having to remember all the command line +switches, you can call the \gls{Perl} script +\texttt{makeglossaries} which provides a convenient +wrapper. + +If a comma appears within the name or description, grouping +must be used, e.g.\ in the description of \gls{pagelist}. + +\chapter{Plurals and Paragraphs} + +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|. +\Glspl{seal} and \glspl{sealion} have regular plural forms. + +\Gls{bravo} is a homograph, but the plural forms are spelt +differently. The plural of \gls{bravo1}, a cry of approval +(definition~\glsrefentry{bravo1}), is \glspl{bravo1}, whereas the +plural of \gls{bravo2}, a hired ruffian or killer +(definition~\glsrefentry{bravo2}), is \glspl{bravo2}. + +\Glspl{par} can cause a problem in commands, so care is needed +when having a paragraph break in a \gls{glossarylist} entry. + +\chapter{Ordering} + +There are two types of ordering: word ordering (which places +``\gls{sealion}'' before ``\gls{seal}'') and letter ordering +(which places ``\gls{seal}'' before ``\gls{sealion}''). + +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/sample-langdict.pdf b/macros/latex/contrib/glossaries/samples/sample-langdict.pdf Binary files differnew file mode 100644 index 0000000000..300afc33cf --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-langdict.pdf diff --git a/macros/latex/contrib/glossaries/samples/sample-langdict.tex b/macros/latex/contrib/glossaries/samples/sample-langdict.tex new file mode 100644 index 0000000000..5c1484c93e --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-langdict.tex @@ -0,0 +1,46 @@ + % 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 } + + % This file also requires the glossaries-english + % and glossaries-french language modules. These must + % be installed in addition to installing the glossaries package. +\documentclass[english,french]{article} + +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage{babel} + % The package option "nomain" is used here to suppress the + % main glossary, since this example doesn't use it. If you + % want to use the main glossary, remove the "nomain" option. +\usepackage[nomain]{glossaries} + +\newglossary[glg]{english}{gls}{glo}{English to French} +\newglossary[flg]{french}{flx}{flo}{French to English} + +\makeglossaries + + % \newword{label}{english}{determiner}{french} +\newcommand*{\newword}[4]{% + \newglossaryentry{en-#1}{type=english,name={#2},description={#3 #4}}% + \newglossaryentry{fr-#1}{type=french,name={#3 #4},text={#4},sort={#4},description={#2}}% +} + +\newword{cat}{cat}{le}{chat} +\newword{mat}{mat}{la}{natte} + +\begin{document} +\selectlanguage{english} +The \gls{en-cat} sat on the \gls{en-mat}. + +\selectlanguage{french} +Le \gls{fr-cat} s'est repos\'e sur la \gls{fr-mat}. + +\selectlanguage{english} +\printglossary[type=english] + +\selectlanguage{french} +\printglossary[type=french] +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/sample-newkeys.pdf b/macros/latex/contrib/glossaries/samples/sample-newkeys.pdf Binary files differnew file mode 100644 index 0000000000..300767a45d --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-newkeys.pdf diff --git a/macros/latex/contrib/glossaries/samples/sample-newkeys.tex b/macros/latex/contrib/glossaries/samples/sample-newkeys.tex new file mode 100644 index 0000000000..323b28665c --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-newkeys.tex @@ -0,0 +1,64 @@ + % 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{article} + +\usepackage[colorlinks]{hyperref} +\usepackage[nopostdot,nogroupskip]{glossaries} + +\glsaddkey*% star version needed as default value needs expanding + {ed}% key + {\glsentrytext{\glslabel}ed}% default value + {\glsentryed}% command analogous to \glsentrytext + {\Glsentryed}% command analogous to \Glsentrytext + {\glsed}% command analogous to \glstext + {\Glsed}% command analogous to \Glstext + {\GLSed}% command analogous to \GLStext + +\glsaddkey* + {ing}% key + {\glsentrytext{\glslabel}ing}% default value + {\glsentrying}% command analogous to \glsentrytext + {\Glsentrying}% command analogous to \Glsentrytext + {\glsing}% command analogous to \glstext + {\Glsing}% command analogous to \Glstext + {\GLSing}% command analogous to \GLStext + +\makeglossaries + +\newglossaryentry{jump}{name={jump},description={}} + +\newglossaryentry{run}{name={run},% + ed={ran},% + ing={running}, + description={}} + +\newglossaryentry{waddle}{name={waddle},% + ed={waddled},% + ing={waddling},% + description={}} + +\begin{document} + +This is a sample document illustrating how to add new glossary entry +keys. + +The dog \glsed{jump} over the duck. + +The duck was \glsing{waddle} round the dog. + +The dog \glsed{run} away from the duck. + +First letter uppercase: \Glsed{jump}, \Glsing{jump}, +\Glsed{waddle}, \Glsing{waddle}, +\Glsed{run}, \Glsing{run}. + +All uppercase: \GLSed{jump}, \GLSing{jump}, +\GLSed{waddle}, \GLSing{waddle}, +\GLSed{run}, \GLSing{run}. + +\printglossaries + +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/sample-noidxapp-utf8.pdf b/macros/latex/contrib/glossaries/samples/sample-noidxapp-utf8.pdf Binary files differnew file mode 100644 index 0000000000..7a922cd6ea --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-noidxapp-utf8.pdf diff --git a/macros/latex/contrib/glossaries/samples/sample-noidxapp-utf8.tex b/macros/latex/contrib/glossaries/samples/sample-noidxapp-utf8.tex new file mode 100644 index 0000000000..e8d2bfb8b6 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-noidxapp-utf8.tex @@ -0,0 +1,148 @@ + % This file is public domain + % If you want to use arara, you need the following directives: + % arara: pdflatex + % arara: pdflatex +\documentclass{report} + +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} + +\usepackage[colorlinks]{hyperref} +\usepackage[index,symbols,nohypertypes={index}]{glossaries} +\usepackage{glossary-mcols} + +\makenoidxglossaries + +\renewcommand{\theHequation}{\theequation} + + % main entries + +\newglossaryentry{elite}{% + name={{é}lite}, + description={select group of people} +} + +\newglossaryentry{elephant}{% + name={elephant}, + description={very large mammal with tusks} +} + +\newglossaryentry{elk}{% + name={elk}, + description={large northern deer} +} + +\newglossaryentry{emigre}{% + name={{é}migré}, + description={person who has emigrated to another country, + especially for political reasons} +} + + % Symbols + +\newglossaryentry{set}{% + type=symbols, + name={$\mathcal{S}$}, + text={\mathcal{S}}, + sort={S}, + description={A set}} + +\newglossaryentry{U}{% + type=symbols, + name={$\mathcal{U}$}, + text={\mathcal{U}}, + sort={U}, + description={The universal set}} + +\newglossaryentry{card}{% + type=symbols, + name={$|\glsentrytext{set}|$}, + text={|\glsentrytext{set}|}, + sort={|}, + description={cardinality of $\gls{set}$}} + +\newglossaryentry{factorial}{% + type=symbols, + name={$!$}, + text={!}, + sort={!}, + description={factorial}} + + % index entries + +\newterm{seal} + +\newterm{dinosaur} + +\newterm[parent=dinosaur]{ceratopsidae} + +\newterm[parent=dinosaur,plural={stegosauruses}]{stegosaurus} +\newterm[parent=ceratopsidae,plural={triceratopses}]{triceratops} +\newterm[parent=ceratopsidae,plural={styracosauruses}]{styracosaurus} +\newterm[parent=dinosaur,plural={apatosauruses}]{apatosaurus} + +\newterm{Triassic} + +\newterm{Devonian} + +\newterm[see={[see also]seal}]{sea lion} + +\begin{document} + +\chapter{Mathematical Notation} + +The cardinality of a set $\gls{set}$ is denoted $\gls{card}$ +The $\gls{factorial}$ symbol indicates factorial. +$\gls{U}$ is the universal set. + +\glsaddall[types=main] + +\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{styracosaurus}, the \gls{apatosaurus} and the \gls{stegosaurus}. + +\Glspl{seal} and \glspl{sea lion} are marine mammals. +The \gls{Devonian} period was the age of fish. + +\glsaddall[types=main] + +\chapter{Location Lists} + +Dinosaur: \glsdisplaynumberlist{dinosaur}. + +Set: \glsdisplaynumberlist{set}. + +\Gls{elite}: \glsdisplaynumberlist{elite}. + +\begin{equation} +3\gls[counter=equation]{factorial} = 3 \times 2 \times 1 +\end{equation} + +\newcommand{\myhandler}[4]{% + Prefix: #1. + Counter: #2. + Format: #3. + Value: #4. + Link: \setentrycounter[#1]{#2}% + \csuse{#3}{#4}. + \par +} +\newcommand{\myxrhandler}[2][]{XR (#1): #2. } + +Factorial locations: +\glsnumberlistloop{factorial}{\myhandler}{\myxrhandler} + +Sea lion locations: +\glsnumberlistloop{sea lion}{\myhandler}{\myxrhandler} + +\printnoidxglossary[type=main,sort=word] + +\printnoidxglossary[type=symbols,sort=use] + +\renewcommand*{\glsnamefont}[1]{\textmd{#1}} + +\printnoidxglossary[type=index,style=mcolindexgroup,sort=word] + +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/sample-noidxapp.pdf b/macros/latex/contrib/glossaries/samples/sample-noidxapp.pdf Binary files differnew file mode 100644 index 0000000000..9ed8e6191a --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-noidxapp.pdf diff --git a/macros/latex/contrib/glossaries/samples/sample-noidxapp.tex b/macros/latex/contrib/glossaries/samples/sample-noidxapp.tex new file mode 100644 index 0000000000..d2891729d3 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-noidxapp.tex @@ -0,0 +1,145 @@ + % This file is public domain + % If you want to use arara, you need the following directives: + % arara: pdflatex + % arara: pdflatex +\documentclass{report} + +\usepackage[colorlinks]{hyperref} +\usepackage[index,symbols,nohypertypes={index}]{glossaries} +\usepackage{glossary-mcols} + +\makenoidxglossaries + +\renewcommand{\theHequation}{\theequation} + + % main entries + +\newglossaryentry{elite}{% + name={{\'e}lite}, + description={select group of people} +} + +\newglossaryentry{elephant}{% + name={elephant}, + description={very large mammal with tusks} +} + +\newglossaryentry{elk}{% + name={elk}, + description={large northern deer} +} + +\newglossaryentry{emigre}{% + name={{\'e}migr\'e}, + description={person who has emigrated to another country, + especially for political reasons} +} + + % Symbols + +\newglossaryentry{set}{% + type=symbols, + name={$\mathcal{S}$}, + text={\mathcal{S}}, + sort={S}, + description={A set}} + +\newglossaryentry{U}{% + type=symbols, + name={$\mathcal{U}$}, + text={\mathcal{U}}, + sort={U}, + description={The universal set}} + +\newglossaryentry{card}{% + type=symbols, + name={$|\glsentrytext{set}|$}, + text={|\glsentrytext{set}|}, + sort={|}, + description={cardinality of $\gls{set}$}} + +\newglossaryentry{factorial}{% + type=symbols, + name={$!$}, + text={!}, + sort={!}, + description={factorial}} + + % index entries + +\newterm{seal} + +\newterm{dinosaur} + +\newterm[parent=dinosaur]{ceratopsidae} + +\newterm[parent=dinosaur,plural={stegosauruses}]{stegosaurus} +\newterm[parent=ceratopsidae,plural={triceratopses}]{triceratops} +\newterm[parent=ceratopsidae,plural={styracosauruses}]{styracosaurus} +\newterm[parent=dinosaur,plural={apatosauruses}]{apatosaurus} + +\newterm{Triassic} + +\newterm{Devonian} + +\newterm[see={[see also]seal}]{sea lion} + +\begin{document} + +\chapter{Mathematical Notation} + +The cardinality of a set $\gls{set}$ is denoted $\gls{card}$ +The $\gls{factorial}$ symbol indicates factorial. +$\gls{U}$ is the universal set. + +\glsaddall[types=main] + +\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{styracosaurus}, the \gls{apatosaurus} and the \gls{stegosaurus}. + +\Glspl{seal} and \glspl{sea lion} are marine mammals. +The \gls{Devonian} period was the age of fish. + +\glsaddall[types=main] + +\chapter{Location Lists} + +Dinosaur: \glsdisplaynumberlist{dinosaur}. + +Set: \glsdisplaynumberlist{set}. + +\Gls{elite}: \glsdisplaynumberlist{elite}. + +\begin{equation} +3\gls[counter=equation]{factorial} = 3 \times 2 \times 1 +\end{equation} + +\newcommand{\myhandler}[4]{% + Prefix: #1. + Counter: #2. + Format: #3. + Value: #4. + Link: \setentrycounter[#1]{#2}% + \csuse{#3}{#4}. + \par +} +\newcommand{\myxrhandler}[2][]{XR (#1): #2. } + +Factorial locations: +\glsnumberlistloop{factorial}{\myhandler}{\myxrhandler} + +Sea lion locations: +\glsnumberlistloop{sea lion}{\myhandler}{\myxrhandler} + +\printnoidxglossary[type=main,sort=word] + +\printnoidxglossary[type=symbols,sort=use] + +\renewcommand*{\glsnamefont}[1]{\textmd{#1}} + +\printnoidxglossary[type=index,style=mcolindexgroup,sort=letter] + +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/sample-nomathhyper.pdf b/macros/latex/contrib/glossaries/samples/sample-nomathhyper.pdf Binary files differnew file mode 100644 index 0000000000..68f48c57ab --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-nomathhyper.pdf diff --git a/macros/latex/contrib/glossaries/samples/sample-nomathhyper.tex b/macros/latex/contrib/glossaries/samples/sample-nomathhyper.tex new file mode 100644 index 0000000000..16cc511eee --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-nomathhyper.tex @@ -0,0 +1,42 @@ + % 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 } +\documentclass{report} + +\usepackage[colorlinks]{hyperref} +\usepackage{glossaries} + +\GlsDeclareNoHyperList{main} + +\makeglossaries + + % redefine \glsentryfmt so that it adds a hyperlink + % if not in math mode and the hyperlinks haven't been forced on +\renewcommand*{\glsentryfmt}{% + \ifmmode + \glsgenentryfmt + \else + \glsifhyperon + {\glsgenentryfmt}% hyperlink already on + {\glshyperlink[\glsgenentryfmt]{\glslabel}}% + \fi +} + + % define a sample entry: +\newglossaryentry{x}{name={x},description={sample entry}} + +\begin{document} +\chapter{Sample} +In text mode: \gls{x}. Inline maths: $\gls{x}$. Displayed +maths: +\[ + \gls{x} +\] + +Back to text mode again: \gls{x}. Don't check the first use flag: +\glstext{x}. Force on the hyperlink: \glstext+{x}. + +\printglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/sample-numberlist.pdf b/macros/latex/contrib/glossaries/samples/sample-numberlist.pdf Binary files differnew file mode 100644 index 0000000000..b9a77de1ad --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-numberlist.pdf diff --git a/macros/latex/contrib/glossaries/samples/sample-numberlist.tex b/macros/latex/contrib/glossaries/samples/sample-numberlist.tex new file mode 100644 index 0000000000..24b93edb49 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-numberlist.tex @@ -0,0 +1,40 @@ + % 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: pdflatex: { synctex: on } +\documentclass{report} + +\usepackage[colorlinks]{hyperref} +\usepackage[savenumberlist,counter=chapter]{glossaries} + +\makeglossaries + +\newglossaryentry{sample}{name=sample,description=an example} + +\begin{document} +\chapter{Introduction} + +This is a \glsentryname{sample} document. \Glsentryplural{sample} +are discussed in chapters~\glsdisplaynumberlist{sample}. + +\chapter{Sample Documents} + +\Gls{sample} documents are provided for testing and illustration +purposes. + +\chapter{More About Samples} + +Here's more information about \glspl{sample}. + +\chapter{Another chapter} + +A chapter about something else. + +\chapter{Another About Samples} + +Here's some more information about \glspl{sample}. + +\printglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/sample-prefix.pdf b/macros/latex/contrib/glossaries/samples/sample-prefix.pdf Binary files differnew file mode 100644 index 0000000000..661bdee4eb --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-prefix.pdf diff --git a/macros/latex/contrib/glossaries/samples/sample-prefix.tex b/macros/latex/contrib/glossaries/samples/sample-prefix.tex new file mode 100644 index 0000000000..ab1260cc72 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-prefix.tex @@ -0,0 +1,73 @@ + % 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: pdflatex: { synctex: on } + +\documentclass{article} + +\usepackage[colorlinks]{hyperref} +\usepackage[toc,acronym]{glossaries-prefix} + +\makeglossaries + +\newglossaryentry{sample}{name={sample}, + description={an example}, + prefix={a~}, + prefixplural={the\space}% +} + +\newglossaryentry{oeil}{name={oeil}, + plural={yeux}, + description={eye}, + prefix={l'}, + prefixplural={les\space}} + +\newacronym + [% + prefix={an\space},prefixfirst={a~}% + ]{svm}{SVM}{support vector machine} + +\newglossarystyle{plist}{% + \setglossarystyle{list}% + \renewcommand*{\glossentry}[2]{% + \item[\glsentryitem{##1}% + \Glsentryprefix{##1}% + \glstarget{##1}{\glossentryname{##1}}] + \glossentrydesc{##1}\glspostdescription\space ##2}% +} + +\begin{document} + +\tableofcontents + +\section{Sample} + +First use: \pgls{sample}, \pgls{svm}, \pgls{oeil}. Next use: \pgls{sample}, \pgls{svm}, \pgls{oeil}. + +Reset. \glsresetall + +First use: \pglspl{sample}, \pglspl{svm}, \pglspl{oeil}. Next use: +\pglspl{sample}, \pglspl{svm}, \pglspl{oeil}. + +Reset. \glsresetall + +First use: \Pgls{sample}, \Pgls{svm}. Next use: \Pgls{sample}, \Pgls{svm}. + +Reset. \glsresetall + +First use: \Pglspl{sample}, \Pglspl{svm}. Next use: \Pglspl{sample}, \Pglspl{svm}. + +Reset. \glsresetall + +First use: \PGLS{sample}, \PGLS{svm}. Next use: \PGLS{sample}, \PGLS{svm}. + +Reset. \glsresetall + +First use: \PGLSpl{sample}, \PGLSpl{svm}. Next use: \PGLSpl{sample}, \PGLSpl{svm}. + +\printglossary[style=plist] + +\printacronyms +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/sample-si.pdf b/macros/latex/contrib/glossaries/samples/sample-si.pdf Binary files differnew file mode 100644 index 0000000000..f8214a62e4 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-si.pdf diff --git a/macros/latex/contrib/glossaries/samples/sample-si.tex b/macros/latex/contrib/glossaries/samples/sample-si.tex new file mode 100644 index 0000000000..f304dab711 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-si.tex @@ -0,0 +1,22 @@ + % 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 } +\documentclass{article} +\usepackage{siunitx} +\usepackage[style=long4col]{glossaries} + +\makeglossaries + +\newglossaryentry{ohm}{% + name=ohm, + symbol={\si{\ohm}}, + description=unit of electrical resistance% +} + +\begin{document} +\glsaddallunused + +\printglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/sample-storage-abbr-desc.pdf b/macros/latex/contrib/glossaries/samples/sample-storage-abbr-desc.pdf Binary files differnew file mode 100644 index 0000000000..85f8fdb628 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-storage-abbr-desc.pdf diff --git a/macros/latex/contrib/glossaries/samples/sample-storage-abbr-desc.tex b/macros/latex/contrib/glossaries/samples/sample-storage-abbr-desc.tex new file mode 100644 index 0000000000..cccfad6397 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-storage-abbr-desc.tex @@ -0,0 +1,147 @@ + % This file is public domain + % If you want to use arara, you need the following directives: + % arara: pdflatex + % arara: makeglossaries + % arara: pdflatex +\documentclass{article} + +\usepackage{glossaries} + +\makeglossaries + +\glsaddstoragekey + {abbrtype}% key/field name + {acronym}% default value if not explicitly set + {\abbrtype}% custom command to access the value if required + +\newacronymstyle + {mystyle}% style name + {% Use the generic display + \ifglshaslong{\glslabel}{\glsgenacfmt}{\glsgenentryfmt}% + } + {% User needs to explicitly set the description + \renewcommand*{\GenericAcronymFields}{}% + % For the full format, test the value of the "abbrtype" key. + % If it's set to "acronym" put the short form first with + % the long form in brackets. + \renewcommand*{\genacrfullformat}[2]{% + \ifglsfieldeq{##1}{abbrtype}{acronym} + {% is a proper acronym + \protect\firstacronymfont{\glsentryshort{##1}}##2\space + (\glsentrylong{##1})% + } + {% is another form of abbreviation + \glsentrylong{##1}##2\space + (\protect\firstacronymfont{\glsentryshort{##1}})% + }% + }% + % first letter upper case version: + \renewcommand*{\Genacrfullformat}[2]{% + \ifglsfieldeq{##1}{abbrtype}{acronym} + {% is a proper acronym + \protect\firstacronymfont{\Glsentryshort{##1}}##2\space + (\glsentrylong{##1})% + } + {% is another form of abbreviation + \Glsentrylong{##1}##2\space + (\protect\firstacronymfont{\glsentryshort{##1}})% + }% + }% + % plural + \renewcommand*{\genplacrfullformat}[2]{% + \ifglsfieldeq{##1}{abbrtype}{acronym} + {% is a proper acronym + \protect\firstacronymfont{\glsentryshortpl{##1}}##2\space + (\glsentrylong{##1})% + } + {% is another form of abbreviation + \glsentrylongpl{##1}##2\space + (\protect\firstacronymfont{\glsentryshortpl{##1}})% + }% + }% + % plural and first letter upper case + \renewcommand*{\Genplacrfullformat}[2]{% + \ifglsfieldeq{##1}{abbrtype}{acronym} + {% is a proper acronym + \protect\firstacronymfont{\Glsentryshortpl{##1}}##2\space + (\glsentrylong{##1})% + } + {% is another form of abbreviation + \Glsentrylongpl{##1}##2\space + (\protect\firstacronymfont{\glsentryshortpl{##1}})% + }% + }% + % Just use the short form as the name part in the glossary: + \renewcommand*{\acronymentry}[1]{\acronymfont{\glsentryshort{##1}}}% + % Sort by the short form: + \renewcommand*{\acronymsort}[2]{##1}% + % Just use the surrounding font for the short form: + \renewcommand*{\acronymfont}[1]{##1}% + % Same for first use: + \renewcommand*{\firstacronymfont}[1]{\acronymfont{##1}}% + % Default plural suffix if the plural isn't explicitly set + \renewcommand*{\acrpluralsuffix}{\glspluralsuffix}% + } + +\setacronymstyle{mystyle} + + % The default for "abbrtype" is "acronym" so we don't need + % this new key for acronyms: +\newacronym[description={system for detecting the position and +speed of aircraft, ships, etc}]{radar}{radar}{radio detecting +and ranging} + +\newacronym[description={device that creates a narrow beam +of intense light}]{laser}{laser}{light amplification by +stimulated emission of radiation} + +\newacronym[description={portable breathing device for +divers}]{scuba}{scuba}{self-contained underwater breathing +apparatus} + +\newcommand*{\newinitialism}[4][]{% + \newacronym[abbrtype=initialism,#1]{#2}{#3}{#4}% +} + +\newinitialism[description={mathematical manipulation of an +information signal}]{dsp}{DSP}{digital signal processing} +\newinitialism[description={device that allows customers of +financial institutions to perform transactions, such as +cash withdrawal, without the need for a teller}]{atm}{ATM} +{automated teller machine} + +\newcommand*{\newcontraction}[4][]{% + \newacronym[abbrtype=contraction,#1]{#2}{#3}{#4}% +} + +\newcontraction[description={front part of a ship below the +deck}]{focsle}{fo'c's'le}{forecastle} + +\newglossaryentry{apple}{name={apple},description={a fruit}} + +\newglossarystyle + {mystyle}% style name + {% base it on the "list" style + \setglossarystyle{list}% + \renewcommand*{\glossentry}[2]{% + \item[\glsentryitem{##1}% + \glstarget{##1}{\glossentryname{##1}}] + \ifglshaslong{##1}% + { (\abbrtype{##1}: \glsentrylong{##1})\space}{}% + \glossentrydesc{##1}\glspostdescription\space ##2}% + } + +\setglossarystyle{mystyle} + +\begin{document} + +First use: \gls{radar}, \gls{laser}, \gls{scuba}, \gls{dsp}, +\gls{atm}, \gls{focsle}. + +Next use: \gls{radar}, \gls{laser}, \gls{scuba}, \gls{dsp}, +\gls{atm}, \gls{focsle}. + +Regular term: \gls{apple}. + +\printglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/sample-storage-abbr.pdf b/macros/latex/contrib/glossaries/samples/sample-storage-abbr.pdf Binary files differnew file mode 100644 index 0000000000..8b5d4e4ff9 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-storage-abbr.pdf diff --git a/macros/latex/contrib/glossaries/samples/sample-storage-abbr.tex b/macros/latex/contrib/glossaries/samples/sample-storage-abbr.tex new file mode 100644 index 0000000000..36949a2a6c --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample-storage-abbr.tex @@ -0,0 +1,112 @@ + % This file is public domain + % If you want to use arara, you need the following directives: + % arara: pdflatex + % arara: makeglossaries + % arara: pdflatex +\documentclass{article} + +\usepackage{glossaries} + +\makeglossaries + +\glsaddstoragekey + {abbrtype}% key/field name + {word}% default value if not explicitly set + {\abbrtype}% custom command to access the value if required + +\newacronymstyle + {mystyle}% style name + {% Use the generic display + \ifglshaslong{\glslabel}{\glsgenacfmt}{\glsgenentryfmt}% + } + {% Put the long form in the description + \renewcommand*{\GenericAcronymFields}{description={\the\glslongtok}}% + % For the full format, test the value of the "abbrtype" key. + % If it's set to "word" put the short form first with + % the long form in brackets. + \renewcommand*{\genacrfullformat}[2]{% + \ifglsfieldeq{##1}{abbrtype}{word} + {% is a proper acronym + \protect\firstacronymfont{\glsentryshort{##1}}##2\space + (\glsentrylong{##1})% + } + {% is another form of abbreviation + \glsentrylong{##1}##2\space + (\protect\firstacronymfont{\glsentryshort{##1}})% + }% + }% + % first letter upper case version: + \renewcommand*{\Genacrfullformat}[2]{% + \ifglsfieldeq{##1}{abbrtype}{word} + {% is a proper acronym + \protect\firstacronymfont{\Glsentryshort{##1}}##2\space + (\glsentrylong{##1})% + } + {% is another form of abbreviation + \Glsentrylong{##1}##2\space + (\protect\firstacronymfont{\glsentryshort{##1}})% + }% + }% + % plural + \renewcommand*{\genplacrfullformat}[2]{% + \ifglsfieldeq{##1}{abbrtype}{word} + {% is a proper acronym + \protect\firstacronymfont{\glsentryshortpl{##1}}##2\space + (\glsentrylong{##1})% + } + {% is another form of abbreviation + \glsentrylongpl{##1}##2\space + (\protect\firstacronymfont{\glsentryshortpl{##1}})% + }% + }% + % plural and first letter upper case + \renewcommand*{\Genplacrfullformat}[2]{% + \ifglsfieldeq{##1}{abbrtype}{word} + {% is a proper acronym + \protect\firstacronymfont{\Glsentryshortpl{##1}}##2\space + (\glsentrylong{##1})% + } + {% is another form of abbreviation + \Glsentrylongpl{##1}##2\space + (\protect\firstacronymfont{\glsentryshortpl{##1}})% + }% + }% + % Just use the short form as the name part in the glossary: + \renewcommand*{\acronymentry}[1]{\acronymfont{\glsentryshort{##1}}}% + % Sort by the short form: + \renewcommand*{\acronymsort}[2]{##1}% + % Just use the surrounding font for the short form: + \renewcommand*{\acronymfont}[1]{##1}% + % Same for first use: + \renewcommand*{\firstacronymfont}[1]{\acronymfont{##1}}% + % Default plural suffix if the plural isn't explicitly set + \renewcommand*{\acrpluralsuffix}{\glspluralsuffix}% + } + +\setacronymstyle{mystyle} + + % The default for "abbrtype" is "acronym" so we don't need + % this new key for acronyms: +\newacronym{radar}{radar}{radio detecting and ranging} +\newacronym{laser}{laser}{light amplification by stimulated +emission of radiation} +\newacronym{scuba}{scuba}{self-contained underwater breathing +apparatus} + +\newcommand*{\newinitialism}[4][]{% + \newacronym[abbrtype=initialism,#1]{#2}{#3}{#4}% +} + +\newinitialism{dsp}{DSP}{digital signal processing} +\newinitialism{atm}{ATM}{automated teller machine} + +\begin{document} + +First use: \gls{radar}, \gls{laser}, \gls{scuba}, \gls{dsp}, +\gls{atm}. + +Next use: \gls{radar}, \gls{laser}, \gls{scuba}, \gls{dsp}, +\gls{atm}. + +\printglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/sample.pdf b/macros/latex/contrib/glossaries/samples/sample.pdf Binary files differnew file mode 100644 index 0000000000..9b1748e0da --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample.pdf diff --git a/macros/latex/contrib/glossaries/samples/sample.tex b/macros/latex/contrib/glossaries/samples/sample.tex new file mode 100644 index 0000000000..282eb7912b --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample.tex @@ -0,0 +1,166 @@ + % 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: pdflatex: { synctex: on } +\documentclass[a4paper]{report} + +\usepackage[plainpages=false,colorlinks]{hyperref} +\usepackage[toc,style=treenoname,order=word,subentrycounter]{glossaries} + +\makeglossaries + +\newglossaryentry{Perl}{name=\texttt{Perl}, +sort=Perl, % need a sort key because name contains a command +description=A scripting language} + +\newglossaryentry{glossary}{name=glossary, +description={\nopostdesc}, +plural={glossaries}} + +\newglossaryentry{glossarycol}{ +description={collection of glosses}, +sort={2}, +parent={glossary}} + +\newglossaryentry{glossarylist}{ +description={list of technical words}, +sort={1}, +parent={glossary}} + +\newglossaryentry{pagelist}{name=page list, + % description value has to be enclosed in braces + % because it contains commas +description={a list of individual pages or page ranges +(e.g.\ 1,2,4,7-9)}} + +\newglossaryentry{mtrx}{name=matrix, +description={rectangular array of quantities}, + % plural is not simply obtained by appending an s, so specify +plural=matrices} + + % Entry with a paragraph break in the description: + % (If you use \newglossaryentry, the paragraph break + % must be identified with \glspar not with \par or a blank line. + % It's easier to use \longnewglossaryentry.) + +\longnewglossaryentry{par}% label +{name=paragraph}% options +{% multi-paragraph description +distinct section of a piece of writing. + +Beginning on new, usually indented, line} + + % entry with two types of plural. Set the plural form to the + % form most likely to be used. If you want to use a different + % plural, you will need to explicity specify it in \glslink +\newglossaryentry{cow}{name=cow, + % this isn't necessary, as this form (appending an s) is + % the default +plural=cows, + % description: +description={(\emph{pl.}\ cows, \emph{archaic} kine) an adult +female of any bovine animal}} + +\newglossaryentry{bravo}{name={bravo}, +description={\nopostdesc}} + +\newglossaryentry{bravo1}{description={cry of approval (pl.\ bravos)}, +sort={1}, +plural={bravos}, +parent=bravo} + +\newglossaryentry{bravo2}{description={hired ruffian or killer (pl.\ bravoes)}, +sort={2}, +plural={bravoes}, +parent=bravo} + +\newglossaryentry{seal}{% + name=seal,% + description={sea mammal with flippers that eats fish} +} + +\newglossaryentry{sealion}{% + name={sea lion},% + description={large seal}% +} + + % If a value contains a comma, you must use braces to hide + % it from the key=value list parser. Take care to avoid + % accidentally introducing unwanted space as leading and trailing + % spaces within the braces aren't stripped. For example, + % text={ spurious space } will result in extra space appearing + % when the entry is referenced. +\newglossaryentry{spuriousspace}{% + name={space, spurious}, + text={spurious space}, + description={unwanted spaces accidentally introduced by +uncommented line breaks or attempts to pretty-print the \LaTeX\ code} +} + +\begin{document} + +\title{Sample Document Using the glossaries Package} +\author{Nicola Talbot} +\pagenumbering{alph}% prevent duplicate page link names if using PDF +\maketitle + +\pagenumbering{roman} +\tableofcontents + +\chapter{Introduction} +\pagenumbering{arabic} + +A \gls{glossarylist} (definition~\glsrefentry{glossarylist}) is a +very useful addition to any technical document, although a +\gls{glossarycol} (definition~\glsrefentry{glossarycol}) can also +simply be a collection of glosses, which is another thing entirely. +Some documents have multiple \glspl{glossarylist}. + +Once you have run your document through \LaTeX, you will then need +to run the \texttt{.glo} file through \texttt{makeindex} (default) +or \texttt{xindy}. You will need to set the output file so that the +indexing application +creates a \texttt{.gls} file instead of an \texttt{.ind} file, and +change the name of the log file so that it doesn't overwrite the +index log file (if you have an index for your document). Rather +than having to remember all the command line switches, you can call +the \gls{Perl} script \texttt{makeglossaries} which provides a +convenient wrapper. See +\href{https://www.dickimaw-books.com/latex/buildglossaries}{Incorporating makeglossaries or makeglossaries-lite or bib2gls into the document build} for help. + +If a comma appears within the name or description, grouping +must be used, e.g.\ in the description of \gls{pagelist}. +Be careful about \glspl{spuriousspace} appearing in your code. + +\chapter{Plurals and Paragraphs} + +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| +(e.g.\ \glslink{cow}{kine}) +or \verb|\glsdisp| (e.g.\ \glsdisp{cow}{kine}). +\Glspl{seal} and \glspl{sealion} have regular plural forms. + +\Gls{bravo} is a homograph, but the plural forms are spelt +differently. The plural of \gls{bravo1}, a cry of approval +(definition~\glsrefentry{bravo1}), is \glspl{bravo1}, whereas the +plural of \gls{bravo2}, a hired ruffian or killer +(definition~\glsrefentry{bravo2}), is \glspl{bravo2}. + +\Glspl{par} can cause a problem in commands, so care is needed +when having a paragraph break in a \gls{glossarylist} entry. + +\chapter{Ordering} + +There are two types of ordering: word ordering (which places +``\gls{sealion}'' before ``\gls{seal}'') and letter ordering +(which places ``\gls{seal}'' before ``\gls{sealion}''). + +\printglossaries + +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/sample4col.pdf b/macros/latex/contrib/glossaries/samples/sample4col.pdf Binary files differnew file mode 100644 index 0000000000..be3e4a1b2a --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample4col.pdf diff --git a/macros/latex/contrib/glossaries/samples/sample4col.tex b/macros/latex/contrib/glossaries/samples/sample4col.tex new file mode 100644 index 0000000000..1f6125dc1d --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sample4col.tex @@ -0,0 +1,29 @@ + % 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 } +\documentclass[a4paper]{article} + +\usepackage[style=long4colheaderborder]{glossaries} + +\makeglossaries + +\newglossaryentry{w}{name={$w$}, +sort=w, +description={width}, +symbol=m} + +\newglossaryentry{M}{name={$M$}, +sort=M, +description={mass}, +symbol=kg} + +\begin{document} + +\printglossaries + +The width, \gls{w}, is measured in meters. The mass, \gls{M} is +measured in kilograms. + +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/sampleAcr.pdf b/macros/latex/contrib/glossaries/samples/sampleAcr.pdf Binary files differnew file mode 100644 index 0000000000..94e1cad38a --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sampleAcr.pdf diff --git a/macros/latex/contrib/glossaries/samples/sampleAcr.tex b/macros/latex/contrib/glossaries/samples/sampleAcr.tex new file mode 100644 index 0000000000..41ae5fab96 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sampleAcr.tex @@ -0,0 +1,88 @@ + % 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: pdflatex: { synctex: on } +\documentclass[a4paper]{report} + +\usepackage[colorlinks,plainpages=false]{hyperref} +\usepackage[style=long,% use 'long' style for the glossary + toc,% add glossary to table of contents + ]{glossaries} + +\makeglossaries + + % Set the acronym style +\setacronymstyle{long-sc-short} + +\newacronym{svm}% label +{svm}% abbreviation +{support vector machine}% long form + +\newacronym{ksvm}{ksvm}{kernel support vector machine} + +\newacronym{rna}{rna}{ribonukleins\"aure} + +\begin{document} +\tableofcontents + +\chapter{Support Vector Machines} + +\Glspl{svm} are used widely in the area of pattern recognition. +Subsequent use: \gls{svm}. + +Short version: \acrshort{svm}. Long version: \acrlong{svm}. Full +version: \acrfull{svm}. Description: \glsentrydesc{svm}. + +This is the entry in uppercase: \GLS{svm}. + +\chapter{Kernel Support Vector Machines} + +The \gls{ksvm} is \ifglsused{svm}{an}{a} \gls{svm} that uses +the so called ``kernel trick''. Plural: \glspl{ksvm}. Resetting +acronyms. + +\glsresetall +Possessive: \gls{ksvm}['s]. +Make the glossary entry number bold for this +one \gls[format=hyperbf]{ksvm}. + +\chapter{Short, Long and Full Forms} + +These commands don't affect the first use flag: + +\begin{center} +\begin{tabular}{lll} + & Unstarred & Starred\\ +acrshort & \acrshort{svm} & \acrshort*{svm}\\ +Acrshort & \Acrshort{svm} & \Acrshort*{svm}\\ +ACRshort & \ACRshort{svm} & \ACRshort*{svm}\\ +acrlong & \acrlong{svm} & \acrlong*{svm}\\ +Acrlong & \Acrlong{svm} & \Acrlong*{svm}\\ +ACRlong & \ACRlong{svm} & \ACRlong*{svm}\\ +acrfull & \acrfull{svm} & \acrfull*{svm}\\ +Acrfull & \Acrfull{svm} & \Acrfull*{svm}\\ +ACRfull & \ACRfull{svm} & \ACRfull*{svm}\\ +\\ +& Insert Unstarred & Insert Starred\\ +acrshort & \acrshort{svm}['s] & \acrshort*{svm}['s]\\ +Acrshort & \Acrshort{svm}['s] & \Acrshort*{svm}['s]\\ +ACRshort & \ACRshort{svm}['s] & \ACRshort*{svm}['s]\\ +acrlong & \acrlong{svm}['s] & \acrlong*{svm}['s]\\ +Acrlong & \Acrlong{svm}['s] & \Acrlong*{svm}['s]\\ +ACRlong & \ACRlong{svm}['s] & \ACRlong*{svm}['s]\\ +acrfull & \acrfull{svm}['s] & \acrfull*{svm}['s]\\ +Acrfull & \Acrfull{svm}['s] & \Acrfull*{svm}['s]\\ +ACRfull & \ACRfull{svm}['s] & \ACRfull*{svm}['s] +\end{tabular} +\end{center} + +\chapter{Another chapter} + +You don't need to worry about makeindex's special characters: +\gls{rna}. + +\printglossary[title={List of Acronyms}] + +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/sampleAcrDesc.pdf b/macros/latex/contrib/glossaries/samples/sampleAcrDesc.pdf Binary files differnew file mode 100644 index 0000000000..e5e2bc6c4a --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sampleAcrDesc.pdf diff --git a/macros/latex/contrib/glossaries/samples/sampleAcrDesc.tex b/macros/latex/contrib/glossaries/samples/sampleAcrDesc.tex new file mode 100644 index 0000000000..896bbbb1fb --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sampleAcrDesc.tex @@ -0,0 +1,76 @@ + % 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: pdflatex: { synctex: on } +\documentclass[a4paper]{report} + +\usepackage[colorlinks,plainpages=false]{hyperref} +\usepackage[acronym,% create 'acronym' glossary type + % The package option "nomain" is used here to suppress the + % main glossary, since this example doesn't use it. If you + % want to use the main glossary, remove the "nomain" option. + nomain,% + style=altlist, % use altlist style + toc, % add the glossary to the table of contents + ]{glossaries} + +\makeglossaries + + % Change the acronym style to long-sc-short-desc: +\setacronymstyle{long-sc-short-desc} + + % Change the "see" items so that they use \acronymfont: +\renewcommand*{\glsseeitemformat}[1]{\acronymfont{\glsentrytext{#1}}} + + % Not using a font that supports bold smallcaps so change the way + % the name is formatted in the glossary: + +\renewcommand*{\glsnamefont}[1]{\textmd{#1}} + +\newacronym[description={Statistical pattern recognition +technique~\protect\cite{svm}}, % acronym's description +]{svm}{svm}{support vector machine} + +\newacronym + [description={Statistical pattern recognition technique + using the ``kernel trick''},% acronym's description + see={[see also]{svm}}, +] +{ksvm}{ksvm}{kernel support vector machine} + +\begin{document} +\tableofcontents + +\chapter{Support Vector Machines} + +The \gls{svm} is used widely in the area of pattern recognition. + % plural form with initial letter in uppercase: +\Glspl{svm} are \ldots\ (but beware, converting the initial letter to +upper case for a small caps acronym is sometimes considered +poor style). + +Short version: \acrshort{svm}. Long version: \acrlong{svm}. Full +version: \acrfull{svm}. Description: \glsentrydesc{svm}. + +This is the entry in uppercase: \GLS{svm}. + +\chapter{Kernel Support Vector Machines} + +The \gls{ksvm} is \ifglsused{svm}{an}{a} \gls{svm} that uses +the so called ``kernel trick''. This is the entry's description without +a link: \glsentrydesc{ksvm}. + +\glsresetall +Possessive: \gls{ksvm}['s]. +Make the glossary entry number bold for this +one \gls[format=hyperbf]{svm}. + +\begin{thebibliography}{1} +\bibitem{svm} \ldots +\end{thebibliography} + +\printglossary + +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/sampleCustomAcr.pdf b/macros/latex/contrib/glossaries/samples/sampleCustomAcr.pdf Binary files differnew file mode 100644 index 0000000000..04654f3a9e --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sampleCustomAcr.pdf diff --git a/macros/latex/contrib/glossaries/samples/sampleCustomAcr.tex b/macros/latex/contrib/glossaries/samples/sampleCustomAcr.tex new file mode 100644 index 0000000000..084f5b7c98 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sampleCustomAcr.tex @@ -0,0 +1,115 @@ + % 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: pdflatex: { synctex: on } +\documentclass[a4paper]{report} + +\usepackage[colorlinks,plainpages=false]{hyperref} +\usepackage[acronym,% create 'acronym' glossary type + % The package option "nomain" is used here to suppress the + % main glossary, since this example doesn't use it. If you + % want to use the main glossary, remove the "nomain" option. + nomain, + style=altlist, % use altlist style + toc, % add the glossary to the table of contents + ]{glossaries} + +\makeglossaries + + % Define a new acronym style called "altfn" that's based on the + % footnote-sc-desc style + +\newacronymstyle + {altfn}% style name + {% Inherit display style from "footnote-sc-desc" + \GlsUseAcrEntryDispStyle{footnote-sc-desc}% + }% + {% Inherit definitions from "footnote-sc-desc" + \GlsUseAcrStyleDefs{footnote-sc-desc}% + % Modify the first use display styles so they put the long form + % followed by the description in the footnote: + % + % First use of \gls: + \renewcommand*{\genacrfullformat}[2]{% + \protect\firstacronymfont{\glsentryshort{##1}}##2% + \protect\footnote{\glsentrylong{##1}: \glsentrydesc{##1}}% + }% + % First use of \Gls: + \renewcommand*{\Genacrfullformat}[2]{% + \firstacronymfont{\Glsentryshort{##1}}##2% + \protect\footnote{\glsentrylong{##1}: \glsentrydesc{##1}}% + }% + % First use of \glspl: + \renewcommand*{\genplacrfullformat}[2]{% + \protect\firstacronymfont{\glsentryshortpl{##1}}##2% + \protect\footnote{\glsentrylongpl{##1}: \glsentrydesc{##1}}% + }% + % First use of \Glspl: + \renewcommand*{\Genplacrfullformat}[2]{% + \protect\firstacronymfont{\Glsentryshortpl{##1}}##2% + \protect\footnote{\glsentrylongpl{##1}: \glsentrydesc{##1}}% + }% + % Sort according to long form: + \renewcommand*{\acronymsort}[2]{##2}% + % Set the name (as displayed in the glossary) to long (short) + \renewcommand*{\acronymentry}[1]{% + \glsentrylong{##1} (\acronymfont{\glsentryshort{##1}})}% + % Since bold small caps isn't supported with this document's + % fonts, adjust \acronymfont so that it switches to medium + % small caps: + \renewcommand{\acronymfont}[1]{\textmd{\scshape ##1}}% + } + + % Now use this new style: +\setacronymstyle{altfn} + + % Change the "see" items so that they use \acronymfont: +\renewcommand*{\glsseeitemformat}[1]{\acronymfont{\glsentrytext{#1}}} + +\newacronym[description={Statistical pattern recognition +technique~\protect\cite{svm}}, % acronym's description +]{svm}{svm}{support vector machine} + +\newacronym[description={Statistical pattern recognition technique +using the ``kernel trick''},% acronym's description +see={[see also]{svm}}, +]{ksvm}{ksvm}{kernel +support vector machine} + +\begin{document} +\tableofcontents + +\chapter{Support Vector Machines} + +The \gls{svm} is used widely in the area of pattern recognition. + % plural form with initial letter in uppercase: +\Glspl{svm} are \ldots\ (but beware, converting the initial letter to +upper case for a small caps acronym is sometimes considered +poor style). + +Short version: \acrshort{svm}. Long version: \acrlong{svm}. Full +version: \acrfull{svm}. Description: \glsentrydesc{svm}. + +This is the entry in uppercase: \GLS{svm}. + +\chapter{Kernel Support Vector Machines} + +The \gls{ksvm} is \ifglsused{svm}{an}{a} \gls{svm} that uses +the so called ``kernel trick''. This is the entry's description without +a link: \glsentrydesc{ksvm}. + +\glsresetall +(Reset all.) +Possessive: \gls{ksvm}['s]. +Make the glossary entry number bold for this +one \gls[format=hyperbf]{svm}. + +\begin{thebibliography}{1} +\bibitem{svm} \ldots +\end{thebibliography} + +\printglossary + +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/sampleDB.pdf b/macros/latex/contrib/glossaries/samples/sampleDB.pdf Binary files differnew file mode 100644 index 0000000000..6845e69aca --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sampleDB.pdf diff --git a/macros/latex/contrib/glossaries/samples/sampleDB.tex b/macros/latex/contrib/glossaries/samples/sampleDB.tex new file mode 100644 index 0000000000..cbcd1723b9 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sampleDB.tex @@ -0,0 +1,24 @@ + % 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 } +\documentclass{article} + +\usepackage[colorlinks,plainpages=false]{hyperref} +\usepackage[nonumberlist]{glossaries} + +\newglossary[nlg]{symbols}{not}{ntn}{Symbols} + +\makeglossaries + +\loadglsentries{database1} +\loadglsentries[symbols]{database2} + +\begin{document} + +\glsaddall + +\printglossaries + +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/sampleDesc.pdf b/macros/latex/contrib/glossaries/samples/sampleDesc.pdf Binary files differnew file mode 100644 index 0000000000..e7c833d7a2 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sampleDesc.pdf diff --git a/macros/latex/contrib/glossaries/samples/sampleDesc.tex b/macros/latex/contrib/glossaries/samples/sampleDesc.tex new file mode 100644 index 0000000000..4f69d980a0 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sampleDesc.tex @@ -0,0 +1,71 @@ + % This file is public domain + % + % See also sampleAcrDesc.tex + % + % If you want to use arara, you need the following directives: + % arara: pdflatex: { synctex: on } + % arara: makeglossaries + % arara: pdflatex: { synctex: on } + % arara: pdflatex: { synctex: on } +\documentclass[a4paper]{report} + +\usepackage[colorlinks,plainpages=false]{hyperref} + +\usepackage[style=altlist, % use altlist style + toc % add the glossary to the table of contents + ]{glossaries} + +\makeglossaries + +\newglossaryentry{svm}{ + % how the entry name should appear in the glossary +name={Support vector machine (SVM)}, + % how the description should appear in the glossary +description={Statistical pattern recognition +technique~\cite{svm}}, + % how the entry should appear in the document text +text={svm}, + % how the entry should appear the first time it is + % used in the document text +first={support vector machine (svm)}} + +\newglossaryentry{ksvm}{ +name={Kernel support vector machine (KSVM)}, +description={Statistical pattern recognition technique +using the ``kernel trick'' (see also SVM)}, +text={ksvm}, +first={kernel support vector machine}} + +\begin{document} +\tableofcontents + +\chapter{Support Vector Machines} + +The \gls{svm} is used widely in the area of pattern recognition. + % plural form with initial letter in uppercase: +\Glspl{svm} are \ldots + +This is the text produced without a link: \glsentrytext{svm}. +This is the text produced on first use without a link: +\glsentryfirst{svm}. This is the entry's description without +a link: \glsentrydesc{svm}. + +This is the entry in uppercase: \GLS{svm}. + +\chapter{Kernel Support Vector Machines} + +The \gls{ksvm} is \ifglsused{svm}{an}{a} \gls{svm} that uses +the so called ``kernel trick''. + +\glsresetall +Possessive: \gls{ksvm}['s]. +Make the glossary entry number bold for this +one \gls[format=hyperbf]{svm}. + +\begin{thebibliography}{1} +\bibitem{svm} \ldots +\end{thebibliography} + +\printglossary[title={Acronyms}] + +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/sampleEq.pdf b/macros/latex/contrib/glossaries/samples/sampleEq.pdf Binary files differnew file mode 100644 index 0000000000..37a7d5cfe8 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sampleEq.pdf diff --git a/macros/latex/contrib/glossaries/samples/sampleEq.tex b/macros/latex/contrib/glossaries/samples/sampleEq.tex new file mode 100644 index 0000000000..9fb85acaad --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sampleEq.tex @@ -0,0 +1,239 @@ + % This file is public domain +\documentclass[a4paper,12pt]{report} + +\usepackage{amsmath} +\usepackage[colorlinks]{hyperref} +\usepackage[xindy,toc,ucmark,style=long3colheader,counter=equation]{glossaries} + +\makeglossaries + +\newcommand{\erf}{\operatorname{erf}} +\newcommand{\erfc}{\operatorname{erfc}} + +\pagestyle{headings} + + % redefine the way hyperref creates the target for equations + % so that the glossary links to equation numbers work + + \renewcommand*\theHequation{\theHchapter.\arabic{equation}} + + % Change the glossary headings + +\renewcommand{\entryname}{Notation} +\renewcommand{\descriptionname}{Function Name} +\renewcommand{\pagelistname}{Number of Formula} + + % define glossary entries + +\newglossaryentry{Gamma}{name=\ensuremath{\Gamma(z)}, +description=Gamma function, +sort=Gamma} + +\newglossaryentry{gamma}{name={\ensuremath{\gamma(\alpha,x)}}, +description=Incomplete gamma function, +sort=gamma1} + +\newglossaryentry{iGamma}{name={\ensuremath{\Gamma(\alpha,x)}}, +description=Incomplete gamma function, +sort=Gamma2} + +\newglossaryentry{psi}{name=\ensuremath{\psi(x)}, +description=Psi function,sort=psi} + +\newglossaryentry{erf}{name=\ensuremath{\erf(x)}, +description=Error function,sort=erf} + +\newglossaryentry{erfc}{name=\ensuremath{\erfc}, +description=Complementary error function,sort=erfc} + +\newglossaryentry{B}{name={\ensuremath{B(x,y)}}, +description=Beta function,sort=B} + +\newglossaryentry{Bx}{name={\ensuremath{B_x(p,q)}}, +description=Incomplete beta function,sort=Bx} + +\newglossaryentry{Tn}{name=\ensuremath{T_n(x)}, +description=Chebyshev's polynomials of the first kind,sort=Tn} + +\newglossaryentry{Un}{name=\ensuremath{U_n(x)}, +description=Chebyshev's polynomials of the second kind,sort=Un} + +\newglossaryentry{Hn}{name=\ensuremath{H_n(x)}, +description=Hermite polynomials,sort=Hn} + +\newglossaryentry{Ln}{name=\ensuremath{L_n^\alpha(x)}, +description=Laguerre polynomials,sort=Lna} + +\newglossaryentry{Znu}{name=\ensuremath{Z_\nu(z)}, +description=Bessel functions,sort=Z} + +\newglossaryentry{Phi}{name={\ensuremath{\Phi(\alpha,\gamma;z)}}, +description=confluent hypergeometric function,sort=Pagz} + +\newglossaryentry{knu}{name=\ensuremath{k_\nu(x)}, +description=Bateman's function,sort=kv} + +\newglossaryentry{Dp}{name=\ensuremath{D_p(z)}, +description=Parabolic cylinder functions,sort=Dp} + +\newglossaryentry{F}{name={\ensuremath{F(\phi,k)}}, +description=Elliptical integral of the first kind,sort=Fpk} + +\newglossaryentry{C}{name=\ensuremath{C}, +description=Euler's constant,sort=C} + +\newglossaryentry{G}{name=\ensuremath{G}, +description=Catalan's constant,sort=G} + +\begin{document} +\title{A Sample Document Using glossaries.sty} +\author{Nicola Talbot} +\maketitle + +\begin{abstract} +This is a sample document illustrating the use of the \textsf{glossaries} +package. The functions here have been taken from ``Tables of +Integrals, Series, and Products'' by I.S.~Gradshteyn and I.M~Ryzhik. +The glossary is a list of special functions, so +the equation number has been used rather than the page number. This +can be done using the \texttt{counter=equation} package +option. +\end{abstract} + +\printglossary[title={Index of Special Functions and Notations}] + +\chapter{Gamma Functions} + +\begin{equation} +\gls{Gamma} = \int_{0}^{\infty}e^{-t}t^{z-1}\,dt +\end{equation} + +\verb|\ensuremath| is only required here if using +hyperlinks. +\begin{equation} +\glslink{Gamma}{\ensuremath{\Gamma(x+1)}} = x\Gamma(x) +\end{equation} + +\begin{equation} +\gls{gamma} = \int_0^x e^{-t}t^{\alpha-1}\,dt +\end{equation} + +\begin{equation} +\gls{iGamma} = \int_x^\infty e^{-t}t^{\alpha-1}\,dt +\end{equation} + +\newpage + +\begin{equation} +\gls{Gamma} = \Gamma(\alpha, x) + \gamma(\alpha, x) +\end{equation} + +\begin{equation} +\gls{psi} = \frac{d}{dx}\ln\Gamma(x) +\end{equation} + +\chapter{Error Functions} + +\begin{equation} +\gls{erf} = \frac{2}{\surd\pi}\int_0^x e^{-t^2}\,dt +\end{equation} + +\begin{equation} +\gls{erfc} = 1 - \erf(x) +\end{equation} + +\chapter{Beta Function} + +\begin{equation} +\gls{B} = 2\int_0^1 t^{x-1}(1-t^2)^{y-1}\,dt +\end{equation} +Alternatively: +\begin{equation} +\gls{B} = 2\int_0^{\frac\pi2}\sin^{2x-1}\phi\cos^{2y-1}\phi\,d\phi +\end{equation} + +\begin{equation} +\gls{B} = \frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)} = B(y,x) +\end{equation} + +\begin{equation} +\gls{Bx} = \int_0^x t^{p-1}(1-t)^{q-1}\,dt +\end{equation} + +\chapter{Polynomials} + +\section{Chebyshev's polynomials} + +\begin{equation} +\gls{Tn} = \cos(n\arccos x) +\end{equation} + +\begin{equation} +\gls{Un} = \frac{\sin[(n+1)\arccos x]}{\sin[\arccos x]} +\end{equation} + +\section{Hermite polynomials} + +\begin{equation} +\gls{Hn} = (-1)^n e^{x^2} \frac{d^n}{dx^n}(e^{-x^2}) +\end{equation} + +\section{Laguerre polynomials} + +\begin{equation} +L_n^{\alpha} (x) = \frac{1}{n!}e^x x^{-\alpha} +\frac{d^n}{dx^n}(e^{-x}x^{n+\alpha}) +\end{equation} + +\chapter{Bessel Functions} + +Bessel functions $Z_\nu$ are solutions of +\begin{equation} +\frac{d^2\glslink{Znu}{Z_\nu}}{dz^2} ++ \frac{1}{z}\,\frac{dZ_\nu}{dz} + +\left( 1-\frac{\nu^2}{z^2}Z_\nu = 0 \right) +\end{equation} + +\chapter{Confluent hypergeometric function} + +\begin{equation} +\gls{Phi} = 1 + \frac{\alpha}{\gamma}\,\frac{z}{1!} ++ \frac{\alpha(\alpha+1)}{\gamma(\gamma+1)}\,\frac{z^2}{2!} ++\frac{\alpha(\alpha+1)(\alpha+2)}{\gamma(\gamma+1)(\gamma+2)}\, +\frac{z^3}{3!} + \cdots +\end{equation} + +\begin{equation} +\gls{knu} = \frac{2}{\pi}\int_0^{\pi/2} +\cos(x \tan\theta - \nu\theta)\,d\theta +\end{equation} + +\chapter{Parabolic cylinder functions} + +\begin{equation} +\gls{Dp} = 2^{\frac{p}{2}}e^{-\frac{z^2}{4}} +\left\{ +\frac{\surd\pi}{\Gamma\left(\frac{1-p}{2}\right)} +\Phi\left(-\frac{p}{2},\frac{1}{2};\frac{z^2}{2}\right) +-\frac{\sqrt{2\pi}z}{\Gamma\left(-\frac{p}{2}\right)} +\Phi\left(\frac{1-p}{2},\frac{3}{2};\frac{z^2}{2}\right) +\right\} +\end{equation} + +\chapter{Elliptical Integral of the First Kind} + +\begin{equation} +\gls{F} = \int_0^\phi \frac{d\alpha}{\sqrt{1-k^2\sin^2\alpha}} +\end{equation} + +\chapter{Constants} + +\begin{equation} +\gls{C} = 0.577\,215\,664\,901\ldots +\end{equation} + +\begin{equation} +\gls{G} = 0.915\,965\,594\ldots +\end{equation} + +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/sampleEqPg.pdf b/macros/latex/contrib/glossaries/samples/sampleEqPg.pdf Binary files differnew file mode 100644 index 0000000000..48cf778f0a --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sampleEqPg.pdf diff --git a/macros/latex/contrib/glossaries/samples/sampleEqPg.tex b/macros/latex/contrib/glossaries/samples/sampleEqPg.tex new file mode 100644 index 0000000000..d00d89ccaf --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sampleEqPg.tex @@ -0,0 +1,295 @@ + % This file is public domain + % + % To ensure that the page numbers are up-to-date: + % + % latex sampleEqPg + % makeglossaries sampleEqPg + % latex sampleEqPg + % makeglossaries sampleEqPg + % latex sampleEqPg + % + % The extra makeglossaries run is required because adding the + % glossary in the second LaTeX run shifts the page numbers on + % which means that the glossary needs to be updated again. + % (Note that this problem is avoided if the page numbering is + % reset after the glossary. For example, if the glossary has + % roman numbering and the subsequent pages have arabic numbering) + % + % 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[a4paper,12pt]{report} + +\usepackage{amsmath} +\usepackage[colorlinks]{hyperref} +\usepackage[style=long3colheader,toc, + counter=equation]{glossaries} + +\newcommand{\erf}{\operatorname{erf}} +\newcommand{\erfc}{\operatorname{erfc}} + + % redefine the way hyperref creates the target for equations + % so that the glossary links to equation numbers work + +\renewcommand*\theHequation{\thechapter.\arabic{equation}} + +\renewcommand{\glossaryname}{Index of Special Functions and Notations} + +\renewcommand{\glossarypreamble}{Numbers in italic indicate the equation number, +numbers in bold indicate page numbers where the main definition occurs.\par} + + % set the glossary number style to italic + % hyperit is used instead of textit because + % the hyperref package is being used. +\renewcommand{\glsnumberformat}[1]{\hyperit{#1}} + + % 1st column heading +\renewcommand{\entryname}{Notation} + + % 2nd column heading +\renewcommand{\descriptionname}{Function Name} + + % 3rd column heading +\renewcommand{\pagelistname}{} + + % Redefine header row so that it + % adds a blank row after the title row +\renewcommand{\glossaryheader}{\bfseries\entryname & +\bfseries\descriptionname&\bfseries\pagelistname\\ +& & \\\endhead} + + % Define glossary entries + +\newglossaryentry{Gamma}{name=\ensuremath{\Gamma(z)}, +description=Gamma function,sort=Gamma} + +\newglossaryentry{gamma}{name=\ensuremath{\gamma(\alpha,x)}, +description=Incomplete gamma function,sort=gamma} + +\newglossaryentry{iGamma}{name=\ensuremath{\Gamma(\alpha,x)}, +description=Incomplete gamma function,sort=Gamma} + +\newglossaryentry{psi}{name=\ensuremath{\psi(x)}, +description=Psi function,sort=psi} + +\newglossaryentry{erf}{name=\ensuremath{\erf(x)}, +description=Error function,sort=erf} + +\newglossaryentry{erfc}{name=\ensuremath{\erfc(x)}, +description=Complementary error function,sort=erfc} + +\newglossaryentry{beta}{name=\ensuremath{B(x,y)}, +description=Beta function,sort=B} + +\newglossaryentry{Bx}{name=\ensuremath{B_x(p,q)}, +description=Incomplete beta function,sort=Bx} + +\newglossaryentry{Tn}{name=\ensuremath{T_n(x)}, +description=Chebyshev's polynomials of the first kind, +sort=Tn} + +\newglossaryentry{Un}{name=\ensuremath{U_n(x)}, +description=Chebyshev's polynomials of the second kind, +sort=Un} + +\newglossaryentry{Hn}{name=\ensuremath{H_n(x)}, +description=Hermite polynomials,sort=Hn} + +\newglossaryentry{Lna}{name=\ensuremath{L_n^\alpha(x)}, +description=Laguerre polynomials,sort=Lna} + +\newglossaryentry{Znu}{name=\ensuremath{Z_\nu(z)}, +description=Bessel functions,sort=Z} + +\newglossaryentry{Pagz}{name=\ensuremath{\Phi(\alpha,\gamma;z)}, +description=confluent hypergeometric function,sort=Pagz} + +\newglossaryentry{kv}{name=\ensuremath{k_\nu(x)}, +description=Bateman's function,sort=kv} + +\newglossaryentry{Dp}{name=\ensuremath{D_p(z)}, +description=Parabolic cylinder functions,sort=Dp} + +\newglossaryentry{Fpk}{name=\ensuremath{F(\phi,k)}, +description=Elliptical integral of the first kind,sort=Fpk} + +\newglossaryentry{C}{name=\ensuremath{C}, +description=Euler's constant,sort=C} + +\newglossaryentry{G}{name=\ensuremath{G}, +description=Catalan's constant,sort=G} + +\makeglossaries + +\pagestyle{headings} + +\begin{document} + +\title{Sample Document Using Interchangable Numbering} +\author{Nicola Talbot} +\maketitle + +\begin{abstract} +This is a sample document illustrating the use of the \textsf{glossaries} +package. The functions here have been taken from ``Tables of +Integrals, Series, and Products'' by I.S.~Gradshteyn and I.M~Ryzhik. + +The glossary lists both page numbers and equation numbers. +Since the majority of the entries use the equation number, +\texttt{counter=equation} was used as a package option. +Note that this example will only work where the +page number and equation number compositor is the same. So +it won't work if, say, the page numbers are of the form +2-4 and the equation numbers are of the form 4.6. +As most of the glossary entries should have an italic +format, it is easiest to set the default format to +italic. + +\end{abstract} + +\tableofcontents + +\printglossary[toctitle={Special Functions}] + +\chapter{Gamma Functions} + +The \glslink[format=hyperbf,counter=page]{Gamma}{gamma function} is +defined as +\begin{equation} +\gls{Gamma} = \int_{0}^{\infty}e^{-t}t^{z-1}\,dt +\end{equation} + +\begin{equation} +\glslink{Gamma}{\ensuremath{\Gamma(x+1)}} = x\Gamma(x) +\end{equation} + +\begin{equation} +\gls{gamma} = \int_0^x e^{-t}t^{\alpha-1}\,dt +\end{equation} + +\begin{equation} +\gls{iGamma} = \int_x^\infty e^{-t}t^{\alpha-1}\,dt +\end{equation} + +\newpage + +\begin{equation} +\glslink{Gamma}{\ensuremath{\Gamma(\alpha)}} = +\Gamma(\alpha, x) + \gamma(\alpha, x) +\end{equation} + +\begin{equation} +\gls{psi} = \frac{d}{dx}\ln\Gamma(x) +\end{equation} + +\chapter{Error Functions} + +The \glslink[format=hyperbf,counter=page]{erf}{error function} is defined as: +\begin{equation} +\gls{erf} = \frac{2}{\surd\pi}\int_0^x e^{-t^2}\,dt +\end{equation} + +\begin{equation} +\gls{erfc} = 1 - \erf(x) +\end{equation} + +\chapter{Beta Function} + +\begin{equation} +\gls{beta} = 2\int_0^1 t^{x-1}(1-t^2)^{y-1}\,dt +\end{equation} +Alternatively: +\begin{equation} +\gls{beta} = 2\int_0^{\frac\pi2}\sin^{2x-1}\phi\cos^{2y-1}\phi\,d\phi +\end{equation} + +\begin{equation} +\gls{beta} = \frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)} = B(y,x) +\end{equation} + +\begin{equation} +\gls{Bx} = \int_0^x t^{p-1}(1-t)^{q-1}\,dt +\end{equation} + +\chapter{Chebyshev's polynomials} + +\begin{equation} +\gls{Tn} = \cos(n\arccos x) +\end{equation} + +\begin{equation} +\gls{Un} = \frac{\sin[(n+1)\arccos x]}{\sin[\arccos x]} +\end{equation} + +\chapter{Hermite polynomials} + +\begin{equation} +\gls{Hn} = (-1)^n e^{x^2} \frac{d^n}{dx^n}(e^{-x^2}) +\end{equation} + +\chapter{Laguerre polynomials} + +\begin{equation} +\gls{Lna} = \frac{1}{n!}e^x x^{-\alpha} +\frac{d^n}{dx^n}(e^{-x}x^{n+\alpha}) +\end{equation} + +\chapter{Bessel Functions} + +Bessel functions $Z_\nu(z)$ are solutions of +\begin{equation} +\frac{d^2\glslink{Znu}{Z_\nu}}{dz^2} + \frac{1}{z}\,\frac{dZ_\nu}{dz} + +\left( +1-\frac{\nu^2}{z^2}Z_\nu = 0 +\right) +\end{equation} + +\chapter{Confluent hypergeometric function} + +\begin{equation} +\gls{Pagz} = 1 + \frac{\alpha}{\gamma}\,\frac{z}{1!} ++ \frac{\alpha(\alpha+1)}{\gamma(\gamma+1)}\,\frac{z^2}{2!} ++\frac{\alpha(\alpha+1)(\alpha+2)} + {\gamma(\gamma+1)(\gamma+2)} +\,\frac{z^3}{3!} ++ \cdots +\end{equation} + +\begin{equation} +\gls{kv} = \frac{2}{\pi}\int_0^{\pi/2} +\cos(x \tan\theta - \nu\theta)\,d\theta +\end{equation} + +\chapter{Parabolic cylinder functions} + +\begin{equation} +\gls{Dp} = 2^{\frac{p}{2}}e^{-\frac{z^2}{4}} +\left\{ +\frac{\surd\pi}{\Gamma\left(\frac{1-p}{2}\right)} +\Phi\left(-\frac{p}{2},\frac{1}{2};\frac{z^2}{2}\right) +-\frac{\sqrt{2\pi}z}{\Gamma\left(-\frac{p}{2}\right)} +\Phi\left(\frac{1-p}{2},\frac{3}{2};\frac{z^2}{2}\right) +\right\} +\end{equation} + +\chapter{Elliptical Integral of the First Kind} + +\begin{equation} +\gls{Fpk} = \int_0^\phi +\frac{d\alpha}{\sqrt{1-k^2\sin^2\alpha}} +\end{equation} + +\chapter{Constants} + +\begin{equation} +\gls{C} = 0.577\,215\,664\,901\ldots +\end{equation} + +\begin{equation} +\gls{G} = 0.915\,965\,594\ldots +\end{equation} + +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/sampleFnAcrDesc.pdf b/macros/latex/contrib/glossaries/samples/sampleFnAcrDesc.pdf Binary files differnew file mode 100644 index 0000000000..72b64c8359 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sampleFnAcrDesc.pdf diff --git a/macros/latex/contrib/glossaries/samples/sampleFnAcrDesc.tex b/macros/latex/contrib/glossaries/samples/sampleFnAcrDesc.tex new file mode 100644 index 0000000000..8ea1f3883c --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sampleFnAcrDesc.tex @@ -0,0 +1,79 @@ + % 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: pdflatex: { synctex: on } +\documentclass[a4paper]{report} + +\usepackage[colorlinks,plainpages=false]{hyperref} +\usepackage[acronym,% create 'acronym' glossary type + % The package option "nomain" is used here to suppress the + % main glossary, since this example doesn't use it. If you + % want to use the main glossary, remove the "nomain" option. + nomain, + style=altlist, % use altlist style + toc, % add the glossary to the table of contents + ]{glossaries} + +\makeglossaries + + % Change the acronym style to a small-caps footnote style: +\setacronymstyle{footnote-sc-desc} + + % Make some minor adjustments to the style: +\renewcommand*{\acronymsort}[2]{#1}% sort by short form +\renewcommand*{\acronymentry}[1]{% + \acronymfont{\glsentryshort{#1}}\space (\glsentrylong{#1})} + + % Not using a font that supports bold smallcaps so ensure + % the acronym is always in medium weight. +\renewcommand*{\acronymfont}[1]{\textmd{\scshape #1}} + + % Change the "see" items so that they use \acronymfont: +\renewcommand*{\glsseeitemformat}[1]{\acronymfont{\glsentrytext{#1}}} + +\newacronym[description={Statistical pattern recognition +technique~\protect\cite{svm}}, % acronym's description +]{svm}{svm}{support vector machine} + +\newacronym[description={Statistical pattern recognition technique +using the ``kernel trick''},% acronym's description +see={[see also]{svm}}, +]{ksvm}{ksvm}{kernel +support vector machine} + +\begin{document} +\tableofcontents + +\chapter{Support Vector Machines} + +The \gls{svm} is used widely in the area of pattern recognition. + % plural form with initial letter in uppercase: +\Glspl{svm} are \ldots\ (but beware, converting the initial letter to +upper case for a small caps acronym is sometimes considered +poor style). + +Short version: \acrshort{svm}. Long version: \acrlong{svm}. Full +version: \acrfull{svm}. Description: \glsentrydesc{svm}. + +This is the entry in uppercase: \GLS{svm}. + +\chapter{Kernel Support Vector Machines} + +The \gls{ksvm} is \ifglsused{svm}{an}{a} \gls{svm} that uses +the so called ``kernel trick''. This is the entry's description without +a link: \glsentrydesc{ksvm}. + +\glsresetall +Possessive: \gls{ksvm}['s]. +Make the glossary entry number bold for this +one \gls[format=hyperbf]{svm}. + +\begin{thebibliography}{1} +\bibitem{svm} \ldots +\end{thebibliography} + +\printglossary + +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/sampleNtn.pdf b/macros/latex/contrib/glossaries/samples/sampleNtn.pdf Binary files differnew file mode 100644 index 0000000000..27c58518cc --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sampleNtn.pdf diff --git a/macros/latex/contrib/glossaries/samples/sampleNtn.tex b/macros/latex/contrib/glossaries/samples/sampleNtn.tex new file mode 100644 index 0000000000..639e6d0c7a --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sampleNtn.tex @@ -0,0 +1,90 @@ + % 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: pdflatex: { synctex: on } +\documentclass{report} + + % If you want to add babel to this document, you may have to + % replace the : character in the labels if you are using a + % language setting (e.g. french) that makes : active. + +\usepackage[plainpages=false,colorlinks]{hyperref} +\usepackage{html} +\usepackage[toc,xindy]{glossaries} + + % Define a new glossary type called notation +\newglossary[nlg]{notation}{not}{ntn}{Notation} + +\makeglossaries + + % Notation definitions + +\newglossaryentry{not:set}{type=notation, % glossary type +name={$\mathcal{S}$}, +description={A set}, +sort={S}} + +\newglossaryentry{not:U}{type=notation, +name={$\mathcal{U}$}, +description={The universal set}, +sort=U} + +\newglossaryentry{not:card}{type=notation, +name={$|\mathcal{S}|$}, +description={cardinality of $\mathcal{S}$}, +sort=cardinality} + +\newglossaryentry{not:fact}{type=notation, +name={$!$}, +description={factorial}, +sort=factorial} + + % Main glossary definitions + +\newglossaryentry{gls:set}{name=set, +description={A collection of distinct objects}} + +\newglossaryentry{gls:card}{name=cardinality, +description={The number of elements in the specified set}} + +\begin{document} +\title{Sample Document using the glossaries Package} +\author{Nicola Talbot} +\pagenumbering{alph} +\maketitle + +\begin{abstract} + %stop hyperref complaining about duplicate page identifiers: +\pagenumbering{Alph} +This is a sample document illustrating the use of the +\textsf{glossaries} package. In this example, a new glossary type +called \texttt{notation} is defined, so that the document can have a +separate glossary of terms and index of notation. The index of notation +doesn't have associated numbers. +\end{abstract} + +\pagenumbering{roman} +\tableofcontents + +\printglossaries + +\chapter{Introduction} +\pagenumbering{arabic} + +\Glspl{gls:set} are denoted by a calligraphic font +e.g.\ \gls{not:set}. + +Let \gls[format=hyperit]{not:U} denote the universal set. + +The \gls{gls:card} of a set $\mathcal{S}$ is denoted +\gls{not:card}. + +\chapter{Another Chapter} + +Another mention of the universal set \gls{not:U}. + +The factorial symbol: \gls{not:fact}. + +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/samplePeople.pdf b/macros/latex/contrib/glossaries/samples/samplePeople.pdf Binary files differnew file mode 100644 index 0000000000..48760f5264 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/samplePeople.pdf diff --git a/macros/latex/contrib/glossaries/samples/samplePeople.tex b/macros/latex/contrib/glossaries/samples/samplePeople.tex new file mode 100644 index 0000000000..258dc3e8eb --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/samplePeople.tex @@ -0,0 +1,57 @@ + % This file is public domain + % If you are using arara, you need the following directives: + % If you want to use arara, you need the following directives: + % arara: pdflatex: { synctex: on } + % arara: makeglossaries + % arara: pdflatex: { synctex: on } + % arara: pdflatex: { synctex: on } +\documentclass{report} + +\usepackage[colorlinks]{hyperref} +\usepackage[toc,style=listgroup]{glossaries} + +\makeglossaries + +\newcommand{\sortname}[2]{#2, #1} +\newcommand{\textname}[2]{#1 #2} + + % Syntax: \name{first name}{surname} + \let\name\textname + +\renewcommand{\glsprestandardsort}[3]{% + \let\name\sortname + \edef#1{\expandafter\expandonce\expandafter{#1}}% + \let\name\textname + \glsdosanitizesort +} + +\newglossaryentry{joebloggs}{name={\name{Joe}{Bloggs}},description={\nopostdesc}} + +\newglossaryentry{johnsmith}{name={\name{John}{Smith}},description={\nopostdesc}} + +\newglossaryentry{zoeadams}{name={\name{Zo\'e}{Adams}},description={\nopostdesc}} + +\newglossaryentry{maryadams}{name={\name{Mary}{Adams}},description={\nopostdesc}} + +\begin{document} +\tableofcontents + +\chapter{\glsentrytext{joebloggs}} + +\gls{joebloggs} was a fairly ordinary person. + +\chapter{\glsentrytext{johnsmith}} + +\gls{johnsmith} was great friends with \gls{joebloggs}. + +\chapter{\glsentrytext{maryadams}} + +\gls{maryadams} worked with \gls{johnsmith} but never met +\gls{joebloggs}. + +\chapter{\glsentrytext{zoeadams}} + +\gls{zoeadams} was \gls{maryadams}['s] sister. +\printglossaries + +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/sampleSec.pdf b/macros/latex/contrib/glossaries/samples/sampleSec.pdf Binary files differnew file mode 100644 index 0000000000..cd9ac522fe --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sampleSec.pdf diff --git a/macros/latex/contrib/glossaries/samples/sampleSec.tex b/macros/latex/contrib/glossaries/samples/sampleSec.tex new file mode 100644 index 0000000000..f9e5696671 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sampleSec.tex @@ -0,0 +1,64 @@ + % 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: pdflatex: { synctex: on } +\documentclass{report} + +\usepackage[plainpages=false,colorlinks]{hyperref} +\usepackage[style=altlist,toc,counter=section]{glossaries} + +\makeglossaries + +\newglossaryentry{ident}{name=identity matrix, +description=diagonal matrix with 1s along the leading diagonal, +plural=identity matrices} + +\newglossaryentry{diag}{name=diagonal matrix, +description=matrix whose only non-zero entries are along +the leading diagonal, +plural=diagonal matrices} + +\newglossaryentry{sing}{name=singular matrix, +description=matrix with zero determinant, +plural=singular matrices} + +\begin{document} + +\pagenumbering{roman} +\tableofcontents + +\printglossaries + +\chapter{Introduction} +\pagenumbering{arabic} +This is a sample document illustrating the use of the +\textsf{glossaries} package. + +\chapter{Diagonal matrices} + +A \gls[format=hyperit]{diag} is a matrix where all elements not on the +leading diagonal are zero. This is the +primary definition, so an italic font is used for the page number. + +\newpage +\section{Identity matrix} +The \gls[format=hyperit]{ident} is a \gls{diag} whose leading +diagonal elements are all equal to 1. + +Here is another entry for a \gls{diag}. And this is the +plural: \glspl{ident}. + +This adds an entry into the glossary with a bold number, but +it doesn't create a hyperlink: \gls*[format=hyperbf]{ident}. + +\chapter{Singular Matrices} + +A \gls{sing} is a matrix with zero determinant. +\Glspl{sing} are non-invertible. Possessive: +a \gls{sing}['s] dimensions are not necessarily equal. + +Another \gls{ident} entry. + +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/sampleSort.pdf b/macros/latex/contrib/glossaries/samples/sampleSort.pdf Binary files differnew file mode 100644 index 0000000000..107107912e --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sampleSort.pdf diff --git a/macros/latex/contrib/glossaries/samples/sampleSort.tex b/macros/latex/contrib/glossaries/samples/sampleSort.tex new file mode 100644 index 0000000000..ee6350a360 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sampleSort.tex @@ -0,0 +1,105 @@ + % 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: pdflatex: { synctex: on } +\documentclass{report} + + % If you want to add babel to this document, you may have to + % replace the : character in the labels if you are using a + % language setting (e.g. french) that makes : active. + +\usepackage[plainpages=false,colorlinks]{hyperref} +\usepackage[toc,acronym]{glossaries} + + % Define a new glossary type called notation +\newglossary[nlg]{notation}{not}{ntn}{Notation} + +\makeglossaries + +\newcounter{sortcount} + +\renewcommand{\glsprestandardsort}[3]{% + \ifdefstring{#2}{notation}% + {% + \stepcounter{sortcount}% + \edef#1{\glssortnumberfmt{\arabic{sortcount}}}% + }% + {% + \glsdosanitizesort + }% +} + + % Notation definitions + +\newglossaryentry{not:set}{type=notation, % glossary type +name={$\mathcal{S}$}, +text={\mathcal{S}}, +description={A set}} + +\newglossaryentry{not:emptyset}{type=notation, +name={$\emptyset$}, +text={\emptyset}, +description={The empty set}} + +\newglossaryentry{not:card}{type=notation, +name={$|\mathcal{S}|$}, +text={|\mathcal{S}|}, +description={cardinality of $\mathcal{S}$}} + + % Main glossary definitions + +\newglossaryentry{gls:set}{name=set, +description={A collection of distinct objects}} + +\newglossaryentry{gls:card}{name=cardinality, +description={The number of elements in the specified set}} + + % Acronym definitions + +\newacronym{zfc}{ZFC}{Zermelo-Fraenkel set theory} + +\newacronym{ad}{AD}{axiom of determinacy} + +\newacronym{nf}{NF}{new foundations} + +\begin{document} +\title{Sample Document using the glossaries Package} +\author{Nicola Talbot} +\pagenumbering{alph} +\maketitle + +\begin{abstract} + %stop hyperref complaining about duplicate page identifiers: +\pagenumbering{Alph} +This is a sample document illustrating the use of the +\textsf{glossaries} package. In this example, a new glossary type +called \texttt{notation} is defined, so that the document can have a +separate glossary of terms, list of acronyms and index of notation. +\end{abstract} + +\pagenumbering{roman} +\tableofcontents + +\printglossaries + +\chapter{Introduction} +\pagenumbering{arabic} + +\Glspl{gls:set} are denoted by a calligraphic font +e.g.\ $\gls{not:set}$. + +The \gls{gls:card} of a set $\mathcal{S}$ is denoted +$\gls{not:card}$. The empty set is denoted +$\gls{not:emptyset}$. + +Here are some acronyms: \gls{nf}, \gls{zfc} and \gls{ad}. + +\chapter{Another Chapter} + +Another mention of the empty set $\gls{not:emptyset}$. + +Here are the acronyms again: \gls{nf}, \gls{zfc} and \gls{ad}. + +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/sampleaccsupp.pdf b/macros/latex/contrib/glossaries/samples/sampleaccsupp.pdf Binary files differnew file mode 100644 index 0000000000..13b261d835 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sampleaccsupp.pdf diff --git a/macros/latex/contrib/glossaries/samples/sampleaccsupp.tex b/macros/latex/contrib/glossaries/samples/sampleaccsupp.tex new file mode 100644 index 0000000000..342902d8e5 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sampleaccsupp.tex @@ -0,0 +1,43 @@ + % 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 } +\documentclass[a4paper]{article} + +\usepackage[margin=0.5in]{geometry} +\usepackage{booktabs} +\usepackage[acronym]{glossaries-accsupp} + +\makeglossaries + +\newglossaryentry{dr}{name=Dr,description={Doctor},access={Doctor}} + +\newacronym[shortaccess=S V M]{svm}{svm}{support vector machine} + +\newacronym{eg}{e.g.}{for example} + +\newcommand*{\samplerow}[1]{% + \gls{#1} & \gls{#1} & \acrshort{#1} & \acrlong{#1}\\ + \glsreset{#1}\Gls{#1} & \Gls{#1} & \Acrshort{#1} & \Acrlong{#1}\\ + \glsreset{#1}\GLS{#1} & \GLS{#1} & \ACRshort{#1} & \ACRlong{#1}\\ +} + +\begin{document} + +\begin{center} +\begin{tabular}{lllll} +\toprule +\bfseries First & \bfseries Next & \bfseries Short & \bfseries Long +\\\midrule +\samplerow{dr} +\midrule +\samplerow{eg} +\midrule +\samplerow{svm} +\bottomrule +\end{tabular} +\end{center} + +\printglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/sampleacronyms.pdf b/macros/latex/contrib/glossaries/samples/sampleacronyms.pdf Binary files differnew file mode 100644 index 0000000000..3c1aef6115 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sampleacronyms.pdf diff --git a/macros/latex/contrib/glossaries/samples/sampleacronyms.tex b/macros/latex/contrib/glossaries/samples/sampleacronyms.tex new file mode 100644 index 0000000000..f36d71ca1e --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sampleacronyms.tex @@ -0,0 +1,42 @@ + % 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 } +\documentclass{article} + +\usepackage[acronym,acronymlists={main,acronym2}]{glossaries} + +\newglossary[alg2]{acronym2}{acr2}{acn2}{Statistical Acronyms} + +\makeglossaries + + % Use long (short) acronym style: +\setacronymstyle{long-short} + + % Main glossary is a list of calculus acronyms + +\renewcommand{\glossaryname}{Calculus Acronyms} + +\newacronym[type=main]{vc}{VC}{Vector Calculus} +\newacronym[type=main]{ftoc}{FTOC}{Fundamental Theorem of Calculus} + + % "acronym" glossary is a list of computer related acronyms + +\renewcommand{\acronymname}{Computer Acronyms} + +\newacronym{kb}{kb}{KiloBit} +\newacronym{kB}{kB}{KiloByte} + + % "acronym2" glossary is a list of statistical acronyms + +\newacronym[type=acronym2]{svm}{SVM}{Support Vector Machine} + +\begin{document} +\section{Sample Section} +\gls{kb}. \gls{kB}. \gls{vc}. \gls{ftoc}. \gls{svm}. + +\gls{kb}. \gls{kB}. \gls{vc}. \gls{ftoc}. \gls{svm}. + +\printglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/sampletree.pdf b/macros/latex/contrib/glossaries/samples/sampletree.pdf Binary files differnew file mode 100644 index 0000000000..ff20680ff1 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sampletree.pdf diff --git a/macros/latex/contrib/glossaries/samples/sampletree.tex b/macros/latex/contrib/glossaries/samples/sampletree.tex new file mode 100644 index 0000000000..59f8ecd490 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sampletree.tex @@ -0,0 +1,69 @@ + % 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 } +\documentclass{report} + +\usepackage[colorlinks]{hyperref} +\usepackage[style=alttreehypergroup,nolong,nosuper]{glossaries} + + % The alttree type of glossary styles need to know the + % widest entry name for each level +\glssetwidest{Roman letters} % level 0 widest name +\glssetwidest[1]{Sigma} % level 1 widest name + +\makeglossaries + +\newglossaryentry{greekletter}{name={Greek letters}, +text={Greek letter}, +description={\nopostdesc}} + +\newglossaryentry{sigma}{name={Sigma}, +text={\ensuremath{\Sigma}}, +first={\ensuremath{\Sigma} (uppercase sigma)}, +symbol={\ensuremath{\Sigma}}, +description={Used to indicate summation}, +parent=greekletter} + +\newglossaryentry{pi}{name={pi}, +text={\ensuremath{\pi}}, +first={\ensuremath{\pi} (lowercase pi)}, +symbol={\ensuremath{\pi}}, +description={Transcendental number}, +parent=greekletter} + +\newglossaryentry{romanletter}{name={Roman letters}, +text={Roman letter}, +description={\nopostdesc}} + +\newglossaryentry{e}{name={e}, +description={Unique real number such that the derivative of +the function $e^x$ is the function itself}, +parent=romanletter} + +\newglossaryentry{C}{name={C}, +description={Euler's constant}, +parent=romanletter} + +\begin{document} +This is a sample document illustrating hierarchical glossary +entries. + +\chapter{Greek Letters Used in Mathematics} + +Some information about \glspl{greekletter}. +The letter \gls{pi} is used to represent the ratio of a circle's +circumference to its diameter. +The letter \gls{sigma} is used to represent summation. + +\chapter{Roman Letters Used in Mathematics} + +Some information about \glspl{romanletter}. +The letter \gls{e} is the unique real number such that +the derivative of the function $e^x$ is the function itself. +The letter \gls{C} represents Euler's constant. + +\printglossaries + +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/sampleutf8.pdf b/macros/latex/contrib/glossaries/samples/sampleutf8.pdf Binary files differnew file mode 100644 index 0000000000..935922047a --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sampleutf8.pdf diff --git a/macros/latex/contrib/glossaries/samples/sampleutf8.tex b/macros/latex/contrib/glossaries/samples/sampleutf8.tex new file mode 100644 index 0000000000..ae3fea7ed0 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/sampleutf8.tex @@ -0,0 +1,53 @@ + % 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 } +\documentclass{article} + +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[xindy,nonumberlist,style=listgroup]{glossaries} + +\makeglossaries + + % Note that because the é is the first letter of the + % name, it needs to be grouped or it will cause a + % problem for \makefirstuc due to expansion issues. +\newglossaryentry{elite}{name={{é}lite}, +description={select group or class}} + +\newglossaryentry{elephant}{name=elephant, +description={large animal with trunk and tusks}} + +\newglossaryentry{elk}{name=elk, +description=large deer} + +\newglossaryentry{mannerly}{name=mannerly, +description=polite} + + % The œ is not the first letter, so it doesn't need to + % be grouped. +\newglossaryentry{manoeuvre}{name={manœuvre}, +description=planned and controlled movement} + +\newglossaryentry{manor}{name=manor, +description=large landed estate or its house} + +\newglossaryentry{odometer}{name=odometer, +description=instrument for measuring distance travelled by +a wheeled vehicle} + +\newglossaryentry{oesophagus}{name={{œ}sophagus}, +plural={{œ}sophagi}, +description={canal from mouth to stomach}} + +\newglossaryentry{ogre}{name=ogre, +description=man-eating giant} + +\begin{document} +\glsaddall + +\printglossaries + +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/samplexdy-mc.xdy b/macros/latex/contrib/glossaries/samples/samplexdy-mc.xdy new file mode 100644 index 0000000000..22f392f9aa --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/samplexdy-mc.xdy @@ -0,0 +1,852 @@ +;; xindy style file for samplexdy.tex that has Mc letter group + +(define-letter-group "A" :prefixes ("")) +(define-letter-group "B" :after "A" :prefixes ("")) +(define-letter-group "C" :after "B" :prefixes ("")) +(define-letter-group "D" :after "C" :prefixes ("")) +(define-letter-group "E" :after "D" :prefixes ("")) +(define-letter-group "F" :after "E" :prefixes ("")) +(define-letter-group "G" :after "F" :prefixes ("")) +(define-letter-group "H" :after "G" :prefixes ("¤")) +(define-letter-group "I" :after "H" :prefixes ("¨")) +(define-letter-group "J" :after "I" :prefixes ("¬")) +(define-letter-group "K" :after "J" :prefixes ("®")) +(define-letter-group "L" :after "K" :prefixes ("´")) +(define-letter-group "Mc" :after "L" :prefixes ("»")) +(define-letter-group "M" :after "Mc" :prefixes ("»")) +(define-letter-group "N" :after "M" :prefixes ("¼")) +(define-letter-group "O" :after "N" :prefixes ("Ã")) +(define-letter-group "P" :after "O" :prefixes ("È")) +(define-letter-group "Q" :after "P" :prefixes ("Ê")) +(define-letter-group "R" :after "Q" :prefixes ("Ë")) +(define-letter-group "S" :after "R" :prefixes ("Ð")) +(define-letter-group "T" :after "S" :prefixes ("Ú")) +(define-letter-group "U" :after "T" :prefixes ("à")) +(define-letter-group "V" :after "U" :prefixes ("å")) +(define-letter-group "W" :after "V" :prefixes ("æ")) +(define-letter-group "X" :after "W" :prefixes ("ë")) +(define-letter-group "Y" :after "X" :prefixes ("í")) +(define-letter-group "È" :after "Y" :prefixes ("ï")) +(define-letter-group "Z" :after "È" :prefixes ("ð")) +(define-letter-group "Ã" :after "Z" :prefixes ("ö")) +(define-letter-group "Æ¿" :after "Ã" :prefixes ("÷")) + +(define-rule-set "en-alphabetize" + + :rules (("à " "" :string) + ("Ã" "" :string) + ("Ã" "" :string) + ("æ" "" :string) + ("Ã" "" :string) + ("ç" "" :string) + ("ð" "" :string) + ("Ã" "" :string) + ("Ã" "" :string) + ("Ã" "" :string) + ("Ã" "" :string) + ("Ã" "" :string) + ("è" "" :string) + ("ë" "" :string) + ("ê" "" :string) + ("é" "" :string) + ("Ã" "¨" :string) + ("ï" "¨" :string) + ("Ã" "¼" :string) + ("ñ" "¼" :string) + ("Ã" "Ã" :string) + ("Ã" "Ã" :string) + ("ô" "Ã" :string) + ("ö" "Ã" :string) + ("Å" "Ã" :string) + ("Å" "Ã" :string) + ("È" "ï" :string) + ("È" "ï" :string) + ("þ" "ö" :string) + ("Ã" "ö" :string) + ("Ç·" "÷" :string) + ("Æ¿" "÷" :string) + ("a" "" :string) + ("A" "" :string) + ("b" "" :string) + ("B" "" :string) + ("C" "" :string) + ("c" "" :string) + ("d" "" :string) + ("D" "" :string) + ("E" "" :string) + ("e" "" :string) + ("F" "" :string) + ("f" "" :string) + ("g" "" :string) + ("G" "" :string) + ("H" "¤" :string) + ("h" "¤" :string) + ("I" "¨" :string) + ("i" "¨" :string) + ("J" "¬" :string) + ("j" "¬" :string) + ("K" "®" :string) + ("k" "®" :string) + ("L" "´" :string) + ("l" "´" :string) + ("Mc" "»" :string) + ("Mac" "»" :string) + ("M" "»" :string) + ("m" "»" :string) + ("N" "¼" :string) + ("n" "¼" :string) + ("O" "Ã" :string) + ("o" "Ã" :string) + ("P" "È" :string) + ("p" "È" :string) + ("q" "Ê" :string) + ("Q" "Ê" :string) + ("r" "Ë" :string) + ("R" "Ë" :string) + ("S" "Ð" :string) + ("s" "Ð" :string) + ("T" "Ú" :string) + ("t" "Ú" :string) + ("u" "à" :string) + ("U" "à" :string) + ("v" "å" :string) + ("V" "å" :string) + ("w" "æ" :string) + ("W" "æ" :string) + ("X" "ë" :string) + ("x" "ë" :string) + ("Y" "í" :string) + ("y" "í" :string) + ("z" "ð" :string) + ("Z" "ð" :string) + )) + +(define-rule-set "en-resolve-diacritics" + + :rules (("È" "¢" :string) + ("þ" "¢" :string) + ("Ç·" "¢" :string) + ("Ã" "¢" :string) + ("È" "¢" :string) + ("Æ¿" "¢" :string) + ("Ã" "£" :string) + ("Ã" "£" :string) + ("ð" "£" :string) + ("Ã" "£" :string) + ("Ã" "£" :string) + ("Ã" "£" :string) + ("ï" "£" :string) + ("ö" "£" :string) + ("ñ" "£" :string) + ("ç" "£" :string) + ("à " "£" :string) + ("Ã" "£" :string) + ("é" "£" :string) + ("Ã" "£" :string) + ("Ã" "¤" :string) + ("ô" "¤" :string) + ("Ã" "¤" :string) + ("è" "¤" :string) + ("Ã" "¥" :string) + ("ë" "¥" :string) + ("Ã" "¦" :string) + ("ê" "¦" :string) + ("Å" "ÿ" :string) + ("Ã" "ÿ" :string) + ("Å" "ÿ" :string) + ("æ" "ÿ" :string) + ("S" "¢" :string) + ("K" "¢" :string) + ("d" "¢" :string) + ("Y" "¢" :string) + ("E" "¢" :string) + ("y" "¢" :string) + ("g" "¢" :string) + ("e" "¢" :string) + ("J" "¢" :string) + ("q" "¢" :string) + ("D" "¢" :string) + ("b" "¢" :string) + ("z" "¢" :string) + ("w" "¢" :string) + ("Q" "¢" :string) + ("M" "¢" :string) + ("C" "¢" :string) + ("L" "¢" :string) + ("X" "¢" :string) + ("P" "¢" :string) + ("T" "¢" :string) + ("a" "¢" :string) + ("N" "¢" :string) + ("j" "¢" :string) + ("Z" "¢" :string) + ("u" "¢" :string) + ("k" "¢" :string) + ("t" "¢" :string) + ("W" "¢" :string) + ("v" "¢" :string) + ("s" "¢" :string) + ("B" "¢" :string) + ("H" "¢" :string) + ("c" "¢" :string) + ("I" "¢" :string) + ("G" "¢" :string) + ("U" "¢" :string) + ("F" "¢" :string) + ("r" "¢" :string) + ("x" "¢" :string) + ("V" "¢" :string) + ("h" "¢" :string) + ("f" "¢" :string) + ("i" "¢" :string) + ("A" "¢" :string) + ("O" "¢" :string) + ("n" "¢" :string) + ("m" "¢" :string) + ("l" "¢" :string) + ("p" "¢" :string) + ("R" "¢" :string) + ("o" "¢" :string) + )) + +(define-rule-set "en-resolve-case" + + :rules (("Ã" "8" :string) + ("Ã" "8" :string) + ("Ã" "8" :string) + ("Ã" "8" :string) + ("Ã" "8" :string) + ("Ã" "8" :string) + ("Ã" "8" :string) + ("Ã" "8" :string) + ("Ã" "8" :string) + ("Ç·" "8" :string) + ("Ã" "8" :string) + ("Ã" "8" :string) + ("È" "8" :string) + ("Ã" "8" :string) + ("Ã" "89" :string) + ("Å" "89" :string) + ("ð" "9" :string) + ("ô" "9" :string) + ("È" "9" :string) + ("ï" "9" :string) + ("ö" "9" :string) + ("ñ" "9" :string) + ("ç" "9" :string) + ("à " "9" :string) + ("þ" "9" :string) + ("è" "9" :string) + ("ë" "9" :string) + ("ê" "9" :string) + ("é" "9" :string) + ("Æ¿" "9" :string) + ("Å" "99" :string) + ("æ" "99" :string) + ("S" "8" :string) + ("K" "8" :string) + ("Y" "8" :string) + ("E" "8" :string) + ("J" "8" :string) + ("D" "8" :string) + ("Q" "8" :string) + ("M" "8" :string) + ("C" "8" :string) + ("L" "8" :string) + ("X" "8" :string) + ("P" "8" :string) + ("T" "8" :string) + ("N" "8" :string) + ("Z" "8" :string) + ("W" "8" :string) + ("B" "8" :string) + ("H" "8" :string) + ("I" "8" :string) + ("G" "8" :string) + ("U" "8" :string) + ("F" "8" :string) + ("V" "8" :string) + ("A" "8" :string) + ("O" "8" :string) + ("R" "8" :string) + ("d" "9" :string) + ("y" "9" :string) + ("g" "9" :string) + ("e" "9" :string) + ("q" "9" :string) + ("b" "9" :string) + ("z" "9" :string) + ("w" "9" :string) + ("a" "9" :string) + ("j" "9" :string) + ("u" "9" :string) + ("k" "9" :string) + ("t" "9" :string) + ("v" "9" :string) + ("s" "9" :string) + ("c" "9" :string) + ("r" "9" :string) + ("x" "9" :string) + ("h" "9" :string) + ("f" "9" :string) + ("i" "9" :string) + ("n" "9" :string) + ("m" "9" :string) + ("l" "9" :string) + ("p" "9" :string) + ("o" "9" :string) + )) + +(define-rule-set "en-ignore-special" + + :rules (("-" "" :string) + ("!" "" :string) + ("{" "" :string) + ("'" "" :string) + ("}" "" :string) + ("?" "" :string) + ("." "" :string) + )) + +(define-rule-set "en-resolve-special" + + :rules (("Ã" "¤" :string) + ("Ã" "¤" :string) + ("ð" "¤" :string) + ("Ã" "¤" :string) + ("Ã" "¤" :string) + ("Ã" "¤" :string) + ("ô" "¤" :string) + ("Ã" "¤" :string) + ("È" "¤" :string) + ("ï" "¤" :string) + ("Ã" "¤" :string) + ("ö" "¤" :string) + ("ñ" "¤" :string) + ("Ã" "¤" :string) + ("ç" "¤" :string) + ("Ã" "¤" :string) + ("à " "¤" :string) + ("þ" "¤" :string) + ("Ç·" "¤" :string) + ("è" "¤" :string) + ("Ã" "¤" :string) + ("ë" "¤" :string) + ("Ã" "¤" :string) + ("ê" "¤" :string) + ("é" "¤" :string) + ("È" "¤" :string) + ("Æ¿" "¤" :string) + ("Ã" "¤" :string) + ("Å" "¤¤" :string) + ("Ã" "¤¤" :string) + ("Å" "¤¤" :string) + ("æ" "¤¤" :string) + ("?" "¡" :string) + ("!" "¢" :string) + ("." "£" :string) + ("S" "¤" :string) + ("K" "¤" :string) + ("d" "¤" :string) + ("Y" "¤" :string) + ("E" "¤" :string) + ("y" "¤" :string) + ("g" "¤" :string) + ("e" "¤" :string) + ("J" "¤" :string) + ("q" "¤" :string) + ("D" "¤" :string) + ("b" "¤" :string) + ("z" "¤" :string) + ("w" "¤" :string) + ("Q" "¤" :string) + ("M" "¤" :string) + ("C" "¤" :string) + ("L" "¤" :string) + ("X" "¤" :string) + ("P" "¤" :string) + ("T" "¤" :string) + ("a" "¤" :string) + ("N" "¤" :string) + ("j" "¤" :string) + ("Z" "¤" :string) + ("u" "¤" :string) + ("k" "¤" :string) + ("t" "¤" :string) + ("W" "¤" :string) + ("v" "¤" :string) + ("s" "¤" :string) + ("B" "¤" :string) + ("H" "¤" :string) + ("c" "¤" :string) + ("I" "¤" :string) + ("G" "¤" :string) + ("U" "¤" :string) + ("F" "¤" :string) + ("r" "¤" :string) + ("x" "¤" :string) + ("V" "¤" :string) + ("h" "¤" :string) + ("f" "¤" :string) + ("i" "¤" :string) + ("A" "¤" :string) + ("O" "¤" :string) + ("n" "¤" :string) + ("m" "¤" :string) + ("l" "¤" :string) + ("p" "¤" :string) + ("R" "¤" :string) + ("o" "¤" :string) + ("-" "¥" :string) + ("'" "¦" :string) + ("{" "§" :string) + ("}" "¨" :string) + )) + +; The following section is customised for samplexdy.tex +; (copied from samplexdy.xdy automatically generated by +; samplexdy.tex) + +; required styles + +(require "tex.xdy") + +; list of allowed attributes (number formats) + +(define-attributes (("default" + "hyperbfit" + "pagehyperbfit" + "glsnumberformat" + "pageglsnumberformat" + "textrm" + "pagetextrm" + "textsf" + "pagetextsf" + "texttt" + "pagetexttt" + "textbf" + "pagetextbf" + "textmd" + "pagetextmd" + "textit" + "pagetextit" + "textup" + "pagetextup" + "textsl" + "pagetextsl" + "textsc" + "pagetextsc" + "emph" + "pageemph" + "glshypernumber" + "pageglshypernumber" + "hyperrm" + "pagehyperrm" + "hypersf" + "pagehypersf" + "hypertt" + "pagehypertt" + "hyperbf" + "pagehyperbf" + "hypermd" + "pagehypermd" + "hyperit" + "pagehyperit" + "hyperup" + "pagehyperup" + "hypersl" + "pagehypersl" + "hypersc" + "pagehypersc" + "hyperemph" + "pagehyperemph"))) + +; user defined alphabets + +; location class definitions + +(define-location-class "roman-page-numbers" + ( :sep "{}{" "roman-numbers-lowercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "roman-page-numbers-roman-page-numbers" + ( :sep "{" "roman-numbers-lowercase" :sep "}{" "roman-numbers-lowercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Roman-page-numbers-roman-page-numbers" + ( :sep "{" "roman-numbers-uppercase" :sep "}{" "roman-numbers-lowercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-page-numbers-roman-page-numbers" + ( :sep "{" "arabic-numbers" :sep "}{" "roman-numbers-lowercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "alpha-page-numbers-roman-page-numbers" + ( :sep "{" "alpha" :sep "}{" "roman-numbers-lowercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Alpha-page-numbers-roman-page-numbers" + ( :sep "{" "ALPHA" :sep "}{" "roman-numbers-lowercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Appendix-page-numbers-roman-page-numbers" + ( :sep "{" "ALPHA" :sep "." "arabic-numbers" :sep "}{" "roman-numbers-lowercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-section-numbers-roman-page-numbers" + ( :sep "{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}{" "roman-numbers-lowercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Roman-page-numbers" + ( :sep "{}{" "roman-numbers-uppercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "roman-page-numbers-Roman-page-numbers" + ( :sep "{" "roman-numbers-lowercase" :sep "}{" "roman-numbers-uppercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Roman-page-numbers-Roman-page-numbers" + ( :sep "{" "roman-numbers-uppercase" :sep "}{" "roman-numbers-uppercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-page-numbers-Roman-page-numbers" + ( :sep "{" "arabic-numbers" :sep "}{" "roman-numbers-uppercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "alpha-page-numbers-Roman-page-numbers" + ( :sep "{" "alpha" :sep "}{" "roman-numbers-uppercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Alpha-page-numbers-Roman-page-numbers" + ( :sep "{" "ALPHA" :sep "}{" "roman-numbers-uppercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Appendix-page-numbers-Roman-page-numbers" + ( :sep "{" "ALPHA" :sep "." "arabic-numbers" :sep "}{" "roman-numbers-uppercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-section-numbers-Roman-page-numbers" + ( :sep "{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}{" "roman-numbers-uppercase" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-page-numbers" + ( :sep "{}{" "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "roman-page-numbers-arabic-page-numbers" + ( :sep "{" "roman-numbers-lowercase" :sep "}{" "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Roman-page-numbers-arabic-page-numbers" + ( :sep "{" "roman-numbers-uppercase" :sep "}{" "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-page-numbers-arabic-page-numbers" + ( :sep "{" "arabic-numbers" :sep "}{" "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "alpha-page-numbers-arabic-page-numbers" + ( :sep "{" "alpha" :sep "}{" "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Alpha-page-numbers-arabic-page-numbers" + ( :sep "{" "ALPHA" :sep "}{" "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Appendix-page-numbers-arabic-page-numbers" + ( :sep "{" "ALPHA" :sep "." "arabic-numbers" :sep "}{" "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-section-numbers-arabic-page-numbers" + ( :sep "{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}{" "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "alpha-page-numbers" + ( :sep "{}{" "alpha" :sep "}" ) + :min-range-length 2 +) +(define-location-class "roman-page-numbers-alpha-page-numbers" + ( :sep "{" "roman-numbers-lowercase" :sep "}{" "alpha" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Roman-page-numbers-alpha-page-numbers" + ( :sep "{" "roman-numbers-uppercase" :sep "}{" "alpha" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-page-numbers-alpha-page-numbers" + ( :sep "{" "arabic-numbers" :sep "}{" "alpha" :sep "}" ) + :min-range-length 2 +) +(define-location-class "alpha-page-numbers-alpha-page-numbers" + ( :sep "{" "alpha" :sep "}{" "alpha" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Alpha-page-numbers-alpha-page-numbers" + ( :sep "{" "ALPHA" :sep "}{" "alpha" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Appendix-page-numbers-alpha-page-numbers" + ( :sep "{" "ALPHA" :sep "." "arabic-numbers" :sep "}{" "alpha" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-section-numbers-alpha-page-numbers" + ( :sep "{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}{" "alpha" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Alpha-page-numbers" + ( :sep "{}{" "ALPHA" :sep "}" ) + :min-range-length 2 +) +(define-location-class "roman-page-numbers-Alpha-page-numbers" + ( :sep "{" "roman-numbers-lowercase" :sep "}{" "ALPHA" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Roman-page-numbers-Alpha-page-numbers" + ( :sep "{" "roman-numbers-uppercase" :sep "}{" "ALPHA" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-page-numbers-Alpha-page-numbers" + ( :sep "{" "arabic-numbers" :sep "}{" "ALPHA" :sep "}" ) + :min-range-length 2 +) +(define-location-class "alpha-page-numbers-Alpha-page-numbers" + ( :sep "{" "alpha" :sep "}{" "ALPHA" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Alpha-page-numbers-Alpha-page-numbers" + ( :sep "{" "ALPHA" :sep "}{" "ALPHA" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Appendix-page-numbers-Alpha-page-numbers" + ( :sep "{" "ALPHA" :sep "." "arabic-numbers" :sep "}{" "ALPHA" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-section-numbers-Alpha-page-numbers" + ( :sep "{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}{" "ALPHA" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Appendix-page-numbers" + ( :sep "{}{" "ALPHA" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "roman-page-numbers-Appendix-page-numbers" + ( :sep "{" "roman-numbers-lowercase" :sep "}{" "ALPHA" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Roman-page-numbers-Appendix-page-numbers" + ( :sep "{" "roman-numbers-uppercase" :sep "}{" "ALPHA" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-page-numbers-Appendix-page-numbers" + ( :sep "{" "arabic-numbers" :sep "}{" "ALPHA" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "alpha-page-numbers-Appendix-page-numbers" + ( :sep "{" "alpha" :sep "}{" "ALPHA" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Alpha-page-numbers-Appendix-page-numbers" + ( :sep "{" "ALPHA" :sep "}{" "ALPHA" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Appendix-page-numbers-Appendix-page-numbers" + ( :sep "{" "ALPHA" :sep "." "arabic-numbers" :sep "}{" "ALPHA" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-section-numbers-Appendix-page-numbers" + ( :sep "{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}{" "ALPHA" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-section-numbers" + ( :sep "{}{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "roman-page-numbers-arabic-section-numbers" + ( :sep "{" "roman-numbers-lowercase" :sep "}{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Roman-page-numbers-arabic-section-numbers" + ( :sep "{" "roman-numbers-uppercase" :sep "}{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-page-numbers-arabic-section-numbers" + ( :sep "{" "arabic-numbers" :sep "}{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "alpha-page-numbers-arabic-section-numbers" + ( :sep "{" "alpha" :sep "}{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Alpha-page-numbers-arabic-section-numbers" + ( :sep "{" "ALPHA" :sep "}{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "Appendix-page-numbers-arabic-section-numbers" + ( :sep "{" "ALPHA" :sep "." "arabic-numbers" :sep "}{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) +(define-location-class "arabic-section-numbers-arabic-section-numbers" + ( :sep "{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}{" "arabic-numbers" :sep "." "arabic-numbers" :sep "}" ) + :min-range-length 2 +) + +; user defined location classes + +(define-location-class "Numberstring" + (:sep "{}{" :sep "\protect \Numberstringnum {" "arabic-numbers" :sep "}" :sep "}")) + +; define cross-reference class + +(define-crossref-class "see" :unverified ) +(markup-crossref-list :class "see" + :open "\glsseeformat" :close "{}") + +; define the order of the location classes +(define-location-class-order ( + "roman-page-numbers" + "arabic-page-numbers" + "arabic-section-numbers" + "alpha-page-numbers" + "Roman-page-numbers" + "Alpha-page-numbers" + "Appendix-page-numbers" + "see" )) + +; define the glossary markup + +(markup-index + :open "\glossarysection[\glossarytoctitle]{\glossarytitle}\glossarypreamble +\providecommand*\glsXpageXhyperbfit[2]{\setentrycounter[#1]{page}\hyperbfit{#2}} +\providecommand*\glsXpageXglsnumberformat[2]{\setentrycounter[#1]{page}\glsnumberformat{#2}} +\providecommand*\glsXpageXtextrm[2]{\setentrycounter[#1]{page}\textrm{#2}} +\providecommand*\glsXpageXtextsf[2]{\setentrycounter[#1]{page}\textsf{#2}} +\providecommand*\glsXpageXtexttt[2]{\setentrycounter[#1]{page}\texttt{#2}} +\providecommand*\glsXpageXtextbf[2]{\setentrycounter[#1]{page}\textbf{#2}} +\providecommand*\glsXpageXtextmd[2]{\setentrycounter[#1]{page}\textmd{#2}} +\providecommand*\glsXpageXtextit[2]{\setentrycounter[#1]{page}\textit{#2}} +\providecommand*\glsXpageXtextup[2]{\setentrycounter[#1]{page}\textup{#2}} +\providecommand*\glsXpageXtextsl[2]{\setentrycounter[#1]{page}\textsl{#2}} +\providecommand*\glsXpageXtextsc[2]{\setentrycounter[#1]{page}\textsc{#2}} +\providecommand*\glsXpageXemph[2]{\setentrycounter[#1]{page}\emph{#2}} +\providecommand*\glsXpageXglshypernumber[2]{\setentrycounter[#1]{page}\glshypernumber{#2}} +\providecommand*\glsXpageXhyperrm[2]{\setentrycounter[#1]{page}\hyperrm{#2}} +\providecommand*\glsXpageXhypersf[2]{\setentrycounter[#1]{page}\hypersf{#2}} +\providecommand*\glsXpageXhypertt[2]{\setentrycounter[#1]{page}\hypertt{#2}} +\providecommand*\glsXpageXhyperbf[2]{\setentrycounter[#1]{page}\hyperbf{#2}} +\providecommand*\glsXpageXhypermd[2]{\setentrycounter[#1]{page}\hypermd{#2}} +\providecommand*\glsXpageXhyperit[2]{\setentrycounter[#1]{page}\hyperit{#2}} +\providecommand*\glsXpageXhyperup[2]{\setentrycounter[#1]{page}\hyperup{#2}} +\providecommand*\glsXpageXhypersl[2]{\setentrycounter[#1]{page}\hypersl{#2}} +\providecommand*\glsXpageXhypersc[2]{\setentrycounter[#1]{page}\hypersc{#2}} +\providecommand*\glsXpageXhyperemph[2]{\setentrycounter[#1]{page}\hyperemph{#2}} +\begin{theglossary}\glossaryheader~n" + :close "%~n\end{theglossary}\glossarypostamble~n" + :tree) +(markup-letter-group-list :sep "\glsgroupskip~n") +(markup-indexentry :open "\relax\glsresetentrylist~n") +(markup-locclass-list :open "{\glossaryentrynumbers{\relax " + :sep ", " :close "}}") +(markup-locref-list :sep "\delimN ") +(markup-range :sep "\delimR ") + +; define format to use for locations + +(markup-locref :open "~n\glsXpageXhyperbfit" + :close "" + :attr "pagehyperbfit") +(markup-locref :open "~n\glsXpageXglsnumberformat" + :close "" + :attr "pageglsnumberformat") +(markup-locref :open "~n\glsXpageXtextrm" + :close "" + :attr "pagetextrm") +(markup-locref :open "~n\glsXpageXtextsf" + :close "" + :attr "pagetextsf") +(markup-locref :open "~n\glsXpageXtexttt" + :close "" + :attr "pagetexttt") +(markup-locref :open "~n\glsXpageXtextbf" + :close "" + :attr "pagetextbf") +(markup-locref :open "~n\glsXpageXtextmd" + :close "" + :attr "pagetextmd") +(markup-locref :open "~n\glsXpageXtextit" + :close "" + :attr "pagetextit") +(markup-locref :open "~n\glsXpageXtextup" + :close "" + :attr "pagetextup") +(markup-locref :open "~n\glsXpageXtextsl" + :close "" + :attr "pagetextsl") +(markup-locref :open "~n\glsXpageXtextsc" + :close "" + :attr "pagetextsc") +(markup-locref :open "~n\glsXpageXemph" + :close "" + :attr "pageemph") +(markup-locref :open "~n\glsXpageXglshypernumber" + :close "" + :attr "pageglshypernumber") +(markup-locref :open "~n\glsXpageXhyperrm" + :close "" + :attr "pagehyperrm") +(markup-locref :open "~n\glsXpageXhypersf" + :close "" + :attr "pagehypersf") +(markup-locref :open "~n\glsXpageXhypertt" + :close "" + :attr "pagehypertt") +(markup-locref :open "~n\glsXpageXhyperbf" + :close "" + :attr "pagehyperbf") +(markup-locref :open "~n\glsXpageXhypermd" + :close "" + :attr "pagehypermd") +(markup-locref :open "~n\glsXpageXhyperit" + :close "" + :attr "pagehyperit") +(markup-locref :open "~n\glsXpageXhyperup" + :close "" + :attr "pagehyperup") +(markup-locref :open "~n\glsXpageXhypersl" + :close "" + :attr "pagehypersl") +(markup-locref :open "~n\glsXpageXhypersc" + :close "" + :attr "pagehypersc") +(markup-locref :open "~n\glsXpageXhyperemph" + :close "" + :attr "pagehyperemph") + +; define letter group list format + +(markup-letter-group-list :sep "\glsgroupskip~n") + +; letter group headings + +(markup-letter-group :open-head "\glsgroupheading{" + :close-head "}") + +; additional letter groups + +(define-letter-group "glsnumbers" + :prefixes ("0" "1" "2" "3" "4" "5" "6" "7" "8" "9") + :before "A") + +; additional sort rules + +; The following is copied from xindy/lang/english/utf8-lang.xdy + +(define-sort-rule-orientations (forward backward forward forward)) +(use-rule-set :run 0 + :rule-set ("en-alphabetize" "en-ignore-special")) +(use-rule-set :run 1 + :rule-set ("en-resolve-diacritics" "en-ignore-special")) +(use-rule-set :run 2 + :rule-set ("en-resolve-case" "en-ignore-special")) +(use-rule-set :run 3 + :rule-set ("en-resolve-special")) + diff --git a/macros/latex/contrib/glossaries/samples/samplexdy-mc207.xdy b/macros/latex/contrib/glossaries/samples/samplexdy-mc207.xdy new file mode 100644 index 0000000000..7c8d2b9e48 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/samplexdy-mc207.xdy @@ -0,0 +1,591 @@ +;; xindy style file for samplexdy.tex that has Mc letter group + +(define-letter-group "A" :prefixes ("")) +(define-letter-group "B" :after "A" :prefixes ("")) +(define-letter-group "C" :after "B" :prefixes ("")) +(define-letter-group "D" :after "C" :prefixes ("")) +(define-letter-group "E" :after "D" :prefixes ("")) +(define-letter-group "F" :after "E" :prefixes ("")) +(define-letter-group "G" :after "F" :prefixes ("")) +(define-letter-group "H" :after "G" :prefixes ("¤")) +(define-letter-group "I" :after "H" :prefixes ("¨")) +(define-letter-group "J" :after "I" :prefixes ("¬")) +(define-letter-group "K" :after "J" :prefixes ("®")) +(define-letter-group "L" :after "K" :prefixes ("´")) +(define-letter-group "Mc" :after "L" :prefixes ("»")) +(define-letter-group "M" :after "Mc" :prefixes ("»")) +(define-letter-group "N" :after "M" :prefixes ("¼")) +(define-letter-group "O" :after "N" :prefixes ("Ã")) +(define-letter-group "P" :after "O" :prefixes ("È")) +(define-letter-group "Q" :after "P" :prefixes ("Ê")) +(define-letter-group "R" :after "Q" :prefixes ("Ë")) +(define-letter-group "S" :after "R" :prefixes ("Ð")) +(define-letter-group "T" :after "S" :prefixes ("Ú")) +(define-letter-group "U" :after "T" :prefixes ("à")) +(define-letter-group "V" :after "U" :prefixes ("å")) +(define-letter-group "W" :after "V" :prefixes ("æ")) +(define-letter-group "X" :after "W" :prefixes ("ë")) +(define-letter-group "Y" :after "X" :prefixes ("í")) +(define-letter-group "È" :after "Y" :prefixes ("ï")) +(define-letter-group "Z" :after "È" :prefixes ("ð")) +(define-letter-group "Ã" :after "Z" :prefixes ("ö")) +(define-letter-group "Æ¿" :after "Ã" :prefixes ("÷")) + +(define-rule-set "en-alphabetize" + + :rules (("à " "" :string) + ("Ã" "" :string) + ("Ã" "" :string) + ("æ" "" :string) + ("Ã" "" :string) + ("ç" "" :string) + ("ð" "" :string) + ("Ã" "" :string) + ("Ã" "" :string) + ("Ã" "" :string) + ("Ã" "" :string) + ("Ã" "" :string) + ("è" "" :string) + ("ë" "" :string) + ("ê" "" :string) + ("é" "" :string) + ("Ã" "¨" :string) + ("ï" "¨" :string) + ("Ã" "¼" :string) + ("ñ" "¼" :string) + ("Ã" "Ã" :string) + ("Ã" "Ã" :string) + ("ô" "Ã" :string) + ("ö" "Ã" :string) + ("Å" "Ã" :string) + ("Å" "Ã" :string) + ("È" "ï" :string) + ("È" "ï" :string) + ("þ" "ö" :string) + ("Ã" "ö" :string) + ("Ç·" "÷" :string) + ("Æ¿" "÷" :string) + ("a" "" :string) + ("A" "" :string) + ("b" "" :string) + ("B" "" :string) + ("C" "" :string) + ("c" "" :string) + ("d" "" :string) + ("D" "" :string) + ("E" "" :string) + ("e" "" :string) + ("F" "" :string) + ("f" "" :string) + ("g" "" :string) + ("G" "" :string) + ("H" "¤" :string) + ("h" "¤" :string) + ("I" "¨" :string) + ("i" "¨" :string) + ("J" "¬" :string) + ("j" "¬" :string) + ("K" "®" :string) + ("k" "®" :string) + ("L" "´" :string) + ("l" "´" :string) + ("Mc" "»" :string) + ("Mac" "»" :string) + ("M" "»" :string) + ("m" "»" :string) + ("N" "¼" :string) + ("n" "¼" :string) + ("O" "Ã" :string) + ("o" "Ã" :string) + ("P" "È" :string) + ("p" "È" :string) + ("q" "Ê" :string) + ("Q" "Ê" :string) + ("r" "Ë" :string) + ("R" "Ë" :string) + ("S" "Ð" :string) + ("s" "Ð" :string) + ("T" "Ú" :string) + ("t" "Ú" :string) + ("u" "à" :string) + ("U" "à" :string) + ("v" "å" :string) + ("V" "å" :string) + ("w" "æ" :string) + ("W" "æ" :string) + ("X" "ë" :string) + ("x" "ë" :string) + ("Y" "í" :string) + ("y" "í" :string) + ("z" "ð" :string) + ("Z" "ð" :string) + )) + +(define-rule-set "en-resolve-diacritics" + + :rules (("È" "¢" :string) + ("þ" "¢" :string) + ("Ç·" "¢" :string) + ("Ã" "¢" :string) + ("È" "¢" :string) + ("Æ¿" "¢" :string) + ("Ã" "£" :string) + ("Ã" "£" :string) + ("ð" "£" :string) + ("Ã" "£" :string) + ("Ã" "£" :string) + ("Ã" "£" :string) + ("ï" "£" :string) + ("ö" "£" :string) + ("ñ" "£" :string) + ("ç" "£" :string) + ("à " "£" :string) + ("Ã" "£" :string) + ("é" "£" :string) + ("Ã" "£" :string) + ("Ã" "¤" :string) + ("ô" "¤" :string) + ("Ã" "¤" :string) + ("è" "¤" :string) + ("Ã" "¥" :string) + ("ë" "¥" :string) + ("Ã" "¦" :string) + ("ê" "¦" :string) + ("Å" "ÿ" :string) + ("Ã" "ÿ" :string) + ("Å" "ÿ" :string) + ("æ" "ÿ" :string) + ("S" "¢" :string) + ("K" "¢" :string) + ("d" "¢" :string) + ("Y" "¢" :string) + ("E" "¢" :string) + ("y" "¢" :string) + ("g" "¢" :string) + ("e" "¢" :string) + ("J" "¢" :string) + ("q" "¢" :string) + ("D" "¢" :string) + ("b" "¢" :string) + ("z" "¢" :string) + ("w" "¢" :string) + ("Q" "¢" :string) + ("M" "¢" :string) + ("C" "¢" :string) + ("L" "¢" :string) + ("X" "¢" :string) + ("P" "¢" :string) + ("T" "¢" :string) + ("a" "¢" :string) + ("N" "¢" :string) + ("j" "¢" :string) + ("Z" "¢" :string) + ("u" "¢" :string) + ("k" "¢" :string) + ("t" "¢" :string) + ("W" "¢" :string) + ("v" "¢" :string) + ("s" "¢" :string) + ("B" "¢" :string) + ("H" "¢" :string) + ("c" "¢" :string) + ("I" "¢" :string) + ("G" "¢" :string) + ("U" "¢" :string) + ("F" "¢" :string) + ("r" "¢" :string) + ("x" "¢" :string) + ("V" "¢" :string) + ("h" "¢" :string) + ("f" "¢" :string) + ("i" "¢" :string) + ("A" "¢" :string) + ("O" "¢" :string) + ("n" "¢" :string) + ("m" "¢" :string) + ("l" "¢" :string) + ("p" "¢" :string) + ("R" "¢" :string) + ("o" "¢" :string) + )) + +(define-rule-set "en-resolve-case" + + :rules (("Ã" "8" :string) + ("Ã" "8" :string) + ("Ã" "8" :string) + ("Ã" "8" :string) + ("Ã" "8" :string) + ("Ã" "8" :string) + ("Ã" "8" :string) + ("Ã" "8" :string) + ("Ã" "8" :string) + ("Ç·" "8" :string) + ("Ã" "8" :string) + ("Ã" "8" :string) + ("È" "8" :string) + ("Ã" "8" :string) + ("Ã" "89" :string) + ("Å" "89" :string) + ("ð" "9" :string) + ("ô" "9" :string) + ("È" "9" :string) + ("ï" "9" :string) + ("ö" "9" :string) + ("ñ" "9" :string) + ("ç" "9" :string) + ("à " "9" :string) + ("þ" "9" :string) + ("è" "9" :string) + ("ë" "9" :string) + ("ê" "9" :string) + ("é" "9" :string) + ("Æ¿" "9" :string) + ("Å" "99" :string) + ("æ" "99" :string) + ("S" "8" :string) + ("K" "8" :string) + ("Y" "8" :string) + ("E" "8" :string) + ("J" "8" :string) + ("D" "8" :string) + ("Q" "8" :string) + ("M" "8" :string) + ("C" "8" :string) + ("L" "8" :string) + ("X" "8" :string) + ("P" "8" :string) + ("T" "8" :string) + ("N" "8" :string) + ("Z" "8" :string) + ("W" "8" :string) + ("B" "8" :string) + ("H" "8" :string) + ("I" "8" :string) + ("G" "8" :string) + ("U" "8" :string) + ("F" "8" :string) + ("V" "8" :string) + ("A" "8" :string) + ("O" "8" :string) + ("R" "8" :string) + ("d" "9" :string) + ("y" "9" :string) + ("g" "9" :string) + ("e" "9" :string) + ("q" "9" :string) + ("b" "9" :string) + ("z" "9" :string) + ("w" "9" :string) + ("a" "9" :string) + ("j" "9" :string) + ("u" "9" :string) + ("k" "9" :string) + ("t" "9" :string) + ("v" "9" :string) + ("s" "9" :string) + ("c" "9" :string) + ("r" "9" :string) + ("x" "9" :string) + ("h" "9" :string) + ("f" "9" :string) + ("i" "9" :string) + ("n" "9" :string) + ("m" "9" :string) + ("l" "9" :string) + ("p" "9" :string) + ("o" "9" :string) + )) + +(define-rule-set "en-ignore-special" + + :rules (("-" "" :string) + ("!" "" :string) + ("{" "" :string) + ("'" "" :string) + ("}" "" :string) + ("?" "" :string) + ("." "" :string) + )) + +(define-rule-set "en-resolve-special" + + :rules (("Ã" "¤" :string) + ("Ã" "¤" :string) + ("ð" "¤" :string) + ("Ã" "¤" :string) + ("Ã" "¤" :string) + ("Ã" "¤" :string) + ("ô" "¤" :string) + ("Ã" "¤" :string) + ("È" "¤" :string) + ("ï" "¤" :string) + ("Ã" "¤" :string) + ("ö" "¤" :string) + ("ñ" "¤" :string) + ("Ã" "¤" :string) + ("ç" "¤" :string) + ("Ã" "¤" :string) + ("à " "¤" :string) + ("þ" "¤" :string) + ("Ç·" "¤" :string) + ("è" "¤" :string) + ("Ã" "¤" :string) + ("ë" "¤" :string) + ("Ã" "¤" :string) + ("ê" "¤" :string) + ("é" "¤" :string) + ("È" "¤" :string) + ("Æ¿" "¤" :string) + ("Ã" "¤" :string) + ("Å" "¤¤" :string) + ("Ã" "¤¤" :string) + ("Å" "¤¤" :string) + ("æ" "¤¤" :string) + ("?" "¡" :string) + ("!" "¢" :string) + ("." "£" :string) + ("S" "¤" :string) + ("K" "¤" :string) + ("d" "¤" :string) + ("Y" "¤" :string) + ("E" "¤" :string) + ("y" "¤" :string) + ("g" "¤" :string) + ("e" "¤" :string) + ("J" "¤" :string) + ("q" "¤" :string) + ("D" "¤" :string) + ("b" "¤" :string) + ("z" "¤" :string) + ("w" "¤" :string) + ("Q" "¤" :string) + ("M" "¤" :string) + ("C" "¤" :string) + ("L" "¤" :string) + ("X" "¤" :string) + ("P" "¤" :string) + ("T" "¤" :string) + ("a" "¤" :string) + ("N" "¤" :string) + ("j" "¤" :string) + ("Z" "¤" :string) + ("u" "¤" :string) + ("k" "¤" :string) + ("t" "¤" :string) + ("W" "¤" :string) + ("v" "¤" :string) + ("s" "¤" :string) + ("B" "¤" :string) + ("H" "¤" :string) + ("c" "¤" :string) + ("I" "¤" :string) + ("G" "¤" :string) + ("U" "¤" :string) + ("F" "¤" :string) + ("r" "¤" :string) + ("x" "¤" :string) + ("V" "¤" :string) + ("h" "¤" :string) + ("f" "¤" :string) + ("i" "¤" :string) + ("A" "¤" :string) + ("O" "¤" :string) + ("n" "¤" :string) + ("m" "¤" :string) + ("l" "¤" :string) + ("p" "¤" :string) + ("R" "¤" :string) + ("o" "¤" :string) + ("-" "¥" :string) + ("'" "¦" :string) + ("{" "§" :string) + ("}" "¨" :string) + )) + +; The following section is customised for samplexdy.tex +; (copied from samplexdy.xdy automatically generated by +; samplexdy.tex) + +; required styles + +(require "tex.xdy") + +; list of allowed attributes (number formats) + +(define-attributes (("default" + "glsnumberformat" + "textrm" + "textsf" + "texttt" + "textbf" + "textmd" + "textit" + "textup" + "textsl" + "textsc" + "emph" + "glshypernumber" + "hyperrm" + "hypersf" + "hypertt" + "hyperbf" + "hypermd" + "hyperit" + "hyperup" + "hypersl" + "hypersc" + "hyperemph" + "hyperbfit"))) + +; user defined alphabets + +; location class definitions + +(define-location-class "roman-page-numbers" + ("roman-numbers-lowercase")) +(define-location-class "Roman-page-numbers" + ("roman-numbers-uppercase")) +(define-location-class "arabic-page-numbers" + ("arabic-numbers")) +(define-location-class "alpha-page-numbers" + ("alpha")) +(define-location-class "Alpha-page-numbers" + ("ALPHA")) +(define-location-class "Appendix-page-numbers" + ("ALPHA" :sep "." "arabic-numbers")) +(define-location-class "arabic-section-numbers" + ("arabic-numbers" :sep "." "arabic-numbers")) + +; user defined location classes + +(define-location-class "Numberstring" + (:sep "\protect \Numberstringnum {" "arabic-numbers" :sep "}")) + +; define cross-reference class + +(define-crossref-class "see" :unverified ) +(markup-crossref-list :class "see" + :open "\glsseeformat" :close "{}") + +; define the order of the location classes +(define-location-class-order ( + "roman-page-numbers" + "arabic-page-numbers" + "arabic-section-numbers" + "alpha-page-numbers" + "Roman-page-numbers" + "Alpha-page-numbers" + "Appendix-page-numbers" + "see" )) + +; define the glossary markup + +(markup-index + :open "\glossarysection[\glossarytoctitle]{\glossarytitle}\glossarypreamble~n\begin{theglossary}\glossaryheader~n" + :close "~n\end{theglossary}~n\glossarypostamble~n" + :tree) +(markup-letter-group-list :sep "\glsgroupskip~n") +(markup-indexentry :open "~n" :depth 0) +(markup-locclass-list :open "{\glossaryentrynumbers{\relax " + :sep ", " :close "}}") +(markup-locref-list :sep "\delimN ") +(markup-range :sep "\delimR ") + +; define format to use for locations + +(markup-locref :open "~n\setentrycounter{page}\glsnumberformat{" + :close "}" + :attr "glsnumberformat") +(markup-locref :open "~n\setentrycounter{page}\textrm{" + :close "}" + :attr "textrm") +(markup-locref :open "~n\setentrycounter{page}\textsf{" + :close "}" + :attr "textsf") +(markup-locref :open "~n\setentrycounter{page}\texttt{" + :close "}" + :attr "texttt") +(markup-locref :open "~n\setentrycounter{page}\textbf{" + :close "}" + :attr "textbf") +(markup-locref :open "~n\setentrycounter{page}\textmd{" + :close "}" + :attr "textmd") +(markup-locref :open "~n\setentrycounter{page}\textit{" + :close "}" + :attr "textit") +(markup-locref :open "~n\setentrycounter{page}\textup{" + :close "}" + :attr "textup") +(markup-locref :open "~n\setentrycounter{page}\textsl{" + :close "}" + :attr "textsl") +(markup-locref :open "~n\setentrycounter{page}\textsc{" + :close "}" + :attr "textsc") +(markup-locref :open "~n\setentrycounter{page}\emph{" + :close "}" + :attr "emph") +(markup-locref :open "~n\setentrycounter{page}\glshypernumber{" + :close "}" + :attr "glshypernumber") +(markup-locref :open "~n\setentrycounter{page}\hyperrm{" + :close "}" + :attr "hyperrm") +(markup-locref :open "~n\setentrycounter{page}\hypersf{" + :close "}" + :attr "hypersf") +(markup-locref :open "~n\setentrycounter{page}\hypertt{" + :close "}" + :attr "hypertt") +(markup-locref :open "~n\setentrycounter{page}\hyperbf{" + :close "}" + :attr "hyperbf") +(markup-locref :open "~n\setentrycounter{page}\hypermd{" + :close "}" + :attr "hypermd") +(markup-locref :open "~n\setentrycounter{page}\hyperit{" + :close "}" + :attr "hyperit") +(markup-locref :open "~n\setentrycounter{page}\hyperup{" + :close "}" + :attr "hyperup") +(markup-locref :open "~n\setentrycounter{page}\hypersl{" + :close "}" + :attr "hypersl") +(markup-locref :open "~n\setentrycounter{page}\hypersc{" + :close "}" + :attr "hypersc") +(markup-locref :open "~n\setentrycounter{page}\hyperemph{" + :close "}" + :attr "hyperemph") +(markup-locref :open "~n\setentrycounter{page}\hyperbfit{" + :close "}" + :attr "hyperbfit") + +; define letter group list format + +(markup-letter-group-list :sep "\glsgroupskip~n") + +; letter group headings + +(markup-letter-group :open-head "\glsgroupheading{" + :close-head "}") + +(define-letter-group "glsnumbers" + :prefixes ("0" "1" "2" "3" "4" "5" "6" "7" "8" "9") + :before "A") + +; The following is copied from xindy/lang/english/utf8-lang.xdy + +(define-sort-rule-orientations (forward backward forward forward)) +(use-rule-set :run 0 + :rule-set ("en-alphabetize" "en-ignore-special")) +(use-rule-set :run 1 + :rule-set ("en-resolve-diacritics" "en-ignore-special")) +(use-rule-set :run 2 + :rule-set ("en-resolve-case" "en-ignore-special")) +(use-rule-set :run 3 + :rule-set ("en-resolve-special")) + diff --git a/macros/latex/contrib/glossaries/samples/samplexdy.pdf b/macros/latex/contrib/glossaries/samples/samplexdy.pdf Binary files differnew file mode 100644 index 0000000000..09ed5d568e --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/samplexdy.pdf diff --git a/macros/latex/contrib/glossaries/samples/samplexdy.tex b/macros/latex/contrib/glossaries/samples/samplexdy.tex new file mode 100644 index 0000000000..808a1ac5ee --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/samplexdy.tex @@ -0,0 +1,300 @@ +% This file is public domain. +% +% This is a sample document illustrating how to use the +% glossaries package with xindy. To create the document: +% +% latex samplexdy +% makeglossaries samplexdy +% latex samplexdy +% +% If you don't have Perl installed, then use one of the +% following instead of makeglossaries: +% +% If you want to have a separate "Mc" letter group do: +% +% xindy -I xindy -M samplexdy-mc -t samplexdy.glg -o samplexdy.gls samplexdy.glo +% +% Otherwise do: +% +% xindy -L english -C utf8 -I xindy -M samplexdy -t samplexdy.glg -o samplexdy.gls samplexdy.glo +% +% If you want to use arara, you need the following directives: +% arara: pdflatex: { synctex: on } +% arara: makeglossaries +% arara: pdflatex: { synctex: on } +\documentclass{article} + +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[notext,notextcomp]{stix} + +\usepackage[colorlinks,plainpages]{hyperref} +\usepackage[xindy,style=altlistgroup]{glossaries} + +% Define a new command to do bold italic: + +\newcommand*{\hyperbfit}[1]{\textit{\hyperbf{#1}}} + +% Need to add this to the list of attributes in order +% to use it with xindy: +% (This command will have no effect if \noist is used) + +\GlsAddXdyAttribute{hyperbfit} + +% Redefine the page numbers to a custom format (requires stix +% package for the dice commands): + +% \tallynum{n} displays a die or dice where the dots add up to n +\newrobustcmd{\tallynum}[1]{% + \ifnum\number#1<7 + $\csname dice\romannumeral#1\endcsname$% + \else + $\dicevi$% + \expandafter\tallynum\expandafter{\numexpr#1-6}% + \fi +} + +% \tally{counter} expands to \tallynum{n} where n is the counter +% value. In order to work with glossaries and xindy this requires +% a very specific format. (See the glossaries user manual for more +% details.) + +\newcommand{\tally}[1]{\tallynum{\arabic{page}}} + +% Now redefine \thepage +% (\texorpdfstring is used in case the page number ends up in a PDF +% bookmark, although this is unlikely) +\renewcommand*{\thepage}{\texorpdfstring{\tally{page}}{\arabic{page}}} + +% Need to add this to the list of location styles. +% This requires knowing how \thepage expands when written to a file. +% You can check by inspecting the ':locref' attributes in the .glo +% file. In this case, \thepage expands to \tallynum {n} +% (the space is significant) where n is an arabic number. +% (This command will have no effect if \noist is used) + +\GlsAddXdyLocation{tally}{% tally location format + :sep "\string\tallynum\space\glsopenbrace" % -> \tallynum { + "arabic-numbers" % -> arabic number (0, 1, 2, etc) + :sep "\glsclosebrace" % -> } +} + +% If the definition of \tally changes so that it expands to +% something slightly different then the above will have to be +% changed accordingly. + +% (Need to redefine \glsXpageXhyperbfit and +% \glsXpageXglsnumberformat after \makeglossaries to get the +% hyperlinks working correctly.) + +% To have Mc as a separate group uncomment the following three +% lines: + +%\setStyleFile{samplexdy-mc} % note no extension +%\noist +%\GlsSetXdyLanguage{} + +% The above three lines specify to use samplexdy-mc.xdy (supplied +% with this file) and don't overwrite it. The language is +% unset using \GlsSetXdyLanguage{} as all the language +% dependent information is contained in samplexdy-mc.xdy +% Note that using \noist means that commands like +% \GlsAddXdyAttribute and \GlsAddXdyLocation will no longer have +% an effect. + +% Write the style file (if \noist isn't used) +% and activate glossary entries + +\makeglossaries + +% Each page location will be specified in the form: +% +% "\glsXpageXglsnumberformat{}{\tallynum {" number "}}" +% or +% "\glsXpageXhyperbfit{}{\tallynum {" number "}}" +% +% Knowing this, we can redefine \glsXpageXglsnumberformat +% and \glsXpageXhyperbfit to grab the number part to work out the +% location's numeric value. If the definition of \tally changes +% so that it expands to something slightly different then this +% code will no longer work. +% +% Redefine to allow hyperlinks: + +\renewcommand{\glsXpageXglsnumberformat}[2]{% + % remember that #2 is in the form \tallynum {n} + % so this does \linkpagenumber\tallynum{n} + \linkpagenumber#2% +} + +\renewcommand{\glsXpageXhyperbfit}[2]{% + \textbf{\em\linkpagenumber#2}% +} + +% Syntax: \linkpagenumber\tallynum{page number} +% This creates hyperlink to the given page. +\newcommand{\linkpagenumber}[2]{\hyperlink{page.#2}{#1{#2}}} + +% Define glossary entries +% \glshyperlink is used instead of \gls to prevent the glossary +% page numbers also appear in the locations, however I need +% to ensure that the referenced entries are added to the +% glossary via commands that use \glslink, \glsadd or \glssee + +\newglossaryentry{mcadam}{name={McAdam, John Loudon}, +first={John Loudon McAdam},text={McAdam}, +description={Scottish engineer}} + +\newglossaryentry{maclaurin}{name={Maclaurin, Colin}, +first={Colin Maclaurin},text={Maclaurin}, +description={Scottish mathematician best known for the +\gls{maclaurinseries}}} + +\newglossaryentry{maclaurinseries}{name={Maclaurin series}, +description={Series expansion},see={taylorstheorem}} + +\newglossaryentry{taylorstheorem}{name={Taylor's theorem}, +description={Theorem expressing a function $f(x)$ as the sum of +a polynomial and a remainder: +\[f(x) = f(a)+f'(a)(x-a)+f''(a)(x-a^2)/2!+\cdots+R_n\] +If $n\to\infty$ the expansion is a \glshyperlink{taylorseries} +and if $a=0$, the series is called a +\gls{maclaurinseries}}} + +\newglossaryentry{taylorseries}{name={Taylor series}, +description={Series expansion},see={taylorstheorem}} + +\newglossaryentry{taylor}{name={Taylor, Brook}, +first={Brook Taylor},text={Taylor}, +description={English mathematician}} + +\newglossaryentry{mcnemar}{name={McNemar, Quinn}, +first={Quinn McNemar},text={McNemar}, +description={Mathematician who introduced +\gls{mcnemarstest}. This entry has the number list +suppressed},nonumberlist} + +\newglossaryentry{mcnemarstest}{name={McNemar's test}, +description={A nonparametric test introduced by +\gls{mcnemar} in 1947}} + +\newglossaryentry{mach}{name={Mach, Ernst}, +first={Ernst Mach},text={Mach}, +% if using samplexdy-mc.xdy, the following line is needed +% to prevent this entry being put in the "Mc" group +sort={mach, Ernst}, +description={Czech/Austrian physicist and philosopher}} + +\newglossaryentry{machnumber}{name={Mach number}, +% if using samplexdy-mc.xdy, the following line is needed +% to prevent this entry being put in the "Mc" group +sort={mach number}, +description={Ratio of the speed of a body in a fluid to the +speed of sound in that fluid named after \gls{mach}}} + +\newglossaryentry{malthus}{name={Malthus, Thomas Robert}, +first={Thomas Robert Malthus},text={Malthus}, +description={English mathematician, sociologist and classicist}} + +\newglossaryentry{ampereandre}{name={Ampère, André-Marie}, +first={André-Marie Ampère},text={Ampère}, +description={French mathematician and physicist}} + +\newglossaryentry{ampere}{name={ampere}, +description={SI unit of electric current named after +\gls{ampereandre}}} + +\newglossaryentry{archimedes}{name={Archimedes of Syracuse}, +first={Archimedes of Syracuse},text={Archimedes}, +description={Greek mathematician}} + +\newglossaryentry{archimedesprinciple}{name={Archimedes' principle}, +description={Principle that if a body is submerged in a fluid +it experiences upthrust equal to the weight of the displaced +fluid. Named after \gls{archimedes}}} + +\newglossaryentry{galton}{name={Galton, Sir Francis}, +first={Sir Francis Galton},text={Galton}, +description={English anthropologist}} + +\newglossaryentry{gauss}{name={Gauss, Karl Friedrich}, +first={Karl Friedrich Gauss},text={Gauss}, +description={German mathematician}} + +\newglossaryentry{gaussianint}{name={Gaussian integer}, +description={Complex number where both real and imaginary +parts are integers}} + +\newglossaryentry{gaussianfn}{name={Gaussian function}, + description={A function of the form: + \[f(x) = a \exp\left(-\frac{(x-b)^2}{2c^2}\right)\] + for some constants $a$, $b$ and $c$}} + +\newglossaryentry{peano}{name={Peano, Giuseppe}, +first={Giuseppe Peano},text={Peano}, +description={Italian mathematician}} + +\newglossaryentry{peanoscurve}{name={Peano's curve}, +description={A space-filling curve discovered by +\gls{peano}}} + +\newglossaryentry{pearson}{name={Pearson, Karl}, +first={Karl Pearson},text={Pearson}, +description={English mathematician}} + +\newglossaryentry{pearspmcc}{name={Pearson's product moment +correlation coefficient},description={Product moment correlation +coefficient named after \gls{pearson}}} + +\begin{document} +\title{Sample Document Using the Glossaries Package With Xindy} +\author{Nicola Talbot} +\maketitle + +\section{\glsentryfirst{gauss}} + +This is a section on \gls[format=(]{gauss}. This section spans +several pages. + +\rule{1pt}{0.6\textheight} + +This paragraph has been shoved to the bottom of the page using a rule. +This paragraph spans a page break for testing purposes to ensure the +glossary entry in this paragraph has the correct location. Here's +the glossary entry: \gls{gaussianfn}. Check that the location is +correct. + +This page talks about \glspl[format=hyperbfit]{gaussianint}. Since +it's the principle definition, the user-defined hyperbfit format is +used. + +\newpage + +The section on \gls[format=)]{gauss} ends here. + +\section{Series Expansions} + +This section is about series expansions. It mentions +\gls{maclaurin} and \gls{taylor}. It also discusses +\gls{taylorstheorem} which is related to the \gls{taylorseries}. +The \gls{maclaurinseries} is a special case of the +\gls{taylorseries}. + +\section{\glsentryname{archimedesprinciple}} + +This section discusses \gls{archimedesprinciple} which was +introduced by \gls{archimedes}. + +\section{Another section} + +This section covers \gls{mach} who introduced the \gls{machnumber}. +It also mentions \gls{ampereandre} after whom the +SI unit \gls{ampere} is named. It then discusses \gls{galton} +and \gls{malthus}. Finally it mentions \gls{mcadam}. + +\newpage +This page discusses \gls{mcnemar} who introduced +\gls{mcnemarstest} and \gls{peano} who discovered \gls{peanoscurve}. + +\printglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/samplexdy2.pdf b/macros/latex/contrib/glossaries/samples/samplexdy2.pdf Binary files differnew file mode 100644 index 0000000000..029f4bfb79 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/samplexdy2.pdf diff --git a/macros/latex/contrib/glossaries/samples/samplexdy2.tex b/macros/latex/contrib/glossaries/samples/samplexdy2.tex new file mode 100644 index 0000000000..4ed7bd7244 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/samplexdy2.tex @@ -0,0 +1,73 @@ + % This file is public domain + % + % This is a sample document illustrating how to use the + % glossaries package with xindy. To create the document: + % + % pdflatex samplexdy2 + % makeglossaries samplexdy2 + % pdflatex samplexdy2 + % + % This sample file won't work with makeindex + % + % If you want to use arara, you need the following directives: + % arara: pdflatex: { synctex: on } + % arara: makeglossaries + % arara: pdflatex: { synctex: on } +\documentclass{report} + +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[colorlinks]{hyperref} +\usepackage[xindy,counter=section]{glossaries} + + % Set up somewhat eccentric section numbering system: + +\renewcommand*{\thesection}{[\thechapter]\arabic{section}} + +\renewcommand*{\theHsection}{\thepart.\thesection} +\renewcommand*{\thepart}{\Roman{part}} + +\GlsAddXdyLocation["roman-numbers-uppercase"]{section}{:sep "[" + "arabic-numbers" :sep "]" "arabic-numbers" +} + + % If part is 0, then \thepart will be empty, so add an extra + % case to catch this: + +\GlsAddXdyLocation{zero.section}{:sep "[" + "arabic-numbers" :sep "]" "arabic-numbers" +} + + % (Note that the above will stop xindy giving a warning, but the + % location hyper links will be invalid if no \part is used.) + +\makeglossaries + +\newglossaryentry{sample}{name=sample,description={an example}} +\newglossaryentry{sample2}{name=sample2,description={another example}} + +\begin{document} +This is a sample document illustrating Xindy specific commands in +the glossaries package. + +\part{First Part} + +\chapter{Sample Chapter} +This example document has an eccentric section numbering system +where the section number is prefixed by the chapter number in square +brackets. + +\section{First Section} + +\gls{sample}. \gls{sample2}. + +\section{Second Section} + +\gls{sample2}. + +\section{Third Section} + +\gls{sample}. \gls{sample2}. + +\printglossaries +\end{document} diff --git a/macros/latex/contrib/glossaries/samples/samplexdy3.pdf b/macros/latex/contrib/glossaries/samples/samplexdy3.pdf Binary files differnew file mode 100644 index 0000000000..14c420dcf3 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/samplexdy3.pdf diff --git a/macros/latex/contrib/glossaries/samples/samplexdy3.tex b/macros/latex/contrib/glossaries/samples/samplexdy3.tex new file mode 100644 index 0000000000..dcdc327b37 --- /dev/null +++ b/macros/latex/contrib/glossaries/samples/samplexdy3.tex @@ -0,0 +1,269 @@ +% This file is public domain. +% +% This is a sample document illustrating how to use the +% glossaries package with xindy. To create the document: +% +% latex samplexdy +% makeglossaries samplexdy +% latex samplexdy +% +% If you don't have Perl installed, then use one of the +% following instead of makeglossaries: +% +% If you want to have a separate "Mc" letter group do: +% +% xindy -I xindy -M samplexdy-mc -t samplexdy.glg -o samplexdy.gls samplexdy.glo +% +% Otherwise do: +% +% xindy -L english -C utf8 -I xindy -M samplexdy -t samplexdy.glg -o samplexdy.gls samplexdy.glo +% +% If you want to use arara, you need the following directives: +% arara: pdflatex: { synctex: on } +% arara: makeglossaries +% arara: pdflatex: { synctex: on } + \documentclass{article} + +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage{fmtcount} + +\usepackage[colorlinks,plainpages]{hyperref} +\usepackage[xindy,style=altlistgroup]{glossaries} + +% Define a new command to do bold italic: + +\newcommand*{\hyperbfit}[1]{\textit{\hyperbf{#1}}} + +% Need to add this to the list of attributes in order +% to use it with xindy: +% (This command will have no effect if \noist is used) + +\GlsAddXdyAttribute{hyperbfit} + +% Redefine the page numbers so that they appear as a word: + +\renewcommand*{\thepage}{\texorpdfstring{\customfmt{page}}{\arabic{page}}} + +\newcommand{\customfmt}[1]{\customfmtnum{\arabic{#1}}} +\newrobustcmd{\customfmtnum}[1]{\Numberstringnum{#1}} + +% Need to add this to the list of location styles. +% \customfmt{page} gets expanded to +% \custommfmtnum {<n>} (where <n> is the page number) +% so need to define the location in that format: +% (This command will have no effect if \noist is used) + +\GlsAddXdyLocation{customfmt}{:sep "\string\customfmtnum\space\glsopenbrace" + "arabic-numbers" :sep "\glsclosebrace"} + +% (Need to redefine \glsXpageXhyperbfit and +% \glsXpageXglsnumberformat after \makeglossaries to get the +% hyperlinks working correctly.) + +% To have Mc as a separate group uncomment the following three +% lines: + +%\setStyleFile{samplexdy-mc} % note no extension +%\noist +%\GlsSetXdyLanguage{} + +% The above three lines specify to use samplexdy-mc.xdy (supplied +% with this file) and don't overwrite it. The language is +% unset using \GlsSetXdyLanguage{} as all the language +% dependent information is contained in samplexdy-mc.xdy +% Note that using \noist means that commands like +% \GlsAddXdyAttribute and \GlsAddXdyLocation will no longer have +% an effect. + +% Write the style file (if \noist isn't used) +% and activate glossary entries + +\makeglossaries + +% Each page location will be specified in the form: +% +% "\glsXpageXglsnumberformat{}{\customfmtnum "\marg{n}"}" +% or +% "\glsXpageXhyperbfit{}{\customfmtnum "\marg{n}"}" +% +% Redefine to allow hyperlinks: + +\renewcommand{\glsXpageXglsnumberformat}[2]{% + \linkpagenumber#2% +} + +\renewcommand{\glsXpageXhyperbfit}[2]{% + \textbf{\em\linkpagenumber#2}% +} + +% The arguments of \linkpagenumber will be +% #1 -> \customfmtnum +% #2 -> n +% This means that the page number (n) can be used to +% form the hyperlink target. +\newcommand{\linkpagenumber}[2]{\hyperlink{page.#2}{#1{#2}}} + +% Define glossary entries +% \glshyperlink is used instead of \gls to prevent the glossary +% page numbers also appear in the locations, however I need +% to ensure that the referenced entries are added to the +% glossary via commands that use \glslink, \glsadd or \glssee + +\newglossaryentry{mcadam}{name={McAdam, John Loudon}, +first={John Loudon McAdam},text={McAdam}, +description={Scottish engineer}} + +\newglossaryentry{maclaurin}{name={Maclaurin, Colin}, +first={Colin Maclaurin},text={Maclaurin}, +description={Scottish mathematician best known for the +\gls{maclaurinseries}}} + +\newglossaryentry{maclaurinseries}{name={Maclaurin series}, +description={Series expansion},see={taylorstheorem}} + +\newglossaryentry{taylorstheorem}{name={Taylor's theorem}, +description={Theorem expressing a function $f(x)$ as the sum of +a polynomial and a remainder: +\[f(x) = f(a)+f'(a)(x-a)+f''(a)(x-a^2)/2!+\cdots+R_n\] +If $n\to\infty$ the expansion is a \glshyperlink{taylorseries} +and if $a=0$, the series is called a +\gls{maclaurinseries}}} + +\newglossaryentry{taylorseries}{name={Taylor series}, +description={Series expansion},see={taylorstheorem}} + +\newglossaryentry{taylor}{name={Taylor, Brook}, +first={Brook Taylor},text={Taylor}, +description={English mathematician}} + +\newglossaryentry{mcnemar}{name={McNemar, Quinn}, +first={Quinn McNemar},text={McNemar}, +description={Mathematician who introduced +\gls{mcnemarstest}. This entry has the number list +suppressed},nonumberlist} + +\newglossaryentry{mcnemarstest}{name={McNemar's test}, +description={A nonparametric test introduced by +\gls{mcnemar} in 1947}} + +\newglossaryentry{mach}{name={Mach, Ernst}, +first={Ernst Mach},text={Mach}, +% if using samplexdy-mc.xdy, the following line is needed +% to prevent this entry being put in the "Mc" group +sort={mach, Ernst}, +description={Czech/Austrian physicist and philosopher}} + +\newglossaryentry{machnumber}{name={Mach number}, +% if using samplexdy-mc.xdy, the following line is needed +% to prevent this entry being put in the "Mc" group +sort={mach number}, +description={Ratio of the speed of a body in a fluid to the +speed of sound in that fluid named after \gls{mach}}} + +\newglossaryentry{malthus}{name={Malthus, Thomas Robert}, +first={Thomas Robert Malthus},text={Malthus}, +description={English mathematician, sociologist and classicist}} + +\newglossaryentry{ampereandre}{name={Ampère, André-Marie}, +first={André-Marie Ampère},text={Ampère}, +description={French mathematician and physicist}} + +\newglossaryentry{ampere}{name={ampere}, +description={SI unit of electric current named after +\gls{ampereandre}}} + +\newglossaryentry{archimedes}{name={Archimedes of Syracuse}, +first={Archimedes of Syracuse},text={Archimedes}, +description={Greek mathematician}} + +\newglossaryentry{archimedesprinciple}{name={Archimedes' principle}, +description={Principle that if a body is submerged in a fluid +it experiences upthrust equal to the weight of the displaced +fluid. Named after \gls{archimedes}}} + +\newglossaryentry{galton}{name={Galton, Sir Francis}, +first={Sir Francis Galton},text={Galton}, +description={English anthropologist}} + +\newglossaryentry{gauss}{name={Gauss, Karl Friedrich}, +first={Karl Friedrich Gauss},text={Gauss}, +description={German mathematician}} + +\newglossaryentry{gaussianint}{name={Gaussian integer}, +description={Complex number where both real and imaginary +parts are integers}} + +\newglossaryentry{gaussianfn}{name={Gaussian function}, + description={A function of the form: + \[f(x) = a \exp\left(-\frac{(x-b)^2}{2c^2}\right)\] + for some constants $a$, $b$ and $c$}} + +\newglossaryentry{peano}{name={Peano, Giuseppe}, +first={Giuseppe Peano},text={Peano}, +description={Italian mathematician}} + +\newglossaryentry{peanoscurve}{name={Peano's curve}, +description={A space-filling curve discovered by +\gls{peano}}} + +\newglossaryentry{pearson}{name={Pearson, Karl}, +first={Karl Pearson},text={Pearson}, +description={English mathematician}} + +\newglossaryentry{pearspmcc}{name={Pearson's product moment +correlation coefficient},description={Product moment correlation +coefficient named after \gls{pearson}}} + +\begin{document} +\title{Sample Document Using the Glossaries Package With Xindy} +\author{Nicola Talbot} +\maketitle + +\section{\glsentryfirst{gauss}} + +This is a section on +\gls[format=(]{gauss}. This section spans +several pages. + +\rule{1pt}{0.6\textheight} + +This paragraph has been shoved to the bottom of the page using a rule. +This paragraph spans a page break for testing purposes to ensure the +glossary entry in this paragraph has the correct location. Here's +the glossary entry: \gls{gaussianfn}. + +This page talks about \glspl[format=hyperbfit]{gaussianint}. Since +it's the principle definition, the user-defined hyperbfit format is +used. + +\newpage + +The section on \gls[format=)]{gauss} ends here. + +\section{Series Expansions} + +This section is about series expansions. It mentions +\gls{maclaurin} and \gls{taylor}. It also discusses +\gls{taylorstheorem} which is related to the \gls{taylorseries}. +The \gls{maclaurinseries} is a special case of the +\gls{taylorseries}. + +\section{\glsentryname{archimedesprinciple}} + +This section discusses \gls{archimedesprinciple} which was +introduced by \gls{archimedes}. + +\section{Another section} + +This section covers \gls{mach} who introduced the \gls{machnumber}. +It also mentions \gls{ampereandre} after whom the +SI unit \gls{ampere} is named. It then discusses \gls{galton} +and \gls{malthus}. Finally it mentions \gls{mcadam}. + +\newpage +This page discusses \gls{mcnemar} who introduced +\gls{mcnemarstest} and \gls{peano} who discovered \gls{peanoscurve}. + +\printglossaries +\end{document} |