summaryrefslogtreecommitdiff
path: root/texmf-dist/doc/latex/fetchbibpes/examples/bibpes_alt-star.tex
blob: a3af2d286950bab201574375b4ceb9383a70a38a (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
\documentclass{article}
\usepackage{xcolor}
% useverses=none avoids a warning in the log when there is not value for
% userverses. In this document we define our verses 'by hand' using the
% declareBVs environment.
\usepackage[ignorecfg,useverses=none]{fetchbibpes}[2016/09/21]
\usepackage{fancyvrb}


\providecommand\cs[1]{\texttt{\char`\\#1}}
\let\pkg\texttt
\def\ameta#1{$\langle\textit{\texttt{#1}}\rangle$}

\addtoBibles{NKJV}
\defaultBible{NKJV}

\begin{declareBVs}
\BV(Heb 1:2 NKJV) Heb 1:2 (default version)\null
\BV(Heb 1:3 NKJV Alt) Heb 1:3 (alt version)\null
\BV(Heb 1:4 NKJV Alt) Heb 1:4 (alt version)\null
\BV(Heb 1:5 NKJV) Heb 1:5 (default version)\null
%
\BV(Mat 2:1 NKJV) Mat 2:1\null
\BV(Mat 2:1 NKJV Alt) Mat 2:1 (Alt)\null
\BV(Mat 2:2 NKJV) Mat 2:2\null
\BV(Mat 2:3 NKJV) Mat 2:3\null
\BV(Mat 2:4 NKJV) Mat 2.4\null
\BV(Mat 2:4 NKJV Paul) Mat 2.4 (Paul)\null
\BV(Mat 2:5 NKJV) Mat 2:5\null
\BV(Mat 2:6 NKJV) Mat 2:6\null
\BV(Mat 2:6 NKJV Special) Mat 2:6 (Special)\null
\BV(Mat 2:7 NKJV) Mat 2:7\null
\BV(Mat 2:8 NKJV) Mat 2:8\null
\BV(Mat 2:9 NKJV) Mat 2:9\null
\BV(Mat 2:10 NKJV) Mat 2:10\null
\end{declareBVs}

\begin{document}

\noindent
This is a short file to demonstrate the \texttt{alt} and \texttt{alt*} keys.

\paragraph{The new behavior of \texttt{alt}} The new behavior of the \texttt{alt} key
to typeset the verse with the specified \texttt{alt} key, if the verse is
undefined, typeset that same verse without \texttt{alt} key specified.
\begin{verbatim}
     \fetchverses[alt=Alt]{Heb 1:2-6}
\end{verbatim}
The results of which are seen next.
\begin{quote}
\fetchverses*[alt=Alt]{Heb 1:2-6}
\end{quote}
The previous behavior of \texttt{alt} can be recovered by expanded the command
\cs{useOldAlt},
\begin{verbatim}
     \useOldAlt
     \fetchverses[alt=Alt]{Heb 1:2-6}
\end{verbatim}
The results of which are found next.
\begin{quote}
\useOldAlt
\fetchverses[alt=Alt]{Heb 1:2-6}
\end{quote}
The new behavior for the \texttt{alt} key is available for the \cs{fetchverse} command.
\begin{quote}
\verb!\fetchverse[alt=Alt]{Mat 2:2}!\\[3pt]
\fetchverse[alt=Alt]{Mat 2:2} (Alt not defined for this verse)\\[6pt]
\cs{useOldAlt}\\
\verb!\fetchverse[alt=Alt]{Mat 2:2}!\\[3pt]
\useOldAlt
\fetchverse[alt=Alt]{Mat 2:2}
\end{quote}
The counterpart to \cs{useOldAlt} is \cs{useNewAlt}, which is the default setting.

\paragraph*{The \texttt{alt*} key} With this key, we can pass a comma-delimited list
of `\texttt{alt}' values to consecutive verses.
We now test \verb!alt*={Alt,,,Paul,,Special,,,}!.
\begin{quote}
\verb!\fetchverses[alt*={Alt,,,Paul,,Special,,,}]{Mat 2:1-11}!\\[3pt]
\fetchverses[alt*={Alt,,,Paul,,Special,,,}]{Mat 2:1-11}
\end{quote}
Notice that if we remove the trailing commas,
\begin{quote}
\verb!\fetchverses[alt*={Alt,,,Paul,,Special}]{Mat 2:1-11}!\\[3pt]
\fetchverses[alt*={Alt,,,Paul,,Special}]{Mat 2:1-11}
\end{quote}
we get the same result. Thus, when we reach the end of the \texttt{alt*}
list, the behavior reverts back to normal.

The \cs{useOldAlt} and \cs{useNewAlt} commands are obeyed by \texttt{alt*} key as well.




\end{document}