diff options
author | Karl Berry <karl@freefriends.org> | 2017-08-11 23:06:40 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-08-11 23:06:40 +0000 |
commit | a11aea5f247db96e5465cadf76c4cbd1263d484c (patch) | |
tree | 4c5663fead49290ff872178b37632fdfdbf5da4e /Master/texmf-dist/tex/latex/testidx/testidx.sty | |
parent | 97ad0f84a389805043513c35c7eefb1132ccae5a (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/testidx.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/testidx/testidx.sty | 1105 |
1 files changed, 730 insertions, 375 deletions
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}% |