From 59ee0ad395f1a732c65bd15d7854bd1b11f686a8 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 21 Jul 2018 20:18:18 +0000 Subject: bibleref (21jul18) git-svn-id: svn://tug.org/texlive/trunk@48241 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/bibleref/CHANGES | 2 + Master/texmf-dist/doc/latex/bibleref/bibleref.pdf | Bin 264169 -> 264320 bytes .../latex/bibleref/samples/sample-categories.pdf | Bin 12427 -> 12430 bytes .../latex/bibleref/samples/sample-indextools.pdf | Bin 9545 -> 9543 bytes .../doc/latex/bibleref/samples/sample-xidx.pdf | Bin 19823 -> 19599 bytes .../doc/latex/bibleref/samples/sample.pdf | Bin 39966 -> 39746 bytes .../texmf-dist/source/latex/bibleref/bibleref.dtx | 43 +++++++++++++++++---- Master/texmf-dist/tex/latex/bibleref/bibleref.sty | 28 +++++++++++--- 8 files changed, 60 insertions(+), 13 deletions(-) diff --git a/Master/texmf-dist/doc/latex/bibleref/CHANGES b/Master/texmf-dist/doc/latex/bibleref/CHANGES index 33df7fd432d..25f6e7a1871 100644 --- a/Master/texmf-dist/doc/latex/bibleref/CHANGES +++ b/Master/texmf-dist/doc/latex/bibleref/CHANGES @@ -1,3 +1,5 @@ +1.18: + * Fix bug with indexing when using non unicode engine. 1.17: * Use / to mark the two numbering of the Psalms : \bibleverse{Ps}{23/24} 1.16: diff --git a/Master/texmf-dist/doc/latex/bibleref/bibleref.pdf b/Master/texmf-dist/doc/latex/bibleref/bibleref.pdf index 1cc6132c7b9..61e10fea4dd 100644 Binary files a/Master/texmf-dist/doc/latex/bibleref/bibleref.pdf and b/Master/texmf-dist/doc/latex/bibleref/bibleref.pdf differ diff --git a/Master/texmf-dist/doc/latex/bibleref/samples/sample-categories.pdf b/Master/texmf-dist/doc/latex/bibleref/samples/sample-categories.pdf index 3c5aec8af67..80bdc7662d7 100644 Binary files a/Master/texmf-dist/doc/latex/bibleref/samples/sample-categories.pdf and b/Master/texmf-dist/doc/latex/bibleref/samples/sample-categories.pdf differ diff --git a/Master/texmf-dist/doc/latex/bibleref/samples/sample-indextools.pdf b/Master/texmf-dist/doc/latex/bibleref/samples/sample-indextools.pdf index bf5295d85a4..70e4e5f7c7a 100644 Binary files a/Master/texmf-dist/doc/latex/bibleref/samples/sample-indextools.pdf and b/Master/texmf-dist/doc/latex/bibleref/samples/sample-indextools.pdf differ diff --git a/Master/texmf-dist/doc/latex/bibleref/samples/sample-xidx.pdf b/Master/texmf-dist/doc/latex/bibleref/samples/sample-xidx.pdf index ff6096bf022..d63e8fd41f1 100644 Binary files a/Master/texmf-dist/doc/latex/bibleref/samples/sample-xidx.pdf and b/Master/texmf-dist/doc/latex/bibleref/samples/sample-xidx.pdf differ diff --git a/Master/texmf-dist/doc/latex/bibleref/samples/sample.pdf b/Master/texmf-dist/doc/latex/bibleref/samples/sample.pdf index 5b5803cd026..f0171839960 100644 Binary files a/Master/texmf-dist/doc/latex/bibleref/samples/sample.pdf and b/Master/texmf-dist/doc/latex/bibleref/samples/sample.pdf differ diff --git a/Master/texmf-dist/source/latex/bibleref/bibleref.dtx b/Master/texmf-dist/source/latex/bibleref/bibleref.dtx index 204eec7fc80..6f2304ddbc8 100644 --- a/Master/texmf-dist/source/latex/bibleref/bibleref.dtx +++ b/Master/texmf-dist/source/latex/bibleref/bibleref.dtx @@ -973,7 +973,7 @@ % Declare package % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{bibleref}[2018/06/05 1.17a (NLCT and MR)] +\ProvidesPackage{bibleref}[2018/07/21 1.18 (NLCT and MR)] % \end{macrocode} % Need to do some conditional stuff % \begin{macrocode} @@ -990,6 +990,10 @@ % \begin{macrocode} \RequirePackage{amsgen} % \end{macrocode} +% We need to know if we use XeTeX. +% \begin{macrocode} +\RequirePackage{ifxetex} +% \end{macrocode} %\begin{macro}{\BRbooknumberstyle} % The style of the book % number. By default, it simply displays its argument @@ -1755,6 +1759,7 @@ defined}{}}} %\end{macro} % %\begin{macro}{\setbooktitle} +%\changes{v1.18}{2018/07/21}{Fix bug in indexing with title containing unicode character using a non-native unicode engine.} %\begin{definition} %\cs{setbooktitle}\marg{fullname}\marg{title} %\end{definition} @@ -2234,7 +2239,7 @@ defined}{}}} {\@end@@bibleverse}% }% } -% \changes{1.15}{2016/09/10}{fix bug with book without chapter} +% \changes{1.15}{2016/09/10}{Fix bug with book without chapter} \def\@@bibleversenosep#1){% \def\@bv@tmp{#1}% \ifx\@bv@tmp\@empty @@ -2310,23 +2315,47 @@ defined}{}}} %\end{macro} % %\begin{macro}{\biblerefmap} +% \begin{macro}{\biblerefmap@} % Map the sort key to something else. Overwrites previous mapping % for the given key. +% In case we use unicode character with non unicode engines (using fontspec), we need a little hack to: +% \begin{itemize} +% \item Transform the input 16 bits (or more) content to series of \cs{char}; +% \item Use the detokinzed version of this representation of characters to define the \cs{@bibleref@map@XXX} commands. +% \end{itemize} +% In this case, we do it using \cs{biblerefmap@}, passing a transformed forme of the first argument of \cs{biblerefmap}. +% %\changes{1.09}{2009/04/26}{new} % \begin{macrocode} +\newcommand{\biblerefmap@}[2]{% + \expandafter\def\csname @bibleref@map@\detokenize{#1}\endcsname{#2}% +}% \newcommand*{\biblerefmap}[2]{% - \expandafter\def\csname @bibleref@map@#1\endcsname{#2}% + \ifxetex% + \expandafter\def\csname @bibleref@map@#1\endcsname{#2}% + \else% + \edef\@tmp{#1}% + \expandafter\biblerefmap@\expandafter{\@tmp}{#2}% + \fi% } % \end{macrocode} +% \end{macro} %\end{macro} % %\begin{macro}{\@do@bibleref@map} % \begin{macrocode} \def\@do@bibleref@map#1\relax{% - \@ifundefined{@bibleref@map@#1}{}{% - \expandafter\let\expandafter\@@bv@idxsort - \csname @bibleref@map@#1\endcsname - }% + \ifxetex% + \@ifundefined{@bibleref@map@#1}{}{% + \expandafter\let\expandafter\@@bv@idxsort% + \csname @bibleref@map@#1\endcsname% + }% + \else% + \@ifundefined{@bibleref@map@\detokenize{#1}}{}{% + \expandafter\let\expandafter\@@bv@idxsort% + \csname @bibleref@map@\detokenize{#1}\endcsname% + }% + \fi% } % \end{macrocode} %\end{macro} diff --git a/Master/texmf-dist/tex/latex/bibleref/bibleref.sty b/Master/texmf-dist/tex/latex/bibleref/bibleref.sty index 3d4cdafe07a..5c2bddb91fa 100644 --- a/Master/texmf-dist/tex/latex/bibleref/bibleref.sty +++ b/Master/texmf-dist/tex/latex/bibleref/bibleref.sty @@ -39,10 +39,11 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{bibleref}[2018/06/05 1.17a (NLCT and MR)] +\ProvidesPackage{bibleref}[2018/07/21 1.18 (NLCT and MR)] \RequirePackage{ifthen} \RequirePackage{fmtcount} \RequirePackage{amsgen} +\RequirePackage{ifxetex} \newcommand*{\BRbooknumberstyle}[1]{#1 } \newcommand*{\BRepistlenumberstyle}[1]{#1 } \newcommand*{\BRbookof}{} @@ -934,14 +935,29 @@ defined}{}}} \fi } \newcommand*{\biblerefindex}{\index} +\newcommand{\biblerefmap@}[2]{% + \expandafter\def\csname @bibleref@map@\detokenize{#1}\endcsname{#2}% +}% \newcommand*{\biblerefmap}[2]{% - \expandafter\def\csname @bibleref@map@#1\endcsname{#2}% + \ifxetex% + \expandafter\def\csname @bibleref@map@#1\endcsname{#2}% + \else% + \edef\@tmp{#1}% + \expandafter\biblerefmap@\expandafter{\@tmp}{#2}% + \fi% } \def\@do@bibleref@map#1\relax{% - \@ifundefined{@bibleref@map@#1}{}{% - \expandafter\let\expandafter\@@bv@idxsort - \csname @bibleref@map@#1\endcsname - }% + \ifxetex% + \@ifundefined{@bibleref@map@#1}{}{% + \expandafter\let\expandafter\@@bv@idxsort% + \csname @bibleref@map@#1\endcsname% + }% + \else% + \@ifundefined{@bibleref@map@\detokenize{#1}}{}{% + \expandafter\let\expandafter\@@bv@idxsort% + \csname @bibleref@map@\detokenize{#1}\endcsname% + }% + \fi% } \newcommand{\@bv@do}[1]{#1\@bv@addtoidx{#1}} \newtoks\@bv@tmpa -- cgit v1.2.3