diff options
author | Karl Berry <karl@freefriends.org> | 2019-09-30 21:50:14 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-09-30 21:50:14 +0000 |
commit | ac5265994eff929bf5acbbe5447272453dfe250b (patch) | |
tree | a59380bd4d403f5a55d130e5e151c8542edbb58a /Master/texmf-dist/tex/latex/esindex | |
parent | 0c7873f9ffd7192fe2ad9c08c8f3a42bb7b9d71b (diff) |
esindex (30sep19)
git-svn-id: svn://tug.org/texlive/trunk@52226 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/esindex')
-rw-r--r-- | Master/texmf-dist/tex/latex/esindex/esindex.sty | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/Master/texmf-dist/tex/latex/esindex/esindex.sty b/Master/texmf-dist/tex/latex/esindex/esindex.sty index ac00170d3a8..4594874db47 100644 --- a/Master/texmf-dist/tex/latex/esindex/esindex.sty +++ b/Master/texmf-dist/tex/latex/esindex/esindex.sty @@ -6,21 +6,8 @@ % % Repository: https://github.com/jbezos/esindex % -% Changes -% -% 2006-05-12. Bug fixed. Missing accents in multilevel entries. -% 2008-09-17. Made compatible with latest LaTeX versions (\IeC). -% Added \'\i. -% Package option ignorespaces. -% Macro \ignorewords. -% 2008-09-28. Added \everyesindex. -% Macro \esindexsort. -% 2019-01-25. Macro \esindexactual. -% Package option nospanish. -% Adapted to xe/lua, with: -% Macros \esindexreplace, \esindexlastchar, \esindexkey - -\ProvidesPackage{esindex}[2019/01/28 v1.5 Spanish indexes] + +\ProvidesPackage{esindex}[2019/09/30 v1.6 Spanish indexes (and more)] \def\esx@level{`\!} \def\esx@actual{`\@} @@ -36,6 +23,12 @@ \DeclareOption{nospanish}{\esx@spanishfalse} +\newif\ifesx@babel + +\DeclareOption{babel}{% + \let\esindexlanguage\foreignlanguage + \esx@babeltrue} + \DeclareOption*{% \@expandtwoargs\in@{=}{\CurrentOption}% \ifin@ @@ -50,8 +43,8 @@ {\string`\expandafter\noexpand\csname\string#2\endcsname}}} \def\esx@error{\PackageError{esindex}{Unknown index parameter}% - {Except for ignorespaces, nospanish, replaceindex, options^^J% - in this package ave the form parameter=value, where^^J% + {Except for ignorespaces, nospanish, babel, replaceindex, ^^J% + options in this package ave the form parameter=value, where^^J% parameter stands for of the following MakeIndex ones:^^J% encap, level, actual, quote}} @@ -141,9 +134,17 @@ % Set actual, if there is a saved one with \esindexactual. \def\esx@a{#1}% \@ifundefined{esx@actual@\expandafter\strip@prefix\meaning\esx@a}% - {\def\esx@a{#1}}% + {}% {\expandafter\let\expandafter\esx@a \csname esx@actual@\expandafter\strip@prefix\meaning\esx@a\endcsname}% + % Wrap with the language, if not main (babel option). This idea + % can be extended to consider more generic contexts + \ifesx@babel + \bbl@ifsamestring\languagename\bbl@main@language + {}% + {\@temptokena\expandafter{\esx@a}% + \edef\esx@a{\string\esindexlanguage{\languagename}{\the\@temptokena}}}% + \fi % Add actual, and go to the next ! level \toks@\expandafter{\esx@g}% \def\esx@b{#2}% |