summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/scripture
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-11-03 03:05:14 +0000
committerNorbert Preining <norbert@preining.info>2022-11-03 03:05:14 +0000
commitc3c9975778ff2848e51f6debf733abe8ca930bd3 (patch)
tree034fcccacf40343842462b161df1764d3a7a41af /macros/latex/contrib/scripture
parent2281af8ba8fd52341e706f3979712f3280fcfdad (diff)
CTAN sync 202211030305
Diffstat (limited to 'macros/latex/contrib/scripture')
-rw-r--r--macros/latex/contrib/scripture/scripture.dtx840
-rw-r--r--macros/latex/contrib/scripture/scripture.pdfbin872053 -> 911199 bytes
2 files changed, 661 insertions, 179 deletions
diff --git a/macros/latex/contrib/scripture/scripture.dtx b/macros/latex/contrib/scripture/scripture.dtx
index f298f02a23..7f658465e1 100644
--- a/macros/latex/contrib/scripture/scripture.dtx
+++ b/macros/latex/contrib/scripture/scripture.dtx
@@ -182,10 +182,11 @@
%
% \changes{v1.0}{2022/07/27}{First public release}
% \changes{v1.1}{2022/08/27}{Bug fixes}
+% \changes{v1.2}{2022/11/02}{Bug fixes}
%
% \title{The \pkg{scripture} package}
% \author{David Purton\thanks{Email: \url{dcpurton@marshwiggle.net}}}
-% \date{2022/08/27 v1.1}
+% \date{2022/11/02 v1.2}
%
% \maketitle
%
@@ -241,6 +242,8 @@
% fail and a reference will end up on the following page. Usually a little
% more stretchable space on the page before the incorrect break is enough to
% obtain acceptable output.
+%
+% At least version 2022-06-01 of the \LaTeX\ format is required.
%
% \section{Documentation}
%
@@ -252,7 +255,7 @@
% \begin{scriptureexample}
% \begin{verbatim}
% \begin{scripture}[Isaiah 56:1--2][version=NIVUK]
-% \ch{56}This is what the \textsc{Lord} says:
+% \ch{56}This is what the \name{Lord} says:
% \begin{poetry}
% `Maintain justice
% and do what is right,
@@ -272,7 +275,7 @@
% \tcblower
%
% \begin{scripture}[Isaiah 56:1--2][version=NIVUK]
-% \ch{56}This is what the \textsc{Lord} says:
+% \ch{56}This is what the \name{Lord} says:
% \begin{poetry}
% `Maintain justice
% and do what is right,
@@ -315,7 +318,7 @@
% \begin{scripture}[Exodus 20:1--2]
% \ch{20}And God spoke all these words:
% \begin{hanging}
-% \noindent\vs{2}`I am the \textsc{Lord}
+% \noindent\vs{2}`I am the \name{Lord}
% your God, who brought you out of Egypt,
% out of the land of slavery.
% \end{hanging}
@@ -330,7 +333,7 @@
% \begin{scripture}[Exodus 20:1--2]
% \ch*{20}And God spoke all these words:
% \begin{hanging}
-% \nohang\vs{2}`I am the \textsc{Lord} your
+% \nohang\vs{2}`I am the \name{Lord} your
% God, who brought you out of Egypt, out of
% the land of slavery.
% \end{hanging}
@@ -346,7 +349,7 @@
% \begin{scripture}[Exodus 20:1--2]
% \ch{20}And God spoke all these words:
% \begin{hanging}
-% \noindent\vs{2}`I am the \textsc{Lord}
+% \noindent\vs{2}`I am the \name{Lord}
% your God, who brought you out of Egypt,
% out of the land of slavery.
% \end{hanging}
@@ -361,7 +364,7 @@
% \begin{scripture}[Exodus 20:1--2]
% \ch*{20}And God spoke all these words:
% \begin{hanging}
-% \nohang\vs{2}`I am the \textsc{Lord} your
+% \nohang\vs{2}`I am the \name{Lord} your
% God, who brought you out of Egypt, out of
% the land of slavery.
% \end{hanging}
@@ -401,6 +404,49 @@
% \end{scripture}
% \end{scriptureexample}
%
+% \changes{v1.2}{2022/09/01}{Add divine name feature}
+% \begin{function}[added=2022-09-01]{\name, \LORD, \GOD}
+% \begin{syntax}
+% |\name|\marg{divine name}
+% |\LORD|
+% |\GOD|
+% \end{syntax}
+% Modern Bible translations frequently represent God's personal divine name
+% using a small capitals typeface. This can be done using the \cs{name}
+% function. The font and format can be set using the \opt{name/font} and
+% \opt{name/format} options. The \cs{LORD} and \cs{GOD} macros equivalent to
+% \cs{name}|{Lord}| and \cs{name}|{God}| respectively.
+%
+% \textbf{Note:} Watch out that trailing spaces are not eaten by \cs{LORD}
+% and \cs{GOD}. Using \cs{name} is safer and semantically better.
+% \end{function}
+%
+% \begin{scriptureexample}
+% \begin{verbatim}
+% \begin{scripture}[Genesis 15:1--2][version=ESV]
+% \ch{15}After these things the word of the
+% \name{Lord} came to Abram in a vision: “Fear not,
+% Abram, I am your shield; your reward shall be
+% very great.” \vs{2}But Abram said, “O Lord
+% \name{God}, what will you give me, for I continue
+% childless, and the heir of my house is Eliezer of
+% Damascus?”
+% \end{scripture}
+% \end{verbatim}
+%
+% \tcblower
+%
+% \begin{scripture}[Genesis 15:1--2][version=ESV]
+% \ch{15}After these things the word of the
+% \name{Lord} came to Abram in a vision: “Fear not,
+% Abram, I am your shield; your reward shall be
+% very great.” \vs{2}But Abram said, “O Lord
+% \name{God}, what will you give me, for I continue
+% childless, and the heir of my house is Eliezer of
+% Damascus?”
+% \end{scripture}
+% \end{scriptureexample}
+%
% \begin{function}{\nohang}
% \begin{syntax}
% |\nohang|
@@ -444,6 +490,69 @@
% \end{scripture}
% \end{scriptureexample}
%
+% \changes{v1.2}{2022/08/31}{Add red letter feature}
+% \begin{function}[added=2022-08-31]{\redletteron, \redletteroff}
+% \begin{syntax}
+% |\redletteron|
+% |\redletteroff|
+% \end{syntax}
+% Use \cs{redletteron} and \cs{redletteroff} to mark the beginning and end
+% of sections of text that should be attributed to Jesus speaking. Some
+% attempt is made to ensure that the correct colour continues after an inner
+% environment if \cs{redletteron} or \cs{redletteroff} occurs inside the
+% inner environment. If you experience problems with unexpected colour, try
+% to ensure that matching \cs{redletteron} and \cs{redletteroff} marks occur
+% at the same group level. The colour of the text can be set using the
+% \opt{redletter/colour} option. These commands only have an effect when the
+% \opt{redletter} option is \val{true}.
+% \end{function}
+%
+% \begin{scriptureexample}[lefthand ratio=0.67]
+% \begin{verbatim}
+% \begin{scripture}[Matthew 21:16--17][redletter]
+% \vs{16}`Do you hear what these children are saying?'
+% they asked him.
+%
+% \redletteron `Yes,' \redletteroff replied Jesus,
+% \redletteron ‘have you
+% never read,
+% \begin{poetry}
+% `\thinspace ``From the lips of children and infants
+% you, Lord, have called forth your praise''?'
+% \end{poetry}\redletteroff
+%
+% \vs{17}And he left them and went out of the city to
+% Bethany, where he spent the night.
+% \end{scripture}
+% \end{verbatim}
+%
+% \tcblower
+%
+% \begin{scripture}[Matthew 21:16--17][redletter]
+% \vs{16}`Do you hear what these children are saying?'
+% they asked him.
+%
+% \redletteron `Yes,' \redletteroff replied Jesus,
+% \redletteron ‘have you
+% never read,
+% \begin{poetry}
+% `\thinspace ``From the lips of children and infants
+% you, Lord, have called forth your praise''?'
+% \end{poetry}\redletteroff
+%
+% \vs{17}And he left them and went out of the city to
+% Bethany, where he spent the night.
+% \end{scripture}
+% \end{scriptureexample}
+%
+% \begin{function}{\scripturesetup}
+% \begin{syntax}
+% |\scripturesetup|\marg{options}
+% \end{syntax}
+% Set default format for quotations. See section \ref{options} for
+% supported formatting \meta{|options|}.
+% \end{function}
+%
% \changes{v1.1}{2022/08/07}{Add \cs{scripturecurrentchapter} and
% \cs{scripturecurrentverse} variables}
% \begin{function}[added=2022-08-07]{\scripturecurrentchapter,
@@ -497,6 +606,39 @@
% supported formatting \meta{|options|}.
% \end{function}
%
+% \changes{v1.2}{2022/08/30}{Add \cs{textright} function}
+% \begin{function}[added=2022-08-30]{\textright}
+% \begin{syntax}
+% |\textright|\marg{text}
+% \end{syntax}
+% This function inserts \meta{|text|} at the end of the current line or the
+% end of the following line if there is insufficient room. The
+% \opt{textright/sep} option controls the minimum allowed space before the
+% \meta{|text|} to be right aligned.
+% \end{function}
+%
+% \begin{scriptureexample}
+% \begin{verbatim}
+% \begin{scripture}[Jeremiah 2:29]
+% \begin{poetry}
+% \vs{5}`Why do you bring charges against me?
+% You have all rebelled against me,'
+% \textright{declares the \name{Lord}.}
+% \end{poetry}
+% \end{scripture}
+% \end{verbatim}
+%
+% \tcblower
+%
+% \begin{scripture}[Jeremiah 2:29]
+% \begin{poetry}
+% \vs{5}`Why do you bring charges against me?
+% You have all rebelled against me,'
+% \textright{declares the \name{Lord}.}
+% \end{poetry}
+% \end{scripture}
+% \end{scriptureexample}
+%
% \begin{function}{\vs}
% \begin{syntax}
% |\vs|\marg{verse number}
@@ -564,28 +706,30 @@
%
% \begin{scriptureexample}
% \begin{verbatim}
-% \begin{scripture}[Jeremiah 2:29]
-% \begin{poetry}[belowskip=0pt]
-% \vs{5}`Why do you bring charges against me?
-% You have all rebelled against me,'
+% \begin{scripture}[Isaiah 40:5]
+% \begin{poetry}[belowskip = 0pt]
+% \vs{5}And the glory of the \name{Lord}\ldots
+% and all people will see it together.
% \end{poetry}
%
-% \begin{flushright}[aboveskip=0pt]
-% declares the \textsc{Lord}.
+% \begin{flushright}[aboveskip = 0pt]
+% For the mouth of the \name{Lord} \\
+% has spoken.’
% \end{flushright}
% \end{scripture}
% \end{verbatim}
%
% \tcblower
%
-% \begin{scripture}[Jeremiah 2:29]
-% \begin{poetry}[belowskip=0pt]
-% \vs{5}`Why do you bring charges against me?
-% You have all rebelled against me,'
+% \begin{scripture}[Isaiah 40:5]
+% \begin{poetry}[belowskip = 0pt]
+% \vs{5}And the glory of the \name{Lord}\ldots
+% and all people will see it together.
% \end{poetry}
%
-% \begin{flushright}[aboveskip=0pt]
-% declares the \textsc{Lord}.
+% \begin{flushright}[aboveskip = 0pt]
+% For the mouth of the \name{Lord} \\
+% has spoken.’
% \end{flushright}
% \end{scripture}
% \end{scriptureexample}
@@ -757,7 +901,7 @@
% \begin{scripture}[Isaiah 1:2]
% \begin{poetry}
% \vs{2}Hear me, you heavens! Listen, earth!
-% For the \textsc{Lord} has spoken:
+% For the \name{Lord} has spoken:
%
% `I reared children and brought them up,
% but they have rebelled against me.
@@ -770,7 +914,7 @@
% \begin{scripture}[Isaiah 1:2]
% \begin{poetry}
% \vs{2}Hear me, you heavens! Listen, earth!
-% For the \textsc{Lord} has spoken:
+% For the \name{Lord} has spoken:
%
% `I reared children and brought them up,
% but they have rebelled against me.
@@ -902,94 +1046,40 @@
% \cs{scripturesetup}|{|\meta{|options|}|}|. Local formatting \meta{|options|}
% can be set by passing them to the various environments described above.
%
+% \textbf{Note:} It's not possible to pass non-expandable macros as key-value
+% options to the optional argument of \cs{usepackage}. So if you want to set
+% |font=|\cs{bfseries} as the default, you must use
+% \cs{scripturesetup}|{font=|\cs{bfseries}|}|. It is not possible to use
+% \cs{usepackage}|[font=|\cs{bfseries}|]{scripture}| (you will get a compile
+% error).
+%
% \begin{option}{aboveskip}
% \begin{syntax}
-% |aboveskip =| \meta{skip} \hfill Default: 0pt
+% aboveskip = \meta{skip} \hfill Default: 0pt
% \end{syntax}
% \meta{|skip|} inserted above the \env{scripture} environment.
% \end{option}
%
% \begin{option}{belowskip}
% \begin{syntax}
-% |belowskip =| \meta{skip} \hfill Default: 0pt
+% belowskip = \meta{skip} \hfill Default: 0pt
% \end{syntax}
% \meta{|skip|} inserted below the \env{scripture} environment.
% \end{option}
%
-% \changes{v1.1}{2022/08/15}{Add \opt{compact} option}
-% \begin{option}[added=2022-08-15]{compact}
+% \changes{v1.2}{2022/09/07}{Add \opt{chapter/colour} option}
+% \begin{option}[added=2022-09-07]{chapter/colour, chapter/color}
% \begin{syntax}
-% |compact =| \meta{boolean} \hfill Default: false
+% chapter/colour = \meta{colour expression} \hfill Default: .
% \end{syntax}
-% This option removes all paragraph breaks along with any \cs{extraskip} in
-% the quotation so the whole quotation is a single paragraph of running
-% prose. This option implies \opt{chapter/nodrop} and all options relating
-% to inner environments are ignored.
-%
-% The value of \meta{|boolean|} is optional and assumed to be \val{true} if
-% not present.
-%
-% \textbf{Warning:} This option redefines \cs{par} to \cs{relax} inside the
-% \env{scripture} environment. If you have anything other than expected
-% macros and environments inside your \env{scripture} environment \TeX{}
-% will likely get stuck in an infinite loop.
-% \end{option}
-%
-% \begin{scriptureexample}
-% \begin{verbatim}
-% \begin{scripture}[Jonah 1:17--2:2a][compact]
-% \begin{midparachap}
-% \vs{17}Now the \textsc{Lord} provided a huge
-% fish to swallow Jonah, and Jonah was in the
-% belly of the fish three days and three
-% nights. \ch{2}From inside the fish Jonah
-% prayed to the \textsc{Lord} his God. \vs{2}He
-% said:
-% \end{midparachap}
-% \begin{poetry}
-% `In my distress I called to the Lord,
-% and he answered me.
-% \end{poetry}
-% \end{scripture}
-% \end{verbatim}
-%
-% \tcblower
-%
-% \begin{scripture}[Jonah 1:17--2:2a][compact]
-% \begin{midparachap}
-% \vs{17}Now the \textsc{Lord} provided a huge
-% fish to swallow Jonah, and Jonah was in the
-% belly of the fish three days and three
-% nights. \ch{2}From inside the fish Jonah
-% prayed to the \textsc{Lord} his God. \vs{2}He
-% said:
-% \end{midparachap}
-% \begin{poetry}
-% `In my distress I called to the Lord,
-% and he answered me.
-% \end{poetry}
-% \end{scripture}
-% \end{scriptureexample}
-%
-% \begin{option}{leftmargin}
-% \begin{syntax}
-% |leftmargin =| \meta{dimen} \hfill Default: 0pt
-% \end{syntax}
-% \meta{|dimen|} used for the left margin of the \env{scripture}
-% environment.
-% \end{option}
-%
-% \begin{option}{rightmargin}
-% \begin{syntax}
-% |rightmargin =| \meta{dimen} \hfill Default: 0pt
-% \end{syntax}
-% \meta{|dimen|} used for the right margin of the \env{scripture}
-% environment.
+% The \pkg{l3color} \meta{|colour expression|} to be used for chapter
+% numbers. By default the current colour is inherited. \opt{chapter/color}
+% is an alias for \opt{chapter/colour}.
% \end{option}
%
% \begin{option}{chapter/drop}
% \begin{syntax}
-% |chapter/drop =| \meta{boolean} \hfill Default: true
+% chapter/drop = \meta{boolean} \hfill Default: true
% \end{syntax}
% Whether the chapter should be set as a drop letter taking up two
% lines or as a normal letter taking up one line. The value of
@@ -999,7 +1089,7 @@
%
% \begin{option}{chapter/font}
% \begin{syntax}
-% |chapter/font =| \meta{font} \hfill Default: \cs{bfseries}
+% chapter/font = \meta{font} \hfill Default: \cs{bfseries}
% \end{syntax}
% \meta{|font|} used for the \cs{ch} function.
% \end{option}
@@ -1007,7 +1097,7 @@
% \changes{v1.1}{2022/07/28}{Add \opt{chapter/format} option}
% \begin{option}[added=2022-07-28]{chapter/format}
% \begin{syntax}
-% |chapter/format =| \meta{macro} \hfill Default: \#1
+% chapter/format = \meta{macro} \hfill Default: \#1
% \end{syntax}
% \meta{|macro|} used to format the \val{chapter} for a \env{scripture}
% quotation. |#1| contains the text of the \val{chapter}.
@@ -1016,7 +1106,7 @@
% \changes{v1.1}{2022/08/15}{Add \opt{chapter/hide} option}
% \begin{option}[added=2022-08-15]{chapter/hide}
% \begin{syntax}
-% |chapter/hide =| \meta{boolean} \hfill Default: false
+% chapter/hide = \meta{boolean} \hfill Default: false
% \end{syntax}
% Whether chapters should be shown or hidden. The value of \meta{|boolean|}
% is optional and assumed to be \val{true} if not present. This option is
@@ -1051,7 +1141,7 @@
%
% \begin{option}{chapter/nodrop}
% \begin{syntax}
-% |chapter/nodrop =| \meta{boolean} \hfill Default: false
+% chapter/nodrop = \meta{boolean} \hfill Default: false
% \end{syntax}
% Whether the chapter should be set as a drop letter taking up two lines or
% as a normal letter taking up one line. The value of \meta{|boolean|} is
@@ -1083,7 +1173,7 @@
%
% \begin{option}{chapter/sep}
% \begin{syntax}
-% |chapter/sep =| \meta{dimen} \hfill Default: 0.5em
+% chapter/sep = \meta{dimen} \hfill Default: 0.5em
% \end{syntax}
% \meta{|dimen|} used to separate a \cs{ch} from the following text.
% \end{option}
@@ -1091,30 +1181,95 @@
% \changes{v1.1}{2022/08/15}{Add \opt{chapter/show} option}
% \begin{option}[added=2022-08-15]{chapter/show}
% \begin{syntax}
-% |chapter/show =| \meta{boolean} \hfill Default: true
+% chapter/show = \meta{boolean} \hfill Default: true
% \end{syntax}
% Whether chapters should be shown or hidden. The value of \meta{|boolean|}
% is optional and assumed to be \val{true} if not present. This option is
% the opposite of \opt{chapter/hide}.
% \end{option}
%
+% \changes{v1.2}{2022/08/31}{Add \opt{colour} option}
+% \begin{option}[added=2022-08-31]{colour, color}
+% \begin{syntax}
+% colour = \meta{colour expression} \hfill Default: .
+% \end{syntax}
+% The \pkg{l3color} \meta{|colour expression|} to be used for the
+% \env{scripture} environment. By default the current colour is inherited.
+% \opt{color} is an alias for \opt{colour}.
+% \end{option}
+%
+% \changes{v1.1}{2022/08/15}{Add \opt{compact} option}
+% \begin{option}[added=2022-08-15]{compact}
+% \begin{syntax}
+% compact = \meta{boolean} \hfill Default: false
+% \end{syntax}
+% This option removes all paragraph breaks along with any \cs{extraskip} in
+% the quotation so the whole quotation is a single paragraph of running
+% prose. This option implies \opt{chapter/nodrop} and all options relating
+% to inner environments are ignored.
+%
+% The value of \meta{|boolean|} is optional and assumed to be \val{true} if
+% not present.
+%
+% \textbf{Warning:} This option redefines \cs{par} to \cs{relax} inside the
+% \env{scripture} environment. If you have anything other than expected
+% macros and environments inside your \env{scripture} environment \TeX{}
+% will likely get stuck in an infinite loop.
+% \end{option}
+%
+% \begin{scriptureexample}
+% \begin{verbatim}
+% \begin{scripture}[Jonah 1:17--2:2a][compact]
+% \begin{midparachap}
+% \vs{17}Now the \name{Lord} provided a huge
+% fish to swallow Jonah, and Jonah was in the
+% belly of the fish three days and three
+% nights. \ch{2}From inside the fish Jonah
+% prayed to the \name{Lord} his God. \vs{2}He
+% said:
+% \end{midparachap}
+% \begin{poetry}
+% `In my distress I called to the Lord,
+% and he answered me.
+% \end{poetry}
+% \end{scripture}
+% \end{verbatim}
+%
+% \tcblower
+%
+% \begin{scripture}[Jonah 1:17--2:2a][compact]
+% \begin{midparachap}
+% \vs{17}Now the \name{Lord} provided a huge
+% fish to swallow Jonah, and Jonah was in the
+% belly of the fish three days and three
+% nights. \ch{2}From inside the fish Jonah
+% prayed to the \name{Lord} his God. \vs{2}He
+% said:
+% \end{midparachap}
+% \begin{poetry}
+% `In my distress I called to the Lord,
+% and he answered me.
+% \end{poetry}
+% \end{scripture}
+% \end{scriptureexample}
+%
% \begin{option}{extraskip}
% \begin{syntax}
-% |extraskip =| \meta{skip} \hfill Default: \cs{medskipamount}
+% extraskip = \meta{skip} \hfill Default: \cs{medskipamount}
% \end{syntax}
% \meta{|skip|} used for the \cs{extraskip} function.
% \end{option}
%
% \begin{option}{font}
% \begin{syntax}
-% |font =| \meta{font} \hfill Default: \emph{Empty}
+% font = \meta{font} \hfill Default: \emph{Empty}
% \end{syntax}
% \meta{|font|} used for the \env{scripture} environment.
% \end{option}
%
% \begin{option}{indent}
% \begin{syntax}
-% |indent =| \meta{boolean} \hfill Default: true
+% indent = \meta{boolean} \hfill Default: true
% \end{syntax}
% Whether to indent the first line of a \env{scripture} environment or not
% by \opt{parindent}. The value of \meta{|boolean|} is optional and assumed
@@ -1122,9 +1277,59 @@
% \opt{noindent}.
% \end{option}
%
+% \changes{v1.2}{2022/11/02}{Add \opt{language} option}
+% \begin{option}[added=2022-11-02]{language}
+% \begin{syntax}
+% language = \meta{language name} \hfill Default: \emph{Empty}
+% \end{syntax}
+% \pkg{babel} or \pkg{polyglossia} \meta{|language name|} to be used for the
+% \env{scripture} environment. This calls
+% \cs{selectlanguage}|{|\meta{|language name|}|}| at the start of the
+% environment. Make sure you have \pkg{babel} or \pkg{polyglossia} loaded
+% and correctly set up for your specified language. If unset the current
+% active language is used.
+% \end{option}
+%
+% \changes{v1.2}{2022/11/02}{Add \opt{language/variant} option}
+% \begin{option}[added=2022-11-02]{language/variant}
+% \begin{syntax}
+% language/variant = \meta{language variant name} \hfill Default: \emph{Empty}
+% \end{syntax}
+% \pkg{polyglossia} \meta{|language variant name|} to be used along with the
+% specified \opt{language} for the \env{scripture} environment. This inserts
+% \cs{selectlanguage}|[|\meta{|language variant name|}|]{|\meta{language
+% name}|}| at the start of the environment. Make sure you have
+% \pkg{polyglossia} loaded and correctly set up for your specified language.
+% \end{option}
+%
+% \begin{option}{leftmargin}
+% \begin{syntax}
+% leftmargin = \meta{dimen} \hfill Default: 0pt
+% \end{syntax}
+% \meta{|dimen|} used for the left margin of the \env{scripture}
+% environment.
+% \end{option}
+%
+% \changes{v1.2}{2022/09/01}{Add \opt{name/font} option}
+% \begin{option}[added=2022-09-01]{name/font}
+% \begin{syntax}
+% name/font = \meta{font} \hfill Default: \cs{scshape}
+% \end{syntax}
+% \meta{|font|} used for the \cs{name} function.
+% \end{option}
+%
+% \changes{v1.2}{2022/09/01}{Add \opt{name/format} option}
+% \begin{option}[added=2022-09-01]{name/format}
+% \begin{syntax}
+% name/format = \meta{macro} \hfill Default: \#1
+% \end{syntax}
+% \meta{|macro|} used to format the \val{divine name} using the \cs{name}
+% function. |#1| contains the text of the argument to \cs{name}.
+% \end{option}
+%
% \begin{option}{noindent}
% \begin{syntax}
-% |noindent =| \meta{boolean} \hfill Default: false
+% noindent = \meta{boolean} \hfill Default: false
% \end{syntax}
% Whether to indent the first line of a \env{scripture} environment or not
% by \opt{parindent}. The value of \meta{|boolean|} is optional and assumed
@@ -1154,7 +1359,7 @@
%
% \begin{option}{parindent}
% \begin{syntax}
-% |parindent =| \meta{dimen} \hfill Default: \cs{parindent}
+% parindent = \meta{dimen} \hfill Default: \cs{parindent}
% \end{syntax}
% \meta{|dimen|} to use when indenting the first line of a paragraph in the
% \env{scripture} environment.
@@ -1162,14 +1367,46 @@
%
% \begin{option}{parskip}
% \begin{syntax}
-% |parskip =| \meta{skip} \hfill Default: \cs{parskip}
+% parskip = \meta{skip} \hfill Default: \cs{parskip}
% \end{syntax}
% \meta{|skip|} to use between paragraphs in the \env{scripture} environment.
% \end{option}
%
+% \changes{v1.2}{2022/08/31}{Add \opt{redletter} option}
+% \begin{option}[added=2022-08-31]{redletter}
+% \begin{syntax}
+% redletter = \meta{boolean} \hfill Default: false
+% \end{syntax}
+% Whether to enable highlighting of Jesus' words in red. The value of
+% \meta{|boolean|} is option and assumed to be \val{true} if not present.
+% The text needs to be marked up with \cs{redletteron} and \cs{redletteroff}
+% for this option to have any effect.
+% \end{option}
+%
+% \changes{v1.2}{2022/08/31}{Add \opt{redletter/colour} option}
+% \begin{option}[added=2022-08-31]{redletter/colour, redletter/color}
+% \begin{syntax}
+% redletter/colour = \meta{colour expression} \hfill Default: red!80!black
+% \end{syntax}
+% The \pkg{l3color} \meta{|colour expression|} to be used for the words of
+% Jesus when the \opt{redletter} option is \val{true}. \cs{redletteron} and
+% \cs{redletteroff} must be used to mark up the text. \opt{redletter/color}
+% is an alias for \opt{redletter/colour}.
+% \end{option}
+%
+% \changes{v1.2}{2022/09/07}{Add \opt{reference/colour} option}
+% \begin{option}[added=2022-09-07]{reference/colour, reference/color}
+% \begin{syntax}
+% reference/colour = \meta{colour expression} \hfill Default: .
+% \end{syntax}
+% The \pkg{l3color} \meta{|colour expression|} to be used for the reference
+% and version. By default the current colour is inherited.
+% \opt{reference/color} is an alias for \opt{reference/colour}.
+% \end{option}
+%
% \begin{option}{reference/delim}
% \begin{syntax}
-% |reference/delim =| \meta{delim} \hfill Default: \cs{hfill}
+% reference/delim = \meta{delim} \hfill Default: \cs{hfill}
% \end{syntax}
% \meta{|delim|} to use between the \env{scripture} quotation and its
% \val{reference}.
@@ -1177,7 +1414,7 @@
%
% \begin{option}{reference/font}
% \begin{syntax}
-% |reference/font =| \meta{font} \hfill Default: \cs{bfseries}
+% reference/font = \meta{font} \hfill Default: \cs{bfseries}
% \end{syntax}
% \meta{|font|} used when printing the \val{reference} for a \env{scripture}
% quotation.
@@ -1185,7 +1422,7 @@
%
% \begin{option}{reference/format}
% \begin{syntax}
-% |reference/format =| \meta{macro} \hfill Default: \#1
+% reference/format = \meta{macro} \hfill Default: \#1
% \end{syntax}
% \meta{|macro|} used to format the \val{reference} for a \env{scripture}
% quotation. |#1| contains the text of the \val{reference}.
@@ -1193,23 +1430,31 @@
%
% \begin{option}{reference/sep}
% \begin{syntax}
-% |reference/sep =| \meta{dimen} \hfill Default: 2em
+% reference/sep = \meta{dimen} \hfill Default: 2em
% \end{syntax}
% The minimum \meta{|dimen|} allowed between the end of a \env{scripture}
% quotation and its \val{reference} before the \val{reference} is pushed to
% the following line.
% \end{option}
%
+% \begin{option}{rightmargin}
+% \begin{syntax}
+% rightmargin = \meta{dimen} \hfill Default: 0pt
+% \end{syntax}
+% \meta{|dimen|} used for the right margin of the \env{scripture}
+% environment.
+% \end{option}
+%
% \begin{option}{selah/font}
% \begin{syntax}
-% |selah/font =| \meta{font} \hfill Default: \cs{itshape}
+% selah/font = \meta{font} \hfill Default: \cs{itshape}
% \end{syntax}
% \meta{|font|} used when printing \cs{selah} in a \env{poetry} environment.
% \end{option}
%
% \begin{option}{selah/format}
% \begin{syntax}
-% |selah/format =| \meta{macro} \hfill Default: \#1
+% selah/format = \meta{macro} \hfill Default: \#1
% \end{syntax}
% \meta{|macro|} used to format the \cs{selah} in a \env{poetry}
% environment. |#1| contains the value of \opt{selah/text}.
@@ -1217,7 +1462,7 @@
%
% \begin{option}{selah/sep}
% \begin{syntax}
-% |selah/sep =| \meta{dimen} \hfill Default: 1em
+% selah/sep = \meta{dimen} \hfill Default: 1em
% \end{syntax}
% The minimum \meta{|dimen|} allowed between the end of a poetry line and
% \emph{Selah} before the \emph{Selah} is pushed to the following line.
@@ -1225,21 +1470,41 @@
%
% \begin{option}{selah/text}
% \begin{syntax}
-% |selah/text =| \meta{text} \hfill Default: Selah
+% selah/text = \meta{text} \hfill Default: Selah
% \end{syntax}
% \meta{|text|} used to for \cs{selah} in a \env{poetry} environment.
% \end{option}
%
+% \changes{v1.2}{2022/08/30}{Add \opt{textright/sep} option}
+% \begin{option}[added=2022-08-30]{textright/sep}
+% \begin{syntax}
+% textright/sep = \meta{dimen} \hfill Default: 1em
+% \end{syntax}
+% The minimum \meta{|dimen|} allowed between the end of a line and text
+% aligned to the right with \cs{textright} before the right aligned text is
+% pushed to the following line.
+% \end{option}
+%
+% \changes{v1.2}{2022/09/07}{Add \opt{verse/colour} option}
+% \begin{option}[added=2022-09-07]{verse/colour, verse/color}
+% \begin{syntax}
+% verse/colour = \meta{colour expression} \hfill Default: .
+% \end{syntax}
+% The \pkg{l3color} \meta{|colour expression|} to be used for verse numbers.
+% By default the current colour is inherited. \opt{verse/color} is an alias
+% for \opt{verse/colour}.
+% \end{option}
+%
% \begin{option}{verse/font}
% \begin{syntax}
-% |verse/font =| \meta{font} \hfill Default: \emph{Empty}
+% verse/font = \meta{font} \hfill Default: \emph{Empty}
% \end{syntax}
% \meta{|font|} used for the \cs{vs} function.
% \end{option}
%
% \begin{option}{verse/format}
% \begin{syntax}
-% |verse/format =| \meta{macro} \hfill Default: \cs{textsuperscript}\{\#1\}
+% verse/format = \meta{macro} \hfill Default: \cs{textsuperscript}\{\#1\}
% \end{syntax}
% \meta{|macro|} used to format the \cs{vs} function. |#1| contains the
% argument of \cs{vs}.
@@ -1248,7 +1513,7 @@
% \changes{v1.1}{2022/08/15}{Add \opt{verse/hide} option}
% \begin{option}[added=2022-08-15]{verse/hide}
% \begin{syntax}
-% |verse/hide =| \meta{boolean} \hfill Default: false
+% verse/hide = \meta{boolean} \hfill Default: false
% \end{syntax}
% Whether verses should be shown or hidden. The value of \meta{|boolean|} is
% optional and assumed to be \val{true} if not present. This option is the
@@ -1286,7 +1551,7 @@
% \changes{v1.1}{2022/07/28}{Add \opt{verse/sep} option with small default}
% \begin{option}[added=2022-07-28]{verse/sep}
% \begin{syntax}
-% |verse/sep =| \meta{dimen} \hfill Default: 0.05 em
+% verse/sep = \meta{dimen} \hfill Default: 0.05 em
% \end{syntax}
% \meta{|dimen|} used to separate a \cs{vs} from the following text.
% \end{option}
@@ -1294,7 +1559,7 @@
% \changes{v1.1}{2022/08/15}{Add \opt{verse/show} option}
% \begin{option}[added=2022-08-15]{verse/show}
% \begin{syntax}
-% |verse/show =| \meta{boolean} \hfill Default: true
+% verse/show = \meta{boolean} \hfill Default: true
% \end{syntax}
% Whether verses should be shown or hidden. The value of \meta{|boolean|}
% is optional and assumed to be \val{true} if not present. This option is
@@ -1303,7 +1568,7 @@
%
% \begin{option}{version}
% \begin{syntax}
-% |version =| \meta{version} \hfill Default: \emph{Empty}
+% version = \meta{version} \hfill Default: \emph{Empty}
% \end{syntax}
% \meta{|version|} added to the \val{reference} for a \env{scripture}
% quotation.
@@ -1311,7 +1576,7 @@
%
% \begin{option}{version/delim}
% \begin{syntax}
-% |version/delim =| \meta{delim} \hfill Default: \{\ \}
+% version/delim = \meta{delim} \hfill Default: \{\ \}
% \end{syntax}
% \meta{|delim|} to use between the \val{reference} and the \val{version} of a
% \env{scripture} quotation.
@@ -1319,7 +1584,7 @@
%
% \begin{option}{version/format}
% \begin{syntax}
-% |version/format =| \meta{macro} \hfill Default: (\#1)
+% version/format = \meta{macro} \hfill Default: (\#1)
% \end{syntax}
% \meta{|macro|} used to format the \val{version} for a \env{scripture}
% quotation. |#1| contains the text of the \val{version}.
@@ -1334,28 +1599,28 @@
%
% \begin{option}{center/aboveskip}
% \begin{syntax}
-% |center/aboveskip =| \meta{skip} \hfill Default: \cs{medskipamount}
+% center/aboveskip = \meta{skip} \hfill Default: \cs{medskipamount}
% \end{syntax}
% \meta{|skip|} inserted above the \env{center} environment.
% \end{option}
%
% \begin{option}{center/belowskip}
% \begin{syntax}
-% |center/belowskip =| \meta{skip} \hfill Default: \cs{medskipamount}
+% center/belowskip = \meta{skip} \hfill Default: \cs{medskipamount}
% \end{syntax}
% \meta{|skip|} inserted below the \env{center} environment.
% \end{option}
%
% \begin{option}{center/leftmargin}
% \begin{syntax}
-% |center/leftmargin =| \meta{dimen} \hfill Default: 0pt
+% center/leftmargin = \meta{dimen} \hfill Default: 0pt
% \end{syntax}
% \meta{|dimen|} used for the left margin of the \env{center} environment.
% \end{option}
%
% \begin{option}{center/rightmargin}
% \begin{syntax}
-% |center/rightmargin =| \meta{dimen} \hfill Default: 0pt
+% center/rightmargin = \meta{dimen} \hfill Default: 0pt
% \end{syntax}
% \meta{|dimen|} used for the right margin of the \env{center} environment.
% \end{option}
@@ -1369,28 +1634,28 @@
%
% \begin{option}{flushright/aboveskip}
% \begin{syntax}
-% |flushright/aboveskip =| \meta{skip} \hfill Default: \cs{medskipamount}
+% flushright/aboveskip = \meta{skip} \hfill Default: \cs{medskipamount}
% \end{syntax}
% \meta{|skip|} inserted above the \env{flushright} environment.
% \end{option}
%
% \begin{option}{flushright/belowskip}
% \begin{syntax}
-% |flushright/belowskip =| \meta{skip} \hfill Default: \cs{medskipamount}
+% flushright/belowskip = \meta{skip} \hfill Default: \cs{medskipamount}
% \end{syntax}
% \meta{|skip|} inserted below the \env{flushright} environment.
% \end{option}
%
% \begin{option}{flushright/leftmargin}
% \begin{syntax}
-% |flushright/leftmargin =| \meta{dimen} \hfill Default: 0pt
+% flushright/leftmargin = \meta{dimen} \hfill Default: 0pt
% \end{syntax}
% \meta{|dimen|} used for the left margin of the \env{flushright} environment.
% \end{option}
%
% \begin{option}{flushright/rightmargin}
% \begin{syntax}
-% |flushright/rightmargin =| \meta{dimen} \hfill Default: 0pt
+% flushright/rightmargin = \meta{dimen} \hfill Default: 0pt
% \end{syntax}
% \meta{|dimen|} used for the right margin of the \env{flushright} environment.
% \end{option}
@@ -1404,21 +1669,21 @@
%
% \begin{option}{hanging/aboveskip}
% \begin{syntax}
-% |hanging/aboveskip =| \meta{skip} \hfill Default: \cs{medskipamount}
+% hanging/aboveskip = \meta{skip} \hfill Default: \cs{medskipamount}
% \end{syntax}
% \meta{|skip|} inserted above the \env{hanging} environment.
% \end{option}
%
% \begin{option}{hanging/belowskip}
% \begin{syntax}
-% |hanging/belowskip =| \meta{skip} \hfill Default: \cs{medskipamount}
+% hanging/belowskip = \meta{skip} \hfill Default: \cs{medskipamount}
% \end{syntax}
% \meta{|skip|} inserted below the \env{hanging} environment.
% \end{option}
%
% \begin{option}{hanging/hang}
% \begin{syntax}
-% |hanging/hang =| \meta{dimen} \hfill Default: 2em
+% hanging/hang = \meta{dimen} \hfill Default: 2em
% \end{syntax}
% \meta{|dimen|} used for the indent of subsequent lines of the
% \env{hanging} environment.
@@ -1426,14 +1691,14 @@
%
% \begin{option}{hanging/leftmargin}
% \begin{syntax}
-% |hanging/leftmargin =| \meta{dimen} \hfill Default: 1em
+% hanging/leftmargin = \meta{dimen} \hfill Default: 1em
% \end{syntax}
% \meta{|dimen|} used for the left margin of the \env{hanging} environment.
% \end{option}
%
% \begin{option}{hanging/rightmargin}
% \begin{syntax}
-% |hanging/rightmargin =| \meta{dimen} \hfill Default: 1em
+% hanging/rightmargin = \meta{dimen} \hfill Default: 1em
% \end{syntax}
% \meta{|dimen|} used for the right margin of the \env{hanging} environment.
% \end{option}
@@ -1447,7 +1712,7 @@
%
% \begin{option}{midparachap/hideverse}
% \begin{syntax}
-% |midparachap/hideverse =| \meta{boolean} \hfill Default: false
+% midparachap/hideverse = \meta{boolean} \hfill Default: false
% \end{syntax}
% Whether a \cs{vs}|{1}| should automatically be inserted after a \cs{ch}
% when the \cs{ch} occurs mid-paragraph. This also affects \cs{ch} in
@@ -1501,7 +1766,7 @@
%
% \begin{option}{midparachap/showverse}
% \begin{syntax}
-% |midparachap/showverse =| \meta{boolean} \hfill Default: true
+% midparachap/showverse = \meta{boolean} \hfill Default: true
% \end{syntax}
% Whether a \cs{vs}|{1}| should automatically be inserted after a \cs{ch}
% when the \cs{ch} occurs mid-paragraph. This also affects \cs{ch} in
@@ -1520,28 +1785,28 @@
%
% \begin{option}{narrow/aboveskip}
% \begin{syntax}
-% |narrow/aboveskip =| \meta{skip} \hfill Default: \cs{medskipamount}
+% narrow/aboveskip = \meta{skip} \hfill Default: \cs{medskipamount}
% \end{syntax}
% \meta{|skip|} inserted above the \env{narrow} environment.
% \end{option}
%
% \begin{option}{narrow/belowskip}
% \begin{syntax}
-% |narrow/belowskip =| \meta{skip} \hfill Default: \cs{medskipamount}
+% narrow/belowskip = \meta{skip} \hfill Default: \cs{medskipamount}
% \end{syntax}
% \meta{|skip|} inserted below the \env{narrow} environment.
% \end{option}
%
% \begin{option}{narrow/leftmargin}
% \begin{syntax}
-% |narrow/leftmargin =| \meta{dimen} \hfill Default: 1em
+% narrow/leftmargin = \meta{dimen} \hfill Default: 1em
% \end{syntax}
% \meta{|dimen|} used for the left margin of the \env{narrow} environment.
% \end{option}
%
% \begin{option}{narrow/rightmargin}
% \begin{syntax}
-% |narrow/rightmargin =| \meta{dimen} \hfill Default: 1em
+% narrow/rightmargin = \meta{dimen} \hfill Default: 1em
% \end{syntax}
% \meta{|dimen|} used for the right margin of the \env{narrow} environment.
% \end{option}
@@ -1555,21 +1820,21 @@
%
% \begin{option}{poetry/aboveskip}
% \begin{syntax}
-% |poetry/aboveskip =| \meta{skip} \hfill Default: \cs{medskipamount}
+% poetry/aboveskip = \meta{skip} \hfill Default: \cs{medskipamount}
% \end{syntax}
% \meta{|skip|} inserted above the \env{poetry} environment.
% \end{option}
%
% \begin{option}{poetry/belowskip}
% \begin{syntax}
-% |poetry/belowskip =| \meta{skip} \hfill Default: \cs{medskipamount}
+% poetry/belowskip = \meta{skip} \hfill Default: \cs{medskipamount}
% \end{syntax}
% \meta{|skip|} inserted below the \env{poetry} environment.
% \end{option}
%
% \begin{option}{poetry/bigindent}
% \begin{syntax}
-% |poetry/bigindent =| \meta{dimen} \hfill Default: 4em
+% poetry/bigindent = \meta{dimen} \hfill Default: 4em
% \end{syntax}
% \meta{|dimen|} used for the indent subsequent lines of a line of poetry in
% a \env{poetry} environment if it needs to flow on to the following line.
@@ -1577,7 +1842,7 @@
%
% \begin{option}{poetry/indent}
% \begin{syntax}
-% |poetry/indent =| \meta{dimen} \hfill Default: 1em
+% poetry/indent = \meta{dimen} \hfill Default: 1em
% \end{syntax}
% \meta{|dimen|} used for the second half of a line of poetry in a
% \env{poetry} environment.
@@ -1585,14 +1850,14 @@
%
% \begin{option}{poetry/leftmargin}
% \begin{syntax}
-% |poetry/leftmargin =| \meta{dimen} \hfill Default: 1em
+% poetry/leftmargin = \meta{dimen} \hfill Default: 1em
% \end{syntax}
% \meta{|dimen|} used for the left margin of the \env{poetry} environment.
% \end{option}
%
% \begin{option}{poetry/rightmargin}
% \begin{syntax}
-% |poetry/rightmargin =| \meta{dimen} \hfill Default: 0pt
+% poetry/rightmargin = \meta{dimen} \hfill Default: 0pt
% \end{syntax}
% \meta{|dimen|} used for the right margin of the \env{poetry} environment.
% \end{option}
@@ -1600,7 +1865,7 @@
% \changes{v1.1}{2022/07/31}{Add \opt{poetry/verse/left} option}
% \begin{option}[added=2022-07-31]{poetry/verse/left}
% \begin{syntax}
-% |poetry/verse/left =| \meta{boolean} \hfill Default: false
+% poetry/verse/left = \meta{boolean} \hfill Default: false
% \end{syntax}
% Align verse numbers in \env{poetry} environments at the left margin of the
% \env{scripture} environment. This option is the opposite of
@@ -1654,7 +1919,7 @@
% \changes{v1.1}{2022/07/31}{Add \opt{poetry/verse/right} option}
% \begin{option}[added=2022-07-31]{poetry/verse/right}
% \begin{syntax}
-% |poetry/verse/right =| \meta{boolean} \hfill Default: true
+% poetry/verse/right = \meta{boolean} \hfill Default: true
% \end{syntax}
% Align verse numbers in \env{poetry} environments at the left margin of the
% poetry environment. The verse numbers overlap to the left. This option is
@@ -1664,7 +1929,7 @@
% \changes{v1.1}{2022/07/31}{Add \opt{poetry/verse/sep} option}
% \begin{option}[added=2022-07-31]{poetry/verse/sep}
% \begin{syntax}
-% |poetry/verse/sep =| \meta{dimen} \hfill Default: 0.05 em
+% poetry/verse/sep = \meta{dimen} \hfill Default: 0.05 em
% \end{syntax}
% \meta{|dimen|} used to separate a \cs{vs} from the following text in a
% \env{poetry} environment. This is only used for verses at the start of a
@@ -1683,10 +1948,9 @@
% \end{macrocode}
%
% \begin{macrocode}
-\NeedsTeXFormat{LaTeX2e}[2021-11-15]
-\ProvidesExplPackage{scripture}{2022/08/27}{1.1}
+\NeedsTeXFormat{LaTeX2e}[2022-06-01]
+\ProvidesExplPackage{scripture}{2022/11/02}{1.2}
{Format Scripture Quotations (DCP)}
-\RequirePackage{l3keys2e}
% \end{macrocode}
%
% \subsection{Messages}
@@ -1701,6 +1965,25 @@
one~of~its~internal~environments,~which~is~not~supported. }
% \end{macrocode}
%
+% Make sure \pkg{polyglossia} languages and variants are set up.
+%
+% \begin{macrocode}
+\msg_new:nnnn { scripture } { language-error }
+ { Language~`#1'~not~set~up. }
+ { Language~`#1'~has~not~been~set~up.~Make~sure~you~set~up~languages~
+ before~using~the~language~option~of~the~scripture~environment. }
+% \end{macrocode}
+%
+% Warn if a \opt{language} is requested and neither \pkg{babel} nor
+% \pkg{polyglossia} is loaded.
+%
+% \begin{macrocode}
+\msg_new:nnnn { scripture } { language-warning }
+ { Language~requested~without~support. }
+ { You~have~requested~language=#1,~but~neither~babel~nor~polyglossia~
+ have~been~loaded~and~set~up.~Ignoring~option~language=#1. }
+% \end{macrocode}
+%
% \subsection{Options}
%
% Key-value settings for the \env{scripture} environment and its inner
@@ -1714,18 +1997,20 @@
, belowskip .tl_set:N = \l_@@_belowskip_tl
, belowskip .value_required:n = true
, belowskip .initial:n = \c_zero_skip
+ , colour .tl_set:N = \l_@@_colour_tl
+ , colour .value_required:n = true
+ , colour .initial:n = .
+ , color .meta:n = { colour = { #1 } }
, compact .bool_set:N = \l_@@_compact_bool
, compact .default:n = true
, compact .initial:n = false
- , leftmargin .tl_set:N = \l_@@_leftmargin_tl
- , leftmargin .value_required:n = true
- , leftmargin .initial:n = \c_zero_dim
- , rightmargin .tl_set:N = \l_@@_rightmargin_tl
- , rightmargin .value_required:n = true
- , rightmargin .initial:n = \c_zero_dim
, chapter / font .tl_set:N = \l_@@_chap_font_tl
, chapter / font .value_required:n = true
, chapter / font .initial:n = \bfseries
+ , chapter / colour .tl_set:N = \l_@@_chapter_colour_tl
+ , chapter / colour .value_required:n = true
+ , chapter / colour .initial:n = .
+ , chapter / color .meta:n = { chapter / colour = { #1 } }
, chapter / drop .bool_set:N = \l_@@_chap_drop_bool
, chapter / drop .default:n = true
, chapter / drop .initial:n = true
@@ -1751,6 +2036,21 @@
, indent .bool_set:N = \l_@@_indent_bool
, indent .default:n = true
, indent .initial:n = true
+ , language .tl_set:N = \l_@@_language_tl
+ , language .value_required:n = true
+ , language .initial:n =
+ , language / variant .tl_set:N = \l_@@_language_variant_tl
+ , language / variant .value_required:n = true
+ , language / variant .initial:n =
+ , leftmargin .tl_set:N = \l_@@_leftmargin_tl
+ , leftmargin .value_required:n = true
+ , leftmargin .initial:n = \c_zero_dim
+ , name / font .tl_set:N = \l_@@_name_font_tl
+ , name / font .value_required:n = true
+ , name / font .initial:n = \scshape
+ , name / format .cs_set:Np = \@@_name_format:n #1
+ , name / format .value_required:n = true
+ , name / format .initial:n = #1
, noindent .bool_set_inverse:N = \l_@@_indent_bool
, noindent .default:n = true
, parindent .tl_set:N = \l_@@_parindent_tl
@@ -1759,6 +2059,17 @@
, parskip .tl_set:N = \l_@@_parskip_tl
, parskip .value_required:n = true
, parskip .initial:n = \parskip
+ , redletter .bool_set:N = \l_@@_red_letter_bool
+ , redletter .default:n = true
+ , redletter .initial:n = false
+ , redletter / colour .tl_set:N = \l_@@_red_letter_colour_tl
+ , redletter / colour .value_required:n = true
+ , redletter / colour .initial:n = red!80!black
+ , redletter / color .meta:n = { redletter / colour = { #1 } }
+ , reference / colour .tl_set:N = \l_@@_ref_colour_tl
+ , reference / colour .value_required:n = true
+ , reference / colour .initial:n = .
+ , reference / color .meta:n = { reference / colour = { #1 } }
, reference / delim .tl_set:N = \l_@@_ref_delim_tl
, reference / delim .value_required:n = true
, reference / delim .initial:n = \hfill
@@ -1771,6 +2082,9 @@
, reference / sep .tl_set:N = \l_@@_ref_sep_tl
, reference / sep .value_required:n = true
, reference / sep .initial:n = 2 em
+ , rightmargin .tl_set:N = \l_@@_rightmargin_tl
+ , rightmargin .value_required:n = true
+ , rightmargin .initial:n = \c_zero_dim
, selah / text .tl_set:N = \l_@@_selah_text_tl
, selah / text .value_required:n = true
, selah / text .initial:n = Selah
@@ -1783,6 +2097,13 @@
, selah / sep .tl_set:N = \l_@@_selah_sep_tl
, selah / sep .value_required:n = true
, selah / sep .initial:n = 1 em
+ , textright / sep .tl_set:N = \l_@@_text_right_sep_tl
+ , textright / sep .value_required:n = true
+ , textright / sep .initial:n = 1 em
+ , verse / colour .tl_set:N = \l_@@_verse_colour_tl
+ , verse / colour .value_required:n = true
+ , verse / colour .initial:n = .
+ , verse / color .meta:n = { verse / colour = { #1 } }
, verse / font .tl_set:N = \l_@@_verse_font_tl
, verse / font .value_required:n = true
, verse / font .initial:n =
@@ -1908,9 +2229,9 @@
, poetry / verse / sep .initial:n = 0.05 em
}
% \end{macrocode}
-% Process package options using \pkg{l3keys2e} package.
+% Process package options.
% \begin{macrocode}
-\ProcessKeysOptions { scripture }
+\ProcessKeyOptions
% \end{macrocode}
%
% \subsection{hooks}
@@ -1968,25 +2289,38 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_text_right:n}
+% \begin{macro}{\@@_text_right:nn}
% Align a word to the right and finish a paragraph, pushing to the next line
% if there is not space for the word.
% \begin{macrocode}
\cs_new_protected:Nn \@@_text_right:nn
{
- {
- \unskip
- \hfil
- \penalty 50
- \skip_horizontal:n { #1 }
- \hbox:n {}
- \nobreak
- \hfill
- #2
- \skip_zero:N \parfillskip
- \int_zero:N \finalhyphendemerits
- \para_end:
- }
+ \bool_lazy_or:nnTF
+ { \str_if_eq_p:Vn \l_@@_currenvir_str { flushright } }
+ { \str_if_eq_p:Vn \l_@@_currenvir_str { center } }
+ {
+ \unskip
+ \break
+ \strut
+ \hfill
+ #2
+ \para_end:
+ }
+ {
+ {
+ \unskip
+ \hfil
+ \penalty 50
+ \skip_horizontal:n { #1 }
+ \hbox:n {}
+ \nobreak
+ \hfill
+ #2
+ \skip_zero:N \parfillskip
+ \int_zero:N \finalhyphendemerits
+ \para_end:
+ }
+ }
}
% \end{macrocode}
% \end{macro}
@@ -2007,6 +2341,8 @@
{
\group_begin:
\l_@@_ref_font_tl
+ \str_if_eq:VnF \l_@@_ref_colour_tl { . }
+ { \exp_args:NV \color_select:n \l_@@_ref_colour_tl }
\@@_ref_format:n { #1 }
% \end{macrocode}
% Append a Bible version if it has been specified.
@@ -2055,6 +2391,104 @@
% \end{macrocode}
% \end{macro}
%
+% \subsubsection{Red lettering}
+%
+% \begin{macro}{\g_@@_red_letter_active_bool}
+% Flag indicating if currently in a red letter block of text.
+% \begin{macrocode}
+\bool_new:N \g_@@_red_letter_active_bool
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\@@_red_letter_on:}
+% Mark the beginning of a section of text attributed to Jesus Christ.
+% \begin{macrocode}
+\cs_new_protected:Nn \@@_red_letter_on:
+ {
+ \bool_if:NT \l_@@_red_letter_bool
+ {
+ \bool_gset_true:N \g_@@_red_letter_active_bool
+ \exp_args:NV \color_select:n \l_@@_red_letter_colour_tl
+ \str_if_eq:VnF \l_@@_currenvir_str { scripture }
+ {
+ \hook_gput_next_code:nn { env / \l_@@_currenvir_str / after }
+ {
+ \exp_args:NV \color_select:n \l_@@_red_letter_colour_tl
+ }
+ }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_red_letter_off:}
+% Mark the beginning of a section of text attributed to Jesus Christ.
+% \begin{macrocode}
+\cs_new_protected:Nn \@@_red_letter_off:
+ {
+ \bool_if:NT \l_@@_red_letter_bool
+ {
+ \color_select:n { scripture default colour }
+ \bool_gset_false:N \g_@@_red_letter_active_bool
+ \str_if_eq:VnF \l_@@_currenvir_str { scripture }
+ {
+ \hook_gput_next_code:nn { env / \l_@@_currenvir_str / after }
+ {
+ \color_select:n { scripture default colour }
+ }
+ }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsubsection{Selecting language}
+%
+% \begin{macro}{\@@_select_language:}
+% Select specified language if required.
+% \begin{macrocode}
+\cs_new_protected:Nn \@@_select_language:
+ {
+ \tl_if_empty:NF \l_@@_language_tl
+ {
+ \@ifpackageloaded { babel }
+ {
+ \selectlanguage { \l_@@_language_tl }
+ }
+ {
+ \@ifpackageloaded { polyglossia }
+ {
+ \iflanguageloaded { \l_@@_language_tl }
+ {
+ \tl_if_empty:NTF \l_@@_language_variant_tl
+ {
+ \selectlanguage { \l_@@_language_tl }
+ }
+ {
+ \selectlanguage
+ [ variant = \l_@@_language_variant_tl ]
+ { \l_@@_language_tl }
+ }
+ }
+ {
+ \msg_error:nnx
+ { scripture }
+ { language-error }
+ { \l_@@_language_tl }
+ }
+ }
+ {
+ \msg_warning:nnx
+ { scripture }
+ { language-waning }
+ { \l_@@_language_tl }
+ }
+ }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \subsubsection{Formatting and printing chapter numbers}
%
% \begin{macro}{\l_@@_chap_box, l_@@_chap_tmp_box}
@@ -2127,6 +2561,8 @@
{ \l_@@_chap_fontsize_dim }
{ \l_@@_chap_fontsize_dim }
\selectfont
+ \str_if_eq:VnF \l_@@_chapter_colour_tl { . }
+ { \exp_args:NV \color_select:n \l_@@_chapter_colour_tl }
\@@_chap_format:n { #1 }
}
\dim_set:Nn \l_@@_chap_width_dim
@@ -2187,8 +2623,10 @@
{
\hook_use:n { scripture / chap / before }
\group_begin:
+ \str_if_eq:VnF \l_@@_chapter_colour_tl { . }
+ { \exp_args:NV \color_select:n \l_@@_chapter_colour_tl }
\l_@@_chap_font_tl
- #1
+ \@@_chap_format:n { #1 }
\group_end:
\skip_horizontal:N \l_@@_chap_sep_tl
\hook_use:n { scripture / chap / after }
@@ -2257,8 +2695,12 @@
\hook_use:n { scripture / verse / before }
\bool_if:NT \l_@@_verse_show_bool
{
+ \group_begin:
\l_@@_verse_font_tl
+ \str_if_eq:VnF \l_@@_verse_colour_tl { . }
+ { \exp_args:NV \color_select:n \l_@@_verse_colour_tl }
\@@_verse_format:n { #1 }
+ \group_end:
\kern \l_@@_verse_sep_tl
}
\hook_use:n { scripture / verse / after }
@@ -2351,6 +2793,7 @@
{
\keys_set:nn { scripture } { #1 }
}
+ \@@_select_language:
% \end{macrocode}
% If the \env{scripture} environment begins immediately after an \cs{item},
% then insert a new paragraph and apply a negative skip. Life is much easier
@@ -2394,7 +2837,28 @@
\bool_gset_false:N \g_@@_poetry_end_bool
\dim_set_eq:NN \parindent \l_@@_parindent_tl
\cs_set_eq:NN \extraskip \@@_extra_skip:
+ \cs_set_eq:NN \redletteron \@@_red_letter_on:
+ \cs_set_eq:NN \redletteroff \@@_red_letter_off:
\cs_set_eq:NN \vs \@@_verse_output:n
+ \cs_set_protected_nopar:Npn \name ##1
+ {
+ \group_begin:
+ \l_@@_name_font_tl
+ \@@_name_format:n { ##1 }
+ \group_end:
+ }
+ \cs_set_protected_nopar:Npn \LORD
+ {
+ \name { Lord }
+ }
+ \cs_set_protected_nopar:Npn \GOD
+ {
+ \name { God }
+ }
+ \cs_set_protected_nopar:Npn \textright ##1
+ {
+ \@@_text_right:nn { \l_@@_text_right_sep_tl } { ##1 }
+ }
\hook_gclear_next_code:n { para / before }
\skip_set:Nn \l_@@_parskip_correction_skip { \parskip - \l_@@_parskip_tl }
\mode_if_vertical:T
@@ -2403,6 +2867,11 @@
}
\skip_set_eq:NN \parskip \l_@@_parskip_tl
\l_@@_font_tl
+ \exp_args:NnV \color_set:nn { scripture default colour } \l_@@_colour_tl
+ \str_if_eq:VnF \l_@@_colour_tl { . }
+ {
+ \color_select:n { scripture default colour }
+ }
% \end{macrocode}
% For left and right margins, use \cs{parshape} is already in a list,
% otherwise use \cs{leftskip} and \cs{rightskip}
@@ -2453,6 +2922,7 @@
% environments. This removes any unwanted \opt{belowskip} if present and
% leaves the previously calculated line length of the final paragraph intact.
% \begin{macrocode}
+ \@@_red_letter_off:
\mode_if_vertical:TF
{
\unskip
@@ -2482,10 +2952,10 @@
}
}
{ \parshape 1 ~ \@totalleftmargin ~ \linewidth }
- \tl_if_novalue:nF { #1 }
- {
- \@@_reference:n { #1 }
- }
+ \bool_lazy_or:nnF
+ { \tl_if_novalue_p:n { #1 } }
+ { \tl_if_empty_p:n { #1 } }
+ { \@@_reference:n { #1 } }
\par
% \end{macrocode}
% Restore right margin by resetting the \cs{parshape} if in a \LaTeX{} list
@@ -3243,7 +3713,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_poetry_text_right:n}
+% \begin{macro}{\@@_poetry_text_right:nn}
% Align a word to the right and finish a paragraph, pushing to the next line
% if there is not space for the word.
% \begin{macrocode}
@@ -3436,7 +3906,9 @@
\hook_use:n { scripture / chap / before }
\group_begin:
\l_@@_chap_font_tl
- #1
+ \str_if_eq:VnF \l_@@_chapter_colour_tl { . }
+ { \exp_args:NV \color_select:n \l_@@_chapter_colour_tl }
+ \@@_chap_format:n { #1 }
\group_end:
\skip_horizontal:N \l_@@_chap_sep_tl
\hook_use:n { scripture / chap / after }
@@ -3610,6 +4082,10 @@
\cs_set_eq:NN \vs \@@_poetry_mode_vertical_verse:n
\cs_set_eq:NN \extraskip \@@_poetry_extra_skip:
\cs_set_eq:NN \selah \@@_selah_output:
+ \cs_set_protected_nopar:Npn \textright ##1
+ {
+ \@@_poetry_text_right:nn { \l_@@_text_right_sep_tl } { ##1 }
+ }
\item
\relax
\cs_set_eq:NN \@@_tmp_para_end: \par
@@ -3784,6 +4260,12 @@
\c_space_tl
\group_end:
}
+ \cs_set_protected_nopar:Npn \textright ##1
+ {
+ \unskip
+ \c_space_tl
+ ##1
+ }
\mode_leave_vertical:
}
\peek_remove_spaces:n
diff --git a/macros/latex/contrib/scripture/scripture.pdf b/macros/latex/contrib/scripture/scripture.pdf
index 7eb267b1a7..2c1dc513c8 100644
--- a/macros/latex/contrib/scripture/scripture.pdf
+++ b/macros/latex/contrib/scripture/scripture.pdf
Binary files differ