summaryrefslogtreecommitdiff
path: root/texmf-dist/doc/latex/fetchbibpes/examples/bibpes_substr.tex
blob: 500f0d0660a3bd76f1f8c2027842a0a340e46f7d (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
\documentclass{article}
\usepackage[useverses=none,fetchsubstr]{fetchbibpes}
\usepackage{fancyvrb}

\addtoBibles{NKJV}
\defaultBible{NKJV}

\def\cs#1{\texttt{\char`\\#1}}

%\parindent0pt \parskip6pt

\begin{document}

\begin{declareBVs*}
\BV(Mat 6:31 NKJV) ``Therefore do not worry, saying, `What shall we eat?'
    or `What shall we drink?' or `What shall we wear?'\null
\BV(Mat 6:32 NKJV) For after all these things the Gentiles seek.
    For your heavenly Father knows that you need all these things.\null
\BV(Mat 6:33 NKJV) But seek first the kingdom of God and His righteousness,
    and all these things shall be added to you.\null
\end{declareBVs*}

\noindent We use the following verses:
\begin{Verbatim}[fontsize=\small]
\begin{declareBVs*}
\BV(Mat 6:31 NKJV) ``Therefore do not worry, saying, `What shall we eat?'
    or `What shall we drink?' or `What shall we wear?'\null
\BV(Mat 6:32 NKJV) For after all these things the Gentiles seek.
    For your heavenly Father knows that you need all these things.\null
\BV(Mat 6:33 NKJV) But seek first the kingdom of God and His
    righteousness, and all these things shall be added to you.\null
\end{declareBVs*}
\end{Verbatim}

\parindent0pt \parskip6pt

\textbf{Important Note:} The command \cs{markverse} only supports
\emph{one verse at a time}, not a range of verses.

\textbf{Declare:} \verb!\markverse[name=don,marks={}{seek.}{}{drink}!,\\
\null\qquad\qquad\verb!{C}{D}{For your}{things.}]{Mat 6:32}!

Above, we include some bogus marks (\verb~{}{drink}~ and \verb~{C}{D}~), ones
that are not found. The package works hard to identify marks that do not
exist, and to recover correctly. The pairs of marks \verb~{}{drink}~ and
\verb~{C}{D}~ are still indexed, the results are seen in \texttt{alt=don2}
and \texttt{alt=don3}.

\markverse[name=don,marks={}{seek.}{}{drink}{C}{D}{For your}{things.}]{Mat 6:32} %{}{drink?'}{C}{D}{For your}{things.}

\fetchverse[alt=don1]{Mat 6:32}

\fetchverse[alt=don2]{Mat 6:32}

\fetchverse[alt=don3]{Mat 6:32}

\fetchverse[alt=don4]{Mat 6:32}

\textbf{Declare:} \verb~\markverse[name=tom,~\\
\null\qquad\qquad\qquad\verb~marks={}{eat?'}{}{drink?'}{}{wear?'}]{Mat 6:31}~
\markverse[name=tom,marks={}{eat?'}{}{drink?'}{}{wear?'}]{Mat 6:31}

The package writes to the hard drive and inputs the definitions back in at
the top of the file. The auxiliary file is \cs{jobname-bv.cut}
(\texttt{\jobname-bv.cut} for this particular file). In this way, you can
inspect the file to see if the substrings are correct. The
\texttt{\jobname-bv.cut} contains \cs{BV} definitions; consequently, the
\cs{fetchverse} or \cs{fetchverses} commands can be used to access the
substrings.

With \cs{fetchverse} or \cs{fetchverses} use the \texttt{alt} key to access
any of the defined substrings:

\verb~\fetchverses[from=NKJV,alt=tom1]{Mat 6:31}~\\[3pt]
\fetchverses[from=NKJV,alt=tom1]{Mat 6:31}

Since NKJV is the default, the use of the \texttt{from} key is not needed.

You can use the key-values of \cs{fetchverses} to add in stuff at the
beginning and end of the passage.

\verb~\fetchverse[nocite,enclosewith={Begin-}{-End},alt=tom2]{Mat 6:31}~\\[3pt]
\fetchverse[nocite,enclosewith={Begin-}{-End},alt=tom2]{Mat 6:31}

\verb~\fetchverse[alt=tom4]{Mat 6:31}~\\[3pt]
\fetchverse[alt=tom4]{Mat 6:31}

This last fetch, for \texttt{alt=tom4}, is undefined, but the new \texttt{alt} convention
then says to typeset the verse `Mat 6:31' without the \texttt{alt} specification. As a
result, we get the whole of verse 31.

If expand \cs{useOldAlt}, we get the old behavior:\\[3pt]\useOldAlt
\fetchverses[alt=tom4]{Mat 6:31}\useNewAlt

That's all for now. dps


\end{document}