summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-10-11 21:31:54 +0000
committerKarl Berry <karl@freefriends.org>2019-10-11 21:31:54 +0000
commitaa2dbb8897371a36028d3ce667140365345dfbfe (patch)
treedb11c7c2f0684c7ec0e05299d0bd51971f2de0e7 /Master
parent1c5447b65419b4af37c996610389a6ed91670d01 (diff)
esindex (11oct19)
git-svn-id: svn://tug.org/texlive/trunk@52342 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/esindex/README.md5
-rw-r--r--Master/texmf-dist/doc/latex/esindex/esindex.pdfbin61713 -> 62539 bytes
-rw-r--r--Master/texmf-dist/doc/latex/esindex/esindex.tex21
-rw-r--r--Master/texmf-dist/tex/latex/esindex/esindex.sty57
4 files changed, 72 insertions, 11 deletions
diff --git a/Master/texmf-dist/doc/latex/esindex/README.md b/Master/texmf-dist/doc/latex/esindex/README.md
index a2b357cd576..6ebd7e4c790 100644
--- a/Master/texmf-dist/doc/latex/esindex/README.md
+++ b/Master/texmf-dist/doc/latex/esindex/README.md
@@ -18,6 +18,11 @@ in the document.
### Recent changes
```
+1.7 2019-10-10
+ - Fix - because of a change in a macro name, it stopped
+ working with xe/lua
+ - Multi-level comparisons (up to 3), to better sort the items.
+
1.6 2019-09-30
- Package option 'babel', which wraps each entry not in the main
language with \foreignlanguage (or other macro).
diff --git a/Master/texmf-dist/doc/latex/esindex/esindex.pdf b/Master/texmf-dist/doc/latex/esindex/esindex.pdf
index d1e0de5e5f2..bc78b36c15a 100644
--- a/Master/texmf-dist/doc/latex/esindex/esindex.pdf
+++ b/Master/texmf-dist/doc/latex/esindex/esindex.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/esindex/esindex.tex b/Master/texmf-dist/doc/latex/esindex/esindex.tex
index a654b2aa8d5..03d0b243867 100644
--- a/Master/texmf-dist/doc/latex/esindex/esindex.tex
+++ b/Master/texmf-dist/doc/latex/esindex/esindex.tex
@@ -14,7 +14,7 @@
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
-\title{\textsf{esindex}\\\large 1.6\quad 2019-09-30}
+\title{\textsf{esindex}\\\large 1.7\quad 2019-10-10}
\author{Javier Bezos}
@@ -46,7 +46,8 @@
{\LARGE Generating automatically sort keys for \textit{MakeIndex}
with \LaTeX\par}
\vspace*{1ex}
-Version 1.6 (2019-09-30)\par
+Version 1.7 (2019-10-10)\par
+\texttt{https://github.com/jbezos/esindex}\par
Javier Bezos (\texttt{http://www.texnia.com})
\vspace*{6ex}
@@ -86,6 +87,19 @@ Version 1.6 adds a package option -- with \verb|babel| the `actual' value
macro is \verb|\esindexlanguage|, which by default is `let' to the
\textsf{babel} macro.
+Version 1.7 (besides fixing a bug with xe/lua) adds multilevel
+comparisons (up to three levels, ie, primary, secondary and tertiary).
+For example:
+\begin{verbatim}
+\esindexreplacesub{å}{a}{2}%
+\esindexreplacesub{à}{a}{1}%
+\end{verbatim}
+creates a two-level key sorting \verb|à| before \verb|å|. For a
+three-level key use \verb|\esindexreplacesubsub| (with 4 arguments). With
+\verb|\esindexexpandkeys| the three levels are expanded. (Internally,
+with the definitions above the key for \verb|ràpid| is
+\verb|rapid^^Ar1pid|.)
+
\section{Spanish}
Este paquete ha sido diseñado para facilitar la escritura de índices
@@ -282,7 +296,8 @@ made language dependent with the appropriate test (eg, with
\textsf{iflang}).
As a convenience tool, \verb|\esindexlastchar| is \verb|^^ff| or
-\verb|^^^^ffff|, depending on the engine.
+\verb|^^^^ffff| (\verb|^^^^^^10ffff| in \textsf{luatex}), depending on
+the engine.
You can play with \textsf{lua} inside \verb|\everyesindex|, too. For
example, to convert at once things like \textit{2,3-dimetilfenol} to
diff --git a/Master/texmf-dist/tex/latex/esindex/esindex.sty b/Master/texmf-dist/tex/latex/esindex/esindex.sty
index 4594874db47..a63bdba6eb6 100644
--- a/Master/texmf-dist/tex/latex/esindex/esindex.sty
+++ b/Master/texmf-dist/tex/latex/esindex/esindex.sty
@@ -7,7 +7,7 @@
% Repository: https://github.com/jbezos/esindex
%
-\ProvidesPackage{esindex}[2019/09/30 v1.6 Spanish indexes (and more)]
+\ProvidesPackage{esindex}[2019/10/10 v1.7 Spanish indexes (and more)]
\def\esx@level{`\!}
\def\esx@actual{`\@}
@@ -68,6 +68,8 @@
\catcode`\"=13
\catcode`\~=13
+\catcode`\^^A=12
+
\gdef\esindex#1#{\esx@index{#1}}
\lowercase{
@@ -90,7 +92,21 @@
\gdef\esx@bar@eat#1|{\def\esx@a{|#1}}
}
-\gdef\esindexexpandkey{\protected@edef\esindexkey{\esindexkey}}
+\gdef\esindexexpandkey{%
+ \protected@edef\esindexkey{\esindexkey}}
+\gdef\esindexexpandsubkey{%
+ \ifx\esindexsubkey\relax\else
+ \protected@edef\esindexsubkey{\esindexsubkey}%
+ \fi}
+\gdef\esindexexpandsubsubkey{%
+ \ifx\esindexsubsubkey\relax\else
+ \protected@edef\esindexsubsubkey{\esindexsubsubkey}%
+ \fi}
+
+\gdef\esindexexpandkeys{%
+ \esindexexpandkey
+ \esindexexpandsubkey
+ \esindexexpandsubsubkey}
% The following is called for every ! level, much like a loop. #1 is
% the current level.
@@ -111,8 +127,16 @@
% Execute \everyesindex and apply accents, so that \'a becomes a, and
% redefinitions in \everyesindex are also "applied"
\the\everyesindex
- \esindexexpandkey
+ \esindexexpandkeys
\esx@spanishreplacements
+ \protected@edef\esindexkey{%
+ \esindexkey
+ \ifx\esindexsubkey\relax\else
+ ^^A\esindexsubkey
+ \fi
+ \ifx\esindexsubsubkey\relax\else
+ ^^A\esindexsubsubkey
+ \fi}%
\@temptokena\expandafter{\esindexkey}%
% Key now in \@temptokena
% Particles, with \ignorewords. \esx@remwords works on \@temptokena
@@ -235,11 +259,28 @@
\expandafter\esx@replace@aux#1#2\esx@nil#2%
\edef#1{\the\toks@}}
-\def\esindexreplace#1#2{\esx@replace\esindexkey{#1}{#2}}
+\let\esindexsubkey\relax
+\let\esindexsubsubkey\relax
+
+\newcommand\esindexreplace[2]{%
+ \esx@replace\esindexkey{#1}{#2}}
+\newcommand\esindexreplacesub[3]{%
+ \ifx\esindexsubkey\relax
+ \let\esindexsubkey\esindexkey
+ \fi
+ \esindexreplace{#1}{#2}%
+ \esx@replace\esindexsubkey{#1}{#3}}
+\newcommand\esindexreplacesubsub[4]{%
+ \ifx\esindexsubsubkey\relax
+ \let\esindexsubsubkey\esindexkey
+ \fi
+ \esindexreplacesub{#1}{#2}{#3}%
+ \esx@replace\esindexsubsubkey{#1}{#4}}
%-------------------------
\let\esx@spanishreplacements\relax
+\let\esx@@spanishreplacements\relax
\ifesx@spanish
@@ -280,14 +321,14 @@
\ifx\XeTeXinterchartoks\@undefined
\catcode`\^^ff=12
\xdef\esindexlastchar{^^ff}
- \else
+ \else % Hats in xetex seem buggy. Limit to 4.
\catcode`\^^^^ffff=12
\xdef\esindexlastchar{^^^^ffff}
\global\let\esx@spanishreplacements\esx@@spanishreplacements
\fi
- \else
- \catcode`\^^^^ffff=12
- \xdef\esindexlastchar{^^^^ffff}
+ \else
+ \catcode`\^^^^^^10ffff=12
+ \xdef\esindexlastchar{^^^^^^10ffff}
\global\let\esx@spanishreplacements\esx@@spanishreplacements
\fi
\endgroup