summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/glossaries/samples/samplexdy3.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/glossaries/samples/samplexdy3.tex')
-rw-r--r--Master/texmf-dist/doc/latex/glossaries/samples/samplexdy3.tex153
1 files changed, 78 insertions, 75 deletions
diff --git a/Master/texmf-dist/doc/latex/glossaries/samples/samplexdy3.tex b/Master/texmf-dist/doc/latex/glossaries/samples/samplexdy3.tex
index 06ffd8b3343..dcdc327b377 100644
--- a/Master/texmf-dist/doc/latex/glossaries/samples/samplexdy3.tex
+++ b/Master/texmf-dist/doc/latex/glossaries/samples/samplexdy3.tex
@@ -1,90 +1,93 @@
- % 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 }
+% 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}[2017/09/16]
+\usepackage{fmtcount}
\usepackage[colorlinks,plainpages]{hyperref}
\usepackage[xindy,style=altlistgroup]{glossaries}
- % Define a new command to do bold italic:
+% 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)
+% 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:
+% Redefine the page numbers so that they appear as a word:
- \renewcommand*{\thepage}{\texorpdfstring{\Numberstring{page}}{\arabic{page}}}
+\renewcommand*{\thepage}{\texorpdfstring{\customfmt{page}}{\arabic{page}}}
- % Need to add this to the list of location styles.
- % \Numberstring{page} (with fmtcount.sty v3.04) gets expanded to
- % \Numberstringnum {<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)
+\newcommand{\customfmt}[1]{\customfmtnum{\arabic{#1}}}
+\newrobustcmd{\customfmtnum}[1]{\Numberstringnum{#1}}
-\GlsAddXdyLocation{Numberstring}{:sep "\string\Numberstringnum\space\glsopenbrace"
+% 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.)
+% (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:
+% To have Mc as a separate group uncomment the following three
+% lines:
- %\setStyleFile{samplexdy-mc} % note no extension
- %\noist
- %\GlsSetXdyLanguage{}
+%\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.
+% 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
+% Write the style file (if \noist isn't used)
+% and activate glossary entries
\makeglossaries
- % Each page location will be specified in the form:
- %
- % "\glsXpageXglsnumberformat{}{\Numberstringnum "\marg{n}"}"
- % or
- % "\glsXpageXhyperbfit{}{\Numberstringnum "\marg{n}"}"
- %
- % Redefine to allow hyperlinks:
+% 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%
@@ -94,18 +97,18 @@
\textbf{\em\linkpagenumber#2}%
}
- % The arguments of \linkpagenumber will be
- % #1 -> \Numberstringnum
- % #2 -> n
- % This means that the page number (n) can be used to
- % form the hyperlink target.
+% 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
+% 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},
@@ -146,14 +149,14 @@ description={A nonparametric test introduced by
\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
+% 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
+% 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}}}