summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/bibleref/bibleref-manual.tex
blob: abd811656acca3b2e2a3c07469d344c95d4d9dab (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
%%
%% This is file `bibleref-manual.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% bibleref.dtx  (with options: `bibleref-manual.tex,package')
%% 
%%  bibleref.dtx
%%  Copyright 2010 Nicola Talbot
%% 
%%  This work may be distributed and/or modified under the
%%  conditions of the LaTeX Project Public License, either version 1.3
%%  of this license of (at your option) any later version.
%%  The latest version of this license is in
%%    http://www.latex-project.org/lppl.txt
%%  and version 1.3 or later is part of all distributions of LaTeX
%%  version 2005/12/01 or later.
%% 
%%  This work has the LPPL maintenance status `maintained'.
%% 
%%  The Current Maintainer of this work is Nicola Talbot.
%% 
%%  This work consists of the files bibleref.dtx and bibleref.ins and the derived files bibleref.sty, bibleref-manual.tex, sample-multind.tex, sample.tex, bibleref.perl.
%% 
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
\documentclass{nlctdoc}

\usepackage{bibleref}
\usepackage[colorlinks,bookmarks,pdfauthor={Nicola L.C. Talbot},
            hyperindex=false,
            pdftitle={bibleref.sty: a LaTeX package for
            typesetting bible references}]{hyperref}

\usepackage{creatdtx}

\CheckSum{1893}

\begin{document}
\title{bibleref.sty v1.13:
a \LaTeXe\ package for typesetting bible references}
\author{Nicola Talbot\\[10pt]
School of Computing Sciences\\
University of East Anglia\\
Norwich. Norfolk. NR4 7TJ.\\
United Kingdom\\
\url{http://theoval.cmp.uea.ac.uk/~nlct/}}
\date{2010-07-07}

\maketitle
\tableofcontents

\section{Introduction}

The \sty{bibleref} package was designed to provide consistent formatting for referencing
parts of the bible.

\begin{definition}[\DescribeMacro{\bibleverse}]
\cs{bibleverse}\marg{book title}\texttt(\meta{chapter}\texttt{:}\meta{verse(s)}\texttt)
\end{definition}
This command can be used to cite a bible book, chapter or verse
or range of chapters or verses.

The book title, \meta{book title}, may be given either as the
full title (e.g.\ \texttt{Matthew}) or as an abbreviation (e.g.\
\texttt{Mt} or \texttt{Matt}), most standard abbreviations are
recognised.  Books with multiple parts should be preceded by the
book number in uppercase roman numerals. For example, the second
book of Kings should be entered as \verb|\bibleverse{IIKings}|

You may have any number, or zero, sets of parenthesis
\verb|(|\meta{chapter}\texttt{:}\meta{verse(s)}\verb|)|,
indicating the chapter and verse or verses. Verses can be
specified as a comma separated list of individual verses or range
of verses. A range of verses should be written with a single
hyphen, e.g.\ \verb|2-4|. In the typeset output the verses will
be separated with
\begin{definition}[\DescribeMacro{\BRvsep}]
\cs{BRvsep}
\end{definition}
(an en-dash by default.) A chapter may be referenced without a
verse, but the colon must remain, e.g.\ \verb|(12:)| simply
indicates chapter 12.

A range of verses spanning more than one chapter can
be entered as \texttt(\meta{ch}\texttt:\meta{v}\texttt{)-(}\meta
{ch}\texttt:\meta{v}\texttt)

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

The style of the reference can be specified either by
package option or as the argument to the command
\begin{definition}[\DescribeMacro{\biblerefstyle}]
\cs{biblerefstyle}\marg{style}
\end{definition}
Styles are listed in Table~\ref{tab:styles}.

\begin{table}[tbh]
\caption{Bible Citation Styles (can be used as package option or in the argument to
\cs{biblerefstyle})}
\label{tab:styles}
\vspace{10pt}
\begin{center}
\begin{tabular}{lp{0.5\textwidth}}
\bfseries Style & \bfseries Example\\
default & \biblerefstyle{default}\bibleverse{IICor}(12:1-5)\\
jerusalem & \biblerefstyle{jerusalem}\bibleverse{IICor}(12:1-5)\\
anglosaxon & \biblerefstyle{anglosaxon}\bibleverse{IICor}(12:1-5)\\
JEH & \biblerefstyle{JEH}\bibleverse{IICor}(12:1-5)\\
NTG & \biblerefstyle{NTG}\bibleverse{IICor}(12:1-5)\\
MLA & \biblerefstyle{MLA}\bibleverse{IICor}(12:1-5)\\
chicago & \biblerefstyle{chicago}\bibleverse{IICor}(12:1-5)\\
text & \biblerefstyle{text}\bibleverse{IICor}(12:1-5)
\end{tabular}
\end{center}
\end{table}

You can change the name of a book using
\begin{definition}[\DescribeMacro{\setbooktitle}]
\cs{setbooktitle}\marg{name}\marg{new title}
\end{definition}
Note that \meta{name} must be the full name, not the
abbreviated name of the book. For example, to change
Revelation to Apoc, do
\verb|\setbookname{Revelation}{Apoc}|
(\textbf{Note} that you shouldn't do
\verb|\setbookname{Rev}{Apoc}|)

If you want a different title for a book depending on whether it's
in the main body of the document or in the index, you can set the
index version using:
\begin{definition}[\DescribeMacro{\setindexbooktitle}]
\cs{setindexbooktitle}\marg{name}\marg{title}
\end{definition}
In this case, \meta{name} should be the name you'll use in
\cs{ibibleverse}. For example, if you do:
\begin{verbatim}
\setbooktitle{Psalms}{Psalm}
\setindexbooktitle{Psalms}{Psalms}
\end{verbatim}
Then \verb|\ibibleverse{Psalms}(2:)| will print Psalm the
document and Psalms in the index, but \verb|\ibibleverse{Ps}(2:)|
will print Psalms in both the document and the index.

You can add a book using
\begin{definition}[\DescribeMacro{\addbiblebook}]
\cs{addbiblebook}\marg{name}\marg{title}
\end{definition}
For example:
\begin{verbatim}
\addbiblebook{Susanna}{Story of Susanna}
\end{verbatim}

\section{Defining New Styles}

You can define a new style using the command
\begin{definition}[\DescribeMacro{\newbiblerefstyle}]
\cs{newbiblerefstyle}\marg{style-name}\marg{commands}
\end{definition}\noindent
where \meta{commands} are
the commands needed to modify the citation style.

Example:
This new style is based on the \qt{default} style, but
has verses in lower case Roman numerals, and redefines
\qt{Revelation} as \qt{Apocalypse}.
\begin{verbatim}
\newbiblerefstyle{sample}{%
\biblerefstyle{default}%
\renewcommand{\BRversestyle}[1]{\romannumeral##1}%
\setbooktitle{Revelation}{Apocalypse}%
}
\end{verbatim}
Note the use of \verb|##1| instead of \verb|#1|.

\section{Indexing Bible References}

\begin{definition}[\DescribeMacro{\ibibleverse}]
\cs{ibibleverse}\marg{book title}\texttt(\marg{chapter}\texttt{:}\meta{verse(s)}\texttt)
\end{definition}
This does the same as \cs{bibleverse}
but also adds an index entry (provided you have used
\cs{makeindex} in the preamble.) The default page number
format is given by the command
\begin{definition}[\DescribeMacro{\bvidxpgformat}]
\cs{bvidxpgformat}
\end{definition}
This is \texttt{textrm} by default, but can be redefined. To
override the page number format for a particular entry you can
use the optional argument to \cs{ibibleverse}. For example:
\begin{verbatim}
\ibibleverse[textit]{Exodus}
\end{verbatim}
(Note there is no backslash.)

You may need to create your own custom \app{makeindex} style file
as the default uses a comma and space to separate the item from
the page number, which may cause confusion. For example, you
could create a file called \texttt{sample.ist} and write in the
lines:
\begin{verbatim}
delim_0 "\\dotfill "
delim_1 "\\dotfill "
delim_2 "\\dotfill "
\end{verbatim}
See the \app{makeindex} documentation for further details.

\subsection{Separate Scripture Index}

If you want a separate index for bible verses, in addition to
a general index, you can redefine
\begin{definition}[\DescribeMacro{\biblerefindex}]
\cs{biblerefindex}
\end{definition}
This command defaults to \cs{index}, but can be changed to
the appropriate indexing command. For example, suppose you
are using the \sty{multind} package and you want a general
index and a scripture index, you can do something like:
\begin{verbatim}
\documentclass{article}
\usepackage{bibleref}
\usepackage{multind}

\makeindex{scripture}
\makeindex{general}

\renewcommand{\biblerefindex}{\index{scripture}}
\end{verbatim}
In the document, you can use \cs{ibibleverse} as before, and
the scripture index is displayed using
\begin{verbatim}
\printindex{scripture}{Scripture Index}
\end{verbatim}
You will then need to run \app{makeindex} on the file
\texttt{scripture.idx}. See the \sty{multind} documentation
for further details.

\subsection{Changing the Sort Order}

The bible reference entries will be sorted alphabetically by
\app{makeindex}. However you may prefer the entries to be sorted
according to their order in the bible. This can either be done
using \app{xindy} instead of \app{makeindex} and creating your
own custom alphabet (see \app{xindy} manual for details) or you
can use \sty{bibleref}'s mapping command.

\begin{definition}[\DescribeMacro{\biblerefmap}]
\cs{biblerefmap}\marg{label}\marg{new sort key}
\end{definition}
For example, in the preamble:
\begin{verbatim}
\biblerefmap{Genesis}{01}
\biblerefmap{Exodus}{02}
\biblerefmap{Leviticus}{03}
\biblerefmap{Numbers}{04}
\biblerefmap{Deuteronomy}{05}
...
\end{verbatim}
When you run \app{makeindex}, the references will now be sorted
in numerical order.

If you want to subdivide the index into, say, old and new
testament, you can add this to the mapping. For example:
\begin{verbatim}
\biblerefmap{Genesis}{1@Old Testament!01}
\biblerefmap{Exodus}{1@Old Testament!02}
\biblerefmap{Leviticus}{1@Old Testament!03}
\biblerefmap{Numbers}{1@Old Testament!04}
\biblerefmap{Deuteronomy}{1@Old Testament!05}
...
\biblerefmap{Matthew}{2@New Testament!01}
\biblerefmap{Mark}{2@New Testament!02}
...
\end{verbatim}

\section{Acknowledgements}
Many thanks to all the useful comments from comp.text.tex,
especially from Jesse~Billett, Brooks~Moses and Ulrich~M.~Schwarz.

\StopEventually{\phantomsection
\addcontentsline{toc}{section}{Index}
\PrintIndex
}

\end{document}
\endinput
%%
%% End of file `bibleref-manual.tex'.