summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/bibleref/bibleref.dtx
blob: 35a65bc2d67bff4c92c6cc93fa4e6d80d75260c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
%\iffalse
% bibleref.dtx generated using makedtx version 0.9b (c) Nicola Talbot
% Command line args:
%   -src "(.+)\.(sty)=>\1.\2"
%   -src "(.+)\.(tex)=>\1.\2"
%   -doc "manual.tex"
%   -author "Nicola Talbot"
%   -dir "source"
%   bibleref
% Created on 2005/9/28 15:01
%\fi
%\iffalse
%<*package>
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%</package>
%\fi
% \iffalse
% Doc-Source file to use with LaTeX2e
% Copyright (C) 2005 Nicola Talbot, all rights reserved.
% \fi
% \iffalse
%<*driver>
\documentclass{ltxdoc}

\usepackage[colorlinks,bookmarks]{hyperref}
\usepackage{bibleref}

\newcommand{\sty}[1]{\textsf{#1}}
\CheckSum{2050}

\def\docdate{28 Sep 2005}

\begin{document}
\DocInput{bibleref.dtx}
\end{document}
%</driver>
%\fi
%\title{bibleref.sty v1.02: \LaTeXe\ Package for 
%typesetting bible references}
%\author{Nicola Talbot}
%\date{\docdate}
%\maketitle
%\tableofcontents
%
%\section{Introduction}
%
%The \sty{bibleref} package was designed to provide consistent formatting for referencing
%parts of the bible.
%
%The command \DescribeMacro{\bibleverse}:\par\vspace{10pt}\noindent
%\verb|\bibleverse{|\meta{book title}\verb|}(|\meta{chapter}\texttt{:}\meta{verse(s)}\verb|)|\ldots
%\verb|(|\meta{chapter}\texttt{:}\meta{verse(s)}\verb|)|\par
%\vspace{10pt}\noindent
%can be used to cite a bible book, chapter or verse or range
%of chapters or verses.
%
%The book title, \meta{book title}, may be given either as the full title (e.g.\ \texttt{Matthew}) or as an abbreviation
%(e.g.\ \texttt{Mt} or \texttt{Matt}), most standard abbreviations are recognised.
%Books with multiple parts should be preceeded by the
%book number in uppercase roman numerals. For example,
%the second book of Kings should be entered as 
%\verb|\bibleverse{IIKings}|
%
%You may have any number, or zero, sets of parenthesis 
%\verb|(|\meta{chapter}\texttt{:}\meta{verse(s)}\verb|)|, 
%indicating the chapter and verse or verses. Verses can be 
%specified as a comma separated list of individual verses or range
%of verses. A range of verses should be written with a 
%single hyphen, e.g.\ \verb|2-4|. In the
%typeset output the verses will be separated with 
%\DescribeMacro{\BRvsep}\verb|\BRvsep| (an en-dash by default.) 
%A chapter may
%be referenced without a verse, but the colon must remain, 
%e.g.\ \verb|(12:)| simply indicates chapter 12.
%
%A range of verses spanning more than one chapter can
%be entered as \texttt(\meta{ch}\texttt:\meta{v}\texttt{)-(}\meta{ch}\texttt:\meta{v}\texttt)
%
%Examples:
%\begin{center}
%\begin{tabular}{ll}
%\verb|\bibleverse{Ex}| & \bibleverse{Ex}\\
%\verb|\bibleverse{Exodus}(20:)| & \bibleverse{Exodus}(20:)\\
%\verb|\bibleverse{Exod}(20:17)| & \bibleverse{Exod}(20:17)\\
%\verb|\bibleverse{IICo}(12:21)| & \bibleverse{IICo}(12:21)\\
%\verb|\bibleverse{IICor}(12:21-32)| & \bibleverse{IICor}(12:21-32)\\
%\verb|\bibleverse{Ex}(20:17)(21:3)| & \bibleverse{Ex}(20:17)(21:3)\\
%\verb|\bibleverse{Ex}(15:)(17:)(20:)| & \bibleverse{Ex}(15:)(17:)(20:)\\
%\verb|\bibleverse{Rev}(1:2,5,7-9,11)| & \bibleverse{Rev}(1:2,5,7-9,11)\\
%\verb|\bibleverse{IChronicles}(1:3)-(2:7)| &
%\bibleverse{IChronicles}(1:3)-(2:7)
%\end{tabular}
%\end{center}
%
%The style of the reference can be specified either by 
%package option or as the argument to the command
%\DescribeMacro{\biblerefstyle}\verb|\biblerefstyle{|\meta{style}\verb|}|. Styles are listed in Table~\ref{tab:styles}.
%
%\begin{table}[tbh]
%\caption{Bible Citation Styles (can be used as package option or in the argument to 
%\texttt{\textbackslash biblerefstyle})}
%\label{tab:styles}
%\vspace{10pt}
%\begin{center}
%\begin{tabular}{lp{0.5\textwidth}}
%\bfseries Style & \bfseries Example\\
%default & \biblerefstyle{default}\bibleverse{IICor}(12:1-5)\\
%jerusalem & \biblerefstyle{jerusalem}\bibleverse{IICor}(12:1-5)\\
%anglosaxon & \biblerefstyle{anglosaxon}\bibleverse{IICor}(12:1-5)\\
%JEH & \biblerefstyle{JEH}\bibleverse{IICor}(12:1-5)\\
%NTG & \biblerefstyle{NTG}\bibleverse{IICor}(12:1-5)\\
%MLA & \biblerefstyle{MLA}\bibleverse{IICor}(12:1-5)\\
%chicago & \biblerefstyle{chicago}\bibleverse{IICor}(12:1-5)\\
%text & \biblerefstyle{text}\bibleverse{IICor}(12:1-5)
%\end{tabular}
%\end{center}
%\end{table}
%
%\DescribeMacro{\setbooktitle}
%You can change the name of a book using 
%\verb|\setbooktitle{|\meta{name}\verb|}{|\meta{new title}\verb|}|
%Note that \meta{name} must be the full name, not the
%abbreviated name of the book. For example, to change
%Revelation to Apoc, do 
%\verb|\setbookname{Revelation}{Apoc}|
%(\textbf{Note} that you shouldn't do 
%\verb|\setbookname{Rev}{Apoc}|)
%
%\section{Defining New Styles}
%
%You can define a new style using the command
%\DescribeMacro{\newbiblerefstyle}
%\verb|\newbiblerefstyle{|\meta{style-name}\verb|}{|\meta{commands}\verb|}| where \meta{commands} are
%the commands needed to modify the citation style.
%
%Example: 
%This new style is based on the `default' style, but
%has verses in lower case Roman numerals, and redefines
%``Revelation'' as ``Apocalypse''.
%\begin{verbatim}
%\newbiblerefstyle{sample}{%
%\biblerefstyle{default}%
%\renewcommand{\BRversestyle}[1]{\romannumeral##1}%
%\setbooktitle{Revelation}{Apocalyse}%
%}
%\end{verbatim}
%Note the use of \verb|##1| instead of \verb|#1|.
%
%\section{Acknowledgements}
%Many thanks to all the useful comments from comp.text.tex, 
%especially from Jesse~Billett, Brooks~Moses and Ulrich~M.~Schwarz.
%
%\section{Contact Details}
%\begin{tabular}{l}
%Dr Nicola Talbot\\
%School of Computing Sciences\\
%University of East Anglia\\
%Norwich. Norfolk. NR4 7TJ.\\
%United Kingdom\\
%\url{http://theoval.cmp.uea.ac.uk/~nlct/}
%\end{tabular}
%
%
%\StopEventually{}
%\section{The Code}
%    \begin{macrocode}
%<*bibleref.sty>
%    \end{macrocode}
% Declare package
%    \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{bibleref}[2005/09/28 1.02 (NLCT)]
%    \end{macrocode}
% Need to do some conditional stuff
%    \begin{macrocode}
\RequirePackage{ifthen}
%    \end{macrocode}
% The fmtcount package is needed for the full text
% citations
%    \begin{macrocode}
\RequirePackage{fmtcount}
%    \end{macrocode}
% \DescribeMacro{\BRbooknumberstyle}
%\verb|\BRbooknumberstyle| is the style of the book
% number. By default, it simply displays its argument
%followed by a space.
%    \begin{macrocode}
\newcommand*{\BRbooknumberstyle}[1]{#1 }
%    \end{macrocode}
% As above, but for epistle.
%    \begin{macrocode}
\newcommand*{\BRepistlenumberstyle}[1]{#1 }
%    \end{macrocode}
%\DescribeMacro{\BRbookof}
%\verb|\BRbookof| is text to go before the book title.
%This by default is nothing,
% but can be changed to, e.g., ``The book of ''
%    \begin{macrocode}
\newcommand*{\BRbookof}{}
%    \end{macrocode}
%\DescribeMacro{\BRgospel}
%\verb|\BRgospel|: as above but for gospels
%    \begin{macrocode}
\newcommand*{\BRgospel}{}
%    \end{macrocode}
%\DescribeMacro{\BRepistleto}
%\verb|\BRepistleto|: as above but for epistles to
% someone.
%    \begin{macrocode}
\newcommand*{\BRepistleto}{}
%    \end{macrocode}
%\DescribeMacro{\BRepistletothe}
%\verb|\BRepistletothe|: as above but for epistles to 
% people.
%    \begin{macrocode}
\newcommand*{\BRepistletothe}{}
%    \end{macrocode}
%\DescribeMacro{\BRepistleof}
%\verb|\BRepistleof|: as above but for ``epistles of''
%    \begin{macrocode}
\newcommand*{\BRepistleof}{}
%    \end{macrocode}
% \DescribeMacro{\BRbooktitlestyle}
%\verb|\BRbooktitlestyle| is the style of the
% book title. By default, it simply displays its argument.
%    \begin{macrocode}
\newcommand*{\BRbooktitlestyle}[1]{#1}
%    \end{macrocode}
% \DescribeMacro{\BRchapterstyle}
%\verb|\BRchapterstyle| is the style of the chapter number.
% By default it simply displays its argument.
%    \begin{macrocode}
\newcommand*{\BRchapterstyle}[1]{#1}
%    \end{macrocode}
%\DescribeMacro{\BRversestyle}
%\verb|\BRversestyle| is the style of the verse number.
% By default is simply displays its argument.
%    \begin{macrocode}
\newcommand*{\BRversestyle}[1]{#1}
%    \end{macrocode}
%\DescribeMacro{\BRbkchsep}
%\verb|\BRbkchsep| is the separator between the book title
% and the chapter number
%    \begin{macrocode}
\newcommand*{\BRbkchsep}{ }
%    \end{macrocode}
%\DescribeMacro{\BRchvsep}
%\verb|\BRchvsep| is the separator between chapter
% and verse numbers. By default this is simply a colon.
%    \begin{macrocode}
\newcommand*{\BRchvsep}{:}
%    \end{macrocode}
%\DescribeMacro{\BRchsep}
%\verb|\BRchsep| is the separator between multiple chapters.
% By default this is simply a semi-colon.
%    \begin{macrocode}
\newcommand*{\BRchsep}{;}
%    \end{macrocode}
% \DescribeMacro{\BRvrsep}
%\verb|\BRvrsep| is the separator between the beginning
% and ending of a range of verses. By default this
% is simply an en-dash.
%    \begin{macrocode}
\newcommand*{\BRvrsep}{--}
%    \end{macrocode}
% \DescribeMacro{\BRvsep}
%\verb|\BRvsep| is the separator between a list of verses.
%    \begin{macrocode}
\newcommand*{\BRvsep}{,}
%    \end{macrocode}
% \verb|\BRperiod| can be redefined to put a full stop after 
% book names.
%    \begin{macrocode}
\newcommand*{\BRperiod}{}
%    \end{macrocode}
% The command \DescribeMacro{\brfullname}\verb|\brfullname|
% will switch to using the full book title.
%    \begin{macrocode}
\newcommand{\brfullname}{%
\def\br@Genesis{\BRbookof Genesis}%
\def\br@Exodus{\BRbookof Exodus}%
\def\br@Leviticus{\BRbookof Leviticus}%
\def\br@Numbers{\BRbookof Numbers}%
\def\br@Deuteronomy{\BRbookof Deuteronomy}%
\def\br@Joshua{\BRbookof Joshua}%
\def\br@Judges{\BRbookof Judges}%
\def\br@Ruth{\BRbookof Ruth}%
\def\br@ISamuel{\BRbooknumberstyle{1}\BRbookof Samuel}%
\def\br@IISamuel{\BRbooknumberstyle{2}\BRbookof Samuel}%
\def\br@IKings{\BRbooknumberstyle{1}\BRbookof Kings}%
\def\br@IIKings{\BRbooknumberstyle{2}\BRbookof Kings}%
\def\br@IChronicles{\BRbooknumberstyle{1}\BRbookof Chronicles}%
\def\br@IIChronicles{\BRbooknumberstyle{2}\BRbookof Chronicles}%
\def\br@Ezra{\BRbookof Ezra}%
\def\br@Nehemiah{\BRbookof Nehemiah}%
\def\br@Tobit{\BRbookof Tobit}%
\def\br@Judith{\BRbookof Judith}%
\def\br@Esther{\BRbookof Esther}%
\def\br@IMaccabees{\BRbooknumberstyle{1}\BRbookof Maccabees}%
\def\br@IIMaccabees{\BRbooknumberstyle{2}\BRbookof Maccabees}%
\def\br@Job{\BRbookof Job}%
\def\br@Psalms{\BRbookof Psalms}%
\def\br@Proverbs{\BRbookof Proverbs}%
\def\br@Ecclesiastes{\BRbookof Ecclesiastes}%
\def\br@SongofSongs{\BRbookof Song of Songs}%
\def\br@Wisdom{\BRbookof Wisdom}%
\def\br@Ecclesiasticus{\BRbookof Ecclesiasticus}%
\def\br@Isaiah{\BRbookof Isaiah}%
\def\br@Jeramiah{\BRbookof Jeremiah}%
\def\br@Lamentations{\BRbookof Lamentations}%
\def\br@Baruch{\BRbookof Baruch}%
\def\br@Ezekiel{\BRbookof Ezekiel}%
\def\br@Daniel{\BRbookof Daniel}%
\def\br@Hosea{\BRbookof Hosea}%
\def\br@Joel{\BRbookof Joel}%
\def\br@Amos{\BRbookof Amos}%
\def\br@Obadiah{\BRbookof Obadiah}%
\def\br@Jonah{\BRbookof Jonah}%
\def\br@Micah{\BRbookof Micah}%
\def\br@Nahum{\BRbookof Nahum}%
\def\br@Habakkuk{\BRbookof Habakkuk}%
\def\br@Zephaniah{\BRbookof Zephaniah}%
\def\br@Haggai{\BRbookof Haggai}%
\def\br@Zechariah{\BRbookof Zechariah}%
\def\br@Malachi{\BRbookof Malachi}%
\def\br@Matthew{\BRgospel Matthew}%
\def\br@Mark{\BRgospel Mark}%
\def\br@Luke{\BRgospel Luke}%
\def\br@John{\BRgospel John}%
\def\br@Acts{Acts}%
\def\br@Romans{\BRepistletothe Romans}%
\def\br@ICorinthians{\BRepistlenumberstyle{1}\BRepistletothe Corinthians}%
\def\br@IICorinthians{\BRepistlenumberstyle{2}\BRepistletothe Corinthians}%
\def\br@Galatians{\BRepistletothe Galatians}%
\def\br@Ephesians{\BRepistletothe Ephesians}%
\def\br@Philippians{\BRepistletothe Philippians}%
\def\br@Colossians{\BRepistletothe Colossians}%
\def\br@IThessalonians{\BRepistlenumberstyle{1}\BRepistletothe Thessalonians}%
\def\br@IIThessalonians{\BRepistlenumberstyle{2}\BRepistletothe Thessalonians}%
\def\br@ITimothy{\BRepistlenumberstyle{1}\BRepistleto Timothy}%
\def\br@IITimothy{\BRepistlenumberstyle{2}\BRepistletoTimothy}%
\def\br@Titus{\BRepistleto Titus}%
\def\br@Philemon{\BRepistleto Philemon}%
\def\br@Hebrews{\BRepistletothe Hebrews}%
\def\br@James{\BRepistleof James}%
\def\br@IPeter{\BRepistlenumberstyle{1}\BRepistleof Peter}%
\def\br@IIPeter{\BRepistlenumberstyle{2}\BRepistleof Peter}%
\def\br@IJohn{\BRepistlenumberstyle{1}\BRepistleof John}%
\def\br@IIJohn{\BRepistlenumberstyle{2}\BRepistleof John}%
\def\br@IIIJohn{\BRepistlenumberstyle{3}\BRepistleof John}%
\def\br@Jude{\BRepistleof Jude}%
\def\br@Revelation{\BRbookof Revelation}}
%    \end{macrocode}
% Set full names as the default
%    \begin{macrocode}
\brfullname
%    \end{macrocode}
% The command \DescribeMacro{\brabbrvname}\verb|\brabbrvname|
% will switch to an abbreviated form for the book titles.
%    \begin{macrocode}
\newcommand{\brabbrvname}{%
\def\br@Gensis{Gn\BRperiod}%
\def\br@Exodus{Ex\BRperiod}%
\def\br@Leviticus{Lv\BRperiod}%
\def\br@Numbers{Nb\BRperiod}%
\def\br@Deuteronomy{Dt\BRperiod}%
\def\br@Joshua{Jos\BRperiod}%
\def\br@Judges{Jg\BRperiod}%
\def\br@Ruth{Rt\BRperiod}%
\def\br@ISamuel{\BRbooknumberstyle{1}S\BRperiod}%
\def\br@IISamuel{\BRbooknumberstyle{2}S\BRperiod}%
\def\br@IKings{\BRbooknumberstyle{1}K\BRperiod}%
\def\br@IIKings{\BRbooknumberstyle{2}K\BRperiod}%
\def\br@IChronicles{\BRbooknumberstyle{1}Ch\BRperiod}%
\def\br@IIChronicles{\BRbooknumberstyle{2}Ch\BRperiod}%
\def\br@Ezra{Ezr\BRperiod}%
\def\br@Nehemiah{Ne\BRperiod}%
\def\br@Tobit{Tb\BRperiod}%
\def\br@Judith{Jdt\BRperiod}%
\def\br@Esther{Est\BRperiod}%
\def\br@IMaccabees{\BRbooknumberstyle{1}M\BRperiod}%
\def\br@IIMaccabees{\BRbooknumberstyle{2}M\BRperiod}%
\def\br@Job{Jb\BRperiod}%
\def\br@Psalms{Ps\BRperiod}%
\def\br@Proverbs{Pr\BRperiod}%
\def\br@Ecclesiastes{Qo\BRperiod}%
\def\br@SongofSongs{Sg\BRperiod}%
\def\br@Wisdom{Ws\BRperiod}%
\def\br@Ecclesiasticus{Si\BRperiod}%
\def\br@Isaiah{Is\BRperiod}%
\def\br@Jeremiah{Jr\BRperiod}%
\def\br@Lamentations{Lm\BRperiod}%
\def\br@Baruch{Ba\BRperiod}%
\def\br@Ezekiel{Ezk\BRperiod}%
\def\br@Daniel{Dn\BRperiod}%
\def\br@Hosea{Ho\BRperiod}%
\def\br@Joel{Jl\BRperiod}%
\def\br@Amos{Am\BRperiod}%
\def\br@Obadiah{Ob\BRperiod}%
\def\br@Jonah{Jon\BRperiod}%
\def\br@Micah{Mi\BRperiod}%
\def\br@Nahum{Na\BRperiod}%
\def\br@Habakkuk{Hab\BRperiod}%
\def\br@Zephaniah{Zp\BRperiod}%
\def\br@Haggai{Hg\BRperiod}%
\def\br@Zechariah{Zc\BRperiod}%
\def\br@Malachi{Ml\BRperiod}%
\def\br@Matthew{Mt\BRperiod}%
\def\br@Mark{Mk\BRperiod}%
\def\br@Luke{Lk\BRperiod}%
\def\br@John{Jn\BRperiod}%
\def\br@Acts{Ac\BRperiod}%
\def\br@Romans{Rm\BRperiod}%
\def\br@ICorinthians{\BRepistlenumberstyle{1}Co\BRperiod}%
\def\br@IICorinthians{\BRepistlenumberstyle{2}Co\BRperiod}%
\def\br@Galatians{Ga\BRperiod}%
\def\br@Ephesians{Ep\BRperiod}%
\def\br@Philippians{Ph\BRperiod}%
\def\br@Colossians{Col\BRperiod}%
\def\br@IThessalonians{\BRepistlenumberstyle{1}Th\BRperiod}%
\def\br@IIThessalonians{\BRepistlenumberstyle{2}Th\BRperiod}%
\def\br@ITimothy{\BRepistlenumberstyle{1}Tm\BRperiod}%
\def\br@IITimothy{\BRepistlenumberstyle{2}Tm\BRperiod}%
\def\br@Titus{Tt\BRperiod}%
\def\br@Philemon{Phm\BRperiod}%
\def\br@Hebrews{Heb\BRperiod}%
\def\br@James{Jm\BRperiod}%
\def\br@IPeter{\BRepistlenumberstyle{1}P\BRperiod}%
\def\br@IIPeter{\BRepistlenumberstyle{2}P\BRperiod}%
\def\br@IJohn{\BRepistlenumberstyle{1}Jn\BRperiod}%
\def\br@IIJohn{\BRepistlenumberstyle{2}Jn\BRperiod}%
\def\br@IIIJohn{\BRepistlenumberstyle{3}Jn\BRperiod}%
\def\br@Jude{Jude}%
\def\br@Revelation{Rv\BRperiod}}
%    \end{macrocode}
% The command \DescribeMacro{\braltabbrvname}\verb|\braltabbrvname|
% switches to an alternative set of abbreviations.
%    \begin{macrocode}
\newcommand{\braltabbrvname}{%
\def\br@Gensis{Gen\BRperiod}%
\def\br@Exodus{Exod\BRperiod}%
\def\br@Leviticus{Lev\BRperiod}%
\def\br@Numbers{Num\BRperiod}%
\def\br@Deuteronomy{Deut\BRperiod}%
\def\br@Joshua{Josh\BRperiod}%
\def\br@Judges{Judg\BRperiod}%
\def\br@Ruth{Ruth}%
\def\br@ISamuel{\BRbooknumberstyle{1}Sam\BRperiod}%
\def\br@IISamuel{\BRbooknumberstyle{2}Sam\BRperiod}%
\def\br@IKings{\BRbooknumberstyle{1}Kgs\BRperiod}%
\def\br@IIKings{\BRbooknumberstyle{2}Kgs\BRperiod}%
\def\br@IChronicles{\BRbooknumberstyle{1}Chr\BRperiod}%
\def\br@IIChronicles{\BRbooknumberstyle{2}Chr\BRperiod}%
\def\br@Ezra{Ezra}%
\def\br@Nehemiah{Neh\BRperiod}%
\def\br@Tobit{Tobit}%
\def\br@Judith{Judith}%
\def\br@Esther{Esther}%
\def\br@IMaccabees{\BRbooknumberstyle{1}M\BRperiod}%
\def\br@IIMaccabees{\BRbooknumberstyle{2}M\BRperiod}%
\def\br@Job{Job}%
\def\br@Psalms{Ps\BRperiod}%
\def\br@Proverbs{Prov\BRperiod}%
\def\br@Ecclesiastes{Eccles\BRperiod}%
\def\br@SongofSongs{S\BRperiod\ of S\BRperiod}%
\def\br@Wisdom{Wisd\BRperiod}%
\def\br@Ecclesiasticus{Ecclus\BRperiod}%
\def\br@Isaiah{Isa\BRperiod}%
\def\br@Jeremiah{Jer\BRperiod}%
\def\br@Lamentations{Lam\BRperiod}%
\def\br@Baruch{Baruch}%
\def\br@Ezekiel{Ezek\BRperiod}%
\def\br@Daniel{Dan\BRperiod}%
\def\br@Hosea{Hos\BRperiod}%
\def\br@Joel{Joel}%
\def\br@Amos{Amos}%
\def\br@Obadiah{Obad}%
\def\br@Jonah{Jonah}%
\def\br@Micah{Mic\BRperiod}%
\def\br@Nahum{Nah\BRperiod}%
\def\br@Habakkuk{Hab\BRperiod}%
\def\br@Zephaniah{Zeph\BRperiod}%
\def\br@Haggai{Hag\BRperiod}%
\def\br@Zechariah{Zech\BRperiod}%
\def\br@Malachi{Mal\BRperiod}%
\def\br@Matthew{Matt\BRperiod}%
\def\br@Mark{Mark}%
\def\br@Luke{Luke}%
\def\br@John{John}%
\def\br@Acts{Acts}%
\def\br@Romans{Rom\BRperiod}%
\def\br@ICorinthians{\BRepistlenumberstyle{1}Cor\BRperiod}%
\def\br@IICorinthians{\BRepistlenumberstyle{2}Cor\BRperiod}%
\def\br@Galatians{Gal\BRperiod}%
\def\br@Ephesians{Eph\BRperiod}%
\def\br@Philippians{Phil\BRperiod}%
\def\br@Colossians{Col\BRperiod}%
\def\br@IThessalonians{\BRepistlenumberstyle{1}Thess\BRperiod}%
\def\br@IIThessalonians{\BRepistlenumberstyle{2}Thess\BRperiod}%
\def\br@ITimothy{\BRepistlenumberstyle{1}Tim\BRperiod}%
\def\br@IITimothy{\BRepistlenumberstyle{2}Tim\BRperiod}%
\def\br@Titus{Tit\BRperiod}%
\def\br@Philemon{Philem\BRperiod}%
\def\br@Hebrews{Heb\BRperiod}%
\def\br@James{Jas\BRperiod}%
\def\br@IPeter{\BRepistlenumberstyle{1}Pet\BRperiod}%
\def\br@IIPeter{\BRepistlenumberstyle{2}Pet\BRperiod}%
\def\br@IJohn{\BRepistlenumberstyle{1}John}%
\def\br@IIJohn{\BRepistlenumberstyle{2}John}%
\def\br@IIIJohn{\BRepistlenumberstyle{3}John}%
\def\br@Jude{Jude}%
\def\br@Revelation{Rev\BRperiod}}
%    \end{macrocode}
% Provide synonymns.
%    \begin{macrocode}
\newcommand*\br@Gn{\br@Genesis}%
\newcommand*\br@Ex{\br@Exodus}%
\newcommand*\br@Lv{\br@Leviticus}%
\newcommand*\br@Nb{\br@Numbers}%
\newcommand*\br@Dt{\br@Deuteronomy}%
\newcommand*\br@Jos{\br@Joshua}%
\newcommand*\br@Jg{\br@Judges}%
\newcommand*\br@Rt{\br@Ruth}%
\newcommand*\br@IS{\br@ISamuel}%
\newcommand*\br@IIS{\br@IISamuel}%
\newcommand*\br@IK{\br@IKings}%
\newcommand*\br@IIK{\br@IIKings}%
\newcommand*\br@ICh{\br@IChronicles}%
\newcommand*\br@IICh{\br@IIChronicles}%
\newcommand*\br@Ezr{\br@Ezra}%
\newcommand*\br@Ne{\br@Nehemiah}%
\newcommand*\br@Tb{\br@Tobit}%
\newcommand*\br@Jdt{\br@Judith}%
\newcommand*\br@Est{\br@Esther}%
\newcommand*\br@IM{\br@IMaccabees}%
\newcommand*\br@IIM{\br@IIMaccabees}%
\newcommand*\br@Jb{\br@Job}%
\newcommand*\br@Ps{\br@Psalms}%
\newcommand*\br@Pr{\br@Proverbs}%
\newcommand*\br@Qo{\br@Ecclesiastes}%
\newcommand*\br@Sg{\br@SongofSongs}%
\newcommand*\br@Ws{\br@Wisdom}%
\newcommand*\br@Si{\br@Ecclesiasticus}%
\newcommand*\br@Is{\br@Isaiah}%
\newcommand*\br@Jr{\br@Jeremiah}%
\newcommand*\br@Lm{\br@Lamentations}%
\newcommand*\br@Ba{\br@Baruch}%
\newcommand*\br@Ezk{\br@Ezekiel}%
\newcommand*\br@Dn{\br@Daniel}%
\newcommand*\br@Ho{\br@Hosea}%
\newcommand*\br@Jl{\br@Joel}%
\newcommand*\br@Am{\br@Amos}%
\newcommand*\br@Ob{\br@Obadiah}%
\newcommand*\br@Jon{\br@Jonah}%
\newcommand*\br@Mi{\br@Micah}%
\newcommand*\br@Na{\br@Nahum}%
\newcommand*\br@Hab{\br@Habakkuk}%
\newcommand*\br@Zp{\br@Zephaniah}%
\newcommand*\br@Hg{\br@Haggai}%
\newcommand*\br@Zc{\br@Zechariah}%
\newcommand*\br@Ml{\br@Malachi}%
\newcommand*\br@Mt{\br@Matthew}%
\newcommand*\br@Mk{\br@Mark}%
\newcommand*\br@Lk{\br@Luke}%
\newcommand*\br@Jn{\br@John}%
\newcommand*\br@Ac{\br@Acts}%
\newcommand*\br@Rm{\br@Romans}%
\newcommand*\br@ICo{\br@ICorinthians}%
\newcommand*\br@IICo{\br@IICorinthians}%
\newcommand*\br@Ga{\br@Galatians}%
\newcommand*\br@Ep{\br@Ephesians}%
\newcommand*\br@Ph{\br@Philippians}%
\newcommand*\br@Col{\br@Colossians}%
\newcommand*\br@ITh{\br@IThessalonians}%
\newcommand*\br@IITh{\br@IIThessalonians}%
\newcommand*\br@ITm{\br@ITimothy}%
\newcommand*\br@IITm{\br@IITimothy}%
\newcommand*\br@Tt{\br@Titus}%
\newcommand*\br@Phm{\br@Philemon}%
\newcommand*\br@Heb{\br@Hebrews}%
\newcommand*\br@Jm{\br@James}%
\newcommand*\br@IP{\br@IPeter}%
\newcommand*\br@IIP{\br@IIPeter}%
\newcommand*\br@IJn{\br@IJohn}%
\newcommand*\br@IIJn{\br@IIJohn}%
\newcommand*\br@Rv{\br@Revelation}
%    \end{macrocode}
% More synonyms.
%    \begin{macrocode}
\newcommand*\br@Gen{\br@Genesis}%
\newcommand*\br@Exod{\br@Exodus}%
\newcommand*\br@Lev{\br@Leviticus}%
\newcommand*\br@Num{\br@Numbers}%
\newcommand*\br@Deut{\br@Deuteronomy}%
\newcommand*\br@Josh{\br@Joshua}%
\newcommand*\br@Judg{\br@Judges}%
\newcommand*\br@ISam{\br@ISamuel}%
\newcommand*\br@IISam{\br@IISamuel}%
\newcommand*\br@IKgs{\br@IKings}%
\newcommand*\br@IIKgs{\br@IIKings}%
\newcommand*\br@IChr{\br@IChronicles}%
\newcommand*\br@IIChr{\br@IIChronicles}%
\newcommand*\br@Neh{\br@Nehemiah}%
\newcommand*\br@Esth{\br@Esther}%
\newcommand*\br@IMacc{\br@IMaccabees}%
\newcommand*\br@IIMacc{\br@IIMaccabees}%
\newcommand*\br@Prov{\br@Proverbs}%
\newcommand*\br@Eccl{\br@Ecclesiastes}%
\newcommand*\br@SofS{\br@SongofSongs}%
\newcommand*\br@Wisd{\br@Wisdom}%
\newcommand*\br@Ecclus{\br@Ecclesiasticus}%
\newcommand*\br@Isa{\br@Isaiah}%
\newcommand*\br@Jer{\br@Jeremiah}%
\newcommand*\br@Lam{\br@Lamentations}%
\newcommand*\br@Ezek{\br@Ezekiel}%
\newcommand*\br@Dan{\br@Daniel}%
\newcommand*\br@Hos{\br@Hosea}%
\newcommand*\br@Obad{\br@Obadiah}%
\newcommand*\br@Mic{\br@Micah}%
\newcommand*\br@Nah{\br@Nahum}%
\newcommand*\br@Zeph{\br@Zephaniah}%
\newcommand*\br@Hag{\br@Haggai}%
\newcommand*\br@Zech{\br@Zechariah}%
\newcommand*\br@Mal{\br@Malachi}%
\newcommand*\br@Matt{\br@Matthew}%
\newcommand*\br@Rom{\br@Romans}%
\newcommand*\br@ICor{\br@ICorinthians}%
\newcommand*\br@IICor{\br@IICorinthians}%
\newcommand*\br@Gal{\br@Galatians}%
\newcommand*\br@Eph{\br@Ephesians}%
\newcommand*\br@Phil{\br@Philippians}%
\newcommand*\br@IThess{\br@IThessalonians}%
\newcommand*\br@IIThess{\br@IIThessalonians}%
\newcommand*\br@ITim{\br@ITimothy}%
\newcommand*\br@IITim{\br@IITimothy}%
\newcommand*\br@Tit{\br@Titus}%
\newcommand*\br@Philem{\br@Philemon}%
\newcommand*\br@Jas{\br@James}%
\newcommand*\br@IPet{\br@IPeter}%
\newcommand*\br@IIPet{\br@IIPeter}%
\newcommand*\br@Rev{\br@Revelation}
%    \end{macrocode}
% Set up assorted styles. All bible reference styles
% should start with \verb|brs@|. First the default
% style.
%    \begin{macrocode}
\newcommand*{\brs@default}{%
\brfullname
\renewcommand*{\BRbooknumberstyle}[1]{##1 }%
\renewcommand*{\BRepistlenumberstyle}[1]{##1 }%
\renewcommand*{\BRbooktitlestyle}[1]{##1}%
\renewcommand*{\BRchapterstyle}[1]{##1}%
\renewcommand*{\BRversestyle}[1]{##1}%
\renewcommand*{\BRbookof}{}%
\renewcommand*{\BRgospel}{}%
\renewcommand*{\BRepistletothe}{}%
\renewcommand*{\BRepistleto}{}%
\renewcommand*{\BRepistleof}{}%
\renewcommand*{\BRbkchsep}{ }
\renewcommand*{\BRchvsep}{:}%
\renewcommand*{\BRchsep}{;}%
\renewcommand*{\BRvrsep}{--}%
\renewcommand*{\BRvsep}{,}%
\renewcommand*{\BRperiod}{}}
%    \end{macrocode}
% The style used by the Jerusalem Bible.
%    \begin{macrocode}
\newcommand{\brs@jerusalem}{%
\brabbrvname
\renewcommand*{\BRbooknumberstyle}[1]{##1 }%
\renewcommand*{\BRepistlenumberstyle}[1]{##1 }%
\renewcommand*{\BRbooktitlestyle}[1]{##1}%
\renewcommand*{\BRchapterstyle}[1]{##1}%
\renewcommand*{\BRversestyle}[1]{##1}%
\renewcommand*{\BRbookof}{}%
\renewcommand*{\BRgospel}{}%
\renewcommand*{\BRepistletothe}{}%
\renewcommand*{\BRepistleto}{}%
\renewcommand*{\BRepistleof}{}%
\renewcommand*{\BRbkchsep}{ }
\renewcommand*{\BRchvsep}{:}%
\renewcommand*{\BRchsep}{; }%
\renewcommand*{\BRvrsep}{--}%
\renewcommand*{\BRvsep}{,}%
\renewcommand*{\BRperiod}{}%
}
%    \end{macrocode}
% Anglo-Saxon style.
%    \begin{macrocode}
\newcommand{\brs@anglosaxon}{%
\braltabbrvname
\renewcommand*{\BRbooknumberstyle}[1]{\MakeUppercase{\romannumeral##1} }%
\renewcommand*{\BRepistlenumberstyle}[1]{\MakeUppercase{\romannumeral##1} }%
\renewcommand*{\BRbooktitlestyle}[1]{##1}%
\renewcommand*{\BRchapterstyle}[1]{\MakeUppercase{\romannumeral##1}}%
\renewcommand*{\BRversestyle}[1]{##1}%
\renewcommand*{\BRbookof}{}%
\renewcommand*{\BRgospel}{}%
\renewcommand*{\BRepistletothe}{}%
\renewcommand*{\BRepistleto}{}%
\renewcommand*{\BRepistleof}{}%
\renewcommand*{\BRbkchsep}{ }
\renewcommand*{\BRchvsep}{.}%
\renewcommand*{\BRchsep}{; }%
\renewcommand*{\BRvrsep}{--}%
\renewcommand*{\BRvsep}{,}%
\renewcommand*{\BRperiod}{.}%
}
%    \end{macrocode}
%Journal of Ecclesiastical History
%    \begin{macrocode}
\newcommand{\brs@JEH}{%
\braltabbrvname
\renewcommand*{\BRbooknumberstyle}[1]{##1 }%
\renewcommand*{\BRepistlenumberstyle}[1]{##1 }%
\renewcommand*{\BRbooktitlestyle}[1]{##1}%
\renewcommand*{\BRchapterstyle}[1]{\romannumeral##1}%
\renewcommand*{\BRversestyle}[1]{##1}%
\renewcommand*{\BRbookof}{}%
\renewcommand*{\BRgospel}{}%
\renewcommand*{\BRepistletothe}{}%
\renewcommand*{\BRepistleto}{}%
\renewcommand*{\BRepistleof}{}%
\renewcommand*{\BRbkchsep}{ }
\renewcommand*{\BRchvsep}{. }%
\renewcommand*{\BRchsep}{; }%
\renewcommand*{\BRvrsep}{--}%
\renewcommand*{\BRvsep}{,}%
\renewcommand*{\BRperiod}{.}%
}
%    \end{macrocode}
%Modern Humanities Research Association (MHRA)
%    \begin{macrocode}
\newcommand{\brs@MHRA}{%
\brfullname
\renewcommand*{\BRbooknumberstyle}[1]{\textsc{\romannumeral##1} }%
\renewcommand*{\BRepistlenumberstyle}[1]{\textsc{\romannumeral##1} }%
\renewcommand*{\BRbooktitlestyle}[1]{##1}%
\renewcommand*{\BRchapterstyle}[1]{\romannumeral##1}%
\renewcommand*{\BRversestyle}[1]{##1}%
\renewcommand*{\BRbookof}{}%
\renewcommand*{\BRgospel}{}%
\renewcommand*{\BRepistletothe}{}%
\renewcommand*{\BRepistleto}{}%
\renewcommand*{\BRepistleof}{}%
\renewcommand*{\BRbkchsep}{ }
\renewcommand*{\BRchvsep}{. }%
\renewcommand*{\BRchsep}{; }%
\renewcommand*{\BRvrsep}{--}%
\renewcommand*{\BRvsep}{,}%
\renewcommand*{\BRperiod}{}%
}
%    \end{macrocode}
%Novum Testamentum Graece (Nestle-Aland)
%    \begin{macrocode}
\newcommand{\brs@NTG}{%
\braltabbrvname
\renewcommand*{\BRbooknumberstyle}[1]{##1 }%
\renewcommand*{\BRepistlenumberstyle}[1]{##1 }%
\renewcommand*{\BRbooktitlestyle}[1]{##1}%
\renewcommand*{\BRchapterstyle}[1]{\romannumeral##1}%
\renewcommand*{\BRversestyle}[1]{##1}%
\renewcommand*{\BRbookof}{}%
\renewcommand*{\BRgospel}{}%
\renewcommand*{\BRepistletothe}{}%
\renewcommand*{\BRepistleto}{}%
\renewcommand*{\BRepistleof}{}%
\renewcommand*{\BRbkchsep}{ }
\renewcommand*{\BRchvsep}{,}%
\renewcommand*{\BRchsep}{; }%
\renewcommand*{\BRvrsep}{--}%
\renewcommand*{\BRvsep}{,}%
\renewcommand*{\BRperiod}{}%
}
%    \end{macrocode}
%MLA Style 
%    \begin{macrocode}
\newcommand{\brs@MLA}{%
\braltabbrvname
\renewcommand*{\BRbooknumberstyle}[1]{##1 }%
\renewcommand*{\BRepistlenumberstyle}[1]{##1 }%
\renewcommand*{\BRbooktitlestyle}[1]{##1}%
\renewcommand*{\BRchapterstyle}[1]{\romannumeral##1}%
\renewcommand*{\BRversestyle}[1]{##1}%
\renewcommand*{\BRbookof}{}%
\renewcommand*{\BRgospel}{}%
\renewcommand*{\BRepistletothe}{}%
\renewcommand*{\BRepistleto}{}%
\renewcommand*{\BRepistleof}{}%
\renewcommand*{\BRbkchsep}{\ }
\renewcommand*{\BRchvsep}{.}%
\renewcommand*{\BRchsep}{; }%
\renewcommand*{\BRvrsep}{--}%
\renewcommand*{\BRvsep}{,}%
\renewcommand*{\BRperiod}{.}%
}
%    \end{macrocode}
%Chicago Style 
%    \begin{macrocode}
\newcommand{\brs@chicago}{%
\braltabbrvname
\renewcommand*{\BRbooknumberstyle}[1]{##1 }%
\renewcommand*{\BRepistlenumberstyle}[1]{##1 }%
\renewcommand*{\BRbooktitlestyle}[1]{##1}%
\renewcommand*{\BRchapterstyle}[1]{\romannumeral##1}%
\renewcommand*{\BRversestyle}[1]{##1}%
\renewcommand*{\BRbookof}{}%
\renewcommand*{\BRgospel}{}%
\renewcommand*{\BRepistletothe}{}%
\renewcommand*{\BRepistleto}{}%
\renewcommand*{\BRepistleof}{}%
\renewcommand*{\BRbkchsep}{\ }
\renewcommand*{\BRchvsep}{\,:\,}%
\renewcommand*{\BRchsep}{; }%
\renewcommand*{\BRvrsep}{--}%
\renewcommand*{\BRvsep}{,}%
\renewcommand*{\BRperiod}{.}%
}
%    \end{macrocode}
% Full text citation
%    \begin{macrocode}
\newcommand*{\brs@text}{%
\biblerefstyle{default}%
\renewcommand{\BRbooknumberstyle}[1]{%
\Ordinalstringnum{##1}\ }%
\renewcommand{\BRepistlenumberstyle}[1]{%
\Ordinalstringnum{##1}\ }%
\renewcommand{\BRbookof}{Book of }%
\renewcommand{\BRgospel}{Gospel according to St }%
\renewcommand{\BRepistletothe}{Epistle to the }%
\renewcommand{\BRepistleto}{Epistle to }%
\renewcommand{\BRepistleof}{Epistle of }%
\renewcommand{\BRchapterstyle}[1]{%
chapter \numberstringnum{##1}}%
\renewcommand{\BRbkchsep}{, }%
\renewcommand{\BRchvsep}{ verse }%
\renewcommand{\BRchsep}{, }%
\renewcommand{\BRvrsep}{ to }%
\renewcommand{\BRvsep}{, }%
\renewcommand{\BRversestyle}[1]{\numberstringnum{##1}}%
}
%    \end{macrocode}
% Declare package options
%    \begin{macrocode}
\DeclareOption{default}{\brs@default}
\DeclareOption{jerusalem}{\brs@jerusalem}
\DeclareOption{anglosaxon}{\brs@anglosaxon}
\DeclareOption{JEH}{\brs@JEH}
\DeclareOption{MHRA}{\brs@MHRA}
\DeclareOption{NTG}{\brs@NTG}
\DeclareOption{MLA}{\brs@MLA}
\DeclareOption{chicago}{\brs@chicago}
\DeclareOption{text}{\brs@text}
%    \end{macrocode}
% Process package options
%    \begin{macrocode}
\ProcessOptions
%    \end{macrocode}
% Define \verb|\newbiblerefstyle|. The first argument
% is the name of the style, the second argument indicates
% what to do. (It basically defines a command called
% \verb|\brs@#1| to do \verb|#2|)
%    \begin{macrocode}
\newcommand{\newbiblerefstyle}[2]{%
\@ifundefined{brs@#1}{%
\expandafter\def\csname brs@#1\endcsname{#2}}{%
\PackageError{bibleref}{bible ref style '#1' already
defined}{}}}
%    \end{macrocode}
% \verb|\setbooktitle{|\meta{fullname}|}{|\meta{title}|}|
% redefines the title of book \meta{fullname}. 
%    \begin{macrocode}
\newcommand{\setbooktitle}[2]{%
\@ifundefined{br@#1}{\PackageError{biberef}{Unknown
book `#1'}{}}{%
\expandafter\def\csname br@#1\endcsname{#2}}}
%    \end{macrocode}
% Define \verb|\biblerefstyle|
%    \begin{macrocode}
\newcommand{\biblerefstyle}[1]{%
\@ifundefined{brs@#1}{\PackageError{bibleref}{%
Unknown biblerefstyle '#1'}{}}{\csname brs@#1\endcsname}}
%    \end{macrocode}
% Verses may be supplied as a range. Provide a command
% to detect whether single number or range supplied.
%    \begin{macrocode}
\newcommand{\@br@vrsty}[1]{\@@br@vrsty#1-\@nil\end}

\def\@@br@vrsty#1-#2\end{%
\@do@verses#1,\relax\end
\ifx#2\@nil
\else
\BRvrsep
\@@br@vrsty#2\end%
\fi}

\def\@do@verses#1,#2\end{%
\ifthenelse{\equal{#1}{}}{}{\BRversestyle{#1}}%
\ifx\relax#2%
\else
\BRvsep
\@do@verses#2\end
\fi
}
%    \end{macrocode}
% Define \verb|\bibleverse|. The first argument
% is the book name. It looks for a command called
% \verb|\br@|\meta{name} (defined earlier) where \meta{name} is 
% the book name as specified in the first argument of
% \verb|\bibleverse|. After the book title, it then checks
% to see if there is a bracket \verb|(| immediately following it.
%    \begin{macrocode}
\newcommand{\bibleverse}[1]{%
\@ifundefined{br@#1}{\PackageError{bibleref}{Unknown book '#1'}{%
}}{\BRbooktitlestyle{\csname br@#1\endcsname}}%
\@ifnextchar({\BRbkchsep \@bibleverse}\relax
}
%    \end{macrocode}
% Get the chapter number.
%    \begin{macrocode}
\def\@bibleverse(#1:{%
\ifthenelse{\equal{#1}{}}{}{%
\BRchapterstyle{#1}}%
\@@bibleverse}
%    \end{macrocode}
% Second part of a range spanning chapters.
%    \begin{macrocode}
\def\@bibleverser-(#1:{%
\ifthenelse{\equal{#1}{}}{}{%
\BRchapterstyle{#1}}%
\@@bibleverse}
%    \end{macrocode}
% Get the verse number (or number range), and check to see
% if it is followed by another bracket (indicating another
% chapter, verse pair).
%    \begin{macrocode}
\def\@@bibleverse#1){%
\ifthenelse{\equal{#1}{}}{}{\BRchvsep\@br@vrsty{#1}}%
\@ifnextchar({\BRchsep\@bibleverse}%
{\@ifnextchar-{\BRvrsep\@bibleverser}\relax}}
%    \end{macrocode}
%    \begin{macrocode}
%</bibleref.sty>
%    \end{macrocode}
%    \begin{macrocode}
%<*sample.tex>
%    \end{macrocode}
%\subsection{Sample Document}
%    \begin{macrocode}
\documentclass{ltxdoc}

\usepackage{bibleref}

\begin{document}
\title{Sample Document}
\author{Nicola Talbot}
\maketitle

Long citation in text: 
\biblerefstyle{text}
\bibleverse{IICor}(12:15,18,21-32).
Short citation in footnote\footnote{%
\biblerefstyle{chicago}\bibleverse{IICor}(12:15,18,21-32)}.

\section{Default Style}

\biblerefstyle{default}
\noindent
\begin{tabular}{ll}
\verb|\bibleverse{Ex}| & \bibleverse{Ex}\\
\verb|\bibleverse{Exodus}(20:)| & \bibleverse{Exodus}(20:)\\
\verb|\bibleverse{Exod}(20:17)| & \bibleverse{Exod}(20:17)\\
\verb|\bibleverse{IICo}(12:21)| & \bibleverse{IICo}(12:21)\\
\verb|\bibleverse{IICor}(12:21-32)| & \bibleverse{IICor}(12:21-32)\\
\verb|\bibleverse{Ex}(20:17)(21:3)| & \bibleverse{Ex}(20:17)(21:3)\\
\verb|\bibleverse{Ex}(15:)(17:)(20:)| & \bibleverse{Ex}(15:)(17:)(20:)\\
\verb|\bibleverse{Rev}(1:2,5,7-9,11)| & \bibleverse{Rev}(1:2,5,7-9,11)\\
\verb|\bibleverse{IChronicles}(1:3)-(2:7)| &
\bibleverse{IChronicles}(1:3)-(2:7)
\end{tabular}

\section{Jerusalem Style}
This is the style used in the Jerusalem bible.
\biblerefstyle{jerusalem}

\noindent
\begin{tabular}{ll}
\verb|\bibleverse{Ex}| & \bibleverse{Ex}\\
\verb|\bibleverse{Exodus}(20:)| & \bibleverse{Exodus}(20:)\\
\verb|\bibleverse{Exod}(20:17)| & \bibleverse{Exod}(20:17)\\
\verb|\bibleverse{IICo}(12:21)| & \bibleverse{IICo}(12:21)\\
\verb|\bibleverse{IICor}(12:21-32)| & \bibleverse{IICor}(12:21-32)\\
\verb|\bibleverse{Ex}(20:17)(21:3)| & \bibleverse{Ex}(20:17)(21:3)\\
\verb|\bibleverse{Ex}(15:)(17:)(20:)| & \bibleverse{Ex}(15:)(17:)(20:)\\
\verb|\bibleverse{Rev}(1:2,5,7-9,11)| & \bibleverse{Rev}(1:2,5,7-9,11)\\
\verb|\bibleverse{IChronicles}(1:3)-(2:7)| &
\bibleverse{IChronicles}(1:3)-(2:7)
\end{tabular}

\section{Anglo-Saxon Style}

\biblerefstyle{anglosaxon}
\noindent
\begin{tabular}{ll}
\verb|\bibleverse{Ex}| & \bibleverse{Ex}\\
\verb|\bibleverse{Exodus}(20:)| & \bibleverse{Exodus}(20:)\\
\verb|\bibleverse{Exod}(20:17)| & \bibleverse{Exod}(20:17)\\
\verb|\bibleverse{IICo}(12:21)| & \bibleverse{IICo}(12:21)\\
\verb|\bibleverse{IICor}(12:21-32)| & \bibleverse{IICor}(12:21-32)\\
\verb|\bibleverse{Ex}(20:17)(21:3)| & \bibleverse{Ex}(20:17)(21:3)\\
\verb|\bibleverse{Ex}(15:)(17:)(20:)| & \bibleverse{Ex}(15:)(17:)(20:)\\
\verb|\bibleverse{Rev}(1:2,5,7-9,11)| & \bibleverse{Rev}(1:2,5,7-9,11)\\
\verb|\bibleverse{IChronicles}(1:3)-(2:7)| &
\bibleverse{IChronicles}(1:3)-(2:7)
\end{tabular}

\section{Journal of Ecclesiastical History}

\biblerefstyle{JEH}
\noindent
\begin{tabular}{ll}
\verb|\bibleverse{Ex}| & \bibleverse{Ex}\\
\verb|\bibleverse{Exodus}(20:)| & \bibleverse{Exodus}(20:)\\
\verb|\bibleverse{Exod}(20:17)| & \bibleverse{Exod}(20:17)\\
\verb|\bibleverse{IICo}(12:21)| & \bibleverse{IICo}(12:21)\\
\verb|\bibleverse{IICor}(12:21-32)| & \bibleverse{IICor}(12:21-32)\\
\verb|\bibleverse{Ex}(20:17)(21:3)| & \bibleverse{Ex}(20:17)(21:3)\\
\verb|\bibleverse{Ex}(15:)(17:)(20:)| & \bibleverse{Ex}(15:)(17:)(20:)\\
\verb|\bibleverse{Rev}(1:2,5,7-9,11)| & \bibleverse{Rev}(1:2,5,7-9,11)\\
\verb|\bibleverse{IChronicles}(1:3)-(2:7)| &
\bibleverse{IChronicles}(1:3)-(2:7)
\end{tabular}

\section{Modern Humanities Research Association}

\biblerefstyle{MHRA}
\noindent
\begin{tabular}{ll}
\verb|\bibleverse{Ex}| & \bibleverse{Ex}\\
\verb|\bibleverse{Exodus}(20:)| & \bibleverse{Exodus}(20:)\\
\verb|\bibleverse{Exod}(20:17)| & \bibleverse{Exod}(20:17)\\
\verb|\bibleverse{IICo}(12:21)| & \bibleverse{IICo}(12:21)\\
\verb|\bibleverse{IICor}(12:21-32)| & \bibleverse{IICor}(12:21-32)\\
\verb|\bibleverse{Ex}(20:17)(21:3)| & \bibleverse{Ex}(20:17)(21:3)\\
\verb|\bibleverse{Ex}(15:)(17:)(20:)| & \bibleverse{Ex}(15:)(17:)(20:)\\
\verb|\bibleverse{Rev}(1:2,5,7-9,11)| & \bibleverse{Rev}(1:2,5,7-9,11)\\
\verb|\bibleverse{IChronicles}(1:3)-(2:7)| &
\bibleverse{IChronicles}(1:3)-(2:7)
\end{tabular}

\section{Novum Testamentum Graece (Nestle-Aland)}

\biblerefstyle{NTG}
\noindent
\begin{tabular}{ll}
\verb|\bibleverse{Ex}| & \bibleverse{Ex}\\
\verb|\bibleverse{Exodus}(20:)| & \bibleverse{Exodus}(20:)\\
\verb|\bibleverse{Exod}(20:17)| & \bibleverse{Exod}(20:17)\\
\verb|\bibleverse{IICo}(12:21)| & \bibleverse{IICo}(12:21)\\
\verb|\bibleverse{IICor}(12:21-32)| & \bibleverse{IICor}(12:21-32)\\
\verb|\bibleverse{Ex}(20:17)(21:3)| & \bibleverse{Ex}(20:17)(21:3)\\
\verb|\bibleverse{Ex}(15:)(17:)(20:)| & \bibleverse{Ex}(15:)(17:)(20:)\\
\verb|\bibleverse{Rev}(1:2,5,7-9,11)| & \bibleverse{Rev}(1:2,5,7-9,11)\\
\verb|\bibleverse{IChronicles}(1:3)-(2:7)| &
\bibleverse{IChronicles}(1:3)-(2:7)
\end{tabular}

\section{MLA Style}

\biblerefstyle{MLA}
\noindent
\begin{tabular}{ll}
\verb|\bibleverse{Ex}| & \bibleverse{Ex}\\
\verb|\bibleverse{Exodus}(20:)| & \bibleverse{Exodus}(20:)\\
\verb|\bibleverse{Exod}(20:17)| & \bibleverse{Exod}(20:17)\\
\verb|\bibleverse{IICo}(12:21)| & \bibleverse{IICo}(12:21)\\
\verb|\bibleverse{IICor}(12:21-32)| & \bibleverse{IICor}(12:21-32)\\
\verb|\bibleverse{Ex}(20:17)(21:3)| & \bibleverse{Ex}(20:17)(21:3)\\
\verb|\bibleverse{Ex}(15:)(17:)(20:)| & \bibleverse{Ex}(15:)(17:)(20:)\\
\verb|\bibleverse{Rev}(1:2,5,7-9,11)| & \bibleverse{Rev}(1:2,5,7-9,11)\\
\verb|\bibleverse{IChronicles}(1:3)-(2:7)| &
\bibleverse{IChronicles}(1:3)-(2:7)
\end{tabular}

\section{Chicago Style}

\biblerefstyle{chicago}
\noindent
\begin{tabular}{ll}
\verb|\bibleverse{Ex}| & \bibleverse{Ex}\\
\verb|\bibleverse{Exodus}(20:)| & \bibleverse{Exodus}(20:)\\
\verb|\bibleverse{Exod}(20:17)| & \bibleverse{Exod}(20:17)\\
\verb|\bibleverse{IICo}(12:21)| & \bibleverse{IICo}(12:21)\\
\verb|\bibleverse{IICor}(12:21-32)| & \bibleverse{IICor}(12:21-32)\\
\verb|\bibleverse{Ex}(20:17)(21:3)| & \bibleverse{Ex}(20:17)(21:3)\\
\verb|\bibleverse{Ex}(15:)(17:)(20:)| & \bibleverse{Ex}(15:)(17:)(20:)\\
\verb|\bibleverse{Rev}(1:2,5,7-9,11)| & \bibleverse{Rev}(1:2,5,7-9,11)\\
\verb|\bibleverse{IChronicles}(1:3)-(2:7)| &
\bibleverse{IChronicles}(1:3)-(2:7)
\end{tabular}

\section{Text Style}
This style prints the citation out in full. It's based
on `default', and uses the fmtcount package to convert
the numbers into words.

\biblerefstyle{text}
\raggedright

\begin{itemize}
\item \verb|\bibleverse{Ex}| \bibleverse{Ex}
\item \verb|\bibleverse{Exodus}(20:)| \bibleverse{Exodus}(20:)
\item \verb|\bibleverse{Exod}(20:17)| \bibleverse{Exod}(20:17)
\item \verb|\bibleverse{IICo}(12:21)| \bibleverse{IICo}(12:21)
\item \verb|\bibleverse{IICor}(12:21-32)| \bibleverse{IICor}(12:21-32)
\item \verb|\bibleverse{Ex}(20:17)(21:3)| \bibleverse{Ex}(20:17)(21:3)
\item \verb|\bibleverse{Ex}(15:)(17:)(20:)| \bibleverse{Ex}(15:)(17:)(20:)
\item \verb|\bibleverse{Rev}(1:2,5,7-9,11)| \bibleverse{Rev}(1:2,5,7-9,11)
\item \verb|\bibleverse{IChronicles}(1:3)-(2:7)|
\bibleverse{IChronicles}(1:3)-(2:7)
\end{itemize}

\section{New Style}

This new style is based on the `default' style, but
has verses in lower case Roman numerals, and redefines
``Revelation'' as ``Apocalypse''.

\begin{verbatim}
\newbiblerefstyle{sample}{%
\biblerefstyle{default}%
\renewcommand{\BRversestyle}[1]{\romannumeral##1}%
\setbooktitle{Revelation}{Apocalyse}%
}
\end{verbatim}
\newbiblerefstyle{sample}{%
\biblerefstyle{default}%
\renewcommand{\BRversestyle}[1]{\romannumeral##1}%
\setbooktitle{Revelation}{Apocalyse}%
}

\biblerefstyle{sample}
\noindent
\begin{tabular}{ll}
\verb|\bibleverse{Ex}| & \bibleverse{Ex}\\
\verb|\bibleverse{Exodus}(20:)| & \bibleverse{Exodus}(20:)\\
\verb|\bibleverse{Exod}(20:17)| & \bibleverse{Exod}(20:17)\\
\verb|\bibleverse{IICo}(12:21)| & \bibleverse{IICo}(12:21)\\
\verb|\bibleverse{IICor}(12:21-32)| & \bibleverse{IICor}(12:21-32)\\
\verb|\bibleverse{Ex}(20:17)(21:3)| & \bibleverse{Ex}(20:17)(21:3)\\
\verb|\bibleverse{Ex}(15:)(17:)(20:)| & \bibleverse{Ex}(15:)(17:)(20:)\\
\verb|\bibleverse{Rev}(1:2,5,7-9,11)| & \bibleverse{Rev}(1:2,5,7-9,11)\\
\verb|\bibleverse{IChronicles}(1:3)-(2:7)| &
\bibleverse{IChronicles}(1:3)-(2:7)
\end{tabular}

\end{document}
%    \end{macrocode}
%    \begin{macrocode}
%</sample.tex>
%    \end{macrocode}
%\Finale
\endinput