texlive[48241] Master/texmf-dist: bibleref (21jul18)
commits+karl at tug.org
commits+karl at tug.org
Sat Jul 21 22:18:18 CEST 2018
Revision: 48241
http://tug.org/svn/texlive?view=revision&revision=48241
Author: karl
Date: 2018-07-21 22:18:18 +0200 (Sat, 21 Jul 2018)
Log Message:
-----------
bibleref (21jul18)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/bibleref/CHANGES
trunk/Master/texmf-dist/doc/latex/bibleref/bibleref.pdf
trunk/Master/texmf-dist/doc/latex/bibleref/samples/sample-categories.pdf
trunk/Master/texmf-dist/doc/latex/bibleref/samples/sample-indextools.pdf
trunk/Master/texmf-dist/doc/latex/bibleref/samples/sample-xidx.pdf
trunk/Master/texmf-dist/doc/latex/bibleref/samples/sample.pdf
trunk/Master/texmf-dist/source/latex/bibleref/bibleref.dtx
trunk/Master/texmf-dist/tex/latex/bibleref/bibleref.sty
Modified: trunk/Master/texmf-dist/doc/latex/bibleref/CHANGES
===================================================================
--- trunk/Master/texmf-dist/doc/latex/bibleref/CHANGES 2018-07-21 20:18:00 UTC (rev 48240)
+++ trunk/Master/texmf-dist/doc/latex/bibleref/CHANGES 2018-07-21 20:18:18 UTC (rev 48241)
@@ -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:
Modified: trunk/Master/texmf-dist/doc/latex/bibleref/bibleref.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/bibleref/samples/sample-categories.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/bibleref/samples/sample-indextools.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/bibleref/samples/sample-xidx.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/bibleref/samples/sample.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/bibleref/bibleref.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/bibleref/bibleref.dtx 2018-07-21 20:18:00 UTC (rev 48240)
+++ trunk/Master/texmf-dist/source/latex/bibleref/bibleref.dtx 2018-07-21 20:18:18 UTC (rev 48241)
@@ -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 @@
%\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 @@
{\@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 at tmp{#1}%
\ifx\@bv at tmp\@empty
@@ -2310,23 +2315,47 @@
%\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 at 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 at map@\detokenize{#1}\endcsname{#2}%
+}%
\newcommand*{\biblerefmap}[2]{%
- \expandafter\def\csname @bibleref at map@#1\endcsname{#2}%
+ \ifxetex%
+ \expandafter\def\csname @bibleref at map@#1\endcsname{#2}%
+ \else%
+ \edef\@tmp{#1}%
+ \expandafter\biblerefmap@\expandafter{\@tmp}{#2}%
+ \fi%
}
% \end{macrocode}
+% \end{macro}
%\end{macro}
%
%\begin{macro}{\@do at bibleref@map}
% \begin{macrocode}
\def\@do at bibleref@map#1\relax{%
- \@ifundefined{@bibleref at map@#1}{}{%
- \expandafter\let\expandafter\@@bv at idxsort
- \csname @bibleref at map@#1\endcsname
- }%
+ \ifxetex%
+ \@ifundefined{@bibleref at map@#1}{}{%
+ \expandafter\let\expandafter\@@bv at idxsort%
+ \csname @bibleref at map@#1\endcsname%
+ }%
+ \else%
+ \@ifundefined{@bibleref at map@\detokenize{#1}}{}{%
+ \expandafter\let\expandafter\@@bv at idxsort%
+ \csname @bibleref at map@\detokenize{#1}\endcsname%
+ }%
+ \fi%
}
% \end{macrocode}
%\end{macro}
Modified: trunk/Master/texmf-dist/tex/latex/bibleref/bibleref.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/bibleref/bibleref.sty 2018-07-21 20:18:00 UTC (rev 48240)
+++ trunk/Master/texmf-dist/tex/latex/bibleref/bibleref.sty 2018-07-21 20:18:18 UTC (rev 48241)
@@ -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 @@
\fi
}
\newcommand*{\biblerefindex}{\index}
+\newcommand{\biblerefmap@}[2]{%
+ \expandafter\def\csname @bibleref at map@\detokenize{#1}\endcsname{#2}%
+}%
\newcommand*{\biblerefmap}[2]{%
- \expandafter\def\csname @bibleref at map@#1\endcsname{#2}%
+ \ifxetex%
+ \expandafter\def\csname @bibleref at map@#1\endcsname{#2}%
+ \else%
+ \edef\@tmp{#1}%
+ \expandafter\biblerefmap@\expandafter{\@tmp}{#2}%
+ \fi%
}
\def\@do at bibleref@map#1\relax{%
- \@ifundefined{@bibleref at map@#1}{}{%
- \expandafter\let\expandafter\@@bv at idxsort
- \csname @bibleref at map@#1\endcsname
- }%
+ \ifxetex%
+ \@ifundefined{@bibleref at map@#1}{}{%
+ \expandafter\let\expandafter\@@bv at idxsort%
+ \csname @bibleref at map@#1\endcsname%
+ }%
+ \else%
+ \@ifundefined{@bibleref at map@\detokenize{#1}}{}{%
+ \expandafter\let\expandafter\@@bv at idxsort%
+ \csname @bibleref at map@\detokenize{#1}\endcsname%
+ }%
+ \fi%
}
\newcommand{\@bv at do}[1]{#1\@bv at addtoidx{#1}}
\newtoks\@bv at tmpa
More information about the tex-live-commits
mailing list