Debian Codegraph @

texmf-dist/source/latex/bibleref/bibleref.dtx

raw
1 %\iffalse
2 %<*package>
3 %% \CharacterTable
4 %% {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
5 %% 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
6 %% Digits \0\1\2\3\4\5\6\7\8\9
7 %% Exclamation \! Double quote \" Hash (number) \#
8 %% Dollar \$ Percent \% Ampersand \&
9 %% Acute accent \' Left paren \( Right paren \)
10 %% Asterisk \* Plus \+ Comma \,
11 %% Minus \- Point \. Solidus \/
12 %% Colon \: Semicolon \; Less than \<
13 %% Equals \= Greater than \> Question mark \?
14 %% Commercial at \@ Left bracket \[ Backslash \\
15 %% Right bracket \] Circumflex \^ Underscore \_
16 %% Grave accent \` Left brace \{ Vertical bar \|
17 %% Right brace \} Tilde \~}
18 %</package>
19 %\fi
20 % \iffalse
21 % Doc-Source file to use with LaTeX2e
22 % Copyright (C) 2011 Nicola Talbot, all rights reserved.
23 % Copyright (C) 2016… Maïeul Rouquette
24 % LPPL 1.3 https://www.ctan.org/license/lppl1.3
25 % \fi
26 % \iffalse
27 %<*driver>
28 \documentclass{nlctdoc}
29
30 \usepackage{bibleref}
31 \usepackage[colorlinks,bookmarks,pdfauthor={Nicola L.C. Talbot and Ma\"{i}eul Rouquette},
32 hyperindex=false,
33 pdftitle={bibleref.sty: a LaTeX package for
34 typesetting bible references}]{hyperref}
35
36 \CheckSum{2503}
37 \OnlyDescription
38
39 \begin{document}
40 \DocInput{bibleref.dtx}
41 \end{document}
42 %</driver>
43 %\fi
44 % \GetFileInfo{bibleref.sty}
45 %\title{bibleref.sty (\fileversion):
46 %a \LaTeXe\ package for typesetting bible references}
47 %\author{Nicola Talbot (inactive)\\[10pt]
48 % Ma\"{i}eul Rouquette (active)}
49 %\date{\filedate}
50 %
51 %\maketitle
52 %\tableofcontents
53 %
54 %\section{General use}
55 %\subsection{Basic}
56 %The \sty{bibleref} package was designed to provide consistent formatting for referencing
57 %parts of the bible.
58 %
59 %\begin{definition}[\DescribeMacro{\bibleverse}]
60 %\cs{bibleverse}\marg{book title}\texttt(\meta{chapter}\texttt{:}\meta{verse(s)}\texttt)
61 %\end{definition}
62 %This command can be used to cite a bible book, chapter or verse
63 %or range of chapters or verses.
64 %
65 %\begin{important}
66 %Be careful if you use \sty{bibleref} with \sty{babel} as some of
67 %\styfmt{babel}'s language options make the colon character active,
68 %which will cause a problem for \cs{bibleverse} (and \ics{ibibleverse},
69 %described later). Check the \styfmt{babel} documentation to find out
70 %how to make the colon non-active.
71 %\end{important}
72 %
73 % \subsection{Choosing the book}
74 %The book title, \meta{book title}, may be given either as the
75 %full title (e.g.\ \texttt{Matthew}) or as an abbreviation (e.g.\
76 %\texttt{Mt} or \texttt{Matt}), most standard abbreviations are
77 %recognised. Books with multiple parts should be preceded by the
78 %book number in uppercase Roman numerals. For example, the second
79 %book of Kings should be entered as \verb|\bibleverse{IIKings}|
80 %
81 %\subsection{Choosing the chapters and verses}
82 %You may have any number, or zero, sets of parenthesis
83 %\verb|(|\meta{chapter}\texttt{:}\meta{verse(s)}\verb|)|,
84 %indicating the chapter and verse or verses. Verses can be
85 %specified as a comma separated list of individual verses or range
86 %of verses. A range of verses should be written with a single
87 %hyphen, e.g.\ \verb|2-4|.
88 %
89 % A chapter may be referenced without a
90 %verse, but the colon must remain, e.g.\ \verb|(12:)| simply
91 %indicates chapter 12.
92 %
93 %A range of verses spanning more than one chapter can
94 %be entered as \texttt(\meta{ch}\texttt:\meta{v}\texttt{)-(}\meta
95 %{ch}\texttt:\meta{v}\texttt)
96 %
97 %If there is no verse, but there are multiple chapters
98 %ranges, these may be specified in the \meta{chapter} part, using a
99 %comma to separate individual chapters and a hyphen to separate
100 %ranges. Note that you still need a colon at the end of the list.
101 % \begin{important}
102 % You \textbf{must not} use this syntax:\\
103 % \texttt{(}\meta{ch}\texttt{:)-(}\meta{ch}\texttt{:)}
104 %
105 % Despite this syntax make a good typesetting, it make a problematic index: the chapter are typeset after the verses contained inside.
106 % \end{important}
107 %
108 % For the book without chapter (\bibleverse{Ob}; \bibleverse{IJn}; \bibleverse{IIJn}; \bibleverse{IIIJn}; \bibleverse{Phm}; \bibleverse{Jude}), you must add an empty chapter:
109 % \texttt{(:}\meta{v}\texttt{-}\meta{v}\texttt{)}
110 %
111 % \begin{important}
112 % You \textbf{must not} use this syntax:\\
113 % \texttt{(}\meta{v}\texttt{-}\meta{v}\texttt{:)}
114 % With this syntax, the verses would be formatted as if they were chapters.
115 % \end{important}
116 %
117 % For the book of Psalms, there is a double numbering: one following the Massoretic Texts, the other one following the Septuagint.
118 % Depending on your field, you may use one numbering or the other one.
119 % However, you can also provide both numbers.
120 % In this case, use the slash (\slash) to separate the two numbers :\\
121 % \verb|\bibleverse{Ps}(23/22:)|
122 %
123 % The alternative number will be, by default, typeset between parenthesis.
124 % However, you can redefine the \cs{BRotherchapterstyle} macro to modify the way this number is inserted.
125 % For example, to print it in superscript:\\
126 %
127 % \begin{verbatim}
128 % \renewcommand{\BRotherchapterstyle}[1]{\textsuperscript{#1}}
129 % \end{verbatim}
130 % or to delete it:
131 % \begin{verbatim}
132 % \renewcommand{\BRotherchapterstyle}[1]{}
133 % \end{verbatim}
134 %\subsection{Default separators}
135 % In the typeset output the range of verses will
136 %be separated with
137 %\begin{definition}[\DescribeMacro{\BRvrsep}]
138 %\cs{BRvrsep}
139 %\end{definition}
140 %(an en-dash by default.)
141 %
142 %In the typeset output the verses in a list of verses will
143 %be separated with
144 %\begin{definition}[\DescribeMacro{\BRvsep}]
145 %\cs{BRvsep}
146 %\end{definition}
147 %(a comma, by default).
148 %
149 %
150 %In the typeset output the chapters will
151 %be separated with
152 %\begin{definition}[\DescribeMacro{\BRchsep}]
153 %\cs{BRchsep}
154 %\end{definition}
155 %(a semi-colon, by default).
156 %
157 %In the typeset output the chapter and the verse will
158 %be separated with
159 %\begin{definition}[\DescribeMacro{\BRchvsep}]
160 %\cs{BRchvsep}
161 %\end{definition}
162 %(a colon, by default).
163 %
164 %In the typeset output the books name will be followed by
165 %\begin{definition}[\DescribeMacro{\BRperiod}]
166 %\cs{BRperiod}
167 %\end{definition}
168 %(nothing, by default).
169 %
170 %\subsection{Examples}
171 %\begin{center}
172 %\begin{tabular}{ll}
173 %\verb|\bibleverse{Ex}| & \bibleverse{Ex}\\
174 %\verb|\bibleverse{Exodus}(20:)| & \bibleverse{Exodus}(20:)\\
175 %\verb|\bibleverse{Exod}(20:17)| & \bibleverse{Exod}(20:17)\\
176 %\verb|\bibleverse{Exod}(20-21:)| & \bibleverse{Exod}(20-21:)\\
177 %\verb|\bibleverse{Ps}(23/22:)| & \bibleverse{Ps}(23/22:)\\
178 %\verb|\bibleverse{IICo}(12:21)| & \bibleverse{IICo}(12:21)\\
179 %\verb|\bibleverse{Ex}(20:17)(21:3)| & \bibleverse{Ex}(20:17)(21:3)\\
180 %\verb|\bibleverse{Ex}(15:)(17:)(20:)| & \bibleverse{Ex}(15:)(17:)(20:)\\
181 %\verb|\bibleverse{Rev}(1:2,5,7-9,11)| & \bibleverse{Rev}(1:2,5,7-9,11)\\
182 %\verb|\bibleverse{IChronicles}(1:3)-(2:7)| &
183 %\bibleverse{IChronicles}(1:3)-(2:7)\\
184 %\verb|\bibleverse{Luke}(1,4-5,8:)| &\bibleverse{Luke}(1,4-5,8:)\\
185 %\verb|\bibleverse{Phm}(:1-3)| &\bibleverse{Phm}(:1-3)\\
186 %\end{tabular}
187 %\end{center}
188 % \subsection{Style}
189 %The style of the reference can be specified either by
190 %package option or as the argument to the command
191 %\begin{definition}[\DescribeMacro{\biblerefstyle}]
192 %\cs{biblerefstyle}\marg{style}
193 %\end{definition}
194 %Styles are listed in Table~\ref{tab:styles}.
195 %
196 %\begin{table}[tbh]
197 %\caption{Bible Citation Styles (can be used as package option or in the argument to
198 %\cs{biblerefstyle})}
199 %\label{tab:styles}
200 %\vspace{10pt}
201 %\begin{center}
202 %\begin{tabular}{lp{0.5\textwidth}}
203 %\bfseries Style & \bfseries Example\\
204 %default & \biblerefstyle{default}\bibleverse{IICor}(12:1-5)\\
205 %jerusalem & \biblerefstyle{jerusalem}\bibleverse{IICor}(12:1-5)\\
206 %anglosaxon & \biblerefstyle{anglosaxon}\bibleverse{IICor}(12:1-5)\\
207 %JEH & \biblerefstyle{JEH}\bibleverse{IICor}(12:1-5)\\
208 %NTG & \biblerefstyle{NTG}\bibleverse{IICor}(12:1-5)\\
209 %MLA & \biblerefstyle{MLA}\bibleverse{IICor}(12:1-5)\\
210 %chicago & \biblerefstyle{chicago}\bibleverse{IICor}(12:1-5)\\
211 %text & \biblerefstyle{text}\bibleverse{IICor}(12:1-5)
212 %\end{tabular}
213 %\end{center}
214 %\end{table}
215 %
216 %You can change the name of a book using
217 %\begin{definition}[\DescribeMacro{\setbooktitle}]
218 %\cs{setbooktitle}\marg{name}\marg{new title}
219 %\end{definition}
220 %Note that \meta{name} must be the full name, not the
221 %abbreviated name of the book. For example, to change
222 %Revelation to Apoc, do
223 %\verb|\setbooktitle{Revelation}{Apoc}|
224 %(\textbf{Note} that you shouldn't do
225 %\verb|\setbooktitle{Rev}{Apoc}|)
226 %
227 %If you want a different title for a book depending on whether it's
228 %in the main body of the document or in the index, you can set the
229 %index version using:
230 %\begin{definition}[\DescribeMacro{\setindexbooktitle}]
231 %\cs{setindexbooktitle}\marg{name}\marg{title}
232 %\end{definition}
233 %In this case, \meta{name} should be the name you'll use in
234 %\cs{ibibleverse}. For example, if you do:
235 %\begin{verbatim}
236 %\setbooktitle{Psalms}{Psalm}
237 %\setindexbooktitle{Psalms}{Psalms}
238 %\end{verbatim}
239 %Then \verb|\ibibleverse{Psalms}(2:)| will print Psalm the
240 %document and Psalms in the index, but \verb|\ibibleverse{Ps}(2:)|
241 %will print Psalms in both the document and the index.
242 %
243 %You can add a book using
244 %\begin{definition}[\DescribeMacro{\addbiblebook}]
245 %\cs{addbiblebook}\marg{name}\marg{title}
246 %\end{definition}
247 %For example:
248 %\begin{verbatim}
249 %\addbiblebook{Susanna}{Story of Susanna}
250 %\end{verbatim}
251 %\begin{definition}[\DescribeMacro{\brthreeabbrvname}]
252 % The \cs{brthreeabbrvname} command switches all the abbreviation of the booktitle to be typeset using exaclty three characters.
253 %\end{definition}
254 %\section{Defining New Styles}
255 %
256 %You can define a new style using the command
257 %\begin{definition}[\DescribeMacro{\newbiblerefstyle}]
258 %\cs{newbiblerefstyle}\marg{style-name}\marg{commands}
259 %\end{definition}\noindent
260 %where \meta{commands} are
261 %the commands needed to modify the citation style.
262 %
263 %Example:
264 %This new style is based on the \qt{default} style, but
265 %has verses in lower case Roman numerals, and redefines
266 %\qt{Revelation} as \qt{Apocalypse}.
267 %\begin{verbatim}
268 %\newbiblerefstyle{sample}{%
269 %\biblerefstyle{default}%
270 %\renewcommand{\BRversestyle}[1]{\romannumeral##1}%
271 %\setbooktitle{Revelation}{Apocalypse}%
272 %}
273 %\end{verbatim}
274 %Note the use of \verb|##1| instead of \verb|#1|.
275 %
276 %If you want to distribute a new style, see
277 %section~\ref{sec:distnewstyles}.
278 %
279 %\section{Indexing Bible References}
280 %
281 %\begin{definition}[\DescribeMacro{\ibibleverse}]
282 %\cs{ibibleverse}\oarg{format}\marg{book title}\texttt(\marg{chapter}\texttt{:}\meta{verse(s)}\texttt)
283 %\end{definition}
284 %This does the same as \cs{bibleverse}
285 %but also adds an index entry (provided you have used
286 %\cs{makeindex} in the preamble.) The default page number
287 %format is given by the command
288 %\begin{definition}[\DescribeMacro{\bvidxpgformat}]
289 %\cs{bvidxpgformat}
290 %\end{definition}
291 %This is \texttt{textrm} by default, but can be redefined. To
292 %override the page number format for a particular entry you can
293 %use the optional argument to \cs{ibibleverse}. For example:
294 %\begin{verbatim}
295 %\ibibleverse[textit]{Exodus}
296 %\end{verbatim}
297 %(Note there is no backslash.)
298 %
299 %\begin{definition}[\DescribeMacro{\ibiblechvs}]
300 %\cs{ibiblechvs}\oarg{format}\marg{book title}\texttt(\marg{chapter}\texttt{:}\meta{verse(s)}\texttt)
301 %\end{definition}
302 %This is similar to \cs{ibibleverse} except that it doesn't display
303 %the book name in the text. The reference is indexed under the book
304 %title in the same way as \cs{ibibleverse}.
305 %
306 %\begin{definition}[\DescribeMacro{\ibiblevs}]
307 %\cs{ibiblevs}\oarg{format}\marg{book title}\texttt(\marg{chapter}\texttt{:}\meta{verse(s)}\texttt)
308 %\end{definition}
309 %This is similar to \cs{ibiblechvs} except that it only displays the
310 %verse(s) in the text.
311 %
312 %\begin{definition}[\DescribeMacro{\ibible}]
313 %\cs{ibible}\oarg{format}\marg{book title}\texttt(\marg{chapter}\texttt{:}\meta{verse(s)}\texttt)
314 %\end{definition}
315 %This is similar to \cs{ibiblech} except that it does not display the
316 %anything in the text.
317 %
318 %You may need to create your own custom \app{makeindex} style file
319 %as the default uses a comma and space to separate the item from
320 %the page number, which may cause confusion. For example, you
321 %could create a file called \texttt{sample.ist} and write in the
322 %lines:
323 %\begin{verbatim}
324 %delim_0 "\\dotfill "
325 %delim_1 "\\dotfill "
326 %delim_2 "\\dotfill "
327 %\end{verbatim}
328 %See the \app{makeindex} documentation for further details.
329 %
330 %\subsection{Indexing multiple references}
331 % If you use multiple reference syntaxis, like \verb+\ibibleverse{Rm}(2:1)(3:4)+, all the reference are, by default, indexed as a single entry.
332 % However, you may use the \pkgopt{splitmultiplerefinindex} package option in order to have multiple entries in the index.
333 %
334 % You may also look on the \sty{bibleref-xidx} package (see \ref{bibleref-xidx}).
335 %\subsection{Index Categories}
336 %
337 %You may prefer to index the bible reference under a category with
338 %the book title as a sub item of that category. This can be achieved
339 %using:
340 %\begin{definition}[\DescribeMacro{\biblerefcategory}]
341 %\cs{biblerefcategory}\oarg{sort key}\marg{category title}
342 %\end{definition}
343 %The optional argument is the sort key to be used by
344 %\app{makeindex} or \app{xindy}. If omitted \meta{category title} is
345 %used.
346 %
347 %Note that \ics{ibibleverse}, \ics{ibiblechvs} and \ics{ibiblevs}
348 %use the category that is currently set. If you need to keep
349 %switching categories, you may find it easier to define a shortcut
350 %command. For example, suppose you're discussing the differences
351 %between the King James and the New Jerusalem versions, you could
352 %define the following:
353 %\begin{verbatim}
354 %\newcommand{\kjref}{\biblerefcategory{King James}\ibibleverse}
355 %\newcommand{\njref}{\biblerefcategory{New Jerusalem}\ibibleverse}
356 %\end{verbatim}
357 %You can now use \cs{kjref} and \cs{njref} in the same way that you
358 %would use \cs{ibibleverse}
359 %
360 %You can disable the category by setting it to nothing:
361 %\begin{verbatim}
362 %\biblerefcategory{}
363 %\end{verbatim}
364 %
365 %\subsection{The \sty{bibleref-xidx} Package}\label{bibleref-xidx}
366 %
367 %The \sty{bibleref} package comes with a supplementary package
368 %\sty{bibleref-xidx} that modifies the way bible references are added to
369 %the index. With no package options, i.e., just
370 %\begin{verbatim}
371 %\usepackage{bibleref-xidx}
372 %\end{verbatim}
373 %the verses will appear as sub-items of the chapters. Note that a
374 %verse range will be considered a single item so, for example,
375 %\begin{verbatim}
376 %\ibibleverse{Ex}(9:1)
377 %\ibibleverse{Ex}(9:4)
378 %\ibibleverse{Ex}(9:1-4)
379 %\end{verbatim}
380 %will occur as three separate entries under Exodus chapter~9.
381 %Also note that \verb|(9-14:)| and \verb|(9:)-(14:)| will be treated
382 %differently.
383 %
384 %The \sty{bibleref-xidx} package can be loaded with the following options:
385 %\begin{description}
386 %\item[\pkgopt{noverses}] Don't show the verses in the index.
387 %\item[\pkgopt{verses}] Show the verses (and chapters) in the index
388 %(default).
389 %\item[\pkgopt{nochapters}] Don't show the chapters (and verses) in the
390 %index.
391 %\item[\pkgopt{chapters}] Show the chapters in the index (default).
392 %\end{description}
393 %All other package options will be passed to the \sty{bibleref}
394 %package, which \sty{bibleref-xidx} automatically loads.
395 %
396 %\subsection{Separate Scripture Index}
397 %
398 %If you want a separate index for bible verses, in addition to
399 %a general index, you can redefine
400 %\begin{definition}[\DescribeMacro{\biblerefindex}]
401 %\cs{biblerefindex}
402 %\end{definition}
403 %This command defaults to \cs{index}, but can be changed to
404 %the appropriate indexing command. For example, suppose you
405 %are using the \sty{indextools} package and you want a general
406 %index and a scripture index, you can do something like:
407 %\begin{verbatim}
408 %\documentclass{article}
409 %\usepackage{bibleref}
410 %\usepackage{indextools}
411 %
412 %\makeindex[title=Scripture,name=scr]}
413 %\makeindex[title=General]
414 %
415 %\renewcommand{\biblerefindex}{\index[scr]}
416 %\end{verbatim}
417 %In the document, you can use \cs{ibibleverse} as before, and
418 %the scripture index is displayed using
419 %\begin{verbatim}
420 %\printindex[scr]
421 %\end{verbatim}
422 %You will find the index. See the \sty{indextools} documentation
423 %for further details.
424 %
425 %\subsection{Changing the Sort Order}
426 %
427 %The bible reference entries will be sorted alphabetically by
428 %\app{makeindex}. However you may prefer the entries to be sorted
429 %according to their order in the bible. This can either be done
430 %using \app{xindy} instead of \app{makeindex} and creating your
431 %own custom alphabet (see \app{xindy} manual for details) or you
432 %can use \sty{bibleref}'s mapping command.
433 %
434 %\begin{definition}[\DescribeMacro{\biblerefmap}]
435 %\cs{biblerefmap}\marg{label}\marg{new sort key}
436 %\end{definition}
437 %For example, in the preamble:
438 %\begin{verbatim}
439 %\biblerefmap{Genesis}{01}
440 %\biblerefmap{Exodus}{02}
441 %\biblerefmap{Leviticus}{03}
442 %\biblerefmap{Numbers}{04}
443 %\biblerefmap{Deuteronomy}{05}
444 %...
445 %\end{verbatim}
446 %When you run \app{makeindex}, the references will now be sorted
447 %in numerical order.
448 %
449 %If you want to subdivide the index into, say, old and new
450 %testament, you can add this to the mapping. For example:
451 %\begin{verbatim}
452 %\biblerefmap{Genesis}{1@Old Testament!01}
453 %\biblerefmap{Exodus}{1@Old Testament!02}
454 %\biblerefmap{Leviticus}{1@Old Testament!03}
455 %\biblerefmap{Numbers}{1@Old Testament!04}
456 %\biblerefmap{Deuteronomy}{1@Old Testament!05}
457 %...
458 %\biblerefmap{Matthew}{2@New Testament!01}
459 %\biblerefmap{Mark}{2@New Testament!02}
460 %...
461 %\end{verbatim}
462 %
463 %\section{Distributing New Styles}
464 %\label{sec:distnewstyles}
465 %
466 %If you want a new bible reference style (or translation) publicly
467 %available, then it's a good idea to upload it to
468 %CTAN\footnote{\url{https://ctan.org/}}. If you've never done this before, you
469 %might find it a bit daunting, so here are a few pointers.
470 %
471 %I suggest that you give the name of your new package the prefix \texttt{bibleref-} as
472 %then it will appear close to \sty{bibleref} in the alphabetical list
473 %in the catalogue. Suppose your new style is called
474 %``mystyle''\footnote{Choose a more descriptive name than this.},
475 %then create a file called \texttt{bibleref-mystyle.sty}. At the
476 %start of the file, do:
477 %\begin{verbatim}
478 %\NeedsTeXFormat{LaTeX2e}
479 %\ProvidesPackage{bibleref-mystyle}[2011/01/19 v1.0 Bible reference
480 %style conforming to something or other]
481 %\end{verbatim}
482 %(Change the date and the brief description in the line above to
483 %something more appropriate.) Next you need to load \sty{bibleref}:
484 %\begin{verbatim}
485 %\RequirePackage{bibleref}
486 %\end{verbatim}
487 %Now do the new style stuff (or redefine styles to provide
488 %translations):
489 %\begin{verbatim}
490 %\newbiblerefstyle{mystyle}{%
491 %\biblerefstyle{default}%
492 %\renewcommand{\BRversestyle}[1]{\romannumeral##1}%
493 %\setbooktitle{Revelation}{Apocalypse}%
494 %}
495 %\end{verbatim}
496 %(Again change the above to whatever is appropriate.) Put any new
497 %book definitions that your style may require, for example:
498 %\begin{verbatim}
499 %\addbiblebook{Susanna}{Story of Susanna}
500 %\end{verbatim}
501 %and add any \cs{biblerefmap} commands that are required. Then set
502 %your new style as the current style, if appropriate:
503 %\begin{verbatim}
504 %\biblerefstyle{mystyle}
505 %\end{verbatim}
506 %On the last line of the file add:
507 %\begin{verbatim}
508 %\endinput
509 %\end{verbatim}
510 %
511 %Next you need to create a file called ``README'' that contains some
512 %information about your new package, including what license you want
513 %to distribute it under. (If you don't know anything about licenses,
514 %I recommend you choose the \LaTeX\ Project Public License, LPPL.)
515 %
516 %It's worth adding a sample file or a little bit of documentation
517 %that illustrates how the references appear.
518 %
519 %Put your .sty file, README file and samples or documentation into a
520 %zip archive. You're now ready to upload it. There are several upload
521 %pages. The main one is at \url{https://ctan.org/upload}.
522 %The name of your contribution is the name of your package
523 %(``bibleref-mystyle'' in this example). Remember to put your name
524 %and email in the relevant input boxes. Sometime after you've
525 %uploaded your zip file, you'll get a copy of the announcement from
526 %one of the CTAN maintainers. It usually takes a day to establish
527 %itself. After that people can download and use it.
528 %
529 %\section{Acknowledgements}
530 %Many thanks to all the useful comments from comp.text.tex,
531 %especially from Jesse~Billett, Brooks~Moses and Ulrich~M.~Schwarz.
532 %
533 % Many thanks also to Rapha\"{e}l Pinson, which have debbuged indexing for books without chapter.
534 %
535 %\section{Bug and feature request}
536 % For all bug and feature requests, please open an ``issue'' on
537 % \begin{important}
538 % \url{https://git.framasoft.org/maieul/bibleref/issues}
539 % \end{important}
540 %
541 %\StopEventually{\clearpage\phantomsection
542 %\PrintIndex
543 %
544 %}
545 %
546 %\section{The Code}
547 %\iffalse
548 % \begin{macrocode}
549 %<*bibleref-xidx.sty>
550 % \end{macrocode}
551 %\fi
552 % Declare \sty{bibleref-xidx} package
553 % \begin{macrocode}
554 \NeedsTeXFormat{LaTeX2e}
555 \ProvidesPackage{bibleref-xidx}[2011/01/19 v1.0 (NLCT) Extended indexing support for bibleref]
556 % \end{macrocode}
557 %\begin{macro}{\if@br@indexchapters}
558 % Provide switch to determine whether or not to add chapters to the
559 % index
560 % \begin{macrocode}
561 \newif\if@br@indexchapters
562 \@br@indexchapterstrue
563 % \end{macrocode}
564 %\end{macro}
565 %\begin{macro}{\if@br@indexverses}
566 % Provide switch to determine whether or not to add verses to the
567 % index
568 % \begin{macrocode}
569 \newif\if@br@indexverses
570 \@br@indexversestrue
571 % \end{macrocode}
572 %\end{macro}
573 % Declare package options:
574 % \begin{macrocode}
575 \DeclareOption{verses}{\@br@indexchapterstrue\@br@indexversestrue}
576 \DeclareOption{noverses}{\@br@indexversesfalse}
577 \DeclareOption{chapters}{\@br@indexchaptersfalse}
578 \DeclareOption{nochapters}{\@br@indexchaptersfalse\@br@indexversesfalse}
579 % \end{macrocode}
580 % Pass remaining options to \sty{bibleref}:
581 % \begin{macrocode}
582 \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{bibleref}}
583 % \end{macrocode}
584 % Process options
585 % \begin{macrocode}
586 \ProcessOptions
587 % \end{macrocode}
588 % Load \sty{bibleref} package:
589 % \begin{macrocode}
590 \RequirePackage{bibleref}
591 % \end{macrocode}
592 %
593 %\begin{macro}{\@bibleverse}
594 % Redefine \cs{@bibleverse} (processes chapter number).
595 % \begin{macrocode}
596 \def\@bibleverse(#1:{%
597 \def\@bv@chidxsort{}%
598 \def\@bv@chidxentry{}%
599 \bv@dbl@ch#1/\@nil%
600 \@br@chsty{\bv@dbl@ch@one}%
601 \ifx\bv@dbl@ch@two\@empty\else%
602 \@bv@dbl@ch@twotrue%
603 \BRotherchapterstyle{\@br@chsty{\bv@dbl@ch@two}}%
604 \@bv@dbl@ch@twofalse%
605 \fi%
606 \@@bibleverse
607 }
608 % \end{macrocode}
609 %\end{macro}
610 %\begin{macro}{\@bibleverser}
611 % Redefine \cs{@bibleverser} (end of range).
612 % \begin{macrocode}
613 \def\@bibleverser-(#1:{%
614 \def\@bv@chidxsort{}%
615 \def\@bv@chidxentry{}%
616 \bv@dbl@ch#1/\@nil%
617 \@br@chsty{\bv@dbl@ch@one}%
618 \ifx\bv@dbl@ch@two\@empty\else%
619 \@bv@dbl@ch@twotrue%
620 \BRotherchapterstyle{\@br@chsty{\bv@dbl@ch@two}}%
621 \@bv@dbl@ch@twofalse%
622 \fi%
623 \@@bibleverse
624 }
625 % \end{macrocode}
626 %\end{macro}
627 %\begin{macro}{\@@bibleverse}
628 % Redefine \cs{@@bibleverse} (processes verse list)
629 % \begin{macrocode}
630 \def\@@bibleverse#1){%
631 \def\@bv@tmp{#1}%
632 \ifx\@bv@tmp\@empty
633 % \end{macrocode}
634 % If no verses specified, do the index for the current
635 % chapter.
636 % \begin{macrocode}
637 \@bvx@dochindex
638 \else
639 \BRchvsep
640 \@br@vrsty{#1}%
641 \fi
642 \new@ifnextchar(%
643 {\BRchsep\@bibleverse}%
644 {\new@ifnextchar-%
645 {\protect\BRvrsep\@bibleverser}%
646 {\@end@@bibleverse}%
647 }%
648 }
649 % \end{macrocode}
650 %\end{macro}
651 %\begin{macro}{\@brx@dochsep}
652 % Define what to do between chapters in a list.
653 % \begin{macrocode}
654 \newcommand*{\@brx@dochsep}{%
655 \@bvx@chdo{\protect\BRvsep}%
656 }
657 % \end{macrocode}
658 %\end{macro}
659 %\begin{macro}{\@br@chsty}
660 % \begin{macrocode}
661 \renewcommand*{\@br@chsty}[1]{%
662 \let\@brx@chsep\@empty
663 \@for\@brx@thisch:=#1\do{%
664 % \end{macrocode}
665 % Index previous chapter entry in current list, if it exists
666 % \begin{macrocode}
667 \@bvx@dochindex
668 \@brx@chsep
669 \expandafter\@@br@chsty\@brx@thisch-\@nil\end
670 \let\@brx@chsep\@brx@dochsep
671 }%
672 }
673 % \end{macrocode}
674 %\end{macro}
675 %\begin{macro}{\@brx@dovssep}
676 % Define what to do between verses in a list.
677 % \begin{macrocode}
678 \newcommand*{\@brx@dovssep}{%
679 \@bvx@vsdo{\protect\BRvsep}%
680 }
681 % \end{macrocode}
682 %\end{macro}
683 %\begin{macro}{\@br@vrsty}
684 % Redefine \cs{@br@vrsty} (processes verses).
685 % \begin{macrocode}
686 \renewcommand*{\@br@vrsty}[1]{%
687 \let\@brx@vssep\@empty
688 \@for\@brx@thisvs:=#1\do{%
689 \def\@bv@vsidxentry{}%
690 \def\@bv@vsidxsort{}%
691 \@brx@vssep
692 \expandafter\@@br@vrsty\@brx@thisvs-\@nil\end
693 \let\@brx@vssep\@brx@dovssep
694 \@bvx@dovsindex
695 }%
696 }
697 % \end{macrocode}
698 %\end{macro}
699 %\begin{macro}{\@@br@vrsty}
700 % Process individual verse or verse range.
701 % \begin{macrocode}
702 \def\@@br@vrsty#1-#2\end{%
703 \ifx\@nil#2\relax
704 \@do@verse{#1}%
705 \else
706 \@do@verserange{#1}#2%
707 \fi
708 }
709 % \end{macrocode}
710 %\end{macro}
711 %\begin{macro}{\@do@verse}
712 % Process individual verse.
713 % \begin{macrocode}
714 \renewcommand{\@do@verse}[1]{%
715 \@nodo@verse{#1}%
716 \expandafter\@bvx@vsdo\expandafter{\@br@tmp}%
717 \@bv@addtovsidxsort{-000}%
718 }
719 % \end{macrocode}
720 %\end{macro}
721 %\begin{macro}{\@@br@chsty}
722 % Process individual chapter or chapter range.
723 % \begin{macrocode}
724 \def\@@br@chsty#1-#2\end{%
725 \ifx\@nil#2\relax
726 \@do@chapter{#1}%
727 \else
728 \@do@chapterrange{#1}#2%
729 \fi
730 }
731 % \end{macrocode}
732 %\end{macro}
733 %\begin{macro}{\@do@chapter}
734 % Process individual chapter.
735 % \begin{macrocode}
736 \newcommand{\@do@chapter}[1]{%
737 \@nodo@chapter{#1}%
738 \@bvx@chdo{\protect\BRchapterstyle{#1}}%
739 \@bv@addtochidxsort{-000}%
740 }
741 % \end{macrocode}
742 %\end{macro}
743 %\begin{macro}{\@do@chapter}
744 % Process chapter sort info.
745 % \begin{macrocode}
746 \renewcommand*{\@nodo@chapter}[1]{%
747 \ifnum0#1<10\relax
748 \@bv@setchidxsort{00#1}%
749 \else
750 \ifnum0#1<100\relax
751 \@bv@setchidxsort{0#1}%
752 \else
753 \@bv@setchidxsort{#1}%
754 \fi
755 \fi
756 }
757 % \end{macrocode}
758 %\end{macro}
759 %\begin{macro}{\@do@chapterrange}
760 % Process chapter range.
761 % \begin{macrocode}
762 \def\@do@chapterrange#1#2-\@nil{%
763 \@nodo@chapter{#1}%
764 \@bvx@chdo{\protect\BRchapterstyle{#1}}%
765 \@bv@addtochidxsort{-}%
766 \@bvx@chadddo{\protect\BRvrsep}%
767 \@nodo@chapter{#2}%
768 \@bvx@chadddo{\protect\BRchapterstyle{#2}}%
769 }
770 % \end{macrocode}
771 %\end{macro}
772 %\begin{macro}{\@nodo@verse}
773 % Process verse sort info and stores style in \cs{@br@tmp}.
774 % \begin{macrocode}
775 \renewcommand*{\@nodo@verse}[1]{%
776 \br@stripverse{#1}%
777 \ifnum\@br@versenum<10\relax
778 \@bv@addtovsidxsort{00#1}%
779 \else
780 \ifnum\@br@versenum<100\relax
781 \@bv@addtovsidxsort{0#1}%
782 \else
783 \@bv@addtovsidxsort{#1}%
784 \fi
785 \fi
786 \ifx\@br@versesuffix\@empty
787 \protected@edef\@br@tmp{%
788 \protect\BRversestyle{\@br@versenum}%
789 }%
790 \else
791 \protected@edef\@br@tmp{%
792 \protect\BRversestyle{\@br@versenum}%
793 \protect\BRversesuffixstyle{\@br@versesuffix}%
794 }%
795 \fi
796 }
797 % \end{macrocode}
798 %\end{macro}
799 %\begin{macro}{\@do@verserange}
800 % Process verse range.
801 % \begin{macrocode}
802 \def\@do@verserange#1#2-\@nil{%
803 \@nodo@verse{#1}%
804 \expandafter\@bvx@vsdo\expandafter{\@br@tmp}%
805 \@bv@addtovsidxsort{-}%
806 \@bvx@vsadddo{\protect\BRvrsep}%
807 \@nodo@verse{#2}%
808 \expandafter\@bvx@vsadddo\expandafter{\@br@tmp}%
809 }
810 % \end{macrocode}
811 %\end{macro}
812 %\begin{macro}{\@bv@setvsidxsort}
813 % Set the verse sort information.
814 % \begin{macrocode}
815 \newcommand*{\@bv@setvsidxsort}[1]{%
816 \if@bv@idx
817 \protected@edef\@bv@vsidxsort{#1}%
818 \fi
819 }
820 % \end{macrocode}
821 %\end{macro}
822 %\begin{macro}{\@bv@addtovsidxsort}
823 % Add to the verse sort information.
824 % \begin{macrocode}
825 \newcommand*{\@bv@addtovsidxsort}[1]{%
826 \if@bv@idx
827 \@bv@tmpa={#1}%
828 \@bv@tmpb=\expandafter{\@bv@vsidxsort}%
829 \protected@edef\@bv@vsidxsort{\the\@bv@tmpb\the\@bv@tmpa}%
830 \fi
831 }
832 % \end{macrocode}
833 %\end{macro}
834 %\begin{macro}{\@bv@setvsidx}
835 % Set the verse entry information.
836 % \begin{macrocode}
837 \newcommand*{\@bv@setvsidx}[1]{%
838 \if@bv@idx
839 \def\@bv@vsidxentry{#1}%
840 \fi
841 }
842 % \end{macrocode}
843 %\end{macro}
844 %\begin{macro}{\@bv@addtovsidx}
845 % Add to the verse entry information.
846 % \begin{macrocode}
847 \newcommand*{\@bv@addtovsidx}[1]{%
848 \if@bv@idx
849 \@bv@tmpa={#1}%
850 \@bv@tmpb=\expandafter{\@bv@vsidxentry}%
851 \protected@edef\@bv@vsidxentry{\the\@bv@tmpb\the\@bv@tmpa}%
852 \fi
853 }
854 % \end{macrocode}
855 %\end{macro}
856 %\begin{macro}{\@bv@setchidx}
857 % Set the chapter entry information.
858 % \begin{macrocode}
859 \newcommand*{\@bv@setchidx}[1]{%
860 \if@bv@idx
861 \def\@bv@chidxentry{#1}%
862 \fi
863 }
864 % \end{macrocode}
865 %\end{macro}
866 %\begin{macro}{\@bv@addtochidx}
867 % Add to the chapter entry information.
868 % \begin{macrocode}
869 \newcommand*{\@bv@addtochidx}[1]{%
870 \if@bv@idx
871 \@bv@tmpa={#1}%
872 \@bv@tmpb=\expandafter{\@bv@chidxentry}%
873 \protected@edef\@bv@chidxentry{\the\@bv@tmpb\the\@bv@tmpa}%
874 \fi
875 }
876 % \end{macrocode}
877 %\end{macro}
878 %\begin{macro}{\@bv@setchidxsort}
879 % Set the chapter sort information.
880 % \begin{macrocode}
881 \newcommand*{\@bv@setchidxsort}[1]{%
882 \if@bv@idx
883 \protected@edef\@bv@chidxsort{#1}%
884 \fi
885 }
886 % \end{macrocode}
887 %\end{macro}
888 %\begin{macro}{\@bvx@chdo}
889 % Display argument and set as chapter entry information
890 % \begin{macrocode}
891 \newcommand*{\@bvx@chdo}[1]{#1\@bv@setchidx{#1}}
892 % \end{macrocode}
893 %\end{macro}
894 %\begin{macro}{\@bvx@vsdo}
895 % Display argument and set as verse entry information
896 % \begin{macrocode}
897 \newcommand*{\@bvx@vsdo}[1]{#1\@bv@setvsidx{#1}}
898 % \end{macrocode}
899 %\end{macro}
900 %\begin{macro}{\@bvx@chadddo}
901 % Display argument and adds to chapter entry information
902 % \begin{macrocode}
903 \newcommand*{\@bvx@chadddo}[1]{#1\@bv@addtochidx{#1}}
904 % \end{macrocode}
905 %\end{macro}
906 %\begin{macro}{\@bvx@vsadddo}
907 % Display argument and adds to verse entry information
908 % \begin{macrocode}
909 \newcommand*{\@bvx@vsadddo}[1]{#1\@bv@addtovsidx{#1}}
910 % \end{macrocode}
911 %\end{macro}
912 % Store original definition of \cs{@bible@verse}
913 % \begin{macrocode}
914 \let\@bv@org@bible@verse\@bible@verse
915 % \end{macrocode}
916 %
917 %\begin{macro}{\@bible@verse}
918 % Redefine \cs{@bible@verse}
919 % \begin{macrocode}
920 \renewcommand*{\@bible@verse}{%
921 \def\@bv@chidxentry{}%
922 \@bv@org@bible@verse
923 }
924 % \end{macrocode}
925 %\end{macro}
926 %\begin{macro}{\@end@@bibleverse}
927 % Redefine \cs{@end@@bibleverse}
928 % \begin{macrocode}
929 \renewcommand*{\@end@@bibleverse}{%
930 % \end{macrocode}
931 % If no chapters specified, index just the book.
932 % \begin{macrocode}
933 \ifx\@bv@chidxentry\@empty
934 \@bvx@dobkindex
935 \else
936 \if@br@indexchapters
937 \else
938 % \end{macrocode}
939 % Only indexing book, so index hasn't been done yet.
940 % \begin{macrocode}
941 \@bvx@dobkindex
942 \fi
943 \fi
944 \@bv@idxfalse
945 \@bv@restore
946 }
947 % \end{macrocode}
948 %\end{macro}
949 %
950 %\begin{macro}{\@bvx@dochindex}
951 % Writes the indexing information for the current bible chapter (no
952 % verse information specified).
953 % \begin{macrocode}
954 \newcommand*{\@bvx@dochindex}{%
955 \if@br@indexchapters
956 \ifx\@bv@chidxentry\@empty
957 \else
958 \if@bv@idx
959 \expandafter\@do@bibleref@map\@@bv@idxsort\relax
960 \@do@biblerefindex
961 {\@@bv@idxsort\relax @\@bv@mainidxentry
962 !\@bv@chidxsort @\@bv@chidxentry
963 |\@bv@idxpgformat}%
964 \fi
965 \fi
966 \fi
967 }
968 % \end{macrocode}
969 %\end{macro}
970 %
971 %\begin{macro}{\@bvx@dovsindex}
972 % Writes the indexing information for the current bible chapter and
973 % verse.
974 % \begin{macrocode}
975 \newcommand*{\@bvx@dovsindex}{%
976 \if@br@indexverses
977 \ifx\@bv@vsidxentry\@empty
978 \else
979 \if@bv@idx
980 \expandafter\@do@bibleref@map\@@bv@idxsort\relax
981 \@do@biblerefindex
982 {\@@bv@idxsort\relax @\@bv@mainidxentry
983 !\@bv@chidxsort @\@bv@chidxentry
984 !\@bv@vsidxsort @\@bv@vsidxentry
985 |\@bv@idxpgformat}%
986 \fi
987 \fi
988 \else
989 \@bvx@dochindex
990 \fi
991 }
992 % \end{macrocode}
993 %\end{macro}
994 %
995 %\begin{macro}{\@bvx@dobkindex}
996 % Writes the indexing information for the current book (no chapter
997 % or verses specified).
998 % \begin{macrocode}
999
1000 \newcommand*{\@bvx@dobkindex}{%
1001 \if@bv@idx
1002 \expandafter\@do@bibleref@map\@@bv@idxsort\relax
1003 \@do@biblerefindex
1004 {\@@bv@idxsort\relax @\@bv@mainidxentry|\@bv@idxpgformat}%
1005 \fi
1006 }
1007 % \end{macrocode}
1008 %\end{macro}
1009 %\iffalse
1010 % \begin{macrocode}
1011 %</bibleref-xidx.sty>
1012 % \end{macrocode}
1013 %\fi
1014 %\iffalse
1015 % \begin{macrocode}
1016 %<*bibleref.sty>
1017 % \end{macrocode}
1018 %\fi
1019 % Declare package
1020 % \begin{macrocode}
1021 \NeedsTeXFormat{LaTeX2e}
1022 \ProvidesPackage{bibleref}[2025/05/18 1.26.0 (NLCT and MR)]%
1023 % \end{macrocode}
1024 % Need to do some conditional stuff
1025 % \begin{macrocode}
1026 \RequirePackage{ifthen}
1027 % \end{macrocode}
1028 % The \sty{fmtcount} package is needed for the full text
1029 % citations
1030 % \begin{macrocode}
1031 \RequirePackage{fmtcount}
1032 % \end{macrocode}
1033 % The \sty{amsgen} package is needed for \cs{new@ifnextchar}
1034 %\changes{1.13}{2010/07/07}{Added amsgen which provides
1035 %\cs{new@ifnextchar}}
1036 % \begin{macrocode}
1037 \RequirePackage{amsgen}
1038 % \end{macrocode}
1039 % We need to know if we use XeTeX.
1040 % \begin{macrocode}
1041 \RequirePackage{ifxetex}
1042 % \end{macrocode}
1043 % Sometime, we need to parse string
1044 % \begin{macrocode}
1045 \RequirePackage{xstring}%
1046 % \end{macrocode}
1047 %\begin{macro}{\BRbooknumberstyle}
1048 % The style of the book
1049 % number. By default, it simply displays its argument
1050 %followed by a space.
1051 % \begin{macrocode}
1052 \newcommand*{\BRbooknumberstyle}[1]{#1 }
1053 % \end{macrocode}
1054 %\end{macro}
1055 %\begin{macro}{\BRepistlenumberstyle}
1056 % As above, but for epistle.
1057 % \begin{macrocode}
1058 \newcommand*{\BRepistlenumberstyle}[1]{#1 }
1059 % \end{macrocode}
1060 %\end{macro}
1061 %\begin{macro}{\BRbookof}
1062 %The text to go before the book title.
1063 %This by default is nothing,
1064 % but can be changed to, e.g., \qt{The book of }
1065 % \begin{macrocode}
1066 \newcommand*{\BRbookof}{}
1067 % \end{macrocode}
1068 %\end{macro}
1069 %\begin{macro}{\BRgospel}
1070 %As above but for gospels
1071 % \begin{macrocode}
1072 \newcommand*{\BRgospel}{}
1073 % \end{macrocode}
1074 %\end{macro}
1075 %\begin{macro}{\BRepistleto}
1076 % As above but for epistles to
1077 % someone.
1078 % \begin{macrocode}
1079 \newcommand*{\BRepistleto}{}
1080 % \end{macrocode}
1081 %\end{macro}
1082 %\begin{macro}{\BRepistletothe}
1083 % As above but for epistles to
1084 % people.
1085 % \begin{macrocode}
1086 \newcommand*{\BRepistletothe}{}
1087 % \end{macrocode}
1088 %\end{macro}
1089 %\begin{macro}{\BRepistleof}
1090 % As above but for \qt{epistles of }
1091 % \begin{macrocode}
1092 \newcommand*{\BRepistleof}{}
1093 % \end{macrocode}
1094 %\end{macro}
1095 %
1096 %\begin{macro}{\BRbooktitlestyle}
1097 % The style of the
1098 % book title. By default, it simply displays its argument.
1099 % \begin{macrocode}
1100 \newcommand*{\BRbooktitlestyle}[1]{#1}
1101 % \end{macrocode}
1102 %\end{macro}
1103 %\begin{macro}{\BRchapterstyle}
1104 %
1105 % The style of the chapter number.
1106 % By default it simply displays its argument.
1107 % \begin{macrocode}
1108 \newcommand*{\BRchapterstyle}[1]{#1}
1109 % \end{macrocode}
1110 %\end{macro}
1111 %\changes{1.17}{2017/06/30}{Add syntaxis to use double numbering of the Psalms}
1112 % \begin{macro}{\BRchapterstyle}
1113 % The way the alternate chapter number is shown.
1114 % By default, in parenthesis.
1115 % \begin{macrocode}
1116 \newcommand*{\BRotherchapterstyle}[1]{(#1)}%
1117 % \end{macrocode}
1118 % \end{macro}
1119 %\begin{macro}{\BRversestyle}
1120 %The style of the verse number.
1121 % By default is simply displays its argument.
1122 % \begin{macrocode}
1123 \newcommand*{\BRversestyle}[1]{#1}
1124 % \end{macrocode}
1125 %\end{macro}
1126 %\begin{macro}{\BRversesuffixstyle}
1127 %The style of the verse suffix.
1128 % By default is simply displays its argument.
1129 % \begin{macrocode}
1130 \newcommand*{\BRversesuffixstyle}[1]{#1}
1131 % \end{macrocode}
1132 %\end{macro}
1133 %
1134 %\begin{macro}{\BRbkchsep}
1135 %The separator between the book title
1136 % and the chapter number
1137 % \begin{macrocode}
1138 \newcommand*{\BRbkchsep}{ }
1139 % \end{macrocode}
1140 %\end{macro}
1141 %\begin{macro}{\BRchvsep}
1142 % The separator between chapter
1143 % and verse numbers. By default this is simply a colon.
1144 % \begin{macrocode}
1145 \newcommand*{\BRchvsep}{:}
1146 % \end{macrocode}
1147 %\end{macro}
1148 %\begin{macro}{\BRchsep}
1149 % The separator between multiple chapters.
1150 % By default this is simply a semi-colon.
1151 % \begin{macrocode}
1152 \newcommand*{\BRchsep}{;}
1153 % \end{macrocode}
1154 %\end{macro}
1155 %\begin{macro}{\BRvrsep}
1156 % The separator between the beginning
1157 % and ending of a range of verses. By default this
1158 % is simply an en-dash.
1159 % \begin{macrocode}
1160 \newcommand*{\BRvrsep}{--}
1161 % \end{macrocode}
1162 %\end{macro}
1163 %\begin{macro}{\BRvsep}
1164 %The separator between a list of verses.
1165 % \begin{macrocode}
1166 \newcommand*{\BRvsep}{,}
1167 % \end{macrocode}
1168 %\end{macro}
1169 %\begin{macro}{\BRperiod}
1170 % This can be redefined to put a full stop after
1171 % book names.
1172 % \begin{macrocode}
1173 \newcommand*{\BRperiod}{}
1174 % \end{macrocode}
1175 %\end{macro}
1176 %
1177 %\begin{macro}{\brfullname}
1178 % This will switch to using the full book title.
1179 %\changes{1.08}{2008/05/12}{fixed error in spelling of \cs{br@Jeremiah}}
1180 % \begin{macrocode}
1181 \newcommand*{\brfullname}{%
1182 \def\br@Genesis{\BRbookof Genesis}%
1183 \def\br@Exodus{\BRbookof Exodus}%
1184 \def\br@Leviticus{\BRbookof Leviticus}%
1185 \def\br@Numbers{\BRbookof Numbers}%
1186 \def\br@Deuteronomy{\BRbookof Deuteronomy}%
1187 \def\br@Joshua{\BRbookof Joshua}%
1188 \def\br@Judges{\BRbookof Judges}%
1189 \def\br@Ruth{\BRbookof Ruth}%
1190 \def\br@ISamuel{\BRbooknumberstyle{1}\BRbookof Samuel}%
1191 \def\br@IISamuel{\BRbooknumberstyle{2}\BRbookof Samuel}%
1192 \def\br@IKings{\BRbooknumberstyle{1}\BRbookof Kings}%
1193 \def\br@IIKings{\BRbooknumberstyle{2}\BRbookof Kings}%
1194 \def\br@IChronicles{\BRbooknumberstyle{1}\BRbookof Chronicles}%
1195 \def\br@IIChronicles{\BRbooknumberstyle{2}\BRbookof Chronicles}%
1196 \def\br@Ezra{\BRbookof Ezra}%
1197 \def\br@Nehemiah{\BRbookof Nehemiah}%
1198 \def\br@Tobit{\BRbookof Tobit}%
1199 \def\br@Judith{\BRbookof Judith}%
1200 \def\br@Esther{\BRbookof Esther}%
1201 \def\br@IMaccabees{\BRbooknumberstyle{1}\BRbookof Maccabees}%
1202 \def\br@IIMaccabees{\BRbooknumberstyle{2}\BRbookof Maccabees}%
1203 \def\br@Job{\BRbookof Job}%
1204 \def\br@Psalms{\BRbookof Psalms}%
1205 \def\br@Proverbs{\BRbookof Proverbs}%
1206 \def\br@Ecclesiastes{\BRbookof Ecclesiastes}%
1207 \def\br@SongofSongs{\BRbookof Song of Songs}%
1208 \def\br@Wisdom{\BRbookof Wisdom}%
1209 \def\br@Ecclesiasticus{\BRbookof Ecclesiasticus}%
1210 \def\br@Isaiah{\BRbookof Isaiah}%
1211 \def\br@Jeremiah{\BRbookof Jeremiah}%
1212 \def\br@Lamentations{\BRbookof Lamentations}%
1213 \def\br@Baruch{\BRbookof Baruch}%
1214 \def\br@Ezekiel{\BRbookof Ezekiel}%
1215 \def\br@Daniel{\BRbookof Daniel}%
1216 \def\br@Hosea{\BRbookof Hosea}%
1217 \def\br@Joel{\BRbookof Joel}%
1218 \def\br@Amos{\BRbookof Amos}%
1219 \def\br@Obadiah{\BRbookof Obadiah}%
1220 \def\br@Jonah{\BRbookof Jonah}%
1221 \def\br@Micah{\BRbookof Micah}%
1222 \def\br@Nahum{\BRbookof Nahum}%
1223 \def\br@Habakkuk{\BRbookof Habakkuk}%
1224 \def\br@Zephaniah{\BRbookof Zephaniah}%
1225 \def\br@Haggai{\BRbookof Haggai}%
1226 \def\br@Zechariah{\BRbookof Zechariah}%
1227 \def\br@Malachi{\BRbookof Malachi}%
1228 \def\br@Matthew{\BRgospel Matthew}%
1229 \def\br@Mark{\BRgospel Mark}%
1230 \def\br@Luke{\BRgospel Luke}%
1231 \def\br@John{\BRgospel John}%
1232 \def\br@Acts{Acts}%
1233 \def\br@Romans{\BRepistletothe Romans}%
1234 \def\br@ICorinthians{\BRepistlenumberstyle{1}\BRepistletothe Corinthians}%
1235 \def\br@IICorinthians{\BRepistlenumberstyle{2}\BRepistletothe Corinthians}%
1236 \def\br@Galatians{\BRepistletothe Galatians}%
1237 \def\br@Ephesians{\BRepistletothe Ephesians}%
1238 \def\br@Philippians{\BRepistletothe Philippians}%
1239 \def\br@Colossians{\BRepistletothe Colossians}%
1240 \def\br@IThessalonians{\BRepistlenumberstyle{1}\BRepistletothe Thessalonians}%
1241 \def\br@IIThessalonians{\BRepistlenumberstyle{2}\BRepistletothe Thessalonians}%
1242 \def\br@ITimothy{\BRepistlenumberstyle{1}\BRepistleto Timothy}%
1243 \def\br@IITimothy{\BRepistlenumberstyle{2}\BRepistleto Timothy}%
1244 \def\br@Titus{\BRepistleto Titus}%
1245 \def\br@Philemon{\BRepistleto Philemon}%
1246 \def\br@Hebrews{\BRepistletothe Hebrews}%
1247 \def\br@James{\BRepistleof James}%
1248 \def\br@IPeter{\BRepistlenumberstyle{1}\BRepistleof Peter}%
1249 \def\br@IIPeter{\BRepistlenumberstyle{2}\BRepistleof Peter}%
1250 \def\br@IJohn{\BRepistlenumberstyle{1}\BRepistleof John}%
1251 \def\br@IIJohn{\BRepistlenumberstyle{2}\BRepistleof John}%
1252 \def\br@IIIJohn{\BRepistlenumberstyle{3}\BRepistleof John}%
1253 \def\br@Jude{\BRepistleof Jude}%
1254 \def\br@Revelation{\BRbookof Revelation}}
1255 % \end{macrocode}
1256 %\end{macro}
1257 % Set full names as the default
1258 % \begin{macrocode}
1259 \brfullname
1260 % \end{macrocode}
1261 %
1262 %\begin{macro}{\brabbrvname}
1263 % This will switch to an abbreviated form for the book titles.
1264 % \begin{macrocode}
1265 \newcommand*{\brabbrvname}{%
1266 \def\br@Genesis{Gn\BRperiod}%
1267 \def\br@Exodus{Ex\BRperiod}%
1268 \def\br@Leviticus{Lv\BRperiod}%
1269 \def\br@Numbers{Nb\BRperiod}%
1270 \def\br@Deuteronomy{Dt\BRperiod}%
1271 \def\br@Joshua{Jos\BRperiod}%
1272 \def\br@Judges{Jg\BRperiod}%
1273 \def\br@Ruth{Rt\BRperiod}%
1274 \def\br@ISamuel{\BRbooknumberstyle{1}S\BRperiod}%
1275 \def\br@IISamuel{\BRbooknumberstyle{2}S\BRperiod}%
1276 \def\br@IKings{\BRbooknumberstyle{1}K\BRperiod}%
1277 \def\br@IIKings{\BRbooknumberstyle{2}K\BRperiod}%
1278 \def\br@IChronicles{\BRbooknumberstyle{1}Ch\BRperiod}%
1279 \def\br@IIChronicles{\BRbooknumberstyle{2}Ch\BRperiod}%
1280 \def\br@Ezra{Ezr\BRperiod}%
1281 \def\br@Nehemiah{Ne\BRperiod}%
1282 \def\br@Tobit{Tb\BRperiod}%
1283 \def\br@Judith{Jdt\BRperiod}%
1284 \def\br@Esther{Est\BRperiod}%
1285 \def\br@IMaccabees{\BRbooknumberstyle{1}M\BRperiod}%
1286 \def\br@IIMaccabees{\BRbooknumberstyle{2}M\BRperiod}%
1287 \def\br@Job{Jb\BRperiod}%
1288 \def\br@Psalms{Ps\BRperiod}%
1289 \def\br@Proverbs{Pr\BRperiod}%
1290 \def\br@Ecclesiastes{Qo\BRperiod}%
1291 \def\br@SongofSongs{Sg\BRperiod}%
1292 \def\br@Wisdom{Ws\BRperiod}%
1293 \def\br@Ecclesiasticus{Si\BRperiod}%
1294 \def\br@Isaiah{Is\BRperiod}%
1295 \def\br@Jeremiah{Jr\BRperiod}%
1296 \def\br@Lamentations{Lm\BRperiod}%
1297 \def\br@Baruch{Ba\BRperiod}%
1298 \def\br@Ezekiel{Ezk\BRperiod}%
1299 \def\br@Daniel{Dn\BRperiod}%
1300 \def\br@Hosea{Ho\BRperiod}%
1301 \def\br@Joel{Jl\BRperiod}%
1302 \def\br@Amos{Am\BRperiod}%
1303 \def\br@Obadiah{Ob\BRperiod}%
1304 \def\br@Jonah{Jon\BRperiod}%
1305 \def\br@Micah{Mi\BRperiod}%
1306 \def\br@Nahum{Na\BRperiod}%
1307 \def\br@Habakkuk{Hab\BRperiod}%
1308 \def\br@Zephaniah{Zp\BRperiod}%
1309 \def\br@Haggai{Hg\BRperiod}%
1310 \def\br@Zechariah{Zc\BRperiod}%
1311 \def\br@Malachi{Ml\BRperiod}%
1312 \def\br@Matthew{Mt\BRperiod}%
1313 \def\br@Mark{Mk\BRperiod}%
1314 \def\br@Luke{Lk\BRperiod}%
1315 \def\br@John{Jn\BRperiod}%
1316 \def\br@Acts{Ac\BRperiod}%
1317 \def\br@Romans{Rm\BRperiod}%
1318 \def\br@ICorinthians{\BRepistlenumberstyle{1}Co\BRperiod}%
1319 \def\br@IICorinthians{\BRepistlenumberstyle{2}Co\BRperiod}%
1320 \def\br@Galatians{Ga\BRperiod}%
1321 \def\br@Ephesians{Ep\BRperiod}%
1322 \def\br@Philippians{Ph\BRperiod}%
1323 \def\br@Colossians{Col\BRperiod}%
1324 \def\br@IThessalonians{\BRepistlenumberstyle{1}Th\BRperiod}%
1325 \def\br@IIThessalonians{\BRepistlenumberstyle{2}Th\BRperiod}%
1326 \def\br@ITimothy{\BRepistlenumberstyle{1}Tm\BRperiod}%
1327 \def\br@IITimothy{\BRepistlenumberstyle{2}Tm\BRperiod}%
1328 \def\br@Titus{Tt\BRperiod}%
1329 \def\br@Philemon{Phm\BRperiod}%
1330 \def\br@Hebrews{Heb\BRperiod}%
1331 \def\br@James{Jm\BRperiod}%
1332 \def\br@IPeter{\BRepistlenumberstyle{1}P\BRperiod}%
1333 \def\br@IIPeter{\BRepistlenumberstyle{2}P\BRperiod}%
1334 \def\br@IJohn{\BRepistlenumberstyle{1}Jn\BRperiod}%
1335 \def\br@IIJohn{\BRepistlenumberstyle{2}Jn\BRperiod}%
1336 \def\br@IIIJohn{\BRepistlenumberstyle{3}Jn\BRperiod}%
1337 \def\br@Jude{Jude}%
1338 \def\br@Revelation{Rv\BRperiod}}
1339 % \end{macrocode}
1340 %\end{macro}
1341 %
1342 %\begin{macro}{\braltabbrvname}
1343 % This switches to an alternative set of abbreviations.
1344 % \begin{macrocode}
1345 \newcommand*{\braltabbrvname}{%
1346 \def\br@Genesis{Gen\BRperiod}%
1347 \def\br@Exodus{Exod\BRperiod}%
1348 \def\br@Leviticus{Lev\BRperiod}%
1349 \def\br@Numbers{Num\BRperiod}%
1350 \def\br@Deuteronomy{Deut\BRperiod}%
1351 \def\br@Joshua{Josh\BRperiod}%
1352 \def\br@Judges{Judg\BRperiod}%
1353 \def\br@Ruth{Ruth}%
1354 \def\br@ISamuel{\BRbooknumberstyle{1}Sam\BRperiod}%
1355 \def\br@IISamuel{\BRbooknumberstyle{2}Sam\BRperiod}%
1356 \def\br@IKings{\BRbooknumberstyle{1}Kgs\BRperiod}%
1357 \def\br@IIKings{\BRbooknumberstyle{2}Kgs\BRperiod}%
1358 \def\br@IChronicles{\BRbooknumberstyle{1}Chr\BRperiod}%
1359 \def\br@IIChronicles{\BRbooknumberstyle{2}Chr\BRperiod}%
1360 \def\br@Ezra{Ezra}%
1361 \def\br@Nehemiah{Neh\BRperiod}%
1362 \def\br@Tobit{Tobit}%
1363 \def\br@Judith{Judith}%
1364 \def\br@Esther{Esther}%
1365 \def\br@IMaccabees{\BRbooknumberstyle{1}M\BRperiod}%
1366 \def\br@IIMaccabees{\BRbooknumberstyle{2}M\BRperiod}%
1367 \def\br@Job{Job}%
1368 \def\br@Psalms{Ps\BRperiod}%
1369 \def\br@Proverbs{Prov\BRperiod}%
1370 \def\br@Ecclesiastes{Eccles\BRperiod}%
1371 \def\br@SongofSongs{S\BRperiod\ of S\BRperiod}%
1372 \def\br@Wisdom{Wisd\BRperiod}%
1373 \def\br@Ecclesiasticus{Ecclus\BRperiod}%
1374 \def\br@Isaiah{Isa\BRperiod}%
1375 \def\br@Jeremiah{Jer\BRperiod}%
1376 \def\br@Lamentations{Lam\BRperiod}%
1377 \def\br@Baruch{Baruch}%
1378 \def\br@Ezekiel{Ezek\BRperiod}%
1379 \def\br@Daniel{Dan\BRperiod}%
1380 \def\br@Hosea{Hos\BRperiod}%
1381 \def\br@Joel{Joel}%
1382 \def\br@Amos{Amos}%
1383 \def\br@Obadiah{Obad}%
1384 \def\br@Jonah{Jonah}%
1385 \def\br@Micah{Mic\BRperiod}%
1386 \def\br@Nahum{Nah\BRperiod}%
1387 \def\br@Habakkuk{Hab\BRperiod}%
1388 \def\br@Zephaniah{Zeph\BRperiod}%
1389 \def\br@Haggai{Hag\BRperiod}%
1390 \def\br@Zechariah{Zech\BRperiod}%
1391 \def\br@Malachi{Mal\BRperiod}%
1392 \def\br@Matthew{Matt\BRperiod}%
1393 \def\br@Mark{Mark}%
1394 \def\br@Luke{Luke}%
1395 \def\br@John{John}%
1396 \def\br@Acts{Acts}%
1397 \def\br@Romans{Rom\BRperiod}%
1398 \def\br@ICorinthians{\BRepistlenumberstyle{1}Cor\BRperiod}%
1399 \def\br@IICorinthians{\BRepistlenumberstyle{2}Cor\BRperiod}%
1400 \def\br@Galatians{Gal\BRperiod}%
1401 \def\br@Ephesians{Eph\BRperiod}%
1402 \def\br@Philippians{Phil\BRperiod}%
1403 \def\br@Colossians{Col\BRperiod}%
1404 \def\br@IThessalonians{\BRepistlenumberstyle{1}Thess\BRperiod}%
1405 \def\br@IIThessalonians{\BRepistlenumberstyle{2}Thess\BRperiod}%
1406 \def\br@ITimothy{\BRepistlenumberstyle{1}Tim\BRperiod}%
1407 \def\br@IITimothy{\BRepistlenumberstyle{2}Tim\BRperiod}%
1408 \def\br@Titus{Tit\BRperiod}%
1409 \def\br@Philemon{Philem\BRperiod}%
1410 \def\br@Hebrews{Heb\BRperiod}%
1411 \def\br@James{Jas\BRperiod}%
1412 \def\br@IPeter{\BRepistlenumberstyle{1}Pet\BRperiod}%
1413 \def\br@IIPeter{\BRepistlenumberstyle{2}Pet\BRperiod}%
1414 \def\br@IJohn{\BRepistlenumberstyle{1}John}%
1415 \def\br@IIJohn{\BRepistlenumberstyle{2}John}%
1416 \def\br@IIIJohn{\BRepistlenumberstyle{3}John}%
1417 \def\br@Jude{Jude}%
1418 \def\br@Revelation{Rev\BRperiod}}
1419 % \end{macrocode}
1420 %\end{macro}
1421 %
1422 %\begin{macro}{\brthreeabbrvname}
1423 %\changes{1.24}{2019/12/10}{Added \cs{brthreelettabbrvname}}
1424 % This switches to a standardized set of three-character abbreviations.
1425 % \begin{macrocode}
1426 \newcommand*{\brthreeabbrvname}{%
1427 \def\br@Genesis{Gen\BRperiod}%
1428 \def\br@Exodus{Exo\BRperiod}%
1429 \def\br@Leviticus{Lev\BRperiod}%
1430 \def\br@Numbers{Num\BRperiod}%
1431 \def\br@Deuteronomy{Deu\BRperiod}%
1432 \def\br@Joshua{Jos\BRperiod}%
1433 \def\br@Judges{Jdg\BRperiod}%
1434 \def\br@Ruth{Rut\BRperiod}%
1435 \def\br@ISamuel{\BRbooknumberstyle{1}Sa\BRperiod}%
1436 \def\br@IISamuel{\BRbooknumberstyle{2}Sa\BRperiod}%
1437 \def\br@IKings{\BRbooknumberstyle{1}Ki\BRperiod}%
1438 \def\br@IIKings{\BRbooknumberstyle{2}Ki\BRperiod}%
1439 \def\br@IChronicles{\BRbooknumberstyle{1}Ch\BRperiod}%
1440 \def\br@IIChronicles{\BRbooknumberstyle{2}Ch\BRperiod}%
1441 \def\br@Ezra{Ezr\BRperiod}%
1442 \def\br@Nehemiah{Neh\BRperiod}%
1443 \def\br@Tobit{Tob\BRperiod}%
1444 \def\br@Judith{Jdi\BRperiod}%
1445 \def\br@Esther{Est\BRperiod}%
1446 \def\br@IMaccabees{\BRbooknumberstyle{1}Ma\BRperiod}%
1447 \def\br@IIMaccabees{\BRbooknumberstyle{2}Ma\BRperiod}%
1448 \def\br@Job{Job}%
1449 \def\br@Psalms{Psa\BRperiod}%
1450 \def\br@Proverbs{Pro\BRperiod}%
1451 \def\br@Ecclesiastes{Ecc\BRperiod}%
1452 \def\br@SongofSongs{SoS\BRperiod}%
1453 \def\br@Wisdom{Wis\BRperiod}%
1454 \def\br@Ecclesiasticus{Ecu\BRperiod}%
1455 \def\br@Isaiah{Isa\BRperiod}%
1456 \def\br@Jeremiah{Jer\BRperiod}%
1457 \def\br@Lamentations{Lam\BRperiod}%
1458 \def\br@Baruch{Bar\BRperiod}%
1459 \def\br@Ezekiel{Eze\BRperiod}%
1460 \def\br@Daniel{Dan\BRperiod}%
1461 \def\br@Hosea{Hos\BRperiod}%
1462 \def\br@Joel{Joe\BRperiod}%
1463 \def\br@Amos{Amo\BRperiod}%
1464 \def\br@Obadiah{Oba\BRperiod}%
1465 \def\br@Jonah{Jon\BRperiod}%
1466 \def\br@Micah{Mic\BRperiod}%
1467 \def\br@Nahum{Nah\BRperiod}%
1468 \def\br@Habakkuk{Hab\BRperiod}%
1469 \def\br@Zephaniah{Zep\BRperiod}%
1470 \def\br@Haggai{Hag\BRperiod}%
1471 \def\br@Zechariah{Zec\BRperiod}%
1472 \def\br@Malachi{Mal\BRperiod}%
1473 \def\br@Matthew{Mat\BRperiod}%
1474 \def\br@Mark{Mar\BRperiod}%
1475 \def\br@Luke{Luk\BRperiod}%
1476 \def\br@John{Joh\BRperiod}%
1477 \def\br@Acts{Act\BRperiod}%
1478 \def\br@Romans{Rom\BRperiod}%
1479 \def\br@ICorinthians{\BRepistlenumberstyle{1}Co\BRperiod}%
1480 \def\br@IICorinthians{\BRepistlenumberstyle{2}Co\BRperiod}%
1481 \def\br@Galatians{Gal\BRperiod}%
1482 \def\br@Ephesians{Eph\BRperiod}%
1483 \def\br@Philippians{Php\BRperiod}%
1484 \def\br@Colossians{Col\BRperiod}%
1485 \def\br@IThessalonians{\BRepistlenumberstyle{1}Th\BRperiod}%
1486 \def\br@IIThessalonians{\BRepistlenumberstyle{2}Th\BRperiod}%
1487 \def\br@ITimothy{\BRepistlenumberstyle{1}Ti\BRperiod}%
1488 \def\br@IITimothy{\BRepistlenumberstyle{2}Ti\BRperiod}%
1489 \def\br@Titus{Tit\BRperiod}%
1490 \def\br@Philemon{Phm\BRperiod}%
1491 \def\br@Hebrews{Heb\BRperiod}%
1492 \def\br@James{Jam\BRperiod}%
1493 \def\br@IPeter{\BRepistlenumberstyle{1}Pe\BRperiod}%
1494 \def\br@IIPeter{\BRepistlenumberstyle{2}Pe\BRperiod}%
1495 \def\br@IJohn{\BRepistlenumberstyle{1}Jo}%
1496 \def\br@IIJohn{\BRepistlenumberstyle{2}Jo}%
1497 \def\br@IIIJohn{\BRepistlenumberstyle{3}Jo}%
1498 \def\br@Jude{Jde\BRperiod}%
1499 \def\br@Revelation{Rev\BRperiod}}
1500 % \end{macrocode}
1501 %\end{macro}
1502 %
1503 % Provide synonymns.
1504 % \begin{macrocode}
1505 \newcommand*\br@Gn{\br@Genesis}%
1506 \newcommand*\br@Ex{\br@Exodus}%
1507 \newcommand*\br@Lv{\br@Leviticus}%
1508 \newcommand*\br@Nb{\br@Numbers}%
1509 \newcommand*\br@Dt{\br@Deuteronomy}%
1510 \newcommand*\br@Jos{\br@Joshua}%
1511 \newcommand*\br@Jg{\br@Judges}%
1512 \newcommand*\br@Rt{\br@Ruth}%
1513 \newcommand*\br@IS{\br@ISamuel}%
1514 \newcommand*\br@IIS{\br@IISamuel}%
1515 \newcommand*\br@IK{\br@IKings}%
1516 \newcommand*\br@IIK{\br@IIKings}%
1517 \newcommand*\br@ICh{\br@IChronicles}%
1518 \newcommand*\br@IICh{\br@IIChronicles}%
1519 \newcommand*\br@Ezr{\br@Ezra}%
1520 \newcommand*\br@Ne{\br@Nehemiah}%
1521 \newcommand*\br@Tb{\br@Tobit}%
1522 \newcommand*\br@Jdt{\br@Judith}%
1523 \newcommand*\br@Est{\br@Esther}%
1524 \newcommand*\br@IM{\br@IMaccabees}%
1525 \newcommand*\br@IIM{\br@IIMaccabees}%
1526 \newcommand*\br@Jb{\br@Job}%
1527 \newcommand*\br@Ps{\br@Psalms}%
1528 \newcommand*\br@Pr{\br@Proverbs}%
1529 \newcommand*\br@Qo{\br@Ecclesiastes}%
1530 \newcommand*\br@Sg{\br@SongofSongs}%
1531 \newcommand*\br@Ws{\br@Wisdom}%
1532 \newcommand*\br@Si{\br@Ecclesiasticus}%
1533 \newcommand*\br@Is{\br@Isaiah}%
1534 \newcommand*\br@Jr{\br@Jeremiah}%
1535 \newcommand*\br@Lm{\br@Lamentations}%
1536 \newcommand*\br@Ba{\br@Baruch}%
1537 \newcommand*\br@Bar{\br@Baruch}%
1538 \newcommand*\br@Dn{\br@Daniel}%
1539 \newcommand*\br@Ho{\br@Hosea}%
1540 \newcommand*\br@Jl{\br@Joel}%
1541 \newcommand*\br@Am{\br@Amos}%
1542 \newcommand*\br@Ob{\br@Obadiah}%
1543 \newcommand*\br@Jon{\br@Jonah}%
1544 \newcommand*\br@Mi{\br@Micah}%
1545 \newcommand*\br@Na{\br@Nahum}%
1546 \newcommand*\br@Hab{\br@Habakkuk}%
1547 \newcommand*\br@Zp{\br@Zephaniah}%
1548 \newcommand*\br@Hg{\br@Haggai}%
1549 \newcommand*\br@Zc{\br@Zechariah}%
1550 \newcommand*\br@Ml{\br@Malachi}%
1551 \newcommand*\br@Mt{\br@Matthew}%
1552 \newcommand*\br@Mk{\br@Mark}%
1553 \newcommand*\br@Lk{\br@Luke}%
1554 \newcommand*\br@Jn{\br@John}%
1555 \newcommand*\br@Rm{\br@Romans}%
1556 \newcommand*\br@Ga{\br@Galatians}%
1557 \newcommand*\br@Ep{\br@Ephesians}%
1558 \newcommand*\br@Ph{\br@Philippians}%
1559 \newcommand*\br@ITh{\br@IThessalonians}%
1560 \newcommand*\br@IITh{\br@IIThessalonians}%
1561 \newcommand*\br@ITm{\br@ITimothy}%
1562 \newcommand*\br@IITm{\br@IITimothy}%
1563 \newcommand*\br@Tt{\br@Titus}%
1564 \newcommand*\br@Phm{\br@Philemon}%
1565 \newcommand*\br@Heb{\br@Hebrews}%
1566 \newcommand*\br@Jm{\br@James}%
1567 \newcommand*\br@IP{\br@IPeter}%
1568 \newcommand*\br@IIP{\br@IIPeter}%
1569 \newcommand*\br@IJn{\br@IJohn}%
1570 \newcommand*\br@IIJn{\br@IIJohn}%
1571 \newcommand*\br@Rv{\br@Revelation}
1572 % \end{macrocode}
1573 % More synonyms.
1574 %\changes{1.21}{2018/11/17}{Add Wis abbreviation}
1575 %\changes{1.22}{2018/12/05}{Add Bar abbreviation}
1576 %\changes{1.23}{2019/01/13}{Add Ti abbreviation}
1577 %\changes{1.24}{2019/12/10}{Added Exo, Levit, Deu, Jos, Jsh, Rut, IKi, IKin, IIKi, IIKin, IMac, IIMac, Psa, Psal, Pro, Son, Song, Songs, Ezk, Eze, Joe, Amo, Oba, Zec, Zep, Mat, Mar, Luk, Joh, Act, ICo IICo, Php, Col, IThe, IThes, IIThe, IIThes, ITi, IITi, Hb, Jam, IPe, IIPe, IJo, IJoh, IIJo, IIJoh, IIIJn, IIIJo, IIIJoh
1578 % \begin{macrocode}
1579 \newcommand*\br@Gen{\br@Genesis}%
1580 \newcommand*\br@Exo{\br@Exodus}%
1581 \newcommand*\br@Exod{\br@Exodus}%
1582 \newcommand*\br@Lev{\br@Leviticus}%
1583 \newcommand*\br@Levit{\br@Leviticus}%
1584 \newcommand*\br@Num{\br@Numbers}%
1585 \newcommand*\br@Deu{\br@Deuteronomy}%
1586 \newcommand*\br@Deut{\br@Deuteronomy}%
1587 \newcommand*\br@Josh{\br@Joshua}%
1588 \newcommand*\br@Jsh{\br@Joshua}%
1589 \newcommand*\br@Judg{\br@Judges}%
1590 \newcommand*\br@Jdg{\br@Judges}%
1591 \newcommand*\br@Rut{\br@Ruth}%
1592 \newcommand*\br@ISam{\br@ISamuel}%
1593 \newcommand*\br@ISa{\br@ISamuel}%
1594 \newcommand*\br@IISam{\br@IISamuel}%
1595 \newcommand*\br@IISa{\br@IISamuel}%
1596 \newcommand*\br@IKgs{\br@IKings}%
1597 \newcommand*\br@IKi{\br@IKings}%
1598 \newcommand*\br@IKin{\br@IKings}%
1599 \newcommand*\br@IIKgs{\br@IIKings}%
1600 \newcommand*\br@IIKi{\br@IIKings}%
1601 \newcommand*\br@IIKin{\br@IIKings}%
1602 \newcommand*\br@IChr{\br@IChronicles}%
1603 \newcommand*\br@IIChr{\br@IIChronicles}%
1604 \newcommand*\br@Neh{\br@Nehemiah}%
1605 \newcommand*\br@Esth{\br@Esther}%
1606 \newcommand*\br@IMacc{\br@IMaccabees}%
1607 \newcommand*\br@IMac{\br@IMaccabees}%
1608 \newcommand*\br@IIMac{\br@IIMaccabees}%
1609 \newcommand*\br@IIMacc{\br@IIMaccabees}%
1610 \newcommand*\br@Psa{\br@Psalms}%
1611 \newcommand*\br@Psal{\br@Psalms}%
1612 \newcommand*\br@Pro{\br@Proverbs}%
1613 \newcommand*\br@Prov{\br@Proverbs}%
1614 \newcommand*\br@Eccl{\br@Ecclesiastes}%
1615 \newcommand*\br@SofS{\br@SongofSongs}%
1616 \newcommand*\br@Son{\br@SongofSongs}%
1617 \newcommand*\br@Song{\br@SongofSongs}%
1618 \newcommand*\br@Songs{\br@SongofSongs}%
1619 \newcommand*\br@Wis{\br@Wisdom}%
1620 \newcommand*\br@Wisd{\br@Wisdom}%
1621 \newcommand*\br@Ecclus{\br@Ecclesiasticus}%
1622 \newcommand*\br@Sir{\br@Ecclesiasticus}%
1623 \newcommand*\br@Isa{\br@Isaiah}%
1624 \newcommand*\br@Jer{\br@Jeremiah}%
1625 \newcommand*\br@Lam{\br@Lamentations}%
1626 \newcommand*\br@Ezek{\br@Ezekiel}%
1627 \newcommand*\br@Ezk{\br@Ezekiel}%
1628 \newcommand*\br@Eze{\br@Ezekiel}%
1629 \newcommand*\br@Dan{\br@Daniel}%
1630 \newcommand*\br@Hos{\br@Hosea}%
1631 \newcommand*\br@Joe{\br@Joel}%
1632 \newcommand*\br@Amo{\br@Amos}%
1633 \newcommand*\br@Obad{\br@Obadiah}%
1634 \newcommand*\br@Oba{\br@Obadiah}%
1635 \newcommand*\br@Mic{\br@Micah}%
1636 \newcommand*\br@Nah{\br@Nahum}%
1637 \newcommand*\br@Zeph{\br@Zephaniah}%
1638 \newcommand*\br@Zep{\br@Zephaniah}%
1639 \newcommand*\br@Hag{\br@Haggai}%
1640 \newcommand*\br@Zech{\br@Zechariah}%
1641 \newcommand*\br@Zec{\br@Zechariah}%
1642 \newcommand*\br@Mal{\br@Malachi}%
1643 \newcommand*\br@Matt{\br@Matthew}%
1644 \newcommand*\br@Mat{\br@Matthew}%
1645 \newcommand*\br@Mar{\br@Mark}%
1646 \newcommand*\br@Luk{\br@Luke}%
1647 \newcommand*\br@Joh{\br@John}%
1648 \newcommand*\br@Ac{\br@Acts}%
1649 \newcommand*\br@Rom{\br@Romans}%
1650 \newcommand*\br@ICo{\br@ICorinthians}%
1651 \newcommand*\br@ICor{\br@ICorinthians}%
1652 \newcommand*\br@IICo{\br@IICorinthians}%
1653 \newcommand*\br@IICor{\br@IICorinthians}%
1654 \newcommand*\br@Gal{\br@Galatians}%
1655 \newcommand*\br@Eph{\br@Ephesians}%
1656 \newcommand*\br@Phil{\br@Philippians}%
1657 \newcommand*\br@Php{\br@Philippians}%
1658 \newcommand*\br@Col{\br@Colossians}%
1659 \newcommand*\br@IThe{\br@IThessalonians}%
1660 \newcommand*\br@IThes{\br@IThessalonians}%
1661 \newcommand*\br@IThess{\br@IThessalonians}%
1662 \newcommand*\br@IIThe{\br@IIThessalonians}%
1663 \newcommand*\br@IIThes{\br@IIThessalonians}%
1664 \newcommand*\br@IIThess{\br@IIThessalonians}%
1665 \newcommand*\br@ITi{\br@ITimothy}%
1666 \newcommand*\br@ITim{\br@ITimothy}%
1667 \newcommand*\br@IITi{\br@IITimothy}%
1668 \newcommand*\br@IITim{\br@IITimothy}%
1669 \newcommand*\br@Tit{\br@Titus}%
1670 \newcommand*\br@Ti{\br@Titus}%
1671 \newcommand*\br@Philem{\br@Philemon}%
1672 \newcommand*\br@Hb{\br@Hebrews}%
1673 \newcommand*\br@Jas{\br@James}%
1674 \newcommand*\br@Jam{\br@James}%
1675 \newcommand*\br@IPet{\br@IPeter}%
1676 \newcommand*\br@IPe{\br@IPeter}%
1677 \newcommand*\br@IIPet{\br@IIPeter}%
1678 \newcommand*\br@IIPe{\br@IIPeter}%
1679 \newcommand*\br@IJo{\br@IJohn}%
1680 \newcommand*\br@IJoh{\br@IJohn}%
1681 \newcommand*\br@IIJo{\br@IIJohn}%
1682 \newcommand*\br@IIJoh{\br@IIJohn}%
1683 \newcommand*\br@IIIJn{\br@IIIJohn}%
1684 \newcommand*\br@IIIJo{\br@IIIJohn}%
1685 \newcommand*\br@IIIJoh{\br@IIIJohn}%
1686 \newcommand*\br@Rev{\br@Revelation}
1687 % \end{macrocode}
1688 %\begin{macro}{\brs@default}
1689 % Set up assorted styles. All bible reference styles
1690 % should start with \verb|brs@|. First the default
1691 % style.
1692 % \begin{macrocode}
1693 \newcommand*{\brs@default}{%
1694 \brfullname
1695 \renewcommand*{\BRbooknumberstyle}[1]{##1 }%
1696 \renewcommand*{\BRepistlenumberstyle}[1]{##1 }%
1697 \renewcommand*{\BRbooktitlestyle}[1]{##1}%
1698 \renewcommand*{\BRchapterstyle}[1]{##1}%
1699 \renewcommand*{\BRversestyle}[1]{##1}%
1700 \renewcommand*{\BRversesuffixstyle}[1]{##1}%
1701 \renewcommand*{\BRbookof}{}%
1702 \renewcommand*{\BRgospel}{}%
1703 \renewcommand*{\BRepistletothe}{}%
1704 \renewcommand*{\BRepistleto}{}%
1705 \renewcommand*{\BRepistleof}{}%
1706 \renewcommand*{\BRbkchsep}{ }%
1707 \renewcommand*{\BRchvsep}{:}%
1708 \renewcommand*{\BRchsep}{;}%
1709 \renewcommand*{\BRvrsep}{--}%
1710 \renewcommand*{\BRvsep}{,}%
1711 \renewcommand*{\BRperiod}{}}
1712 % \end{macrocode}
1713 %\end{macro}
1714 %\begin{macro}{\brs@jerusalem}
1715 % The style used by the Jerusalem Bible.
1716 % \begin{macrocode}
1717 \newcommand*{\brs@jerusalem}{%
1718 \brabbrvname
1719 \renewcommand*{\BRbooknumberstyle}[1]{##1 }%
1720 \renewcommand*{\BRepistlenumberstyle}[1]{##1 }%
1721 \renewcommand*{\BRbooktitlestyle}[1]{##1}%
1722 \renewcommand*{\BRchapterstyle}[1]{##1}%
1723 \renewcommand*{\BRversestyle}[1]{##1}%
1724 \renewcommand*{\BRversesuffixstyle}[1]{##1}%
1725 \renewcommand*{\BRbookof}{}%
1726 \renewcommand*{\BRgospel}{}%
1727 \renewcommand*{\BRepistletothe}{}%
1728 \renewcommand*{\BRepistleto}{}%
1729 \renewcommand*{\BRepistleof}{}%
1730 \renewcommand*{\BRbkchsep}{ }
1731 \renewcommand*{\BRchvsep}{:}%
1732 \renewcommand*{\BRchsep}{; }%
1733 \renewcommand*{\BRvrsep}{--}%
1734 \renewcommand*{\BRvsep}{,}%
1735 \renewcommand*{\BRperiod}{}%
1736 }
1737 % \end{macrocode}
1738 %\end{macro}
1739 %\begin{macro}{\brs@anglosaxon}
1740 % Anglo-Saxon style.
1741 % \begin{macrocode}
1742 \newcommand*{\brs@anglosaxon}{%
1743 \braltabbrvname
1744 \renewcommand*{\BRbooknumberstyle}[1]{\MakeUppercase{\romannumeral##1} }%
1745 \renewcommand*{\BRepistlenumberstyle}[1]{\MakeUppercase{\romannumeral##1} }%
1746 \renewcommand*{\BRbooktitlestyle}[1]{##1}%
1747 \renewcommand*{\BRchapterstyle}[1]{\MakeUppercase{\romannumeral##1}}%
1748 \renewcommand*{\BRversestyle}[1]{##1}%
1749 \renewcommand*{\BRversesuffixstyle}[1]{##1}%
1750 \renewcommand*{\BRbookof}{}%
1751 \renewcommand*{\BRgospel}{}%
1752 \renewcommand*{\BRepistletothe}{}%
1753 \renewcommand*{\BRepistleto}{}%
1754 \renewcommand*{\BRepistleof}{}%
1755 \renewcommand*{\BRbkchsep}{ }
1756 \renewcommand*{\BRchvsep}{.}%
1757 \renewcommand*{\BRchsep}{; }%
1758 \renewcommand*{\BRvrsep}{--}%
1759 \renewcommand*{\BRvsep}{,}%
1760 \renewcommand*{\BRperiod}{.}%
1761 }
1762 % \end{macrocode}
1763 %\end{macro}
1764 %\begin{macro}{\brs@JEH}
1765 %Journal of Ecclesiastical History
1766 % \begin{macrocode}
1767 \newcommand*{\brs@JEH}{%
1768 \braltabbrvname
1769 \renewcommand*{\BRbooknumberstyle}[1]{##1 }%
1770 \renewcommand*{\BRepistlenumberstyle}[1]{##1 }%
1771 \renewcommand*{\BRbooktitlestyle}[1]{##1}%
1772 \renewcommand*{\BRchapterstyle}[1]{\romannumeral##1}%
1773 \renewcommand*{\BRversestyle}[1]{##1}%
1774 \renewcommand*{\BRversesuffixstyle}[1]{##1}%
1775 \renewcommand*{\BRbookof}{}%
1776 \renewcommand*{\BRgospel}{}%
1777 \renewcommand*{\BRepistletothe}{}%
1778 \renewcommand*{\BRepistleto}{}%
1779 \renewcommand*{\BRepistleof}{}%
1780 \renewcommand*{\BRbkchsep}{ }
1781 \renewcommand*{\BRchvsep}{. }%
1782 \renewcommand*{\BRchsep}{; }%
1783 \renewcommand*{\BRvrsep}{--}%
1784 \renewcommand*{\BRvsep}{,}%
1785 \renewcommand*{\BRperiod}{.}%
1786 }
1787 % \end{macrocode}
1788 %\end{macro}
1789 %\begin{macro}{\brs@MHRA}
1790 %Modern Humanities Research Association (MHRA)
1791 % \begin{macrocode}
1792 \newcommand*{\brs@MHRA}{%
1793 \brfullname
1794 \renewcommand*{\BRbooknumberstyle}[1]{\textsc{\romannumeral##1} }%
1795 \renewcommand*{\BRepistlenumberstyle}[1]{\textsc{\romannumeral##1} }%
1796 \renewcommand*{\BRbooktitlestyle}[1]{##1}%
1797 \renewcommand*{\BRchapterstyle}[1]{\romannumeral##1}%
1798 \renewcommand*{\BRversestyle}[1]{##1}%
1799 \renewcommand*{\BRversesuffixstyle}[1]{##1}%
1800 \renewcommand*{\BRbookof}{}%
1801 \renewcommand*{\BRgospel}{}%
1802 \renewcommand*{\BRepistletothe}{}%
1803 \renewcommand*{\BRepistleto}{}%
1804 \renewcommand*{\BRepistleof}{}%
1805 \renewcommand*{\BRbkchsep}{ }
1806 \renewcommand*{\BRchvsep}{. }%
1807 \renewcommand*{\BRchsep}{; }%
1808 \renewcommand*{\BRvrsep}{--}%
1809 \renewcommand*{\BRvsep}{,}%
1810 \renewcommand*{\BRperiod}{}%
1811 }
1812 % \end{macrocode}
1813 %\end{macro}
1814 %\begin{macro}{\brs@NTG}
1815 %Novum Testamentum Graece (Nestle-Aland)
1816 % \begin{macrocode}
1817 \newcommand*{\brs@NTG}{%
1818 \braltabbrvname
1819 \renewcommand*{\BRbooknumberstyle}[1]{##1 }%
1820 \renewcommand*{\BRepistlenumberstyle}[1]{##1 }%
1821 \renewcommand*{\BRbooktitlestyle}[1]{##1}%
1822 \renewcommand*{\BRchapterstyle}[1]{\romannumeral##1}%
1823 \renewcommand*{\BRversestyle}[1]{##1}%
1824 \renewcommand*{\BRversesuffixstyle}[1]{##1}%
1825 \renewcommand*{\BRbookof}{}%
1826 \renewcommand*{\BRgospel}{}%
1827 \renewcommand*{\BRepistletothe}{}%
1828 \renewcommand*{\BRepistleto}{}%
1829 \renewcommand*{\BRepistleof}{}%
1830 \renewcommand*{\BRbkchsep}{ }
1831 \renewcommand*{\BRchvsep}{,}%
1832 \renewcommand*{\BRchsep}{; }%
1833 \renewcommand*{\BRvrsep}{--}%
1834 \renewcommand*{\BRvsep}{,}%
1835 \renewcommand*{\BRperiod}{}%
1836 }
1837 % \end{macrocode}
1838 %\end{macro}
1839 %\begin{macro}{\brs@MLA}
1840 %MLA Style
1841 % \begin{macrocode}
1842 \newcommand*{\brs@MLA}{%
1843 \braltabbrvname
1844 \renewcommand*{\BRbooknumberstyle}[1]{##1 }%
1845 \renewcommand*{\BRepistlenumberstyle}[1]{##1 }%
1846 \renewcommand*{\BRbooktitlestyle}[1]{##1}%
1847 \renewcommand*{\BRchapterstyle}[1]{\romannumeral##1}%
1848 \renewcommand*{\BRversestyle}[1]{##1}%
1849 \renewcommand*{\BRversesuffixstyle}[1]{##1}%
1850 \renewcommand*{\BRbookof}{}%
1851 \renewcommand*{\BRgospel}{}%
1852 \renewcommand*{\BRepistletothe}{}%
1853 \renewcommand*{\BRepistleto}{}%
1854 \renewcommand*{\BRepistleof}{}%
1855 \renewcommand*{\BRbkchsep}{\ }
1856 \renewcommand*{\BRchvsep}{.}%
1857 \renewcommand*{\BRchsep}{; }%
1858 \renewcommand*{\BRvrsep}{--}%
1859 \renewcommand*{\BRvsep}{,}%
1860 \renewcommand*{\BRperiod}{.}%
1861 }
1862 % \end{macrocode}
1863 %\end{macro}
1864 %\begin{macro}{\brs@chicago}
1865 %Chicago Style
1866 % \begin{macrocode}
1867 \newcommand*{\brs@chicago}{%
1868 \braltabbrvname
1869 \renewcommand*{\BRbooknumberstyle}[1]{##1 }%
1870 \renewcommand*{\BRepistlenumberstyle}[1]{##1 }%
1871 \renewcommand*{\BRbooktitlestyle}[1]{##1}%
1872 \renewcommand*{\BRchapterstyle}[1]{\romannumeral##1}%
1873 \renewcommand*{\BRversestyle}[1]{##1}%
1874 \renewcommand*{\BRversesuffixstyle}[1]{##1}%
1875 \renewcommand*{\BRbookof}{}%
1876 \renewcommand*{\BRgospel}{}%
1877 \renewcommand*{\BRepistletothe}{}%
1878 \renewcommand*{\BRepistleto}{}%
1879 \renewcommand*{\BRepistleof}{}%
1880 \renewcommand*{\BRbkchsep}{\ }
1881 \renewcommand*{\BRchvsep}{\,:\,}%
1882 \renewcommand*{\BRchsep}{; }%
1883 \renewcommand*{\BRvrsep}{--}%
1884 \renewcommand*{\BRvsep}{,}%
1885 \renewcommand*{\BRperiod}{.}%
1886 }
1887 % \end{macrocode}
1888 %\end{macro}
1889 %\begin{macro}{\brs@text}
1890 % Full text citation
1891 % \begin{macrocode}
1892 \newcommand*{\brs@text}{%
1893 \biblerefstyle{default}%
1894 \renewcommand{\BRbooknumberstyle}[1]{%
1895 \protect\Ordinalstringnum{##1}\ }%
1896 \renewcommand{\BRepistlenumberstyle}[1]{%
1897 \protect\Ordinalstringnum{##1}\ }%
1898 \renewcommand{\BRbookof}{Book of }%
1899 \renewcommand{\BRgospel}{Gospel according to St }%
1900 \renewcommand{\BRepistletothe}{Epistle to the }%
1901 \renewcommand{\BRepistleto}{Epistle to }%
1902 \renewcommand{\BRepistleof}{Epistle of }%
1903 \renewcommand{\BRchapterstyle}[1]{%
1904 chapter \protect\numberstringnum{##1}}%
1905 \renewcommand{\BRbkchsep}{, }%
1906 \renewcommand{\BRchvsep}{ verse }%
1907 \renewcommand{\BRchsep}{, }%
1908 \renewcommand{\BRvrsep}{ to }%
1909 \renewcommand{\BRvsep}{, }%
1910 \renewcommand{\BRversestyle}[1]{\protect\numberstringnum{##1}}%
1911 \renewcommand*{\BRversesuffixstyle}[1]{##1}%
1912 }
1913 % \end{macrocode}
1914 %\end{macro}
1915 % \begin{macro}{\if@br@idx@split@multiple@ref}
1916 % A boolean to store the \pkgopt{splitmultiplerefinindex} option.
1917 % \begin{macrocode}
1918 \newif\if@br@idx@split@multiple@ref%
1919 % \end{macrocode}
1920 % \end{macro}
1921 % Declare package options
1922 % \begin{macrocode}
1923 \DeclareOption{default}{\brs@default}
1924 \DeclareOption{jerusalem}{\brs@jerusalem}
1925 \DeclareOption{anglosaxon}{\brs@anglosaxon}
1926 \DeclareOption{JEH}{\brs@JEH}
1927 \DeclareOption{MHRA}{\brs@MHRA}
1928 \DeclareOption{NTG}{\brs@NTG}
1929 \DeclareOption{MLA}{\brs@MLA}
1930 \DeclareOption{chicago}{\brs@chicago}
1931 \DeclareOption{text}{\brs@text}
1932 \DeclareOption{splitmultiplerefinindex}{\@br@idx@split@multiple@reftrue}%
1933 % \end{macrocode}
1934 % Process package options
1935 % \begin{macrocode}
1936 \ProcessOptions
1937 % \end{macrocode}
1938 %
1939 %\begin{macro}{\newbiblerefstyle}
1940 %\begin{definition}
1941 %\cs{newbiblerefstyle}\marg{style name}\marg{style cmds}
1942 %\end{definition}
1943 % Creates a new bible style called \meta{style name}, where
1944 % the style is given by \meta{style cmds}.
1945 % (It basically defines a command called
1946 % \cs{brs@}\meta{style name} to do \meta{style cmds})
1947 % \begin{macrocode}
1948 \newcommand{\newbiblerefstyle}[2]{%
1949 \@ifundefined{brs@#1}{%
1950 \expandafter\def\csname brs@#1\endcsname{#2}}{%
1951 \PackageError{bibleref}{bible ref style '#1' already
1952 defined}{}}}
1953 % \end{macrocode}
1954 %\end{macro}
1955 %
1956 %\begin{macro}{\setbooktitle}
1957 %\changes{v1.18}{2018/07/21}{Fix bug in indexing with title containing unicode character using a non-native unicode engine.}
1958 %\begin{definition}
1959 %\cs{setbooktitle}\marg{fullname}\marg{title}
1960 %\end{definition}
1961 % Redefines the title of book \meta{fullname}.
1962 % \begin{macrocode}
1963 \newcommand*{\setbooktitle}[2]{%
1964 \@ifundefined{br@#1}%
1965 {%
1966 \PackageError{bibleref}{Unknown book `#1'}{}%
1967 }%
1968 {%
1969 \expandafter\def\csname br@#1\endcsname{#2}%
1970 }%
1971 }
1972 % \end{macrocode}
1973 %\end{macro}
1974 %
1975 %\begin{macro}{\setindexbooktitle}
1976 % Set alternative book title in the index
1977 %\changes{1.10}{2010/04/27}{new}
1978 % \begin{macrocode}
1979 \newcommand*{\setindexbooktitle}[2]{%
1980 \@ifundefined{br@#1}%
1981 {%
1982 \PackageError{bibleref}{Unknown book `#1'}{}%
1983 }%
1984 {%
1985 \expandafter\def\csname bri@#1\endcsname{#2}%
1986 }%
1987 }
1988 % \end{macrocode}
1989 %\end{macro}
1990 %
1991 %\begin{macro}{\addbiblebook}
1992 %\changes{1.09}{2010/04/26}{new}
1993 % Add a book.
1994 % \begin{macrocode}
1995 \newcommand*{\addbiblebook}[2]{%
1996 \@ifundefined{br@#1}%
1997 {%
1998 \expandafter\def\csname br@#1\endcsname{#2}%
1999 }%
2000 {%
2001 \PackageError{bibleref}{Book `#1' already defined}{}%
2002 }%
2003 }
2004 % \end{macrocode}
2005 %\end{macro}
2006 %
2007 %\begin{macro}{\biblerefstyle}
2008 %\begin{definition}
2009 %\cs{biblerefstyle}\marg{style}
2010 %\end{definition}
2011 % Sets the current style.
2012 % \begin{macrocode}
2013 \newcommand*{\biblerefstyle}[1]{%
2014 \@ifundefined{brs@#1}%
2015 {%
2016 \PackageError{bibleref}{Unknown biblerefstyle '#1'}{}%
2017 }%
2018 {\csname brs@#1\endcsname}%
2019 }
2020 % \end{macrocode}
2021 %\end{macro}
2022 %
2023 %\begin{macro}{\@br@chsty}
2024 %\changes{1.14}{2011/01/19}{new}
2025 % Chapters may be supplied as a range. Provide a command
2026 % to detect whether single number or range supplied.
2027 % \begin{macrocode}
2028 \newcommand*{\@br@chsty}[1]{\@@br@chsty#1-\@nil\end}
2029 % \end{macrocode}
2030 %\end{macro}
2031 %\begin{macro}{\@@br@chsty}
2032 % Pick up a range
2033 % \begin{macrocode}
2034 \def\@@br@chsty#1-#2\end{%
2035 \@do@chapters#1,\relax\end
2036 \ifx\@nil#2\relax
2037 \else
2038 \@bv@addtochidxsort{-}%
2039 \@bv@do{\protect\BRvrsep}%
2040 \@@br@chsty#2\end%
2041 \fi
2042 }
2043 % \end{macrocode}
2044 %\end{macro}
2045 %
2046 %\begin{macro}{\@dochapters}
2047 % Pick up a list
2048 % \begin{macrocode}
2049 \def\@do@chapters#1,#2\end{%
2050 \def\@br@tmp{#1}%
2051 \ifx\@br@tmp\@empty
2052 \else
2053 \@biblech{#1}%
2054 \fi
2055 \ifx\relax#2\relax
2056 \else
2057 \@bv@addtochidxsort{,}%
2058 \@bv@do{\protect\BRvsep}%
2059 \@do@chapters#2\end
2060 \fi
2061 }
2062 % \end{macrocode}
2063 %\end{macro}
2064 %
2065 %
2066 %\begin{macro}{\@biblech}
2067 %\changes{1.14}{2011/01/19}{new}
2068 % Deal with individual chapter.
2069 % \begin{macrocode}
2070 \newcommand*{\@biblech}[1]{%
2071 \def\@bv@tmp{#1}%
2072 \ifx\@bv@tmp\@empty
2073 \else
2074 \@nodo@chapter{#1}%
2075 \@bv@do{\protect\BRchapterstyle{#1}}%
2076 \fi
2077 }
2078 % \end{macrocode}
2079 %\end{macro}
2080 %
2081 %\begin{macro}{\@nodo@chapter}
2082 %\changes{1.14}{2011/01/19}{new}
2083 % \begin{macrocode}
2084 \newcommand*{\@nodo@chapter}[1]{%
2085 \ifnum\@bv@tmp<10\relax
2086 \@bv@addtochidxsort{00#1:}%
2087 \else
2088 \ifnum\@bv@tmp<100\relax
2089 \@bv@addtochidxsort{0#1:}%
2090 \else
2091 \@bv@addtochidxsort{#1:}%
2092 \fi
2093 \fi
2094 }
2095 % \end{macrocode}
2096 %\end{macro}
2097 %
2098 %\begin{macro}{\@br@vrsty}
2099 % Verses may be supplied as a range. Provide a command
2100 % to detect whether single number or range supplied.
2101 % Verses may have a number appended (e.g.\ 15a). This needs
2102 % to be checked.
2103 %\changes{1.12}{2010/05/11}{Check for letters after verse number}
2104 % \begin{macrocode}
2105 \newcommand*{\@br@vrsty}[1]{\@@br@vrsty#1-\@nil\end}
2106 % \end{macrocode}
2107 %\end{macro}
2108 %\begin{macro}{\@@br@vrsty}
2109 % Pick up a range
2110 % \begin{macrocode}
2111 \def\@@br@vrsty#1-#2\end{%
2112 \@do@verses#1,\relax\end
2113 \ifx\@nil#2\relax
2114 \IfSubStr{\@bv@chidxsort}{-}{}{%
2115 \IfSubStr{\@bv@chidxsort}{:}{}%If single verse for a book without chapter, add -000 to the range
2116 {%
2117 \@bv@addtochidxsort{-000}%
2118 }%
2119 }%
2120 \else
2121 \@bv@addtochidxsort{-}%
2122 \@bv@do{\protect\BRvrsep}%
2123 \@@br@vrsty#2\end%
2124 \fi
2125 }
2126 % \end{macrocode}
2127 %\end{macro}
2128 %
2129 %\begin{macro}{\@br@stripverse}
2130 % Strip trailing letters from verse. Number is stored in
2131 % \cs{@br@versenum} and the suffix is stored in
2132 % \cs{@br@versesuffix}.
2133 % \begin{macrocode}
2134 \def\br@stripverse#1{%
2135 \def\@br@versenum{}%
2136 \def\@br@versesuffix{}%
2137 \@br@stripverse#1\relax
2138 }
2139 \def\@br@stripverse#1#2{%
2140 \@br@checkisdigit{#1}%
2141 \if@br@isdigit
2142 \expandafter\toks@\expandafter{\@br@versenum}%
2143 \edef\@br@versenum{\the\toks@#1}%
2144 \let\@br@next\@br@stripverse
2145 \else
2146 \def\@br@versesuffix{#1}%
2147 \let\@br@next\@@br@stripverse
2148 \fi
2149 \ifx#2\relax
2150 \let\@br@next\relax
2151 \fi
2152 \@br@next#2%
2153 }
2154 \def\@@br@stripverse#1\relax{%
2155 \protected@edef\@br@versesuffix{\@br@versesuffix#1}%
2156 }
2157 % \end{macrocode}
2158 %\end{macro}
2159 %
2160 %\begin{macro}{\@br@checkisdigit}
2161 % Check if argument is a digit.
2162 % \begin{macrocode}
2163 \newif\if@br@isdigit
2164 \newcommand*{\@br@checkisdigit}[1]{%
2165 \@br@isdigittrue
2166 \if#10\relax
2167 \else
2168 \if#11\relax
2169 \else
2170 \if#12\relax
2171 \else
2172 \if#13\relax
2173 \else
2174 \if#14\relax
2175 \else
2176 \if#15\relax
2177 \else
2178 \if#16\relax
2179 \else
2180 \if#17\relax
2181 \else
2182 \if#18\relax
2183 \else
2184 \if#19\relax
2185 \else
2186 \@br@isdigitfalse
2187 \fi
2188 \fi
2189 \fi
2190 \fi
2191 \fi
2192 \fi
2193 \fi
2194 \fi
2195 \fi
2196 \fi
2197 }
2198 % \end{macrocode}
2199 %\end{macro}
2200 %
2201 %\begin{macro}{\@do@verse}
2202 % Process individual verse
2203 % \begin{macrocode}
2204 \newcommand*{\@do@verse}[1]{%
2205 \@nodo@verse{#1}%
2206 \expandafter\@bv@do\expandafter{\@br@tmp}%
2207 }
2208 % \end{macrocode}
2209 % \begin{macrocode}
2210 \newcommand*{\@nodo@verse}[1]{%
2211 % \end{macrocode}
2212 % Strip suffix, if it exists.
2213 % \begin{macrocode}
2214 \br@stripverse{#1}%
2215 % \end{macrocode}
2216 % Prepend leading zeroes if required.
2217 % \begin{macrocode}
2218 \ifnum\@br@versenum<10\relax
2219 \@bv@addtochidxsort{00#1}%
2220 \else
2221 \ifnum\@br@versenum<100\relax
2222 \@bv@addtochidxsort{0#1}%
2223 \else
2224 \@bv@addtochidxsort{#1}%
2225 \fi
2226 \fi
2227 \ifx\@br@versesuffix\@empty
2228 \protected@edef\@br@tmp{%
2229 \protect\BRversestyle{\@br@versenum}%
2230 }%
2231 \else
2232 \protected@edef\@br@tmp{%
2233 \protect\BRversestyle{\@br@versenum}%
2234 \protect\BRversesuffixstyle{\@br@versesuffix}%
2235 }%
2236 \fi
2237 }
2238 % \end{macrocode}
2239 %\end{macro}
2240 %
2241 %\begin{macro}{\@do@verses}
2242 % Pick up a list
2243 % \begin{macrocode}
2244 \def\@do@verses#1,#2\end{%
2245 \def\@br@tmp{#1}%
2246 \ifx\@br@tmp\@empty
2247 \else
2248 \expandafter\@do@verse\expandafter{\@br@tmp}%
2249 \fi
2250 \ifx\relax#2\relax
2251 \else
2252 \@bv@addtochidxsort{,}%
2253 \@bv@do{\protect\BRvsep}%
2254 \@do@verses#2\end
2255 \fi
2256 }
2257 % \end{macrocode}
2258 %\end{macro}
2259 %
2260 %\begin{macro}{\@bv@category}
2261 %\changes{1.14}{2011/01/19}{new}
2262 % Stores the current bible ref category.
2263 % \begin{macrocode}
2264 \newcommand*{\@bv@category}{}
2265 % \end{macrocode}
2266 %\end{macro}
2267 %\begin{macro}{\@bv@categorysort}
2268 %\changes{1.14}{2011/01/19}{new}
2269 % Stores the current bible ref category sort key.
2270 % \begin{macrocode}
2271 \newcommand*{\@bv@categorysort}{}
2272 % \end{macrocode}
2273 %\end{macro}
2274 %\begin{macro}{\biblerefcategory}
2275 % Sets the bible ref category and sort key.
2276 % \begin{macrocode}
2277 \newcommand*{\biblerefcategory}[2][\@bv@category]{%
2278 \renewcommand*{\@bv@category}{#2}%
2279 \renewcommand*{\@bv@categorysort}{#1}%
2280 }
2281 % \end{macrocode}
2282 %\end{macro}
2283 %
2284 %\begin{macro}{\bibleverse}
2285 %\changes{v1.19}{2018/07/29}{\cs{bibleverse} is now robust}
2286 %\begin{definition}
2287 %\cs{bibleverse}\marg{name}
2288 %\end{definition}
2289 % Displays references using current style.
2290 % \begin{macrocode}
2291 \DeclareRobustCommand*{\bibleverse}{%
2292 \let\@bv@restore\relax
2293 \@bible@verse
2294 }
2295 % \end{macrocode}
2296 %\end{macro}
2297 %
2298 %\begin{macro}{\@bible@verse}
2299 % \begin{macrocode}
2300 \newcommand*{\@bible@verse}[1]{%
2301 % \end{macrocode}
2302 % Makes \verb+:+ normal character (babel-french).
2303 %\changes{1.19}{2018/07/29}{Add \cs{shorthandoff}\verb+:+ (for babel)}
2304 %\changes{1.20}{2018/07/31}{Check before using \cs{shorthandoff}\verb+:+ (for babel)}
2305 % \begin{macrocode}
2306 \bbl@ifunset{bbl@active@\string:}%
2307 {}%
2308 {\shorthandoff:}%
2309 % \end{macrocode}
2310 % This looks for a command called
2311 % \cs{br@}\meta{name} (defined earlier).
2312 % After the book title, it then checks
2313 % to see if there is a bracket \verb|(| immediately following it.
2314 % \begin{macrocode}
2315 \@ifundefined{br@#1}%
2316 {%
2317 \PackageError{bibleref}{Unknown book '#1'}{}%
2318 }%
2319 {%
2320 \@bv@idxsort{\csname br@#1\endcsname}%
2321 \def\@bv@chidxsort{}%
2322 \BRbooktitlestyle{\csname br@#1\endcsname}%
2323 \let\@bv@org@bookof\BRbookof
2324 \let\@bv@org@booknumberstyle\BRbooknumberstyle
2325 \let\@bv@org@epistletothe\BRepistletothe
2326 \let\@bv@org@epistlenumberstyle\BRepistlenumberstyle
2327 \def\BRbookof{\string\BRbookof\space}%
2328 \def\BRbooknumberstyle{\string\BRbooknumberstyle\space}%
2329 \def\BRepistletothe{\string\BRepistletothe\space}%
2330 \def\BRepistlenumberstyle{\string\BRepistlenumberstyle\space}%
2331 \@ifundefined{bri@#1}%
2332 {%
2333 \protected@edef\@bv@mainidxentry{%
2334 \protect\BRbooktitlestyle{\csname br@#1\endcsname}}%
2335 }%
2336 {%
2337 \protected@edef\@bv@mainidxentry{%
2338 \protect\BRbooktitlestyle{\csname bri@#1\endcsname}}%
2339 }%
2340 % \end{macrocode}
2341 % Restore definitions.
2342 % \begin{macrocode}
2343 \let\BRbookof\@bv@org@bookof
2344 \let\BRbooknumberstyle\@bv@org@booknumberstyle
2345 \let\BRepistletothe\@bv@org@epistletothe
2346 \let\BRepistlenumberstyle\@bv@org@epistlenumberstyle
2347 }%
2348 % \end{macrocode}
2349 %\changes{1.13}{2010/07/07}{changed \cs{@ifnextchar} to
2350 %\cs{new@ifnextchar}}
2351 % \begin{macrocode}
2352 \new@ifnextchar(%
2353 {\BRbkchsep\@bibleverse}%
2354 {\@end@@bibleverse}%
2355 }
2356 % \end{macrocode}
2357 %\end{macro}
2358 %
2359 %\begin{macro}{\@bibleverse}
2360 % This gets the chapter number.
2361 % \begin{macrocode}
2362 \def\@bibleverse(#1:{%
2363 \def\@bv@tmp{#1}%
2364 \ifx\@bv@tmp\@empty
2365 \def\@bv@bvmacro{\@@bibleversenosep}%
2366 \else
2367 \bv@dbl@ch#1/\@nil%
2368 \expandafter\@br@chsty\expandafter{\bv@dbl@ch@one}%
2369 \ifx\bv@dbl@ch@two\@empty\else%
2370 \@bv@dbl@ch@twotrue%
2371 \BRotherchapterstyle{\@br@chsty{\bv@dbl@ch@two}}%
2372 \@bv@dbl@ch@twofalse%
2373 \fi%
2374 \def\@bv@bvmacro{\@@bibleverse}%
2375 \fi
2376 \@bv@bvmacro
2377 }
2378 % \end{macrocode}
2379 %\end{macro}
2380 % \begin{macro}{\bv@dbl@ch}
2381 % This gets the two chapter numbers if there is alternative number (for example \verb+\bibleverse{Ps}(22/23:)+).
2382 % \begin{macrocode}
2383 \def\bv@dbl@ch#1/#2\@nil{%
2384 \gdef\bv@dbl@ch@one{#1}%
2385 \gdef\bv@dbl@ch@two{#2}%
2386 \def\bv@dbl@ch@get@two##1/\@nil{%
2387 \gdef\bv@dbl@ch@two{##1}%
2388 }%
2389 \ifx\bv@dbl@ch@two\@empty\else%
2390 \expandafter\bv@dbl@ch@get@two\bv@dbl@ch@two\@nil%
2391 \fi%
2392 }%
2393 % \end{macrocode}
2394 % \end{macro}
2395 %
2396 % \begin{macro}{\if@bv@dbl@ch@two}
2397 % This is set to TRUE before typesetting the alternative number.
2398 % \begin{macrocode}
2399 \newif\if@bv@dbl@ch@two%
2400 % \end{macrocode}
2401 % \end{macro}
2402 %\begin{macro}{\@bibleverser}
2403 % This gets the second part of a range spanning chapters.
2404 % \begin{macrocode}
2405 \def\@bibleverser-(#1:{%
2406 \bv@dbl@ch#1/\@nil%
2407 \ifx\bv@dbl@ch@one\@empty
2408 \else
2409 \ifnum\bv@dbl@ch@one<10\relax
2410 \@bv@addtochidxsort{-00\bv@dbl@ch@one:}%
2411 \else
2412 \ifnum\bv@dbl@ch@one<100\relax
2413 \@bv@addtochidxsort{-0\bv@dbl@ch@one:}%
2414 \else
2415 \@bv@addtochidxsort{-\bv@dbl@ch@one:}%
2416 \fi
2417 \fi
2418 \@bv@do{\protect\BRchapterstyle{\bv@dbl@ch@one}}%
2419 \ifx\bv@dbl@ch@two\@empty\else%
2420 \@bv@dbl@ch@twotrue%
2421 \BRotherchapterstyle{\@br@chsty{\bv@dbl@ch@two}}%
2422 \@bv@dbl@ch@twofalse%
2423 \fi%
2424 \fi
2425 \@@bibleverse
2426 }
2427 % \end{macrocode}
2428 %\end{macro}
2429 %
2430 %\begin{macro}{\@@bibleverse}
2431 % This gets the verse number (or number range), and check to see
2432 % if it is followed by another bracket (indicating another
2433 % chapter, verse pair).
2434 % \begin{macrocode}
2435 \def\@@bibleverse#1){%
2436 \def\@bv@tmp{#1}%
2437 \ifx\@bv@tmp\@empty
2438 \else
2439 \@bv@do{\protect\BRchvsep}\@br@vrsty{#1}%
2440 \fi
2441 % \end{macrocode}
2442 %\changes{1.13}{2010/07/07}{changed \cs{@ifnextchar} to
2443 %\cs{new@ifnextchar}}
2444 % \begin{macrocode}
2445 \new@ifnextchar(%
2446 {%
2447 \if@br@idx@split@multiple@ref%
2448 \br@do@index%
2449 \def\@bv@idxentry{}%
2450 \def\@bv@chidxsort{}%
2451 \BRchsep%
2452 \else%
2453 \@bv@do{\protect\BRchsep}%
2454 \fi%
2455 \@bibleverse%
2456 }%
2457 {\new@ifnextchar-%
2458 {\@bv@do{\protect\BRvrsep}\@bibleverser}%
2459 {\@end@@bibleverse}%
2460 }%
2461 }
2462 % \changes{1.15}{2016/09/10}{Fix bug with book without chapter}
2463 \def\@@bibleversenosep#1){%
2464 \def\@bv@tmp{#1}%
2465 \ifx\@bv@tmp\@empty
2466 \else
2467 \@br@vrsty{#1}%
2468 \fi
2469 \new@ifnextchar(%
2470 {%
2471 \if@br@idx@split@multiple@ref%
2472 \br@do@index%
2473 \def\@bv@idxentry{}%
2474 \def\@bv@chidxsort{}%
2475 \BRchsep%
2476 \else%
2477 \@bv@do{\protect\BRchsep}%
2478 \fi%
2479 \@bibleverse%
2480 }%
2481 {\new@ifnextchar-%
2482 {\@bv@do{\protect\BRvrsep}\@bibleverser}%
2483 {\@end@@bibleverse}%
2484 }%
2485 }
2486 % \end{macrocode}
2487 %\end{macro}
2488 % \begin{macro}{\br@do@index}
2489 % This macro add current entry to biblical index
2490 % \begin{macrocode}
2491 \newcommand{\br@do@index}{%
2492 \if@bv@idx%
2493 \expandafter\@do@bibleref@map\@@bv@idxsort\relax%
2494 \ifx\@bv@idxentry\@empty%
2495 \def\@bv@tmp{\@bv@mainidxentry}%
2496 \else%
2497 \def\@bv@tmp{\@bv@mainidxentry!\@bv@chidxsort @\@bv@idxentry}%
2498 \fi%
2499 \edef\@bv@tmpc{\@bv@idxpgformat}%\@bv@tmpa and \@bv@tmpb are tokens
2500 \ifx\@empty\@bv@tmpc%
2501 \@do@biblerefindex%
2502 {\@@bv@idxsort\relax @\@bv@tmp}%
2503 \else%
2504 \@do@biblerefindex%
2505 {\@@bv@idxsort\relax @\@bv@tmp|\@bv@idxpgformat}%
2506 \fi%
2507 \fi%
2508 }%
2509 % \end{macrocode}
2510 % \end{macro}
2511 %\begin{macro}{\@end@@bibleverse}
2512 % This controls what to do at the end of the final
2513 % verse.
2514 %\changes{1.09}{2009/04/26}{replaced \cs{index} with \cs{biblerefindex}}
2515 %\changes{1.10}{2010/04/27}{separated child entry from parent entry to improve sorting}
2516 %\changes{1.16}{2016/09/27}{Don't add the \cs{bvidxpgformat} in the .idx file if defined as empty}
2517 % \begin{macrocode}
2518 \newcommand*{\@end@@bibleverse}{%
2519 \br@do@index%
2520 \@bv@idxfalse%
2521 % \end{macrocode}
2522 %\changes{1.14}{2011/01/19}{added \cs{@bv@restore}}
2523 %\changes{1.19}{2018/07/29}{Add \cs{shorthandon}\verb+:+ (for babel)}
2524 %\changes{1.20}{2018/07/31}{Check before using \cs{shorthandon}\verb+:+ (for babel)}
2525 % \begin{macrocode}
2526 \@bv@restore
2527 \bbl@ifunset{bbl@active@\string:}%
2528 {}%
2529 {\shorthandon:}%
2530 }
2531 % \end{macrocode}
2532 %\end{macro}
2533 %
2534 %\begin{macro}{\@do@biblerefindex}
2535 % If category has been set prepend information to
2536 % \cs{@bv@mainidxentry}.
2537 %\changes{1.14}{2011/01/19}{new}
2538 % \begin{macrocode}
2539 \newcommand*{\@do@biblerefindex}[1]{%
2540 \ifx\@bv@category\@empty
2541 \biblerefindex{#1}%
2542 \else
2543 \biblerefindex
2544 {\@bv@categorysort @\@bv@category!#1}%
2545 \fi
2546 }
2547 % \end{macrocode}
2548 %\end{macro}
2549 %
2550 %\begin{macro}{\biblerefindex}
2551 % Allow user to modify index command in case multiple indices
2552 % are required.
2553 %\changes{1.09}{2009/04/26}{new}
2554 % \begin{macrocode}
2555 \newcommand*{\biblerefindex}{\index}
2556 % \end{macrocode}
2557 %\end{macro}
2558 %
2559 %\begin{macro}{\biblerefmap}
2560 % \begin{macro}{\biblerefmap@}
2561 % Map the sort key to something else. Overwrites previous mapping
2562 % for the given key.
2563 % In case we use unicode character with non unicode engines (using fontspec), we need a little hack to:
2564 % \begin{itemize}
2565 % \item Transform the input 16 bits (or more) content to series of \cs{char};
2566 % \item Use the detokinzed version of this representation of characters to define the \cs{@bibleref@map@XXX} commands.
2567 % \end{itemize}
2568 % In this case, we do it using \cs{biblerefmap@}, passing a transformed forme of the first argument of \cs{biblerefmap}.
2569 %
2570 %\changes{1.09}{2009/04/26}{new}
2571 % \begin{macrocode}
2572 \newcommand{\biblerefmap@}[2]{%
2573 \expandafter\def\csname @bibleref@map@\detokenize{#1}\endcsname{#2}%
2574 }%
2575 \newcommand*{\biblerefmap}[2]{%
2576 \ifxetex%
2577 \expandafter\def\csname @bibleref@map@#1\endcsname{#2}%
2578 \else%
2579 \edef\@tmp{#1}%
2580 \expandafter\biblerefmap@\expandafter{\@tmp}{#2}%
2581 \fi%
2582 }
2583 % \end{macrocode}
2584 % \end{macro}
2585 %\end{macro}
2586 %
2587 %\begin{macro}{\@do@bibleref@map}
2588 % \begin{macrocode}
2589 \def\@do@bibleref@map#1\relax{%
2590 \ifxetex%
2591 \@ifundefined{@bibleref@map@#1}{}{%
2592 \expandafter\let\expandafter\@@bv@idxsort%
2593 \csname @bibleref@map@#1\endcsname%
2594 }%
2595 \else%
2596 \@ifundefined{@bibleref@map@\detokenize{#1}}{}{%
2597 \expandafter\let\expandafter\@@bv@idxsort%
2598 \csname @bibleref@map@\detokenize{#1}\endcsname%
2599 }%
2600 \fi%
2601 }
2602 % \end{macrocode}
2603 %\end{macro}
2604 %
2605 %\begin{macro}{\@bv@do}
2606 % Do argument and add to idx
2607 % \begin{macrocode}
2608 \newcommand{\@bv@do}[1]{#1\@bv@addtoidx{#1}}
2609 % \end{macrocode}
2610 %\end{macro}
2611 %
2612 %\begin{macro}{\@bv@addtoidx}
2613 % Append text to \verb|\@bv@idxentry|
2614 % \begin{macrocode}
2615 \newtoks\@bv@tmpa
2616 \newtoks\@bv@tmpb
2617 \newcommand*{\@bv@addtoidx}[1]{%
2618 \if@bv@idx
2619 \if@bv@dbl@ch@two%
2620 \@bv@tmpa={\protect\BRotherchapterstyle{#1}}%
2621 \else%
2622 \@bv@tmpa={#1}%
2623 \fi%
2624 \@bv@tmpb=\expandafter{\@bv@idxentry}%
2625 \protected@edef\@bv@idxentry{\the\@bv@tmpb\the\@bv@tmpa}%
2626 \fi}
2627 % \end{macrocode}
2628 %\end{macro}
2629 %
2630 %\begin{macro}{\@bv@addtochidxsort}
2631 % Append text to \verb|\@bv@chidxsort|
2632 % \begin{macrocode}
2633 \newcommand{\@bv@addtochidxsort}[1]{%
2634 \if@bv@idx
2635 \@bv@tmpa={#1}%
2636 \@bv@tmpb=\expandafter{\@bv@chidxsort}%
2637 \if@bv@dbl@ch@two%
2638 \edef\@bv@chidxsort{\the\@bv@tmpb}%
2639 \else%
2640 \edef\@bv@chidxsort{\the\@bv@tmpb\the\@bv@tmpa}%
2641 \fi%
2642 \fi
2643 }
2644 % \end{macrocode}
2645 %\end{macro}
2646 %\begin{macro}{\if@bv@idx}
2647 % Define switch to indicate whether or not to index
2648 % bible reference.
2649 % \begin{macrocode}
2650 \newif\if@bv@idx
2651 \@bv@idxfalse
2652 % \end{macrocode}
2653 %\end{macro}
2654 %\begin{macro}{\@bv@idxsort}
2655 % Sort key for bible verse index. (Strip all the formatting
2656 % bits.)
2657 % \begin{macrocode}
2658 \newcommand{\@bv@idxsort}[1]{%
2659 \if@bv@idx
2660 {\def\BRbooknumberstyle##1##2\relax{##2##1}%
2661 \def\BRepistlenumberstyle##1##2\relax{##2##1}%
2662 \def\BRgospel{}\def\BRbookof{}\def\BRepistleto{}%
2663 \def\BRepistletothe{}\def\BRepistleof{}%
2664 \xdef\@@bv@idxsort{#1\relax}%
2665 }%
2666 \fi}
2667 % \end{macrocode}
2668 %\end{macro}
2669 %
2670 %\begin{macro}{\ibibleverse}
2671 %\changes{v1.19}{2018/07/29}{\cs{ibibleverse} is now robust}
2672 % This is like \cs{bibleverse},
2673 % but also adds an index entry. The optional argument indicates
2674 % how to format the page number (without the preceding backslash)
2675 % e.g. \verb|\ibibleref[textit]{Romans}|.
2676 % \begin{macrocode}
2677 \DeclareRobustCommand*{\ibibleverse}[1][\bvidxpgformat]{%
2678 \def\@bv@idxpgformat{#1}%
2679 \@bv@idxtrue\def\@bv@idxentry{}\bibleverse}
2680 % \end{macrocode}
2681 %\end{macro}
2682 %
2683 %\begin{macro}{\ibiblechvs}
2684 %\changes{1.14}{2011/01/19}{new}
2685 % Only displays chapter and verses but indexes under the book.
2686 % \begin{macrocode}
2687 \newcommand*{\ibiblechvs}[1][\bvidxpgformat]{%
2688 \let\@bv@current@bkchsep\BRbkchsep
2689 \let\@bv@current@titlestyle\BRbooktitlestyle
2690 \def\@bv@restore{%
2691 \let\BRbkchsep\@bv@current@bkchsep
2692 \let\BRbooktitlestyle\@bv@current@titlestyle
2693 }%
2694 \def\BRbkchsep{}%
2695 \def\BRbooktitlestyle##1{}%
2696 \def\@bv@idxpgformat{#1}%
2697 \@bv@idxtrue\def\@bv@idxentry{}\@bible@verse
2698 }
2699 % \end{macrocode}
2700 %\end{macro}
2701 %
2702 %\begin{macro}{\ibiblevs}
2703 %\changes{1.14}{2011/01/19}{new}
2704 % Only displays verse(s) but indexes under the book and chapters.
2705 % \begin{macrocode}
2706 \newcommand*{\ibiblevs}[1][\bvidxpgformat]{%
2707 \let\@bv@current@titlestyle\BRbooktitlestyle
2708 \let\@bv@current@chapterstyle\BRchapterstyle
2709 \let\@bv@current@bkchsep\BRbkchsep
2710 \let\@bv@current@chvsep\BRchvsep
2711 \def\@bv@restore{%
2712 \let\BRbooktitlestyle\@bv@current@titlestyle
2713 \let\BRchapterstyle\@bv@current@chapterstyle
2714 \let\BRbkchsep\@bv@current@bkchsep
2715 \let\BRchvsep\@bv@current@chvsep
2716 }%
2717 \def\BRbooktitlestyle##1{}%
2718 \def\BRchapterstyle##1{}%
2719 \def\BRbkchsep{}%
2720 \def\BRchvsep{}%
2721 \def\@bv@idxpgformat{#1}%
2722 \@bv@idxtrue\def\@bv@idxentry{}\@bible@verse
2723 }
2724 % \end{macrocode}
2725 %\end{macro}
2726 %
2727 % \begin{macro}{\ibible}
2728 %\changes{1.25}{2020/06/22}{new}
2729 % Only displays verse(s) but indexes under the book and chapters.
2730 % \begin{macrocode}
2731 \newcommand*{\ibible}[1][\bvidxpgformat]{%
2732 \let\@bv@current@titlestyle\BRbooktitlestyle
2733 \let\@bv@current@chapterstyle\BRchapterstyle
2734 \let\@bv@current@versestyle\BRversestyle% added on analogy with previous line
2735 \let\@bv@current@bkchsep\BRbkchsep
2736 \let\@bv@current@chvsep\BRchvsep
2737 \let\@bv@current@vrsep\BRvrsep% add me, too!
2738 \def\@bv@restore{%
2739 \let\BRbooktitlestyle\@bv@current@titlestyle
2740 \let\BRchapterstyle\@bv@current@chapterstyle
2741 \let\BRversestyle\@bv@current@versestyle% added on analogy with previous line
2742 \let\BRbkchsep\@bv@current@bkchsep
2743 \let\BRchvsep\@bv@current@chvsep
2744 \let\BRvrsep\@bv@current@vrsep% add me, too!
2745 }%
2746 \def\BRbooktitlestyle##1{}%
2747 \def\BRchapterstyle##1{}%
2748 \def\BRversestyle##1{}% added on analogy with previous line
2749 \def\BRbkchsep{}%
2750 \def\BRchvsep{}%
2751 \def\BRvrsep{}% add me, too!
2752 \def\@bv@idxpgformat{#1}%
2753 \@bv@idxtrue\def\@bv@idxentry{}\@bible@verse
2754 }
2755 % \end{macrocode}
2756 % \end{macro}
2757 %\begin{macro}{\bvidxpgformat}
2758 % Default page number format for bible verse index entries
2759 % \begin{macrocode}
2760 \newcommand*{\bvidxpgformat}{textrm}
2761 % \end{macrocode}
2762 %\end{macro}
2763 % Define \cs{bbl@ifunset} if babel is not loaded.
2764 % \begin{macrocode}
2765 \AtBeginDocument{%
2766 \ifdefined\bbl@ifunset\else%
2767 \def\bbl@ifunset#1#2#3{}%
2768 \fi%
2769 }%
2770 % \end{macrocode}
2771 %\iffalse
2772 % \begin{macrocode}
2773 %</bibleref.sty>
2774 % \end{macrocode}
2775 %\fi
2776 %\iffalse
2777 % \begin{macrocode}
2778 %<*sample-categories.tex>
2779 % \end{macrocode}
2780 %\fi
2781 %\iffalse
2782 % \begin{macrocode}
2783 \documentclass{article}
2784
2785 \usepackage{makeidx}
2786 \usepackage{bibleref}
2787 \makeindex
2788
2789 \begin{document}
2790 \biblerefcategory{NIV}
2791
2792 \begin{tabular}{ll}
2793 \verb|\ibibleverse{Ex}| & \ibibleverse{Ex}\\
2794 \verb|\ibibleverse{Exodus}(20:)| & \ibibleverse{Exodus}(20:)\\
2795 \verb|\ibibleverse{Exod}(20:17)| & \ibibleverse{Exod}(20:17)\\
2796 \verb|\ibibleverse{IICo}(12:21)| & \ibibleverse{IICo}(12:21)\\
2797 \verb|\ibibleverse{IICor}(12:21-32)| & \ibibleverse{IICor}(12:21-32)\\
2798 \verb|\ibibleverse{Ex}(20:17)(21:3)| & \ibibleverse{Ex}(20:17)(21:3)\\
2799 \verb|\ibibleverse{Ex}(15:)(17:)(20:)| & \ibibleverse{Ex}(15:)(17:)(20:)\\
2800 \verb|\ibibleverse{Rev}(1:2,5,7-9,11)| & \ibibleverse{Rev}(1:2,5,7-9,11)\\
2801 \verb|\ibibleverse{IChronicles}(1:3)-(2:7)| &
2802 \ibibleverse{IChronicles}(1:3)-(2:7)\\
2803 \verb|\ibibleverse{IChronicles}(1:)-(4:)| &
2804 \ibibleverse{IChronicles}(1:)-(4:)\\
2805 \verb|\ibibleverse{IChronicles}(1-4:)| &
2806 \ibibleverse{IChronicles}(1-4:)
2807 \end{tabular}
2808
2809 \biblerefcategory{Jerusalem}
2810
2811 \begin{tabular}{ll}
2812 \verb|\ibibleverse{Ex}| & \ibibleverse{Ex}\\
2813 \verb|\ibibleverse{Exodus}(20:)| & \ibibleverse{Exodus}(20:)\\
2814 \verb|\ibibleverse{Exod}(20:17)| & \ibibleverse{Exod}(20:17)\\
2815 \verb|\ibibleverse{IICo}(12:21)| & \ibibleverse{IICo}(12:21)\\
2816 \verb|\ibibleverse{IICor}(12:21-32)| & \ibibleverse{IICor}(12:21-32)\\
2817 \verb|\ibibleverse{Ex}(20:17)(21:3)| & \ibibleverse{Ex}(20:17)(21:3)\\
2818 \verb|\ibibleverse{Ex}(15:)(17:)(20:)| & \ibibleverse{Ex}(15:)(17:)(20:)\\
2819 \verb|\ibibleverse{Rev}(1:2,5,7-9,11)| & \ibibleverse{Rev}(1:2,5,7-9,11)\\
2820 \verb|\ibibleverse{IChronicles}(1:3)-(2:7)| &
2821 \ibibleverse{IChronicles}(1:3)-(2:7)\\
2822 \verb|\ibibleverse{IChronicles}(1:)-(4:)| &
2823 \ibibleverse{IChronicles}(1:)-(4:)\\
2824 \verb|\ibibleverse{IChronicles}(1-4:)| &
2825 \ibibleverse{IChronicles}(1-4:)
2826 \end{tabular}
2827
2828 \printindex
2829 \end{document}
2830 % \end{macrocode}
2831 %\fi
2832 %\iffalse
2833 % \begin{macrocode}
2834 %</sample-categories.tex>
2835 % \end{macrocode}
2836 %\fi
2837 %\iffalse
2838 % \begin{macrocode}
2839 %<*sample-indextools.tex>
2840 % \end{macrocode}
2841 %\fi
2842 %\iffalse
2843 %\subsection{Sample Document with Multiple Indices}
2844 % \begin{macrocode}
2845 \documentclass{article}
2846
2847 \usepackage{bibleref}
2848 \usepackage{indextools}
2849
2850 \makeindex[name=scr,title=Scripture]
2851 \makeindex[title=General]
2852
2853 \renewcommand{\biblerefindex}{\index[scr]}
2854
2855 \biblerefmap{Genesis}{1@Old Testament!1}
2856 \biblerefmap{Exodus}{1@Old Testament!2}
2857 \biblerefmap{Leviticus}{1@Old Testament!3}
2858 \biblerefmap{Numbers}{1@Old Testament!4}
2859 \biblerefmap{Deuteronomy}{1@Old Testament!5}
2860
2861 \biblerefmap{Tobit}{2@Apocrypha!3}
2862
2863 \biblerefmap{Matthew}{3@New Testament!1}
2864 \biblerefmap{Mark}{3@New Testament!2}
2865 \biblerefmap{Luke}{3@New Testament!3}
2866 \biblerefmap{John}{3@New Testament!4}
2867 \biblerefmap{Acts}{3@New Testament!5}
2868 \biblerefmap{Romans}{3@New Testament!6}
2869 \biblerefmap{Corinthians1}{3@New Testament!7}
2870
2871 \begin{document}
2872 Something for the general index\index{something}.
2873
2874 An old testament reference \ibibleverse{Genesis}(1:1-10).
2875 A new testament reference \ibibleverse{ICor}.
2876
2877 Something else for the general index\index{another}.
2878
2879 Another old testament reference \ibibleverse{Ex}.
2880 Another new testament reference \ibibleverse{Matt}.
2881
2882 \ibibleverse{Tobit}
2883
2884 \printindex[scr]
2885 \printindex
2886 \end{document}
2887 % \end{macrocode}
2888 %\fi
2889 %\iffalse
2890 % \begin{macrocode}
2891 %</sample-indextools.tex>
2892 % \end{macrocode}
2893 %\fi
2894 %\iffalse
2895 % \begin{macrocode}
2896 %<*sample-xidx.tex>
2897 % \end{macrocode}
2898 %\fi
2899 %\iffalse
2900 %\subsection{Sample document using bibleref-xidx}
2901 % \begin{macrocode}
2902 \documentclass{article}
2903
2904 \usepackage{bibleref-xidx}
2905 \usepackage{makeidx}
2906 \makeindex
2907
2908 \biblerefstyle{MHRA}
2909
2910 \begin{document}
2911 \title{Sample Document Using bibleref-xidx}
2912 \author{Nicola Talbot}
2913 \maketitle
2914
2915 \begin{tabular}{ll}
2916 \verb|\ibibleverse{Ex}| & \ibibleverse{Ex}\\
2917 \verb|\ibibleverse{Exodus}(20:)| & \ibibleverse{Exodus}(20:)\\
2918 \verb|\ibibleverse{Exod}(20:17)| & \ibibleverse{Exod}(20:17)\\
2919 \verb|\ibibleverse{IICo}(12:21)| & \ibibleverse{IICo}(12:21)\\
2920 \verb|\ibibleverse{IICor}(12:21-32)| & \ibibleverse{IICor}(12:21-32)\\
2921 \verb|\ibibleverse{Ex}(20:17)(21:3)| & \ibibleverse{Ex}(20:17)(21:3)\\
2922 \verb|\ibibleverse{Ex}(15:)(17:)(20:)| & \ibibleverse{Ex}(15:)(17:)(20:)\\
2923 \verb|\ibibleverse{Rev}(1:2,5,7-9,11)| & \ibibleverse{Rev}(1:2,5,7-9,11)\\
2924 \verb|\ibibleverse{IChronicles}(1:3)-(2:7)| &
2925 \ibibleverse{IChronicles}(1:3)-(2:7)\\
2926 \verb|\ibibleverse{IChronicles}(1:)-(4:)| &
2927 \ibibleverse{IChronicles}(1:)-(4:)\\
2928 \verb|\ibibleverse{IChronicles}(1-4:)| &
2929 \ibibleverse{IChronicles}(1-4:)
2930 \end{tabular}
2931
2932 \printindex
2933 \end{document}
2934 % \end{macrocode}
2935 %\fi
2936 %\iffalse
2937 % \begin{macrocode}
2938 %</sample-xidx.tex>
2939 % \end{macrocode}
2940 %\fi
2941 %\iffalse
2942 % \begin{macrocode}
2943 %<*sample.tex>
2944 % \end{macrocode}
2945 %\fi
2946 %\iffalse
2947 %\subsection{Sample Document}
2948 % \begin{macrocode}
2949 \documentclass{article}
2950
2951 \usepackage{bibleref}
2952 \usepackage{makeidx}
2953 \makeindex
2954
2955 % make the page numbers in the index italic for bible
2956 % references
2957 \renewcommand{\bvidxpgformat}{textit}
2958
2959 \begin{document}
2960
2961 \title{Sample Document}
2962 \author{Nicola Talbot}
2963 \maketitle
2964
2965 Long citation in text:
2966 \biblerefstyle{text}%
2967 \bibleverse{IICor}(12:15,18,21-33) and
2968 \bibleverse{Jeremiah}.
2969 Short citation in footnote\footnote{%
2970 \biblerefstyle{chicago}\bibleverse{IICor}(12:15,18,21-33) and
2971 \bibleverse{Jeremiah}}.
2972
2973 \section{Default Style}
2974
2975 \biblerefstyle{default}
2976 \noindent
2977 \begin{tabular}{ll}
2978 \verb|\bibleverse{Ex}| & \bibleverse{Ex}\\
2979 \verb|\bibleverse{Exodus}(20:)| & \bibleverse{Exodus}(20:)\\
2980 \verb|\bibleverse{Exod}(20:17)| & \bibleverse{Exod}(20:17)\\
2981 \verb|\bibleverse{IICo}(12:21)| & \bibleverse{IICo}(12:21)\\
2982 \verb|\bibleverse{IICor}(12:21-32)| & \bibleverse{IICor}(12:21-32)\\
2983 \verb|\bibleverse{Ex}(20:17)(21:3)| & \bibleverse{Ex}(20:17)(21:3)\\
2984 \verb|\bibleverse{Ex}(15:)(17:)(20:)| & \bibleverse{Ex}(15:)(17:)(20:)\\
2985 \verb|\bibleverse{Rev}(1:2,5,7-9,11)| & \bibleverse{Rev}(1:2,5,7-9,11)\\
2986 \verb|\bibleverse{IChronicles}(1:3)-(2:7)| &
2987 \bibleverse{IChronicles}(1:3)-(2:7)
2988 \end{tabular}
2989
2990 \section{Jerusalem Style}
2991 This is the style used in the Jerusalem bible.
2992 \biblerefstyle{jerusalem}
2993
2994 \noindent
2995 \begin{tabular}{ll}
2996 \verb|\bibleverse{Ex}| & \bibleverse{Ex}\\
2997 \verb|\bibleverse{Exodus}(20:)| & \bibleverse{Exodus}(20:)\\
2998 \verb|\bibleverse{Exod}(20:17)| & \bibleverse{Exod}(20:17)\\
2999 \verb|\bibleverse{IICo}(12:21)| & \bibleverse{IICo}(12:21)\\
3000 \verb|\bibleverse{IICor}(12:21-32)| & \bibleverse{IICor}(12:21-32)\\
3001 \verb|\bibleverse{Ex}(20:17)(21:3)| & \bibleverse{Ex}(20:17)(21:3)\\
3002 \verb|\bibleverse{Ex}(15:)(17:)(20:)| & \bibleverse{Ex}(15:)(17:)(20:)\\
3003 \verb|\bibleverse{Rev}(1:2,5,7-9,11)| & \bibleverse{Rev}(1:2,5,7-9,11)\\
3004 \verb|\bibleverse{IChronicles}(1:3)-(2:7)| &
3005 \bibleverse{IChronicles}(1:3)-(2:7)
3006 \end{tabular}
3007
3008 \section{Anglo-Saxon Style}
3009
3010 \biblerefstyle{anglosaxon}
3011 \noindent
3012 \begin{tabular}{ll}
3013 \verb|\bibleverse{Ex}| & \bibleverse{Ex}\\
3014 \verb|\bibleverse{Exodus}(20:)| & \bibleverse{Exodus}(20:)\\
3015 \verb|\bibleverse{Exod}(20:17)| & \bibleverse{Exod}(20:17)\\
3016 \verb|\bibleverse{IICo}(12:21)| & \bibleverse{IICo}(12:21)\\
3017 \verb|\bibleverse{IICor}(12:21-32)| & \bibleverse{IICor}(12:21-32)\\
3018 \verb|\bibleverse{Ex}(20:17)(21:3)| & \bibleverse{Ex}(20:17)(21:3)\\
3019 \verb|\bibleverse{Ex}(15:)(17:)(20:)| & \bibleverse{Ex}(15:)(17:)(20:)\\
3020 \verb|\bibleverse{Rev}(1:2,5,7-9,11)| & \bibleverse{Rev}(1:2,5,7-9,11)\\
3021 \verb|\bibleverse{IChronicles}(1:3)-(2:7)| &
3022 \bibleverse{IChronicles}(1:3)-(2:7)
3023 \end{tabular}
3024
3025 \section{Journal of Ecclesiastical History}
3026
3027 \biblerefstyle{JEH}
3028 \noindent
3029 \begin{tabular}{ll}
3030 \verb|\bibleverse{Ex}| & \bibleverse{Ex}\\
3031 \verb|\bibleverse{Exodus}(20:)| & \bibleverse{Exodus}(20:)\\
3032 \verb|\bibleverse{Exod}(20:17)| & \bibleverse{Exod}(20:17)\\
3033 \verb|\bibleverse{IICo}(12:21)| & \bibleverse{IICo}(12:21)\\
3034 \verb|\bibleverse{IICor}(12:21-32)| & \bibleverse{IICor}(12:21-32)\\
3035 \verb|\bibleverse{Ex}(20:17)(21:3)| & \bibleverse{Ex}(20:17)(21:3)\\
3036 \verb|\bibleverse{Ex}(15:)(17:)(20:)| & \bibleverse{Ex}(15:)(17:)(20:)\\
3037 \verb|\bibleverse{Rev}(1:2,5,7-9,11)| & \bibleverse{Rev}(1:2,5,7-9,11)\\
3038 \verb|\bibleverse{IChronicles}(1:3)-(2:7)| &
3039 \bibleverse{IChronicles}(1:3)-(2:7)
3040 \end{tabular}
3041
3042 \section{Modern Humanities Research Association}
3043
3044 \biblerefstyle{MHRA}
3045 \noindent
3046 \begin{tabular}{ll}
3047 \verb|\bibleverse{Ex}| & \bibleverse{Ex}\\
3048 \verb|\bibleverse{Exodus}(20:)| & \bibleverse{Exodus}(20:)\\
3049 \verb|\bibleverse{Exod}(20:17)| & \bibleverse{Exod}(20:17)\\
3050 \verb|\bibleverse{IICo}(12:21)| & \bibleverse{IICo}(12:21)\\
3051 \verb|\bibleverse{IICor}(12:21-32)| & \bibleverse{IICor}(12:21-32)\\
3052 \verb|\bibleverse{Ex}(20:17)(21:3)| & \bibleverse{Ex}(20:17)(21:3)\\
3053 \verb|\bibleverse{Ex}(15:)(17:)(20:)| & \bibleverse{Ex}(15:)(17:)(20:)\\
3054 \verb|\bibleverse{Rev}(1:2,5,7-9,11)| & \bibleverse{Rev}(1:2,5,7-9,11)\\
3055 \verb|\bibleverse{IChronicles}(1:3)-(2:7)| &
3056 \bibleverse{IChronicles}(1:3)-(2:7)
3057 \end{tabular}
3058
3059 \section{Novum Testamentum Graece (Nestle-Aland)}
3060
3061 \biblerefstyle{NTG}
3062 \noindent
3063 \begin{tabular}{ll}
3064 \verb|\bibleverse{Ex}| & \bibleverse{Ex}\\
3065 \verb|\bibleverse{Exodus}(20:)| & \bibleverse{Exodus}(20:)\\
3066 \verb|\bibleverse{Exod}(20:17)| & \bibleverse{Exod}(20:17)\\
3067 \verb|\bibleverse{IICo}(12:21)| & \bibleverse{IICo}(12:21)\\
3068 \verb|\bibleverse{IICor}(12:21-32)| & \bibleverse{IICor}(12:21-32)\\
3069 \verb|\bibleverse{Ex}(20:17)(21:3)| & \bibleverse{Ex}(20:17)(21:3)\\
3070 \verb|\bibleverse{Ex}(15:)(17:)(20:)| & \bibleverse{Ex}(15:)(17:)(20:)\\
3071 \verb|\bibleverse{Rev}(1:2,5,7-9,11)| & \bibleverse{Rev}(1:2,5,7-9,11)\\
3072 \verb|\bibleverse{IChronicles}(1:3)-(2:7)| &
3073 \bibleverse{IChronicles}(1:3)-(2:7)
3074 \end{tabular}
3075
3076 \section{MLA Style}
3077
3078 \biblerefstyle{MLA}
3079 \noindent
3080 \begin{tabular}{ll}
3081 \verb|\bibleverse{Ex}| & \bibleverse{Ex}\\
3082 \verb|\bibleverse{Exodus}(20:)| & \bibleverse{Exodus}(20:)\\
3083 \verb|\bibleverse{Exod}(20:17)| & \bibleverse{Exod}(20:17)\\
3084 \verb|\bibleverse{IICo}(12:21)| & \bibleverse{IICo}(12:21)\\
3085 \verb|\bibleverse{IICor}(12:21-32)| & \bibleverse{IICor}(12:21-32)\\
3086 \verb|\bibleverse{Ex}(20:17)(21:3)| & \bibleverse{Ex}(20:17)(21:3)\\
3087 \verb|\bibleverse{Ex}(15:)(17:)(20:)| & \bibleverse{Ex}(15:)(17:)(20:)\\
3088 \verb|\bibleverse{Rev}(1:2,5,7-9,11)| & \bibleverse{Rev}(1:2,5,7-9,11)\\
3089 \verb|\bibleverse{IChronicles}(1:3)-(2:7)| &
3090 \bibleverse{IChronicles}(1:3)-(2:7)
3091 \end{tabular}
3092
3093 \section{Chicago Style}
3094
3095 \biblerefstyle{chicago}
3096 \noindent
3097 \begin{tabular}{ll}
3098 \verb|\bibleverse{Ex}| & \bibleverse{Ex}\\
3099 \verb|\bibleverse{Exodus}(20:)| & \bibleverse{Exodus}(20:)\\
3100 \verb|\bibleverse{Exod}(20:17)| & \bibleverse{Exod}(20:17)\\
3101 \verb|\bibleverse{IICo}(12:21)| & \bibleverse{IICo}(12:21)\\
3102 \verb|\bibleverse{IICor}(12:21-32)| & \bibleverse{IICor}(12:21-32)\\
3103 \verb|\bibleverse{Ex}(20:17)(21:3)| & \bibleverse{Ex}(20:17)(21:3)\\
3104 \verb|\bibleverse{Ex}(15:)(17:)(20:)| & \bibleverse{Ex}(15:)(17:)(20:)\\
3105 \verb|\bibleverse{Rev}(1:2,5,7-9,11)| & \bibleverse{Rev}(1:2,5,7-9,11)\\
3106 \verb|\bibleverse{IChronicles}(1:3)-(2:7)| &
3107 \bibleverse{IChronicles}(1:3)-(2:7)
3108 \end{tabular}
3109
3110 \section{Text Style}
3111 This style prints the citation out in full. It's based
3112 on `default', and uses the fmtcount package to convert
3113 the numbers into words.
3114
3115 \biblerefstyle{text}
3116 \raggedright
3117
3118 \begin{itemize}
3119 \item \verb|\bibleverse{Ex}| \bibleverse{Ex}
3120 \item \verb|\bibleverse{Exodus}(20:)| \bibleverse{Exodus}(20:)
3121 \item \verb|\bibleverse{Exod}(20:17)| \bibleverse{Exod}(20:17)
3122 \item \verb|\bibleverse{IICo}(12:21)| \bibleverse{IICo}(12:21)
3123 \item \verb|\bibleverse{IICor}(12:21-32)| \bibleverse{IICor}(12:21-32)
3124 \item \verb|\bibleverse{Ex}(20:17)(21:3)| \bibleverse{Ex}(20:17)(21:3)
3125 \item \verb|\bibleverse{Ex}(15:)(17:)(20:)| \bibleverse{Ex}(15:)(17:)(20:)
3126 \item \verb|\bibleverse{Rev}(1:2,5,7-9,11)| \bibleverse{Rev}(1:2,5,7-9,11)
3127 \item \verb|\bibleverse{IChronicles}(1:3)-(2:7)|
3128 \bibleverse{IChronicles}(1:3)-(2:7)
3129 \end{itemize}
3130
3131 \section{MHRA Style---Indexed}
3132
3133 \biblerefstyle{MHRA}
3134 \noindent
3135 \begin{tabular}{ll}
3136 \verb|\ibibleverse{Ex}| & \ibibleverse{Ex}\\
3137 \verb|\ibibleverse{Exodus}(9:)| & \ibibleverse{Exodus}(9:)\\
3138 \verb|\ibibleverse{Exod}(20:17)| & \ibibleverse{Exod}(20:17)\\
3139 \verb|\ibibleverse{Exod}(20:)| & \ibibleverse{Exod}(20:)\\
3140 \verb|\ibibleverse{IICo}(12:21)| & \ibibleverse{IICo}(12:21)\\
3141 \verb|\ibibleverse{IICor}(12:21-32)| & \ibibleverse{IICor}(12:21-32)\\
3142 \verb|\ibibleverse{Ex}(20:17)(21:3)| & \ibibleverse{Ex}(20:17)(21:3)\\
3143 \verb|\ibibleverse{Ex}(15:)(17:)(20:)| & \ibibleverse{Ex}(15:)(17:)(20:)\\
3144 \verb|\ibibleverse{Rev}(1:2,5,7-9,11)| & \ibibleverse{Rev}(1:2,5,7-9,11)\\
3145 \verb|\ibibleverse{IChronicles}(1:3)-(2:7)| &
3146 \ibibleverse{IChronicles}(1:3)-(2:7)\\
3147 \verb|\ibibleverse{IIPeter}(3:8-15a)| &
3148 \ibibleverse{IIPeter}(3:8-15a)
3149 \end{tabular}
3150
3151 \section{New Style}
3152
3153 This new style is based on the `default' style, but
3154 has verses in lower case Roman numerals, and redefines
3155 ``Revelation'' as ``Apocalypse''.
3156
3157 \begin{verbatim}
3158 \newbiblerefstyle{sample}{%
3159 \biblerefstyle{default}%
3160 \renewcommand{\BRversestyle}[1]{\romannumeral##1}%
3161 \setbooktitle{Revelation}{Apocalyse}%
3162 }
3163 \end{verbatim}
3164 \newbiblerefstyle{sample}{%
3165 \biblerefstyle{default}%
3166 \renewcommand{\BRversestyle}[1]{\romannumeral##1}%
3167 \setbooktitle{Revelation}{Apocalyse}%
3168 }
3169
3170 \biblerefstyle{sample}
3171 \noindent
3172 \begin{tabular}{ll}
3173 \verb|\bibleverse{Ex}| & \bibleverse{Ex}\\
3174 \verb|\bibleverse{Exodus}(20:)| & \bibleverse{Exodus}(20:)\\
3175 \verb|\bibleverse{Exod}(20:17)| & \bibleverse{Exod}(20:17)\\
3176 \verb|\bibleverse{IICo}(12:21)| & \bibleverse{IICo}(12:21)\\
3177 \verb|\bibleverse{IICor}(12:21-32)| & \bibleverse{IICor}(12:21-32)\\
3178 \verb|\bibleverse{Ex}(20:17)(21:3)| & \bibleverse{Ex}(20:17)(21:3)\\
3179 \verb|\bibleverse{Ex}(15:)(17:)(20:)| & \bibleverse{Ex}(15:)(17:)(20:)\\
3180 \verb|\bibleverse{Rev}(1:2,5,7-9,11)| & \bibleverse{Rev}(1:2,5,7-9,11)\\
3181 \verb|\bibleverse{IChronicles}(1:3)-(2:7)| &
3182 \bibleverse{IChronicles}(1:3)-(2:7)
3183 \end{tabular}
3184
3185 \section{Partial References}
3186
3187 Only display verse numbers, but index under book and chapter:
3188 \ibiblevs{Gen}(19:3-4).
3189
3190 Display only chapter and verses, but index under book:
3191 \ibiblechvs{Gen}(4:1-5).
3192
3193 Complete indexed reference: \ibibleverse{Gen}(20:1-4).
3194
3195 Display chapter range with no verses: \ibibleverse{Gen}(1,4-6,8-9,11:).
3196
3197 Display chapter range with no verses (no index): \bibleverse{John}(1,3,4-6,8:).
3198
3199 \printindex
3200
3201 \end{document}
3202 % \end{macrocode}
3203 %\fi
3204 %\iffalse
3205 % \begin{macrocode}
3206 %</sample.tex>
3207 % \end{macrocode}
3208 %\fi
3209 %\iffalse
3210 % \begin{macrocode}
3211 %<*sample.ist>
3212 % \end{macrocode}
3213 %\fi
3214 %\iffalse
3215 % \begin{macrocode}
3216 delim_0 "\\dotfill "
3217 delim_1 "\\dotfill "
3218 delim_2 "\\dotfill "
3219 % \end{macrocode}
3220 %\fi
3221 %\iffalse
3222 % \begin{macrocode}
3223 %</sample.ist>
3224 % \end{macrocode}
3225 %\fi
3226 %\iffalse
3227 % \begin{macrocode}
3228 %<*bibleref.perl>
3229 % \end{macrocode}
3230 %\fi
3231 %\Finale
3232 \endinput