summaryrefslogtreecommitdiff
path: root/texmf-dist/doc/latex/fetchbibpes/examples/bibpes_tst.tex
blob: 8b906f0dd202f789a8077a95d7d87ffe0c9a41d1 (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
\documentclass{article}
\usepackage{array,calc,fancyvrb}

\usepackage[deffolder=exmpldefs,ignorecfg,
    useverses=verses]{fetchbibpes}

\title{Illustrating the \textsf{fetchbibpes} package}
\author{D. P. Story}
\date{\today}

\addtoBibles{ASV}
\useBookStyle{abbr=long,roman=false}

\addtolength{\marginparwidth}{6pt}
\providecommand\meta[1]{\textsl{\texttt{#1}}}
\def\ameta#1{$\langle\meta{#1}\rangle$}
\providecommand\marg[1]{%
  {\ttfamily\char`\{}\meta{#1}{\ttfamily\char`\}}}
\def\cs#1{{\ttfamily\char`\\#1}}

\begin{document}

\maketitle

\section{The fetch commands}

This package defines two fetching commands, the syntax for these are,
\begin{quote}\ttfamily
   \string\fetchverse[\ameta{opts}]\marg{\meta{book}\symbol{32}\meta{ch}:\meta{vrs}}\\[3pt]
   \string\fetchverses*[\ameta{opts}]\marg{\meta{book}\symbol{32}\meta{ch}:\meta{vrs}} or\\[3pt]
   \string\fetchverses*[\ameta{opts}]\marg{\meta{book}\symbol{32}\meta{ch}:\meta{vrs\ensuremath{{}_1}}-\upshape[\meta{vrs\ensuremath{{}_2}}\upshape]}
\end{quote}
The \texttt{*} parameter is optional, when present the book and verse
references are shown, otherwise they are not.

\verb!\fetchverses*{Gen 1:1-2}! produces ``\fetchverses*{Gen 1:1-2}'' While
\verb!\fetchverses{Gen 1:1-2}! produces ``\fetchverses{Gen 1:1-2}'' Notice in
the first case \texttt{(Gen 1:1-2)} is included with the passage.

With the \ameta{opts} optional arguments, you can typeset the
passage reference in various styles.

There are options for abbreviating the passage reference, as you see below,
different methods are used. An option for capitalizing the passage reference, and formatting
to your heart's desire.

\section{Formatting of passage references}

The default passage reference format was illustrated in the previous section,
we present variations in this section.

\medskip\noindent
\fetchverse[caps,format={\bfseries\sffamily},abbr=none,from*=KJV]{Gen 1:1}

\medskip\noindent
\fetchverse[delims,caps,format={\bfseries\sffamily},abbr=none,transl=(KJV)]{Gen 1:1}

\medskip\noindent
\fetchverse[delims,caps,format={\bfseries\sffamily},abbr=none,from=ISV,transl=(ISV)]{Gen 1:1}

\medskip\noindent
The passage reference may be placed at the end of the passage using the \texttt{citetend}
option. The \cs{priorRefSpc} may be used here to aid placement.
\begin{quote}
\priorRefSpc{\fbFillRght}\afterBookSpc{\ }\fetchverses*[showfirst,citeatend]{Gen 1:1-3}

\priorRefSpc{\fbFitItIn}\afterBookSpc{\nobreak\ }
\fetchverses*[showfirst,citeatend]{Gen 1:1-3}
\end{quote}

\noindent
\verb|\fetchverse[abbr=none,delims={According to }{,},|\\\null
\qquad\verb|enclosewith=\quote]{Gen 1:1}|\\[3pt]
\fetchverse[abbr=none,delims={According to }{,},enclosewith=\quote]{Gen 1:1}

\section{Various abbreviations for books}

\useBookStyle{abbr=none,roman=true}

Here we don't use an abbreviation (full book names are used) and we use
roman numerals for the book number. (I Corinthians versus 1 Corinthians).

\medskip\noindent
\fetchverse{1Co 1:1}

\useBookStyle{abbr=short,roman=false}


\medskip\noindent
\fetchverses*[useperiod=false]{1Co 1:1-5}

\begin{itemize}
\item\fetchverse{Gen 1:11} (This verse is undefined, if you want to
    reference it you need to included it in one of the \textsf{DEF} files.)

\item \fetchverse{Gen 1:10}

\item \fetchverse[from*=ISV]{Gen 1:10}
\end{itemize}

\section{Special formatting a long passage}

%\newcommand{\verseFmt}[1]{${}^{\fb@sc{#1}}$}
\newlength\verseBoxLength
\settowidth{\verseBoxLength}{\normalsize\normalfont0000}
\renewcommand{\verseFmt}[1]{\par\noindent\makebox[\verseBoxLength][c]{#1}}
\afterRef{\par\kern3pt}

In the next passage, I've changed the formatting style of the multiple
passages, it looks more like my own Bible given to me back in the 1980's.

\begin{quote}
\fetchverses*[showfirst,delims,caps,format={\bfseries\sffamily},abbr=none]{Gen 1:1-10}
\end{quote}

\medskip\noindent Now we switch back to the default presentation style
by expanding the command pair \verb|\afterRef{}\verseFmtReset|, needed only if a change
in format occurred outside a group.

\afterRef{}\verseFmtReset

\begin{quote}
\fetchverses*[abbr=none]{Gen 1:2-3}
\end{quote}

\noindent
\fetchverse{Mat 2:1}

\begin{quote}
\fetchverses*[abbr=none]{Mat 2:1-6}
\end{quote}

\noindent
In this next passage, \texttt{KJV+} is used, which includes \textsl{Strong's
Concordance} numbers.\\[3pt]
\fetchverses*[useperiod=false,abbr=short,from*=KJV+]{Rom 1:1}


\paragraph*{Period or no Period.} When an abbreviation is used, you can include
or exclude the period (1 Co. versus 1 Co).
\begin{quote}
\verb|\fetchverse[abbr=long]{1Co 1:1}|\\[3pt]
\fetchverse[abbr=long]{1Co 1:1}

\verb|\fetchverse[abbr=long,useperiod=false]{1Co 1:1}|\\[3pt]
\fetchverse[abbr=long,useperiod=false]{1Co 1:1}
\end{quote}

\section{Side-by-side comparison of passages}

\newlength\fvlength
\begin{flushleft}
\footnotesize \tabcolsep=3pt %.5\columnsep
\setlength{\fvlength}{.5\linewidth-\tabcolsep}
\renewcommand{\verseFmt}[1]{\par\noindent\makebox[\verseBoxLength][c]{{#1}}}%
\settowidth{\verseBoxLength}{000}%\medskip\noindent
\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}>{\footnotesize}p{\fvlength}>{\footnotesize}p{\fvlength}@{}}
\multicolumn{2}{@{}>{\normalsize}c@{}}{\textbf{\textsf{I Kings 1:1-5}:} A Comparison of Versions}\\[3pt]
\multicolumn{1}{@{}>{\small}c@{}}{King James Version (KJV)}&%
\multicolumn{1}{@{}>{\small}c@{}}{International Standard Version (ISV)}\\[3pt]
\fetchverses[showfirst]{1Ki 1:1}&\fetchverses[showfirst,from=ISV]{1Ki 1:1}\\
\fetchverses[showfirst]{1Ki 1:2}&\fetchverses[showfirst,from=ISV]{1Ki 1:2}\\
\fetchverses[showfirst]{1Ki 1:3}&\fetchverses[showfirst,from=ISV]{1Ki 1:3}\\
\fetchverses[showfirst]{1Ki 1:4}&\fetchverses[showfirst,from=ISV]{1Ki 1:4}\\
\fetchverses[showfirst]{1Ki 1:5}&\fetchverses[showfirst,from=ISV]{1Ki 1:5}%
\end{tabular*}
\end{flushleft}

\verseFmtReset

\section{Roman versus arabic numbers}

\begin{itemize}
      \item \fetchverse{1Co 1:1}
      \item \fetchverse[roman]{1Co 1:1}
\end{itemize}

\section{Adding Bibles}

The next example uses \verb~\addtoBibles{ASV}~ in the preamble. The
\textsf{fetchbibpes} package only recognizes three Bible translations, KJV,
KJV+, and ISV, as values of the \texttt{from} or \texttt{from*} key. If you
reference a Bible other than these three, the KJV is used and a warning
appears in the {\TeX} log. However, you can add to the selection of Bibles
with the \texttt{\string\addtoBibles} command in the preamble. I downloaded
the American Standard Version (ASV), copied the first ten verses from
Genesis, and created the \texttt{Gen-ASV.def} file. After placing
\verb~\addtoBibles{ASV}~ in the preamble, I can fetch the verses in the usual
way: \verb!\fetchverses*[from*=ASV]{Gen 1:1-10}!, as seen below with the
passage reference in the margin.

\useBookStyle{abbr,roman=false}

\def\mpfmt#1{\afterRef{{}}\marginpar{\small\raggedright#1}}

\medskip\noindent
\fetchverses*[showfirst,priorref=\mpfmt,delims,from*=ASV]{Gen 1:1-5}

\section{Marginal  notes}

By ``clever'' manipulation of the parameters, you can make
marginal notes of the verses. We declare,
\begin{Verbatim}[xleftmargin=\leftmargini,fontsize=\small]
\fbMarNotesOn
\verseCmts
{%
    {In the beginning}   % v1
    {Earth void}         % v2
    {Light!}             % v3
    {}                   % v4
    {First day}          % v5
}
\end{Verbatim}
\fbMarNotesOn
\verseCmts
{%
    {In the beginning}   % v1
    {Earth void}         % v2
    {Light!}             % v3
    {}                   % v4
    {First day}          % v5
}
\afterRef{\par\kern3pt}

\noindent
We use the \texttt{fpquote} environment with \texttt{rightmargin=0pt}.
\begin{fpquote}[rightmargin=0pt]\marginparpush0pt
\fetchverses*[showfirst,delims,caps,format={\bfseries\sffamily},abbr=none]{Gen 1:1-5}
\end{fpquote}
\afterRef{}\verseCmts{}\fbMarNotesOff

\medskip\noindent Or, with a little more effort, place passage and reference within the margins.
\fbMarNotesOn
\verseCmts{%
    {In the beginning God creates the heaven and the earth\dots}
    {Earth void}
    {Light!}
    {}
    {First day}
}
\newlength\fbrightmargin \fbrightmargin=80pt
\newlength\vrseNumlength
\settowidth\vrseNumlength{\verseFmt{0}}
\renewcommand{\fbMarParFmt}[1]{\marginpar{\footnotesize
    \makebox[0pt][r]{\verseFmt{\vrseNum}%
    \parbox[t]{\fbrightmargin}{\raggedright\strut#1\strut}%
    \hspace{\marginparsep}}\hfill}}
\afterRef{\par\kern3pt}
\begin{fpquote}[leftmargin=0pt,rightmargin=\marginparsep+\fbrightmargin+\vrseNumlength]
\marginparpush0pt
\fetchverses*[showfirst,delims,caps,format={\bfseries\sffamily},abbr=none]{Gen 1:1-5}
\end{fpquote}
\fbResetMarParFmt\verseCmts{}\afterRef{}\fbMarNotesOff


%\newpage
\noindent
We now test the inverse lookup of the full book names (e.g., Genesis $\rightarrow$ Gen)

\medskip\noindent\verb~\fetchverse{Genesis 1:1}~\\
\fetchverse{Genesis 1:1}

\medskip\noindent\verb~\fetchverses{Genesis 1:1-4}~\\
\fetchverses{Genesis 1:1-4}

\medskip\noindent\verb~\fetchverses{ICorinthians 1:1-3}~\\
\fetchverses{ICorinthians 1:1-3}

\end{document}