summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/robustindex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-01-30 23:11:40 +0000
committerKarl Berry <karl@freefriends.org>2019-01-30 23:11:40 +0000
commit2e7e146f33f732452d00e27f657a6306e225fb9b (patch)
treed732d585a48131508872f49fcc6c657b381be00e /Master/texmf-dist/tex/latex/robustindex
parentd374f5912e154903a20986cc62cccef2e8ffb9fd (diff)
robustindex (30jan19)
git-svn-id: svn://tug.org/texlive/trunk@49877 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/robustindex')
-rw-r--r--Master/texmf-dist/tex/latex/robustindex/robustindex.sty33
1 files changed, 17 insertions, 16 deletions
diff --git a/Master/texmf-dist/tex/latex/robustindex/robustindex.sty b/Master/texmf-dist/tex/latex/robustindex/robustindex.sty
index 8c3d3943412..a30c5d81b7d 100644
--- a/Master/texmf-dist/tex/latex/robustindex/robustindex.sty
+++ b/Master/texmf-dist/tex/latex/robustindex/robustindex.sty
@@ -1,4 +1,4 @@
-% Package robustindex.sty, Wilberd van der Kallen 2005, 2017, 2018.
+% Package robustindex.sty, Wilberd van der Kallen 2005, 2017, 2018, 2019.
%
% Third parties often change the page numbers without rerunning makeindex.
% One would like to make the page numbers in the index entries more robust.
@@ -54,7 +54,7 @@
%
% https://www.staff.science.uu.nl/~kalle101/stind
%
-% Copyright 2018 Wilberd van der Kallen
+% Copyright 2019 Wilberd van der Kallen
%
% This file may be distributed under the conditions of the LaTeX Project Public
% License, either version 1.2 of this license or (at your option) any
@@ -64,7 +64,7 @@
% version 1999/12/01 or later.
\ProvidesPackage{robustindex}
- [2018/04/28
+ [2019/01/25
index entries with pagerefs]
\RequirePackage{makeidx}
@@ -111,8 +111,8 @@
}%
\@esphack
\protected@write
- \@indexfile {}{\string \indexentry
- {\string\indnr\robustchoice d\gr@bltr#1-\relax b \findencap#1|\relax}{\theindexctr}}%
+ \@indexfile {}{\string \indexentry
+ {\string\indnr\robustchoice d\gr@bltr#1-\relax b{} \findencap#1|\relax}{\theindexctr}}%
\endgroup
\@esphack
}
@@ -300,7 +300,11 @@
\newcommand{\gr@bltr}{\relax}%
-\def\gr@bltr#1#2\relax{\ifcat A#1\the\uccode`#1\else 60\fi}% to keep "a" and "A" together.
+\def\gr@bltr#1#2\relax{\ifcat A#10\the\uccode`#1\else 060\fi}%
+% to keep "a" and "A" together.
+
+\newcommand{\altsort}% to place some entries after the alphabet
+{\def\gr@bltr##1##2\relax{\ifcat A##10\the\uccode`##1\else##1\fi}}
% But first some code for embellishing an index. Our hacking brakes the insertion of
% \indexspace at appropriate places. We have to work hard to restore that. While we
@@ -320,8 +324,10 @@
\protect\def\protect\nwletre{#1}\string\jmptonine}{9}}%
}%
+\newcommand{\extraheaders}{\relax}
+
\newcommand{\capitalsinindex}[1]{% Will be called by \newindex with full alphabet.
-\find@capitals#1\relax}%
+\extraheaders\find@capitals#1\relax}%
\newcommand{\find@capitals}{\relax}%
@@ -333,19 +339,15 @@
\newcommand{\letr@test}{\relax}% To test if entry starts with new letter.
-\long\def\letr@test#1{\ifx#1\nxtletre\else\proc@letter{#1}\fi}%
+\long\def\letr@test#1{\ifx#1\nxtletre\else\proc@letter{\relax#1}\fi}%
\newcommand{\proc@letter}{\relax}%
-\def\proc@letter#1{\long\def\item{\olditem}\ifx#1\relax\else\indexcapstyle{\nwletre}\fi
-\ifx#1\indnr\expandafter\ja@\else #1\fi}%
+\def\proc@letter#1#2{\long\def\item{\olditem}%
+\ifx#1\relax\else\indexcapstyle{\nwletre}\fi\fi#1}%
\newcommand{\olditem}{\relax}%
-\newcommand{\ja@}{\relax}
-
-\def\ja@#1 {\fi}% Mysterious. Seems necessary.
-
% All this just to embellish an index. Now the support for multiple indexes.
\newcommand{\setindex}[1]{%
@@ -401,8 +403,7 @@ Package needs \string\make index in preamble. Detected}\fi
\@esphack
\protected@write
\@indexfile {}{\string \indexentry
- {\string\indnr\the\c@multindctr d91a @\protect\nxtletre\protect\def
- \protect\nwletre{\relax}\string\jmptonine
+ {\string\indnr\the\c@multindctr d091 @\protect\relax\string\jmptonine
}{9}}%
\protected@write
\@indexfile {}{\string \indexentry