summaryrefslogtreecommitdiff
path: root/texmf-dist
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2018-07-13 15:20:46 +0900
committerNorbert Preining <norbert@preining.info>2018-07-13 15:20:46 +0900
commita8e1dbbc5410c8bb80c7b3ded8886fd0afd2798f (patch)
tree88622a7561c69082b7e0d06781ece95e672898a2 /texmf-dist
parent76eb9588061cfcb4ef4d5c3688f769acb6a99d8f (diff)
update fetchbibpes
Diffstat (limited to 'texmf-dist')
-rw-r--r--texmf-dist/doc/latex/fetchbibpes/README.md15
-rw-r--r--texmf-dist/doc/latex/fetchbibpes/examples/bibpes_tst.pdfbin0 -> 209610 bytes
-rw-r--r--texmf-dist/doc/latex/fetchbibpes/examples/fetchversestxt.tex119
-rw-r--r--texmf-dist/doc/latex/fetchbibpes/fetchbibpes.pdfbin0 -> 233867 bytes
-rw-r--r--texmf-dist/doc/latex/fetchbibpes/fetchbibpes_man.pdfbin885219 -> 643826 bytes
-rw-r--r--texmf-dist/doc/latex/fetchbibpes/fetchbibpes_man.tex115
-rw-r--r--texmf-dist/source/latex/fetchbibpes/fetchbibpes.dtx272
-rw-r--r--texmf-dist/source/latex/fetchbibpes/fetchbibpes.ins2
-rw-r--r--texmf-dist/tex/latex/fetchbibpes/fetchbibpes.sty206
9 files changed, 570 insertions, 159 deletions
diff --git a/texmf-dist/doc/latex/fetchbibpes/README.md b/texmf-dist/doc/latex/fetchbibpes/README.md
index 41464cef..c2ea1f90 100644
--- a/texmf-dist/doc/latex/fetchbibpes/README.md
+++ b/texmf-dist/doc/latex/fetchbibpes/README.md
@@ -1,6 +1,6 @@
The fetchbibpes Bundle
Author: D. P. Story
-Dated: 2018/03/21
+Dated: 2018/07/12
This bundle provides two packages, bibpes and fetchbibpes. This pair of
packages was motivated by a friend, who was preparing Bible studies lessons
@@ -23,9 +23,16 @@ LaTeX. He wanted a `database' of Bible packages from which he could simply
Unpack the distribution by latexing fetchbibpes.ins.
-What's new (2018/03/21): Implemented open ended ranges, for example,
- \fetchverses{Joh 3:27-} fetches all passages from John, chapter 3, starting
- with verse 27 until the end of the chapter.
+What's new (2018/07/12) Defined a new command \fetchversestxt; the command
+has the same arguments as \fetchverses, but it does not expand to typeset
+content. Rather, it defines two commands \versetxt and \passagetxt. These two
+are the passage reference and the passage for that verse but with all \LaTeX
+styling and font changes.
+
+What's new (2018/03/21): Implemented open ended ranges, for example,
+\fetchverses{Joh 3:27-} fetches all passages from John, chapter 3, starting
+with verse 27 until the end of the chapter.
+
What's new (2016/09/24): Changed behavior of the alt key. Added an alt* key.
diff --git a/texmf-dist/doc/latex/fetchbibpes/examples/bibpes_tst.pdf b/texmf-dist/doc/latex/fetchbibpes/examples/bibpes_tst.pdf
new file mode 100644
index 00000000..8a63154d
--- /dev/null
+++ b/texmf-dist/doc/latex/fetchbibpes/examples/bibpes_tst.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/fetchbibpes/examples/fetchversestxt.tex b/texmf-dist/doc/latex/fetchbibpes/examples/fetchversestxt.tex
new file mode 100644
index 00000000..ce99f0b3
--- /dev/null
+++ b/texmf-dist/doc/latex/fetchbibpes/examples/fetchversestxt.tex
@@ -0,0 +1,119 @@
+\documentclass{article}
+\usepackage{pdfcomment}
+\usepackage[%
+ useverses=none
+% useverses=verses
+]{fetchbibpes}
+
+\def\cs#1{\texttt{\char`\\#1}}
+\let\pkg\textsf
+\let\env\texttt
+
+\addtoBibles{YLT,ISV}
+
+
+\title{Highlighting the \texorpdfstring{\protect
+ \cs{fetchversestxt}}{\textbackslash{fetchversestxt}} command}
+\author{D. P. Story}
+
+\reversemarginpar
+
+\begin{declareBVs}
+\BV(1Co 1:1 KJV) Paul, called to be an apostle of Jesus Christ through the will of God, and Sosthenes our brother,\null
+\BV(1Co 1:2 KJV) Unto the church of God which is at Corinth, to them that are sanctified in Christ Jesus, called to be saints, with all that in every place call upon the name of Jesus Christ our Lord, both theirs and ours:\null
+\BV(1Co 1:3 KJV) Grace be unto you, and peace, from God our Father, and from the Lord Jesus Christ.\null
+\BV(1Co 1:4 KJV) I thank my God always on your behalf, for the grace of God which is given you by Jesus Christ;\null
+\BV(1Co 1:5 KJV) That in every thing ye are enriched by him, in all utterance, and in all knowledge;\null
+%
+\BV(1Ki 1:5 ISV) Meanwhile, about this time Haggith's son Adonijah began to seek a reputation for himself and decided, "I'm going to be king!" So he prepared chariots, cavalry, and 50 soldiers to serve as a security detail to guard him.\null
+%
+\BV(Gen 1:1 YLT) In the beginning of God's preparing the heavens and the earth--\null
+\BV(Gen 1:2 YLT) the earth hath existed waste and void, and darkness is on the face of the deep, and the Spirit of God fluttering on the face of the waters,\null
+\BV(Gen 1:3 YLT) and God saith, `Let light be;' and light is.\null
+\end{declareBVs}
+
+%\parindent0pt \parskip6pt
+
+\begin{document}
+
+\maketitle
+
+The \cs{fetchversestxt} command does not expand to typeset content, rather,
+it defines two commands \cs{versetxt}, which contains the verse reference,
+and \cs{passagetxt}, which contains the passage for that verse. Take as an
+example, \verb~\fetchversestxt[showfirst]{1Co 1:1-2}~\fetchversestxt[showfirst]{1Co 1:1-2}:
+it expands to nothing typeset; however, the command `\cs{versetxt}' expands
+to `\versetxt' and the command `\cs{passagetxt}' expands to `\passagetxt' The
+next expansion of \cs{fetchversestxt} overwrites the \cs{versetxt} and
+\cs{passagetxt} commands. You can use \cs{fetchversestxt} with the usual
+options, any formatting options are ignored (I hope), otherwise, all options
+should work as described in \texttt{fetchbibpes\_man.pdf}.
+
+The application\fetchversestxt[showfirst]{1Co 1:1-}\pdfmargincomment[author={\versetxt}]{\passagetxt}
+my former-friend had in mind was to pass the \cs{passagetxt} command to an
+annotation macro such as \cs{annotpro} (\pkg{annot\_pro} package) or
+\cs{pdfcomment} (\pkg{pdfcomment} package). What you see in the margin is a
+sticky note put there by \cs{pdfmargincomment} from the \pkg{pdfcomment}
+package.
+
+We try this with a different book that has a passage containing an apostrophe
+and single quotes.\fetchversestxt[showfirst,abbr=none,from*=YLT]{Gen
+1:1-3}\pdfmargincomment[author={\versetxt}]{\passagetxt}
+In\eSQ\fetchversestxt[typeset,showfirst,abbr=none,from=YLT,localdefs=\gobbleto{and}{\gobbletoand},
+replace={saith,}{saith, `Let light be;' and\gobbletoand}]{Gen 1:1-3}
+\versetxt\space(YLT), it is written that \textsl{\passagetxt} If you have
+eagle-eyes, you would have noticed the different treatment of the single
+quotes and apostrophe in the passage listed in the sticky note and the one
+that is typeset. In the latter case, the \texttt{typeset} option is used as
+well as some fancy uses of the \texttt{replace} replace option to get the
+naughty single quotes and apostrophes to look right.
+
+The rest of this article discusses the \texttt{typeset} option using\fetchversestxt[abbr=none,from=ISV]{1Ki 1:5}
+\versetxt\space(ISV).\pdfmargincomment[author={\versetxt}]{\passagetxt}
+This passage contains double quotes (\texttt{"}) and apostrophes (\texttt{\char13}).
+
+\medskip\noindent
+\textbf{The \texttt{typeset} option of \cs{fetchversestxt}.} If, for whatever reason, you want
+to typeset the \cs{passagetxt}, as we've done above, you can use the
+\texttt{typeset} option. This will create the same passage (\cs{passagetxt})
+as \cs{fetchverses}.
+
+\medskip\goodbreak\noindent
+\verb~\fetchversestxt[typeset,abbr=none,from*=ISV]{1Ki 1:5}\passagetxt~\\[3pt]
+\bDQ\eSQ\fetchversestxt[typeset,abbr=none,from*=ISV]{1Ki 1:5}\passagetxt
+%\makeatletter\expandafter\@gobble\passagetxt\makeatother
+
+\medskip\noindent
+\verb~\fetchverses[abbr=none,from*=ISV]{1Ki 1:5}~\\[3pt]
+\bDQ\eSQ\fetchverses[abbr=none,from*=ISV]{1Ki 1:5}
+
+\medskip
+This passage has two apostrophes, which make it difficult to deal with
+correctly. We'll use advanced techniques. In the optional argument of both
+commands \cs{fetchversestxt} and \cs{fetchverses}, we use the
+\texttt{replace} option:
+\begin{flushleft}\small
+\quad\verb~replace={decided,}{decided, ``I'm going to be king!'' So\gobbletoSo}~
+\end{flushleft} were we have already declared
+\verb~\gobbleto{So}{\gobbletoSo}~.
+
+\medskip\noindent
+\gobbleto{So}{\gobbletoSo}
+\verb~\fetchversestxt[typeset,abbr=none,from*=ISV,replace=~\\
+\verb~{decided,}{decided, ``I'm going to be king!'' So\gobbletoSo}]~\\
+\verb~{1Ki 1:5}\passagetxt~\\[3pt]
+\bDQ\eSQ\fetchversestxt[replace={decided,}{decided, ``I'm going to be king!'' So\gobbletoSo},typeset,abbr=none,from*=ISV]{1Ki 1:5}\passagetxt
+
+\medskip\noindent
+\verb~\fetchverses[abbr=none,from*=ISV,replace={decided,}~\\
+\verb~{decided, ``I'm going to be king!'' So\gobbletoSo}]{1Ki 1:5}~\\[3pt]
+\bDQ\eSQ\fetchverses[replace={decided,}{decided, ``I'm going to be king!'' So\gobbletoSo},abbr=none,from*=ISV]{1Ki 1:5}
+
+\medskip
+Now for the proof in the pudding. When the \texttt{typeset} option is on,
+both forms yield the same results, but now let's take away the
+\texttt{typeset} option and put the \cs{passagetxt} in a comment
+field.\fetchversestxt[abbr=none,from*=ISV]{1Ki 1:5}
+\pdfmargincomment[author={\versetxt}]{\passagetxt}
+
+\end{document}
diff --git a/texmf-dist/doc/latex/fetchbibpes/fetchbibpes.pdf b/texmf-dist/doc/latex/fetchbibpes/fetchbibpes.pdf
new file mode 100644
index 00000000..6e41480b
--- /dev/null
+++ b/texmf-dist/doc/latex/fetchbibpes/fetchbibpes.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/fetchbibpes/fetchbibpes_man.pdf b/texmf-dist/doc/latex/fetchbibpes/fetchbibpes_man.pdf
index ef82d6ab..2b1f4562 100644
--- a/texmf-dist/doc/latex/fetchbibpes/fetchbibpes_man.pdf
+++ b/texmf-dist/doc/latex/fetchbibpes/fetchbibpes_man.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/fetchbibpes/fetchbibpes_man.tex b/texmf-dist/doc/latex/fetchbibpes/fetchbibpes_man.tex
index f6b93402..8fed63c2 100644
--- a/texmf-dist/doc/latex/fetchbibpes/fetchbibpes_man.tex
+++ b/texmf-dist/doc/latex/fetchbibpes/fetchbibpes_man.tex
@@ -5,19 +5,26 @@
eforms,aebxmp
]{aeb_pro}
\usepackage{graphicx,array,fancyvrb}
+\usepackage{annot-pro}
\usepackage{aeb_mlink}
%\usepackage{myriadpro}
%\usepackage{calibri}
+
\usepackage[altbullet]{lucidbry}
\usepackage[ignorecfg,
useselverses,useverses=docverses,fetchsubtr]{fetchbibpes}
+\usepackage{xbmks}
+\DeclareInitView{layoutmag={navitab:UseOutlines}}
+\xbmksetup{colors={int=red},styles={intbf}}
+
+
\addtoBibles{YLT,ESV,NKJV}
\selectedVersesFrom
{
- {from=YILT,onlyverses={Gen 1:1-2}}
+ {from=YLT,onlyverses={Gen 1:1-2}}
}
\begin{declareBVs}
@@ -39,7 +46,6 @@
\renewcommand{\hproportionwebtitle}{.8}
-
\def\hardspace{{\fontfamily{cmtt}\selectfont\symbol{32}}}
@@ -66,7 +72,7 @@
email={dpstory@acrotex.net},
subject=Documentation for the fetchbibpes and bibpes packages,
talksite={\url{www.acrotex.net}},
- version={2.4.1, 2018/03/21},
+ version={2.4.5, 2018/07/12},
Keywords={LaTeX, e-sword, Bible passages, AcroTeX},
copyrightStatus=True,
copyrightNotice={Copyright (C) \the\year, D. P. Story},
@@ -84,7 +90,7 @@
\chngDocObjectTo{\newDO}{doc}
\begin{docassembly}
-var titleOfManual="The fetchbib Bundle";
+var titleOfManual="The fetchbibpes Bundle";
var manualfilename="Manual_BG_Print_fetchbib.pdf";
var manualtemplate="Manual_BG_Brown.pdf"; // Blue, Green, Brown
var _pathToBlank="C:/Users/Public/Documents/ManualBGs/"+manualtemplate;
@@ -123,6 +129,15 @@ _path=_path.substring(0,pos)+"/"+manualfilename;
\maketitle
+\pdfbookmarkx[1]{Title Page}[action={\Named{FirstPage}}]{TitlePage}
+\pdfbookmarkx[1]{Links to AcroTeX.Net}[action={/S/GoTo/D(undefined)},%
+ color=magenta,style={bf}]{acrotex}
+\belowpdfbookmarkx{http://www.acrotex.net}[action={\URI{http://www.acrotex.net}},%
+ color=magenta,style={bf}]{home}
+\belowpdfbookmarkx{http://blog.acrotex.net}[action={\URI{http://blog.acrotex.net}},%
+ color=magenta,style={bf}]{blog}
+
+
\selectColors{linkColor=black}
\tableofcontents
\selectColors{linkColor=webgreen}
@@ -583,8 +598,8 @@ $$\begin{tabular}{lll|lll}\\
\section{The \texorpdfstring{\protect\pkg{fetchbibpes}}{fetchbibpes} Package}\label{fetch}
- The problem of fetching Bible verses was suggested to me by my friend Tom Price. He plans
- to write Bible lessons, notes and handouts will be prepared using
+ The problem of fetching Bible verses was suggested to me by my friend Tom
+ Price. He plans to write Bible lessons, notes and handouts prepared using
{\LaTeX} and these packages (\textsf{bibpes} and \textsf{fetchbibpes}).
This is a companion package to \textsf{bibpes}. Use the
@@ -621,7 +636,7 @@ $$\begin{tabular}{lll|lll}\\
must all be from the same chapter. The `\texttt{*}' parameter is
optional, when present, the book and verse references are shown,
otherwise they are not. We illustrate with \texttt{Gen\;1:1},
- \texttt{Gen\;1:1-2}, and \texttt{Gen\;1:1-2}.
+ \texttt{Gen\;1:1-}, and \texttt{Gen\;1:1-2}.
When the upper bound of the range is not specified, as in \ding{194}, the passages are displayed
from the starting verse until the \emph{first undefined verse} (with the same chapter number \ameta{ch}).
@@ -738,7 +753,7 @@ It is perhaps always better to use \cs{fetchverses} for single and multiple vers
The \texttt{from} key, only supports values \texttt{KJV},
\texttt{KJV+}, \texttt{ISV}, these are the versions of the Bible are
free versions available from \app{e-Sword} commonly used. When the
- \texttt{from} key is not specified, the default Bible is usef, see
+ \texttt{from} key is not specified, the default Bible is the \cs{defaultBible}, see
\hyperref[s:suppfetch]{Section~\ref*{s:suppfetch}} for more information on setting the default
Bible. Initially, the default Bible is set to \texttt{KJV}; thus,
\verb|\fetchverse{Gen 1:1}| fetches Genesis 1:1 from the \texttt{KJV},
@@ -909,6 +924,9 @@ no characters delimiting the Bible passage.
passage reference, the second after; this results in a phrase that leads
up to the passage itself.
+\handpoint When \texttt{delim} is used with \cs{fetchverses} the star-option must be used, otherwise,
+\texttt{delim} has no effect.
+
\item[\texttt{enclosewith=\ameta{tok\SUB{1}tok\SUB{2}\upshape|\cs{quote}}}] The
\texttt{enclosewith} key takes either a two-token argument or the command
\cs{quote}. The latter is used to enclose the passage in quotation
@@ -921,9 +939,10 @@ no characters delimiting the Bible passage.
\begin{quote}
{\small\verb|\fetchverse[delims={According to }{,},enclosewith=\quote]{Gen 1:1}|}\\[3pt]
\fetchverse[abbr=none,delims={According to }{,},enclosewith=\quote]{Gen 1:1}\\[6pt]
- {\small\verb|\fetchverses[delims={According to }{,},|\\
+ {\small\verb|\fetchverses*[delims={According to }{,},|\\
\hspace*{16pt}\verb|enclosewith={\guillemotleft\space}{ \guillemotright}]{Gen 1:1-2}|}\\[3pt]
- \fetchverses[abbr=none,delims={According to }{,},enclosewith={\guillemotleft\space}{ \guillemotright}]{Gen 1:1-2}
+ \fetchverses*[abbr=none,delims={According to }{,},enclosewith={\guillemotleft\space}{ \guillemotright}
+ ]{Gen 1:1-2}
\end{quote}
The \texttt{enclosewith} key must be used wisely as some passages, depending on the translation,
@@ -1033,7 +1052,8 @@ appear by default}, to make it appear, use \cs{fetchverses*}.
\verb|\fetchverses*[priorref=\mpfmt,delims]{Gen 1:1-2}|\\[3pt]
\fetchverses*[priorref=\mpfmt,delims]{Gen 1:1-2}
\end{quote}
- The definition of \cs{mpfmt} within the quote environment is
+ The definition of \cs{mpfmt} is made prior to the passage (and is not a
+ command defined by the \pkg{fetchbibpes} package).
\begin{verbatim}
\def\mpfmt#1{\afterRef{{}}\marginpar{\small\raggedleft#1}}
\end{verbatim}
@@ -1043,7 +1063,7 @@ The \cs{afterRef} command is described later in this documentation.
the corresponding passage or passages uses {\LaTeX} style quotes, as in
\texttt{\char018\char018God\char129s grace\char129\char129} or \texttt{\char018God\char129s grace\char129}.
Such a situation can occur if you've hand-edited the \EXT{DEF} file that contains the passages of interest.
-In this case you want to use the \texttt{ltxquotes} open key with the \cs{fetchverses} command; for example,
+In this case you want to use the \texttt{ltxquotes} key with the \cs{fetchverses} command; for example,
\begin{quote}
\verb|\fetchverses*[ltxquotes,from*=NKJV]{Mat 8:5-13}|\\[3pt]
\fetchverses*[ltxquotes,from*=NKJV]{Mat 8:5-13}
@@ -1155,7 +1175,7 @@ Prior to the passage, we make two declarations
{, that I might preach Him}{ \ldots\gobbletoblood}
]{Gal 1:15-16}
\end{quote}
-In line~(4) of the verbatim listing above, we fine the text \texttt{who
+In line~(4) of the verbatim listing above, we find the text \texttt{who
separated me from my} (could have been shorter) and replace it by
\texttt{who\cs{gobbletoand}}. The \cs{gobbletoand} command is inserted
just after `\texttt{who}', and will gobble everything that follows it up
@@ -1215,6 +1235,12 @@ parse it correctly.
The above example appears in \texttt{bibpes\_replaces.tex}.
+\item[\texttt{typeset=\ameta{\upshape{true|false}}}] This option is used with \cs{fetchversestxt};
+if \texttt{true} (or if simply \texttt{typeset} is specified), the macros created by
+\cs{fetchversestxt} are intended to be typeset into the document; the default for \cs{fetchversestxt}
+is \texttt{typeset=false} while the default for \cs{fetchverses} is \texttt{typeset=true}. Putting
+\texttt{typeset=false} within the optional argument of \cs{fetchverses} has no effect. Refer to the
+subsection titled \Nameref{fvtxt}.
\end{description}
\paragraph*{Predefined options using a `helper' command.}\label{para:PredefHelper} It can become
@@ -1430,6 +1456,63 @@ the \EXT{DEF} files. Thus, if we type \verb|\usePassage{Gen 1:1 KJV}|, we get,
That is, you get the `raw' passage without any annotations (translation, book, chapter, verse, and so on).
Only one passage (verse) may be retrieved this way.
+\subsubsection{\texorpdfstring{\protect\cs{fetchversestxt}}{\textbackslash{fetchversestxt}}:
+ raw retrieval with options}\label{fvtxt}
+
+\def\myNote{type=text,name=Note,color=webyellow}
+
+
+One user, a former friend, requested something more sophisticated than \cs{usePassage}. He wanted a \cs{fetchverses}-type
+command, but with no typesetting commands embedded, just pure text. He would then pass the text as the argument of another
+command.
+
+\bVerb\takeMeasure{\normalfont{Each of these defines two macros: }\ttfamily\string\versetxt,\,\string\passagetxt}%
+\setlength{\dimen0}{\bxSize}%
+\def\1{\rlap{\hskip\dimen0\relax\ding{192}}}%
+\def\2{\rlap{\hskip\dimen0\relax\ding{193}}}%
+\def\3{\rlap{\hskip\dimen0\relax\ding{194}}}%
+\def\4{\rlap{\hskip\dimen0\relax\ding{195}}}%
+\begin{dCmd}[commandchars=!()]{\bxSize}
+\fetchversestxt[!ameta(opts)]{!ameta(book)(!vissp)!ameta(ch):!ameta(vrs)}
+\fetchversestxt[!ameta(opts)]{!ameta(book)(!vissp)!ameta(ch):!ameta(vrs)-}
+\fetchversestxt[!ameta(opts)]{!ameta(book)(!vissp)!ameta(ch):!ameta(vrs!SUB(1))-!ameta(vrs!SUB(2))}
+!STRUT!normalfont(Each of these defines two macros: )!ttfamily(\versetxt,!,\passagetxt)
+\end{dCmd}
+\eVerb The \cs{fetchversestxt} command does not expand to typeset content,
+rather, it defines two commands \cs{versetxt}, which contains the verse
+reference, and \cs{passagetxt}, which contains the passage for that verse.
+For example, \cs{fetchverses\darg{Gen 1:1-2}}\fetchversestxt{Gen 1:1-2}
+expands to nothing typeset; however, the command `\cs{versetxt}' expands
+to `\versetxt' and the command `\cs{passagetxt}' expands to `\passagetxt' The next
+expansion of \cs{fetchversestxt} overwrites the \cs{versetxt} and
+\cs{passagetxt} commands. You can use \cs{fetchversestxt} with the usual
+options, any formatting options are ignored (I hope), otherwise, all options
+should work as described earlier.
+
+The application\fetchversestxt[showfirst]{Gen 1:1-}\annotpro[presets=\myNote,
+margin,readonly,title={\versetxt},margintext={\hfill\versetxt},margprior=\hfill]{\passagetxt} my former-friend had in mind
+was to pass the \cs{passagetxt} command to an annotation macro such as \cs{annotpro} (\pkg{annot\_pro} package) or
+\cs{pdfcomment} (\pkg{pdfcomment} package). What you see in the margin is \cs{annotpro}.
+\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small]
+The application\fetchversestxt[showfirst]{Gen 1:1-}\annotpro[type=text,
+ name=Note,color=webyellow,margin,readonly,
+ title={\versetxt},margintext={\hfill\versetxt},
+ margprior=\hfill]{\passagetxt}
+my former-friend had in mind ...
+\end{Verbatim}
+Refer to the manual, \texttt{annotpro\_man.pdf} for the particulars of using \cs{annotpro} from the
+\pkg{annot\_pro} package.
+
+\paragraph*{The \texttt{typeset} option.} The optional argument of \cs{fetchversestxt} accepts the
+\texttt{typeset} option. Without the \opt{typeset} option, the expansion of
+\cs{passagetxt} does not contain any {\LaTeX} styling or font changes; if the
+\opt{typeset} option is taken, the \cs{passagetxt} expands to the same
+passage as its non-txt counterpart. The accompanying demonstration file
+\texttt{fetchversestxt.tex} extensively discusses the \opt{typeset} option.
+
+\newtopic\noindent
+The demonstration file for this feature is \texttt{fetchversestxt.tex}.
+
\subsection{Setting various spaces}
\paragraph*{The space prior to the reference for
@@ -1719,7 +1802,7 @@ For example, the following declaration is used in the example below.
{First day} % v5
}
\end{Verbatim}
-Its argument is a series of token (comments enclosed in braces), the first token is the comment
+Its argument is a series of tokens (comments enclosed in braces), the first token is the comment
for verse 1, then verse 2, and so on. All verses must have a comment, even an empty comment.
The marginal notes are placed in the margin using \cs{marginpar}. The formatting for the marginal
@@ -1914,7 +1997,7 @@ Once the passages are declared, they can be retrieved at any point thereafter:
The \env{declareBVs} environment is used in the sample files \texttt{bibpes\_replace.tex},
\texttt{bibpes\_replaces.tex}, and \texttt{bibpes\_red.tex}.
-The \env{declareBVs*} environment is the same as \env{declareBVs*} but does not
+The \env{declareBVs*} environment is the same as \env{declareBVs} but does not
define single and double quote as active characters. Refer to
\hyperref[ProbsQuotes]{Section~\ref*{ProbsQuotes}} for more information on quotation marks.
@@ -2065,7 +2148,7 @@ Contiguous substrings as promised!
In this example, \texttt{from=NKJV} was used in both the \cs{markverse}
and \cs{fetchverse} commands to identify the translation, this is
-required if the passage from from a translation other than the default
+required if the passage comes from a translation other than the default
translation (KJV in this document).
\markverse[name=multihits,marks={`What}{wear?'},from=NKJV]{Mat 6:31}
diff --git a/texmf-dist/source/latex/fetchbibpes/fetchbibpes.dtx b/texmf-dist/source/latex/fetchbibpes/fetchbibpes.dtx
index b62fb12a..980b6e2d 100644
--- a/texmf-dist/source/latex/fetchbibpes/fetchbibpes.dtx
+++ b/texmf-dist/source/latex/fetchbibpes/fetchbibpes.dtx
@@ -16,7 +16,7 @@
%</copyright>
%<package>\NeedsTeXFormat{LaTeX2e}[1997/12/01]
%<package>\ProvidesPackage{fetchbibpes}
-%<package> [2018/03/21 v2.4.1 fetchbibpes: Fetch Bible passages from DEF files (dps)]
+%<package> [2018/07/12 v2.4.5 fetchbibpes: Fetch Bible passages from DEF files (dps)]
%<*driver>
\documentclass{ltxdoc}
\usepackage[colorlinks,hyperindex=false]{hyperref}
@@ -924,7 +924,16 @@
\define@key{fbpes}{localdefs}[]{\def\fbpes@localdefs{#1}}
\let\fbpes@localdefs\@empty
% \end{macrocode}
-%See the demo file \texttt{bibpes\_replaces.tex} for an example.
+%See the demo file \texttt{bibpes\_replaces.tex} for an example.\par\medskip\noindent
+% The\IndexKey{typeset}\space\texttt{typeset} key is used with \cs{fetchversestxt}. If true,
+% we assume the \cs{passagetxt} command is meant to be typeset and, as a result, the normal
+% behavior of \cs{fetchverses} is followed; if false, certain special definitions are activated
+% that allows \cs{passagetxt} to pass to another macro, such as \cs{pdfcomment}. This option is
+% ignored within the optional list of \cs{fetchverses}.
+% \begin{macrocode}
+\define@boolkey{fbpes}{typeset}[true]{}
+\KV@fbpes@typesettrue
+% \end{macrocode}
%\par\medskip\noindent
%This ends the section on the key-values of the \cs{fetchverse} and \cs{fetchverses} commands.
%
@@ -1168,30 +1177,47 @@
\newcommand\fb@qq{\textbf{??}}
\def\fp@getTwo#1#2#3\@nil{\def\fp@FT{{#1}{#2}}\def\fbpes@replace{#3}}%
\def\fp@looptoreplace{%
- \@tempcntb\fp@nReplace\relax
- \let\repl@cep@ssage\@empty
- \protected@edef\fb@passage{\@nameuse{\bib@ver}}%
+ \@tempcntb\fp@nReplace\relax
+ \let\repl@cep@ssage\@empty
+ \protected@edef\fb@passage{\@nameuse{\bib@ver}}%
% \end{macrocode}
% (2016/09/19) Simulate \cs{protected@edef} throughout this loop below.
% \changes{v2.0a}{2016/09/19}{Added protection to the \string\cs{@whilenum} loop.}
% \begin{macrocode}
- \let\@@protect\protect
- \let\protect\@unexpandable@protect
- \let\fbpes@replace@save\fbpes@replace
+ \let\@@protect\protect
+ \let\protect\@unexpandable@protect
+ \let\fbpes@replace@save\fbpes@replace
% \end{macrocode}
% Loop through this passage to replace.
% \begin{macrocode}
- \@whilenum\@tempcntb>\z@\do
- {%
- \expandafter\fp@getTwo\fbpes@replace\@nil
- \protected@edef\fb@@tmp{\noexpand
- \fb@replace*{\fb@passage}}%
- \expandafter\fb@@tmp\fp@FT
- \advance\@tempcntb\m@ne
- }%
- \let\fbpes@replace\fbpes@replace@save
- \set@typeset@protect
- \fb@passage
+ \@whilenum\@tempcntb>\z@\do
+ {%
+ \expandafter\fp@getTwo\fbpes@replace\@nil
+ \protected@edef\fb@@tmp{\noexpand
+ \fb@replace*{\fb@passage}}%
+ \expandafter\fb@@tmp\fp@FT
+ \advance\@tempcntb\m@ne
+ }%
+ \let\fbpes@replace\fbpes@replace@save
+ \set@typeset@protect
+% \end{macrocode}
+% Include verse numbers in the case of \cs{fetchversestxt}.
+% \changes{v2.4.4}{2018/07/11}{Include verse numbers in the case of \string\cs{fetchversestxt}}
+% \begin{macrocode}
+ \if@versetxt
+ \ifKV@fbpes@typeset % dps
+% \set@typeset@protect % dps
+ \protected@edef\x{\noexpand\g@addto@macro\noexpand
+ \passagetxt{\fb@insrtvn\fb@passage}}\x
+% \set@display@protect
+ \else
+ \edef\x{\noexpand\g@addto@macro\noexpand
+ \passagetxt{\fb@insrtvn\fb@passage}}\x
+ \fi
+ \else
+ \fb@insrtvn
+ \fb@passage
+ \fi
}
\newcommand\fetchverse[2][]{\bgroup\setNumStyle
\def\@rgi{#1}\ifx\@rgi\@empty\else\useBookStyle{#1}\fi
@@ -1216,27 +1242,31 @@
\fi
}{%
}%
- \@ifundefined{\bib@ver}{\fb@qq(\bib@ver)\fb@qq}
- {\bgroup
- \fbp@pformat
- \ifx\fbp@pcolor\@empty\else\color{\fbp@pcolor}\fi
- \l@fbp@enclose
+ \@ifundefined{\bib@ver}{\fb@qq(\bib@ver)\fb@qq}{\bgroup
+ \fbp@pformat
+ \ifx\fbp@pcolor\@empty\else\color{\fbp@pcolor}\fi
+ \l@fbp@enclose
% \end{macrocode}
% (2016/09/17) Introduce the \texttt{replace} option here. The option is only implemented
% for \cs{fetchverse}, not \cs{fetchverses}.
% \changes{v2.0}{2016/09/17}{Implement the replace option here}
% \begin{macrocode}
- \ifx\fbpes@replace\@empty\@nameuse{\bib@ver}\else
- \fp@looptoreplace\fi
- \r@fbp@enclose
+ \ifx\fbpes@replace\@empty
+ \@nameuse{\bib@ver}\else
+ \fp@looptoreplace\fi
+ \r@fbp@enclose
\egroup}%
\ifKV@fbpes@citeatend
- \fbp@priorRefSpc{\ifKV@fbpes@nocite\else
- \book@passage\fi}\fi\egroup
+ \fbp@priorRefSpc{\ifKV@fbpes@nocite\else
+ \book@passage\fi}\fi
+ \egroup
}
% \end{macrocode}
+% \begin{macrocode}
+\newif\if@versetxt\@versetxtfalse
+% \end{macrocode}
% \cs{fb@fetchverse} sets the form of the passage reference, the form includes many
-% variables whose vales are determined by the key-values and other formatting commands.
+% variables whose values are determined by the key-values and other formatting commands.
% \begin{macrocode}
\def\fb@fetchverse{%
\ifbookexists
@@ -1253,7 +1283,8 @@
\fi
}
% \end{macrocode}
-% \subsubsection{The \protect\cs{fetchverses} command}
+%
+% \subsubsection{The \protect\cs{fetchverses} and \protect\cs{fetchversestxt} commands}
% \begin{macro}{\fetchverses}
% fetches the verse or verses only, it does not
% typeset the reference (such as `(Mat 2:1)'). The syntax of the argument is as follows:
@@ -1265,19 +1296,34 @@
% the reference, but the \DescribeMacro{\fetchverses*}\cs{fetchverses*} variation does. Thus
% |\fetchverses*{Mat 2:1}| typesets the passage: \fetchverses*{Mat 2:1}
% \changes{v2.1}{2016/09/21}{Extended \string\texttt{replace} to \string\cs{fetchverses}}
+% \par\medskip\noindent
+% The syntax for \cs{fetchverses} and its \texttt*-variation is,
%\begin{quote}\ttfamily
%\cs{fetchverse}[\ameta{opts}]\darg{\ameta{book}{\visispace}\ameta{ch}:\ameta{vrs}}\\[3pt]
%\cs{fetchverses*}[\ameta{opts}]\darg{\ameta{book}{\visispace}\ameta{ch}:\ameta{vrs}} or\\[3pt]
%\cs{fetchverses*}[\ameta{opts}]\darg{\ameta{book}{\visispace}\ameta{ch}:\ameta{vrs\SUB{1}}-\ameta{vrs\SUB{2}}} or\\[3pt]
%\cs{fetchverses*}[\ameta{opts}]\darg{\ameta{book}{\visispace}\ameta{ch}:\ameta{vrs\SUB{1}}-}
%\end{quote}
-%where \cs{ech} indicates that we should pull all verses until the end of the chapter.
+% The last one indicates that we should pull all verses until the end of the chapter, or until we
+% have not more verses defined.
% \begin{macrocode}
\newcommand\fetchverses{\bgroup\setNumStyle
\@ifstar{\let\isitstar\fb@One\fb@fetchversesi}
{\let\isitstar\fb@Zero\fb@fetchversesi}}
% \end{macrocode}
-% We continue. We get the arguments and parse them.
+% \begin{macro}{\fetchversestxt}
+% Retrieve the verse in question, but without formatting of any kind. We return the result
+% in the macros \cs{versetxt} and \cs{passagetxt}; \cs{fetchversestxt} does not have an `\texttt*'
+% option. Its syntax is the same as above, but with no \texttt*-option.
+% \begin{macrocode}
+\newcommand{\fetchversestxt}[2][]{\bgroup
+ \@versetxttrue\KV@fbpes@typesetfalse
+ \global\let\passagetxt\@empty
+ \fetchverses[#1]{#2}\egroup
+}
+% \end{macrocode}
+% \end{macro}
+% We continue \cs{fetchverses} by getting the arguments and parsing them.
% \begin{macrocode}
\newcommand\fb@fetchversesi[2][]{\def\@rgi{#1}\def\passagespec{#2}%
\ifx\@rgi\@empty\else
@@ -1285,6 +1331,24 @@
\ifx\fbpes@alt\@empty\else\PackageWarning{fetchbibpes}
{You have specified both alt* and alt,\MessageBreak
removing the alt key}\fi\fi\fi
+% \end{macrocode}
+% If this is not the \cs{fetchversestxt} command, we are going to typeset
+% results.
+% \begin{macrocode}
+ \if@versetxt\else\KV@fbpes@typesettrue\fi
+ \ifKV@fbpes@typeset\else
+% \end{macrocode}
+% The only way we expand this following code is if \cs{fetchversestxt}
+% is in play, but the \texttt{typeset} option is not taken. Because this is
+% not designed to be typeset, we don't use superscripts.
+% \begin{macrocode}
+ \def\verseFmt##1{##1)\space}\def\fb@bksp{\space}%
+% \end{macrocode}
+% Also, all quotes are literal, no special processing, no active characters.
+% \changes{v2.4.3}{2018/06/27}{A quotes are literal, no special processing}
+% \begin{macrocode}
+ \def\h@ndledq{"}\def\h@ndlesq{'}\def\bH@ndleltxQs{'}%
+ \fi
\let\.\fbp@period\fbpes@localdefs
\fb@getBookAPassage#2\@nil\fb@fetchversesii#2\@nil}
% \end{macrocode}
@@ -1296,52 +1360,81 @@
\else\space\verseFmt{\the\@tempcnta}\fi}
\def\fb@fetchversesii#1 #2\@nil{%
\ifbookexists
- \def\book@passage{\fbp@format\l@fbp@delim\expandafter\fb@fmtBook
- \expandafter{\bib@book}\fb@bksp\bib@passage
- \@nameuse{\passagespec}\fbpes@transl\r@fbp@delim}\else
+ \ifKV@fbpes@typeset % dps
+ \def\book@passage{\fbp@format\l@fbp@delim\expandafter\fb@fmtBook
+ \expandafter{\bib@book}\fb@bksp\bib@passage
+ \@nameuse{\passagespec}\fbpes@transl\r@fbp@delim}%
+% \end{macrocode}
+% When typeset is true, we need to define \cs{versetxt} as well.
+% \changes{v2.4.4}{2018/07/11}{Define \string\cs{versetxt} in all cases.}
+% \begin{macrocode}
+ \xdef\versetxt{\noexpand\fbpes@abbr
+ \@nameuse{bkfmt\bib@book}\fb@bksp\bib@passage
+ \fbpes@transl}%
+ \else
+ \if@versetxt
+ \edef\book@passage{%\fbp@format\l@fbp@delim
+ \noexpand\fbpes@abbr
+ \@nameuse{bkfmt\bib@book}\fb@bksp\bib@passage
+ \fbpes@transl
+ }%
+ \xdef\versetxt{\book@passage}%
+ \fi % \if@versetxt %dps
+ \fi % \ifKV@fbpes@typeset
+ \else % \ifbookexits
\def\book@passage{\l@fbp@delim\fb@qq\bib@book\fb@qq
- \fb@bksp\bib@passage\fbpes@transl\r@fbp@delim}\fi
- \if\isitstar\fb@One\ifKV@fbpes@citeatend\else
- \fbpes@priorref{\book@passage}\@fterRef\fi\fi
+ \fb@bksp\bib@passage\fbpes@transl\r@fbp@delim}%
+% \xdef\versetxt{??(\bib@book)??}%
+ \fi % \ifbookexits
+ \if\isitstar\fb@One
+ \ifKV@fbpes@citeatend\else
+ \fbpes@priorref{%
+ \ifKV@fbpes@typeset\book@passage\fi}\ifKV@fbpes@typeset
+ \@fterRef\fi
+ \fi
+ \fi % dps
\fb@get@chptverse{iftrue}#2\@nil
\@tempcnta\fb@verseEnd\relax
\advance\@tempcnta\@ne
\edef\fb@verseEnd{\the\@tempcnta}%
\@tempcnta\fb@verseStart\relax
- \bgroup\fbp@pformat\ifx\fbp@pcolor\@empty\else\color{\fbp@pcolor}\fi
- \l@fbp@enclose
+ \bgroup
+ \ifKV@fbpes@typeset % dps
+ \fbp@pformat\ifx\fbp@pcolor\@empty\else\color{\fbp@pcolor}\fi
+ \l@fbp@enclose
+ \fi
% \end{macrocode}
% Before entering the loop, we determine if \texttt{alt*} is used.
% \begin{macrocode}
- \ifx\fbpes@altstar\@empty\fbpes@altstarfalse
- \else\fbpes@altstartrue\fi
+ \ifx\fbpes@altstar\@empty\fbpes@altstarfalse
+ \else\fbpes@altstartrue\fi
% \end{macrocode}
% Rework of \cs{fetchverses} to support the \texttt{replace} key.
% \begin{macrocode}
- \@whilenum\@tempcnta<\fb@verseEnd\do{%\fb@insrtvn
+ \@whilenum\@tempcnta<\fb@verseEnd\do{%
% \end{macrocode}
% If the user has specified \texttt{alt*}, then we retrieve the \texttt{alt} value
% from a list of values.
% \begin{macrocode}
- \iffbpes@altstar\fb@getnextalt\fi
- \@fterVerseFmt{\the\@tempcnta}\edef\bib@ver{\bib@book\space
- \bib@chpt:\the\@tempcnta\fbpes@from\fbpes@alt}%
+ \iffbpes@altstar\fb@getnextalt\fi
+ \@fterVerseFmt{\the\@tempcnta}\edef\bib@ver{\bib@book\space
+ \bib@chpt:\the\@tempcnta\fbpes@from\fbpes@alt}%
% \end{macrocode}
% Determine if the \cs{bib@ver} is defined.
% \begin{macrocode}
- \@ifundefined{\bib@ver}{%
+ \@ifundefined{\bib@ver}{%
% \end{macrocode}
% The verse is undefined, try the passage without the \texttt{alt} specification,
% if there is one.
% \begin{macrocode}
- \ifx\fbpes@alt\@empty\else
+ \ifx\fbpes@alt\@empty\else
% \end{macrocode}
% If there is no \texttt{alt} key, this verse is tagged as undefined (??).
% Otherwise, we see if verse is defined without the \texttt{alt} key.
% \begin{macrocode}
- \ifuseoldalt\else
- \edef\bib@ver{\bib@book\space
- \bib@chpt:\the\@tempcnta\fbpes@from}\fi
+ \ifuseoldalt\else
+ \edef\bib@ver{\bib@book\space
+ \bib@chpt:\the\@tempcnta\fbpes@from}\fi
\@ifundefined{\bib@ver}{%
% \end{macrocode}
% The verse is undefined without an \texttt{alt} key. No action taken, the verse
@@ -1371,12 +1464,41 @@
\advance\@tempcnta\m@ne
\immediate\write\@auxout{\string\csarg\string
\gdef{\passagespec}{\the\@tempcnta}}%
- \@tempcnta\fb@verseEnd\else
- \fb@insrtvn\fb@qq(\bib@ver)\fb@qq\fi
- }{\bgroup\fb@insrtvn
+ \@tempcnta\fb@verseEnd
+ \else
+ \ifKV@fbpes@typeset
+ \fb@insrtvn
+ \fb@insrtvn\fb@qq(\bib@ver)\fb@qq
+ \else
+ \edef\x{\noexpand\g@addto@macro\noexpand
+ \passagetxt{\fb@insrtvn ??(\bib@ver)??}}\x
+ \fi
+ \fi
+ }{\bgroup
\ifx\fbpes@replace\@empty
- \@nameuse{\bib@ver}\else
- \fp@looptoreplace\fi
+ \if@versetxt
+% \end{macrocode}
+% When typesetting the result, we first throw everything into the
+% \cs{passagetxt} command, but we want to delay any special processing
+% of apostrophes and quotes until we expand in the light of day. So,
+% we use \cs{protected@edef} here.
+% \begin{macrocode}
+ \ifKV@fbpes@typeset % dps
+ \set@typeset@protect % dps
+ \protected@edef\x{\noexpand\g@addto@macro\noexpand
+ \passagetxt{\fb@insrtvn\@nameuse{\bib@ver}}}\x
+ \set@display@protect
+ \else
+ \edef\x{\noexpand\g@addto@macro\noexpand
+ \passagetxt{\fb@insrtvn\@nameuse{\bib@ver}}}\x
+ \fi
+ \else
+ \fb@insrtvn
+ \@nameuse{\bib@ver}%
+ \fi
+ \else
+ \fp@looptoreplace
+ \fi
\egroup
}\advance\@tempcnta\@ne
% \end{macrocode}
@@ -1385,9 +1507,11 @@
% of gracefully exiting. \cs{fb@@getnextalt} sets \cs{iffound@ltstarstop} to \texttt{true},
% whereas the normal state is \texttt{false}.
% \begin{macrocode}
- \iffound@ltstarstop\let\fbpes@alt\@empty\fi
- }\r@fbp@enclose\egroup
- \ifKV@fbpes@citeatend\fbp@priorRefSpc{\book@passage}\fi
+ \iffound@ltstarstop\let\fbpes@alt\@empty\fi
+ }\ifKV@fbpes@typeset\r@fbp@enclose\fi % dps
+ \egroup
+ \ifKV@fbpes@citeatend
+ \fbp@priorRefSpc{\book@passage}\fi
\egroup
}
% \end{macrocode}
@@ -1679,10 +1803,10 @@
% \changes{v1.7}{2016/04/11}{Advance \string\cs{fp@dqcnt} and \string\cs{fp@sqcnt} globally}
% (2016/04/11) Advance \cs{fp@dqcnt} and \cs{fp@sqcnt} globally
% \begin{macrocode}
-\def\h@ndledq{\ifodd\fp@dqcnt\fp@rqq\else\fp@lqq\fi
- \global\advance\fp@dqcnt\@ne}
+\def\h@ndledq{\ifodd\fp@dqcnt\expandafter\fp@rqq\else
+ \expandafter\fp@lqq\fi\global\advance\fp@dqcnt\@ne}
\def\h@ndlesq{\ifodd\fp@sqcnt\fp@rq\else\fp@lq\fi
- \global\advance\fp@sqcnt\@ne}
+ \global\advance\fp@sqcnt\@ne}
% \end{macrocode}
% \changes{v1.8}{2016/09/14}{Changes in quote handling routines to allow for
% latex markup for quotes.}
@@ -1712,9 +1836,13 @@
% \begin{macrocode}
\def\eH@ndleltxDQ{\fp@rqq\@gobble}
\def\eH@ndleltxSQ{\fp@rq}
+% \end{macrocode}
+% Modified \cs{fp@rq@choice} to expand in mouth
+% \changes{v2.4.3}{2018/06/27}{Modified \string\cs{fp@rq@choice} to expand in mouth}
+% \begin{macrocode}
\def\fp@rq@choice{\ifNotL@TeXQuotes
- \def\fp@next{\h@ndlesq}\else
- \def\fp@next{\eH@ndleltxQs}\fi\fp@next
+ \expandafter\h@ndlesq\else
+ \expandafter\eH@ndleltxQs\fi
}
\begingroup\catcode`\"=\active \catcode`\'=\active \catcode`\`=\active
% \end{macrocode}
@@ -1723,15 +1851,15 @@
% if it is, flow goes to \cs{bH@ndleltxDQ}, otherwise, it goes to
% \cs{bH@ndleltxSQ}. Similarly for right quotes.
% \begin{macrocode}
-\gdef\bQsCont@fp{\ifx\fp@next`\let\fp@next\bH@ndleltxDQ\else
- \let\fp@next\bH@ndleltxSQ\fi\fp@next}
-\gdef\eQsCont@fp{\ifx\fp@next'\let\fp@next\eH@ndleltxDQ\else
- \let\fp@next\eH@ndleltxSQ\fi\fp@next}
+ \gdef\bQsCont@fp{\ifx\fp@next`\expandafter\bH@ndleltxDQ\else
+ \expandafter\bH@ndleltxSQ\fi} % dps
+ \gdef\eQsCont@fp{\ifx\fp@next'\expandafter\eH@ndleltxDQ\else
+ \expandafter\eH@ndleltxSQ\fi} % dps
% \end{macrocode}
% \cs{cvrtdqs} creates active characters and associates commands for handling
% them. It is introduced through the \cs{@AddToVersesList} command.
% \begin{macrocode}
-\gdef\cvrtdqs{%
+ \gdef\cvrtdqs{%
% \end{macrocode}
% Replace \cs{let} by \cs{gdef}, and \cs{protect} each command.
% \changes{v2.1}{2016/09/21}{Replace \string\cs{let} with \string\cs{gdef}, and protect
@@ -1740,7 +1868,7 @@
\expandafter\catcode\fp@lq\"=\active\gdef"{\protect\h@ndledq}%
\expandafter\catcode\fp@lq\'=\active\gdef'{\protect\fp@rq@choice}%
\expandafter\catcode\fp@lq\`=\active\gdef`{\protect\bH@ndleltxQs}%
-}
+ }
\endgroup
% \end{macrocode}
% In the case of unbalanced double quotes, you can force the correct quite to appear
@@ -2461,7 +2589,7 @@
\fi
\fi
\advance\@tempcntb\@ne
- }% \@whilenum
+ }% \@whilenum
\let\fbpes@replace\fbpes@replace@save
\set@typeset@protect
}
diff --git a/texmf-dist/source/latex/fetchbibpes/fetchbibpes.ins b/texmf-dist/source/latex/fetchbibpes/fetchbibpes.ins
index 3eba438c..1a9c12ae 100644
--- a/texmf-dist/source/latex/fetchbibpes/fetchbibpes.ins
+++ b/texmf-dist/source/latex/fetchbibpes/fetchbibpes.ins
@@ -15,7 +15,7 @@
%%
%% --------------- start of docstrip commands ------------------
%%
-\def\filedate{2018/03/21}
+\def\filedate{2018/07/12}
\def\batchfile{fetchbibpes.ins}
\input docstrip
diff --git a/texmf-dist/tex/latex/fetchbibpes/fetchbibpes.sty b/texmf-dist/tex/latex/fetchbibpes/fetchbibpes.sty
index d74afa3d..a17f1167 100644
--- a/texmf-dist/tex/latex/fetchbibpes/fetchbibpes.sty
+++ b/texmf-dist/tex/latex/fetchbibpes/fetchbibpes.sty
@@ -19,7 +19,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}[1997/12/01]
\ProvidesPackage{fetchbibpes}
- [2018/03/21 v2.4.1 fetchbibpes: Fetch Bible passages from DEF files (dps)]
+ [2018/07/12 v2.4.5 fetchbibpes: Fetch Bible passages from DEF files (dps)]
\RequirePackage{xkeyval}
\def\csarg#1#2{\expandafter#1\csname#2\endcsname}
\let\fb@Zero=0 \let\fb@One=1 \let\fb@Two=2
@@ -299,6 +299,8 @@
\let\fbpes@priorref\relax
\define@key{fbpes}{localdefs}[]{\def\fbpes@localdefs{#1}}
\let\fbpes@localdefs\@empty
+\define@boolkey{fbpes}{typeset}[true]{}
+\KV@fbpes@typesettrue
\long\def\priorRefSpc#1{\def\fbp@priorRefSpc{#1}}
\def\fbp@priorRefSpc{\space}
\def\fbFitItIn{\noindent\unskip\nobreak\hfill\penalty100
@@ -371,23 +373,34 @@
\newcommand\fb@qq{\textbf{??}}
\def\fp@getTwo#1#2#3\@nil{\def\fp@FT{{#1}{#2}}\def\fbpes@replace{#3}}%
\def\fp@looptoreplace{%
- \@tempcntb\fp@nReplace\relax
- \let\repl@cep@ssage\@empty
- \protected@edef\fb@passage{\@nameuse{\bib@ver}}%
- \let\@@protect\protect
- \let\protect\@unexpandable@protect
- \let\fbpes@replace@save\fbpes@replace
- \@whilenum\@tempcntb>\z@\do
- {%
- \expandafter\fp@getTwo\fbpes@replace\@nil
- \protected@edef\fb@@tmp{\noexpand
- \fb@replace*{\fb@passage}}%
- \expandafter\fb@@tmp\fp@FT
- \advance\@tempcntb\m@ne
- }%
- \let\fbpes@replace\fbpes@replace@save
- \set@typeset@protect
- \fb@passage
+ \@tempcntb\fp@nReplace\relax
+ \let\repl@cep@ssage\@empty
+ \protected@edef\fb@passage{\@nameuse{\bib@ver}}%
+ \let\@@protect\protect
+ \let\protect\@unexpandable@protect
+ \let\fbpes@replace@save\fbpes@replace
+ \@whilenum\@tempcntb>\z@\do
+ {%
+ \expandafter\fp@getTwo\fbpes@replace\@nil
+ \protected@edef\fb@@tmp{\noexpand
+ \fb@replace*{\fb@passage}}%
+ \expandafter\fb@@tmp\fp@FT
+ \advance\@tempcntb\m@ne
+ }%
+ \let\fbpes@replace\fbpes@replace@save
+ \set@typeset@protect
+ \if@versetxt
+ \ifKV@fbpes@typeset % dps
+ \protected@edef\x{\noexpand\g@addto@macro\noexpand
+ \passagetxt{\fb@insrtvn\fb@passage}}\x
+ \else
+ \edef\x{\noexpand\g@addto@macro\noexpand
+ \passagetxt{\fb@insrtvn\fb@passage}}\x
+ \fi
+ \else
+ \fb@insrtvn
+ \fb@passage
+ \fi
}
\newcommand\fetchverse[2][]{\bgroup\setNumStyle
\def\@rgi{#1}\ifx\@rgi\@empty\else\useBookStyle{#1}\fi
@@ -412,19 +425,21 @@
\fi
}{%
}%
- \@ifundefined{\bib@ver}{\fb@qq(\bib@ver)\fb@qq}
- {\bgroup
- \fbp@pformat
- \ifx\fbp@pcolor\@empty\else\color{\fbp@pcolor}\fi
- \l@fbp@enclose
- \ifx\fbpes@replace\@empty\@nameuse{\bib@ver}\else
- \fp@looptoreplace\fi
- \r@fbp@enclose
+ \@ifundefined{\bib@ver}{\fb@qq(\bib@ver)\fb@qq}{\bgroup
+ \fbp@pformat
+ \ifx\fbp@pcolor\@empty\else\color{\fbp@pcolor}\fi
+ \l@fbp@enclose
+ \ifx\fbpes@replace\@empty
+ \@nameuse{\bib@ver}\else
+ \fp@looptoreplace\fi
+ \r@fbp@enclose
\egroup}%
\ifKV@fbpes@citeatend
- \fbp@priorRefSpc{\ifKV@fbpes@nocite\else
- \book@passage\fi}\fi\egroup
+ \fbp@priorRefSpc{\ifKV@fbpes@nocite\else
+ \book@passage\fi}\fi
+ \egroup
}
+\newif\if@versetxt\@versetxtfalse
\def\fb@fetchverse{%
\ifbookexists
\def\book@passage{\fbp@format\l@fbp@delim\expandafter\fb@fmtBook
@@ -442,12 +457,22 @@
\newcommand\fetchverses{\bgroup\setNumStyle
\@ifstar{\let\isitstar\fb@One\fb@fetchversesi}
{\let\isitstar\fb@Zero\fb@fetchversesi}}
+\newcommand{\fetchversestxt}[2][]{\bgroup
+ \@versetxttrue\KV@fbpes@typesetfalse
+ \global\let\passagetxt\@empty
+ \fetchverses[#1]{#2}\egroup
+}
\newcommand\fb@fetchversesi[2][]{\def\@rgi{#1}\def\passagespec{#2}%
\ifx\@rgi\@empty\else
\useBookStyle{#1}\ifx\fbpes@altstar\@empty\else
\ifx\fbpes@alt\@empty\else\PackageWarning{fetchbibpes}
{You have specified both alt* and alt,\MessageBreak
removing the alt key}\fi\fi\fi
+ \if@versetxt\else\KV@fbpes@typesettrue\fi
+ \ifKV@fbpes@typeset\else
+ \def\verseFmt##1{##1)\space}\def\fb@bksp{\space}%
+ \def\h@ndledq{"}\def\h@ndlesq{'}\def\bH@ndleltxQs{'}%
+ \fi
\let\.\fbp@period\fbpes@localdefs
\fb@getBookAPassage#2\@nil\fb@fetchversesii#2\@nil}
\def\fb@insrtvn{\ifnum\@tempcnta=\fb@verseStart\relax
@@ -455,31 +480,55 @@
\else\space\verseFmt{\the\@tempcnta}\fi}
\def\fb@fetchversesii#1 #2\@nil{%
\ifbookexists
- \def\book@passage{\fbp@format\l@fbp@delim\expandafter\fb@fmtBook
- \expandafter{\bib@book}\fb@bksp\bib@passage
- \@nameuse{\passagespec}\fbpes@transl\r@fbp@delim}\else
+ \ifKV@fbpes@typeset % dps
+ \def\book@passage{\fbp@format\l@fbp@delim\expandafter\fb@fmtBook
+ \expandafter{\bib@book}\fb@bksp\bib@passage
+ \@nameuse{\passagespec}\fbpes@transl\r@fbp@delim}%
+ \xdef\versetxt{\noexpand\fbpes@abbr
+ \@nameuse{bkfmt\bib@book}\fb@bksp\bib@passage
+ \fbpes@transl}%
+ \else
+ \if@versetxt
+ \edef\book@passage{%\fbp@format\l@fbp@delim
+ \noexpand\fbpes@abbr
+ \@nameuse{bkfmt\bib@book}\fb@bksp\bib@passage
+ \fbpes@transl
+ }%
+ \xdef\versetxt{\book@passage}%
+ \fi % \if@versetxt %dps
+ \fi % \ifKV@fbpes@typeset
+ \else % \ifbookexits
\def\book@passage{\l@fbp@delim\fb@qq\bib@book\fb@qq
- \fb@bksp\bib@passage\fbpes@transl\r@fbp@delim}\fi
- \if\isitstar\fb@One\ifKV@fbpes@citeatend\else
- \fbpes@priorref{\book@passage}\@fterRef\fi\fi
+ \fb@bksp\bib@passage\fbpes@transl\r@fbp@delim}%
+ \fi % \ifbookexits
+ \if\isitstar\fb@One
+ \ifKV@fbpes@citeatend\else
+ \fbpes@priorref{%
+ \ifKV@fbpes@typeset\book@passage\fi}\ifKV@fbpes@typeset
+ \@fterRef\fi
+ \fi
+ \fi % dps
\fb@get@chptverse{iftrue}#2\@nil
\@tempcnta\fb@verseEnd\relax
\advance\@tempcnta\@ne
\edef\fb@verseEnd{\the\@tempcnta}%
\@tempcnta\fb@verseStart\relax
- \bgroup\fbp@pformat\ifx\fbp@pcolor\@empty\else\color{\fbp@pcolor}\fi
- \l@fbp@enclose
- \ifx\fbpes@altstar\@empty\fbpes@altstarfalse
- \else\fbpes@altstartrue\fi
- \@whilenum\@tempcnta<\fb@verseEnd\do{%\fb@insrtvn
- \iffbpes@altstar\fb@getnextalt\fi
- \@fterVerseFmt{\the\@tempcnta}\edef\bib@ver{\bib@book\space
- \bib@chpt:\the\@tempcnta\fbpes@from\fbpes@alt}%
- \@ifundefined{\bib@ver}{%
- \ifx\fbpes@alt\@empty\else
- \ifuseoldalt\else
- \edef\bib@ver{\bib@book\space
- \bib@chpt:\the\@tempcnta\fbpes@from}\fi
+ \bgroup
+ \ifKV@fbpes@typeset % dps
+ \fbp@pformat\ifx\fbp@pcolor\@empty\else\color{\fbp@pcolor}\fi
+ \l@fbp@enclose
+ \fi
+ \ifx\fbpes@altstar\@empty\fbpes@altstarfalse
+ \else\fbpes@altstartrue\fi
+ \@whilenum\@tempcnta<\fb@verseEnd\do{%
+ \iffbpes@altstar\fb@getnextalt\fi
+ \@fterVerseFmt{\the\@tempcnta}\edef\bib@ver{\bib@book\space
+ \bib@chpt:\the\@tempcnta\fbpes@from\fbpes@alt}%
+ \@ifundefined{\bib@ver}{%
+ \ifx\fbpes@alt\@empty\else
+ \ifuseoldalt\else
+ \edef\bib@ver{\bib@book\space
+ \bib@chpt:\the\@tempcnta\fbpes@from}\fi
\@ifundefined{\bib@ver}{%
\edef\bib@ver{\bib@book\space
\bib@chpt:\the\@tempcnta\fbpes@from\fbpes@alt}%
@@ -498,17 +547,42 @@
\advance\@tempcnta\m@ne
\immediate\write\@auxout{\string\csarg\string
\gdef{\passagespec}{\the\@tempcnta}}%
- \@tempcnta\fb@verseEnd\else
- \fb@insrtvn\fb@qq(\bib@ver)\fb@qq\fi
- }{\bgroup\fb@insrtvn
+ \@tempcnta\fb@verseEnd
+ \else
+ \ifKV@fbpes@typeset
+ \fb@insrtvn
+ \fb@insrtvn\fb@qq(\bib@ver)\fb@qq
+ \else
+ \edef\x{\noexpand\g@addto@macro\noexpand
+ \passagetxt{\fb@insrtvn ??(\bib@ver)??}}\x
+ \fi
+ \fi
+ }{\bgroup
\ifx\fbpes@replace\@empty
- \@nameuse{\bib@ver}\else
- \fp@looptoreplace\fi
+ \if@versetxt
+ \ifKV@fbpes@typeset % dps
+ \set@typeset@protect % dps
+ \protected@edef\x{\noexpand\g@addto@macro\noexpand
+ \passagetxt{\fb@insrtvn\@nameuse{\bib@ver}}}\x
+ \set@display@protect
+ \else
+ \edef\x{\noexpand\g@addto@macro\noexpand
+ \passagetxt{\fb@insrtvn\@nameuse{\bib@ver}}}\x
+ \fi
+ \else
+ \fb@insrtvn
+ \@nameuse{\bib@ver}%
+ \fi
+ \else
+ \fp@looptoreplace
+ \fi
\egroup
}\advance\@tempcnta\@ne
- \iffound@ltstarstop\let\fbpes@alt\@empty\fi
- }\r@fbp@enclose\egroup
- \ifKV@fbpes@citeatend\fbp@priorRefSpc{\book@passage}\fi
+ \iffound@ltstarstop\let\fbpes@alt\@empty\fi
+ }\ifKV@fbpes@typeset\r@fbp@enclose\fi % dps
+ \egroup
+ \ifKV@fbpes@citeatend
+ \fbp@priorRefSpc{\book@passage}\fi
\egroup
}
\newif\iffound@ltstarstop \found@ltstarstopfalse
@@ -608,10 +682,10 @@
\newcount\fp@dqcnt \fp@dqcnt=0
\newcount\fp@sqcnt \fp@sqcnt=0
\def\fp@lq{`}\def\fp@rq{'}\def\fp@lqq{``}\def\fp@rqq{''}
-\def\h@ndledq{\ifodd\fp@dqcnt\fp@rqq\else\fp@lqq\fi
- \global\advance\fp@dqcnt\@ne}
+\def\h@ndledq{\ifodd\fp@dqcnt\expandafter\fp@rqq\else
+ \expandafter\fp@lqq\fi\global\advance\fp@dqcnt\@ne}
\def\h@ndlesq{\ifodd\fp@sqcnt\fp@rq\else\fp@lq\fi
- \global\advance\fp@sqcnt\@ne}
+ \global\advance\fp@sqcnt\@ne}
\def\bH@ndleltxQs{\futurelet\fp@next\bQsCont@fp}
\def\bH@ndleltxDQ{\fp@lqq\@gobble}
\def\bH@ndleltxSQ{\fp@lq}
@@ -619,19 +693,19 @@
\def\eH@ndleltxDQ{\fp@rqq\@gobble}
\def\eH@ndleltxSQ{\fp@rq}
\def\fp@rq@choice{\ifNotL@TeXQuotes
- \def\fp@next{\h@ndlesq}\else
- \def\fp@next{\eH@ndleltxQs}\fi\fp@next
+ \expandafter\h@ndlesq\else
+ \expandafter\eH@ndleltxQs\fi
}
\begingroup\catcode`\"=\active \catcode`\'=\active \catcode`\`=\active
-\gdef\bQsCont@fp{\ifx\fp@next`\let\fp@next\bH@ndleltxDQ\else
- \let\fp@next\bH@ndleltxSQ\fi\fp@next}
-\gdef\eQsCont@fp{\ifx\fp@next'\let\fp@next\eH@ndleltxDQ\else
- \let\fp@next\eH@ndleltxSQ\fi\fp@next}
-\gdef\cvrtdqs{%
+ \gdef\bQsCont@fp{\ifx\fp@next`\expandafter\bH@ndleltxDQ\else
+ \expandafter\bH@ndleltxSQ\fi} % dps
+ \gdef\eQsCont@fp{\ifx\fp@next'\expandafter\eH@ndleltxDQ\else
+ \expandafter\eH@ndleltxSQ\fi} % dps
+ \gdef\cvrtdqs{%
\expandafter\catcode\fp@lq\"=\active\gdef"{\protect\h@ndledq}%
\expandafter\catcode\fp@lq\'=\active\gdef'{\protect\fp@rq@choice}%
\expandafter\catcode\fp@lq\`=\active\gdef`{\protect\bH@ndleltxQs}%
-}
+ }
\endgroup
\def\bDQ{\global\fp@dqcnt=0 }\def\bSQ{\global\fp@sqcnt=0 }
\def\eDQ{\global\fp@dqcnt=1 }\def\eSQ{\global\fp@sqcnt=1 }