summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/bibleref
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-05-14 18:25:04 +0000
committerKarl Berry <karl@freefriends.org>2010-05-14 18:25:04 +0000
commit1d489c5acd49115955f035380e9ec36c51701827 (patch)
treed17c973ec385909cfe84904bd616a24ca6563a66 /Master/texmf-dist/source/latex/bibleref
parent4bdb3741be07ea2fb420fed48040d74b1b904341 (diff)
bibleref 1.12 (11may10)
git-svn-id: svn://tug.org/texlive/trunk@18247 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/bibleref')
-rw-r--r--Master/texmf-dist/source/latex/bibleref/bibleref.dtx535
-rw-r--r--Master/texmf-dist/source/latex/bibleref/bibleref.ins36
-rw-r--r--Master/texmf-dist/source/latex/bibleref/bibleref.sty851
3 files changed, 1311 insertions, 111 deletions
diff --git a/Master/texmf-dist/source/latex/bibleref/bibleref.dtx b/Master/texmf-dist/source/latex/bibleref/bibleref.dtx
index a1ec034df4f..558926080e0 100644
--- a/Master/texmf-dist/source/latex/bibleref/bibleref.dtx
+++ b/Master/texmf-dist/source/latex/bibleref/bibleref.dtx
@@ -7,12 +7,11 @@
% -comment ".+\.tex"
% -src "(.+)\.(sty)=>\1.\2"
% -src "(.+)\.(tex)=>\1.\2"
-% -src "bibleref.perl=>bibleref.perl"
+% -src "bibleref.perl\Z=>bibleref.perl"
% -doc "bibleref-manual.tex"
% -author "Nicola Talbot"
-% -dir "source"
% bibleref
-% Created on 2010/4/29 14:21
+% Created on 2010/5/11 18:06
%\fi
%\iffalse
%<*package>
@@ -39,57 +38,24 @@
% \fi
% \iffalse
%<*driver>
-\documentclass{ltxdoc}
+\documentclass{nlctdoc}
-\usepackage{color}
\usepackage{bibleref}
\usepackage[colorlinks,bookmarks,pdfauthor={Nicola L.C. Talbot},
hyperindex=false,
- pdftitle={bibleref.sty: a LaTeXe package for
+ pdftitle={bibleref.sty: a LaTeX package for
typesetting bible references}]{hyperref}
-\renewcommand{\usage}[1]{\textit{\hyperpage{#1}}}
-\renewcommand{\main}[1]{\hyperpage{#1}}
-\newcommand{\see}[2]{\emph{see} #1}
-
-
-\RecordChanges
-\PageIndex
-\CodelineNumbered
-\newcommand{\sty}[1]{\textsf{#1}}
-\newcommand*{\ics}[1]{\cs{#1}\SpecialMainIndex{#1}}
-
-\definecolor{defbackground}{rgb}{1,1,0.75}
-\newsavebox\defsbox
-\newlength\defwidth
-\newenvironment{definition}{%
-\setlength{\fboxsep}{4pt}\setlength{\fboxrule}{1.25pt}%
-\begin{lrbox}{\defsbox}%
-\setlength\defwidth\linewidth
-\addtolength\defwidth{-2\fboxrule}%
-\addtolength\defwidth{-2\fboxsep}%
-\begin{minipage}{\defwidth}\flushleft
-}{%
-\end{minipage}
-\end{lrbox}%
-\vskip10pt
-\noindent
-\fcolorbox{black}{defbackground}{\usebox\defsbox}%
-\vskip10pt
-}
-\newcommand*{\app}[1]{\texttt{#1}}
-
-\OnlyDescription
-\CheckSum{1772}
+\CheckSum{1892}
\begin{document}
\DocInput{bibleref.dtx}
\end{document}
%</driver>
%\fi
-%\title{bibleref.sty v1.11: a \LaTeXe\ package for
+%\title{bibleref.sty v1.12: a \LaTeXe\ package for
%typesetting bible references}
%\author{Nicola Talbot\\[10pt]
%School of Computing Sciences\\
@@ -97,7 +63,8 @@
%Norwich. Norfolk. NR4 7TJ.\\
%United Kingdom\\
%\url{http://theoval.cmp.uea.ac.uk/~nlct/}}
-%\date{29th April 2010}
+%\date{11th May 2010}
+%
%\maketitle
%\tableofcontents
%
@@ -106,8 +73,7 @@
%The \sty{bibleref} package was designed to provide consistent formatting for referencing
%parts of the bible.
%
-%\DescribeMacro{\bibleverse}
-%\begin{definition}
+%\begin{definition}[\DescribeMacro{\bibleverse}]
%\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
@@ -116,7 +82,7 @@
%The book title, \meta{book title}, may be given either as the
%full title (e.g.\ \texttt{Matthew}) or as an abbreviation (e.g.\
%\texttt{Mt} or \texttt{Matt}), most standard abbreviations are
-%recognised. Books with multiple parts should be preceeded by the
+%recognised. Books with multiple parts should be preceded by the
%book number in uppercase roman numerals. For example, the second
%book of Kings should be entered as \verb|\bibleverse{IIKings}|
%
@@ -126,10 +92,13 @@
%specified as a comma separated list of individual verses or range
%of verses. A range of verses should be written with a single
%hyphen, e.g.\ \verb|2-4|. In the typeset output the verses will
-%be separated with \DescribeMacro{\BRvsep}\cs{BRvsep} (an en-dash
-%by default.) A chapter may be referenced without a verse, but the
-%colon must remain, e.g.\ \verb|(12:)| simply indicates chapter
-%12.
+%be separated with
+%\begin{definition}[\DescribeMacro{\BRvsep}]
+%\cs{BRvsep}
+%\end{definition}
+%(an en-dash by default.) A chapter may be referenced without a
+%verse, but the colon must remain, e.g.\ \verb|(12:)| simply
+%indicates chapter 12.
%
%A range of verses spanning more than one chapter can
%be entered as \texttt(\meta{ch}\texttt:\meta{v}\texttt{)-(}\meta
@@ -153,8 +122,7 @@
%
%The style of the reference can be specified either by
%package option or as the argument to the command
-%\DescribeMacro{\biblerefstyle}
-%\begin{definition}
+%\begin{definition}[\DescribeMacro{\biblerefstyle}]
%\cs{biblerefstyle}\marg{style}
%\end{definition}
%Styles are listed in Table~\ref{tab:styles}.
@@ -179,9 +147,8 @@
%\end{center}
%\end{table}
%
-%\DescribeMacro{\setbooktitle}
%You can change the name of a book using
-%\begin{definition}
+%\begin{definition}[\DescribeMacro{\setbooktitle}]
%\cs{setbooktitle}\marg{name}\marg{new title}
%\end{definition}
%Note that \meta{name} must be the full name, not the
@@ -191,11 +158,10 @@
%(\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}
+%\begin{definition}[\DescribeMacro{\setindexbooktitle}]
%\cs{setindexbooktitle}\marg{name}\marg{title}
%\end{definition}
%In this case, \meta{name} should be the name you'll use in
@@ -208,30 +174,29 @@
%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}
+%\begin{definition}[\DescribeMacro{\addbiblebook}]
%\cs{addbiblebook}\marg{name}\marg{title}
%\end{definition}
%For example:
%\begin{verbatim}
%\addbiblebook{Susanna}{Story of Susanna}
%\end{verbatim}
+%\toTop
%
%\section{Defining New Styles}
%
%You can define a new style using the command
-%\DescribeMacro{\newbiblerefstyle}
-%\begin{definition}
+%\begin{definition}[\DescribeMacro{\newbiblerefstyle}]
%\cs{newbiblerefstyle}\marg{style-name}\marg{commands}
%\end{definition}\noindent
%where \meta{commands} are
%the commands needed to modify the citation style.
%
%Example:
-%This new style is based on the `default' style, but
+%This new style is based on the \qt{default} style, but
%has verses in lower case Roman numerals, and redefines
-%``Revelation'' as ``Apocalypse''.
+%\qt{Revelation} as \qt{Apocalypse}.
%\begin{verbatim}
%\newbiblerefstyle{sample}{%
%\biblerefstyle{default}%
@@ -240,19 +205,21 @@
%}
%\end{verbatim}
%Note the use of \verb|##1| instead of \verb|#1|.
+%\toTop
%
%\section{Indexing Bible References}
%
-%\DescribeMacro{\ibibleverse}
-%\begin{definition}
+%\begin{definition}[\DescribeMacro{\ibibleverse}]
%\cs{ibibleverse}\marg{book title}\texttt(\marg{chapter}\texttt{:}\meta{verse(s)}\texttt)
%\end{definition}
%This does the same as \cs{bibleverse}
%but also adds an index entry (provided you have used
%\cs{makeindex} in the preamble.) The default page number
%format is given by the command
-%\DescribeMacro{\bvidxpgformat}\cs{bvidxpgformat}. This
-%is \texttt{textrm} by default, but can be redefined. To
+%\begin{definition}[\DescribeMacro{\bvidxpgformat}]
+%\cs{bvidxpgformat}
+%\end{definition}
+%This is \texttt{textrm} by default, but can be redefined. To
%override the page number format for a particular entry you can
%use the optional argument to \cs{ibibleverse}. For example:
%\begin{verbatim}
@@ -260,10 +227,26 @@
%\end{verbatim}
%(Note there is no backslash.)
%
+%You may need to create your own custom \app{makeindex} style file
+%as the default uses a comma and space to separate the item from
+%the page number, which may cause confusion. For example, you
+%could create a file called \texttt{sample.ist} and write in the
+%lines:
+%\begin{verbatim}
+%delim_0 "\\dotfill "
+%delim_1 "\\dotfill "
+%delim_2 "\\dotfill "
+%\end{verbatim}
+%See the \app{makeindex} documentation for further details.
+%\toTop
+%
%\subsection{Separate Scripture Index}
%
%If you want a separate index for bible verses, in addition to
-%a general index, you can redefine \DescribeMacro{\biblerefindex}\cs{biblerefindex}.
+%a general index, you can redefine
+%\begin{definition}[\DescribeMacro{\biblerefindex}]
+%\cs{biblerefindex}
+%\end{definition}
%This command defaults to \cs{index}, but can be changed to
%the appropriate indexing command. For example, suppose you
%are using the \sty{multind} package and you want a general
@@ -286,6 +269,7 @@
%You will then need to run \app{makeindex} on the file
%\texttt{scripture.idx}. See the \sty{multind} documentation
%for further details.
+%\toTop
%
%\subsection{Changing the Sort Order}
%
@@ -296,8 +280,7 @@
%own custom alphabet (see \app{xindy} manual for details) or you
%can use \sty{bibleref}'s mapping command.
%
-%\DescribeMacro{\biblerefmap}
-%\begin{definition}
+%\begin{definition}[\DescribeMacro{\biblerefmap}]
%\cs{biblerefmap}\marg{label}\marg{new sort key}
%\end{definition}
%For example, in the preamble:
@@ -325,14 +308,20 @@
%\biblerefmap{Mark}{2@New Testament!02}
%...
%\end{verbatim}
+%\toTop
%
%\section{Acknowledgements}
%Many thanks to all the useful comments from comp.text.tex,
%especially from Jesse~Billett, Brooks~Moses and Ulrich~M.~Schwarz.
%
+%\StopEventually{\phantomsection
+%\addcontentsline{toc}{section}{Index}
+%\PrintIndex
+%\toTop
+%}
+%
%
%
-%\StopEventually{}
%\section{The Code}
%\iffalse
% \begin{macrocode}
@@ -342,7 +331,7 @@
% Declare package
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{bibleref}[2010/04/29 1.11 (NLCT)]
+\ProvidesPackage{bibleref}[2010/05/11 1.12 (NLCT)]
% \end{macrocode}
% Need to do some conditional stuff
% \begin{macrocode}
@@ -370,7 +359,7 @@
%\begin{macro}{\BRbookof}
%The text to go before the book title.
%This by default is nothing,
-% but can be changed to, e.g., ``The book of ''
+% but can be changed to, e.g., \qt{The book of }
% \begin{macrocode}
\newcommand*{\BRbookof}{}
% \end{macrocode}
@@ -396,7 +385,7 @@
% \end{macrocode}
%\end{macro}
%\begin{macro}{\BRepistleof}
-% As above but for ``epistles of''
+% As above but for \qt{epistles of }
% \begin{macrocode}
\newcommand*{\BRepistleof}{}
% \end{macrocode}
@@ -423,6 +412,13 @@
\newcommand*{\BRversestyle}[1]{#1}
% \end{macrocode}
%\end{macro}
+%\begin{macro}{\BRversesuffixstyle}
+%The style of the verse suffix.
+% By default is simply displays its argument.
+% \begin{macrocode}
+\newcommand*{\BRversesuffixstyle}[1]{#1}
+% \end{macrocode}
+%\end{macro}
%
%\begin{macro}{\BRbkchsep}
%The separator between the book title
@@ -852,6 +848,7 @@
\renewcommand*{\BRbooktitlestyle}[1]{##1}%
\renewcommand*{\BRchapterstyle}[1]{##1}%
\renewcommand*{\BRversestyle}[1]{##1}%
+\renewcommand*{\BRversesuffixstyle}[1]{##1}%
\renewcommand*{\BRbookof}{}%
\renewcommand*{\BRgospel}{}%
\renewcommand*{\BRepistletothe}{}%
@@ -875,6 +872,7 @@
\renewcommand*{\BRbooktitlestyle}[1]{##1}%
\renewcommand*{\BRchapterstyle}[1]{##1}%
\renewcommand*{\BRversestyle}[1]{##1}%
+\renewcommand*{\BRversesuffixstyle}[1]{##1}%
\renewcommand*{\BRbookof}{}%
\renewcommand*{\BRgospel}{}%
\renewcommand*{\BRepistletothe}{}%
@@ -899,6 +897,7 @@
\renewcommand*{\BRbooktitlestyle}[1]{##1}%
\renewcommand*{\BRchapterstyle}[1]{\MakeUppercase{\romannumeral##1}}%
\renewcommand*{\BRversestyle}[1]{##1}%
+\renewcommand*{\BRversesuffixstyle}[1]{##1}%
\renewcommand*{\BRbookof}{}%
\renewcommand*{\BRgospel}{}%
\renewcommand*{\BRepistletothe}{}%
@@ -923,6 +922,7 @@
\renewcommand*{\BRbooktitlestyle}[1]{##1}%
\renewcommand*{\BRchapterstyle}[1]{\romannumeral##1}%
\renewcommand*{\BRversestyle}[1]{##1}%
+\renewcommand*{\BRversesuffixstyle}[1]{##1}%
\renewcommand*{\BRbookof}{}%
\renewcommand*{\BRgospel}{}%
\renewcommand*{\BRepistletothe}{}%
@@ -947,6 +947,7 @@
\renewcommand*{\BRbooktitlestyle}[1]{##1}%
\renewcommand*{\BRchapterstyle}[1]{\romannumeral##1}%
\renewcommand*{\BRversestyle}[1]{##1}%
+\renewcommand*{\BRversesuffixstyle}[1]{##1}%
\renewcommand*{\BRbookof}{}%
\renewcommand*{\BRgospel}{}%
\renewcommand*{\BRepistletothe}{}%
@@ -971,6 +972,7 @@
\renewcommand*{\BRbooktitlestyle}[1]{##1}%
\renewcommand*{\BRchapterstyle}[1]{\romannumeral##1}%
\renewcommand*{\BRversestyle}[1]{##1}%
+\renewcommand*{\BRversesuffixstyle}[1]{##1}%
\renewcommand*{\BRbookof}{}%
\renewcommand*{\BRgospel}{}%
\renewcommand*{\BRepistletothe}{}%
@@ -995,6 +997,7 @@
\renewcommand*{\BRbooktitlestyle}[1]{##1}%
\renewcommand*{\BRchapterstyle}[1]{\romannumeral##1}%
\renewcommand*{\BRversestyle}[1]{##1}%
+\renewcommand*{\BRversesuffixstyle}[1]{##1}%
\renewcommand*{\BRbookof}{}%
\renewcommand*{\BRgospel}{}%
\renewcommand*{\BRepistletothe}{}%
@@ -1019,6 +1022,7 @@
\renewcommand*{\BRbooktitlestyle}[1]{##1}%
\renewcommand*{\BRchapterstyle}[1]{\romannumeral##1}%
\renewcommand*{\BRversestyle}[1]{##1}%
+\renewcommand*{\BRversesuffixstyle}[1]{##1}%
\renewcommand*{\BRbookof}{}%
\renewcommand*{\BRgospel}{}%
\renewcommand*{\BRepistletothe}{}%
@@ -1055,6 +1059,7 @@ chapter \numberstringnum{##1}}%
\renewcommand{\BRvrsep}{ to }%
\renewcommand{\BRvsep}{, }%
\renewcommand{\BRversestyle}[1]{\numberstringnum{##1}}%
+\renewcommand*{\BRversesuffixstyle}[1]{##1}%
}
% \end{macrocode}
%\end{macro}
@@ -1157,6 +1162,9 @@ Unknown biblerefstyle '#1'}{}}{\csname brs@#1\endcsname}}
%\begin{macro}{\@br@vrsty}
% Verses may be supplied as a range. Provide a command
% to detect whether single number or range supplied.
+% Verses may have a number appended (e.g.\ 15a). This needs
+% to be checked.
+%\changes{1.12}{2010/05/11}{Check for letters after verse number}
% \begin{macrocode}
\newcommand*{\@br@vrsty}[1]{\@@br@vrsty#1-\@nil\end}
% \end{macrocode}
@@ -1175,6 +1183,79 @@ Unknown biblerefstyle '#1'}{}}{\csname brs@#1\endcsname}}
}
% \end{macrocode}
%\end{macro}
+%
+%\begin{macro}{\@br@stripverse}
+% Strip trailing letters from verse. Number is stored in
+% \cs{@br@versenum} and the suffix is stored in
+% \cs{@br@versesuffix}.
+% \begin{macrocode}
+\def\br@stripverse#1{%
+ \def\@br@versenum{}%
+ \def\@br@versesuffix{}%
+ \@br@stripverse#1\relax
+}
+\def\@br@stripverse#1#2{%
+ \@br@checkisdigit{#1}%
+ \if@br@isdigit
+ \expandafter\toks@\expandafter{\@br@versenum}%
+ \edef\@br@versenum{\the\toks@#1}%
+ \let\@br@next\@br@stripverse
+ \else
+ \def\@br@versesuffix{#1}%
+ \let\@br@next\@@br@stripverse
+ \fi
+ \ifx#2\relax
+ \let\@br@next\relax
+ \fi
+ \@br@next#2%
+}
+\def\@@br@stripverse#1\relax{%
+ \protected@edef\@br@versesuffix{\@br@versesuffix#1}%
+}
+% \end{macrocode}
+%\end{macro}
+%
+%\begin{macro}{\@br@checkisdigit}
+% Check if argument is a digit.
+% \begin{macrocode}
+\newif\if@br@isdigit
+\newcommand*{\@br@checkisdigit}[1]{%
+ \@br@isdigittrue
+ \if#10\relax
+ \else
+ \if#11\relax
+ \else
+ \if#12\relax
+ \else
+ \if#13\relax
+ \else
+ \if#14\relax
+ \else
+ \if#15\relax
+ \else
+ \if#16\relax
+ \else
+ \if#17\relax
+ \else
+ \if#18\relax
+ \else
+ \if#19\relax
+ \else
+ \@br@isdigitfalse
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+}
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\@@br@vrsty}
% Pick up a list
% \begin{macrocode}
@@ -1182,16 +1263,26 @@ Unknown biblerefstyle '#1'}{}}{\csname brs@#1\endcsname}}
\def\@br@tmp{#1}%
\ifx\@br@tmp\@empty
\else
- \ifnum\@br@tmp<10\relax
+% \end{macrocode}
+% Strip suffix, if it exists.
+% \begin{macrocode}
+ \br@stripverse{#1}%
+% \end{macrocode}
+% Prepend leading zeroes if required.
+% \begin{macrocode}
+ \ifnum\@br@versenum<10\relax
\@bv@addtochidxsort{00#1}%
\else
- \ifnum\@br@tmp<100\relax
+ \ifnum\@br@versenum<100\relax
\@bv@addtochidxsort{0#1}%
\else
\@bv@addtochidxsort{#1}%
\fi
\fi
- \@bv@do{\BRversestyle{#1}}%
+ \edef\@br@tmp{%
+ \noexpand\BRversestyle{\@br@versenum}%
+ \noexpand\BRversesuffixstyle{\@br@versesuffix}}%
+ \expandafter\@bv@do\expandafter{\@br@tmp}%
\fi
\ifx\relax#2\relax
\else
@@ -1435,6 +1526,297 @@ Unknown biblerefstyle '#1'}{}}{\csname brs@#1\endcsname}}
%\fi
%\iffalse
% \begin{macrocode}
+%<*bibleref-manual.tex>
+% \end{macrocode}
+%\fi
+%\iffalse
+\documentclass{nlctdoc}
+
+\usepackage{bibleref}
+\usepackage[colorlinks,bookmarks,pdfauthor={Nicola L.C. Talbot},
+ hyperindex=false,
+ pdftitle={bibleref.sty: a LaTeX package for
+ typesetting bible references}]{hyperref}
+
+\usepackage{creatdtx}
+
+\CheckSum{1892}
+
+\begin{document}
+\title{bibleref.sty v1.12: a \LaTeXe\ package for
+typesetting bible references}
+\author{Nicola Talbot\\[10pt]
+School of Computing Sciences\\
+University of East Anglia\\
+Norwich. Norfolk. NR4 7TJ.\\
+United Kingdom\\
+\url{http://theoval.cmp.uea.ac.uk/~nlct/}}
+\date{11th May 2010}
+
+\maketitle
+\tableofcontents
+
+\section{Introduction}
+
+The \sty{bibleref} package was designed to provide consistent formatting for referencing
+parts of the bible.
+
+\begin{definition}[\DescribeMacro{\bibleverse}]
+\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.
+
+The book title, \meta{book title}, may be given either as the
+full title (e.g.\ \texttt{Matthew}) or as an abbreviation (e.g.\
+\texttt{Mt} or \texttt{Matt}), most standard abbreviations are
+recognised. Books with multiple parts should be preceded by the
+book number in uppercase roman numerals. For example, the second
+book of Kings should be entered as \verb|\bibleverse{IIKings}|
+
+You may have any number, or zero, sets of parenthesis
+\verb|(|\meta{chapter}\texttt{:}\meta{verse(s)}\verb|)|,
+indicating the chapter and verse or verses. Verses can be
+specified as a comma separated list of individual verses or range
+of verses. A range of verses should be written with a single
+hyphen, e.g.\ \verb|2-4|. In the typeset output the verses will
+be separated with
+\begin{definition}[\DescribeMacro{\BRvsep}]
+\cs{BRvsep}
+\end{definition}
+(an en-dash by default.) A chapter may be referenced without a
+verse, but the colon must remain, e.g.\ \verb|(12:)| simply
+indicates chapter 12.
+
+A range of verses spanning more than one chapter can
+be entered as \texttt(\meta{ch}\texttt:\meta{v}\texttt{)-(}\meta
+{ch}\texttt:\meta{v}\texttt)
+
+Examples:
+\begin{center}
+\begin{tabular}{ll}
+\verb|\bibleverse{Ex}| & \bibleverse{Ex}\\
+\verb|\bibleverse{Exodus}(20:)| & \bibleverse{Exodus}(20:)\\
+\verb|\bibleverse{Exod}(20:17)| & \bibleverse{Exod}(20:17)\\
+\verb|\bibleverse{IICo}(12:21)| & \bibleverse{IICo}(12:21)\\
+\verb|\bibleverse{IICor}(12:21-32)| & \bibleverse{IICor}(12:21-32)\\
+\verb|\bibleverse{Ex}(20:17)(21:3)| & \bibleverse{Ex}(20:17)(21:3)\\
+\verb|\bibleverse{Ex}(15:)(17:)(20:)| & \bibleverse{Ex}(15:)(17:)(20:)\\
+\verb|\bibleverse{Rev}(1:2,5,7-9,11)| & \bibleverse{Rev}(1:2,5,7-9,11)\\
+\verb|\bibleverse{IChronicles}(1:3)-(2:7)| &
+\bibleverse{IChronicles}(1:3)-(2:7)
+\end{tabular}
+\end{center}
+
+The style of the reference can be specified either by
+package option or as the argument to the command
+\begin{definition}[\DescribeMacro{\biblerefstyle}]
+\cs{biblerefstyle}\marg{style}
+\end{definition}
+Styles are listed in Table~\ref{tab:styles}.
+
+\begin{table}[tbh]
+\caption{Bible Citation Styles (can be used as package option or in the argument to
+\cs{biblerefstyle})}
+\label{tab:styles}
+\vspace{10pt}
+\begin{center}
+\begin{tabular}{lp{0.5\textwidth}}
+\bfseries Style & \bfseries Example\\
+default & \biblerefstyle{default}\bibleverse{IICor}(12:1-5)\\
+jerusalem & \biblerefstyle{jerusalem}\bibleverse{IICor}(12:1-5)\\
+anglosaxon & \biblerefstyle{anglosaxon}\bibleverse{IICor}(12:1-5)\\
+JEH & \biblerefstyle{JEH}\bibleverse{IICor}(12:1-5)\\
+NTG & \biblerefstyle{NTG}\bibleverse{IICor}(12:1-5)\\
+MLA & \biblerefstyle{MLA}\bibleverse{IICor}(12:1-5)\\
+chicago & \biblerefstyle{chicago}\bibleverse{IICor}(12:1-5)\\
+text & \biblerefstyle{text}\bibleverse{IICor}(12:1-5)
+\end{tabular}
+\end{center}
+\end{table}
+
+You can change the name of a book using
+\begin{definition}[\DescribeMacro{\setbooktitle}]
+\cs{setbooktitle}\marg{name}\marg{new title}
+\end{definition}
+Note that \meta{name} must be the full name, not the
+abbreviated name of the book. For example, to change
+Revelation to Apoc, do
+\verb|\setbookname{Revelation}{Apoc}|
+(\textbf{Note} that you shouldn't do
+\verb|\setbookname{Rev}{Apoc}|)
+
+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}[\DescribeMacro{\setindexbooktitle}]
+\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.
+
+You can add a book using
+\begin{definition}[\DescribeMacro{\addbiblebook}]
+\cs{addbiblebook}\marg{name}\marg{title}
+\end{definition}
+For example:
+\begin{verbatim}
+\addbiblebook{Susanna}{Story of Susanna}
+\end{verbatim}
+\toTop
+
+\section{Defining New Styles}
+
+You can define a new style using the command
+\begin{definition}[\DescribeMacro{\newbiblerefstyle}]
+\cs{newbiblerefstyle}\marg{style-name}\marg{commands}
+\end{definition}\noindent
+where \meta{commands} are
+the commands needed to modify the citation style.
+
+Example:
+This new style is based on the \qt{default} style, but
+has verses in lower case Roman numerals, and redefines
+\qt{Revelation} as \qt{Apocalypse}.
+\begin{verbatim}
+\newbiblerefstyle{sample}{%
+\biblerefstyle{default}%
+\renewcommand{\BRversestyle}[1]{\romannumeral##1}%
+\setbooktitle{Revelation}{Apocalypse}%
+}
+\end{verbatim}
+Note the use of \verb|##1| instead of \verb|#1|.
+\toTop
+
+\section{Indexing Bible References}
+
+\begin{definition}[\DescribeMacro{\ibibleverse}]
+\cs{ibibleverse}\marg{book title}\texttt(\marg{chapter}\texttt{:}\meta{verse(s)}\texttt)
+\end{definition}
+This does the same as \cs{bibleverse}
+but also adds an index entry (provided you have used
+\cs{makeindex} in the preamble.) The default page number
+format is given by the command
+\begin{definition}[\DescribeMacro{\bvidxpgformat}]
+\cs{bvidxpgformat}
+\end{definition}
+This is \texttt{textrm} by default, but can be redefined. To
+override the page number format for a particular entry you can
+use the optional argument to \cs{ibibleverse}. For example:
+\begin{verbatim}
+\ibibleverse[textit]{Exodus}
+\end{verbatim}
+(Note there is no backslash.)
+
+You may need to create your own custom \app{makeindex} style file
+as the default uses a comma and space to separate the item from
+the page number, which may cause confusion. For example, you
+could create a file called \texttt{sample.ist} and write in the
+lines:
+\begin{verbatim}
+delim_0 "\\dotfill "
+delim_1 "\\dotfill "
+delim_2 "\\dotfill "
+\end{verbatim}
+See the \app{makeindex} documentation for further details.
+\toTop
+
+\subsection{Separate Scripture Index}
+
+If you want a separate index for bible verses, in addition to
+a general index, you can redefine
+\begin{definition}[\DescribeMacro{\biblerefindex}]
+\cs{biblerefindex}
+\end{definition}
+This command defaults to \cs{index}, but can be changed to
+the appropriate indexing command. For example, suppose you
+are using the \sty{multind} package and you want a general
+index and a scripture index, you can do something like:
+\begin{verbatim}
+\documentclass{article}
+\usepackage{bibleref}
+\usepackage{multind}
+
+\makeindex{scripture}
+\makeindex{general}
+
+\renewcommand{\biblerefindex}{\index{scripture}}
+\end{verbatim}
+In the document, you can use \cs{ibibleverse} as before, and
+the scripture index is displayed using
+\begin{verbatim}
+\printindex{scripture}{Scripture Index}
+\end{verbatim}
+You will then need to run \app{makeindex} on the file
+\texttt{scripture.idx}. See the \sty{multind} documentation
+for further details.
+\toTop
+
+\subsection{Changing the Sort Order}
+
+The bible reference entries will be sorted alphabetically by
+\app{makeindex}. However you may prefer the entries to be sorted
+according to their order in the bible. This can either be done
+using \app{xindy} instead of \app{makeindex} and creating your
+own custom alphabet (see \app{xindy} manual for details) or you
+can use \sty{bibleref}'s mapping command.
+
+\begin{definition}[\DescribeMacro{\biblerefmap}]
+\cs{biblerefmap}\marg{label}\marg{new sort key}
+\end{definition}
+For example, in the preamble:
+\begin{verbatim}
+\biblerefmap{Genesis}{01}
+\biblerefmap{Exodus}{02}
+\biblerefmap{Leviticus}{03}
+\biblerefmap{Numbers}{04}
+\biblerefmap{Deuteronomy}{05}
+...
+\end{verbatim}
+When you run \app{makeindex}, the references will now be sorted
+in numerical order.
+
+If you want to subdivide the index into, say, old and new
+testament, you can add this to the mapping. For example:
+\begin{verbatim}
+\biblerefmap{Genesis}{1@Old Testament!01}
+\biblerefmap{Exodus}{1@Old Testament!02}
+\biblerefmap{Leviticus}{1@Old Testament!03}
+\biblerefmap{Numbers}{1@Old Testament!04}
+\biblerefmap{Deuteronomy}{1@Old Testament!05}
+...
+\biblerefmap{Matthew}{2@New Testament!01}
+\biblerefmap{Mark}{2@New Testament!02}
+...
+\end{verbatim}
+\toTop
+
+\section{Acknowledgements}
+Many thanks to all the useful comments from comp.text.tex,
+especially from Jesse~Billett, Brooks~Moses and Ulrich~M.~Schwarz.
+
+\StopEventually{\phantomsection
+\addcontentsline{toc}{section}{Index}
+\PrintIndex
+\toTop
+}
+
+\end{document}
+%\fi
+%\iffalse
+% \begin{macrocode}
+%</bibleref-manual.tex>
+% \end{macrocode}
+%\fi
+%\iffalse
+% \begin{macrocode}
%<*sample-multind.tex>
% \end{macrocode}
%\fi
@@ -1509,6 +1891,7 @@ Another new testament reference \ibibleverse{Matt}.
\renewcommand{\bvidxpgformat}{textit}
\begin{document}
+
\title{Sample Document}
\author{Nicola Talbot}
\maketitle
@@ -1726,7 +2109,9 @@ has verses in lower case Roman numerals, and redefines
\verb|\ibibleverse{Ex}(15:)(17:)(20:)| & \ibibleverse{Ex}(15:)(17:)(20:)\\
\verb|\ibibleverse{Rev}(1:2,5,7-9,11)| & \ibibleverse{Rev}(1:2,5,7-9,11)\\
\verb|\ibibleverse{IChronicles}(1:3)-(2:7)| &
-\ibibleverse{IChronicles}(1:3)-(2:7)
+\ibibleverse{IChronicles}(1:3)-(2:7)\\
+\verb|\ibibleverse{IIPeter}(3:8-15a)| &
+\ibibleverse{IIPeter}(3:8-15a)
\end{tabular}
\printindex
diff --git a/Master/texmf-dist/source/latex/bibleref/bibleref.ins b/Master/texmf-dist/source/latex/bibleref/bibleref.ins
deleted file mode 100644
index 2832f99b728..00000000000
--- a/Master/texmf-dist/source/latex/bibleref/bibleref.ins
+++ /dev/null
@@ -1,36 +0,0 @@
-% bibleref.ins generated using makedtx version 0.94b 2010/4/29 14:21
-\input docstrip
-
-\preamble
-
- bibleref.dtx
- Copyright 2010 Nicola Talbot
-
- This work may be distributed and/or modified under the
- conditions of the LaTeX Project Public License, either version 1.3
- of this license of (at your option) any later version.
- The latest version of this license is in
- http://www.latex-project.org/lppl.txt
- and version 1.3 or later is part of all distributions of LaTeX
- version 2005/12/01 or later.
-
- This work has the LPPL maintenance status `maintained'.
-
- The Current Maintainer of this work is Nicola Talbot.
-
- This work consists of the files bibleref.dtx and bibleref.ins and the derived files bibleref.sty, sample-multind.tex, sample.tex, bibleref.perl.
-
-\endpreamble
-
-\askforoverwritefalse
-
-\generate{\file{bibleref.sty}{\usepreamble\defaultpreamble
-\usepostamble\defaultpostamble\from{bibleref.dtx}{bibleref.sty,package}}
-\file{sample-multind.tex}{\usepreamble\defaultpreamble
-\usepostamble\defaultpostamble\from{bibleref.dtx}{sample-multind.tex,package}}
-\file{sample.tex}{\usepreamble\defaultpreamble
-\usepostamble\defaultpostamble\from{bibleref.dtx}{sample.tex,package}}
-\file{bibleref.perl}{\nopreamble\nopostamble\from{bibleref.dtx}{bibleref.perl}}
-}
-
-\endbatchfile
diff --git a/Master/texmf-dist/source/latex/bibleref/bibleref.sty b/Master/texmf-dist/source/latex/bibleref/bibleref.sty
new file mode 100644
index 00000000000..c09911c7c6e
--- /dev/null
+++ b/Master/texmf-dist/source/latex/bibleref/bibleref.sty
@@ -0,0 +1,851 @@
+%%
+%% This is file `bibleref.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% bibleref.dtx (with options: `bibleref.sty,package')
+%%
+%% bibleref.dtx
+%% Copyright 2010 Nicola Talbot
+%%
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3
+%% of this license of (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Nicola Talbot.
+%%
+%% This work consists of the files bibleref.dtx and bibleref.ins and the derived files bibleref.sty, bibleref-manual.tex, sample-multind.tex, sample.tex, bibleref.perl.
+%%
+%% \CharacterTable
+%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+%% Digits \0\1\2\3\4\5\6\7\8\9
+%% Exclamation \! Double quote \" Hash (number) \#
+%% Dollar \$ Percent \% Ampersand \&
+%% Acute accent \' Left paren \( Right paren \)
+%% Asterisk \* Plus \+ Comma \,
+%% Minus \- Point \. Solidus \/
+%% Colon \: Semicolon \; Less than \<
+%% Equals \= Greater than \> Question mark \?
+%% Commercial at \@ Left bracket \[ Backslash \\
+%% Right bracket \] Circumflex \^ Underscore \_
+%% Grave accent \` Left brace \{ Vertical bar \|
+%% Right brace \} Tilde \~}
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{bibleref}[2010/05/11 1.12 (NLCT)]
+\RequirePackage{ifthen}
+\RequirePackage{fmtcount}
+\newcommand*{\BRbooknumberstyle}[1]{#1 }
+\newcommand*{\BRepistlenumberstyle}[1]{#1 }
+\newcommand*{\BRbookof}{}
+\newcommand*{\BRgospel}{}
+\newcommand*{\BRepistleto}{}
+\newcommand*{\BRepistletothe}{}
+\newcommand*{\BRepistleof}{}
+\newcommand*{\BRbooktitlestyle}[1]{#1}
+\newcommand*{\BRchapterstyle}[1]{#1}
+\newcommand*{\BRversestyle}[1]{#1}
+\newcommand*{\BRversesuffixstyle}[1]{#1}
+\newcommand*{\BRbkchsep}{ }
+\newcommand*{\BRchvsep}{:}
+\newcommand*{\BRchsep}{;}
+\newcommand*{\BRvrsep}{--}
+\newcommand*{\BRvsep}{,}
+\newcommand*{\BRperiod}{}
+\newcommand*{\brfullname}{%
+\def\br@Genesis{\BRbookof Genesis}%
+\def\br@Exodus{\BRbookof Exodus}%
+\def\br@Leviticus{\BRbookof Leviticus}%
+\def\br@Numbers{\BRbookof Numbers}%
+\def\br@Deuteronomy{\BRbookof Deuteronomy}%
+\def\br@Joshua{\BRbookof Joshua}%
+\def\br@Judges{\BRbookof Judges}%
+\def\br@Ruth{\BRbookof Ruth}%
+\def\br@ISamuel{\BRbooknumberstyle{1}\BRbookof Samuel}%
+\def\br@IISamuel{\BRbooknumberstyle{2}\BRbookof Samuel}%
+\def\br@IKings{\BRbooknumberstyle{1}\BRbookof Kings}%
+\def\br@IIKings{\BRbooknumberstyle{2}\BRbookof Kings}%
+\def\br@IChronicles{\BRbooknumberstyle{1}\BRbookof Chronicles}%
+\def\br@IIChronicles{\BRbooknumberstyle{2}\BRbookof Chronicles}%
+\def\br@Ezra{\BRbookof Ezra}%
+\def\br@Nehemiah{\BRbookof Nehemiah}%
+\def\br@Tobit{\BRbookof Tobit}%
+\def\br@Judith{\BRbookof Judith}%
+\def\br@Esther{\BRbookof Esther}%
+\def\br@IMaccabees{\BRbooknumberstyle{1}\BRbookof Maccabees}%
+\def\br@IIMaccabees{\BRbooknumberstyle{2}\BRbookof Maccabees}%
+\def\br@Job{\BRbookof Job}%
+\def\br@Psalms{\BRbookof Psalms}%
+\def\br@Proverbs{\BRbookof Proverbs}%
+\def\br@Ecclesiastes{\BRbookof Ecclesiastes}%
+\def\br@SongofSongs{\BRbookof Song of Songs}%
+\def\br@Wisdom{\BRbookof Wisdom}%
+\def\br@Ecclesiasticus{\BRbookof Ecclesiasticus}%
+\def\br@Isaiah{\BRbookof Isaiah}%
+\def\br@Jeremiah{\BRbookof Jeremiah}%
+\def\br@Lamentations{\BRbookof Lamentations}%
+\def\br@Baruch{\BRbookof Baruch}%
+\def\br@Ezekiel{\BRbookof Ezekiel}%
+\def\br@Daniel{\BRbookof Daniel}%
+\def\br@Hosea{\BRbookof Hosea}%
+\def\br@Joel{\BRbookof Joel}%
+\def\br@Amos{\BRbookof Amos}%
+\def\br@Obadiah{\BRbookof Obadiah}%
+\def\br@Jonah{\BRbookof Jonah}%
+\def\br@Micah{\BRbookof Micah}%
+\def\br@Nahum{\BRbookof Nahum}%
+\def\br@Habakkuk{\BRbookof Habakkuk}%
+\def\br@Zephaniah{\BRbookof Zephaniah}%
+\def\br@Haggai{\BRbookof Haggai}%
+\def\br@Zechariah{\BRbookof Zechariah}%
+\def\br@Malachi{\BRbookof Malachi}%
+\def\br@Matthew{\BRgospel Matthew}%
+\def\br@Mark{\BRgospel Mark}%
+\def\br@Luke{\BRgospel Luke}%
+\def\br@John{\BRgospel John}%
+\def\br@Acts{Acts}%
+\def\br@Romans{\BRepistletothe Romans}%
+\def\br@ICorinthians{\BRepistlenumberstyle{1}\BRepistletothe Corinthians}%
+\def\br@IICorinthians{\BRepistlenumberstyle{2}\BRepistletothe Corinthians}%
+\def\br@Galatians{\BRepistletothe Galatians}%
+\def\br@Ephesians{\BRepistletothe Ephesians}%
+\def\br@Philippians{\BRepistletothe Philippians}%
+\def\br@Colossians{\BRepistletothe Colossians}%
+\def\br@IThessalonians{\BRepistlenumberstyle{1}\BRepistletothe Thessalonians}%
+\def\br@IIThessalonians{\BRepistlenumberstyle{2}\BRepistletothe Thessalonians}%
+\def\br@ITimothy{\BRepistlenumberstyle{1}\BRepistleto Timothy}%
+\def\br@IITimothy{\BRepistlenumberstyle{2}\BRepistleto Timothy}%
+\def\br@Titus{\BRepistleto Titus}%
+\def\br@Philemon{\BRepistleto Philemon}%
+\def\br@Hebrews{\BRepistletothe Hebrews}%
+\def\br@James{\BRepistleof James}%
+\def\br@IPeter{\BRepistlenumberstyle{1}\BRepistleof Peter}%
+\def\br@IIPeter{\BRepistlenumberstyle{2}\BRepistleof Peter}%
+\def\br@IJohn{\BRepistlenumberstyle{1}\BRepistleof John}%
+\def\br@IIJohn{\BRepistlenumberstyle{2}\BRepistleof John}%
+\def\br@IIIJohn{\BRepistlenumberstyle{3}\BRepistleof John}%
+\def\br@Jude{\BRepistleof Jude}%
+\def\br@Revelation{\BRbookof Revelation}}
+\brfullname
+\newcommand*{\brabbrvname}{%
+\def\br@Genesis{Gn\BRperiod}%
+\def\br@Exodus{Ex\BRperiod}%
+\def\br@Leviticus{Lv\BRperiod}%
+\def\br@Numbers{Nb\BRperiod}%
+\def\br@Deuteronomy{Dt\BRperiod}%
+\def\br@Joshua{Jos\BRperiod}%
+\def\br@Judges{Jg\BRperiod}%
+\def\br@Ruth{Rt\BRperiod}%
+\def\br@ISamuel{\BRbooknumberstyle{1}S\BRperiod}%
+\def\br@IISamuel{\BRbooknumberstyle{2}S\BRperiod}%
+\def\br@IKings{\BRbooknumberstyle{1}K\BRperiod}%
+\def\br@IIKings{\BRbooknumberstyle{2}K\BRperiod}%
+\def\br@IChronicles{\BRbooknumberstyle{1}Ch\BRperiod}%
+\def\br@IIChronicles{\BRbooknumberstyle{2}Ch\BRperiod}%
+\def\br@Ezra{Ezr\BRperiod}%
+\def\br@Nehemiah{Ne\BRperiod}%
+\def\br@Tobit{Tb\BRperiod}%
+\def\br@Judith{Jdt\BRperiod}%
+\def\br@Esther{Est\BRperiod}%
+\def\br@IMaccabees{\BRbooknumberstyle{1}M\BRperiod}%
+\def\br@IIMaccabees{\BRbooknumberstyle{2}M\BRperiod}%
+\def\br@Job{Jb\BRperiod}%
+\def\br@Psalms{Ps\BRperiod}%
+\def\br@Proverbs{Pr\BRperiod}%
+\def\br@Ecclesiastes{Qo\BRperiod}%
+\def\br@SongofSongs{Sg\BRperiod}%
+\def\br@Wisdom{Ws\BRperiod}%
+\def\br@Ecclesiasticus{Si\BRperiod}%
+\def\br@Isaiah{Is\BRperiod}%
+\def\br@Jeremiah{Jr\BRperiod}%
+\def\br@Lamentations{Lm\BRperiod}%
+\def\br@Baruch{Ba\BRperiod}%
+\def\br@Ezekiel{Ezk\BRperiod}%
+\def\br@Daniel{Dn\BRperiod}%
+\def\br@Hosea{Ho\BRperiod}%
+\def\br@Joel{Jl\BRperiod}%
+\def\br@Amos{Am\BRperiod}%
+\def\br@Obadiah{Ob\BRperiod}%
+\def\br@Jonah{Jon\BRperiod}%
+\def\br@Micah{Mi\BRperiod}%
+\def\br@Nahum{Na\BRperiod}%
+\def\br@Habakkuk{Hab\BRperiod}%
+\def\br@Zephaniah{Zp\BRperiod}%
+\def\br@Haggai{Hg\BRperiod}%
+\def\br@Zechariah{Zc\BRperiod}%
+\def\br@Malachi{Ml\BRperiod}%
+\def\br@Matthew{Mt\BRperiod}%
+\def\br@Mark{Mk\BRperiod}%
+\def\br@Luke{Lk\BRperiod}%
+\def\br@John{Jn\BRperiod}%
+\def\br@Acts{Ac\BRperiod}%
+\def\br@Romans{Rm\BRperiod}%
+\def\br@ICorinthians{\BRepistlenumberstyle{1}Co\BRperiod}%
+\def\br@IICorinthians{\BRepistlenumberstyle{2}Co\BRperiod}%
+\def\br@Galatians{Ga\BRperiod}%
+\def\br@Ephesians{Ep\BRperiod}%
+\def\br@Philippians{Ph\BRperiod}%
+\def\br@Colossians{Col\BRperiod}%
+\def\br@IThessalonians{\BRepistlenumberstyle{1}Th\BRperiod}%
+\def\br@IIThessalonians{\BRepistlenumberstyle{2}Th\BRperiod}%
+\def\br@ITimothy{\BRepistlenumberstyle{1}Tm\BRperiod}%
+\def\br@IITimothy{\BRepistlenumberstyle{2}Tm\BRperiod}%
+\def\br@Titus{Tt\BRperiod}%
+\def\br@Philemon{Phm\BRperiod}%
+\def\br@Hebrews{Heb\BRperiod}%
+\def\br@James{Jm\BRperiod}%
+\def\br@IPeter{\BRepistlenumberstyle{1}P\BRperiod}%
+\def\br@IIPeter{\BRepistlenumberstyle{2}P\BRperiod}%
+\def\br@IJohn{\BRepistlenumberstyle{1}Jn\BRperiod}%
+\def\br@IIJohn{\BRepistlenumberstyle{2}Jn\BRperiod}%
+\def\br@IIIJohn{\BRepistlenumberstyle{3}Jn\BRperiod}%
+\def\br@Jude{Jude}%
+\def\br@Revelation{Rv\BRperiod}}
+\newcommand*{\braltabbrvname}{%
+\def\br@Genesis{Gen\BRperiod}%
+\def\br@Exodus{Exod\BRperiod}%
+\def\br@Leviticus{Lev\BRperiod}%
+\def\br@Numbers{Num\BRperiod}%
+\def\br@Deuteronomy{Deut\BRperiod}%
+\def\br@Joshua{Josh\BRperiod}%
+\def\br@Judges{Judg\BRperiod}%
+\def\br@Ruth{Ruth}%
+\def\br@ISamuel{\BRbooknumberstyle{1}Sam\BRperiod}%
+\def\br@IISamuel{\BRbooknumberstyle{2}Sam\BRperiod}%
+\def\br@IKings{\BRbooknumberstyle{1}Kgs\BRperiod}%
+\def\br@IIKings{\BRbooknumberstyle{2}Kgs\BRperiod}%
+\def\br@IChronicles{\BRbooknumberstyle{1}Chr\BRperiod}%
+\def\br@IIChronicles{\BRbooknumberstyle{2}Chr\BRperiod}%
+\def\br@Ezra{Ezra}%
+\def\br@Nehemiah{Neh\BRperiod}%
+\def\br@Tobit{Tobit}%
+\def\br@Judith{Judith}%
+\def\br@Esther{Esther}%
+\def\br@IMaccabees{\BRbooknumberstyle{1}M\BRperiod}%
+\def\br@IIMaccabees{\BRbooknumberstyle{2}M\BRperiod}%
+\def\br@Job{Job}%
+\def\br@Psalms{Ps\BRperiod}%
+\def\br@Proverbs{Prov\BRperiod}%
+\def\br@Ecclesiastes{Eccles\BRperiod}%
+\def\br@SongofSongs{S\BRperiod\ of S\BRperiod}%
+\def\br@Wisdom{Wisd\BRperiod}%
+\def\br@Ecclesiasticus{Ecclus\BRperiod}%
+\def\br@Isaiah{Isa\BRperiod}%
+\def\br@Jeremiah{Jer\BRperiod}%
+\def\br@Lamentations{Lam\BRperiod}%
+\def\br@Baruch{Baruch}%
+\def\br@Ezekiel{Ezek\BRperiod}%
+\def\br@Daniel{Dan\BRperiod}%
+\def\br@Hosea{Hos\BRperiod}%
+\def\br@Joel{Joel}%
+\def\br@Amos{Amos}%
+\def\br@Obadiah{Obad}%
+\def\br@Jonah{Jonah}%
+\def\br@Micah{Mic\BRperiod}%
+\def\br@Nahum{Nah\BRperiod}%
+\def\br@Habakkuk{Hab\BRperiod}%
+\def\br@Zephaniah{Zeph\BRperiod}%
+\def\br@Haggai{Hag\BRperiod}%
+\def\br@Zechariah{Zech\BRperiod}%
+\def\br@Malachi{Mal\BRperiod}%
+\def\br@Matthew{Matt\BRperiod}%
+\def\br@Mark{Mark}%
+\def\br@Luke{Luke}%
+\def\br@John{John}%
+\def\br@Acts{Acts}%
+\def\br@Romans{Rom\BRperiod}%
+\def\br@ICorinthians{\BRepistlenumberstyle{1}Cor\BRperiod}%
+\def\br@IICorinthians{\BRepistlenumberstyle{2}Cor\BRperiod}%
+\def\br@Galatians{Gal\BRperiod}%
+\def\br@Ephesians{Eph\BRperiod}%
+\def\br@Philippians{Phil\BRperiod}%
+\def\br@Colossians{Col\BRperiod}%
+\def\br@IThessalonians{\BRepistlenumberstyle{1}Thess\BRperiod}%
+\def\br@IIThessalonians{\BRepistlenumberstyle{2}Thess\BRperiod}%
+\def\br@ITimothy{\BRepistlenumberstyle{1}Tim\BRperiod}%
+\def\br@IITimothy{\BRepistlenumberstyle{2}Tim\BRperiod}%
+\def\br@Titus{Tit\BRperiod}%
+\def\br@Philemon{Philem\BRperiod}%
+\def\br@Hebrews{Heb\BRperiod}%
+\def\br@James{Jas\BRperiod}%
+\def\br@IPeter{\BRepistlenumberstyle{1}Pet\BRperiod}%
+\def\br@IIPeter{\BRepistlenumberstyle{2}Pet\BRperiod}%
+\def\br@IJohn{\BRepistlenumberstyle{1}John}%
+\def\br@IIJohn{\BRepistlenumberstyle{2}John}%
+\def\br@IIIJohn{\BRepistlenumberstyle{3}John}%
+\def\br@Jude{Jude}%
+\def\br@Revelation{Rev\BRperiod}}
+\newcommand*\br@Gn{\br@Genesis}%
+\newcommand*\br@Ex{\br@Exodus}%
+\newcommand*\br@Lv{\br@Leviticus}%
+\newcommand*\br@Nb{\br@Numbers}%
+\newcommand*\br@Dt{\br@Deuteronomy}%
+\newcommand*\br@Jos{\br@Joshua}%
+\newcommand*\br@Jg{\br@Judges}%
+\newcommand*\br@Rt{\br@Ruth}%
+\newcommand*\br@IS{\br@ISamuel}%
+\newcommand*\br@IIS{\br@IISamuel}%
+\newcommand*\br@IK{\br@IKings}%
+\newcommand*\br@IIK{\br@IIKings}%
+\newcommand*\br@ICh{\br@IChronicles}%
+\newcommand*\br@IICh{\br@IIChronicles}%
+\newcommand*\br@Ezr{\br@Ezra}%
+\newcommand*\br@Ne{\br@Nehemiah}%
+\newcommand*\br@Tb{\br@Tobit}%
+\newcommand*\br@Jdt{\br@Judith}%
+\newcommand*\br@Est{\br@Esther}%
+\newcommand*\br@IM{\br@IMaccabees}%
+\newcommand*\br@IIM{\br@IIMaccabees}%
+\newcommand*\br@Jb{\br@Job}%
+\newcommand*\br@Ps{\br@Psalms}%
+\newcommand*\br@Pr{\br@Proverbs}%
+\newcommand*\br@Qo{\br@Ecclesiastes}%
+\newcommand*\br@Sg{\br@SongofSongs}%
+\newcommand*\br@Ws{\br@Wisdom}%
+\newcommand*\br@Si{\br@Ecclesiasticus}%
+\newcommand*\br@Is{\br@Isaiah}%
+\newcommand*\br@Jr{\br@Jeremiah}%
+\newcommand*\br@Lm{\br@Lamentations}%
+\newcommand*\br@Ba{\br@Baruch}%
+\newcommand*\br@Ezk{\br@Ezekiel}%
+\newcommand*\br@Dn{\br@Daniel}%
+\newcommand*\br@Ho{\br@Hosea}%
+\newcommand*\br@Jl{\br@Joel}%
+\newcommand*\br@Am{\br@Amos}%
+\newcommand*\br@Ob{\br@Obadiah}%
+\newcommand*\br@Jon{\br@Jonah}%
+\newcommand*\br@Mi{\br@Micah}%
+\newcommand*\br@Na{\br@Nahum}%
+\newcommand*\br@Hab{\br@Habakkuk}%
+\newcommand*\br@Zp{\br@Zephaniah}%
+\newcommand*\br@Hg{\br@Haggai}%
+\newcommand*\br@Zc{\br@Zechariah}%
+\newcommand*\br@Ml{\br@Malachi}%
+\newcommand*\br@Mt{\br@Matthew}%
+\newcommand*\br@Mk{\br@Mark}%
+\newcommand*\br@Lk{\br@Luke}%
+\newcommand*\br@Jn{\br@John}%
+\newcommand*\br@Ac{\br@Acts}%
+\newcommand*\br@Rm{\br@Romans}%
+\newcommand*\br@ICo{\br@ICorinthians}%
+\newcommand*\br@IICo{\br@IICorinthians}%
+\newcommand*\br@Ga{\br@Galatians}%
+\newcommand*\br@Ep{\br@Ephesians}%
+\newcommand*\br@Ph{\br@Philippians}%
+\newcommand*\br@Col{\br@Colossians}%
+\newcommand*\br@ITh{\br@IThessalonians}%
+\newcommand*\br@IITh{\br@IIThessalonians}%
+\newcommand*\br@ITm{\br@ITimothy}%
+\newcommand*\br@IITm{\br@IITimothy}%
+\newcommand*\br@Tt{\br@Titus}%
+\newcommand*\br@Phm{\br@Philemon}%
+\newcommand*\br@Heb{\br@Hebrews}%
+\newcommand*\br@Jm{\br@James}%
+\newcommand*\br@IP{\br@IPeter}%
+\newcommand*\br@IIP{\br@IIPeter}%
+\newcommand*\br@IJn{\br@IJohn}%
+\newcommand*\br@IIJn{\br@IIJohn}%
+\newcommand*\br@Rv{\br@Revelation}
+\newcommand*\br@Gen{\br@Genesis}%
+\newcommand*\br@Exod{\br@Exodus}%
+\newcommand*\br@Lev{\br@Leviticus}%
+\newcommand*\br@Num{\br@Numbers}%
+\newcommand*\br@Deut{\br@Deuteronomy}%
+\newcommand*\br@Josh{\br@Joshua}%
+\newcommand*\br@Judg{\br@Judges}%
+\newcommand*\br@ISam{\br@ISamuel}%
+\newcommand*\br@IISam{\br@IISamuel}%
+\newcommand*\br@IKgs{\br@IKings}%
+\newcommand*\br@IIKgs{\br@IIKings}%
+\newcommand*\br@IChr{\br@IChronicles}%
+\newcommand*\br@IIChr{\br@IIChronicles}%
+\newcommand*\br@Neh{\br@Nehemiah}%
+\newcommand*\br@Esth{\br@Esther}%
+\newcommand*\br@IMacc{\br@IMaccabees}%
+\newcommand*\br@IIMacc{\br@IIMaccabees}%
+\newcommand*\br@Prov{\br@Proverbs}%
+\newcommand*\br@Eccl{\br@Ecclesiastes}%
+\newcommand*\br@SofS{\br@SongofSongs}%
+\newcommand*\br@Wisd{\br@Wisdom}%
+\newcommand*\br@Ecclus{\br@Ecclesiasticus}%
+\newcommand*\br@Isa{\br@Isaiah}%
+\newcommand*\br@Jer{\br@Jeremiah}%
+\newcommand*\br@Lam{\br@Lamentations}%
+\newcommand*\br@Ezek{\br@Ezekiel}%
+\newcommand*\br@Dan{\br@Daniel}%
+\newcommand*\br@Hos{\br@Hosea}%
+\newcommand*\br@Obad{\br@Obadiah}%
+\newcommand*\br@Mic{\br@Micah}%
+\newcommand*\br@Nah{\br@Nahum}%
+\newcommand*\br@Zeph{\br@Zephaniah}%
+\newcommand*\br@Hag{\br@Haggai}%
+\newcommand*\br@Zech{\br@Zechariah}%
+\newcommand*\br@Mal{\br@Malachi}%
+\newcommand*\br@Matt{\br@Matthew}%
+\newcommand*\br@Rom{\br@Romans}%
+\newcommand*\br@ICor{\br@ICorinthians}%
+\newcommand*\br@IICor{\br@IICorinthians}%
+\newcommand*\br@Gal{\br@Galatians}%
+\newcommand*\br@Eph{\br@Ephesians}%
+\newcommand*\br@Phil{\br@Philippians}%
+\newcommand*\br@IThess{\br@IThessalonians}%
+\newcommand*\br@IIThess{\br@IIThessalonians}%
+\newcommand*\br@ITim{\br@ITimothy}%
+\newcommand*\br@IITim{\br@IITimothy}%
+\newcommand*\br@Tit{\br@Titus}%
+\newcommand*\br@Philem{\br@Philemon}%
+\newcommand*\br@Jas{\br@James}%
+\newcommand*\br@IPet{\br@IPeter}%
+\newcommand*\br@IIPet{\br@IIPeter}%
+\newcommand*\br@Rev{\br@Revelation}
+\newcommand*{\brs@default}{%
+\brfullname
+\renewcommand*{\BRbooknumberstyle}[1]{##1 }%
+\renewcommand*{\BRepistlenumberstyle}[1]{##1 }%
+\renewcommand*{\BRbooktitlestyle}[1]{##1}%
+\renewcommand*{\BRchapterstyle}[1]{##1}%
+\renewcommand*{\BRversestyle}[1]{##1}%
+\renewcommand*{\BRversesuffixstyle}[1]{##1}%
+\renewcommand*{\BRbookof}{}%
+\renewcommand*{\BRgospel}{}%
+\renewcommand*{\BRepistletothe}{}%
+\renewcommand*{\BRepistleto}{}%
+\renewcommand*{\BRepistleof}{}%
+\renewcommand*{\BRbkchsep}{ }
+\renewcommand*{\BRchvsep}{:}%
+\renewcommand*{\BRchsep}{;}%
+\renewcommand*{\BRvrsep}{--}%
+\renewcommand*{\BRvsep}{,}%
+\renewcommand*{\BRperiod}{}}
+\newcommand*{\brs@jerusalem}{%
+\brabbrvname
+\renewcommand*{\BRbooknumberstyle}[1]{##1 }%
+\renewcommand*{\BRepistlenumberstyle}[1]{##1 }%
+\renewcommand*{\BRbooktitlestyle}[1]{##1}%
+\renewcommand*{\BRchapterstyle}[1]{##1}%
+\renewcommand*{\BRversestyle}[1]{##1}%
+\renewcommand*{\BRversesuffixstyle}[1]{##1}%
+\renewcommand*{\BRbookof}{}%
+\renewcommand*{\BRgospel}{}%
+\renewcommand*{\BRepistletothe}{}%
+\renewcommand*{\BRepistleto}{}%
+\renewcommand*{\BRepistleof}{}%
+\renewcommand*{\BRbkchsep}{ }
+\renewcommand*{\BRchvsep}{:}%
+\renewcommand*{\BRchsep}{; }%
+\renewcommand*{\BRvrsep}{--}%
+\renewcommand*{\BRvsep}{,}%
+\renewcommand*{\BRperiod}{}%
+}
+\newcommand*{\brs@anglosaxon}{%
+\braltabbrvname
+\renewcommand*{\BRbooknumberstyle}[1]{\MakeUppercase{\romannumeral##1} }%
+\renewcommand*{\BRepistlenumberstyle}[1]{\MakeUppercase{\romannumeral##1} }%
+\renewcommand*{\BRbooktitlestyle}[1]{##1}%
+\renewcommand*{\BRchapterstyle}[1]{\MakeUppercase{\romannumeral##1}}%
+\renewcommand*{\BRversestyle}[1]{##1}%
+\renewcommand*{\BRversesuffixstyle}[1]{##1}%
+\renewcommand*{\BRbookof}{}%
+\renewcommand*{\BRgospel}{}%
+\renewcommand*{\BRepistletothe}{}%
+\renewcommand*{\BRepistleto}{}%
+\renewcommand*{\BRepistleof}{}%
+\renewcommand*{\BRbkchsep}{ }
+\renewcommand*{\BRchvsep}{.}%
+\renewcommand*{\BRchsep}{; }%
+\renewcommand*{\BRvrsep}{--}%
+\renewcommand*{\BRvsep}{,}%
+\renewcommand*{\BRperiod}{.}%
+}
+\newcommand*{\brs@JEH}{%
+\braltabbrvname
+\renewcommand*{\BRbooknumberstyle}[1]{##1 }%
+\renewcommand*{\BRepistlenumberstyle}[1]{##1 }%
+\renewcommand*{\BRbooktitlestyle}[1]{##1}%
+\renewcommand*{\BRchapterstyle}[1]{\romannumeral##1}%
+\renewcommand*{\BRversestyle}[1]{##1}%
+\renewcommand*{\BRversesuffixstyle}[1]{##1}%
+\renewcommand*{\BRbookof}{}%
+\renewcommand*{\BRgospel}{}%
+\renewcommand*{\BRepistletothe}{}%
+\renewcommand*{\BRepistleto}{}%
+\renewcommand*{\BRepistleof}{}%
+\renewcommand*{\BRbkchsep}{ }
+\renewcommand*{\BRchvsep}{. }%
+\renewcommand*{\BRchsep}{; }%
+\renewcommand*{\BRvrsep}{--}%
+\renewcommand*{\BRvsep}{,}%
+\renewcommand*{\BRperiod}{.}%
+}
+\newcommand*{\brs@MHRA}{%
+\brfullname
+\renewcommand*{\BRbooknumberstyle}[1]{\textsc{\romannumeral##1} }%
+\renewcommand*{\BRepistlenumberstyle}[1]{\textsc{\romannumeral##1} }%
+\renewcommand*{\BRbooktitlestyle}[1]{##1}%
+\renewcommand*{\BRchapterstyle}[1]{\romannumeral##1}%
+\renewcommand*{\BRversestyle}[1]{##1}%
+\renewcommand*{\BRversesuffixstyle}[1]{##1}%
+\renewcommand*{\BRbookof}{}%
+\renewcommand*{\BRgospel}{}%
+\renewcommand*{\BRepistletothe}{}%
+\renewcommand*{\BRepistleto}{}%
+\renewcommand*{\BRepistleof}{}%
+\renewcommand*{\BRbkchsep}{ }
+\renewcommand*{\BRchvsep}{. }%
+\renewcommand*{\BRchsep}{; }%
+\renewcommand*{\BRvrsep}{--}%
+\renewcommand*{\BRvsep}{,}%
+\renewcommand*{\BRperiod}{}%
+}
+\newcommand*{\brs@NTG}{%
+\braltabbrvname
+\renewcommand*{\BRbooknumberstyle}[1]{##1 }%
+\renewcommand*{\BRepistlenumberstyle}[1]{##1 }%
+\renewcommand*{\BRbooktitlestyle}[1]{##1}%
+\renewcommand*{\BRchapterstyle}[1]{\romannumeral##1}%
+\renewcommand*{\BRversestyle}[1]{##1}%
+\renewcommand*{\BRversesuffixstyle}[1]{##1}%
+\renewcommand*{\BRbookof}{}%
+\renewcommand*{\BRgospel}{}%
+\renewcommand*{\BRepistletothe}{}%
+\renewcommand*{\BRepistleto}{}%
+\renewcommand*{\BRepistleof}{}%
+\renewcommand*{\BRbkchsep}{ }
+\renewcommand*{\BRchvsep}{,}%
+\renewcommand*{\BRchsep}{; }%
+\renewcommand*{\BRvrsep}{--}%
+\renewcommand*{\BRvsep}{,}%
+\renewcommand*{\BRperiod}{}%
+}
+\newcommand*{\brs@MLA}{%
+\braltabbrvname
+\renewcommand*{\BRbooknumberstyle}[1]{##1 }%
+\renewcommand*{\BRepistlenumberstyle}[1]{##1 }%
+\renewcommand*{\BRbooktitlestyle}[1]{##1}%
+\renewcommand*{\BRchapterstyle}[1]{\romannumeral##1}%
+\renewcommand*{\BRversestyle}[1]{##1}%
+\renewcommand*{\BRversesuffixstyle}[1]{##1}%
+\renewcommand*{\BRbookof}{}%
+\renewcommand*{\BRgospel}{}%
+\renewcommand*{\BRepistletothe}{}%
+\renewcommand*{\BRepistleto}{}%
+\renewcommand*{\BRepistleof}{}%
+\renewcommand*{\BRbkchsep}{\ }
+\renewcommand*{\BRchvsep}{.}%
+\renewcommand*{\BRchsep}{; }%
+\renewcommand*{\BRvrsep}{--}%
+\renewcommand*{\BRvsep}{,}%
+\renewcommand*{\BRperiod}{.}%
+}
+\newcommand*{\brs@chicago}{%
+\braltabbrvname
+\renewcommand*{\BRbooknumberstyle}[1]{##1 }%
+\renewcommand*{\BRepistlenumberstyle}[1]{##1 }%
+\renewcommand*{\BRbooktitlestyle}[1]{##1}%
+\renewcommand*{\BRchapterstyle}[1]{\romannumeral##1}%
+\renewcommand*{\BRversestyle}[1]{##1}%
+\renewcommand*{\BRversesuffixstyle}[1]{##1}%
+\renewcommand*{\BRbookof}{}%
+\renewcommand*{\BRgospel}{}%
+\renewcommand*{\BRepistletothe}{}%
+\renewcommand*{\BRepistleto}{}%
+\renewcommand*{\BRepistleof}{}%
+\renewcommand*{\BRbkchsep}{\ }
+\renewcommand*{\BRchvsep}{\,:\,}%
+\renewcommand*{\BRchsep}{; }%
+\renewcommand*{\BRvrsep}{--}%
+\renewcommand*{\BRvsep}{,}%
+\renewcommand*{\BRperiod}{.}%
+}
+\newcommand*{\brs@text}{%
+\biblerefstyle{default}%
+\renewcommand{\BRbooknumberstyle}[1]{%
+\Ordinalstringnum{##1}\ }%
+\renewcommand{\BRepistlenumberstyle}[1]{%
+\Ordinalstringnum{##1}\ }%
+\renewcommand{\BRbookof}{Book of }%
+\renewcommand{\BRgospel}{Gospel according to St }%
+\renewcommand{\BRepistletothe}{Epistle to the }%
+\renewcommand{\BRepistleto}{Epistle to }%
+\renewcommand{\BRepistleof}{Epistle of }%
+\renewcommand{\BRchapterstyle}[1]{%
+chapter \numberstringnum{##1}}%
+\renewcommand{\BRbkchsep}{, }%
+\renewcommand{\BRchvsep}{ verse }%
+\renewcommand{\BRchsep}{, }%
+\renewcommand{\BRvrsep}{ to }%
+\renewcommand{\BRvsep}{, }%
+\renewcommand{\BRversestyle}[1]{\numberstringnum{##1}}%
+\renewcommand*{\BRversesuffixstyle}[1]{##1}%
+}
+\DeclareOption{default}{\brs@default}
+\DeclareOption{jerusalem}{\brs@jerusalem}
+\DeclareOption{anglosaxon}{\brs@anglosaxon}
+\DeclareOption{JEH}{\brs@JEH}
+\DeclareOption{MHRA}{\brs@MHRA}
+\DeclareOption{NTG}{\brs@NTG}
+\DeclareOption{MLA}{\brs@MLA}
+\DeclareOption{chicago}{\brs@chicago}
+\DeclareOption{text}{\brs@text}
+\ProcessOptions
+\newcommand{\newbiblerefstyle}[2]{%
+\@ifundefined{brs@#1}{%
+\expandafter\def\csname brs@#1\endcsname{#2}}{%
+\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}%
+ }%
+}
+\newcommand*{\setindexbooktitle}[2]{%
+ \@ifundefined{br@#1}%
+ {%
+ \PackageError{bibleref}{Unknown book `#1'}{}%
+ }%
+ {%
+ \expandafter\def\csname bri@#1\endcsname{#2}%
+ }%
+}
+\newcommand*{\addbiblebook}[2]{%
+ \@ifundefined{br@#1}%
+ {%
+ \expandafter\def\csname br@#1\endcsname{#2}%
+ }%
+ {%
+ \PackageError{bibleref}{Book `#1' already defined}{}%
+ }%
+}
+\newcommand*{\biblerefstyle}[1]{%
+\@ifundefined{brs@#1}{\PackageError{bibleref}{%
+Unknown biblerefstyle '#1'}{}}{\csname brs@#1\endcsname}}
+\newcommand*{\@br@vrsty}[1]{\@@br@vrsty#1-\@nil\end}
+\def\@@br@vrsty#1-#2\end{%
+\@do@verses#1,\relax\end
+\ifx\@nil#2\relax
+\else
+ \@bv@addtochidxsort{-}%
+ \@bv@do{\BRvrsep}%
+ \@@br@vrsty#2\end%
+\fi
+}
+\def\br@stripverse#1{%
+ \def\@br@versenum{}%
+ \def\@br@versesuffix{}%
+ \@br@stripverse#1\relax
+}
+\def\@br@stripverse#1#2{%
+ \@br@checkisdigit{#1}%
+ \if@br@isdigit
+ \expandafter\toks@\expandafter{\@br@versenum}%
+ \edef\@br@versenum{\the\toks@#1}%
+ \let\@br@next\@br@stripverse
+ \else
+ \def\@br@versesuffix{#1}%
+ \let\@br@next\@@br@stripverse
+ \fi
+ \ifx#2\relax
+ \let\@br@next\relax
+ \fi
+ \@br@next#2%
+}
+\def\@@br@stripverse#1\relax{%
+ \protected@edef\@br@versesuffix{\@br@versesuffix#1}%
+}
+\newif\if@br@isdigit
+\newcommand*{\@br@checkisdigit}[1]{%
+ \@br@isdigittrue
+ \if#10\relax
+ \else
+ \if#11\relax
+ \else
+ \if#12\relax
+ \else
+ \if#13\relax
+ \else
+ \if#14\relax
+ \else
+ \if#15\relax
+ \else
+ \if#16\relax
+ \else
+ \if#17\relax
+ \else
+ \if#18\relax
+ \else
+ \if#19\relax
+ \else
+ \@br@isdigitfalse
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+ \fi
+}
+\def\@do@verses#1,#2\end{%
+\def\@br@tmp{#1}%
+\ifx\@br@tmp\@empty
+\else
+ \br@stripverse{#1}%
+ \ifnum\@br@versenum<10\relax
+ \@bv@addtochidxsort{00#1}%
+ \else
+ \ifnum\@br@versenum<100\relax
+ \@bv@addtochidxsort{0#1}%
+ \else
+ \@bv@addtochidxsort{#1}%
+ \fi
+ \fi
+ \edef\@br@tmp{%
+ \noexpand\BRversestyle{\@br@versenum}%
+ \noexpand\BRversesuffixstyle{\@br@versesuffix}}%
+ \expandafter\@bv@do\expandafter{\@br@tmp}%
+\fi
+\ifx\relax#2\relax
+\else
+ \@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{}%
+ \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:{%
+ \def\@bv@tmp{#1}%
+ \ifx\@bv@tmp\@empty
+ \else
+ \ifnum\@bv@tmp<10\relax
+ \@bv@addtochidxsort{00#1:}%
+ \else
+ \ifnum\@bv@tmp<100\relax
+ \@bv@addtochidxsort{0#1:}%
+ \else
+ \@bv@addtochidxsort{#1:}%
+ \fi
+ \fi
+ \@bv@do{\BRchapterstyle{#1}}%
+ \fi
+ \@@bibleverse
+}
+\def\@bibleverser-(#1:{%
+ \def\@bv@tmp{#1}%
+ \ifx\@bv@tmp\@empty
+ \else
+ \ifnum\@bv@tmp<10\relax
+ \@bv@addtochidxsort{00#1:}%
+ \else
+ \ifnum\@bv@tmp<100\relax
+ \@bv@addtochidxsort{0#1:}%
+ \else
+ \@bv@addtochidxsort{#1:}%
+ \fi
+ \fi
+ \@bv@do{\BRchapterstyle{#1}}%
+ \fi
+ \@@bibleverse
+}
+\def\@@bibleverse#1){%
+ \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
+ \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}
+\newcommand*{\biblerefmap}[2]{%
+ \expandafter\def\csname @bibleref@map@#1\endcsname{#2}%
+}
+\def\@do@bibleref@map#1\relax{%
+ \@ifundefined{@bibleref@map@#1}{}{%
+ \expandafter\let\expandafter\@@bv@idxsort
+ \csname @bibleref@map@#1\endcsname
+ }%
+}
+\newcommand{\@bv@do}[1]{#1\@bv@addtoidx{#1}}
+\newtoks\@bv@tmpa
+\newtoks\@bv@tmpb
+\newcommand{\@bv@addtoidx}[1]{%
+\if@bv@idx
+ \@bv@tmpa={#1}%
+ \@bv@tmpb=\expandafter{\@bv@idxentry}%
+ \protected@edef\@bv@idxentry{\the\@bv@tmpb\the\@bv@tmpa}%
+\fi}
+\newcommand{\@bv@addtochidxsort}[1]{%
+\if@bv@idx
+ \@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]{%
+\if@bv@idx
+{\def\BRbooknumberstyle##1##2\relax{##2##1}%
+\def\BRepistlenumberstyle##1##2\relax{##2##1}%
+\def\BRgospel{}\def\BRbookof{}\def\BRepistleto{}%
+\def\BRepistletothe{}\def\BRepistleof{}%
+\xdef\@@bv@idxsort{#1\relax}%
+}%
+\fi}
+\newcommand*{\ibibleverse}[1][\bvidxpgformat]{%
+\def\@bv@idxpgformat{#1}%
+\@bv@idxtrue\def\@bv@idxentry{}\bibleverse}
+\newcommand*{\bvidxpgformat}{textrm}
+\endinput
+%%
+%% End of file `bibleref.sty'.