summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-04-29 13:41:25 +0000
committerKarl Berry <karl@freefriends.org>2010-04-29 13:41:25 +0000
commit3793428328652bd18a288a1ab5bd9f5aac85d765 (patch)
tree9c322f3a1325d505efd10961ecc711479008bd2d /Master
parent7b7497d5ec04f3a154975722b6b2725be6566271 (diff)
bibleref 1.10 (27apr10)
git-svn-id: svn://tug.org/texlive/trunk@18041 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/bibleref/CHANGES10
-rw-r--r--Master/texmf-dist/doc/latex/bibleref/README4
-rw-r--r--Master/texmf-dist/doc/latex/bibleref/bibleref-manual.html32
-rw-r--r--Master/texmf-dist/doc/latex/bibleref/bibleref.pdfbin175140 -> 176145 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bibleref/sample.pdfbin121045 -> 120997 bytes
-rw-r--r--Master/texmf-dist/doc/latex/bibleref/sample.tex1
-rw-r--r--Master/texmf-dist/source/latex/bibleref/bibleref.dtx186
-rw-r--r--Master/texmf-dist/source/latex/bibleref/bibleref.ins2
-rw-r--r--Master/texmf-dist/tex/latex/bibleref/bibleref.sty146
9 files changed, 290 insertions, 91 deletions
diff --git a/Master/texmf-dist/doc/latex/bibleref/CHANGES b/Master/texmf-dist/doc/latex/bibleref/CHANGES
new file mode 100644
index 00000000000..b95c7df1372
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/bibleref/CHANGES
@@ -0,0 +1,10 @@
+1.10:
+ * Fixed bug causing unwanted @ in verse index subitem
+ * Entries sorted according to verses as well as book title and
+ * chapter.
+ * Added \setindexbooktitle
+
+1.09:
+ * Added \addbiblebook
+ * Added \biblerefindex
+ * Added \biblerefmap
diff --git a/Master/texmf-dist/doc/latex/bibleref/README b/Master/texmf-dist/doc/latex/bibleref/README
index 865a600318b..2f9b486cb46 100644
--- a/Master/texmf-dist/doc/latex/bibleref/README
+++ b/Master/texmf-dist/doc/latex/bibleref/README
@@ -1,6 +1,6 @@
-LaTeX Class File : bibleref v 1.09
+LaTeX Class File : bibleref v 1.10
-Last Modified : 26 Apr 2010
+Last Modified : 27 Apr 2010
Author : Nicola Talbot
diff --git a/Master/texmf-dist/doc/latex/bibleref/bibleref-manual.html b/Master/texmf-dist/doc/latex/bibleref/bibleref-manual.html
index cbd7f02c93c..802fbefbc33 100644
--- a/Master/texmf-dist/doc/latex/bibleref/bibleref-manual.html
+++ b/Master/texmf-dist/doc/latex/bibleref/bibleref-manual.html
@@ -7,8 +7,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
-<TITLE>bibleref.sty v1.09: a LATEX2e package for typesetting bible references</TITLE>
-<META NAME="description" CONTENT="bibleref.sty v1.09: a LATEX2e package for typesetting bible references">
+<TITLE>bibleref.sty v1.10: a LATEX2e package for typesetting bible references</TITLE>
+<META NAME="description" CONTENT="bibleref.sty v1.10: a LATEX2e package for typesetting bible references">
<META NAME="keywords" CONTENT="bibleref-manual">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
@@ -22,7 +22,7 @@ original version by: Nikos Drakos, CBLU, University of Leeds
<BODY >
-<H1 ALIGN="CENTER">bibleref.sty v1.09: a L<SUP><SMALL>A</SMALL></SUP>T<SMALL>E</SMALL>X2<SUB>e</SUB> package for
+<H1 ALIGN="CENTER">bibleref.sty v1.10: a L<SUP><SMALL>A</SMALL></SUP>T<SMALL>E</SMALL>X2<SUB>e</SUB> package for
typesetting bible references</H1>
<P ALIGN="CENTER"><STRONG>Nicola Talbot
<BR>
@@ -36,7 +36,7 @@ Norwich. Norfolk. NR4 7TJ.
United Kingdom
<BR><TT><A NAME="tex2html1"
HREF="http://theoval.cmp.uea.ac.uk/~nlct/">http://theoval.cmp.uea.ac.uk/~nlct/</A></TT></STRONG></P>
-<P ALIGN="CENTER"><STRONG>26th April 2010</STRONG></P>
+<P ALIGN="CENTER"><STRONG>27th April 2010</STRONG></P>
<BR>
<H2><A NAME="SECTION00010000000000000000">
@@ -75,7 +75,7 @@ parts of the bible.
<P>
<P>
-<TT>&#092;bibleverse{</TT><EM>book title</EM><TT>}({</TT><EM>chapter</EM><TT>}:</TT><I>verse(s)</I><TT>)</TT>
+<TT>&#092;bibleverse{</TT><EM>book title</EM><TT>}(</TT><I>chapter</I><TT>:</TT><I>verse(s)</I><TT>)</TT>
<P>
This command can be used to cite a bible book, chapter or verse
or range of chapters or verses.
@@ -154,7 +154,7 @@ Styles are listed in Table&nbsp;<A HREF="bibleref-manual.html#tab:styles">1</A>.
<BR>
<BR>
<DIV ALIGN="CENTER">
-<A NAME="210"></A>
+<A NAME="220"></A>
<TABLE CELLPADDING=3>
<CAPTION><STRONG>Table 1:</STRONG>
Bible Citation Styles (can be used as package option or in the argument to
@@ -205,6 +205,24 @@ Revelation to Apoc, do
<code>\setbookname{Rev}{Apoc}</code>)
<P>
+If you want a different title for a book depending on whether it's
+in the main body of the document or in the index, you can set the
+index version using:
+
+<P>
+<TT>&#092;setindexbooktitle{</TT><EM>name</EM><TT>}{</TT><EM>title</EM><TT>}</TT>
+<P>
+In this case, <I>name</I> should be the name you'll use in
+<TT>&#092;ibibleverse</TT>. For example, if you do:
+<PRE>
+\setbooktitle{Psalms}{Psalm}
+\setindexbooktitle{Psalms}{Psalms}
+</PRE>
+Then <code>\ibibleverse{Psalms}(2:)</code> will print Psalm the
+document and Psalms in the index, but <code>\ibibleverse{Ps}(2:)</code>
+will print Psalms in both the document and the index.
+
+<P>
You can add a book using
<P>
@@ -360,7 +378,7 @@ especially from Jesse&nbsp;Billett, Brooks&nbsp;Moses and Ulrich&nbsp;M.&nbsp;Sc
<A href="http://theoval.cmp.uea.ac.uk/~nlct/">Nicola L. C. Talbot</A>.
<A HREF="http://www.cmp.uea.ac.uk/">School of Computing Sciences</A>.
<A HREF="http://www.uea.ac.uk/">University of East Anglia.</A>
-Last Modified: 2010-04-26
+Last Modified: 2010-04-27
</ADDRESS>
</BODY>
</HTML>
diff --git a/Master/texmf-dist/doc/latex/bibleref/bibleref.pdf b/Master/texmf-dist/doc/latex/bibleref/bibleref.pdf
index e21234741ff..6ec4abb15d5 100644
--- a/Master/texmf-dist/doc/latex/bibleref/bibleref.pdf
+++ b/Master/texmf-dist/doc/latex/bibleref/bibleref.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bibleref/sample.pdf b/Master/texmf-dist/doc/latex/bibleref/sample.pdf
index 1424d1b6f0a..702fdbfa37a 100644
--- a/Master/texmf-dist/doc/latex/bibleref/sample.pdf
+++ b/Master/texmf-dist/doc/latex/bibleref/sample.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/bibleref/sample.tex b/Master/texmf-dist/doc/latex/bibleref/sample.tex
index de3c7185695..4b78a08a8c8 100644
--- a/Master/texmf-dist/doc/latex/bibleref/sample.tex
+++ b/Master/texmf-dist/doc/latex/bibleref/sample.tex
@@ -257,6 +257,7 @@ has verses in lower case Roman numerals, and redefines
\verb|\ibibleverse{Ex}| & \ibibleverse{Ex}\\
\verb|\ibibleverse{Exodus}(9:)| & \ibibleverse{Exodus}(9:)\\
\verb|\ibibleverse{Exod}(20:17)| & \ibibleverse{Exod}(20:17)\\
+\verb|\ibibleverse{Exod}(20:)| & \ibibleverse{Exod}(20:)\\
\verb|\ibibleverse{IICo}(12:21)| & \ibibleverse{IICo}(12:21)\\
\verb|\ibibleverse{IICor}(12:21-32)| & \ibibleverse{IICor}(12:21-32)\\
\verb|\ibibleverse{Ex}(20:17)(21:3)| & \ibibleverse{Ex}(20:17)(21:3)\\
diff --git a/Master/texmf-dist/source/latex/bibleref/bibleref.dtx b/Master/texmf-dist/source/latex/bibleref/bibleref.dtx
index 9d3b8c60841..19b3b6fdcfb 100644
--- a/Master/texmf-dist/source/latex/bibleref/bibleref.dtx
+++ b/Master/texmf-dist/source/latex/bibleref/bibleref.dtx
@@ -12,7 +12,7 @@
% -author "Nicola Talbot"
% -dir "source"
% bibleref
-% Created on 2010/4/26 11:18
+% Created on 2010/4/27 21:44
%\fi
%\iffalse
%<*package>
@@ -82,14 +82,14 @@
\newcommand*{\app}[1]{\texttt{#1}}
\OnlyDescription
-\CheckSum{1719}
+\CheckSum{1786}
\begin{document}
\DocInput{bibleref.dtx}
\end{document}
%</driver>
%\fi
-%\title{bibleref.sty v1.09: a \LaTeXe\ package for
+%\title{bibleref.sty v1.10: a \LaTeXe\ package for
%typesetting bible references}
%\author{Nicola Talbot\\[10pt]
%School of Computing Sciences\\
@@ -97,7 +97,7 @@
%Norwich. Norfolk. NR4 7TJ.\\
%United Kingdom\\
%\url{http://theoval.cmp.uea.ac.uk/~nlct/}}
-%\date{26th April 2010}
+%\date{27th April 2010}
%\maketitle
%\tableofcontents
%
@@ -108,7 +108,7 @@
%
%\DescribeMacro{\bibleverse}
%\begin{definition}
-%\cs{bibleverse}\marg{book title}\texttt(\marg{chapter}\texttt{:}\meta{verse(s)}\texttt)
+%\cs{bibleverse}\marg{book title}\texttt(\meta{chapter}\texttt{:}\meta{verse(s)}\texttt)
%\end{definition}
%This command can be used to cite a bible book, chapter or verse
%or range of chapters or verses.
@@ -191,6 +191,23 @@
%(\textbf{Note} that you shouldn't do
%\verb|\setbookname{Rev}{Apoc}|)
%
+%\DescribeMacro{\setindexbooktitle}
+%If you want a different title for a book depending on whether it's
+%in the main body of the document or in the index, you can set the
+%index version using:
+%\begin{definition}
+%\cs{setindexbooktitle}\marg{name}\marg{title}
+%\end{definition}
+%In this case, \meta{name} should be the name you'll use in
+%\cs{ibibleverse}. For example, if you do:
+%\begin{verbatim}
+%\setbooktitle{Psalms}{Psalm}
+%\setindexbooktitle{Psalms}{Psalms}
+%\end{verbatim}
+%Then \verb|\ibibleverse{Psalms}(2:)| will print Psalm the
+%document and Psalms in the index, but \verb|\ibibleverse{Ps}(2:)|
+%will print Psalms in both the document and the index.
+%
%\DescribeMacro{\addbiblebook}
%You can add a book using
%\begin{definition}
@@ -325,7 +342,7 @@
% Declare package
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{bibleref}[2010/04/26 1.09 (NLCT)]
+\ProvidesPackage{bibleref}[2010/04/27 1.10 (NLCT)]
% \end{macrocode}
% Need to do some conditional stuff
% \begin{macrocode}
@@ -1082,9 +1099,30 @@ defined}{}}}
% Redefines the title of book \meta{fullname}.
% \begin{macrocode}
\newcommand*{\setbooktitle}[2]{%
-\@ifundefined{br@#1}{\PackageError{bibleref}{Unknown
-book `#1'}{}}{%
-\expandafter\def\csname br@#1\endcsname{#2}}}
+ \@ifundefined{br@#1}%
+ {%
+ \PackageError{bibleref}{Unknown book `#1'}{}%
+ }%
+ {%
+ \expandafter\def\csname br@#1\endcsname{#2}%
+ }%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\setindexbooktitle}
+% Set alternative book title in the index
+%\changes{1.10}{2010/04/27}{new}
+% \begin{macrocode}
+\newcommand*{\setindexbooktitle}[2]{%
+ \@ifundefined{br@#1}%
+ {%
+ \PackageError{bibleref}{Unknown book `#1'}{}%
+ }%
+ {%
+ \expandafter\def\csname bri@#1\endcsname{#2}%
+ }%
+}
% \end{macrocode}
%\end{macro}
%
@@ -1130,20 +1168,32 @@ Unknown biblerefstyle '#1'}{}}{\csname brs@#1\endcsname}}
\@do@verses#1,\relax\end
\ifx\@nil#2\relax
\else
-\@bv@do{\BRvrsep}%
-\@@br@vrsty#2\end%
-\fi}
+ \@bv@addtochidxsort{-}%
+ \@bv@do{\BRvrsep}%
+ \@@br@vrsty#2\end%
+\fi
+}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\@@br@vrsty}
% Pick up a list
% \begin{macrocode}
\def\@do@verses#1,#2\end{%
-\ifthenelse{\equal{#1}{}}{}{\@bv@do{\BRversestyle{#1}}}%
-\ifx\relax#2\@empty
+\def\@br@tmp{#1}%
+\ifx\@br@tmp\@empty
\else
-\@bv@do{\BRvsep}%
-\@do@verses#2\end
+ \ifnum\@br@tmp<10\relax
+ \@bv@addtochidxsort{0#1}%
+ \else
+ \@bv@addtochidxsort{#1}%
+ \fi
+ \@bv@do{\BRversestyle{#1}}%
+\fi
+\ifx\relax#2\relax
+\else
+ \@bv@addtochidxsort{,}%
+ \@bv@do{\BRvsep}%
+ \@do@verses#2\end
\fi
}
% \end{macrocode}
@@ -1159,11 +1209,25 @@ Unknown biblerefstyle '#1'}{}}{\csname brs@#1\endcsname}}
% to see if there is a bracket \verb|(| immediately following it.
% \begin{macrocode}
\newcommand*{\bibleverse}[1]{%
-\@ifundefined{br@#1}{\PackageError{bibleref}{Unknown book '#1'}{%
-}}{\@bv@idxsort{\csname br@#1\endcsname}%
-\def\@bv@chidxsort{}%
-\@bv@do{\BRbooktitlestyle{\csname br@#1\endcsname}}}%
-\@ifnextchar({\BRbkchsep\@bv@addtoidx{!}\@bibleverse}{\@end@@bibleverse}%
+ \@ifundefined{br@#1}%
+ {%
+ \PackageError{bibleref}{Unknown book '#1'}{}%
+ }%
+ {%
+ \@bv@idxsort{\csname br@#1\endcsname}%
+ \def\@bv@chidxsort{}%
+ \BRbooktitlestyle{\csname br@#1\endcsname}%
+ \@ifundefined{bri@#1}%
+ {%
+ \def\@bv@mainidxentry{\BRbooktitlestyle{\csname br@#1\endcsname}}%
+ }%
+ {%
+ \def\@bv@mainidxentry{\BRbooktitlestyle{\csname bri@#1\endcsname}}%
+ }%
+ }%
+ \@ifnextchar(%
+ {\BRbkchsep\@bibleverse}%
+ {\@end@@bibleverse}%
}
% \end{macrocode}
%\end{macro}
@@ -1172,20 +1236,36 @@ Unknown biblerefstyle '#1'}{}}{\csname brs@#1\endcsname}}
% This gets the chapter number.
% \begin{macrocode}
\def\@bibleverse(#1:{%
-\ifthenelse{\equal{#1}{}}{}{%
-\ifthenelse{\equal{\@bv@chidxsort}{}}{%
-\def\@bvchidxsort{#1}\@bv@addtoidx{#1@}}{}%
-\@bv@do{\BRchapterstyle{#1}}}%
-\@@bibleverse}
+ \def\@bv@tmp{#1}%
+ \ifx\@bv@tmp\@empty
+ \else
+ \ifnum\@bv@tmp<10\relax
+ \@bv@addtochidxsort{0#1:}%
+ \else
+ \@bv@addtochidxsort{#1:}%
+ \fi
+ \@bv@do{\BRchapterstyle{#1}}%
+ \fi
+ \@@bibleverse
+}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\@bibleverser}
% This gets the second part of a range spanning chapters.
% \begin{macrocode}
\def\@bibleverser-(#1:{%
-\ifthenelse{\equal{#1}{}}{}{%
-\@bv@do{\BRchapterstyle{#1}}}%
-\@@bibleverse}
+ \def\@bv@tmp{#1}%
+ \ifx\@bv@tmp\@empty
+ \else
+ \ifnum\@bv@tmp<10\relax
+ \@bv@addtochidxsort{0#1:}%
+ \else
+ \@bv@addtochidxsort{#1:}%
+ \fi
+ \@bv@do{\BRchapterstyle{#1}}%
+ \fi
+ \@@bibleverse
+}
% \end{macrocode}
%\end{macro}
%
@@ -1195,9 +1275,18 @@ Unknown biblerefstyle '#1'}{}}{\csname brs@#1\endcsname}}
% chapter, verse pair).
% \begin{macrocode}
\def\@@bibleverse#1){%
-\ifthenelse{\equal{#1}{}}{}{\@bv@do{\BRchvsep}\@br@vrsty{#1}}%
-\@ifnextchar({\@bv@do{\BRchsep}\@bibleverse}%
-{\@ifnextchar-{\@bv@do{\BRvrsep}\@bibleverser}{\@end@@bibleverse}}}
+ \def\@bv@tmp{#1}%
+ \ifx\@bv@tmp\@empty
+ \else
+ \@bv@do{\BRchvsep}\@br@vrsty{#1}%
+ \fi
+ \@ifnextchar(%
+ {\@bv@do{\BRchsep}\@bibleverse}%
+ {\@ifnextchar-%
+ {\@bv@do{\BRvrsep}\@bibleverser}%
+ {\@end@@bibleverse}%
+ }%
+}
% \end{macrocode}
%\end{macro}
%
@@ -1205,12 +1294,19 @@ Unknown biblerefstyle '#1'}{}}{\csname brs@#1\endcsname}}
% This controls what to do at the end of the final
% verse.
%\changes{1.09}{2009/04/26}{replaced \cs{index} with \cs{biblerefindex}}
+%\changes{1.10}{2010/04/27}{separated child entry from parent entry to improve sorting}
% \begin{macrocode}
\newcommand*{\@end@@bibleverse}{%
\if@bv@idx
\expandafter\@do@bibleref@map\@@bv@idxsort\relax
- \biblerefindex{\@@bv@idxsort\relax @\@bv@idxentry|\@bv@idxpgformat}%
-\@bv@idxfalse
+ \ifx\@bv@idxentry\@empty
+ \def\@bv@tmp{\@bv@mainidxentry}%
+ \else
+ \def\@bv@tmp{\@bv@mainidxentry!\@bv@chidxsort @\@bv@idxentry}%
+ \fi
+ \biblerefindex
+ {\@@bv@idxsort\relax @\@bv@tmp|\@bv@idxpgformat}%
+ \@bv@idxfalse
\fi
}
% \end{macrocode}
@@ -1260,22 +1356,23 @@ Unknown biblerefstyle '#1'}{}}{\csname brs@#1\endcsname}}
\newtoks\@bv@tmpb
\newcommand{\@bv@addtoidx}[1]{%
\if@bv@idx
-\@bv@tmpa={#1}%
-\@bv@tmpb=\expandafter{\@bv@idxentry}%
-\edef\@bv@idxentry{\the\@bv@tmpb\the\@bv@tmpa}%
+ \@bv@tmpa={#1}%
+ \@bv@tmpb=\expandafter{\@bv@idxentry}%
+ \protected@edef\@bv@idxentry{\the\@bv@tmpb\the\@bv@tmpa}%
\fi}
% \end{macrocode}
%\end{macro}
%
-%\begin{macro}{\@bv@addtoidxsort}
-% Append text to \verb|\@@bv@idxsort|
+%\begin{macro}{\@bv@addtochidxsort}
+% Append text to \verb|\@bv@chidxsort|
% \begin{macrocode}
-\newcommand{\@bv@addtoidxsort}[1]{%
+\newcommand{\@bv@addtochidxsort}[1]{%
\if@bv@idx
-\@bv@tmpa={#1}%
-\@bv@tmpb=\expandafter{\@@bv@idxsort}%
-\edef\@@bv@idxsort{\the\@bv@tmpb\the\@bv@tmpa}%
-\fi}
+ \@bv@tmpa={#1}%
+ \@bv@tmpb=\expandafter{\@bv@chidxsort}%
+ \edef\@bv@chidxsort{\the\@bv@tmpb\the\@bv@tmpa}%
+\fi
+}
% \end{macrocode}
%\end{macro}
%\begin{macro}{\if@bv@idx}
@@ -1608,6 +1705,7 @@ has verses in lower case Roman numerals, and redefines
\verb|\ibibleverse{Ex}| & \ibibleverse{Ex}\\
\verb|\ibibleverse{Exodus}(9:)| & \ibibleverse{Exodus}(9:)\\
\verb|\ibibleverse{Exod}(20:17)| & \ibibleverse{Exod}(20:17)\\
+\verb|\ibibleverse{Exod}(20:)| & \ibibleverse{Exod}(20:)\\
\verb|\ibibleverse{IICo}(12:21)| & \ibibleverse{IICo}(12:21)\\
\verb|\ibibleverse{IICor}(12:21-32)| & \ibibleverse{IICor}(12:21-32)\\
\verb|\ibibleverse{Ex}(20:17)(21:3)| & \ibibleverse{Ex}(20:17)(21:3)\\
diff --git a/Master/texmf-dist/source/latex/bibleref/bibleref.ins b/Master/texmf-dist/source/latex/bibleref/bibleref.ins
index 4f423c625e7..2277885da0b 100644
--- a/Master/texmf-dist/source/latex/bibleref/bibleref.ins
+++ b/Master/texmf-dist/source/latex/bibleref/bibleref.ins
@@ -1,4 +1,4 @@
-% bibleref.ins generated using makedtx version 0.94b 2010/4/26 11:18
+% bibleref.ins generated using makedtx version 0.94b 2010/4/27 21:44
\input docstrip
\preamble
diff --git a/Master/texmf-dist/tex/latex/bibleref/bibleref.sty b/Master/texmf-dist/tex/latex/bibleref/bibleref.sty
index 106a78854f0..17cca438db0 100644
--- a/Master/texmf-dist/tex/latex/bibleref/bibleref.sty
+++ b/Master/texmf-dist/tex/latex/bibleref/bibleref.sty
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{bibleref}[2010/04/26 1.09 (NLCT)]
+\ProvidesPackage{bibleref}[2010/04/27 1.10 (NLCT)]
\RequirePackage{ifthen}
\RequirePackage{fmtcount}
\newcommand*{\BRbooknumberstyle}[1]{#1 }
@@ -591,9 +591,23 @@ chapter \numberstringnum{##1}}%
\PackageError{bibleref}{bible ref style '#1' already
defined}{}}}
\newcommand*{\setbooktitle}[2]{%
-\@ifundefined{br@#1}{\PackageError{bibleref}{Unknown
-book `#1'}{}}{%
-\expandafter\def\csname br@#1\endcsname{#2}}}
+ \@ifundefined{br@#1}%
+ {%
+ \PackageError{bibleref}{Unknown book `#1'}{}%
+ }%
+ {%
+ \expandafter\def\csname br@#1\endcsname{#2}%
+ }%
+}
+\newcommand*{\setindexbooktitle}[2]{%
+ \@ifundefined{br@#1}%
+ {%
+ \PackageError{bibleref}{Unknown book `#1'}{}%
+ }%
+ {%
+ \expandafter\def\csname bri@#1\endcsname{#2}%
+ }%
+}
\newcommand*{\addbiblebook}[2]{%
\@ifundefined{br@#1}%
{%
@@ -611,43 +625,100 @@ Unknown biblerefstyle '#1'}{}}{\csname brs@#1\endcsname}}
\@do@verses#1,\relax\end
\ifx\@nil#2\relax
\else
-\@bv@do{\BRvrsep}%
-\@@br@vrsty#2\end%
-\fi}
+ \@bv@addtochidxsort{-}%
+ \@bv@do{\BRvrsep}%
+ \@@br@vrsty#2\end%
+\fi
+}
\def\@do@verses#1,#2\end{%
-\ifthenelse{\equal{#1}{}}{}{\@bv@do{\BRversestyle{#1}}}%
-\ifx\relax#2\@empty
+\def\@br@tmp{#1}%
+\ifx\@br@tmp\@empty
+\else
+ \ifnum\@br@tmp<10\relax
+ \@bv@addtochidxsort{0#1}%
+ \else
+ \@bv@addtochidxsort{#1}%
+ \fi
+ \@bv@do{\BRversestyle{#1}}%
+\fi
+\ifx\relax#2\relax
\else
-\@bv@do{\BRvsep}%
-\@do@verses#2\end
+ \@bv@addtochidxsort{,}%
+ \@bv@do{\BRvsep}%
+ \@do@verses#2\end
\fi
}
\newcommand*{\bibleverse}[1]{%
-\@ifundefined{br@#1}{\PackageError{bibleref}{Unknown book '#1'}{%
-}}{\@bv@idxsort{\csname br@#1\endcsname}%
-\def\@bv@chidxsort{}%
-\@bv@do{\BRbooktitlestyle{\csname br@#1\endcsname}}}%
-\@ifnextchar({\BRbkchsep\@bv@addtoidx{!}\@bibleverse}{\@end@@bibleverse}%
+ \@ifundefined{br@#1}%
+ {%
+ \PackageError{bibleref}{Unknown book '#1'}{}%
+ }%
+ {%
+ \@bv@idxsort{\csname br@#1\endcsname}%
+ \def\@bv@chidxsort{}%
+ \BRbooktitlestyle{\csname br@#1\endcsname}%
+ \@ifundefined{bri@#1}%
+ {%
+ \def\@bv@mainidxentry{\BRbooktitlestyle{\csname br@#1\endcsname}}%
+ }%
+ {%
+ \def\@bv@mainidxentry{\BRbooktitlestyle{\csname bri@#1\endcsname}}%
+ }%
+ }%
+ \@ifnextchar(%
+ {\BRbkchsep\@bibleverse}%
+ {\@end@@bibleverse}%
}
\def\@bibleverse(#1:{%
-\ifthenelse{\equal{#1}{}}{}{%
-\ifthenelse{\equal{\@bv@chidxsort}{}}{%
-\def\@bvchidxsort{#1}\@bv@addtoidx{#1@}}{}%
-\@bv@do{\BRchapterstyle{#1}}}%
-\@@bibleverse}
+ \def\@bv@tmp{#1}%
+ \ifx\@bv@tmp\@empty
+ \else
+ \ifnum\@bv@tmp<10\relax
+ \@bv@addtochidxsort{0#1:}%
+ \else
+ \@bv@addtochidxsort{#1:}%
+ \fi
+ \@bv@do{\BRchapterstyle{#1}}%
+ \fi
+ \@@bibleverse
+}
\def\@bibleverser-(#1:{%
-\ifthenelse{\equal{#1}{}}{}{%
-\@bv@do{\BRchapterstyle{#1}}}%
-\@@bibleverse}
+ \def\@bv@tmp{#1}%
+ \ifx\@bv@tmp\@empty
+ \else
+ \ifnum\@bv@tmp<10\relax
+ \@bv@addtochidxsort{0#1:}%
+ \else
+ \@bv@addtochidxsort{#1:}%
+ \fi
+ \@bv@do{\BRchapterstyle{#1}}%
+ \fi
+ \@@bibleverse
+}
\def\@@bibleverse#1){%
-\ifthenelse{\equal{#1}{}}{}{\@bv@do{\BRchvsep}\@br@vrsty{#1}}%
-\@ifnextchar({\@bv@do{\BRchsep}\@bibleverse}%
-{\@ifnextchar-{\@bv@do{\BRvrsep}\@bibleverser}{\@end@@bibleverse}}}
+ \def\@bv@tmp{#1}%
+ \ifx\@bv@tmp\@empty
+ \else
+ \@bv@do{\BRchvsep}\@br@vrsty{#1}%
+ \fi
+ \@ifnextchar(%
+ {\@bv@do{\BRchsep}\@bibleverse}%
+ {\@ifnextchar-%
+ {\@bv@do{\BRvrsep}\@bibleverser}%
+ {\@end@@bibleverse}%
+ }%
+}
\newcommand*{\@end@@bibleverse}{%
\if@bv@idx
\expandafter\@do@bibleref@map\@@bv@idxsort\relax
- \biblerefindex{\@@bv@idxsort\relax @\@bv@idxentry|\@bv@idxpgformat}%
-\@bv@idxfalse
+ \ifx\@bv@idxentry\@empty
+ \def\@bv@tmp{\@bv@mainidxentry}%
+ \else
+ \def\@bv@tmp{\@bv@mainidxentry!\@bv@chidxsort @\@bv@idxentry}%
+ \fi
+ \biblerefindex
+ {\@@bv@idxsort\relax @\@bv@tmp|\@bv@idxpgformat}%
+ \@bv@idxfalse
\fi
}
\newcommand*{\biblerefindex}{\index}
@@ -665,16 +736,17 @@ Unknown biblerefstyle '#1'}{}}{\csname brs@#1\endcsname}}
\newtoks\@bv@tmpb
\newcommand{\@bv@addtoidx}[1]{%
\if@bv@idx
-\@bv@tmpa={#1}%
-\@bv@tmpb=\expandafter{\@bv@idxentry}%
-\edef\@bv@idxentry{\the\@bv@tmpb\the\@bv@tmpa}%
+ \@bv@tmpa={#1}%
+ \@bv@tmpb=\expandafter{\@bv@idxentry}%
+ \protected@edef\@bv@idxentry{\the\@bv@tmpb\the\@bv@tmpa}%
\fi}
-\newcommand{\@bv@addtoidxsort}[1]{%
+\newcommand{\@bv@addtochidxsort}[1]{%
\if@bv@idx
-\@bv@tmpa={#1}%
-\@bv@tmpb=\expandafter{\@@bv@idxsort}%
-\edef\@@bv@idxsort{\the\@bv@tmpb\the\@bv@tmpa}%
-\fi}
+ \@bv@tmpa={#1}%
+ \@bv@tmpb=\expandafter{\@bv@chidxsort}%
+ \edef\@bv@chidxsort{\the\@bv@tmpb\the\@bv@tmpa}%
+\fi
+}
\newif\if@bv@idx
\@bv@idxfalse
\newcommand{\@bv@idxsort}[1]{%