summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/testidx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-08-11 23:06:40 +0000
committerKarl Berry <karl@freefriends.org>2017-08-11 23:06:40 +0000
commita11aea5f247db96e5465cadf76c4cbd1263d484c (patch)
tree4c5663fead49290ff872178b37632fdfdbf5da4e /Master/texmf-dist/tex/latex/testidx
parent97ad0f84a389805043513c35c7eefb1132ccae5a (diff)
testidx (11aug17)
git-svn-id: svn://tug.org/texlive/trunk@45021 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/testidx')
-rw-r--r--Master/texmf-dist/tex/latex/testidx/testidx-glossaries.sty2436
-rw-r--r--Master/texmf-dist/tex/latex/testidx/testidx.sty1105
2 files changed, 3166 insertions, 375 deletions
diff --git a/Master/texmf-dist/tex/latex/testidx/testidx-glossaries.sty b/Master/texmf-dist/tex/latex/testidx/testidx-glossaries.sty
new file mode 100644
index 00000000000..7a6787607de
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/testidx/testidx-glossaries.sty
@@ -0,0 +1,2436 @@
+%%
+%% This is file `testidx-glossaries.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% testidx.dtx (with options: `testidx-glossaries.sty,package')
+%%
+%% testidx.dtx
+%% Copyright 2017 Nicola Talbot
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Nicola Talbot.
+%%
+%% This work consists of the files testidx.dtx and testidx.ins and the derived files testidx.sty, testidx-glossaries.sty, testidx-glossaries-diglyphs.tex, testidx-glossaries-nodiglyphs.tex, testidx-glossaries-samples.tex, testidx-glossaries-diglyphs-utf8.bib, testidx-glossaries-markers.bib, testidx-glossaries-mathsym.bib, testidx-glossaries-nodiglyphs-utf8.bib, testidx-glossaries-nodiglyphs.bib, testidx-glossaries-numbers.bib, testidx-glossaries-samples-ascii.bib, testidx-glossaries-samples-utf8.bib, testidx-glossaries-samples.bib.
+%%
+%% \CharacterTable
+%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+%% Digits \0\1\2\3\4\5\6\7\8\9
+%% Exclamation \! Double quote \" Hash (number) \#
+%% Dollar \$ Percent \% Ampersand \&
+%% Acute accent \' Left paren \( Right paren \)
+%% Asterisk \* Plus \+ Comma \,
+%% Minus \- Point \. Solidus \/
+%% Colon \: Semicolon \; Less than \<
+%% Equals \= Greater than \> Question mark \?
+%% Commercial at \@ Left bracket \[ Backslash \\
+%% Right bracket \] Circumflex \^ Underscore \_
+%% Grave accent \` Left brace \{ Vertical bar \|
+%% Right brace \} Tilde \~}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{testidx-glossaries}[2017/08/11 v1.1 (NLCT)]
+\newcommand*{\tstidx@glossariespkg}{glossaries}
+\@ifpackageloaded{glossaries}
+{%
+ \newcommand*{\tstidx@setupglossaries}[1]{\setupglossaries{#1}}%
+}%
+{%
+ \newcommand*{\tstidx@setupglossaries}[1]{%
+ \PassOptionsToPackage{#1}{glossaries}%
+ }
+}
+\@ifpackageloaded{glossaries-extra}
+{%
+ \newcommand*{\tstidx@setupglossariesextra}[1]{\glossariesextrasetup{#1}}%
+}%
+{%
+ \newcommand*{\tstidx@setupglossariesextra}[1]{%
+ \PassOptionsToPackage{#1}{glossaries-extra}%
+ }
+}
+\newcommand*{\tstidx@usemakegloss}{\PackageError{testidx-glossaries}{You
+need to put \string\tstidxmakegloss\MessageBreak in the preamble in order
+to use\MessageBreak \string\testidx\space with testidx-glossaries}{}}
+\newcommand*{\tstidxmakegloss}[1][]{%
+ \@tstidx@ifgerman{\GlsSetQuote{+}}{}%
+ \tstidxdefaultmakegloss
+}
+\newcommand*{\tstidxprintglossaries}{\printglossaries}
+\newcommand*{\tstidxprintglossary}{\printglossary}
+\newcommand*{\tstidxtexfiles}{testidx-glossaries-samples,\tstidxglyphfile}
+\newcommand*{\tstidxbasebibfiles}{testidx-glossaries-samples}
+\newcommand*{\tstidxasciibibfiles}{testidx-glossaries-samples-ascii}
+\newcommand*{\tstidxutfbibfiles}{testidx-glossaries-samples-utf8}
+
+\newcommand*{\tstidxloadsamples}{%
+ \@for\tstidxfile:=\tstidxtexfiles\do{\input{\tstidxfile}}%
+ \renewcommand*{\tstidx@usemakegloss}{}%
+}
+\newcommand*{\tstidxdefaultmakegloss}{%
+ \makeglossaries
+ \tstidxloadsamples
+}
+\newcommand*{\tstidxnoidxmakegloss}{%
+ \makenoidxglossaries
+ \tstidxloadsamples
+}
+\newcommand*{\tstidxbibmakegloss}[1]{%
+ \def\@tstidx@resourceargs{}%
+ \@tstidx@ifutfviii
+ {%
+ \def\@tstidx@resource@src{\tstidxbasebibfiles,%
+ \tstidxutfbibfiles,%
+ \tstidxglyphfile-utf8}%
+ }%
+ {%
+ \def\@tstidx@resource@src{\tstidxbasebibfiles,%
+ \tstidxasciibibfiles,%
+ testidx-glossaries-nodiglyphs}%
+ }%
+ \if@tstidx@setdescription
+ \if@tstidx@useglsseekey
+ \def\@tstidx@resourceargs{selection={recorded and deps and see}}%
+ \else
+ \def\@tstidx@resourceargs{ignore-fields={see,seealso}}%
+ \fi
+ \else
+ \if@tstidx@useglsseekey
+ \def\@tstidx@resourceargs{%
+ selection={recorded and deps and see},
+ ignore-fields={description}}%
+ \else
+ \def\@tstidx@resourceargs{%
+ ignore-fields={description,see,seealso}}%
+ \fi
+ \fi
+ \iftestidxprefix
+ \tstidxloadglsresource{src={testidx-glossaries-mathsym},%
+ group={Maths},sort={letter-case},\@tstidx@resourceargs}%
+ \tstidxloadglsresource{src={testidx-glossaries-markers},%
+ group={Markers},sort={letter-case},\@tstidx@resourceargs}%
+ \iftstidxnumbergroup
+ \tstidxloadglsresource{src={testidx-glossaries-numbers},%
+ sort={integer},\@tstidx@resourceargs}%
+ \tstidxloadglsresource{src={\@tstidx@resource@src},%
+ \@tstidx@resourceargs,#1}%
+ \else
+ \tstidxloadglsresource{src={testidx-glossaries-numbers,%
+ \@tstidx@resource@src},%
+ \@tstidx@resourceargs,#1}%
+ \fi
+ \else
+ \iftstidxnumbergroup
+ \tstidxloadglsresource{src={testidx-glossaries-numbers},%
+ sort={integer},\@tstidx@resourceargs}%
+ \tstidxloadglsresource{%
+ src={testidx-glossaries-mathsym,%
+ testidx-glossaries-markers,%
+ \@tstidx@resource@src},%
+ \@tstidx@resourceargs,#1}%
+ \else
+ \tstidxloadglsresource{%
+ src={testidx-glossaries-mathsym,%
+ testidx-glossaries-markers,%
+ testidx-glossaries-numbers,%
+ \@tstidx@resource@src},%
+ \@tstidx@resourceargs,#1}%
+ \fi
+ \fi
+ \renewcommand*{\tstidx@usemakegloss}{}%
+}
+\newcommand{\tstidxloadglsresource}[1]{%
+ \iftestidxverbose
+ \PackageInfo{testidx-glossaries}{\string\GlsXtrLoadResources[#1]}%
+ \fi
+ \GlsXtrLoadResources[#1]%
+}
+\newif\if@tstidx@useglsseekey
+\@tstidx@useglsseekeytrue
+\DeclareOption{seekey}{\@tstidx@useglsseekeytrue}
+\DeclareOption{noseekey}{\@tstidx@useglsseekeyfalse}
+\newif\if@tstidx@setdescription
+\@tstidx@setdescriptionfalse
+\DeclareOption{desc}{\@tstidx@setdescriptiontrue}
+\DeclareOption{nodesc}{\@tstidx@setdescriptionfalse}
+\DeclareOption{extra}{\renewcommand*{\tstidx@glossariespkg}{glossaries-extra}}
+\DeclareOption{noextra}{\renewcommand*{\tstidx@glossariespkg}{glossaries}}
+\newcommand*{\@testidx@ifusebibgls}[2]{#2}
+\DeclareOption{makeindex}{%
+ \let\@testidx@ifusebibgls\@secondoftwo
+ \tstidx@setupglossaries{makeindex}%
+ \renewcommand*{\tstidxmakegloss}[1][]{%
+ \@tstidx@ifgerman{\GlsSetQuote{+}}{}%
+ \tstidxdefaultmakegloss
+ }%
+ \renewcommand*{\tstidxprintglossaries}{\printglossaries}%
+ \renewcommand*{\tstidxprintglossary}{\printglossary}%
+}
+\DeclareOption{xindy}{%
+ \let\@testidx@ifusebibgls\@secondoftwo
+ \tstidx@setupglossaries{xindy}%
+ \renewcommand*{\tstidxmakegloss}[1][]{%
+ \tstidxdefaultmakegloss
+ }%
+ \renewcommand*{\tstidxprintglossaries}{\printglossaries}%
+ \renewcommand*{\tstidxprintglossary}{\printglossary}%
+}
+\DeclareOption{tex}{%
+ \let\@testidx@ifusebibgls\@secondoftwo
+ \renewcommand*{\tstidxmakegloss}[1][]{%
+ \tstidxnoidxmakegloss
+ }%
+ \renewcommand*{\tstidxprintglossaries}{\printnoidxglossaries}%
+ \renewcommand*{\tstidxprintglossary}{\printnoidxglossary}%
+}
+\DeclareOption{bib2gls}{%
+ \renewcommand*{\tstidx@glossariespkg}{glossaries-extra}%
+ \let\@testidx@ifusebibgls\@firstoftwo
+ \tstidx@setupglossariesextra{record}%
+ \renewcommand*{\tstidxmakegloss}[1][]{%
+ \tstidxbibmakegloss{#1}%
+ }%
+ \renewcommand*{\tstidxprintglossaries}{\printunsrtglossaries}%
+ \renewcommand*{\tstidxprintglossary}{\printunsrtglossary}%
+}
+\DeclareOption{manual}{%
+ \renewcommand*{\tstidx@usemakegloss}{}%
+ \renewcommand*{\tstidxmakegloss}[1][]{%
+ \PackageWarning{testidx-glossaries}{\string\tstidxmakegloss\space
+ disabled by `manual' package option}%
+ }%
+ \renewcommand*{\tstidxprintglossaries}{%
+ \PackageWarning{testidx-glossaries}{\string\tstidxprintglossaries\space
+ disabled by `manual' package option}%
+ }%
+ \renewcommand*{\tstidxprintglossary}{%
+ \PackageWarning{testidx-glossaries}{\string\tstidxprintglossary\space
+ disabled by `manual' package option}%
+ }%
+}
+\newif\iftstidxnumbergroup
+\tstidxnumbergrouptrue
+\DeclareOption{noglsnumbers}{\tstidxnumbergroupfalse}
+\DeclareOption{glsnumbers}{\tstidxnumbergrouptrue}
+\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{testidx}}
+\ProcessOptions
+\RequirePackage{testidx}
+\@tstidx@ifsanitize
+ {\tstidx@setupglossaries{sanitizesort=true}}
+ {\tstidx@setupglossaries{sanitizesort=false}}
+\RequirePackage{\tstidx@glossariespkg}
+\RequirePackage{glossary-mcols}
+\if@tstidx@setdescription
+ \setupglossaries{nopostdot=false}
+ \setglossarystyle{indexgroup}
+\else
+ \setupglossaries{nopostdot}
+ \setglossarystyle{mcolindexgroup}
+\fi
+\ifglsxindy
+\iftstidxnumbergroup
+ \gls@xindy@glsnumberstrue
+ \else
+ \gls@xindy@glsnumbersfalse
+ \fi
+\fi
+\newif\if@tstidx@hasseealsokey
+\key@ifundefined{glossentry}{seealso}%
+{\@tstidx@hasseealsokeyfalse}
+{\@tstidx@hasseealsokeytrue}
+\iftestidxverbose
+ \appto\@newglossaryentryposthook{\@testidx@writeglsinfo}
+ \newcommand\@testidx@writeglsinfo{%
+ \letcs{\@tstidx@sort}{glo@\glsdetoklabel{\@glo@label}@sort}%
+ \@onelevel@sanitize\@tstidx@sort
+ \letcs{\@tstidx@name}{glo@\glsdetoklabel{\@glo@label}@name}%
+ \@onelevel@sanitize\@tstidx@name
+ \letcs{\@tstidx@text}{glo@\glsdetoklabel{\@glo@label}@text}%
+ \@onelevel@sanitize\@tstidx@text
+ \ifcsdef{glo@\glsdetoklabel{\@glo@label}@parent}%
+ {\letcs\@tstidx@parent{glo@\glsdetoklabel{\@glo@label}@parent}}%
+ {\def\@tstidx@parent{}}%
+ \PackageInfo{testidx-glossaries}{new term label={\@glo@label},
+ \MessageBreak
+ name={\@tstidx@name},
+ \MessageBreak
+ sort={\@tstidx@sort},
+ \MessageBreak
+ text={\@tstidx@text},
+ \MessageBreak
+ parent={\@tstidx@parent},
+ \MessageBreak
+ see={\@glo@see}%
+ \if@tstidx@hasseealsokey
+ ,\MessageBreak
+ seealso={\@glo@seealso}
+ \fi
+ \MessageBreak
+ }%
+ }
+ \let\tstidx@org@glo@sortedinsert\@glo@sortedinsert
+ \renewcommand{\@glo@sortedinsert}[2]{%
+ \typeout{#2}%
+ \tstidx@org@glo@sortedinsert{#1}{#2}%
+ }
+\fi
+\ifdef\glosortentrieswarning
+{}
+{%
+ \let\tstidx@org@glo@sortentries\@glo@sortentries
+ \renewcommand{\@glo@sortentries}[2]{%
+ \typeout{Using TeX to sort entries---this may take a while}%
+ \tstidx@org@glo@sortentries{#1}{#2}%
+ }
+}
+\newcommand*{\@tstidx@usemakegloss}{\tstidx@usemakegloss}
+\newcommand*{\tstidxtoidx}{%
+ \renewcommand*{\@tstidx@usemakegloss}{}%
+ \let\@tstindex\@tstidx@org@index
+ \let\@tstidxwordpl\@tstidx@org@wordpl
+ \let\@tstidxphrasepl\@tstidx@org@phrasepl
+ \let\@tstidxcs\@tstidx@org@cs
+ \let\@tstindexpost\@tstidx@org@indexpost
+ \let\@tstindexopenpost\@tstidx@org@indexopenpost
+ \let\@tstindexclosepost\@tstidx@org@indexclosepost
+ \let\@tstindexpre\@tstidx@org@indexpre
+ \let\@tstindexopenpre\@tstidx@org@indexopenpre
+ \let\@tstindexclosepre\@tstidx@org@indexclosepre
+ \let\@tstindexsee\@tstidx@org@indexsee
+ \let\@tstidx@indexsubsee\@tstidx@org@indexsubsee
+ \let\@tstidx@subindexpost\@tstidx@org@subindexpost
+ \let\@tstidx@subindexopenpost\@tstidx@org@subindexopenpost
+ \let\@tstidx@subindexclosepost\@tstidx@org@subindexclosepost
+ \let\@tstidx@subindexpre\@tstidx@org@subindexpre
+ \let\@tstidx@subindexopenpre\@tstidx@org@subindexopenpre
+ \let\@tstidx@subindexclosepre\@tstidx@org@subindexclosepre
+ \let\@@tstidx@subsubindexpost\@tstidx@org@subsubindexpost
+ \let\@@tstidx@subsubindexopenpost\@tstidx@org@subsubindexopenpost
+ \let\@@tstidx@subsubindexclosepost\@tstidx@org@subsubindexclosepost
+ \let\@@tstidx@subsubindexpre\@tstidx@org@subsubindexpre
+ \let\@@tstidx@subsubindexopenpre\@tstidx@org@subsubindexopenpre
+ \let\@@tstidx@subsubindexclosepre\@tstidx@org@subsubindexclosepre
+ \let\@tidx@par@i\@tidx@org@par@i
+ \let\@tidx@par@ii\@tidx@org@par@ii
+ \let\@tidx@par@iii\@tidx@org@par@iii
+ \let\@tidx@par@iv\@tidx@org@par@iv
+ \let\@tidx@par@vi\@tidx@org@par@vi
+ \let\@tidx@mathslettergroup\@tidx@org@mathslettergroup
+ \let\@tidx@numberlettergroup\@tidx@org@numberlettergroup
+ \let\@tidx@scriptnote\@tidx@org@scriptnote
+ \let\@tidx@sanitizenote\@tidx@org@sanitizenote
+ \let\@tidx@stripaccentsnote\@tidx@org@stripaccentsnote
+}
+\newcommand*{\tstidxtogls}{%
+ \renewcommand*{\@tstidx@usemakegloss}{\tstidx@usemakegloss}%
+ \let\@tstindex\@tstidx@org@index
+ \let\@tstidxwordpl\@tstidx@gls@wordpl
+ \let\@tstidxphrasepl\@tstidx@gls@phrasepl
+ \let\@tstidxcs\@tstidx@gls@cs
+ \let\@tstindexpost\@tstidx@gls@indexpost
+ \let\@tstindexopenpost\@tstidx@gls@indexopenpost
+ \let\@tstindexclosepost\@tstidx@gls@indexclosepost
+ \let\@tstindexpre\@tstidx@gls@indexpre
+ \let\@tstindexopenpre\@tstidx@gls@indexopenpre
+ \let\@tstindexclosepre\@tstidx@gls@indexclosepre
+ \let\@tstindexsee\@tstidx@gls@indexsee
+ \let\@tstidx@indexsubsee\@tstidx@gls@indexsubsee
+ \let\@tstidx@subindexpost\@tstidx@gls@subindexpost
+ \let\@tstidx@subindexopenpost\@tstidx@gls@subindexopenpost
+ \let\@tstidx@subindexclosepost\@tstidx@gls@subindexclosepost
+ \let\@tstidx@subindexpre\@tstidx@gls@subindexpre
+ \let\@tstidx@subindexopenpre\@tstidx@gls@subindexopenpre
+ \let\@tstidx@subindexclosepre\@tstidx@gls@subindexclosepre
+ \let\@@tstidx@subsubindexpost\@tstidx@gls@subsubindexpost
+ \let\@@tstidx@subsubindexopenpost\@tstidx@gls@subsubindexopenpost
+ \let\@@tstidx@subsubindexclosepost\@tstidx@gls@subsubindexclosepost
+ \let\@@tstidx@subsubindexpre\@tstidx@gls@subsubindexpre
+ \let\@@tstidx@subsubindexopenpre\@tstidx@gls@subsubindexopenpre
+ \let\@@tstidx@subsubindexclosepre\@tstidx@gls@subsubindexclosepre
+ \let\@tidx@par@i\@tidx@gls@par@i
+ \let\@tidx@par@ii\@tidx@gls@par@ii
+ \let\@tidx@par@iii\@tidx@gls@par@iii
+ \let\@tidx@par@iv\@tidx@gls@par@iv
+ \let\@tidx@par@vi\@tidx@gls@par@vi
+ \let\@tidx@mathslettergroup\@tidx@gls@mathslettergroup
+ \let\@tidx@numberlettergroup\@tidx@gls@numberlettergroup
+ \let\@tidx@scriptnote\@tidx@gls@scriptnote
+ \let\@tidx@sanitizenote\@tidx@gls@sanitizenote
+ \let\@tidx@stripaccentsnote\@tidx@gls@stripaccentsnote
+}
+\renewcommand*{\testidx}{%
+ \@tstidx@usemakegloss
+ \@ifstar
+ {%
+ \def\@testidx@block@sep{\space}%
+ \@testidx
+ }%
+ {%
+ \def\@testidx@block@sep{\tstidxdefblocksep}%
+ \@testidx
+ }%
+}
+\iftestidxdiglyphs
+ \newcommand*{\tstidxglyphfile}{testidx-glossaries-diglyphs}
+\else
+ \newcommand*{\tstidxglyphfile}{testidx-glossaries-nodiglyphs}
+\fi
+\@ifpackageloaded{glossaries-extra}
+{
+ \newcommand*{\tstidxnewentry}[3]{\newglossaryentry{#1}{category={#2},#3}}
+}
+{
+ \newcommand*{\tstidxnewentry}[3]{\newglossaryentry{#1}{#3}}
+}
+\newcommand*{\@tstidx@gls@index}[1]{}
+\let\@tstidx@org@index\@tstindex
+\let\@tstindex\@tstidx@gls@index
+\newcommand*{\@tstidx@gls@wordpl}[2]{%
+ {\def\tstidx@gls{\glspl}\def\tstidx@glsentry{\glsentryplural}%
+ \tstidxword[#1]{#2}%
+ }%
+}
+\let\@tstidx@org@wordpl\@tstidxwordpl
+\let\@tstidxwordpl\@tstidx@gls@wordpl
+\newcommand*{\@tstidx@gls@phrasepl}[2]{%
+ {\def\tstidx@gls{\glspl}\def\tstidx@glsentry{\glsentryplural}%
+ \tstidxphrase[#1]{#2}%
+ }%
+}
+\let\@tstidx@org@phrasepl\@tstidxphrasepl
+\let\@tstidxphrasepl\@tstidx@gls@phrasepl
+\newcommand*{\@tstidx@gls@cs}[2]{%
+ \tstidxfmtpost{cs.#2}{\tstidxcsfmt}{#1}%
+}
+\let\@tstidx@org@cs\@tstidxcs
+\let\@tstidxcs\@tstidx@gls@cs
+\newcommand*{\tstidx@gls}{\gls}
+\newcommand*{\tstidx@glsentry}{\glsentrytext}
+\newcommand*{\tstidx@label}{\glslabel}
+\newcommand*{\tstidx@encap}{}
+\newcommand*{\tstidx@range}{}
+\newcommand*{\tstidx@openrange}{(}
+\newcommand*{\tstidx@closerange}{)}
+\newcommand*{\tstidx@levelmarker}[4]{%
+ \ifcsdef{glo@#1@level}%
+ {%
+ \ifcase\csname glo@#1@level\endcsname
+ #2\or#3\else#4%
+ \fi
+ }%
+ {%
+ #2%
+ }%
+}
+\newcommand*{\tstidx@post@glstextformat}[1]{%
+ \ifx\@tstidx@encap\@empty
+ \iftestidxshowmarks
+ \ifx\@tstidx@range\tstidx@openrange
+ \tstidxtext{#1%
+ \tstidx@levelmarker\@tstidx@label
+ \tstidxopenmarker
+ \tstidxopensubmarker
+ \tstidxopensubsubmarker
+ }%
+ \else
+ \ifx\@tstidx@range\tstidx@closerange
+ \tstidxtext{#1%
+ \tstidx@levelmarker\@tstidx@label
+ \tstidxclosemarker
+ \tstidxclosesubmarker
+ \tstidxclosesubsubmarker
+ }%
+ \else
+ \tstidxtext{#1%
+ \tstidx@levelmarker\@tstidx@label
+ \tstidxmarker
+ \tstidxsubmarker
+ \tstidxsubsubmarker
+ }%
+ \fi
+ \fi
+ \else
+ #1%
+ \fi
+ \else
+ \iftestidxshowmarks
+ \tstidxtext{\tstidxencaptext{\@tstidx@encap}{#1%
+ \tstidx@levelmarker\@tstidx@label
+ \tstidxmarker
+ \tstidxsubmarker
+ \tstidxsubsubmarker
+ }}%
+ \else
+ #1%
+ \fi
+ \fi
+}
+\newcommand*{\tstidx@pre@glstextformat}[1]{%
+ \ifx\@tstidx@encap\@empty
+ \iftestidxshowmarks
+ \ifx\@tstidx@range\tstidx@openrange
+ \tstidxtext{%
+ \tstidx@levelmarker\@tstidx@label
+ \tstidxopenmarker
+ \tstidxopensubmarker
+ \tstidxopensubsubmarker
+ #1}%
+ \else
+ \ifx\@tstidx@range\tstidx@closerange
+ \tstidxtext{%
+ \tstidx@levelmarker\@tstidx@label
+ \tstidxclosemarker
+ \tstidxclosesubmarker
+ \tstidxclosesubsubmarker
+ #1}%
+ \else
+ \tstidxtext{%
+ \tstidx@levelmarker\@tstidx@label
+ \tstidxmarker
+ \tstidxsubmarker
+ \tstidxsubsubmarker
+ #1}%
+ \fi
+ \fi
+ \else
+ #1%
+ \fi
+ \else
+ \iftestidxshowmarks
+ \tstidxtext{\tstidxencaptext{\@tstidx@encap}{%
+ \tstidx@levelmarker\@tstidx@label
+ \tstidxmarker
+ \tstidxsubmarker
+ \tstidxsubsubmarker
+ #1}}%
+ \else
+ #1%
+ \fi
+ \fi
+}
+\newcommand*{\@tstidx@zapnonlabel}[2]{%
+ \ifx,#1\@empty\else\ifx'#1\@empty\else\ifx-#1\@empty\else#1\fi\fi\fi
+ \ifx#2\@empty
+ \else
+ \expandafter\@tstidx@zapnonlabel
+ \fi
+ #2}
+\newcommand*{\tstidx@getlabel}[1]{\@tstidx@zapnonlabel#1\@empty\@empty}
+\newcommand*{\tstidx@glspreindex}[2][]{%
+ \glshyperlink[\glstextformat{}]{#2}\glsadd[#1]{#2}}
+\newcommand*{\tstidx@glspostindex}[2][]{%
+ \glsadd[#1]{#2}\glshyperlink[\glstextformat{}]{#2}}
+\def\@tstidx@gls@indexpost#1#2[#3]#4#5{%
+ \bgroup
+ \edef\@tstidx@label{\tstidx@getlabel{#3}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#1}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#2}}%
+ \fi
+ \fi
+ \def\@tstidx@encap{#4}%
+ \def\@tstidx@range{}%
+ \let\tstidx@org@glstextformat\glstextformat
+ \renewcommand\glstextformat[1]{\tstidx@post@glstextformat
+ {\tstidx@org@glstextformat{##1}}}%
+ \ifx\relax#5\relax
+ \ifx\@tstidx@encap\@empty
+ \tstidx@glspostindex{\@tstidx@label}%
+ \else
+ \tstidx@glspostindex[format={#4}]{\@tstidx@label}%
+ \fi
+ \else
+ \@ifundefined{glsxtrinitwrgloss}%
+ {%
+ \glshyperlink[\glstextformat{\tstidx@glsentry{\@tstidx@label}}]%
+ {\@tstidx@label}%
+ \ifx\@tstidx@encap\@empty
+ \glsadd{\@tstidx@label}%
+ \else
+ \glsadd[format={#4}]{\@tstidx@label}%
+ \fi
+ }%
+ {%
+ \ifx\@tstidx@encap\@empty
+ \tstidx@gls[wrgloss=after]{\@tstidx@label}%
+ \else
+ \tstidx@gls[wrgloss=after,format={#4}]{\@tstidx@label}%
+ \fi
+ }%
+ \fi
+ \egroup
+}
+\let\@tstidx@org@indexpost\@tstindexpost
+\let\@tstindexpost\@tstidx@gls@indexpost
+\def\@tstidx@gls@indexopenpost#1#2[#3]#4#5{%
+ \bgroup
+ \edef\@tstidx@label{\tstidx@getlabel{#3}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#1}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#2}}%
+ \fi
+ \fi
+ \def\@tstidx@encap{#4}%
+ \def\@tstidx@range{(}%
+ \let\tstidx@org@glstextformat\glstextformat
+ \renewcommand\glstextformat[1]{\tstidx@post@glstextformat
+ {\tstidx@org@glstextformat{##1}}}%
+ \ifx\relax#5\relax
+ \tstidx@glspostindex[format={(#4}]{\@tstidx@label}%
+ \else
+ \@ifundefined{glsxtrinitwrgloss}%
+ {%
+ \glshyperlink[\glstextformat{\tstidx@glsentry{\@tstidx@label}}]%
+ {\@tstidx@label}%
+ \glsadd[format={(#4}]{\@tstidx@label}%
+ }%
+ {%
+ \tstidx@gls[wrgloss=after,format={(#4}]{\@tstidx@label}%
+ }%
+ \fi
+ \egroup
+}
+\let\@tstidx@org@indexopenpost\@tstindexopenpost
+\let\@tstindexopenpost\@tstidx@gls@indexopenpost
+\def\@tstidx@gls@indexclosepost#1#2[#3]#4#5{%
+ \bgroup
+ \edef\@tstidx@label{\tstidx@getlabel{#3}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#1}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#2}}%
+ \fi
+ \fi
+ \def\@tstidx@encap{#4}%
+ \def\@tstidx@range{)}%
+ \let\tstidx@org@glstextformat\glstextformat
+ \renewcommand\glstextformat[1]{\tstidx@post@glstextformat
+ {\tstidx@org@glstextformat{##1}}}%
+ \ifx\relax#5\relax
+ \tstidx@glspostindex[format={)#4}]{\@tstidx@label}%
+ \else
+ \@ifundefined{glsxtrinitwrgloss}%
+ {%
+ \glshyperlink[\glstextformat{\tstidx@glsentry{\@tstidx@label}}]%
+ {\@tstidx@label}%
+ \glsadd[format={)#4}]{\@tstidx@label}%
+ }%
+ {%
+ \tstidx@gls[wrgloss=after,format={)#4}]{\@tstidx@label}%
+ }%
+ \fi
+ \egroup
+}
+\let\@tstidx@org@indexclosepost\@tstindexclosepost
+\let\@tstindexclosepost\@tstidx@gls@indexclosepost
+\def\@tstidx@gls@indexpre#1#2[#3]#4#5{%
+ \bgroup
+ \edef\@tstidx@label{\tstidx@getlabel{#3}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#1}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#2}}%
+ \fi
+ \fi
+ \def\@tstidx@encap{#4}%
+ \def\@tstidx@range{}%
+ \let\tstidx@org@glstextformat\glstextformat
+ \renewcommand\glstextformat[1]{\tstidx@pre@glstextformat
+ {\tstidx@org@glstextformat{##1}}}%
+ \ifx\relax#5\relax
+ \ifx\@tstidx@encap\@empty
+ \tstidx@glspreindex{\@tstidx@label}%
+ \else
+ \tstidx@glspreindex[format={#4}]{\@tstidx@label}%
+ \fi
+ \else
+ \ifx\@tstidx@encap\@empty
+ \tstidx@gls{\@tstidx@label}%
+ \else
+ \tstidx@gls[format={#4}]{\@tstidx@label}%
+ \fi
+ \fi
+ \egroup
+}
+\let\@tstidx@org@indexpre\@tstindexpre
+\let\@tstindexpre\@tstidx@gls@indexpre
+\def\@tstidx@gls@indexopenpre#1#2[#3]#4#5{%
+ \bgroup
+ \edef\@tstidx@label{\tstidx@getlabel{#3}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#1}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#2}}%
+ \fi
+ \fi
+ \def\@tstidx@encap{#4}%
+ \def\@tstidx@range{(}%
+ \let\tstidx@org@glstextformat\glstextformat
+ \renewcommand\glstextformat[1]{\tstidx@pre@glstextformat
+ {\tstidx@org@glstextformat{##1}}}%
+ \ifx\relax#5\relax
+ \tstidx@glspreindex[format={(#4}]{\@tstidx@label}%
+ \else
+ \tstidx@gls[format={(#4}]{\@tstidx@label}%
+ \fi
+ \egroup
+}
+\let\@tstidx@org@indexopenpre\@tstindexopenpre
+\let\@tstindexopenpre\@tstidx@gls@indexopenpre
+\def\@tstidx@gls@indexclosepre#1#2[#3]#4#5{%
+ \bgroup
+ \edef\@tstidx@label{\tstidx@getlabel{#3}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#1}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#2}}%
+ \fi
+ \fi
+ \def\@tstidx@encap{#4}%
+ \def\@tstidx@range{)}%
+ \let\tstidx@org@glstextformat\glstextformat
+ \renewcommand\glstextformat[1]{\tstidx@pre@glstextformat
+ {\tstidx@org@glstextformat{##1}}}%
+ \ifx\relax#5\relax
+ \tstidx@glspreindex[format={)#4}]{\@tstidx@label}%
+ \else
+ \tstidx@gls[format={)#4}]{\@tstidx@label}%
+ \fi
+ \egroup
+}
+\let\@tstidx@org@indexclosepre\@tstindexclosepre
+\let\@tstindexclosepre\@tstidx@gls@indexclosepre
+\providecommand*\seealsoname{see also}
+\providecommand*\seename{see}
+\newcommand*\tstidx@seealso{seealso}
+\def\@tstidx@gls@indexsee#1#2#3#4[#5]#6{%
+ \if@tstidx@useglsseekey
+ \else
+ \bgroup
+ \edef\@tstidx@label{\tstidx@getlabel{#3}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#1}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#2}}%
+ \fi
+ \fi
+ \ifx\relax#5\relax
+ \def\@tstidx@xrlabel{}%
+ \def\@tstidx@xrlabel@sep{}%
+ \@for\@tst@idxthis:=#6\do{%
+ \edef\@tstidx@xrlabel{\@tstidx@xrlabel\@tstidx@xrlabel@sep
+ \expandafter\tstidx@getlabel\expandafter{\@tst@idxthis}}%
+ \def\@tstidx@xrlabel@sep{,}%
+ }%
+ \else
+ \def\@tstidx@xrlabel{#5}%
+ \fi
+ \edef\@tstidx@seetag{#4}%
+ \ifx\@tstidx@seetag\tstidx@seealso
+ \if@tstidx@hasseealsokey
+ \expandafter\glsxtrindexseealso\expandafter\@tstidx@label\expandafter
+ {\@tstidx@xrlabel}%
+ \else
+ \expandafter\glssee\expandafter[\expandafter\seealsoname
+ \expandafter]\expandafter\@tstidx@label\expandafter{\@tstidx@xrlabel}%
+ \fi
+ \else
+ \expandafter\glssee\expandafter\@tstidx@label\expandafter
+ {\@tstidx@xrlabel}%
+ \fi
+ \iftestidxshowmarks
+ \ifx\relax#5\relax
+ \tstidxseeref{#2}{tst#4ref}{#6}%
+ \else
+ \tstidxseeref{#2}{tst#4ref}{#5}%
+ \fi
+ \fi
+ \egroup
+ \fi
+}
+\let\@tstidx@org@indexsee\@tstindexsee
+\let\@tstindexsee\@tstidx@gls@indexsee
+\def\@tstidx@gls@subindexpost#1#2[#3]#4#5{%
+ \bgroup
+ \edef\@tstidx@label{\tstidx@getlabel{#3}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#1}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#2}}%
+ \fi
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#2}}%
+ \fi
+ \ifx\@tstidx@sort\empty
+ \edef\@tstidx@label{%
+ \expandafter\tstidx@getlabel\expandafter{\@tstidx@term}%
+ .\@tstidx@label}%
+ \else
+ \edef\@tstidx@label{%
+ \expandafter\tstidx@getlabel\expandafter{\@tstidx@sort}%
+ .\@tstidx@label}%
+ \fi
+ \fi
+ \def\@tstidx@encap{#4}%
+ \def\@tstidx@range{}%
+ \let\tstidx@org@glstextformat\glstextformat
+ \renewcommand\glstextformat[1]{\tstidx@post@glstextformat
+ {\tstidx@org@glstextformat{##1}}}%
+ \ifx\relax#5\relax
+ \ifx\@tstidx@encap\@empty
+ \tstidx@glspostindex{\@tstidx@label}%
+ \else
+ \tstidx@glspostindex[format={#4}]{\@tstidx@label}%
+ \fi
+ \else
+ \@ifundefined{glsxtrinitwrgloss}%
+ {%
+ \glshyperlink[\glstextformat{\tstidx@glsentry{\@tstidx@label}}]%
+ {\@tstidx@label}%
+ \ifx\@tstidx@encap\@empty
+ \glsadd{\@tstidx@label}%
+ \else
+ \glsadd[format={#4}]{\@tstidx@label}%
+ \fi
+ }%
+ {%
+ \ifx\@tstidx@encap\@empty
+ \tstidx@gls[wrgloss=after]{\@tstidx@label}%
+ \else
+ \tstidx@gls[wrgloss=after,format={#4}]{\@tstidx@label}%
+ \fi
+ }%
+ \fi
+ \egroup
+}
+\let\@tstidx@org@subindexpost\@tstidx@subindexpost
+\let\@tstidx@subindexpost\@tstidx@gls@subindexpost
+\def\@tstidx@gls@subindexopenpost#1#2[#3]#4#5{%
+ \bgroup
+ \edef\@tstidx@label{\tstidx@getlabel{#3}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#1}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#2}}%
+ \fi
+ \ifx\@tstidx@sort\empty
+ \edef\@tstidx@label{%
+ \expandafter\tstidx@getlabel\expandafter{\@tstidx@term}%
+ .\@tstidx@label}%
+ \else
+ \edef\@tstidx@label{%
+ \expandafter\tstidx@getlabel\expandafter{\@tstidx@sort}%
+ .\@tstidx@label}%
+ \fi
+ \fi
+ \def\@tstidx@encap{#4}%
+ \def\@tstidx@range{(}%
+ \let\tstidx@org@glstextformat\glstextformat
+ \renewcommand\glstextformat[1]{\tstidx@post@glstextformat
+ {\tstidx@org@glstextformat{##1}}}%
+ \ifx\relax#5\relax
+ \tstidx@glspostindex[format={(#4}]{\@tstidx@label}%
+ \else
+ \@ifundefined{glsxtrinitwrgloss}%
+ {%
+ \glshyperlink[\glstextformat{\tstidx@glsentry{\@tstidx@label}}]%
+ {\@tstidx@label}%
+ \glsadd[format={(#4}]{\@tstidx@label}%
+ }%
+ {%
+ \tstidx@gls[wrgloss=after,format={(#4}]{\@tstidx@label}%
+ }%
+ \fi
+ \egroup
+}
+\let\@tstidx@org@subindexopenpost\@tstidx@subindexopenpost
+\let\@tstidx@subindexopenpost\@tstidx@gls@subindexopenpost
+\def\@tstidx@gls@subindexclosepost#1#2[#3]#4#5{%
+ \bgroup
+ \edef\@tstidx@label{\tstidx@getlabel{#3}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#1}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#2}}%
+ \fi
+ \ifx\@tstidx@sort\empty
+ \edef\@tstidx@label{%
+ \expandafter\tstidx@getlabel\expandafter{\@tstidx@term}%
+ .\@tstidx@label}%
+ \else
+ \edef\@tstidx@label{%
+ \expandafter\tstidx@getlabel\expandafter{\@tstidx@sort}%
+ .\@tstidx@label}%
+ \fi
+ \fi
+ \def\@tstidx@encap{#4}%
+ \def\@tstidx@range{)}%
+ \let\tstidx@org@glstextformat\glstextformat
+ \renewcommand\glstextformat[1]{\tstidx@post@glstextformat
+ {\tstidx@org@glstextformat{##1}}}%
+ \ifx\relax#5\relax
+ \tstidx@glspostindex[format={)#4}]{\@tstidx@label}%
+ \else
+ \@ifundefined{glsxtrinitwrgloss}%
+ {%
+ \glshyperlink[\glstextformat{\tstidx@glsentry{\@tstidx@label}}]%
+ {\@tstidx@label}%
+ \glsadd[format={)#4}]{\@tstidx@label}%
+ }%
+ {%
+ \tstidx@gls[wrgloss=after,format={)#4}]{\@tstidx@label}%
+ }%
+ \fi
+ \egroup
+}
+\let\@tstidx@org@subindexclosepost\@tstidx@subindexclosepost
+\let\@tstidx@subindexclosepost\@tstidx@gls@subindexclosepost
+\def\@tstidx@gls@subindexpre#1#2[#3]#4#5{%
+ \bgroup
+ \edef\@tstidx@label{\tstidx@getlabel{#3}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#1}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#2}}%
+ \fi
+ \ifx\@tstidx@sort\empty
+ \edef\@tstidx@label{%
+ \expandafter\tstidx@getlabel\expandafter{\@tstidx@term}%
+ .\@tstidx@label}%
+ \else
+ \edef\@tstidx@label{%
+ \expandafter\tstidx@getlabel\expandafter{\@tstidx@sort}%
+ .\@tstidx@label}%
+ \fi
+ \fi
+ \def\@tstidx@encap{#4}%
+ \def\@tstidx@range{}%
+ \let\tstidx@org@glstextformat\glstextformat
+ \renewcommand\glstextformat[1]{\tstidx@pre@glstextformat
+ {\tstidx@org@glstextformat{##1}}}%
+ \ifx\relax#5\relax
+ \ifx\@tstidx@encap\@empty
+ \tstidx@glspreindex{\@tstidx@label}%
+ \else
+ \tstidx@glspreindex[format={#4}]{\@tstidx@label}%
+ \fi
+ \else
+ \ifx\@tstidx@encap\@empty
+ \tstidx@gls{\@tstidx@label}%
+ \else
+ \tstidx@gls[format={#4}]{\@tstidx@label}%
+ \fi
+ \fi
+ \egroup
+}
+\let\@tstidx@org@subindexpre\@tstidx@subindexpre
+\let\@tstidx@subindexpre\@tstidx@gls@subindexpre
+\def\@tstidx@gls@subindexopenpre#1#2[#3]#4#5{%
+ \bgroup
+ \edef\@tstidx@label{\tstidx@getlabel{#3}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#1}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#2}}%
+ \fi
+ \ifx\@tstidx@sort\empty
+ \edef\@tstidx@label{%
+ \expandafter\tstidx@getlabel\expandafter{\@tstidx@term}%
+ .\@tstidx@label}%
+ \else
+ \edef\@tstidx@label{%
+ \expandafter\tstidx@getlabel\expandafter{\@tstidx@sort}%
+ .\@tstidx@label}%
+ \fi
+ \fi
+ \def\@tstidx@encap{#4}%
+ \def\@tstidx@range{(}%
+ \let\tstidx@org@glstextformat\glstextformat
+ \renewcommand\glstextformat[1]{\tstidx@pre@glstextformat
+ {\tstidx@org@glstextformat{##1}}}%
+ \ifx\relax#5\relax
+ \tstidx@glspreindex[format={(#4}]{\@tstidx@label}%
+ \else
+ \tstidx@gls[format={(#4}]{\@tstidx@label}%
+ \fi
+ \egroup
+}
+\let\@tstidx@org@subindexopenpre\@tstidx@subindexopenpre
+\let\@tstidx@subindexopenpre\@tstidx@gls@subindexopenpre
+\def\@tstidx@gls@subindexclosepre#1#2[#3]#4#5{%
+ \bgroup
+ \edef\@tstidx@label{\tstidx@getlabel{#3}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#1}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#2}}%
+ \fi
+ \ifx\@tstidx@sort\empty
+ \edef\@tstidx@label{%
+ \expandafter\tstidx@getlabel\expandafter{\@tstidx@term}%
+ .\@tstidx@label}%
+ \else
+ \edef\@tstidx@label{%
+ \expandafter\tstidx@getlabel\expandafter{\@tstidx@sort}%
+ .\@tstidx@label}%
+ \fi
+ \fi
+ \def\@tstidx@encap{#4}%
+ \def\@tstidx@range{)}%
+ \let\tstidx@org@glstextformat\glstextformat
+ \renewcommand\glstextformat[1]{\tstidx@pre@glstextformat
+ {\tstidx@org@glstextformat{##1}}}%
+ \ifx\relax#5\relax
+ \tstidx@glspreindex[format={)#4}]{\@tstidx@label}%
+ \else
+ \tstidx@gls[format={)#4}]{\@tstidx@label}%
+ \fi
+ \egroup
+}
+\let\@tstidx@org@subindexclosepre\@tstidx@subindexclosepre
+\let\@tstidx@subindexclosepre\@tstidx@gls@subindexclosepre
+\def\@tstidx@gls@indexsubsee#1#2#3#4[#5]#6{%
+ \if@tstidx@useglsseekey
+ \else
+ \bgroup
+ \edef\@tstidx@label{\tstidx@getlabel{#3}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#1}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#2}}%
+ \fi
+ \fi
+ \ifx\relax#5\relax
+ \def\@tstidx@xrlabel{}%
+ \def\@tstidx@xrlabel@sep{}%
+ \@for\@tst@idxthis:=#6\do{%
+ \edef\@tstidx@xrlabel{\@tstidx@xrlabel\@tstidx@xrlabel@sep
+ \expandafter\tstidx@getlabel\expandafter{\@tst@idxthis}}%
+ \def\@tstidx@xrlabel@sep{,}%
+ }%
+ \else
+ \def\@tstidx@xrlabel{#5}%
+ \fi
+ \edef\@tstidx@seetag{#4}%
+ \ifx\@tstidx@seetag\tstidx@seealso
+ \if@tstidx@hasseealsokey
+ \expandafter\glsxtrindexseealso\expandafter\@tstidx@label\expandafter
+ {\@tstidx@xrlabel}%
+ \else
+ \expandafter\glssee\expandafter[\expandafter\seealsoname
+ \expandafter]\expandafter\@tstidx@label\expandafter{\@tstidx@xrlabel}%
+ \fi
+ \else
+ \expandafter\glssee\expandafter\@tstidx@label\expandafter
+ {\@tstidx@xrlabel}%
+ \fi
+ \iftestidxshowmarks
+ \protected@edef\tstidx@dosee{\noexpand\tstidxsubseeref
+ {\@tstidx@term}{#2}{tst#4ref}{\@tstidx@xrlabel}}%
+ \tstidx@dosee
+ \fi
+ \egroup
+ \fi
+}
+\let\@tstidx@org@indexsubsee\@tstidx@indexsubsee
+\let\@tstidx@indexsubsee\@tstidx@gls@indexsubsee
+\def\@tstidx@gls@subsubindexpost#1#2[#3]#4#5{%
+ \bgroup
+ \edef\@tstidx@label{\tstidx@getlabel{#3}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#1}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#2}}%
+ \fi
+ \ifx\@tstidx@sort\empty
+ \ifx\@tstidx@subsort\empty
+ \edef\@tstidx@label{%
+ \expandafter\tstidx@getlabel\expandafter{\@tstidx@term}%
+ .\expandafter\tstidx@getlabel\expandafter{\@tstidx@subterm}%
+ .\@tstidx@label}%
+ \else
+ \edef\@tstidx@label{%
+ \expandafter\tstidx@getlabel\expandafter{\@tstidx@term}%
+ .\expandafter\tstidx@getlabel\expandafter{\@tstidx@subsort}%
+ .\@tstidx@label}%
+ \fi
+ \else
+ \ifx\@tstidx@subsort\empty
+ \edef\@tstidx@label{%
+ \expandafter\tstidx@getlabel\expandafter{\@tstidx@sort}%
+ .\expandafter\tstidx@getlabel\expandafter{\@tstidx@subterm}%
+ .\@tstidx@label}%
+ \else
+ \edef\@tstidx@label{%
+ \expandafter\tstidx@getlabel\expandafter{\@tstidx@sort}%
+ .\expandafter\tstidx@getlabel\expandafter{\@tstidx@subsort}%
+ .\@tstidx@label}%
+ \fi
+ \fi
+ \fi
+ \def\@tstidx@encap{#4}%
+ \def\@tstidx@range{}%
+ \let\tstidx@org@glstextformat\glstextformat
+ \renewcommand\glstextformat[1]{\tstidx@post@glstextformat
+ {\tstidx@org@glstextformat{##1}}}%
+ \ifx\relax#5\relax
+ \ifx\@tstidx@encap\@empty
+ \tstidx@glspostindex{\@tstidx@label}%
+ \else
+ \tstidx@glspostindex[format={#4}]{\@tstidx@label}%
+ \fi
+ \else
+ \@ifundefined{glsxtrinitwrgloss}%
+ {%
+ \glshyperlink[\glstextformat{\tstidx@glsentry{\@tstidx@label}}]%
+ {\@tstidx@label}%
+ \ifx\@tstidx@encap\@empty
+ \glsadd{\@tstidx@label}%
+ \else
+ \glsadd[format={#4}]{\@tstidx@label}%
+ \fi
+ }%
+ {%
+ \ifx\@tstidx@encap\@empty
+ \tstidx@gls[wrgloss=after]{\@tstidx@label}%
+ \else
+ \tstidx@gls[wrgloss=after,format={#4}]{\@tstidx@label}%
+ \fi
+ }%
+ \fi
+ \egroup
+}
+\let\@tstidx@org@subsubindexpost\@@tstidx@subsubindexpost
+\let\@@tstidx@subsubindexpost\@tstidx@gls@subsubindexpost
+\def\@tstidx@gls@subsubindexopenpost#1#2[#3]#4#5{%
+ \bgroup
+ \edef\@tstidx@label{\tstidx@getlabel{#3}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#1}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#2}}%
+ \fi
+ \ifx\@tstidx@sort\empty
+ \ifx\@tstidx@subsort\empty
+ \edef\@tstidx@label{%
+ \expandafter\tstidx@getlabel\expandafter{\@tstidx@term}%
+ .\expandafter\tstidx@getlabel\expandafter{\@tstidx@subterm}%
+ .\@tstidx@label}%
+ \else
+ \edef\@tstidx@label{%
+ \expandafter\tstidx@getlabel\expandafter{\@tstidx@term}%
+ .\expandafter\tstidx@getlabel\expandafter{\@tstidx@subsort}%
+ .\@tstidx@label}%
+ \fi
+ \else
+ \ifx\@tstidx@subsort\empty
+ \edef\@tstidx@label{%
+ \expandafter\tstidx@getlabel\expandafter{\@tstidx@sort}%
+ .\expandafter\tstidx@getlabel\expandafter{\@tstidx@subterm}%
+ .\@tstidx@label}%
+ \else
+ \edef\@tstidx@label{%
+ \expandafter\tstidx@getlabel\expandafter{\@tstidx@sort}%
+ .\expandafter\tstidx@getlabel\expandafter{\@tstidx@subsort}%
+ .\@tstidx@label}%
+ \fi
+ \fi
+ \fi
+ \def\@tstidx@encap{#4}%
+ \def\@tstidx@range{(}%
+ \let\tstidx@org@glstextformat\glstextformat
+ \renewcommand\glstextformat[1]{\tstidx@post@glstextformat
+ {\tstidx@org@glstextformat{##1}}}%
+ \ifx\relax#5\relax
+ \tstidx@glspostindex[format={(#4}]{\@tstidx@label}%
+ \else
+ \@ifundefined{glsxtrinitwrgloss}%
+ {%
+ \glshyperlink[\glstextformat{\tstidx@glsentry{\@tstidx@label}}]%
+ {\@tstidx@label}%
+ \glsadd[format={(#4}]{\@tstidx@label}%
+ }%
+ {%
+ \tstidx@gls[wrgloss=after,format={(#4}]{\@tstidx@label}%
+ }%
+ \fi
+ \egroup
+}
+\let\@tstidx@org@subsubindexopenpost\@@tstidx@subsubindexopenpost
+\let\@@tstidx@subsubindexopenpost\@tstidx@gls@subsubindexopenpost
+\def\@tstidx@gls@subsubindexclosepost#1#2[#3]#4#5{%
+ \bgroup
+ \edef\@tstidx@label{\tstidx@getlabel{#3}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#1}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#2}}%
+ \fi
+ \ifx\@tstidx@sort\empty
+ \ifx\@tstidx@subsort\empty
+ \edef\@tstidx@label{%
+ \expandafter\tstidx@getlabel\expandafter{\@tstidx@term}%
+ .\expandafter\tstidx@getlabel\expandafter{\@tstidx@subterm}%
+ .\@tstidx@label}%
+ \else
+ \edef\@tstidx@label{%
+ \expandafter\tstidx@getlabel\expandafter{\@tstidx@term}%
+ .\expandafter\tstidx@getlabel\expandafter{\@tstidx@subsort}%
+ .\@tstidx@label}%
+ \fi
+ \else
+ \ifx\@tstidx@subsort\empty
+ \edef\@tstidx@label{%
+ \expandafter\tstidx@getlabel\expandafter{\@tstidx@sort}%
+ .\expandafter\tstidx@getlabel\expandafter{\@tstidx@subterm}%
+ .\@tstidx@label}%
+ \else
+ \edef\@tstidx@label{%
+ \expandafter\tstidx@getlabel\expandafter{\@tstidx@sort}%
+ .\expandafter\tstidx@getlabel\expandafter{\@tstidx@subsort}%
+ .\@tstidx@label}%
+ \fi
+ \fi
+ \fi
+ \def\@tstidx@encap{#4}%
+ \def\@tstidx@range{)}%
+ \let\tstidx@org@glstextformat\glstextformat
+ \renewcommand\glstextformat[1]{\tstidx@post@glstextformat
+ {\tstidx@org@glstextformat{##1}}}%
+ \ifx\relax#5\relax
+ \tstidx@glspostindex[format={)#4}]{\@tstidx@label}%
+ \else
+ \@ifundefined{glsxtrinitwrgloss}%
+ {%
+ \glshyperlink[\glstextformat{\tstidx@glsentry{\@tstidx@label}}]%
+ {\@tstidx@label}%
+ \glsadd[format={)#4}]{\@tstidx@label}%
+ }%
+ {%
+ \tstidx@gls[wrgloss=after,format={)#4}]{\@tstidx@label}%
+ }%
+ \fi
+ \egroup
+}
+\let\@tstidx@org@subsubindexclosepost\@@tstidx@subsubindexclosepost
+\let\@@tstidx@subsubindexclosepost\@tstidx@gls@subsubindexclosepost
+\def\@tstidx@gls@subsubindexpre#1#2[#3]#4#5{%
+ \bgroup
+ \edef\@tstidx@label{\tstidx@getlabel{#3}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#1}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#2}}%
+ \fi
+ \ifx\@tstidx@sort\empty
+ \ifx\@tstidx@subsort\empty
+ \edef\@tstidx@label{%
+ \expandafter\tstidx@getlabel\expandafter{\@tstidx@term}%
+ .\expandafter\tstidx@getlabel\expandafter{\@tstidx@subterm}%
+ .\@tstidx@label}%
+ \else
+ \edef\@tstidx@label{%
+ \expandafter\tstidx@getlabel\expandafter{\@tstidx@term}%
+ .\expandafter\tstidx@getlabel\expandafter{\@tstidx@subsort}%
+ .\@tstidx@label}%
+ \fi
+ \else
+ \ifx\@tstidx@subsort\empty
+ \edef\@tstidx@label{%
+ \expandafter\tstidx@getlabel\expandafter{\@tstidx@sort}%
+ .\expandafter\tstidx@getlabel\expandafter{\@tstidx@subterm}%
+ .\@tstidx@label}%
+ \else
+ \edef\@tstidx@label{%
+ \expandafter\tstidx@getlabel\expandafter{\@tstidx@sort}%
+ .\expandafter\tstidx@getlabel\expandafter{\@tstidx@subsort}%
+ .\@tstidx@label}%
+ \fi
+ \fi
+ \fi
+ \def\@tstidx@encap{#4}%
+ \def\@tstidx@range{}%
+ \let\tstidx@org@glstextformat\glstextformat
+ \renewcommand\glstextformat[1]{\tstidx@pre@glstextformat
+ {\tstidx@org@glstextformat{##1}}}%
+ \ifx\relax#5\relax
+ \ifx\@tstidx@encap\@empty
+ \tstidx@glspreindex{\@tstidx@label}%
+ \else
+ \tstidx@glspreindex[format={#4}]{\@tstidx@label}%
+ \fi
+ \else
+ \ifx\@tstidx@encap\@empty
+ \tstidx@gls{\@tstidx@label}%
+ \else
+ \tstidx@gls[format={#4}]{\@tstidx@label}%
+ \fi
+ \fi
+ \egroup
+}
+\let\@tstidx@org@subsubindexpre\@@tstidx@subsubindexpre
+\let\@@tstidx@subsubindexpre\@tstidx@gls@subsubindexpre
+\def\@tstidx@gls@subsubindexopenpre#1#2[#3]#4#5{%
+ \bgroup
+ \edef\@tstidx@label{\tstidx@getlabel{#3}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#1}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#2}}%
+ \fi
+ \ifx\@tstidx@sort\empty
+ \ifx\@tstidx@subsort\empty
+ \edef\@tstidx@label{%
+ \expandafter\tstidx@getlabel\expandafter{\@tstidx@term}%
+ .\expandafter\tstidx@getlabel\expandafter{\@tstidx@subterm}%
+ .\@tstidx@label}%
+ \else
+ \edef\@tstidx@label{%
+ \expandafter\tstidx@getlabel\expandafter{\@tstidx@term}%
+ .\expandafter\tstidx@getlabel\expandafter{\@tstidx@subsort}%
+ .\@tstidx@label}%
+ \fi
+ \else
+ \ifx\@tstidx@subsort\empty
+ \edef\@tstidx@label{%
+ \expandafter\tstidx@getlabel\expandafter{\@tstidx@sort}%
+ .\expandafter\tstidx@getlabel\expandafter{\@tstidx@subterm}%
+ .\@tstidx@label}%
+ \else
+ \edef\@tstidx@label{%
+ \expandafter\tstidx@getlabel\expandafter{\@tstidx@sort}%
+ .\expandafter\tstidx@getlabel\expandafter{\@tstidx@subsort}%
+ .\@tstidx@label}%
+ \fi
+ \fi
+ \fi
+ \def\@tstidx@encap{#4}%
+ \def\@tstidx@range{(}%
+ \let\tstidx@org@glstextformat\glstextformat
+ \renewcommand\glstextformat[1]{\tstidx@pre@glstextformat
+ {\tstidx@org@glstextformat{##1}}}%
+ \ifx\relax#5\relax
+ \tstidx@glspreindex[format={(#4}]{\@tstidx@label}%
+ \else
+ \tstidx@gls[format={(#4}]{\@tstidx@label}%
+ \fi
+ \egroup
+}
+\let\@tstidx@org@subsubindexopenpre\@@tstidx@subsubindexopenpre
+\let\@@tstidx@subsubindexopenpre\@tstidx@gls@subsubindexopenpre
+\def\@tstidx@gls@subsubindexclosepre#1#2[#3]#4#5{%
+ \bgroup
+ \edef\@tstidx@label{\tstidx@getlabel{#3}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#1}}%
+ \ifx\@tstidx@label\@empty
+ \edef\@tstidx@label{\tstidx@getlabel{#2}}%
+ \fi
+ \ifx\@tstidx@sort\empty
+ \ifx\@tstidx@subsort\empty
+ \edef\@tstidx@label{%
+ \expandafter\tstidx@getlabel\expandafter{\@tstidx@term}%
+ .\expandafter\tstidx@getlabel\expandafter{\@tstidx@subterm}%
+ .\@tstidx@label}%
+ \else
+ \edef\@tstidx@label{%
+ \expandafter\tstidx@getlabel\expandafter{\@tstidx@term}%
+ .\expandafter\tstidx@getlabel\expandafter{\@tstidx@subsort}%
+ .\@tstidx@label}%
+ \fi
+ \else
+ \ifx\@tstidx@subsort\empty
+ \edef\@tstidx@label{%
+ \expandafter\tstidx@getlabel\expandafter{\@tstidx@sort}%
+ .\expandafter\tstidx@getlabel\expandafter{\@tstidx@subterm}%
+ .\@tstidx@label}%
+ \else
+ \edef\@tstidx@label{%
+ \expandafter\tstidx@getlabel\expandafter{\@tstidx@sort}%
+ .\expandafter\tstidx@getlabel\expandafter{\@tstidx@subsort}%
+ .\@tstidx@label}%
+ \fi
+ \fi
+ \fi
+ \def\@tstidx@encap{#4}%
+ \def\@tstidx@range{)}%
+ \let\tstidx@org@glstextformat\glstextformat
+ \renewcommand\glstextformat[1]{\tstidx@pre@glstextformat
+ {\tstidx@org@glstextformat{##1}}}%
+ \ifx\relax#5\relax
+ \tstidx@glspreindex[format={)#4}]{\@tstidx@label}%
+ \else
+ \tstidx@gls[format={)#4}]{\@tstidx@label}%
+ \fi
+ \egroup
+}
+\let\@tstidx@org@subsubindexclosepre\@@tstidx@subsubindexclosepre
+\let\@@tstidx@subsubindexclosepre\@tstidx@gls@subsubindexclosepre
+\newcommand*{\tstidxnewutfentry}[6]{%
+ \@tstidx@ifutfviii
+ {%
+ \tstidxprocessutf{\@tstidx@utf}{#3}%
+ \ifx\relax#4\relax
+ \protected@edef\@tstidx@doidx{%
+ \noexpand\tstidxnewentry{#1}{#6}%
+ {name={#3},%
+ sort={\unexpanded\expandafter{\@tstidx@utf}},%
+ description={},#5}}%
+ \else
+ \protected@edef\@tstidx@doidx{%
+ \noexpand\tstidxnewentry{#1}{#6}%
+ {name={\noexpand#4{#3}},%
+ sort={\unexpanded\expandafter{\@tstidx@utf}},%
+ description={},#5}}%
+ \fi
+ }%
+ {%
+ \tstidxprocessasciisort{\@tstidx@asciisort}{#2}%
+ \tstidxprocessasciisortstrip{\@tstidx@asciilabel}{#1}%
+ \ifx\relax#4\relax
+ \protected@edef\@tstidx@doidx{%
+ \noexpand\tstidxnewentry{\@tstidx@asciilabel}{#6}%
+ {name={#2},%
+ sort={\unexpanded\expandafter{\@tstidx@asciisort}},%
+ description={},#5}}%
+ \else
+ \protected@edef\@tstidx@doidx{%
+ \noexpand\tstidxnewentry{\@tstidx@asciilabel}{#6}%
+ {name={\noexpand#4{#2}},%
+ sort={\unexpanded\expandafter{\@tstidx@asciisort}},%
+ description={},#5}}%
+ \fi
+ }%
+ \@tstidx@doidx
+}
+\newcommand*{\tstidxnewutfentrytext}[8]{%
+ \@tstidx@ifutfviii
+ {%
+ \tstidxprocessutf{\@tstidx@utf}{#4}%
+ \ifx\relax#6\relax
+ \protected@edef\@tstidx@doidx{%
+ \noexpand\tstidxnewentry{#1}{#8}%
+ {name={#4},%
+ sort={\unexpanded\expandafter{\@tstidx@utf}},%
+ text={#5},%
+ description={},#7}}%
+ \else
+ \protected@edef\@tstidx@doidx{%
+ \noexpand\tstidxnewentry{#1}{#8}%
+ {name={#4},%
+ text={\noexpand#6{#5}},%
+ sort={\unexpanded\expandafter{\@tstidx@utf}},%
+ description={},#7}}%
+ \fi
+ }%
+ {%
+ \tstidxprocessasciisort{\@tstidx@asciisort}{#2}%
+ \ifx\relax#6\relax
+ \protected@edef\@tstidx@doidx{%
+ \noexpand\tstidxnewentry{#1}{#8}%
+ {name={#2},%
+ text={#3},%
+ sort={\unexpanded\expandafter{\@tstidx@asciisort}},%
+ description={},#7}}%
+ \else
+ \protected@edef\@tstidx@doidx{%
+ \noexpand\tstidxnewentry{#1}{#8}%
+ {name={\noexpand#6{#2}},%
+ text={\noexpand#6{#3}},%
+ sort={\unexpanded\expandafter{\@tstidx@asciisort}},%
+ description={},#7}}%
+ \fi
+ }%
+ \@tstidx@doidx
+}
+\newcommand*{\tstidxnewword}[3][]{%
+ \if@tstidx@setdescription
+ \tstidxnewentry{\tstidx@getlabel{#2}}{word}{name={#2},description={#3},#1}%
+ \else
+ \tstidxnewentry{\tstidx@getlabel{#2}}{word}{name={#2},description={},#1}%
+ \fi
+}
+\if@tstidx@useglsseekey
+ \newcommand*{\tstidxnewwordsee}[4][]{%
+ \tstidxnewword[see={#4},#1]{#2}{#3}%
+ }
+\else
+ \newcommand*{\tstidxnewwordsee}[4][]{%
+ \tstidxnewword[#1]{#2}{#3}%
+ }
+\fi
+\if@tstidx@useglsseekey
+ \if@tstidx@hasseealsokey
+ \newcommand*{\tstidxnewwordseealso}[4][]{%
+ \tstidxnewword[seealso={#4},#1]{#2}{#3}%
+ }
+ \else
+ \newcommand*{\tstidxnewwordseealso}[4][]{%
+ \tstidxnewword[see={[\seealsoname]#4},#1]{#2}{#3}%
+ }
+ \fi
+\else
+ \newcommand*{\tstidxnewwordseealso}[4][]{%
+ \tstidxnewword[#1]{#2}{#3}%
+ }
+\fi
+\newcommand*{\tstidxnewdigraph}[3][]{%
+ \if@tstidx@setdescription
+ \tstidxnewentry{\tstidx@getlabel{#2}}{digraph}{name={#2},description={#3},#1}%
+ \else
+ \tstidxnewentry{\tstidx@getlabel{#2}}{digraph}{name={#2},description={},#1}%
+ \fi
+}
+\newcommand*{\tstidxnewtrigraph}[3][]{%
+ \if@tstidx@setdescription
+ \tstidxnewentry{\tstidx@getlabel{#2}}{trigraph}{name={#2},description={#3},#1}%
+ \else
+ \tstidxnewentry{\tstidx@getlabel{#2}}{trigraph}{name={#2},description={},#1}%
+ \fi
+}
+\newcommand*{\tstidxnewsubword}[4][]{%
+ \if@tstidx@setdescription
+ \tstidxnewentry{\tstidx@getlabel{#2.#3}}{word}%
+ {parent={\tstidx@getlabel{#2}},name={#3},description={#4},#1}%
+ \else
+ \tstidxnewentry{\tstidx@getlabel{#2.#3}}{word}%
+ {parent={\tstidx@getlabel{#2}},name={#3},description={},#1}%
+ \fi
+}
+\if@tstidx@useglsseekey
+ \newcommand*{\tstidxnewsubwordsee}[5][]{%
+ \tstidxnewsubword[see={#5},#1]{#2}{#3}{#4}%
+ }
+\else
+ \newcommand*{\tstidxnewsubwordsee}[5][]{%
+ \tstidxnewsubword[#1]{#2}{#3}{#4}%
+ }
+\fi
+\if@tstidx@useglsseekey
+ \if@tstidx@hasseealsokey
+ \newcommand*{\tstidxnewsubwordseealso}[5][]{%
+ \tstidxnewsubword[seealso={#5},#1]{#2}{#3}{#4}%
+ }
+ \else
+ \newcommand*{\tstidxnewsubwordseealso}[5][]{%
+ \tstidxnewsubword[see={[\seealsoname]#5},#1]{#2}{#3}{#4}%
+ }
+ \fi
+\else
+ \newcommand*{\tstidxnewsubwordseealso}[5][]{%
+ \tstidxnewsubword[#1]{#2}{#3}{#4}%
+ }
+\fi
+\renewcommand*{\tstidxcsfmt}[1]{\texttt{\glsbackslash#1}}
+\newcommand*{\tstidxnewcs}[3][]{%
+ \if@tstidx@setdescription
+ \tstidxnewentry{\tstidx@getlabel{cs.#2}}{cs}%
+ {sort={#2},name={\tstidxcsfmt{#2}},description={#3},#1}%
+ \else
+ \tstidxnewentry{\tstidx@getlabel{cs.#2}}{cs}%
+ {sort={#2},name={\tstidxcsfmt{#2}},description={},#1}%
+ \fi
+}
+\newcommand*{\tstidxnewencapcsn}[3][]{%
+ \if@tstidx@setdescription
+ \tstidxnewentry{\tstidx@getlabel{#2}}{encapcsn}{sort={#2 (#2)},%
+ name={\texttt{#2} (\tstidxcsfmt{#2})},
+ text={\texttt{#2}},description={#3},#1}%
+ \tstidxnewentry{\tstidx@getlabel{encap.#2}}{encapcsn}{sort={#2},%
+ parent={\tstidx@getlabel{encap}},
+ name={\texttt{#2}},description={#3}}%
+ \else
+ \tstidxnewentry{\tstidx@getlabel{#2}}{encapcsn}{sort={#2 (#2)},%
+ name={\texttt{#2} (\tstidxcsfmt{#2})},
+ text={\texttt{#2}},description={},#1}%
+ \tstidxnewentry{\tstidx@getlabel{encap.#2}}{encapcsn}{sort={#2},%
+ parent={\tstidx@getlabel{encap}},
+ name={\texttt{#2}},description={}}%
+ \fi
+}
+\newcommand*{\tstidxnewenv}[3][]{%
+ \if@tstidx@setdescription
+ \tstidxnewentry{\tstidx@getlabel{#2environment}}%
+ {environment}{sort={#2 environment},%
+ name={\tstidxenvfmt{#2} environment},%
+ text={\tstidxenvfmt{#2}},description={#3},#1}%
+ \else
+ \tstidxnewentry{\tstidx@getlabel{#2environment}}%
+ {environment}{sort={#2 environment},%
+ name={\tstidxenvfmt{#2} environment},%
+ text={\tstidxenvfmt{#2}},description={},#1}%
+ \fi
+}
+\newcommand*{\tstidxnewapp}[3][]{%
+ \if@tstidx@setdescription
+ \tstidxnewentry{\tstidx@getlabel{#2}}{application}{sort={#2},%
+ name={\tstidxappfmt{#2}},description={#3},#1}%
+ \tstidxnewentry{applications.\tstidx@getlabel{#2}}{application}{sort={#2},%
+ parent={applications},name={\tstidxappfmt{#2}},description={#3}}%
+ \else
+ \tstidxnewentry{\tstidx@getlabel{#2}}{application}{sort={#2},%
+ name={\tstidxappfmt{#2}},description={},#1}%
+ \tstidxnewentry{applications.\tstidx@getlabel{#2}}{application}{sort={#2},%
+ parent={applications},name={\tstidxappfmt{#2}},description={}}%
+ \fi
+}
+\newcommand*{\tstidxnewappopt}[4][]{%
+ \if@tstidx@setdescription
+ \tstidxnewentry{\tstidx@getlabel{#3.#2option}}{applicationoption}%
+ {sort={#3 (#2)},%
+ name={\tstidxappoptfmt{#3} (\tstidxappfmt{#2})},description={#4},#1}%
+ \tstidxnewentry{\tstidx@getlabel{#2.#3}}{applicationoption}%
+ {parent={#2},sort={#3},%
+ name={\tstidxappoptfmt{#3}},description={#4},#1}%
+ \tstidxnewentry{\tstidx@getlabel{applications.#2.#3}}%
+ {applicationoption}{sort={#3},%
+ parent={\tstidx@getlabel{applications.#2}},name={\tstidxappoptfmt{#3}},%
+ description={#4}}%
+ \else
+ \tstidxnewentry{\tstidx@getlabel{#3.#2option}}{applicationoption}%
+ {sort={#3 (#2)},%
+ name={\tstidxappoptfmt{#3} (\tstidxappfmt{#2})},description={},#1}%
+ \tstidxnewentry{\tstidx@getlabel{#2.#3}}{applicationoption}%
+ {parent={#2},sort={#3},%
+ name={\tstidxappoptfmt{#3}},description={},#1}%
+ \tstidxnewentry{\tstidx@getlabel{applications.#2.#3}}%
+ {applicationoption}{sort={#3},%
+ parent={\tstidx@getlabel{applications.#2}},name={\tstidxappoptfmt{#3}},%
+ description={}}%
+ \fi
+}
+\newcommand*{\tstidxnewsty}[3][]{%
+ \if@tstidx@setdescription
+ \tstidxnewentry{\tstidx@getlabel{#2package}}{package}{sort={#2 package},%
+ name={\tstidxstyfmt{#2} package},%
+ text={\tstidxstyfmt{#2}},%
+ description={#3},#1}%
+ \tstidxnewentry{\tstidx@getlabel{packages.#2package}}{package}{sort={#2},%
+ parent={packages},name={\tstidxstyfmt{#2}},%
+ text={\tstidxstyfmt{#2}},description={#3}}%
+ \else
+ \tstidxnewentry{\tstidx@getlabel{#2package}}{package}{sort={#2 package},%
+ name={\tstidxstyfmt{#2} package},%
+ text={\tstidxstyfmt{#2}},%
+ description={},#1}%
+ \tstidxnewentry{\tstidx@getlabel{packages.#2package}}{package}{sort={#2},%
+ parent={packages},name={\tstidxstyfmt{#2}},%
+ text={\tstidxstyfmt{#2}},description={}}%
+ \fi
+}
+\if@tstidx@useglsseekey
+ \if@tstidx@hasseealsokey
+ \newcommand*{\tstidxnewstyseealso}[4][]{%
+ \tstidxnewsty[seealso={#4},#1]{#2}{#3}%
+ }
+ \else
+ \newcommand*{\tstidxnewstyseealso}[4][]{%
+ \tstidxnewsty[see={[\seealsoname]#4},#1]{#2}{#3}%
+ }
+ \fi
+\else
+ \newcommand*{\tstidxnewstyseealso}[4][]{%
+ \tstidxnewsty[#1]{#2}{#3}%
+ }
+\fi
+\newcommand*{\tstidxnewstyopt}[4][]{%
+ \if@tstidx@setdescription
+ \tstidxnewentry{\tstidx@getlabel{#2package.#3}}{packageoption}{sort={#3},%
+ name={\tstidxstyoptfmt{#3}},%
+ parent={\tstidx@getlabel{#2package}},%
+ description={#4},#1}%
+ \tstidxnewentry{\tstidx@getlabel{packages.#2package.#3}}{packageoption}%
+ {sort={#3},%
+ parent={\tstidx@getlabel{packages.#2package}},name={\tstidxstyoptfmt{#3}},%
+ description={#4}}%
+ \else
+ \tstidxnewentry{\tstidx@getlabel{#2package.#3}}{packageoption}{sort={#3},%
+ name={\tstidxstyoptfmt{#3}},%
+ parent={\tstidx@getlabel{#2package}},%
+ description={},#1}%
+ \tstidxnewentry{\tstidx@getlabel{packages.#2package.#3}}{packageoption}%
+ {sort={#3},%
+ parent={\tstidx@getlabel{packages.#2package}},name={\tstidxstyoptfmt{#3}},%
+ description={}}%
+ \fi
+}
+\newcommand*{\tstidxnewnumber}[3][]{%
+ \if@tstidx@setdescription
+ \tstidxnewentry{\tstidx@getlabel{#2}}{number}{name={#2},description={#3},#1}%
+ \else
+ \tstidxnewentry{\tstidx@getlabel{#2}}{number}{name={#2},description={},#1}%
+ \fi
+}
+\newcommand*{\tstidxnewphrase}[3][]{%
+ \if@tstidx@setdescription
+ \tstidxnewentry{\tstidx@getlabel{#2}}{phrase}{name={#2},description={#3},#1}%
+ \else
+ \tstidxnewentry{\tstidx@getlabel{#2}}{phrase}{name={#2},description={},#1}%
+ \fi
+}
+\if@tstidx@useglsseekey
+ \newcommand*{\tstidxnewphrasesee}[4][]{%
+ \tstidxnewphrase[see={#4},#1]{#2}{#3}%
+ }
+\else
+ \newcommand*{\tstidxnewphrasesee}[4][]{%
+ \tstidxnewphrase[#1]{#2}{#3}%
+ }
+\fi
+\if@tstidx@useglsseekey
+ \if@tstidx@hasseealsokey
+ \newcommand*{\tstidxnewphraseseealso}[4][]{%
+ \tstidxnewphrase[seealso={#4},#1]{#2}{#3}%
+ }
+ \else
+ \newcommand*{\tstidxnewphraseseealso}[4][]{%
+ \tstidxnewphrase[see={[\seealsoname]#4},#1]{#2}{#3}%
+ }
+ \fi
+\else
+ \newcommand*{\tstidxnewphraseseealso}[4][]{%
+ \tstidxnewphrase[#1]{#2}{#3}%
+ }
+\fi
+\newcommand*{\tstidxnewartphrase}[4][]{%
+ \if@tstidx@setdescription
+ \tstidxnewentry{\tstidx@getlabel{#3}}{phrase}{name={#3, #2},
+ text={#2 #3},description={#4},#1}%
+ \else
+ \tstidxnewentry{\tstidx@getlabel{#3}}{phrase}{name={#3, #2},
+ text={#2 #3},description={},#1}%
+ \fi
+}
+\newcommand*{\tstidxnewsubphrase}[4][]{%
+ \if@tstidx@setdescription
+ \tstidxnewentry{\tstidx@getlabel{#2.#3}}{phrase}%
+ {parent={\tstidx@getlabel{#2}},%
+ name={#3},description={#4},#1}%
+ \else
+ \tstidxnewentry{\tstidx@getlabel{#2.#3}}{phrase}%
+ {parent={\tstidx@getlabel{#2}},%
+ name={#3},description={},#1}%
+ \fi
+}
+\newcommand*{\tstidxnewperson}[4][]{%
+ \tstidxnewutfperson[#1]{#2}{#3}{#2}{#3}{#4}%
+}
+\newcommand*{\tstidxnewutfperson}[3][]{%
+ \@ifnextchar[{\@tstidxnewutfperson{#1}{#2}{#3}}%
+ {\@tstidxnewutfperson{#1}{#2}{#3}[#2#3]}%
+}
+\def\@tstidxnewutfperson#1#2#3[#4]#5#6#7{%
+ \if@tstidx@setdescription
+ \tstidxnewutfentrytext{\tstidx@getlabel{#4}}{#3, #2}{#2 #3}{#6, #5}{#5 #6}%
+ {}{description={#7},#1}{person}%
+ \tstidxnewutfentrytext{\tstidx@getlabel{people.#4}}{#3, #2}{#2 #3}{#6, #5}%
+ {#5 #6}{}{description={#7},parent={people}}{person}%
+ \else
+ \tstidxnewutfentrytext{\tstidx@getlabel{#4}}{#3, #2}{#2 #3}{#6, #5}{#5 #6}%
+ {}{#1}{person}%
+ \tstidxnewutfentrytext{\tstidx@getlabel{people.#4}}{#3, #2}{#2 #3}{#6, #5}%
+ {#5 #6}{}{parent={people}}{person}%
+ \fi
+}
+\newcommand*{\tstidxnewsym}[4][]{%
+ \if@tstidx@setdescription
+ \tstidxnewentry{\tstidx@getlabel{#2}}{symbol}%
+ {name={#3},sort={#2},description={#4},#1}%
+ \else
+ \tstidxnewentry{\tstidx@getlabel{#2}}{symbol}%
+ {name={#3},sort={#2},description={},#1}%
+ \fi
+}
+\newcommand*{\tstidxnewindexmarker}[3][]{%
+ \if@tstidx@setdescription
+ \toks@{description={#3},#1}%
+ \else
+ \toks@{description={},#1}%
+ \fi
+ \iftestidxprefix
+ \protected@edef\@tstidx@dodef{%
+ \noexpand\tstidxnewentry{\tstidx@getlabel{#2}}%
+ {indexmarker}{%
+ name={{}\noexpand\protect\expandonce{\csname#2\endcsname}\noexpand\space
+ (\noexpand\tstidxcsfmt{#2})},%
+ sort={\tstidxindexmarkerprefix#2},
+ \the\toks@}}%
+ \else
+ \protected@edef\@tstidx@dodef{%
+ \noexpand\tstidxnewentry{\tstidx@getlabel{#2}}%
+ {indexmarker}{%
+ name={{}\noexpand\protect\expandonce{\csname#2\endcsname}\noexpand\space
+ (\noexpand\tstidxcsfmt{#2})},%
+ sort={#2},
+ \the\toks@}}%
+ \fi
+ \@tstidx@dodef
+}
+\newcommand*{\tstidxnewmath}[2][]{%
+ \@ifnextchar[{\@tstidxnewmath{#1}{#2}}{\@tstidxnewmath{#1}{#2}[#2]}%
+}
+\def\@tstidxnewmath#1#2[#3]#4#5{%
+ \if@tstidx@setdescription
+ \tstidxnewentry{\tstidx@getlabel{#3}}{math}%
+ {name={$#4$},text={#4},sort={#2},description={#5},#1}%
+ \else
+ \tstidxnewentry{\tstidx@getlabel{#3}}{math}%
+ {name={$#4$},text={#4},sort={#2},description={},#1}%
+ \fi
+}
+\newcommand*{\tstidxnewmathsym}[2][]{%
+ \@ifnextchar[{\@tstidxnewmathsym{#1}{#2}}{\@tstidxnewmathsym{#1}{#2}[#2]}%
+}
+\def\@tstidxnewmathsym#1#2[#3]#4#5{%
+ \iftestidxprefix
+ \if@tstidx@setdescription
+ \toks@{name={$#4$},text={#4},description={#5},#1}%
+ \else
+ \toks@{name={$#4$},text={#4},#1}%
+ \fi
+ \protected@edef\@tstidx@dodef{%
+ \noexpand\tstidxnewentry{\tstidx@getlabel{#3}}{mathsymbol}%
+ {sort={\tstidxmathsymprefix#2},description={},\the\toks@}%
+ }%
+ \@tstidx@dodef
+ \else
+ \if@tstidx@setdescription
+ \tstidxnewentry{\tstidx@getlabel{#3}}{mathsymbol}{name={$#4$},%
+ text={#4},sort={#2},description={#5},#1}%
+ \else
+ \tstidxnewentry{\tstidx@getlabel{#3}}{mathsymbol}{name={$#4$},%
+ text={#4},sort={#2},description={},#1}%
+ \fi
+ \fi
+}
+\newcommand*{\tstidxnewutfword}[5][]{%
+ \if@tstidx@setdescription
+ \tstidxnewutfentry{\tstidx@getlabel{#2}}{#3}{#4}{}{description={#5},#1}{word}%
+ \else
+ \tstidxnewutfentry{\tstidx@getlabel{#2}}{#3}{#4}{}{#1}{word}%
+ \fi
+}
+\if@tstidx@useglsseekey
+ \newcommand*{\tstidxnewutfwordsee}[6][]{%
+ \tstidxnewutfword[see={#6},#1]{#2}{#3}{#4}{#5}%
+ }
+\else
+ \newcommand*{\tstidxnewutfwordsee}[6][]{%
+ \tstidxnewutfword[#1]{#2}{#3}{#4}{#5}%
+ }
+\fi
+\if@tstidx@useglsseekey
+ \if@tstidx@hasseealsokey
+ \newcommand*{\tstidxnewutfwordseealso}[6][]{%
+ \tstidxnewutfword[seealso={#6},#1]{#2}{#3}{#4}{#5}%
+ }
+ \else
+ \newcommand*{\tstidxnewutfwordseealso}[6][]{%
+ \tstidxnewutfword[see={[\seealsoname]#6},#1]{#2}{#3}{#4}{#5}%
+ }
+ \fi
+\else
+ \newcommand*{\tstidxnewutfwordseealso}[6][]{%
+ \tstidxnewutfword[#1]{#2}{#3}{#4}{#5}%
+ }
+\fi
+\newcommand*{\tstidxnewutfdigraph}[5][]{%
+ \if@tstidx@setdescription
+ \tstidxnewutfentry{\tstidx@getlabel{#2}}{#3}{#4}{}{description={#5},#1}{digraph}%
+ \else
+ \tstidxnewutfentry{\tstidx@getlabel{#2}}{#3}{#4}{}{#1}{digraph}%
+ \fi
+}
+\newcommand*{\tstidxnewutfphrase}[5][]{%
+ \if@tstidx@setdescription
+ \tstidxnewutfentry{\tstidx@getlabel{#2}}{#3}{#4}{}%
+ {description={#5},#1}{phrase}%
+ \else
+ \tstidxnewutfentry{\tstidx@getlabel{#2}}{#3}{#4}{}{#1}{phrase}%
+ \fi
+}
+\newcommand*{\tstidxnewplace}[3][]{%
+ \tstidxnewutfplace[#1]{#2}{#2}{#2}{#3}%
+}
+\newcommand*{\tstidxnewutfplace}[5][]{%
+ \if@tstidx@setdescription
+ \tstidxnewutfentry{\tstidx@getlabel{#2}}{#3}{#4}{}%
+ {description={#5},#1}{place}%
+ \tstidxnewutfentry{\tstidx@getlabel{places.#2}}{#3}{#4}{}%
+ {description={#5},parent={places}}{place}%
+ \else
+ \tstidxnewutfentry{\tstidx@getlabel{#2}}{#3}{#4}{}{#1}{place}%
+ \tstidxnewutfentry{\tstidx@getlabel{places.#2}}{#3}{#4}{}%
+ {parent={places}}{place}%
+ \fi
+}
+\newcommand*{\tstidxnewartplace}[4][]{%
+ \if@tstidx@setdescription
+ \tstidxnewentry{\tstidx@getlabel{#3}}{place}{name={#3, #2},%
+ text={#2 #3},description={#4},#1}%
+ \tstidxnewentry{\tstidx@getlabel{places.#3}}{place}{%
+ parent={places},name={#3, #2},%
+ text={#2 #3},description={#4}}%
+ \else
+ \tstidxnewentry{\tstidx@getlabel{#3}}{place}{name={#3, #2},%
+ text={#2 #3},description={},#1}%
+ \tstidxnewentry{\tstidx@getlabel{places.#3}}{place}{%
+ parent={places},name={#3, #2},%
+ text={#2 #3},description={}}%
+ \fi
+}
+\newcommand*{\tstidxnewbook}[3][]{%
+ \if@tstidx@setdescription
+ \tstidxnewentry{\tstidx@getlabel{#2}}{book}{sort={#2},%
+ name={\tstidxbookfmt{#2}},description={#3},#1}%
+ \tstidxnewentry{\tstidx@getlabel{books.#2}}{book}{sort={#2},%
+ parent={books},name={\tstidxbookfmt{#2}},description={#3}}%
+ \else
+ \tstidxnewentry{\tstidx@getlabel{#2}}{book}{sort={#2},%
+ name={\tstidxbookfmt{#2}},description={},#1}%
+ \tstidxnewentry{\tstidx@getlabel{books.#2}}{book}{sort={#2},%
+ parent={books},name={\tstidxbookfmt{#2}},description={}}%
+ \fi
+}
+\newcommand*{\tstidxnewartbook}[4][]{%
+ \if@tstidx@setdescription
+ \tstidxnewentry{\tstidx@getlabel{#3}}{book}{%
+ name={\tstidxbookfmt{#3, #2}},
+ sort={#3, #2},
+ text={\tstidxbookfmt{#2 #3}},description={#4},#1}%
+ \tstidxnewentry{\tstidx@getlabel{books.#3}}{book}{%
+ parent={books},
+ name={\tstidxbookfmt{#3, #2}},
+ sort={#3, #2},
+ text={\tstidxbookfmt{#2 #3}},description={#4}}%
+ \else
+ \tstidxnewentry{\tstidx@getlabel{#3}}{book}{%
+ name={\tstidxbookfmt{#3, #2}},
+ sort={#3, #2},
+ text={\tstidxbookfmt{#2 #3}},description={},#1}%
+ \tstidxnewentry{\tstidx@getlabel{books.#3}}{book}{%
+ parent={books},
+ name={\tstidxbookfmt{#3, #2}},
+ sort={#3, #2},
+ text={\tstidxbookfmt{#2 #3}},description={}}%
+ \fi
+}
+\newcommand*{\tstidxnewfilm}[3][]{%
+ \if@tstidx@setdescription
+ \tstidxnewentry{\tstidx@getlabel{#2}}{film}{sort={#2},%
+ name={\tstidxfilmfmt{#2}},description={#3},#1}%
+ \tstidxnewentry{\tstidx@getlabel{films.#2}}{film}{sort={#2},%
+ parent={films},name={\tstidxfilmfmt{#2}},description={#3}}%
+ \else
+ \tstidxnewentry{\tstidx@getlabel{#2}}{film}{sort={#2},%
+ name={\tstidxfilmfmt{#2}},description={},#1}%
+ \tstidxnewentry{\tstidx@getlabel{films.#2}}{film}{sort={#2},%
+ parent={films},name={\tstidxfilmfmt{#2}},description={}}%
+ \fi
+}
+\newcommand*{\tstidxnewartfilm}[4][]{%
+ \if@tstidx@setdescription
+ \tstidxnewentry{\tstidx@getlabel{#3}}{film}{%
+ name={\tstidxfilmfmt{#3, #2}},
+ sort={#3, #2},
+ text={\tstidxfilmfmt{#2 #3}},description={#4},#1}%
+ \tstidxnewentry{\tstidx@getlabel{films.#3}}{film}{%
+ parent={films},
+ name={\tstidxfilmfmt{#3, #2}},
+ sort={#3, #2},
+ text={\tstidxfilmfmt{#2 #3}},description={#4}}%
+ \else
+ \tstidxnewentry{\tstidx@getlabel{#3}}{film}{%
+ name={\tstidxfilmfmt{#3, #2}},
+ sort={#3, #2},
+ text={\tstidxfilmfmt{#2 #3}},description={},#1}%
+ \tstidxnewentry{\tstidx@getlabel{films.#3}}{film}{%
+ parent={films},
+ name={\tstidxfilmfmt{#3, #2}},
+ sort={#3, #2},
+ text={\tstidxfilmfmt{#2 #3}},description={}}%
+ \fi
+}
+\newcommand*{\@tidx@gls@par@i}{%
+ This is a~sample block of text designed to test indexing with
+ the \expandafter\tstidxsty\expandafter{\tstidx@glossariespkg} package. To test
+ only \tstidxcs{index} and \tstidxenv{theindex} environment, just use
+ \tstidxsty{testidx} instead of \tstidxsty{testidx-glossaries}.
+ Alternatively, use \tstidxcs{tstidxtoidx} to switch back to the
+ original \tstidxsty{testidx} behaviour.
+ This sample text is provided to help test the
+ \if@tstidx@use@encaps
+ \tstidxword[tstidxencapii]{layout}
+ \else
+ \tstidxword{layout}
+ \fi
+ of the
+ \if@tstidx@use@encaps
+ \tstidxword[tstidxencapii]{index}
+ \else
+ \tstidxword{index}
+ \fi
+ (or
+ \if@tstidx@use@encaps
+ \tstidxword[tstidxencapii]{glossary}%
+ \else
+ \tstidxword{glossary}%
+ \fi
+ ) and the
+ \if@tstidx@use@encaps
+ \tstidxphrasepl[tstidxencapii]{indexing application},
+ \else
+ \tstidxphrasepl{indexing application},
+ \fi
+ such as
+ \tstidxapp{makeindex} or
+ \tstidxapp{xindy}, that may be used with the
+ \expandafter\tstidxsty\expandafter{\tstidx@glossariespkg} package.
+ This \tstidxword{example} text is just
+ \tstidxword{filler} (produced using \tstidxcs{testidx} provided
+ by the \tstidxopensty{testidx} package) to
+ pad\tstindexsee{padding}{seealso}{filler} out
+ the document with instances of \tstidxcs{index} interspersed throughout.
+ You can find out more
+ information from the \tstidxsty{testidx} user manual, which
+ can be accessed using the \tstidxapp{texdoc} application.
+}
+\let\@tidx@org@par@i\@tidx@par@i
+\let\@tidx@par@i\@tidx@gls@par@i
+\newcommand*{\@tidx@gls@par@ii}{%
+ The \tstidxsty{testidx-glossaries} package uses \tstidxcs{gls} (or
+ \tstidxcs{glspl}) unless no text should be displayed when indexing
+ occurs (in which case just \tstidxcs{glsadd} is used). This test package
+ doesn't make any modifications to
+ \tstidxcs{gls} (or \tstidxcs{glspl}), but there are some minor changes to entry
+ definitions and command use to allow this \tstidxphrase{dummy text} to test
+ various cases. By default \tstidxcs{gls} performs the indexing before the
+ \tstidxphrase{link text} to prevent any unwanted interference caused by the
+ \tstidxword{whatsit} introduced by the indexing.
+ However, it's possible that you may want the indexing to occur
+ after the \tstidxphrase{link text}, even though it creates
+ a~\tstidxword{whatsit}. This \tstidxphrase{dummy text} is designed to use
+ a mixture of pre- and post-indexing to investigate the results (particularly
+ with \tstidxwordpl{phrase} spanning a \tstidxphrase{page break}).
+ The \tstidxsty{glossaries-extra} package (as from
+ version 1.14) provides a~new key \tstidxqt{wrgloss} (for commands
+ like \tstidxcs{gls}), which may take the values
+ \tstidxqt{before} or \tstidxqt{after}. If this key is available,
+ it will be used for the post-indexing \tstidxwordpl{example},
+ otherwise the post-indexing will be performed manually using
+ \tstidxcs{glsadd} after the \tstidxphrase{link text} (which is displayed using
+ \tstidxcs{glshyperlink}). The \tstidxsty{testidx-glossaries} package
+ just loads the base \tstidxsty{glossaries} package by default. Use
+ the \tstidxstyopt{testidx-glossaries}{extra} package option to also
+ load \tstidxsty{glossaries-extra}. The \tstidxphrase{visual effects} in this
+ \tstidxphrase{dummy text} are provided to illustrate where the
+ indexing occurs. The \tstidxsty{testidx-glossaries} package
+ doesn't attempt to produce a well-designed index or glossary. Its
+ \tstidxword{purpose} is to help you \tstidxword{test} your chosen
+ \tstidxword{design}, which is easier to do with a
+ relatively small test \tstidxword{document}, than with a large
+ \tstidxword{book}. The \tstidxphrase{dummy text} is intended to produce an
+ \tstidxword{index} that is at least three pages long to allow you
+ to test the page headers and footers in a two-sided document.
+ The \tstidxqt{mcolindexgroup} style is set by default (rather than
+ the \tstidxqt{list} style) as that style more closely represents
+ the style used in indexes.
+ \if@tstidx@setdescription
+ However, since this document has used the
+ \tstidxstyopt{testidx-glossaries}{desc} option,
+ the style is instead set to \tstidxqt{indexgroup}.
+ \else
+ If you use the \tstidxstyopt{testidx-glossaries}{desc} option,
+ the style will instead be set to \tstidxqt{indexgroup}.
+ \fi
+ You can change the style using \tstidxcs{setglossarystyle}.
+ By default the \tstidxqt{tree} styles (including
+ \tstidxqt{mcolindexgroup}) display the name field in bold in the
+ \tstidxword{glossary}. This is governed by the command
+ \tstidxcs{glstreenamefmt}, which may be redefined as appropriate.
+ You can hide the visual effects with the
+ \tstidxstyopt{testidx}{hidemarks} package option.%
+ \iftestidxshowmarks
+ \else
+ \space (It seems you already have this option set.
+ Remove it or use \tstidxstyopt{testidx}{showmarks} to show them
+ again.)%
+ \fi
+}
+\let\@tidx@org@par@ii\@tidx@par@ii
+\let\@tidx@par@ii\@tidx@gls@par@ii
+\newcommand*{\@tidx@gls@par@iii}{%
+ The actual place where the indexing occurs in this
+ \if@tstidx@use@encaps
+ \tstidxphrase[tstidxencapiii]{dummy text}
+ \else
+ \tstidxphrase{dummy text}
+ \fi
+ is marked with the symbol
+ \tstidxindexmarker{tstidxmarker} if there is no \tstidxword{range}
+or
+ \tstidxphrase{cross-reference}. The
+ \if@tstidx@use@encaps
+ \tstidxword[tstidxencapi]{word}
+ \else
+ \tstidxword{word}
+ \fi
+ or
+ \if@tstidx@use@encaps
+ \tstidxword[tstidxencapii]{phrase}
+ \else
+ \tstidxword{phrase}
+ \fi
+ adjacent to this \tstidxword{marker} is
+ the text being indexed.\tstidxfootnote{The indexing may
+ occur before or after the \tstidxword{word} or \tstidxword{phrase}
+ (\tstidxphrase{link text}) being indexed in this
+ \if@tstidx@use@encaps
+ \tstidxphrase[tstidxencapiii]{dummy text},
+ \else
+ \tstidxphrase{dummy text},
+ \fi
+ but there's no
+ space between the \tstidxword{marker} and the term being indexed.
+ Incidentally, this \tstidxword{footnote} text was produced
+ using the command \tstidxcs{tstidxfootnote}, which you can
+ redefined as required. (It defaults to just \tstidxcs{footnote}.)}
+ A sub-entry is indicated with the symbol
+ \tstidxindexmarker{tstidxsubmarker} and a sub-sub-entry is
+ indicated with the symbol \tstidxindexmarker{tstidxsubsubmarker}.
+ If an \tstidxword{encap} value is provided, both the
+ \if@tstidx@use@encaps
+ \tstidxword[tstidxencapiii]{text}
+ \else
+ \tstidxword{text}
+ \fi
+ and the
+ \if@tstidx@use@encaps
+ \tstidxword[tstidxencapii]{marker}
+ \else
+ \tstidxword{marker}
+ \fi
+ are typeset in the \tstidxword{argument} of the corresponding
+command.
+ (The text occurring in the document is also typeset within the
+argument of
+ \tstidxcs{tstidxtext}. The default value is to use a dark grey, but
+since the
+ default values for the \tstidxword{predefined} encaps used in this
+text all
+ change the colour, the dark grey will only apply where the encap
+hasn't
+ been set.) There are three \tstidxword{encap} values used
+throughout this
+ \tstidxphrase{dummy text} (unless you've used the
+ \tstidxstyopt{testidx}{notestencaps} package option):
+ \if@tstidx@use@encaps
+ \tstidxencapcsn[tstidxencapi]{tstidxencapi},
+ \else
+ \tstidxencapcsn{tstidxencapi},
+ \fi
+ \if@tstidx@use@encaps
+ \tstidxencapcsn[tstidxencapii]{tstidxencapii}
+ \else
+ \tstidxencapcsn{tstidxencapii}
+ \fi
+ and
+ \if@tstidx@use@encaps
+ \tstidxencapcsn[tstidxencapiii]{tstidxencapiii}.
+ \else
+ \tstidxencapcsn{tstidxencapiii}.
+ \fi
+ (The default values use \tstidxcs{textcolor}, so you might want to
+use the
+ \tstidxstyopt{hyperref}{hidelinks} option
+ if you want to use the \tstidxsty{hyperref} package.)
+ If you use the \tstidxstyopt{testidx-glossaries}{noseekey} package option, a
+ cross-referenced entry (using \tstidxcs{glssee}\if@tstidx@hasseealsokey
+ \ or \tstidxcs{glsxtrindexseealso}\fi) is identified
+ using the \tstidxword{marker} \tstidxindexmarker{tstidxseemarker}
+ and the cross-referenced information is displayed as
+ a \tstidxphrase{marginal note} by default, with the term being indexed
+ followed by the \tstidxword{cross-reference}.
+ For example,
+ \tstidxword{lyuk}\tstindexsee{lyuk}{seealso}{digraph} has
+ the marker \tstidxmarker\ to show that the word \tstidxqt{lyuk} was
+ indexed. If the
+\tstidxstyopt{testidx-glossaries}{noseekey} package option is set,
+ this is followed by the marker \tstidxseemarker\ to show that
+ a cross-reference to \tstidxword{digraph} has also been indexed (with the details shown in
+ the margin).
+ \if@tstidx@useglsseekey
+ This document has used the \tstidxstyopt{testidx-glossaries}{seekey} package option,
+ which means that \tstidxcs{glssee}
+ \if@tstidx@hasseealsokey
+ and \tstidxcs{glsxtrindexseealso} aren't
+ \else
+ isn't
+ \fi
+ used in the \tstidxphrase{dummy text}.
+ Instead the \tstidxqt{see}
+ \if@tstidx@hasseealsokey
+ and \tstidxqt{seealso} keys provided in the entry definition were
+ \else
+ key provided in the entry definition was
+ \fi
+ used to perform the \tstidxword{cross-reference} at the time the entry was
+ defined, and so no markers or marginal notes are displayed.
+ \else
+ This document has used the \tstidxstyopt{testidx-glossaries}{noseekey} package option. This option ignores the \tstidxqt{see}
+ \if@tstidx@hasseealsokey
+ and \tstidxqt{seealso} keys
+ \else
+ key
+ \fi
+ within the entry definitions for testing purposes. If you use the
+ \tstidxstyopt{testidx-glossaries}{seekey}
+ package option instead, the \tstidxqt{see}
+ \if@tstidx@hasseealsokey
+ and \tstidxqt{seealso} keys will
+ be used when defining the entries with cross-references instead of
+ using \tstidxcs{glssee} and \tstidxcs{glsxtrindexseealso}.
+ \else
+ key will be used when defining the entries with cross-references instead of
+ using \tstidxcs{glssee}.
+ \fi
+ No markers will appear in that case as the
+ cross-referencing will be performed when the entry is defined in
+ the preamble.
+ \fi
+ A sub-level \tstidxword{cross-reference} is identified with the
+ \tstidxword{marker} \tstidxindexmarker{tstidxsubseemarker} and the
+ marginal note displays the main term followed by the sub-term (separated by the
+ symbol \tstidxsubseesep). The \tstidxword{marker} used for the start of
+ a range is \tstidxindexmarker{tstidxopenmarker} and the
+ \tstidxword{marker} used for the end of
+ a range is \tstidxindexmarker{tstidxclosemarker}
+ unless the entry is a sub-level, in which case the
+ \tstidxword{marker} for the start of the range is
+ \tstidxindexmarker{tstidxopensubmarker}
+ and the \tstidxword{marker} used for the end of a range is
+ \tstidxindexmarker{tstidxclosesubmarker}, or for a sub-sub-level
+\tstidxindexmarker{tstidxopensubsubmarker} and
+ \tstidxindexmarker{tstidxclosesubsubmarker}. There are no tests for
+ any further sub-levels. Although \tstidxapp{xindy} allows more than
+ three levels (\tstidxapp{makeindex} doesn't), it's somewhat
+ \tstidxword{excessive} to go below a sub-sub-level.
+ You'll have to add your own tests for anything deeper.%
+
+}
+\let\@tidx@org@par@iii\@tidx@par@iii
+\let\@tidx@par@iii\@tidx@gls@par@iii
+\newcommand*{\@tidx@gls@par@iv}{%
+ Here's an \tstidxword{example} of the start of a
+\tstidxopenword{range} but
+ remember that a range must also have an end, so make sure that
+ \tstidxword{block}~\@tidx@closerangepar\ has been included in this
+ \if@tstidx@use@encaps
+ \tstidxphrase[tstidxencapiii]{dummy text},
+ \else
+ \tstidxphrase{dummy text},
+ \fi
+ which closes this
+ \tstidxword{example}.
+ When the \tstidxstyopt{testidx}{verbose} option is used with just
+ \tstidxsty{testidx}, the indexing information
+ will show the \tstidxword{argument} being passed to
+ \tstidxcs{tstindex} (which will cause \tstidxphrase{overfull lines}).
+ Since the \tstidxsty{testidx-glossaries} package doesn't use
+ \tstidxcs{tstindex}, the \tstidxstyopt{testidx-glossaries}{verbose} package
+ option will instead write information to the transcript file showing the
+ label, name field, sort field, text field, parent field and see field for each
+ entry as it's defined. (The parent and see fields may be empty).
+ If the \tstidxstyopt{testidx-glossaries}{tex} package option is
+ used, the sorting may take a long time (since \TeX\ is being used
+ to sort the entries). In this case, the
+ \tstidxstyopt{testidx-glossaries}{verbose} package
+ option will also write information while it's sorting the entries,
+ so that you know \TeX\ is still doing something and hasn't got stuck.
+ This document has the
+ \iftestidxverbose
+ \tstidxstyopt{testidx-glossaries}{verbose} package
+ \else
+ \tstidxstyopt{testidx-glossaries}{noverbose} package
+ \fi
+ option set.%
+}
+\let\@tidx@org@par@iv\@tidx@par@iv
+\let\@tidx@par@iv\@tidx@gls@par@iv
+\newcommand*{\@tidx@gls@par@vi}{%
+ On the subject of \tstidxapp{xindy}, if you want to use it with
+ this \tstidxword{example} document, you'll need to add the
+ \tstidxword{encap} values used in this \tstidxphrase{dummy text}
+ as allowed attributes. (Don't forget you'll also need the
+ \tstidxstyopt{testidx-glossaries}{xindy} package option when you
+ load \tstidxsty{testidx-glossaries}.) With the \tstidxsty{glossaries} package,
+ this means using \tstidxcs{GlsAddXdyAttribute} with the
+ encap name as the argument. For example
+ \begin{flushleft}\ttfamily
+ \string\GlsAddXdyAttribute\expandafter\@gobble\string\{tstidxencapi\expandafter\@gobble\string\}\endgraf
+ \string\GlsAddXdyAttribute\expandafter\@gobble\string\{tstidxencapii\expandafter\@gobble\string\}\endgraf
+ \string\GlsAddXdyAttribute\expandafter\@gobble\string\{tstidxencapiii\expandafter\@gobble\string\}
+ \end{flushleft}
+ This sets up allowed encap values and how they should be formatted.
+ The ordering of the allowed \tstidxword{attributes} here gives the
+ \tstidxencapcsn{tstidxencapi} encap precedence in the
+ event of a \tstidxphrase{multiple encaps} clash, since it's the
+ first one in the list.
+ Check out the difference between using \tstidxapp{xindy} and
+ \tstidxapp{makeindex} on this document. Also check the difference
+ between using \tstidxapp{makeglossaries} and
+ \tstidxapp{makeglossaries-lite} to build this document.
+ The \tstidxsubword{location list}{page separator} is given by
+ \tstidxcs{delimN}, and the
+ \tstidxsubword{location list}{range separator}%
+ \tstindexsee{range separator}{see}{location list} is given by
+ \tstidxcs{delimR}.
+ On the subject of location lists, the word
+ \tstidxword{passim} (meaning \tstidxqt{here and there}) is
+ sometimes used to tidy up ragged lists. For example,
+ the locations \tstidxqt{1, 3, 4, 6, 7} may look neater as
+ \tstidxqt{1-7 passim}, which indicates references are scattered (here
+ and there) throughout that range.
+ The \tstidxapp{bib2gls} application may be used with the
+ \tstidxsty{glossaries-extra} package instead of
+ \tstidxapp{makeindex} or \tstidxapp{xindy}. Use the
+ \tstidxstyopt{testidx-glossaries}{bib2gls} package option to set up
+ this dummy text to use it. Note that this option doesn't make use
+ of the prefix commands \tstidxcs{tstidxindexmarkerprefix} or
+ \tstidxcs{tstidxindexmathsymprefix}. The
+ \tstidxstyopt{testidx}{prefix} package option will instead alter
+ the way the bib files are loaded to produce a similar grouping.%
+}
+\let\@tidx@org@par@vi\@tidx@par@vi
+\let\@tidx@par@vi\@tidx@gls@par@vi
+\newcommand{\@tidx@gls@sanitizenote}{%
+ \space You currently have the
+ \@tstidx@ifsanitize
+ {\tstidxstyopt{testidx-glossaries}{sanitize} option on.
+ This means that the words containing \tstidxword{UTF-8} characters will
+ first be sanitized before being passed to \tstidxcs{tstindex}, which
+ will allow you to test how well the \tstidxphrase{indexing application}
+ sorts \tstidxword{UTF-8} characters. If you'd rather test how
+ \tstidxcs{index} writes these characters to the file read by the
+ indexing application, use the \tstidxstyopt{testidx-glossaries}{nosanitize}
+ option instead. This may cause the \tstidxword{UTF-8} characters to be
+ written in terms of \tstidxcs{IeC}.
+ }%
+ {\tstidxstyopt{testidx-glossaries}{nosanitize} option on.
+ This means that the words containing \tstidxword{UTF-8} characters
+ may be written to the file processed by the
+ \tstidxphrase{indexing application} in terms of
+ \tstidxcs{IeC}. This allows you to test how \tstidxcs{index} behaves.
+ If you'd rather test how the indexing application sorts
+ \tstidxword{UTF-8} characters, use the
+ \tstidxstyopt{testidx-glossaries}{sanitize}
+ option instead, which will sanitize the \tstidxword{UTF-8} characters
+ before passing them to \tstidxcs{tstindex}.
+ }%
+ The \tstidxstyopt{testidx-glossaries}{nosanitize} option doesn't
+ have an effect when used with the
+ \tstidxstyopt{testidx-glossaries}{bib2gls} package option, since
+ the sort value isn't written to an external file.%
+}
+\let\@tidx@org@sanitizenote\@tidx@sanitizenote
+\let\@tidx@sanitizenote\@tidx@gls@sanitizenote
+\newcommand{\@tidx@gls@stripaccentsnote}{%
+ \space The \tstidxstyopt{testidx-glossaries}{stripaccents} package option will
+ effectively do, for example,
+ \texttt{sort=\char`\{elite\char`\},
+ name=\char`\{\string\'elite\char`\}}
+ whereas the
+ \tstidxstyopt{testidx-glossaries}{nostripaccents} package option will
+ effectively do, for example,
+ \texttt{sort=\char`\{\string\'elite\char`\},
+ name=\char`\{\string\'elite\char`\}}. These options have
+ no effect in UTF-8 mode.%
+}
+\let\@tidx@org@stripaccentsnote\@tidx@stripaccentsnote
+\let\@tidx@stripaccentsnote\@tidx@gls@stripaccentsnote
+\newcommand*{\@tidx@gls@scriptnote}{%
+ (Note how the subscripts and superscripts can be affected
+ by material inserted between the symbol and the sub- and
+ superscripts. With the \tstidxsty{glossaries} package, this can be
+ avoided by using the final optional argument of commands like
+ \tstidxcs{gls} to bring the scripts into the
+ \tstidxphrase{link text}, but not if the scripts also include
+ \tstidxcs{gls}, as the superscript does here.)
+}
+\let\@tidx@org@scriptnote\@tidx@scriptnote
+\let\@tidx@scriptnote\@tidx@gls@scriptnote
+\newcommand*{\@tidx@gls@numberlettergroup}{%
+ If you're using \tstidxapp{xindy}, the \tstidxqt{glsnumbers}
+ letter group (with the title \tstidxqt{\glsnumbersgroupname}) will
+ automatically be added to your \texttt{.xdy}
+ file unless you switch off this feature with the
+ \tstidxstyopt{testidx-glossaries}{noglsnumbers} package option.
+}
+\let\@tidx@org@numberlettergroup\@tidx@numberlettergroup
+\let\@tidx@numberlettergroup\@tidx@gls@numberlettergroup
+\newcommand*{\@tidx@gls@mathslettergroup}{%
+ \@testidx@ifusebibgls
+ {%
+ Now I've been a bit fancy here and used multiple bib files
+ to define the glossary entries. The maths symbols are defined in
+ their own separate bib file.
+ \iftestidxprefix
+ This document has used the \tstidxstyopt{testidx}{prefix} package
+ option, which means that \tstidxcs{tstidxmakegloss} is defined to
+ perform separate sorts for each resource block, which enables the
+ maths symbols to appear in their own group.
+ \else
+ This document has used the \tstidxstyopt{testidx}{noprefix} package
+ option, which means that \tstidxcs{tstidxmakegloss} is defined to
+ sort the maths symbols together with the main entries. If you
+ use the \tstidxstyopt{testidx}{prefix} package instead, the maths
+ symbols will be sorted separately and placed in their own group.
+ \fi
+ If you haven't used \tstidxcs{tstidxmakegloss} then the above
+ won't apply. If you don't use the
+ \tstidxstyopt{testidx-glossaries}{bib2gls} package option, then
+ the \tstidxstyopt{testidx}{prefix} package will instead insert
+ \texttt{\tstidxmathsymprefix} in front of
+ the sort key so I can get \tstidxapp{xindy} to create a special
+ group for the maths symbols. Here's
+ }%
+ {%
+ \iftestidxprefix
+ Now I've been a bit fancy here and inserted
+ \texttt{\tstidxmathsymprefix} in front of
+ the sort key so I can get \tstidxapp{xindy} to create a special
+ group for the maths symbols. Here's
+ \else
+ This document has used the \tstidxstyopt{testidx}{noprefix}
+ package option, which has switched of the sort prefixes.
+ If you use the \tstidxstyopt{testidx}{prefix} option I can be a
+ bit fancy here and insert
+ \texttt{\tstidxmathsymprefix} in front of
+ the sort key so I can get \tstidxapp{xindy} to create a special
+ group for the maths symbols. When you switch on the prefixes here's
+ \fi
+ }%
+the code you can add to your document to implement it:
+\begin{flushleft}\ttfamily
+\string\GlsAddLetterGroup\glsopenbrace Maths\glsclosebrace\glsopenbrace
+ \string:prefixes (\string"\tstidxmathsymprefix\string")
+ \string:before \string"glsnumbers\string"\glsclosebrace
+\end{flushleft}
+}
+\let\@tidx@org@mathslettergroup\@tidx@mathslettergroup
+\let\@tidx@mathslettergroup\@tidx@gls@mathslettergroup
+\endinput
+%%
+%% End of file `testidx-glossaries.sty'.
diff --git a/Master/texmf-dist/tex/latex/testidx/testidx.sty b/Master/texmf-dist/tex/latex/testidx/testidx.sty
index 3cc7a90cca9..458f9add3af 100644
--- a/Master/texmf-dist/tex/latex/testidx/testidx.sty
+++ b/Master/texmf-dist/tex/latex/testidx/testidx.sty
@@ -7,11 +7,11 @@
%% testidx.dtx (with options: `testidx.sty,package')
%%
%% testidx.dtx
-%% Copyright 2016 Nicola Talbot
+%% Copyright 2017 Nicola Talbot
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
-%% of this license of (at your option) any later version.
+%% of this license or (at your option) any later version.
%% The latest version of this license is in
%% http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
@@ -21,7 +21,7 @@
%%
%% The Current Maintainer of this work is Nicola Talbot.
%%
-%% This work consists of the files testidx.dtx and testidx.ins and the derived file testidx.sty.
+%% This work consists of the files testidx.dtx and testidx.ins and the derived files testidx.sty, testidx-glossaries.sty, testidx-glossaries-diglyphs.tex, testidx-glossaries-nodiglyphs.tex, testidx-glossaries-samples.tex, testidx-glossaries-diglyphs-utf8.bib, testidx-glossaries-markers.bib, testidx-glossaries-mathsym.bib, testidx-glossaries-nodiglyphs-utf8.bib, testidx-glossaries-nodiglyphs.bib, testidx-glossaries-numbers.bib, testidx-glossaries-samples-ascii.bib, testidx-glossaries-samples-utf8.bib, testidx-glossaries-samples.bib.
%%
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -39,22 +39,27 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{testidx}[2016/10/17 v1.0 (NLCT)]
+\ProvidesPackage{testidx}[2017/08/11 v1.1 (NLCT)]
\RequirePackage{color}
\RequirePackage{ifxetex}
\RequirePackage{ifluatex}
-\newcommand*{\@tstidx@ifutfviii}[2]{%
+\newcommand*{\@tstidx@ifxelua}[2]{%
\ifxetex
#1%
\else
\ifluatex
#1%
\else
- \@ifundefined{inputencodingname}{#2}%
- {\ifx\inputencodingname\@tstidx@utfviii#1\else#2\fi}%
+ #2%
\fi
\fi
}
+\newcommand*{\@tstidx@ifutfviii}[2]{%
+ \@tstidx@ifxelua{#1}
+ {%
+ \ifx\inputencodingname\@tstidx@utfviii#1\else#2\fi
+ }%
+}
\newcommand*{\@tstidx@utfviii}{utf8}
\newcommand*{\tstidxprocessasciisort}{\tstidxprocessasciisortstrip}
\newcommand*{\testidxStripAccents}{%
@@ -91,21 +96,17 @@
\DeclareOption{german}{\testidxGermanOn}
\DeclareOption{ngerman}{\testidxGermanOn}
\DeclareOption{nogerman}{\testidxGermanOff}
-\ifxetex
+\@tstidx@ifxelua
+{
\newcommand*{\tstidxprocessutf}{%
\tstidxprocessutfnosanitize
}
-\else
- \ifluatex
- \newcommand*{\tstidxprocessutf}{%
- \tstidxprocessutfnosanitize
- }
- \else
- \newcommand*{\tstidxprocessutf}{%
- \tstidxprocessutfsanitize
- }
- \fi
-\fi
+}
+{
+ \newcommand*{\tstidxprocessutf}{%
+ \tstidxprocessutfsanitize
+ }
+}
\newcommand*{\@tstidx@ifsanitize}[2]{#1}
\newcommand*{\testidxSanitizeOn}{%
\let\@tstidx@ifsanitize\@firstoftwo
@@ -119,6 +120,19 @@
\tstidxprocessutfnosanitize
}%
}
+\newif\iftestidxdiglyphs
+\testidxdiglyphsfalse
+\DeclareOption{diglyphs}{%
+ \@tstidx@ifutfviii{\testidxdiglyphstrue}%
+ {%
+ \PackageWarning{testidx}{diglyphs option requires UTF-8 support}%
+ }
+}
+\DeclareOption{nodiglyphs}{\testidxdiglyphsfalse}
+\newif\iftestidxprefix
+\testidxprefixtrue
+\DeclareOption{prefix}{\testidxprefixtrue}
+\DeclareOption{noprefix}{\testidxprefixfalse}
\DeclareOption{sanitize}{\testidxSanitizeOn}
\DeclareOption{nosanitize}{\testidxSanitizeOff}
\newif\iftestidxverbose
@@ -139,6 +153,9 @@
\@ifpackageloaded{amsmath}%
{\let\@tstidx@ifamsmath\@firstoftwo}%
{\let\@tstidx@ifamsmath\@secondoftwo}%
+ \@ifpackageloaded{amssymb}%
+ {\let\@tstidx@ifamssymb\@firstoftwo}%
+ {\let\@tstidx@ifamssymb\@secondoftwo}%
\@ifpackageloaded{inputenc}
{
\let\@tstidx@if@inputenc\@firstoftwo
@@ -404,7 +421,7 @@
\newcommand*{\tstidxdash}{\,---\,}
\newcommand*{\tstidxfootnote}{\footnote}
\newcommand*{\tstidxfmtpost}[3]{%
- \tstindexpost[#1]{\protect#2{#1}}{#3}{#2{#1}}%
+ \tstindexpost[#1]{\protect#2{#1}}[#1]{#3}{#2{#1}}%
}
\newcommand*{\tstidxfmtopenpost}[3]{%
\tstindexopenpost[#1]{\protect#2{#1}}{#3}{#2{#1}}%
@@ -421,34 +438,41 @@
\newcommand*{\tstidxfmtclosepre}[3]{%
\tstindexclosepre[#1]{\protect#2{#1}}{#3}{#2{#1}}%
}
-\newcommand*{\tstidxutf}[5]{%
- \def\@tstidx@text{#1}%
+\newcommand*{\tstidxutf}{%
+ \@ifnextchar[{\@tstidxutf}{\@tstidxutf[]}%
+}
+\def\@tstidxutf[#1]#2#3#4#5#6{%
+ \def\@tstidx@text{#2}%
\@tstidx@ifutfviii
{%
\ifx\@tstidx@text\@empty
- \def\@tstidx@text{#3}%
+ \def\@tstidx@text{#4}%
\fi
- \tstidxprocessutf{\@tstidx@utf}{#3}%
+ \tstidxprocessutf{\@tstidx@utf}{#4}%
\protected@edef\@tstidx@doidx{%
- \noexpand#5{\unexpanded\expandafter{\@tstidx@utf}}{#4}%
+ \noexpand#6{\unexpanded\expandafter{\@tstidx@utf}}[#1]{#5}%
{\@tstidx@text}%
}%
}%
{%
\ifx\@tstidx@text\@empty
- \def\@tstidx@text{#2}%
+ \def\@tstidx@text{#3}%
\fi
- \tstidxprocessascii{\@tstidx@ascii}{#2}%
- \tstidxprocessasciisort{\@tstidx@asciisort}{#2}%
+ \tstidxprocessascii{\@tstidx@ascii}{#3}%
+ \tstidxprocessasciisort{\@tstidx@asciisort}{#3}%
\protected@edef\@tstidx@doidx{%
- \noexpand#5[\unexpanded\expandafter{\@tstidx@asciisort}]%
- {\unexpanded\expandafter{\@tstidx@ascii}}{#4}%
+ \noexpand#6[\unexpanded\expandafter{\@tstidx@asciisort}]%
+ {\unexpanded\expandafter{\@tstidx@ascii}}[#1]{#5}%
{\@tstidx@text}%
}%
}%
\@tstidx@doidx
}
-\newcommand*{\tstidxsubutf}[7]{%
+\newcommand*{\tstidxsubutf}[4]{%
+ \@ifnextchar[{\@tstidxsubutf{#1}{#2}{#3}{#4}}%
+ {\@tstidxsubutf{#1}{#2}{#3}{#4}[]}%
+}
+\def\@tstidxsubutf#1#2#3#4[#5]#6#7#8{%
\def\@tstidx@text{#1}%
\@tstidx@ifutfviii
{%
@@ -456,11 +480,13 @@
\def\@tstidx@text{#3}%
\fi
\tstidxprocessutf{\@tstidx@utf}{#3}%
- \tstidxprocessutf{\@tstidx@subutf}{#5}%
+ \tstidxprocessutf{\@tstidx@subutf}{#6}%
\protected@edef\@tstidx@doidx{%
- \noexpand#7{\unexpanded\expandafter{\@tstidx@utf}}%
+ \noexpand#8%
+ {\unexpanded\expandafter{\@tstidx@utf}}%
{\unexpanded\expandafter{\@tstidx@subutf}}%
- {#6}%
+ [#5]%
+ {#7}%
{\@tstidx@text}%
}%
}%
@@ -473,18 +499,23 @@
\tstidxprocessascii{\@tstidx@subascii}{#4}%
\tstidxprocessasciisort{\@tstidx@subasciisort}{#4}%
\protected@edef\@tstidx@doidx{%
- \noexpand#7[\unexpanded\expandafter{\@tstidx@asciisort}]%
+ \noexpand#8%
+ [\unexpanded\expandafter{\@tstidx@asciisort}]%
{\unexpanded\expandafter{\@tstidx@ascii}}%
[\unexpanded\expandafter{\@tstidx@subasciisort}]%
{\unexpanded\expandafter{\@tstidx@subascii}}%
- {#6}%
+ [#5]%
+ {#7}%
{\@tstidx@text}%
}%
}%
\@tstidx@doidx
}
-\newcommand*{\tstidxutfpost}[4][]{%
- \tstidxutf{#1}{#2}{#3}{#4}{\tstindexpost}%
+\newcommand*{\tstidxutfpost}[2][]{%
+ \@ifnextchar[{\@tstidxutfpost{#1}{#2}}{\@tstidxutfpost{#1}{#2}[]}%
+}
+\def\@tstidxutfpost#1#2[#3]#4#5{%
+ \tstidxutf[#3]{#1}{#2}{#4}{#5}{\tstindexpost}%
}
\newcommand*{\tstidxutfopenpost}[4][]{%
\tstidxutf{#1}{#2}{#3}{#4}{\tstindexopenpost}%
@@ -492,8 +523,11 @@
\newcommand*{\tstidxutfclosepost}[4][]{%
\tstidxutf{#1}{#2}{#3}{#4}{\tstindexclosepost}%
}
-\newcommand*{\tstidxutfpre}[4][]{%
- \tstidxutf{#1}{#2}{#3}{#4}{\tstindexpre}%
+\newcommand*{\tstidxutfpre}[2][]{%
+ \@ifnextchar[{\@tstidxutfpre{#1}{#2}}{\@tstidxutfpre{#1}{#2}[#2]}%
+}
+\def\@tstidxutfpre#1#2[#3]#4#5{%
+ \tstidxutf[#3]{#1}{#2}{#4}{#5}{\tstindexpre}%
}
\newcommand*{\tstidxutfopenpre}[4][]{%
\tstidxutf{#1}{#2}{#3}{#4}{\tstindexopenpre}%
@@ -501,8 +535,12 @@
\newcommand*{\tstidxutfclosepre}[4][]{%
\tstidxutf{#1}{#2}{#3}{#4}{\tstindexclosepre}%
}
-\newcommand*{\tstidxutfsubpost}[6][]{%
- \tstidxsubutf{#1}{#2}{#3}{#4}{#5}{#6}{\tstsubindexpost}%
+\newcommand*{\tstidxutfsubpost}[4][]{%
+ \@ifnextchar[{\@tstidxutfsubpost{#1}{#2}{#3}{#4}}%
+ {\@tstidxutfsubpost{#1}{#2}{#3}{#4}[]}%
+}
+\def\@tstidxutfsubpost#1#2#3#4[#5]#6#7{%
+ \tstidxsubutf{#1}{#2}{#3}{#4}[#5]{#6}{#7}{\tstsubindexpost}%
}
\newcommand*{\tstidxutfsubopenpost}[6][]{%
\tstidxsubutf{#1}{#2}{#3}{#4}{#5}{#6}{\tstsubindexopenpost}%
@@ -521,14 +559,11 @@
}
\newcommand*{\tstidxcsfmt}[1]{\texttt{\char`\\#1}}
\if@tstidx@use@encaps
- \newcommand*{\tstidxcs}[2][tstidxencapi]{%
- \tstidxfmtpost{#2}{\tstidxcsfmt}{#1}%
- }
+ \newcommand*{\tstidxcs}[2][tstidxencapi]{\@tstidxcs{#1}{#2}}
\else
- \newcommand*{\tstidxcs}[2][]{%
- \tstidxfmtpost{#2}{\tstidxcsfmt}{#1}%
- }
+ \newcommand*{\tstidxcs}[2][]{\@tstidxcs{#1}{#2}}
\fi
+\newcommand*{\@tstidxcs}[2]{\tstidxfmtpost{#2}{\tstidxcsfmt}{#1}}
\if@tstidx@use@encaps
\newcommand*{\tstidxopencs}[2][tstidxencapi]{%
\tstidxfmtopenpost{#2}{\tstidxcsfmt}{#1}%
@@ -550,14 +585,14 @@
\if@tstidx@use@encaps
\newcommand*{\tstidxencapcsn}[2][tstidxencapi]{%
\tstindexpost[#2 (#2)]%
- {\texttt{#2} (\protect\tstidxcsfmt{#2})}{#1}{\texttt{#2}}%
- \tstsubindexpost{encap}[#2]{\texttt{#2}}{#1}{}%
+ {\texttt{#2} (\protect\tstidxcsfmt{#2})}[#2]{#1}{\texttt{#2}}%
+ \tstsubindexpost{encap}[#2]{\texttt{#2}}[encap.#2]{#1}{}%
}
\else
\newcommand*{\tstidxencapcsn}[2][]{%
\tstindexpost[#2 (#2)]%
- {\texttt{#2} (\protect\tstidxcsfmt{#2})}{#1}{\texttt{#2}}%
- \tstsubindexpost{encap}[#2]{\texttt{#2}}{#1}{}%
+ {\texttt{#2} (\protect\tstidxcsfmt{#2})}[#2]{#1}{\texttt{#2}}%
+ \tstsubindexpost{encap}[#2]{\texttt{#2}}[encap.#2]{#1}{}%
}
\fi
\if@tstidx@use@encaps
@@ -586,13 +621,13 @@
\if@tstidx@use@encaps
\newcommand*{\tstidxenv}[2][tstidxencapi]{%
\tstindexpost[#2 environment]%
- {\protect\tstidxenvfmt{#2} environment}{#1}%
+ {\protect\tstidxenvfmt{#2} environment}[#2environment]{#1}%
{\tstidxenvfmt{#2}}%
}
\else
\newcommand*{\tstidxenv}[2][]{%
\tstindexpost[#2 environment]%
- {\protect\tstidxenvfmt{#2} environment}{#1}%
+ {\protect\tstidxenvfmt{#2} environment}[#2environment]{#1}%
{\tstidxenvfmt{#2}}%
}
\fi
@@ -659,15 +694,21 @@
\newcommand*{\tstidxappoptfmt}[1]{\texttt{#1}}
\if@tstidx@use@encaps
\newcommand*{\tstidxappopt}[3][tstidxencapiii]{%
+ \tstindexpost[#3 (#2)]%
+ {\protect\tstidxappoptfmt{#3} (\protect\tstidxappfmt{#2})}%
+ [#3.#2option]{#1}{\tstidxappoptfmt{#3}}%
\tstsubindexpost[#2]{\protect\tstidxappfmt{#2}}%
- [#3]{\protect\tstidxappoptfmt{#3}}{#1}{\tstidxappoptfmt{#3}}%
+ [#3]{\protect\tstidxappoptfmt{#3}}{#1}{}%
\tstsubsubindexpost{applications}[#2]{\protect\tstidxappfmt{#2}}%
[#3]{\protect\tstidxappoptfmt{#3}}{#1}{}%
}
\else
\newcommand*{\tstidxappopt}[3][]{%
+ \tstindexpost[#3 (#2)]%
+ {\protect\tstidxappoptfmt{#3} (\protect\tstidxappfmt{#2})}%
+ [#3.#2option]{#1}{\tstidxappoptfmt{#3}}%
\tstsubindexpost[#2]{\protect\tstidxappfmt{#2}}%
- [#3]{\protect\tstidxappoptfmt{#3}}{#1}{\tstidxappoptfmt{#3}}%
+ [#3]{\protect\tstidxappoptfmt{#3}}{#1}{}%
\tstsubsubindexpost{applications}[#2]{\protect\tstidxappfmt{#2}}%
[#3]{\protect\tstidxappoptfmt{#3}}{#1}{}%
}
@@ -707,49 +748,55 @@
}
\fi
\newcommand*{\tstidxstyfmt}[1]{\texttt{#1}}
+\newcommand*{\tstindexstysee}[3]{%
+ \tstindexsee[#1package]{\protect\tstidxstyfmt{#1} package}{#2}%
+ [#3package]{\protect\tstidxstyfmt{#3}}%
+}
\if@tstidx@use@encaps
\newcommand*{\tstidxsty}[2][tstidxencapiii]{%
\tstindexpost[#2 package]%
- {\protect\tstidxstyfmt{#2} package}{#1}{\tstidxstyfmt{#2}}%
+ {\protect\tstidxstyfmt{#2} package}[#2package]{#1}{\tstidxstyfmt{#2}}%
\tstsubindexpost{packages}[#2 package]%
- {\protect\tstidxstyfmt{#2} package}{#1}{}%
+ {\protect\tstidxstyfmt{#2} package}[packages.#2package]{#1}{}%
}
\else
\newcommand*{\tstidxsty}[2][]{%
\tstindexpost[#2 package]%
- {\protect\tstidxstyfmt{#2} package}{#1}{\tstidxstyfmt{#2}}%
+ {\protect\tstidxstyfmt{#2} package}[#2package]{#1}{\tstidxstyfmt{#2}}%
\tstsubindexpost{packages}[#2 package]%
- {\protect\tstidxstyfmt{#2} package}{#1}{}%
+ {\protect\tstidxstyfmt{#2} package}[packages.#2package]{#1}{}%
}
\fi
\if@tstidx@use@encaps
\newcommand*{\tstidxopensty}[2][tstidxencapiii]{%
- \tstindexopenpost[#2 package]{\protect\tstidxstyfmt{#2} package}{#1}%
+ \tstindexopenpost[#2 package]{\protect\tstidxstyfmt{#2} package}[#2package]{#1}%
{\tstidxstyfmt{#2}}%
\tstsubindexopenpost{packages}[#2 package]%
- {\protect\tstidxstyfmt{#2} package}{#1}{}%
+ {\protect\tstidxstyfmt{#2} package}[packages.#2package]{#1}{}%
}
\else
\newcommand*{\tstidxopensty}[2][]{%
- \tstindexopenpost[#2 package]{\protect\tstidxstyfmt{#2} package}{#1}%
+ \tstindexopenpost[#2 package]{\protect\tstidxstyfmt{#2} package}[#2package]{#1}%
{\tstidxstyfmt{#2}}%
\tstsubindexopenpost{packages}[#2 package]%
- {\protect\tstidxstyfmt{#2} package}{#1}{}%
+ {\protect\tstidxstyfmt{#2} package}[packages.#2package]{#1}{}%
}
\fi
\if@tstidx@use@encaps
\newcommand*{\tstidxclosesty}[2][tstidxencapiii]{%
- \tstindexclosepost[#2 package]{\protect\tstidxstyfmt{#2} package}{#1}%
+ \tstindexclosepost[#2 package]{\protect\tstidxstyfmt{#2} package}%
+ [#2package]{#1}%
{\tstidxstyfmt{#2}}%
\tstsubindexclosepost{packages}[#2 package]%
- {\protect\tstidxstyfmt{#2} package}{#1}{}%
+ {\protect\tstidxstyfmt{#2} package}[packages.#2package]{#1}{}%
}
\else
\newcommand*{\tstidxclosesty}[2][]{%
- \tstindexclosepost[#2 package]{\protect\tstidxstyfmt{#2} package}{#1}%
+ \tstindexclosepost[#2 package]{\protect\tstidxstyfmt{#2} package}%
+ [#2package]{#1}%
{\tstidxstyfmt{#2}}%
\tstsubindexclosepost{packages}[#2 package]%
- {\protect\tstidxstyfmt{#2} package}{#1}{}%
+ {\protect\tstidxstyfmt{#2} package}[packages.#2package]{#1}{}%
}
\fi
\newcommand*{\tstidxstyoptfmt}[1]{\texttt{#1}}
@@ -807,6 +854,8 @@
\newcommand*{\tstidxword}[2][]{%
\tstindexpost{#2}{#1}{#2}%
}
+\newcommand*{\tstidxwordpl}[1][]{\@tstidxwordpl{#1}}
+\newcommand*{\@tstidxwordpl}[2]{\tstidxword[#1]{#2}s}
\newcommand*{\tstidxopenword}[2][]{%
\tstindexopenpost{#2}{#1}{#2}%
}
@@ -828,6 +877,8 @@
\newcommand*{\tstidxphrase}[2][]{%
\tstindexpre{#2}{#1}{#2}%
}
+\newcommand*{\tstidxphrasepl}[1][]{\@tstidxphrasepl{#1}}
+\newcommand*{\@tstidxphrasepl}[2]{\tstidxphrase[#1]{#2}s}
\newcommand*{\tstidxopenphrase}[2][]{%
\tstindexopenpre{#2}{#1}{#2}%
}
@@ -835,13 +886,13 @@
\tstindexclosepre{#2}{#1}{#2}%
}
\newcommand*{\tstidxartphrase}[3][]{%
- \tstindexpost{#3, #2}{#1}{#2 #3}%
+ \tstindexpost{#3, #2}[#3]{#1}{#2 #3}%
}
\newcommand*{\tstidxopenartphrase}[3][]{%
- \tstindexopenpost{#3, #2}{#1}{#2 #3}%
+ \tstindexopenpost{#3, #2}[#3]{#1}{#2 #3}%
}
\newcommand*{\tstidxcloseartphrase}[3][]{%
- \tstindexclosepost{#3, #2}{#1}{#2 #3}%
+ \tstindexclosepost{#3, #2}[#3]{#1}{#2 #3}%
}
\newcommand*{\tstidxperson}[3][]{%
\tstidxutfperson[#1]{#2}{#3}{#2}{#3}%
@@ -852,69 +903,120 @@
\newcommand*{\tstidxcloseperson}[3][]{%
\tstidxutfcloseperson[#1]{#2}{#3}{#2}{#3}%
}
-\newcommand*{\tstidxutfperson}[5][]{%
+\newcommand*{\tstidxutfperson}[3][]{%
+ \@ifnextchar[{\@tstidxutfperson{#1}{#2}{#3}}%
+ {\@tstidxutfperson{#1}{#2}{#3}[#2#3]}%
+}
+\def\@tstidxutfperson#1#2#3[#4]#5#6{%
\@tstidx@ifutfviii
{%
- \tstidxutfpost[#4 #5]{#3, #2}{#5, #4}{#1}%
+ \tstidxutfpost[#5 #6]{#3, #2}[#4]{#6, #5}{#1}%
}%
{%
- \tstidxutfpost[#2 #3]{#3, #2}{#5, #4}{#1}%
+ \tstidxutfpost[#2 #3]{#3, #2}[#4]{#6, #5}{#1}%
}%
- \tstidxutfsubpost[\relax]{people}{people}{#3, #2}{#5, #4}{#1}%
+ \tstidxutfsubpost[\relax]{people}{people}{#3, #2}[people.#4]{#6, #5}{#1}%
+}
+\newcommand*{\tstidxutfopenperson}[3][]{%
+ \@ifnextchar[{\@tstidxutfopenperson{#1}{#2}{#3}}%
+ {\@tstidxutfopenperson{#1}{#2}{#3}[#2#3]}%
}
-\newcommand*{\tstidxutfopenperson}[5][]{%
+\def\@tstidxutfopenperson#1#2#3[#4]#5#6{%
\@tstidx@ifutfviii
{%
- \tstidxutfopenpost[#4 #5]{#3, #2}{#5, #4}{#1}%
+ \tstidxutfopenpost[#5 #6]{#3, #2}[#4]{#6, #5}{#1}%
}%
{%
- \tstidxutfopenpost[#2 #3]{#3, #2}{#5, #4}{#1}%
+ \tstidxutfopenpost[#2 #3]{#3, #2}[#4]{#6, #5}{#1}%
}%
}
-\newcommand*{\tstidxutfcloseperson}[7][]{%
+\newcommand*{\tstidxutfcloseperson}[3][]{%
+ \@ifnextchar[{\@tstidxutfcloseperson{#1}{#2}{#3}}%
+ {\@tstidxutfcloseperson{#1}{#2}{#3}[#2#3]}%
+}
+\def\@tstidxutfcloseperson#1#2#3[#4]#5#6{%
\@tstidx@ifutfviii
{%
- \tstidxutfclosepost[#4 #5]{#3, #2}{#5, #4}{#1}%
+ \tstidxutfclosepost[#5 #6]{#3, #2}[#4]{#6, #5}{#1}%
}%
{%
- \tstidxutfclosepost[#2 #3]{#3, #2}{#5, #4}{#1}%
+ \tstidxutfclosepost[#2 #3]{#3, #2}[#4]{#6, #5}{#1}%
}%
}
-\newcommand*{\tstidxsym}[3][]{%
- \tstindexpost[#2]{\protect#3}{#1}{#3}%
+\newcommand*{\tstidxsym}[2][]{%
+ \@ifnextchar[{\@tstidxsym{#1}{#2}}{\@tstidxsym{#1}{#2}[#2]}%
+}
+\def\@tstidxsym#1#2[#3]#4{%
+ \tstindexpost[#2]{\protect#4}[#3]{#1}{#4}%
+}
+\newcommand*{\tstidxopensym}[2][]{%
+ \@ifnextchar[{\@tstidxopensym{#1}{#2}}{\@tstidxopensym{#1}{#2}[]}%
+}
+\def\@tstidxopensym#1#2[#3]#4{%
+ \tstindexopenpost[#2]{\protect#4}[#3]{#1}{#4}%
}
-\newcommand*{\tstidxopensym}[3][]{%
- \tstindexopenpost[#2]{\protect#3}{#1}{#3}%
+\newcommand*{\tstidxclosesym}[2][]{%
+ \@ifnextchar[{\@tstidxclosesym{#1}{#2}}{\@tstidxclosesym{#1}{#2}[]}%
}
-\newcommand*{\tstidxclosesym}[3][]{%
- \tstindexopenpost[#2]{\protect#3}{#1}{#3}%
+\def\@tstidxclosesym#1#2[#3]#4{%
+ \tstindexclosepost[#2]{\protect#4}[#3]{#1}{#4}%
}
\newcommand{\tstidxindexmarker}[1]{%
- \tstidxsym{\tstidxindexmarkerprefix#1}{\csname#1\endcsname
- \protect\space (\protect\tstidxcsfmt{#1})}%
+ \iftestidxprefix
+ \expandafter\tstidxsym\expandafter
+ {\tstidxindexmarkerprefix#1}[#1]{\csname#1\endcsname
+ \protect\space (\protect\tstidxcsfmt{#1})}%
+ \else
+ \tstidxsym{#1}[#1]{\csname#1\endcsname
+ \protect\space (\protect\tstidxcsfmt{#1})}%
+ \fi
}
\newcommand*{\tstidxindexmarkerprefix}{<}
\if@tstidx@use@encaps
- \newcommand*{\tstidxmath}[3][tstidxencapii]{%
- \tstindexpre[#2]{$#3$}{#1}{#3}%
+ \newcommand*{\tstidxmath}[2][tstidxencapii]{%
+ \@ifnextchar[{\@tstidxmath{#1}{#2}}{\@tstidxmath{#1}{#2}[#2]}%
}
\else
- \newcommand*{\tstidxmath}[3][]{%
- \tstindexpre[#2]{$#3$}{#1}{#3}%
+ \newcommand*{\tstidxmath}[2][]{%
+ \@ifnextchar[{\@tstidxmath{#1}{#2}}{\@tstidxmath{#1}{#2}[#2]}%
}
\fi
+\def\@tstidxmath#1#2[#3]#4{%
+ \tstindexpre[#2]{$#4$}[#3]{#1}{#4}%
+}
\if@tstidx@use@encaps
- \newcommand*{\tstidxmathsym}[3][tstidxencapii]{%
- \tstidxmath[#1]{\tstidxmathsymprefix#2}{#3}%
+ \newcommand*{\tstidxmathsym}[2][tstidxencapii]{%
+ \@ifnextchar[{\@tstidxmathsym{#1}{#2}}{\@tstidxmathsym{#1}{#2}[#2]}%
}
\else
- \newcommand*{\tstidxmathsym}[3][]{%
- \tstidxmath[#1]{\tstidxmathsymprefix#2}{#3}%
+ \newcommand*{\tstidxmathsym}[2][]{%
+ \@ifnextchar[{\@tstidxmathsym{#1}{#2}}{\@tstidxmathsym{#1}{#2}[#2]}%
}
\fi
+\def\@tstidxmathsym#1#2[#3]#4{%
+ \iftestidxprefix
+ \expandafter\tstindexpre\expandafter
+ [\tstidxmathsymprefix#2]{$#4$}[#3]{#1}{#4}%
+ \else
+ \tstindexpre[#2]{$#4$}[#3]{#1}{#4}%
+ \fi
+}
\newcommand*{\tstidxmathsymprefix}{>}
-\newcommand*{\tstidxutfword}[3][]{%
- \tstidxutfpost{#2}{#3}{#1}%
+\newcommand*{\tstidxutfword}[2][]{%
+ \@ifnextchar[{\@tstidxutfword{#1}{#2}}{\@tstidxutfword{#1}{#2}[#2]}%
+}
+\def\@tstidxutfword#1#2[#3]#4{%
+ \tstidxutfpost{#2}[#3]{#4}{#1}%
+}
+\newcommand*{\tstidxgphword}[2][]{%
+ \@ifnextchar[{\@tstidxgphword{#1}{#2}}{\@tstidxgphword{#1}{#2}[#2]}%
+}
+\def\@tstidxgphword#1#2[#3]#4#5{%
+ \iftestidxdiglyphs
+ \tstidxutfpost{#2}[#3]{#5}{#1}%
+ \else
+ \tstidxutfpost{#2}[#3]{#4}{#1}%
+ \fi
}
\newcommand*{\tstidxopenutf}[4][]{%
\tstidxutfopenpost{#2}{#3}{#1}%
@@ -922,8 +1024,11 @@
\newcommand*{\tstidxcloseutf}[4][]{%
\tstidxutfclosepost{#2}{#3}{#1}%
}
-\newcommand*{\tstidxutfphrase}[3][]{%
- \tstidxutfpre{#2}{#3}{#1}%
+\newcommand*{\tstidxutfphrase}[2][]{%
+ \@ifnextchar[{\@tstidxutfphrase{#1}{#2}}{\@tstidxutfphrase{#1}{#2}[#2]}%
+}
+\def\@tstidxutfphrase#1#2[#3]#4{%
+ \tstidxutfpre{#2}[#3]{#4}{#1}%
}
\newcommand*{\tstidxopenutfphrase}[3][]{%
\tstidxutfopenpre{#2}{#3}{#1}%
@@ -934,23 +1039,26 @@
\newcommand*{\tstidxplace}[2][]{%
\tstidxutfplace[#1]{#2}{#2}%
}
-\newcommand*{\tstidxutfplace}[3][]{%
- \tstidxutfpost{#2}{#3}{#1}%
- \tstidxutfsubpost[\relax]{places}{places}{#2}{#3}{#1}%
+\newcommand*{\tstidxutfplace}[2][]{%
+ \@ifnextchar[{\@tstidxutfplace{#1}{#2}}{\@tstidxutfplace{#1}{#2}[#2]}%
+}
+\def\@tstidxutfplace#1#2[#3]#4{%
+ \tstidxutfpost{#2}[#3]{#4}{#1}%
+ \tstidxutfsubpost[\relax]{places}{places}{#2}[places.#3]{#4}{#1}%
}
\newcommand*{\tstidxartplace}[3][]{%
- \tstindexpost{#3, #2}{#1}{#2 #3}%
- \tstidxutfsubpost[\relax]{places}{places}{#3, #2}{#3, #2}{#1}%
+ \tstindexpost{#3, #2}[#3]{#1}{#2 #3}%
+ \tstidxutfsubpost[\relax]{places}{places}{#3, #2}[places.#3]{#3, #2}{#1}%
}
\newcommand*{\tstidxbookfmt}[1]{\emph{#1}}
\if@tstidx@use@encaps
\newcommand*{\tstidxbook}[2][tstidxencapii]{%
- \tstindexpost[#2]{\protect\tstidxbookfmt{#2}}{#1}{\tstidxbookfmt{#2}}%
+ \tstindexpost[#2]{\protect\tstidxbookfmt{#2}}[#2]{#1}{\tstidxbookfmt{#2}}%
\tstsubindexpost{books}[#2]{\protect\tstidxbookfmt{#2}}{#1}{}%
}
\else
\newcommand*{\tstidxbook}[2][]{%
- \tstindexpost[#2]{\protect\tstidxbookfmt{#2}}{#1}{\tstidxbookfmt{#2}}%
+ \tstindexpost[#2]{\protect\tstidxbookfmt{#2}}[#2]{#1}{\tstidxbookfmt{#2}}%
\tstsubindexpost{books}[#2]{\protect\tstidxbookfmt{#2}}{#1}{}%
}
\fi
@@ -978,39 +1086,40 @@
\fi
\if@tstidx@use@encaps
\newcommand*{\tstidxartbook}[3][tstidxencapii]{%
- \tstindexpost[#3, #2]{\protect\tstidxbookfmt{#3, #2}}{#1}{\tstidxbookfmt{#2 #3}}%
- \tstsubindexpost{books}[#3, #2]{\protect\tstidxbookfmt{#3, #2}}{#1}{}%
+ \tstindexpost[#3, #2]{\protect\tstidxbookfmt{#3, #2}}[#3]{#1}{\tstidxbookfmt{#2 #3}}%
+ \tstsubindexpost{books}[#3, #2]{\protect\tstidxbookfmt{#3, #2}}[books.#3]{#1}{}%
}
\else
\newcommand*{\tstidxartbook}[3][]{%
- \tstindexpost[#3, #2]{\protect\tstidxbookfmt{#3, #2}}{#1}{\tstidxbookfmt{#2 #3}}%
- \tstsubindexpost{books}[#3, #2]{\protect\tstidxbookfmt{#3, #2}}{#1}{}%
+ \tstindexpost[#3, #2]{\protect\tstidxbookfmt{#3, #2}}[#3]{#1}{\tstidxbookfmt{#2 #3}}%
+ \tstsubindexpost{books}[#3, #2]{\protect\tstidxbookfmt{#3,
+#2}}[books.#3]{#1}{}%
}
\fi
\if@tstidx@use@encaps
\newcommand*{\tstidxopenartbook}[3][tstidxencapii]{%
\tstindexopenpost[#3, #2]{\protect\tstidxbookfmt{#3, #2}}{#1}%
{\tstidxbookfmt{#2 #3}}%
- \tstsubindexopenpost{books}[#3, #2]{\protect\tstidxbookfmt{#3, #2}}{#1}{}%
+ \tstsubindexopenpost{books}[#3, #2]{\protect\tstidxbookfmt{#3, #2}}[books.#3]{#1}{}%
}
\else
\newcommand*{\tstidxopenartbook}[3][]{%
\tstindexopenpost[#3, #2]{\protect\tstidxbookfmt{#3, #2}}{#1}%
{\tstidxbookfmt{#2 #3}}%
- \tstsubindexopenpost{books}[#3, #2]{\protect\tstidxbookfmt{#3, #2}}{#1}{}%
+ \tstsubindexopenpost{books}[#3, #2]{\protect\tstidxbookfmt{#3, #2}}[books.#3]{#1}{}%
}
\fi
\if@tstidx@use@encaps
\newcommand*{\tstidxcloseartbook}[3][tstidxencapii]{%
\tstindexclosepost[#3, #2]{\protect\tstidxbookfmt{#3, #2}}{#1}%
{\tstidxbookfmt{#2 #3}}%
- \tstsubindexclosepost{books}[#3, #2]{\protect\tstidxbookfmt{#3, #2}}{#1}{}%
+ \tstsubindexclosepost{books}[#3, #2]{\protect\tstidxbookfmt{#3, #2}}[books.#3]{#1}{}%
}
\else
\newcommand*{\tstidxcloseartbook}[3][]{%
\tstindexclosepost[#3, #2]{\protect\tstidxbookfmt{#3, #2}}{#1}%
{\tstidxbookfmt{#2 #3}}%
- \tstsubindexclosepost{books}[#3, #2]{\protect\tstidxbookfmt{#3, #2}}{#1}{}%
+ \tstsubindexclosepost{books}[#3, #2]{\protect\tstidxbookfmt{#3, #2}}[books.#3]{#1}{}%
}
\fi
\newcommand*{\tstidxfilmfmt}[1]{\emph{#1}}
@@ -1049,20 +1158,24 @@
\fi
\if@tstidx@use@encaps
\newcommand*{\tstidxartfilm}[3][tstidxencapii]{%
- \tstindexpost[#3, #2]{\protect\tstidxfilmfmt{#3, #2}}{#1}%
+ \tstindexpost[#3, #2]{\protect\tstidxfilmfmt{#3, #2}}[#3]{#1}%
{\tstidxfilmfmt{#2 #3}}%
- \tstsubindexpost{films}[#3, #2]{\protect\tstidxfilmfmt{#3, #2}}{#1}{}%
+ \tstsubindexpost{films}[#3, #2]{\protect\tstidxfilmfmt{#3,
+#2}}[films.#3]{#1}{}%
}
\else
\newcommand*{\tstidxartfilm}[3][]{%
- \tstindexpost[#3, #2]{\protect\tstidxfilmfmt{#3, #2}}{#1}%
+ \tstindexpost[#3, #2]{\protect\tstidxfilmfmt{#3, #2}}[#3]{#1}%
{\tstidxfilmfmt{#2 #3}}%
- \tstsubindexpost{films}[#3, #2]{\protect\tstidxfilmfmt{#3, #2}}{#1}{}%
+ \tstsubindexpost{films}[#3, #2]{\protect\tstidxfilmfmt{#3, #2}}[films.#3]{#1}{}%
}
\fi
-\newcommand*{\tstindexpost}[4][]{%
+\newcommand*{\tstindexpost}[2][]{%
+ \@ifnextchar[{\@tstindexpost{#1}{#2}}{\@tstindexpost{#1}{#2}[]}%
+}%
+\def\@tstindexpost#1#2[#3]#4#5{%
\def\@tstidx@sort{#1}%
- \def\@tstidx@encap{#3}%
+ \def\@tstidx@encap{#4}%
\ifx\@tstidx@sort\@empty
\def\@tstidx@entry{#2}%
\else
@@ -1072,24 +1185,26 @@
\fi
\ifx\@tstidx@encap\@empty
\iftestidxshowmarks
- \tstidxtext{#4\tstidxmarker}%
+ \tstidxtext{#5\tstidxmarker}%
\else
- #4%
+ #5%
\fi
\else
\iftestidxshowmarks
- \tstidxtext{\tstidxencaptext{#3}{#4\tstidxmarker}}%
+ \tstidxtext{\tstidxencaptext{#4}{#5\tstidxmarker}}%
\else
- #4%
+ #5%
\fi
\expandafter\toks@\expandafter{\@tstidx@entry}%
- \edef\@tstidx@entry{\the\toks@\tstidxencap#3}%
+ \edef\@tstidx@entry{\the\toks@\tstidxencap#4}%
\fi
\expandafter\@tstindex\expandafter{\@tstidx@entry}%
}
-\newcommand*{\tstindexopenpost}[4][]{%
+\newcommand*{\tstindexopenpost}[2][]{%
+ \@ifnextchar[{\@tstindexopenpost{#1}{#2}}{\@tstindexopenpost{#1}{#2}[]}}%
+\def\@tstindexopenpost#1#2[#3]#4#5{%
\def\@tstidx@sort{#1}%
- \def\@tstidx@encap{#3}%
+ \def\@tstidx@encap{#4}%
\ifx\@tstidx@sort\@empty
\def\@tstidx@entry{#2}%
\else
@@ -1099,26 +1214,28 @@
\fi
\ifx\@tstidx@encap\@empty
\iftestidxshowmarks
- \tstidxtext{#4\tstidxopenmarker}%
+ \tstidxtext{#5\tstidxopenmarker}%
\else
- #4%
+ #5%
\fi
\expandafter\toks@\expandafter{\@tstidx@entry}%
\edef\@tstidx@entry{\the\toks@\tstidxencap\tstidxopenrange}%
\else
\iftestidxshowmarks
- \tstidxtext{\tstidxencaptext{#3}{#4\tstidxopenmarker}}%
+ \tstidxtext{\tstidxencaptext{#4}{#5\tstidxopenmarker}}%
\else
- #4%
+ #5%
\fi
\expandafter\toks@\expandafter{\@tstidx@entry}%
- \edef\@tstidx@entry{\the\toks@\tstidxencap\tstidxopenrange#3}%
+ \edef\@tstidx@entry{\the\toks@\tstidxencap\tstidxopenrange#4}%
\fi
\expandafter\@tstindex\expandafter{\@tstidx@entry}%
}
-\newcommand*{\tstindexclosepost}[4][]{%
+\newcommand*{\tstindexclosepost}[2][]{%
+ \@ifnextchar[{\@tstindexclosepost{#1}{#2}}{\@tstindexclosepost{#1}{#2}[]}}%
+\def\@tstindexclosepost#1#2[#3]#4#5{%
\def\@tstidx@sort{#1}%
- \def\@tstidx@encap{#3}%
+ \def\@tstidx@encap{#4}%
\ifx\@tstidx@sort\@empty
\def\@tstidx@entry{#2}%
\else
@@ -1128,26 +1245,28 @@
\fi
\ifx\@tstidx@encap\@empty
\iftestidxshowmarks
- \tstidxtext{#4\tstidxclosemarker}%
+ \tstidxtext{#5\tstidxclosemarker}%
\else
- #4%
+ #5%
\fi
\expandafter\toks@\expandafter{\@tstidx@entry}%
\edef\@tstidx@entry{\the\toks@\tstidxencap\tstidxcloserange}%
\else
\iftestidxshowmarks
- \tstidxtext{\tstidxencaptext{#3}{#4\tstidxclosemarker}}%
+ \tstidxtext{\tstidxencaptext{#4}{#5\tstidxclosemarker}}%
\else
- #4%
+ #5%
\fi
\expandafter\toks@\expandafter{\@tstidx@entry}%
- \edef\@tstidx@entry{\the\toks@\tstidxencap\tstidxcloserange#3}%
+ \edef\@tstidx@entry{\the\toks@\tstidxencap\tstidxcloserange#4}%
\fi
\expandafter\@tstindex\expandafter{\@tstidx@entry}%
}
-\newcommand*{\tstindexpre}[4][]{%
+\newcommand*{\tstindexpre}[2][]{%
+ \@ifnextchar[{\@tstindexpre{#1}{#2}}{\@tstindexpre{#1}{#2}[]}}%
+\def\@tstindexpre#1#2[#3]#4#5{%
\def\@tstidx@sort{#1}%
- \def\@tstidx@encap{#3}%
+ \def\@tstidx@encap{#4}%
\ifx\@tstidx@sort\@empty
\def\@tstidx@entry{#2}%
\else
@@ -1158,24 +1277,26 @@
\ifx\@tstidx@encap\@empty
\expandafter\@tstindex\expandafter{\@tstidx@entry}%
\iftestidxshowmarks
- \tstidxtext{\tstidxmarker#4}%
+ \tstidxtext{\tstidxmarker#5}%
\else
- #4%
+ #5%
\fi
\else
\expandafter\toks@\expandafter{\@tstidx@entry}%
- \edef\@tstidx@entry{\the\toks@\tstidxencap#3}%
+ \edef\@tstidx@entry{\the\toks@\tstidxencap#4}%
\expandafter\@tstindex\expandafter{\@tstidx@entry}%
\iftestidxshowmarks
- \tstidxtext{\tstidxencaptext{#3}{\tstidxmarker#4}}%
+ \tstidxtext{\tstidxencaptext{#4}{\tstidxmarker#5}}%
\else
- #4%
+ #5%
\fi
\fi
}
-\newcommand*{\tstindexopenpre}[4][]{%
+\newcommand*{\tstindexopenpre}[2][]{%
+ \@ifnextchar[{\@tstindexopenpre{#1}{#2}}{\@tstindexopenpre{#1}{#2}[]}}%
+\def\@tstindexopenpre#1#2[#3]#4#5{%
\def\@tstidx@sort{#1}%
- \def\@tstidx@encap{#3}%
+ \def\@tstidx@encap{#4}%
\ifx\@tstidx@sort\@empty
\def\@tstidx@entry{#2}%
\else
@@ -1188,24 +1309,26 @@
\edef\@tstidx@entry{\the\toks@\tstidxencap\tstidxopenrange}%
\expandafter\@tstindex\expandafter{\@tstidx@entry}%
\iftestidxshowmarks
- \tstidxtext{\tstidxopenmarker#4}%
+ \tstidxtext{\tstidxopenmarker#5}%
\else
- #4%
+ #5%
\fi
\else
\expandafter\toks@\expandafter{\@tstidx@entry}%
- \edef\@tstidx@entry{\the\toks@\tstidxencap\tstidxopenrange#3}%
+ \edef\@tstidx@entry{\the\toks@\tstidxencap\tstidxopenrange#4}%
\expandafter\@tstindex\expandafter{\@tstidx@entry}%
\iftestidxshowmarks
- \tstidxtext{\tstidxencaptext{#3}{\tstidxopenmarker#4}}%
+ \tstidxtext{\tstidxencaptext{#4}{\tstidxopenmarker#5}}%
\else
- #4%
+ #5%
\fi
\fi
}
-\newcommand*{\tstindexclosepre}[4][]{%
+\newcommand*{\tstindexclosepre}[2][]{%
+ \@ifnextchar[{\@tstindexclosepre{#1}{#2}}{\@tstindexclosepre{#1}{#2}[]}}%
+\def\@tstindexclosepre#1#2[#3]#4#5{%
\def\@tstidx@sort{#1}%
- \def\@tstidx@encap{#3}%
+ \def\@tstidx@encap{#4}%
\ifx\@tstidx@sort\@empty
\def\@tstidx@entry{#2}%
\else
@@ -1218,46 +1341,109 @@
\edef\@tstidx@entry{\the\toks@\tstidxencap\tstidxcloserange}%
\expandafter\@tstindex\expandafter{\@tstidx@entry}%
\iftestidxshowmarks
- \tstidxtext{\tstidxclosemarker#4}%
+ \tstidxtext{\tstidxclosemarker#5}%
\else
- #4%
+ #5%
\fi
\else
\expandafter\toks@\expandafter{\@tstidx@entry}%
- \edef\@tstidx@entry{\the\toks@\tstidxencap\tstidxcloserange#3}%
+ \edef\@tstidx@entry{\the\toks@\tstidxencap\tstidxcloserange#4}%
\expandafter\@tstindex\expandafter{\@tstidx@entry}%
\iftestidxshowmarks
- \tstidxtext{\tstidxencaptext{#3}{\tstidxclosemarker#4}}%
+ \tstidxtext{\tstidxencaptext{#4}{\tstidxclosemarker#5}}%
\else
- #4%
+ #5%
\fi
\fi
}
-\newcommand*{\tstindexsee}[4][]{%
+\newcommand*{\@tstidxseeencap}[1]{%
+ \@ifundefined{tstidx@#1@encapname}{#1}{\csname tstidx@#1@encapname\endcsname}%
+}
+\newcommand*{\tstidxSetSeeEncap}[1]{%
+ \@namedef{tstidx@see@encapname}{#1}%
+}
+\newcommand*{\tstidxSetSeeAlsoEncap}[1]{%
+ \@namedef{tstidx@seealso@encapname}{#1}%
+}
+\newcommand*{\tstindexsee}[2][]{%
+ \@ifnextchar[{\@tstindex@see{#1}{#2}}{\@tstindex@see{#1}{#2}[]}}%
+\def\@tstindex@see#1#2[#3]#4{%
+ \@ifnextchar[{\@tstindexsee{#1}{#2}{#3}{#4}}{\@tstindexsee{#1}{#2}{#3}{#4}[]}}%
+\def\@tstindexsee#1#2#3#4[#5]#6{%
\def\@tstidx@sort{#1}%
+ \def\@tstidx@entry{#2}%
\ifx\@tstidx@sort\@empty
- \def\@tstidx@entry{#2}%
+ \@tstidx@ifutfviii
+ {%
+ \tstidxprocessutf{\@tstidx@entry}{#2}%
+ }%
+ {%
+ \def\@tstidx@sort{#2}%
+ \tstidxprocessasciisort{\@tstidx@sort}{#2}%
+ \ifx\@tstidx@sort\@tstidx@entry
+ \else
+ \expandafter\toks@\expandafter{\@tstidx@sort}%
+ \edef\@tstidx@entry{\the\toks@\tstidxactual}%
+ \expandafter\def\expandafter\@tstidx@entry\expandafter
+ {\@tstidx@entry#2}%
+ \fi
+ }%
\else
- \toks@{#1}%
- \edef\@tstidx@entry{\the\toks@\tstidxactual}%
- \expandafter\def\expandafter\@tstidx@entry\expandafter{\@tstidx@entry#2}%
+ \@tstidx@ifutfviii
+ {%
+ \expandafter\tstidxprocessutf\expandafter\@tstidx@sort
+ \expandafter{\@tstidx@sort}%
+ }%
+ {%
+ \expandafter\tstidxprocessasciisort\expandafter\@tstidx@sort
+ \expandafter{\@tstidx@sort}%
+ }%
+ \expandafter\toks@\expandafter{\@tstidx@sort}%
+ \edef\@tstidx@entry{\the\toks@\tstidxactual}%
+ \expandafter\def\expandafter\@tstidx@entry\expandafter{\@tstidx@entry#2}%
\fi
\expandafter\toks@\expandafter{\@tstidx@entry}%
- \edef\@tstidx@entry{\the\toks@\tstidxencap#3{#4}}%
+ \protected@edef\@tstidx@entry{\the\toks@\tstidxencap
+ \@tstidxseeencap{#4}{#6}}%
\expandafter\@tstindex\expandafter{\@tstidx@entry}%
\iftestidxshowmarks
- \tstidxseeref{#2}{#3}{#4}%
+ \tstidxseeref{#2}{#4}{#6}%
\fi
}
+\newcommand*{\tstindexutfsee}[2][]{%
+ \@tstindexutfsee{#1}{#2}%
+}
+\newcommand*{\@tstindexutfsee}[2]{%
+ \@ifnextchar[{\@tst@indexutfsee{#1}{#2}}{\@tst@indexutfsee{#1}{#2}[]}%
+}
+\def\@tst@indexutfsee#1#2[#3]#4{%
+ \@ifnextchar[{\@@tst@indexutfsee{#1}{#2}{#3}{#4}}%
+ {\@@tst@indexutfsee{#1}{#2}{#3}{#4}[]}%
+}
+\def\@@tst@indexutfsee#1#2#3#4[#5]#6{%
+ \@ifnextchar[{\@@tst@@indexutfsee{#1}{#2}{#3}{#4}{#5}{#6}}%
+ {\@@tst@@indexutfsee{#1}{#2}{#3}{#4}{#5}{#6}[]}%
+}
+\def\@@tst@@indexutfsee#1#2#3#4#5#6[#7]#8#9{%
+ \@tstidx@ifutfviii
+ {%
+ \@tstindexsee{#3}{#4}{#5}{#6}[#7]{#9}%
+ }%
+ {%
+ \@tstindexsee{#1}{#2}{#5}{#6}[#7]{#8}%
+ }%
+}
\newcommand*{\tstsubindexpost}[2][]{%
\def\@tstidx@sort{#1}%
\def\@tstidx@term{#2}%
\@tst@subindexpost
}
-\newcommand*{\@tst@subindexpost}[4][]{%
+\newcommand*{\@tst@subindexpost}[2][]{%
+ \@ifnextchar[{\@tstidx@subindexpost{#1}{#2}}{\@tstidx@subindexpost{#1}{#2}[]}}%
+\def\@tstidx@subindexpost#1#2[#3]#4#5{%
\def\@tstidx@subsort{#1}%
\def\@tstidx@subterm{#2}%
- \def\@tstidx@encap{#3}%
+ \def\@tstidx@encap{#4}%
\ifx\@tstidx@sort\@empty
\let\@tstidx@entry\@tstidx@term
\else
@@ -1274,19 +1460,19 @@
\fi
\ifx\@tstidx@encap\@empty
\iftestidxshowmarks
- \tstidxtext{#4\tstidxsubmarker}%
+ \tstidxtext{#5\tstidxsubmarker}%
\else
- #4%
+ #5%
\fi
\expandafter\@tstindex\expandafter{\@tstidx@entry}%
\else
\iftestidxshowmarks
- \tstidxtext{\tstidxencaptext{#3}{#4\tstidxsubmarker}}%
+ \tstidxtext{\tstidxencaptext{#4}{#5\tstidxsubmarker}}%
\else
- #4%
+ #5%
\fi
\expandafter\toks@\expandafter{\@tstidx@entry}%
- \edef\@tstidx@entry{\the\toks@\tstidxencap#3}%
+ \edef\@tstidx@entry{\the\toks@\tstidxencap#4}%
\expandafter\@tstindex\expandafter{\@tstidx@entry}%
\fi
}
@@ -1295,10 +1481,12 @@
\def\@tstidx@term{#2}%
\@tst@subindexopenpost
}
-\newcommand*{\@tst@subindexopenpost}[4][]{%
+\newcommand*{\@tst@subindexopenpost}[2][]{%
+ \@ifnextchar[{\@tstidx@subindexopenpost{#1}{#2}}{\@tstidx@subindexopenpost{#1}{#2}[]}}%
+\def\@tstidx@subindexopenpost#1#2[#3]#4#5{%
\def\@tstidx@subsort{#1}%
\def\@tstidx@subterm{#2}%
- \def\@tstidx@encap{#3}%
+ \def\@tstidx@encap{#4}%
\ifx\@tstidx@sort\@empty
\let\@tstidx@entry\@tstidx@term
\else
@@ -1315,21 +1503,21 @@
\fi
\ifx\@tstidx@encap\@empty
\iftestidxshowmarks
- \tstidxtext{#4\tstidxopensubmarker}%
+ \tstidxtext{#5\tstidxopensubmarker}%
\else
- #4%
+ #5%
\fi
\expandafter\toks@\expandafter{\@tstidx@entry}%
\edef\@tstidx@entry{\the\toks@\tstidxencap\tstidxopenrange}%
\expandafter\@tstindex\expandafter{\@tstidx@entry}%
\else
\iftestidxshowmarks
- \tstidxtext{\tstidxencaptext{#3}{#4\tstidxopensubmarker}}%
+ \tstidxtext{\tstidxencaptext{#4}{#5\tstidxopensubmarker}}%
\else
- #4%
+ #5%
\fi
\expandafter\toks@\expandafter{\@tstidx@entry}%
- \edef\@tstidx@entry{\the\toks@\tstidxencap\tstidxopenrange#3}%
+ \edef\@tstidx@entry{\the\toks@\tstidxencap\tstidxopenrange#4}%
\expandafter\@tstindex\expandafter{\@tstidx@entry}%
\fi
}
@@ -1338,10 +1526,12 @@
\def\@tstidx@term{#2}%
\@tst@subindexclosepost
}
-\newcommand*{\@tst@subindexclosepost}[4][]{%
+\newcommand*{\@tst@subindexclosepost}[2][]{%
+ \@ifnextchar[{\@tstidx@subindexclosepost{#1}{#2}}{\@tstidx@subindexclosepost{#1}{#2}[]}}%
+\def\@tstidx@subindexclosepost#1#2[#3]#4#5{%
\def\@tstidx@subsort{#1}%
\def\@tstidx@subterm{#2}%
- \def\@tstidx@encap{#3}%
+ \def\@tstidx@encap{#4}%
\ifx\@tstidx@sort\@empty
\let\@tstidx@entry\@tstidx@term
\else
@@ -1358,21 +1548,21 @@
\fi
\ifx\@tstidx@encap\@empty
\iftestidxshowmarks
- \tstidxtext{#4\tstidxclosesubmarker}%
+ \tstidxtext{#5\tstidxclosesubmarker}%
\else
- #4%
+ #5%
\fi
\expandafter\toks@\expandafter{\@tstidx@entry}%
\edef\@tstidx@entry{\the\toks@\tstidxencap\tstidxcloserange}%
\expandafter\@tstindex\expandafter{\@tstidx@entry}%
\else
\iftestidxshowmarks
- \tstidxtext{\tstidxencaptext{#3}{#4\tstidxclosesubmarker}}%
+ \tstidxtext{\tstidxencaptext{#4}{#5\tstidxclosesubmarker}}%
\else
- #4%
+ #5%
\fi
\expandafter\toks@\expandafter{\@tstidx@entry}%
- \edef\@tstidx@entry{\the\toks@\tstidxencap\tstidxcloserange#3}%
+ \edef\@tstidx@entry{\the\toks@\tstidxencap\tstidxcloserange#4}%
\expandafter\@tstindex\expandafter{\@tstidx@entry}%
\fi
}
@@ -1381,10 +1571,12 @@
\def\@tstidx@term{#2}%
\@tst@subindexpre
}
-\newcommand*{\@tst@subindexpre}[4][]{%
+\newcommand*{\@tst@subindexpre}[2][]{%
+ \@ifnextchar[{\@tstidx@subindexpre{#1}{#2}}{\@tstidx@subindexpre{#1}{#2}[]}}%
+\def\@tstidx@subindexpre#1#2[#3]#4#5{%
\def\@tstidx@subsort{#1}%
\def\@tstidx@subterm{#2}%
- \def\@tstidx@encap{#3}%
+ \def\@tstidx@encap{#4}%
\ifx\@tstidx@sort\@empty
\let\@tstidx@entry\@tstidx@term
\else
@@ -1402,18 +1594,18 @@
\ifx\@tstidx@encap\@empty
\expandafter\@tstindex\expandafter{\@tstidx@entry}%
\iftestidxshowmarks
- \tstidxtext{#4\tstidxsubmarker}%
+ \tstidxtext{#5\tstidxsubmarker}%
\else
- #4%
+ #5%
\fi
\else
\expandafter\toks@\expandafter{\@tstidx@entry}%
- \edef\@tstidx@entry{\the\toks@\tstidxencap#3}%
+ \edef\@tstidx@entry{\the\toks@\tstidxencap#4}%
\expandafter\@tstindex\expandafter{\@tstidx@entry}%
\iftestidxshowmarks
- \tstidxtext{\tstidxencaptext{#3}{#4\tstidxsubmarker}}%
+ \tstidxtext{\tstidxencaptext{#4}{#5\tstidxsubmarker}}%
\else
- #4%
+ #5%
\fi
\fi
}
@@ -1422,10 +1614,12 @@
\def\@tstidx@term{#2}%
\@tst@subindexopenpre
}
-\newcommand*{\@tst@subindexopenpre}[4][]{%
+\newcommand*{\@tst@subindexopenpre}[2][]{%
+ \@ifnextchar[{\@tstidx@subindexopenpre{#1}{#2}}{\@tstidx@subindexopenpre{#1}{#2}[]}}%
+\def\@tstidx@subindexopenpre#1#2[#3]#4#5{%
\def\@tstidx@subsort{#1}%
\def\@tstidx@subterm{#2}%
- \def\@tstidx@encap{#3}%
+ \def\@tstidx@encap{#4}%
\ifx\@tstidx@sort\@empty
\let\@tstidx@entry\@tstidx@term
\else
@@ -1445,18 +1639,18 @@
\edef\@tstidx@entry{\the\toks@\tstidxencap\tstidxopenrange}%
\expandafter\@tstindex\expandafter{\@tstidx@entry}%
\iftestidxshowmarks
- \tstidxtext{#4\tstidxopensubmarker}%
+ \tstidxtext{#5\tstidxopensubmarker}%
\else
- #4%
+ #5%
\fi
\else
\expandafter\toks@\expandafter{\@tstidx@entry}%
- \edef\@tstidx@entry{\the\toks@\tstidxencap\tstidxopenrange#3}%
+ \edef\@tstidx@entry{\the\toks@\tstidxencap\tstidxopenrange#4}%
\expandafter\@tstindex\expandafter{\@tstidx@entry}%
\iftestidxshowmarks
- \tstidxtext{\tstidxencaptext{#3}{#4\tstidxopensubmarker}}%
+ \tstidxtext{\tstidxencaptext{#4}{#5\tstidxopensubmarker}}%
\else
- #4%
+ #5%
\fi
\fi
}
@@ -1465,10 +1659,12 @@
\def\@tstidx@term{#2}%
\@tst@subindexclosepre
}
-\newcommand*{\@tst@subindexclosepre}[4][]{%
+\newcommand*{\@tst@subindexclosepre}[2][]{%
+ \@ifnextchar[{\@tstidx@subindexclosepre{#1}{#2}}{\@tstidx@subindexclosepre{#1}{#2}[]}}%
+\def\@tstidx@subindexclosepre#1#2[#3]#4#5{%
\def\@tstidx@subsort{#1}%
\def\@tstidx@subterm{#2}%
- \def\@tstidx@encap{#3}%
+ \def\@tstidx@encap{#4}%
\ifx\@tstidx@sort\@empty
\let\@tstidx@entry\@tstidx@term
\else
@@ -1488,18 +1684,18 @@
\edef\@tstidx@entry{\the\toks@\tstidxencap\tstidxcloserange}%
\expandafter\@tstindex\expandafter{\@tstidx@entry}%
\iftestidxshowmarks
- \tstidxtext{#4\tstidxclosesubmarker}%
+ \tstidxtext{#5\tstidxclosesubmarker}%
\else
- #4%
+ #5%
\fi
\else
\expandafter\toks@\expandafter{\@tstidx@entry}%
- \edef\@tstidx@entry{\the\toks@\tstidxencap\tstidxcloserange#3}%
+ \edef\@tstidx@entry{\the\toks@\tstidxencap\tstidxcloserange#4}%
\expandafter\@tstindex\expandafter{\@tstidx@entry}%
\iftestidxshowmarks
- \tstidxtext{\tstidxencaptext{#3}{#4\tstidxclosesubmarker}}%
+ \tstidxtext{\tstidxencaptext{#4}{#5\tstidxclosesubmarker}}%
\else
- #4%
+ #5%
\fi
\fi
}
@@ -1515,7 +1711,15 @@
\fi
\@tstindexsubsee
}
-\newcommand*{\@tstindexsubsee}[4][]{%
+\newcommand*{\@tstindexsubsee}[2][]{%
+ \@ifnextchar[{\@tstidx@index@subsee{#1}{#2}}%
+ {\@tstidx@index@subsee{#1}{#2}[]}%
+}%
+\def\@tstidx@index@subsee#1#2[#3]#4{%
+ \@ifnextchar[{\@tstidx@indexsubsee{#1}{#2}{#3}{#4}}%
+ {\@tstidx@indexsubsee{#1}{#2}{#3}{#4}[]}%
+}
+\def\@tstidx@indexsubsee#1#2#3#4[#5]#6{%
\def\@tstidx@subsort{#1}%
\ifx\@tstidx@subsort\@empty
\toks@{#2}%
@@ -1528,10 +1732,11 @@
\expandafter\def\expandafter\@tstidx@entry\expandafter{\@tstidx@entry#2}%
\fi
\expandafter\toks@\expandafter{\@tstidx@entry}%
- \edef\@tstidx@entry{\the\toks@\tstidxencap#3{#4}}%
+ \edef\@tstidx@entry{\the\toks@\tstidxencap
+ \@tstidxseeencap{#4}{#6}}%
\expandafter\@tstindex\expandafter{\@tstidx@entry}%
\iftestidxshowmarks
- \tstidxsubseeref{\@tstidx@term}{#2}{#3}{#4}%
+ \tstidxsubseeref{\@tstidx@term}{#2}{#4}{#6}%
\fi
}
\newcommand*{\tstsubsubindexpost}[2][]{%
@@ -1544,10 +1749,13 @@
\def\@tstidx@subterm{#2}%
\@@tst@subsubindexpost
}
-\newcommand*{\@@tst@subsubindexpost}[4][]{%
+\newcommand*{\@@tst@subsubindexpost}[2][]{%
+ \@ifnextchar[{\@@tstidx@subsubindexpost{#1}{#2}}%
+ {\@@tstidx@subsubindexpost{#1}{#2}[]}}%
+\def\@@tstidx@subsubindexpost#1#2[#3]#4#5{%
\def\@tstidx@subsubsort{#1}%
\def\@tstidx@subsubterm{#2}%
- \def\@tstidx@encap{#3}%
+ \def\@tstidx@encap{#4}%
\ifx\@tstidx@sort\@empty
\let\@tstidx@entry\@tstidx@term
\else
@@ -1572,19 +1780,19 @@
\fi
\ifx\@tstidx@encap\@empty
\iftestidxshowmarks
- \tstidxtext{#4\tstidxsubsubmarker}%
+ \tstidxtext{#5\tstidxsubsubmarker}%
\else
- #4%
+ #5%
\fi
\expandafter\@tstindex\expandafter{\@tstidx@entry}%
\else
\iftestidxshowmarks
- \tstidxtext{\tstidxencaptext{#3}{#4\tstidxsubsubmarker}}%
+ \tstidxtext{\tstidxencaptext{#4}{#5\tstidxsubsubmarker}}%
\else
- #4%
+ #5%
\fi
\expandafter\toks@\expandafter{\@tstidx@entry}%
- \edef\@tstidx@entry{\the\toks@\tstidxencap#3}%
+ \edef\@tstidx@entry{\the\toks@\tstidxencap#4}%
\expandafter\@tstindex\expandafter{\@tstidx@entry}%
\fi
}
@@ -1598,10 +1806,15 @@
\def\@tstidx@subterm{#2}%
\@@tst@subsubindexopenpost
}
-\newcommand*{\@@tst@subsubindexopenpost}[4][]{%
+\newcommand*{\@@tst@subsubindexopenpost}[2][]{%
+ \@ifnextchar[{\@@tstidx@subsubindexopenpost{#1}{#2}}%
+ {\@@tstidx@subsubindexopenpost{#1}{#2}[]}%
+}%
+
+\def\@@tstidx@subsubindexopenpost#1#2[#3]#4#5{%
\def\@tstidx@subsubsort{#1}%
\def\@tstidx@subsubterm{#2}%
- \def\@tstidx@encap{#3}%
+ \def\@tstidx@encap{#4}%
\ifx\@tstidx@sort\@empty
\let\@tstidx@entry\@tstidx@term
\else
@@ -1626,21 +1839,21 @@
\fi
\ifx\@tstidx@encap\@empty
\iftestidxshowmarks
- \tstidxtext{#4\tstidxopensubmarker}%
+ \tstidxtext{#5\tstidxopensubmarker}%
\else
- #4%
+ #5%
\fi
\expandafter\toks@\expandafter{\@tstidx@entry}%
\edef\@tstidx@entry{\the\toks@\tstidxencap\tstidxopenrange}%
\expandafter\@tstindex\expandafter{\@tstidx@entry}%
\else
\iftestidxshowmarks
- \tstidxtext{\tstidxencaptext{#3}{#4\tstidxopensubmarker}}%
+ \tstidxtext{\tstidxencaptext{#4}{#5\tstidxopensubmarker}}%
\else
- #4%
+ #5%
\fi
\expandafter\toks@\expandafter{\@tstidx@entry}%
- \edef\@tstidx@entry{\the\toks@\tstidxencap\tstidxopenrange#3}%
+ \edef\@tstidx@entry{\the\toks@\tstidxencap\tstidxopenrange#4}%
\expandafter\@tstindex\expandafter{\@tstidx@entry}%
\fi
}
@@ -1654,10 +1867,15 @@
\def\@tstidx@subterm{#2}%
\@@tst@subsubindexclosepost
}
-\newcommand*{\@@tst@subsubindexclosepost}[4][]{%
+\newcommand*{\@@tst@subsubindexclosepost}[2][]{%
+ \@ifnextchar[{\@@tstidx@subsubindexclosepost{#1}{#2}}%
+ {\@@tstidx@subsubindexclosepost{#1}{#2}[]}%
+}%
+
+\def\@@tstidx@subsubindexclosepost#1#2[#3]#4#5{%
\def\@tstidx@subsubsort{#1}%
\def\@tstidx@subsubterm{#2}%
- \def\@tstidx@encap{#3}%
+ \def\@tstidx@encap{#4}%
\ifx\@tstidx@sort\@empty
\let\@tstidx@entry\@tstidx@term
\else
@@ -1682,21 +1900,21 @@
\fi
\ifx\@tstidx@encap\@empty
\iftestidxshowmarks
- \tstidxtext{#4\tstidxclosesubmarker}%
+ \tstidxtext{#5\tstidxclosesubmarker}%
\else
- #4%
+ #5%
\fi
\expandafter\toks@\expandafter{\@tstidx@entry}%
\edef\@tstidx@entry{\the\toks@\tstidxencap\tstidxcloserange}%
\expandafter\@tstindex\expandafter{\@tstidx@entry}%
\else
\iftestidxshowmarks
- \tstidxtext{\tstidxencaptext{#3}{#4\tstidxclosesubmarker}}%
+ \tstidxtext{\tstidxencaptext{#4}{#5\tstidxclosesubmarker}}%
\else
- #4%
+ #5%
\fi
\expandafter\toks@\expandafter{\@tstidx@entry}%
- \edef\@tstidx@entry{\the\toks@\tstidxencap\tstidxcloserange#3}%
+ \edef\@tstidx@entry{\the\toks@\tstidxencap\tstidxcloserange#4}%
\expandafter\@tstindex\expandafter{\@tstidx@entry}%
\fi
}
@@ -1710,10 +1928,15 @@
\def\@tstidx@subterm{#2}%
\@@tst@subsubindexpre
}
-\newcommand*{\@@tst@subsubindexpre}[4][]{%
+\newcommand*{\@@tst@subsubindexpre}[2][]{%
+ \@ifnextchar[{\@@tstidx@subsubindexpre{#1}{#2}}%
+ {\@@tstidx@subsubindexpre{#1}{#2}[]}%
+}%
+
+\def\@@tstidx@subsubindexpre#1#2[#3]#4#5{%
\def\@tstidx@subsubsort{#1}%
\def\@tstidx@subsubterm{#2}%
- \def\@tstidx@encap{#3}%
+ \def\@tstidx@encap{#4}%
\ifx\@tstidx@sort\@empty
\let\@tstidx@entry\@tstidx@term
\else
@@ -1739,18 +1962,18 @@
\ifx\@tstidx@encap\@empty
\expandafter\@tstindex\expandafter{\@tstidx@entry}%
\iftestidxshowmarks
- \tstidxtext{#4\tstidxsubsubmarker}%
+ \tstidxtext{#5\tstidxsubsubmarker}%
\else
- #4%
+ #5%
\fi
\else
\expandafter\toks@\expandafter{\@tstidx@entry}%
- \edef\@tstidx@entry{\the\toks@\tstidxencap#3}%
+ \edef\@tstidx@entry{\the\toks@\tstidxencap#4}%
\expandafter\@tstindex\expandafter{\@tstidx@entry}%
\iftestidxshowmarks
- \tstidxtext{\tstidxencaptext{#3}{#4\tstidxsubsubmarker}}%
+ \tstidxtext{\tstidxencaptext{#4}{#5\tstidxsubsubmarker}}%
\else
- #4%
+ #5%
\fi
\fi
}
@@ -1764,10 +1987,14 @@
\def\@tstidx@subterm{#2}%
\@@tst@subsubindexopenpre
}
-\newcommand*{\@@tst@subsubindexopenpre}[4][]{%
+\newcommand*{\@@tst@subsubindexopenpre}[2][]{%
+ \@ifnextchar[{\@@tstidx@subsubindexopenpre{#1}{#2}}%
+ {\@@tstidx@subsubindexopenpre{#1}{#2}[]}%
+}%
+\def\@@tstidx@subsubindexopenpre#1#2[#3]#4#5{%
\def\@tstidx@subsubsort{#1}%
\def\@tstidx@subsubterm{#2}%
- \def\@tstidx@encap{#3}%
+ \def\@tstidx@encap{#4}%
\ifx\@tstidx@sort\@empty
\let\@tstidx@entry\@tstidx@term
\else
@@ -1795,18 +2022,18 @@
\edef\@tstidx@entry{\the\toks@\tstidxencap\tstidxopenrange}%
\expandafter\@tstindex\expandafter{\@tstidx@entry}%
\iftestidxshowmarks
- \tstidxtext{#4\tstidxopensubmarker}%
+ \tstidxtext{#5\tstidxopensubmarker}%
\else
- #4%
+ #5%
\fi
\else
\expandafter\toks@\expandafter{\@tstidx@entry}%
- \edef\@tstidx@entry{\the\toks@\tstidxencap\tstidxopenrange#3}%
+ \edef\@tstidx@entry{\the\toks@\tstidxencap\tstidxopenrange#4}%
\expandafter\@tstindex\expandafter{\@tstidx@entry}%
\iftestidxshowmarks
- \tstidxtext{\tstidxencaptext{#3}{#4\tstidxopensubmarker}}%
+ \tstidxtext{\tstidxencaptext{#4}{#5\tstidxopensubmarker}}%
\else
- #4%
+ #5%
\fi
\fi
}
@@ -1820,10 +2047,15 @@
\def\@tstidx@subterm{#2}%
\@@tst@subsubindexclosepre
}
-\newcommand*{\@@tst@subsubindexclosepre}[4][]{%
+\newcommand*{\@@tst@subsubindexclosepre}[2][]{%
+ \@ifnextchar[{\@@tstidx@subsubindexclosepre{#1}{#2}}%
+ {\@@tstidx@subsubindexclosepre{#1}{#2}[]}%
+}%
+
+\def\@@tstidx@subsubindexclosepre#1#2[#3]#4#5{%
\def\@tstidx@subsubsort{#1}%
\def\@tstidx@subsubterm{#2}%
- \def\@tstidx@encap{#3}%
+ \def\@tstidx@encap{#4}%
\ifx\@tstidx@sort\@empty
\let\@tstidx@entry\@tstidx@term
\else
@@ -1851,18 +2083,18 @@
\edef\@tstidx@entry{\the\toks@\tstidxencap\tstidxcloserange}%
\expandafter\@tstindex\expandafter{\@tstidx@entry}%
\iftestidxshowmarks
- \tstidxtext{#4\tstidxclosesubmarker}%
+ \tstidxtext{#5\tstidxclosesubmarker}%
\else
- #4%
+ #5%
\fi
\else
\expandafter\toks@\expandafter{\@tstidx@entry}%
- \edef\@tstidx@entry{\the\toks@\tstidxencap\tstidxcloserange#3}%
+ \edef\@tstidx@entry{\the\toks@\tstidxencap\tstidxcloserange#4}%
\expandafter\@tstindex\expandafter{\@tstidx@entry}%
\iftestidxshowmarks
- \tstidxtext{\tstidxencaptext{#3}{#4\tstidxclosesubmarker}}%
+ \tstidxtext{\tstidxencaptext{#4}{#5\tstidxclosesubmarker}}%
\else
- #4%
+ #5%
\fi
\fi
}
@@ -1998,10 +2230,10 @@
\tstidxword{index} that is at least three pages long to allow you
to test the page headers and footers in a two-sided document.
You can hide the visual effects with the
- \tstidxstyopt{testidx}{hidemarks} package option.
+ \tstidxstyopt{testidx}{hidemarks} package option.%
\iftestidxshowmarks
\else
- (It seems you already have this option set.
+ \space (It seems you already have this option set.
Remove it or use \tstidxstyopt{testidx}{showmarks} to show them
again.)%
\fi
@@ -2090,7 +2322,14 @@
using the \tstidxword{marker} \tstidxindexmarker{tstidxseemarker}
and the cross-referenced information is displayed as
a \tstidxphrase{marginal note} by default, with the term being indexed
- followed by the \tstidxword{cross-reference}. A sub-level
+ followed by the \tstidxword{cross-reference}.
+ For example,
+ \tstidxword{lyuk}\tstindexsee{lyuk}{seealso}{digraph} has
+ the marker \tstidxmarker\ to show that the word \tstidxqt{lyuk} was
+ indexed followed by the marker \tstidxseemarker\ to show that
+ a cross-reference to \tstidxword{digraph} has also been indexed
+ (with the details shown in the margin).
+ A sub-level
\tstidxword{cross-reference} is identified with the \tstidxword{marker}
\tstidxindexmarker{tstidxsubseemarker} and the marginal note
displays the main term followed by the sub-term (separated by the
@@ -2136,7 +2375,7 @@
\tstidxnewblock
{%
Now that the preliminaries have been dispensed with in the previous
- \tstidxword{paragraph}s, we can get on
+ \tstidxwordpl{paragraph}, we can get on
to some serious
\if@tstidx@use@encaps
\tstidxword[tstidxencapii]{waffle}
@@ -2181,6 +2420,8 @@
\tstidxphrase{keep mum}\tstindexsee{keep mum}{seealso}{confidential}
and don't \tstidxword{grass} on me because that just won't be fair,
and it might \tstidxword{distress} them to a certain extent.
+ I shall not be \tstidxword{assailed} by indecision and will
+ \tstidxword{aspire} to find the \tstidxphrase{mot juste}.
Where was I? Oh, yes, \tstidxword{padding}. I'm trying to make this
\tstidxword{paragraph} quite long, not because I have any pretensions of being
the next \tstidxperson{James}{Joyce} and competing with
@@ -2222,7 +2463,8 @@
has spanned a \tstidxphrase{page break}, you might want to check the terms
indexed here to make sure they have the correct page numbers listed.
Something else that you might want to check, while you're at it, is
- what's happened to the \tstidxword{location list} for the word
+ what's happened to the \tstindexsee{location list}{seealso}{cross-reference}%
+ \tstidxword{location list} for the word
\if@tstidx@use@encaps
\tstidxqt{\tstidxword[tstidxencapii]{paragraph}},
\else
@@ -2307,80 +2549,125 @@ xindy -L english -C utf8 -M \jobname.xdy -M texindy -t \jobname.ilg
\tstindexsee{range separator}{see}{location list}
in your \texttt{.xdy} file. For example:
\begin{flushleft}\ttfamily
-(markup-locref-list :sep \string",\string")\par
+(markup-locref-list :sep \string", \string")\par
(markup-range :sep \string"\string-\string-\string")
\end{flushleft}
Check out the difference between using \tstidxapp{xindy} and
- \tstidxapp{makeindex} on this document.%
+ \tstidxapp{makeindex} on this document.
+ On the subject of location lists, the word
+ \tstidxword{passim} (meaning \tstidxqt{here and there}) is
+ sometimes used to tidy up ragged lists. For example,
+ the locations \tstidxqt{1, 3, 4, 6, 7} may look neater as
+ \tstidxqt{1-7 passim}, which indicates references are scattered (here
+ and there) throughout that range.%
}
\tstidxnewblock
{%
- We, the \tstidxutfword{\'elite}{élite} who discovered the
- \tstidxutfword{\ae sthetic}{æsthetic}
+ Computer algorithms can sometimes have difficulties with
+ \tstidxword{localisation}. They can be tripped up by
+ \tstidxphrase{input encoding} issues and \tstidxwordpl{digraph}
+ (such as the Welsh \tstidxgphword{ll}{ll}{ỻ} digraph in
+ \tstidxgphword{llan}{llan}{ỻan},
+ the Dutch \tstidxgphword{ij}{ij}{ij} digraph in
+ \tstidxgphword{lijnbus}{lijnbus}{lijnbus} and
+ \tstidxgphword{ijsvrij}{ijsvrij}{ijsvrij}, and the
+ \tstidxgphword{dz}{dz}{dz} digraph in the Hungarian
+ \tstidxgphword{dz\'eta}[dzeta]{dzéta}{dzéta} and Polish
+ \tstidxgphword{dzwon}{dzwon}{dzwon})
+ or \tstidxwordpl{trigraph} (such as the Hungarian \tstidxword{dzs}
+ trigraph in \tstidxutfword{dzs\'oker}[dzsoker]{dzsóker}
+ and \tstidxword{dzsungel}\tstindexsee{dzsungel}{seealso}{trigraph}),
+ so this \tstidxword{paragraph} is designed to provide some examples for
+ testing various Latin alphabets. If you enable both UTF-8 (either
+ with \tstidxsty{inputenc} or using XeLaTeX\slash LuaLaTeX) and
+ the \tstidxstyopt{testidx}{digraphs} option, then the examples above
+ will use the \tstidxqt{ll}, \tstidxqt{ij} and \tstidxqt{dz}
+ \tstidxwordpl{glyph} (\emph{if supported}) for the \tstidxwordpl{digraph}
+ (but not for \tstidxqt{dzs}, which is a
+ \tstidxword{trigraph}). Remember that you'll also need a font that
+ supports those glyphs.
+ \iftestidxdiglyphs
+ (If characters are missing from the above words, then they're not supported.)
+ \fi
+ Other digraphs include the Welsh \tstidxword{dd}, \tstidxword{ff},
+ and \tstidxword{ng}, the Hungarian \tstidxword{ly} (in \tstidxword{lyuk}
+ mentioned earlier) and the Polish \tstidxword{cz}, but these
+ don't use glyphs in the sort value.
+ Now for some more \tstidxword{nonsense} text to pad the index.
+ We, the \tstidxutfword{\'elite}[elite]{élite} who discovered the
+ \tstidxutfword{\ae sthetic}[aesthetic]{æsthetic}
delights of \tstidxsym{TeX}{\TeX}, must not become
- \tstidxutfword{blas\'e}{blasé} about being the
- \tstidxutfword{prot\'eg\'e}{protégé}
+ \tstidxutfword{blas\'e}[blase]{blasé} about being the
+ \tstidxutfword{prot\'eg\'e}[protege]{protégé}
of the great \tstidxperson{Donald}{Knuth}.
It may stagger the
- \tstidxutfword{client\`ele}{clientèle} of
+ \tstidxutfword{client\`ele}[clientele]{clientèle} of
\if@tstidx@use@encaps
\tstidxartphrase[tstidxencapii]{the}{commercial world}
\else
\tstidxartphrase{the}{commercial world}
\fi
to discover our
- \tstidxutfword{r\'esum\'e}{résumé}
+ \tstidxutfword{r\'esum\'e}[resumee]{résumé}
(after foraging for it in our natty
- \tstidxutfphrase{attach\'e case}{attaché case})
+ \tstidxutfphrase{attach\'e case}[attachecase]{attaché case})
while we sample a \tstidxword{vol-au-vent} or \tstidxword{two}
- at the \tstidxutfword{soir\'ee}{soirée}
- in the \tstidxutfphrase{pied-\`a-terre}{pied-à-terre}
- with the delightful \tstidxutfword{ph\oe nix}{phœnix}-%
- themed \tstidxutfword{d\'ecor}{décor} and
- \tstidxutfword{f\ae rie}{færie}
- \tstidxutfword{fa\c{c}ade}{façade}
+ at the \tstidxutfword{soir\'ee}[soiree]{soirée}
+ in the \tstidxutfphrase{pied-\`a-terre}[piedaterre]{pied-à-terre}
+ with the delightful \tstidxutfword{ph\oe nix}[phoenix]{phœnix}-%
+ themed \tstidxutfword{d\'ecor}[decor]{décor}, \tstidxword{daft}
+ \tstidxword{oak} \tstidxphrase{dado rail} and
+ \tstidxutfword{f\ae rie}[faerie]{færie}
+ \tstidxutfword{fa\c{c}ade}[facade]{façade}
that has stunned
- many an \tstidxutfword{\ae thereal}{æthereal}
- \tstidxutfword{d\'ebutante}{débutante}
- sporting a \tstidxutfphrase{berg\`ere hat}{bergère hat},
- but it would be \tstidxutfword{na\"ive}{naïve}
- to fall for such a \tstidxutfword{f\oe tid}{fœtid}
- \tstidxutfword{clich\'e}{cliché}.
+ many an \tstidxutfword{\ae thereal}[aethereal]{æthereal}
+ \tstidxutfword{d\'ebutante}[debutante]{débutante}
+ sporting a \tstidxutfphrase{berg\`ere hat}[bergerehat]{bergère hat},
+ but it would be \tstidxutfword{na\"ive}[naive]{naïve}
+ to fall for such a \tstidxutfword{f\oe tid}[foetid]{fœtid}
+ \tstidxutfword{clich\'e}[cliche]{cliché}.
This \tstidxword{paragraph} is in a state of
- \tstidxutfword{d\'eshabill\'e}{déshabillé}.
+ \tstidxutfword{d\'eshabill\'e}[deshabille]{déshabillé}.
Like a \tstidxword{sculpture} of \tstidxword{Venus} in a
- \tstidxutfword{n\'eglig\'ee}{négligée}, it's transparently
+ \tstidxutfword{n\'eglig\'ee}[negligee]{négligée}, it's transparently
obvious that this \tstidxword{paragraph} is provided for the sole purpose of
\tstidxword{ogling}\tstindexsee{gawping}{see}{ogling}
\tstidxphrase{extended Latin characters} and testing
how \tstidxapp{xindy} and \tstidxapp{makeindex} compare.
- Time for a quick trip to the \tstidxutfword{caf\'e}{café}
- for an \tstidxutfword{an\ae mic}{anæmic}
- \tstidxphrase{cup of tea} with
- \tstidxutfperson{Anders Jonas}{\AA ngstr\"om}%
- {Anders Jonas}{Ångström} and then off to find a \tstidxword{zoo}
- in \tstidxutfplace{\"Osterg\"otland}{Östergötland},
- so we can get to the end of the \tstidxword{alphabet}. Perhaps
+ Time for a quick trip to the \tstidxutfword{caf\'e}[cafe]{café}
+ for an \tstidxutfword{an\ae mic}[anaemic]{anæmic}
+ \tstidxphrase{cup of tea} (to \tstidxword{recover} from our travels) with
+ \tstidxutfperson{Anders Jonas}{\AA ngstr\"om}[AndersJonasAngstrom]%
+ {Anders Jonas}{Ångström} (but don't let it scald your
+ \tstidxutfword{\oe sophagus}[oesophagus]{œsophagus})
+ and then off to find a \tstidxword{zoo}
+ in \tstidxutfplace{\"Osterg\"otland}[Ostergotland]{Östergötland},
+ so we can get to the end of the \tstidxword{alphabet}. (We may even
+ see an adventurous \tstidxword{aardvark} or
+ a lucky \tstidxgphword{llama}{llama}{ỻama} or a
+ \tstidxword{rhinoceros} eating \tstidxword{rhubarb}.) Perhaps
then we should go over to
- \tstidxutfplace{\"Angelholm}{Ängelholm}
+ \tstidxutfplace{\"Angelholm}[Angelholm]{Ängelholm}
and head off across the
- \tstidxutfplace{\O resund}{Øresund} bridge and
+ \tstidxutfplace{\O resund}[Oresund]{Øresund} bridge and
\tstidxword{resume} our search for some more examples.
We'll go on a \tstidxphrase{whistle-stop tour} around
- \tstidxutfplace{T\r{a}rnby}{Tårnby},
- \tstidxutfplace{R\o dovre}{Rødovre},
- \tstidxutfplace{N\ae stved}{Næstved} and
- \tstidxutfplace{\O lstykke-Stenl\o se}{Ølstykke-Stenløse}.
+ \tstidxutfplace{T\r{a}rnby}[Tarnby]{Tårnby},
+ \tstidxutfplace{R\o dovre}[Rodovre]{Rødovre},
+ \tstidxutfplace{N\ae stved}[Naestved]{Næstved} and
+ \tstidxutfplace{\O lstykke-Stenl\o se}[OlstykkeStenlose]{Ølstykke-Stenløse}.
Afterwards, we'll \tstidxword{fly} to
\tstidxplace{Poland} (possibly in an \tstidxword{aeroplane}\tstidxdash
if passengers would like to look out of their \tstidxword{window}, they'll
see we're passing over
- \tstidxutfplace{A\ss lar}{Aßlar} and
- \tstidxutfplace{Bad Gottleuba-Berggie\ss h\"ubel}{Bad Gottleuba-Berggießhübel})
- and then we'll visit \tstidxutfplace{\L\'od\'z}{Łódź},
+ \tstidxutfplace{A\ss lar}[Asslar]{Aßlar} and
+ \tstidxutfplace{Bad Gottleuba-Berggie\ss h\"ubel}[BadGottleubaBerggiesshubel]{Bad Gottleuba-Berggießhübel})
+ and then we'll say
+\tstidxqt{\tstidxutfword{cze\'s\'c}[czesc]{cześć}} to
+\tstidxutfplace{\L\'od\'z}[Lodz]{Łódź}, and visit
\@tstidx@if@notOT@ne
{%
- \tstidxutfplace{\'Swi\k{e}tokrzyskie}{Świętokrzyskie}%
+ \tstidxutfplace{\'Swi\k{e}tokrzyskie}[Swietokrzyskie]{Świętokrzyskie}%
\ifxetex
\else
\ifluatex
@@ -2389,7 +2676,8 @@ xindy -L english -C utf8 -M \jobname.xdy -M texindy -t \jobname.ilg
because of the \tstidxword{ogonek} and
will be omitted if you use the default
\tstidxsubword{font encoding}{OT1}
- encoding, but not if you use the \tstidxsty{fontenc} package with,
+ encoding, but not if you use the \tstidxsty{fontenc}
+ package\tstindexstysee{fontenc}{seealso}{inputenc} with,
for example, the \tstidxstyopt{fontenc}{T1} option)%
\fi
\fi,
@@ -2397,31 +2685,35 @@ xindy -L english -C utf8 -M \jobname.xdy -M texindy -t \jobname.ilg
{%
[a place with an \tstidxword{ogonek} has been omitted because this document
is using the default \tstidxsubword{font encoding}{OT1} font
- encoding\tstidxdash try loading \tstidxsty{fontenc} with the
+ encoding\tstidxdash try loading the \tstidxsty{fontenc}
+ package\tstindexstysee{fontenc}{seealso}{inputenc} with the
\tstidxstyopt{fontenc}{T1} option],
}%
- \tstidxutfplace{\.Zory}{Żory},
- \tstidxutfplace{\.Zelech\'ow}{Żelechów},
- \tstidxutfplace{\L obez}{Łobez},
- \tstidxutfplace{G\l og\'ow}{Głogów}
+ \tstidxutfplace{\.Zory}[Zory]{Żory},
+ \tstidxutfplace{\.Zelech\'ow}[Zelechow]{Żelechów},
+ \tstidxutfplace{\L obez}[Lobez]{Łobez},
+ \tstidxutfplace{G\l og\'ow}[Glogow]{Głogów}
(not to be confused with \tstidxplace{Glasgow}),
- \tstidxutfplace{\'Cmiel\'ow}{Ćmielów},
- \tstidxutfplace{\'Scinawa}{Ścinawa}
+ \tstidxutfplace{\'Cmiel\'ow}[Cmielow]{Ćmielów},
+ \tstidxutfplace{\'Scinawa}[Scinawa]{Ścinawa}
and
- \tstidxutfplace{\'Swidnica}{Świdnica}.
+ \tstidxutfplace{\'Swidnica}[Swidnica]{Świdnica}.
Then let's \tstidxword{sail} to \tstidxplace{Iceland} (possibly in
a \tstidxword{ship}) and visit the lakes of
\tstidxplace{Iceland}, such as
- \tstidxutfplace{\"Olvesvatn}{Ölvesvatn},
- \tstidxutfplace{\'Ulfsvatn}{Úlfsvatn},
- \tstidxutfplace{\'Anavatn}{Ánavatn},
- \tstidxutfplace{M\'asvatn}{Másvatn},
+ \tstidxutfplace{\"Olvesvatn}[Olvesvatn]{Ölvesvatn},
+ \tstidxutfplace{\'Ulfsvatn}[Ulfsvatn]{Úlfsvatn},
+ \tstidxutfplace{\'Anavatn}[Anavatn]{Ánavatn},
+ \tstidxutfplace{M\'asvatn}[Masvatn]{Másvatn},
\@tstidx@if@notOT@ne
{%
- \tstidxutfplace{\th r\'hyrningsvatn}{Þríhyrningsvatn}
- (that one starts with a \tstidxutfword{thorn (\th)}{thorn (Þ)}),
- \tstidxutfplace{Sigr\'i\dh arsta\dh avatn}{Sigríðarstaðavatn}
- (that one has an \tstidxutfword{eth \dh}{eth ð}%
+ \tstidxutfplace{\TH r\'{\i}hyrningsvatn}[Thrihyrningsvatn]{Þríhyrningsvatn}
+ (that one starts with a
+ \tstidxutfword{thorn (\th)}[thorn]{thorn (þ)}%
+ \tstindexutfsee{\th}{þ}[thornletter]{see}[thorn]{thorn (\th)}{thorn (þ)}),
+ \tstidxutfplace{Sigr\'{\i}\dh arsta\dh avatn}[Sigridharstadhavatn]{Sigríðarstaðavatn}
+ (that one has an \tstidxutfword{eth (\dh)}[eth]{eth (ð)}%
+ \tstindexutfsee{\dh}{ð}[ethletter]{see}[eth]{eth (\dh)}{eth (ð)}%
\ifxetex
)%
\else
@@ -2439,10 +2731,10 @@ xindy -L english -C utf8 -M \jobname.xdy -M texindy -t \jobname.ilg
default \tstidxword{OT1} \tstidxword{font encoding}\tstidxdash try loading
\tstidxsty{fontenc} with the \tstidxstyopt{fontenc}{T1} option],
}%
- \tstidxutfplace{Gr\ae navatn}{Grænavatn},
- \tstidxutfplace{\'Arnesl\'on}{Árneslón}
+ \tstidxutfplace{Gr\ae navatn}[Graenavatn]{Grænavatn},
+ \tstidxutfplace{\'Arnesl\'on}[Arneslon]{Árneslón}
and
- \tstidxutfplace{\'Ish\'olsvatn}{Íshólsvatn}.
+ \tstidxutfplace{\'Ish\'olsvatn}[Isholsvatn]{Íshólsvatn}.
If you are using this with \tstidxapp{xindy} and
\tstidxword{UTF-8}, try this out with a different language option,
for example \tstidxappopt{xindy}{-L swedish} or
@@ -2467,32 +2759,45 @@ xindy -L english -C utf8 -M \jobname.xdy -M texindy -t \jobname.ilg
\else
\ifluatex
\else
- \space You currently have the
- \@tstidx@ifsanitize
- {\tstidxstyopt{testidx}{sanitize} option on.
- This means that the words containing \tstidxword{UTF-8} characters will
- first be sanitized before being passed to \tstidxcs{tstindex}, which
- will allow you to test how well the \tstidxphrase{indexing application}
- sorts \tstidxword{UTF-8} characters. If you'd rather test how
- \tstidxcs{index} writes these characters to the file read by the
- indexing application, use the \tstidxstyopt{testidx}{nosanitize}
- option instead. This may cause the \tstidxword{UTF-8} characters to be
- written in terms of \tstidxcs{IeC}.%
- }%
- {\tstidxstyopt{testidx}{nosanitize} option on.
- This means that the words containing \tstidxword{UTF-8} characters
- may be written to the file processed by the
- \tstidxphrase{indexing application} in terms of
- \tstidxcs{IeC}. This allows you to test how \tstidxcs{index} behaves.
- If you'd rather test how the indexing application sorts
- \tstidxword{UTF-8} characters, use the \tstidxstyopt{testidx}{sanitize}
- option instead, which will sanitize the \tstidxword{UTF-8} characters
- before passing them to \tstidxcs{tstindex}.%
- }
+ \@tidx@sanitizenote
\fi
\fi
}%
- {}%
+ { No UTF-8 support has been detected for this document.\@tidx@stripaccentsnote}%
+}
+\newcommand{\@tidx@sanitizenote}{%
+ \space You currently have the
+ \@tstidx@ifsanitize
+ {\tstidxstyopt{testidx}{sanitize} option on.
+ This means that the words containing \tstidxword{UTF-8} characters will
+ first be sanitized before being passed to \tstidxcs{tstindex}, which
+ will allow you to test how well the \tstidxphrase{indexing application}
+ sorts \tstidxword{UTF-8} characters. If you'd rather test how
+ \tstidxcs{index} writes these characters to the file read by the
+ indexing application, use the \tstidxstyopt{testidx}{nosanitize}
+ option instead. This may cause the \tstidxword{UTF-8} characters to be
+ written in terms of \tstidxcs{IeC}.%
+ }%
+ {\tstidxstyopt{testidx}{nosanitize} option on.
+ This means that the words containing \tstidxword{UTF-8} characters
+ may be written to the file processed by the
+ \tstidxphrase{indexing application} in terms of
+ \tstidxcs{IeC}. This allows you to test how \tstidxcs{index} behaves.
+ If you'd rather test how the indexing application sorts
+ \tstidxword{UTF-8} characters, use the \tstidxstyopt{testidx}{sanitize}
+ option instead, which will sanitize the \tstidxword{UTF-8} characters
+ before passing them to \tstidxcs{tstindex}.%
+ }%
+}
+\newcommand{\@tidx@stripaccentsnote}{%
+ \space The \tstidxstyopt{testidx}{stripaccents} package option will
+ effectively do, for example,
+ \texttt{\string\index\char`\{elite@\string\'elite\char`\}}
+ whereas the
+ \tstidxstyopt{testidx}{nostripaccents} package option will
+ effectively do, for example,
+ \texttt{\string\index\char`\{\string\'elite\char`\}}.
+ These options have no effect in UTF-8 mode.%
}
\tstidxnewblock
{%
@@ -2507,16 +2812,7 @@ xindy -L english -C utf8 -M \jobname.xdy -M texindy -t \jobname.ilg
\tstidxword{even} \tstidxword{prime number}). A \tstidxword{century} in
\tstidxword{cricket} means \tstidxnumber{100} runs, and in the
\tstidxword{calendar} \tstidxnumber{100} years.
- If you're using \tstidxapp{xindy}, you can provide a numbers group
- by adding the following to your \texttt{.xdy} module:
-\begin{flushleft}\ttfamily
-(define-letter-group \string"Numbers\string"\par
- \string:prefixes (\string"0\string" \string"1\string" \string"2\string"
-\string"3\string" \string"4\string" \string"5\string"
-\string"6\string" \string"7\string" \string"8\string"
-\string"9\string")\par
- \string:before \string"A\string")
-\end{flushleft}
+ \@tidx@numberlettergroup
Whilst we're on the subject of numbers, let's try out some
equations.
\begin{equation}
@@ -2527,12 +2823,15 @@ xindy -L english -C utf8 -M \jobname.xdy -M texindy -t \jobname.ilg
Since this document is using \tstidxsty{amsmath}, let's try out
the \tstidxenv{align} environment:
\begin{align}
-\tstidxmath{f(x)}{f(\protect\vec{x})} &=
+\tstidxmath{f(x)}[fx]{f(\protect\vec{x})} &=
\tstidxmathsym{alpha}{\protect\alpha}
\tstidxmathsym{sum}{\protect\sum}_i^{\tstidxmath{n}{n}} x_i
+\tstidxmathsym{beta}{\protect\beta} \sum_{i}^n x_i^2
-+\tstidxmathsym{gamma}{\protect\gamma}
++\tstidxmathsym{gamma}{\protect\gamma}\\
+ \frac{\tstidxmathsym{partial}{\protect\partial}f}{\partial x_j} &=
+ \alpha + 2\beta x_j
\end{align}
+ \@tidx@scriptnote
If this document hadn't loaded the \tstidxsty{amsmath} package,
we would have had to use the \tstidxenv{eqnarray} environment
instead.
@@ -2545,26 +2844,74 @@ let's try out the \tstidxenv{eqnarray} environment:
\tstidxmathsym{alpha}{\protect\alpha}
\tstidxmathsym{sum}{\protect\sum}_i^{\tstidxmath{n}{n}} x_i
+\tstidxmathsym{beta}{\protect\beta} \sum_{i}^n x_i^2
-+\tstidxmathsym{gamma}{\protect\gamma}
++\tstidxmathsym{gamma}{\protect\gamma}\\
+ \frac{\tstidxmathsym{partial}{\protect\partial}f}{\partial x_j} &=&
+ \alpha + 2\beta x_j
\end{eqnarray}
+ \@tidx@scriptnote
If you load the \tstidxsty{amsmath} package, we'll test the
\tstidxenv{align} environment instead.
}%
+ Incidentally, that's just a regular partial derivative symbol
+ $\tstidxmathsym{partial}{\protect\partial}$. Not to be confused
+ with the spin-weighted partial derivative
+ \@tstidx@ifamssymb{$\tstidxmathsym{eth}[spinderiv]{\protect\eth}$,
+ which can be displayed here as this document has loaded the
+ \tstidxsty{amssymb} package}
+ {[you need the \tstidxsty{amssymb} package for that symbol]}.
+ \@tidx@mathslettergroup
+ \iftestidxprefix
+ I've done something similar with the \tstidxwordpl{marker} where I've used
+ \texttt{\tstidxindexmarkerprefix} as the \tstidxword{prefix}.%
+ \else
+ With the prefixes on I can also do something similar with the
+ \tstidxwordpl{marker} where I'll use
+ \texttt{\tstidxindexmarkerprefix} as the \tstidxword{prefix}.%
+ \fi
+}
+\newcommand{\@tidx@scriptnote}{%
+ (Note how the subscripts and superscripts can be affected
+ by material inserted between the symbol and the sub- and
+ superscripts.)
+}
+\newcommand*{\@tidx@numberlettergroup}{%
+ If you're using \tstidxapp{xindy}, you can provide a numbers group
+ by adding the following to your \texttt{.xdy} module:
+\begin{flushleft}\ttfamily
+(define-letter-group \string"Numbers\string"\par
+ \string:prefixes (\string"0\string" \string"1\string" \string"2\string"
+\string"3\string" \string"4\string" \string"5\string"
+\string"6\string" \string"7\string" \string"8\string"
+\string"9\string")\par
+ \string:before \string"A\string")
+\end{flushleft}
+}
+\newcommand*{\@tidx@mathslettergroup}{%
+ \iftestidxprefix
Now I've been a bit fancy here and inserted
\texttt{\tstidxmathsymprefix} in front of
the sort key so I can get \tstidxapp{xindy} to create a special
-group for the maths symbols. Here's the code you can add to your
-\texttt{.xdy} file to implement it:
+ group for the maths symbols. Here's
+ \else
+ This document has used the \tstidxstyopt{testidx}{noprefix}
+ package option, which has switched of the sort prefixes.
+ If you use the \tstidxstyopt{testidx}{prefix} option I can be a
+ bit fancy here and insert
+ \texttt{\tstidxmathsymprefix} in front of
+ the sort key so I can get \tstidxapp{xindy} to create a special
+ group for the maths symbols. When you switch on the prefixes here's
+ \fi
+the code you can add to your \texttt{.xdy} file to implement it:
\begin{flushleft}\ttfamily
(define-letter-group \string"Maths\string"
\string:prefixes (\string"\tstidxmathsymprefix\string")
\string:before \string"Numbers\string")
\end{flushleft}
- I've done something similar with the \tstidxword{marker}s where I've used
- \texttt{\tstidxindexmarkerprefix} as the \tstidxword{prefix}.%
}
\tstidxnewblock*{\@tidx@closerangepar}%
{%
+ Let's \tstidxutfword{re-cover}[reecover]{re-cover} old ground and
+ talk about ranges again.
This is the end of the \tstidxcloseword{range}
\tstidxword{example} from \tstidxword{block}~\@tidx@openrangepar.
There's not much else to say about this \tstidxword{block} really.
@@ -2581,7 +2928,8 @@ group for the maths symbols. Here's the code you can add to your
\tstidxphrase{letter groups}, and I've run out of anything
\tstidxword{quaint} to say, so I'm going to have to
\tstidxword{yatter} for a while longer, which will probably make
- you \tstidxword{yawn}. What shall we talk about? My \tstidxword{quirky}
+ you \tstidxword{yawn} and fall \tstidxword{asleep}.
+ What shall we talk about? My \tstidxword{quirky}
\tstidxword{badinage} is about to \tstidxword{expire}. How about a
\tstidxword{story}? Here's one I made up for my friend
\tstidxperson{Paulo}{Cereda} in \tstidxsym{TeX}{\TeX}.SE chat because he likes
@@ -2592,7 +2940,7 @@ group for the maths symbols. Here's the code you can add to your
first story in
\tstidxartbook{The}{Adventures of Sir Quackalot}.
It's a \tstidxword{tale} of \tstidxword{adventure} and
- \tstidxword{daring-do}. The \tstidxword{hero} of the
+ \tstidxword{derring-do}. The \tstidxword{hero} of the
\tstidxword{story} is \tstidxperson{Sir}{Quackalot}, in case you
can't tell from the \tstidxword{title}.
\tstidxphrase{Once upon a time}, a long time ago in
@@ -2628,9 +2976,9 @@ group for the maths symbols. Here's the code you can add to your
\tstidxphrase{across the pond}) of which was
suspended \tstidxartphrase{the}{Mighty Helm of Knuth}, but
\tstidxperson{Sir}{Quackalot} was learned in the \tstidxword{lore} of
- installing \tstidxapp{Perl} and was able to leap upon the
+ installing \tstidxapp{Perl} and was able to leap upon the \tstidxword{magical}
\tstidxword{raft} \tstidxapp{makeglossaries} and steer his way through the
- \tstidxword{external} \tstidxphrase{indexing application}s and their many
+ \tstidxword{external} \tstidxphrasepl{indexing application} and their many
arguments. (That's supposed to be a \tstidxword{pun}, but it's
\tstidxphrase{bad form} to explain the \tstidxword{joke}, and it
wasn't even particularly \tstidxword{witty}.
@@ -2663,7 +3011,7 @@ But \tstidxperson{Sir}{Quackalot} was protected by
\tstidxartphrase{the}{Mighty Helm of Knuth} and
raced past into the \tstidxword{vale}, where he found
\tstidxartphrase{the}{Legendary Sword} \tstidxword{xor} in
-the centre of the great \tstidxsty{longtable}. (Ooh, I've started a
+the centre of the great \tstidxsty{longtable}. (\tstidxword{Ooh}, I've started a
\tstidxword{sentence} with a \tstidxword{conjunction}.
How \tstidxword{naughty} is that?)
With a great \tstidxword{leap} and a \tstidxword{bound},
@@ -2689,12 +3037,12 @@ The brave \tstidxword{knight} raised his powerful \tstidxword{sword}
\tstidxperson{Sir}{Quackalot} rescued \tstidxartphrase{the}{Golden Arara}
and the \tstidxword{land} was once more restored to \tstidxword{peace} and
\tstidxword{harmony} and
-\tstidxword{paragraph}s were able to \tstidxword{span}
-\tstidxphrase{page break}s without \tstidxword{fear}.
+\tstidxwordpl{paragraph} were able to \tstidxword{span}
+\tstidxphrasepl{page break} without \tstidxword{fear}.
\tstidxartphrase{The}{End}. Don't miss the next \tstidxword{thrilling}
\tstidxword{adventure} \tstidxbook{Sir Quackalot and the Hyper Lake of Doom}
-where our \tstidxphrase{intrepid hero}%
-\tstindexsubsee{hero}{intrepid}{see}{intrepid hero} meets a \tstidxword{quixotic}
+where our \tstidxword{seaborne} \tstidxphrase{intrepid hero}%
+\tstindexsubsee{hero}{intrepid}[hero.intrepid]{see}{intrepid hero} meets a \tstidxword{quixotic}
\tstidxword{seal} with a \tstidxword{zither} (a \tstidxword{zealous}
\tstidxword{fan} of \tstidxartfilm{The}{Third Man}), a \tstidxword{youthful}
\tstidxphrase{sea lion} with a \tstidxword{magic}
@@ -2702,15 +3050,22 @@ where our \tstidxphrase{intrepid hero}%
\tstidxword{warrior} with a \tstidxword{laser-guided}
\tstidxphrase{sealant gun}. Can they defeat the
\tstidxword{villainous}, \tstidxword{zany} \tstidxword{zoologist}
-sailing a \tstidxword{xebec} bearing canisters of
+sailing a \tstidxword{xebec} across the \tstidxword{sea} bearing canisters of
\tstidxword{xenon}, \tstidxword{xylem} and \tstidxword{xylene}?
-Oh, \tstidxword{zounds}! He's wearing a \tstidxphrase{zoot suit}
-and smoking a \tstidxword{zucchini} whilst playing a \tstidxword{xylophone}.
+Oh, \tstidxword{zounds}! He's \tstidxword{ashore} wearing
+a \tstidxphrase{zoot suit} and smoking a \tstidxword{zucchini}
+whilst playing a \tstidxword{xylophone}.
As one \tstidxphrase{anonymous reviewer} said,
it's as \tstidxword{exhilarating} as watching a \tstidxword{yuppie}
eating a \tstidxphrase{yule log} soaked in \tstidxphrase{yoghurt}.
Hmm, \tstidxword{yummy}\tstidxdash or \tstidxword{yuck}, depending
-on your tastes.%
+on your tastes. Don't forget to \tstidxword{check} you
+have some \tstidxword{chalk} so we can write
+\tstidxword{ddisgynedig} and \tstidxword{ddyrchafedig}
+in \tstidxplace{Nghaerdydd} (over in \tstidxplace{Nghymru})
+because I want a few more words with \tstidxwordpl{digraph},
+and then we can take a \tstidxword{ffotograff} of
+\tstidxplace{Ffestiniog}.%
}
\tstidxnewblock
{%
@@ -2730,7 +3085,7 @@ on your tastes.%
\tstidxbook{Compact Oxford English Dictionary} (third edition,
revised) for these words are: vice admiral, vice chancellor, vice-president,
\tstidxword{viceregal}, viceroy, vice versa. Quick
- \tstidxword{quizz}. Can you get \tstidxapp{makeindex} or
+ \tstidxword{quiz}. Can you get \tstidxapp{makeindex} or
\tstidxapp{xindy} to reproduce that order?%
}
\tstidxnewblock*{\@tidx@close@testidxsty}%