| 1 |
% \iffalse meta-comment |
| 2 |
% |
| 3 |
% Copyright (c) 2022-2025 David Purton <[email protected]> |
| 4 |
% |
| 5 |
% This work may be distributed and/or modified under the conditions of |
| 6 |
% the LaTeX Project Public License, either version 1.3c of this license |
| 7 |
% or (at your option) any later version. The latest version of this |
| 8 |
% license is in |
| 9 |
% http://www.latex-project.org/lppl.txt |
| 10 |
% and version 1.3c or later is part of all distributions of LaTeX |
| 11 |
% version 2005/12/01 or later. |
| 12 |
% |
| 13 |
%<*driver> |
| 14 |
\DocumentMetadata{lang=en} |
| 15 |
\documentclass[a4paper]{l3doc} |
| 16 |
\usepackage[bidi=basic, layout=lists]{babel} |
| 17 |
\babelprovide[import, main]{australian} |
| 18 |
\babelprovide[import, onchar=ids fonts]{ancientgreek} |
| 19 |
\babelprovide[import, onchar=ids fonts]{japanese} |
| 20 |
\babelprovide[import, mapdigits, onchar=ids fonts]{persian} |
| 21 |
\babelfont[ancientgreek]{rm}[BoldFont=NewCM10-Bold]{NewCM10-Regular} |
| 22 |
\babelfont[ancientgreek]{tt}{NewCMMono10-Regular} |
| 23 |
\babelfont[japanese]{tt}[Scale=.9]{IPAMincho} |
| 24 |
\babelfont[persian]{rm}[Renderer = Harfbuzz]{Amiri} |
| 25 |
\babelfont[persian]{tt}[Renderer = Harfbuzz, Scale=.75]{Kawkab Mono Regular} |
| 26 |
\usepackage{luatexja-fontspec} |
| 27 |
\newcommand{\disablecjk}{% |
| 28 |
\ltjsetparameter{jacharrange={-1, -2, -3, -4, -5, -6, -7, -8, -9}}} |
| 29 |
\newcommand{\enablecjk}{% |
| 30 |
\ltjsetparameter{jacharrange={-1, +2, +3, -4, -5, +6, +7, -8, +9}}} |
| 31 |
\disablecjk |
| 32 |
\usepackage[parindent=1em]{scripture} |
| 33 |
\usepackage[skins]{tcolorbox} |
| 34 |
\newtcolorbox{scriptureexample}[1][]{% |
| 35 |
bicolor, colframe=cyan, colback=cyan!10, colbacklower=white, left=2mm, |
| 36 |
fonttitle=\normalsize\sffamily\bfseries, |
| 37 |
subtitle style={before skip=3mm, after skip=3mm}, |
| 38 |
right=2mm, fontupper=\footnotesize, fontlower=\footnotesize, sidebyside, |
| 39 |
sidebyside gap=6mm, sidebyside align=top, lefthand ratio=0.6, before |
| 40 |
skip=\bigskipamount, after skip=\bigskipamount, #1 |
| 41 |
} |
| 42 |
\tcbset{% |
| 43 |
sidebysidecompare/.style={% |
| 44 |
enhanced, colback=white, lefthand ratio=0.5, segmentation empty}, |
| 45 |
compare/.style={% |
| 46 |
standard, colback=white, sidebyside=false} |
| 47 |
} |
| 48 |
\ExplSyntaxOn |
| 49 |
\makeatletter |
| 50 |
\hook_gput_code:nnn |
| 51 |
{ env / scripture / begin } |
| 52 |
{ scripturedoc } |
| 53 |
{ |
| 54 |
\cs_set_eq:NN \list \__codedoc_oldlist:nn |
| 55 |
} |
| 56 |
\cs_new_protected:Npn \__dcp_codedoc_environment_index:n #1 |
| 57 |
{ |
| 58 |
\@bsphack |
| 59 |
\begingroup |
| 60 |
\__codedoc_target: |
| 61 |
\index |
| 62 |
{ |
| 63 |
#1\actualchar{\protect\ttfamily#1}~(environment) |
| 64 |
\encapchar hdclindex{\the\c@HD@hypercount}{usage} |
| 65 |
} |
| 66 |
\index |
| 67 |
{ |
| 68 |
environments:\levelchar#1\actualchar{\protect\ttfamily#1} |
| 69 |
\encapchar hdclindex{\the\c@HD@hypercount}{usage} |
| 70 |
} |
| 71 |
\endgroup |
| 72 |
\@esphack |
| 73 |
} |
| 74 |
\cs_new_protected:Npn \__dcp_codedoc_envmacro_index:nN #1#2 |
| 75 |
{ |
| 76 |
\DoNotIndex {#1} |
| 77 |
\bool_if:NT #2 |
| 78 |
{ |
| 79 |
\__codedoc_if_macro_internal:nF {#1} |
| 80 |
{ \seq_gput_right:Nn \g_doc_macros_seq {#1} } |
| 81 |
\hbox_set:Nw \l__codedoc_macro_index_box |
| 82 |
\hbox_unpack_drop:N \l__codedoc_macro_index_box |
| 83 |
\int_gincr:N \c@CodelineNo |
| 84 |
\@bsphack |
| 85 |
\begingroup |
| 86 |
\__codedoc_target: |
| 87 |
\index |
| 88 |
{ |
| 89 |
#1\actualchar{\protect\ttfamily#1}~(environment) |
| 90 |
\encapchar hdclindex{\the\c@HD@hypercount}{main} |
| 91 |
} |
| 92 |
\index |
| 93 |
{ |
| 94 |
environments:\levelchar#1\actualchar{\protect\ttfamily#1} |
| 95 |
\encapchar hdclindex{\the\c@HD@hypercount}{main} |
| 96 |
} |
| 97 |
\endgroup |
| 98 |
\@esphack |
| 99 |
\int_gdecr:N \c@CodelineNo |
| 100 |
\exp_args:NNNo \hbox_set_end: |
| 101 |
\tl_set:Nn \saved@indexname { \l__codedoc_index_key_tl } |
| 102 |
} |
| 103 |
} |
| 104 |
\cs_new_protected:Npn \__dcp_codedoc_hook_index:n #1 |
| 105 |
{ |
| 106 |
\@bsphack |
| 107 |
\begingroup |
| 108 |
\__codedoc_target: |
| 109 |
\index |
| 110 |
{ |
| 111 |
#1\actualchar{\protect\ttfamily#1}~(hook) |
| 112 |
\encapchar hdclindex{\the\c@HD@hypercount}{usage} |
| 113 |
} |
| 114 |
\index |
| 115 |
{ |
| 116 |
hooks:\levelchar#1\actualchar{\protect\ttfamily#1} |
| 117 |
\encapchar hdclindex{\the\c@HD@hypercount}{usage} |
| 118 |
} |
| 119 |
\endgroup |
| 120 |
\@esphack |
| 121 |
} |
| 122 |
\cs_new_protected:Npn \__dcp_codedoc_hookmacro_index:nN #1#2 |
| 123 |
{ |
| 124 |
\DoNotIndex {#1} |
| 125 |
\bool_if:NT #2 |
| 126 |
{ |
| 127 |
\__codedoc_if_macro_internal:nF {#1} |
| 128 |
{ \seq_gput_right:Nn \g_doc_macros_seq {#1} } |
| 129 |
\hbox_set:Nw \l__codedoc_macro_index_box |
| 130 |
\hbox_unpack_drop:N \l__codedoc_macro_index_box |
| 131 |
\int_gincr:N \c@CodelineNo |
| 132 |
\@bsphack |
| 133 |
\begingroup |
| 134 |
\__codedoc_target: |
| 135 |
\index |
| 136 |
{ |
| 137 |
#1\actualchar{\protect\ttfamily#1}~(hook) |
| 138 |
\encapchar hdclindex{\the\c@HD@hypercount}{main} |
| 139 |
} |
| 140 |
\index |
| 141 |
{ |
| 142 |
hooks:\levelchar#1\actualchar{\protect\ttfamily#1} |
| 143 |
\encapchar hdclindex{\the\c@HD@hypercount}{main} |
| 144 |
} |
| 145 |
\endgroup |
| 146 |
\@esphack |
| 147 |
\int_gdecr:N \c@CodelineNo |
| 148 |
\exp_args:NNNo \hbox_set_end: |
| 149 |
\tl_set:Nn \saved@indexname { \l__codedoc_index_key_tl } |
| 150 |
} |
| 151 |
} |
| 152 |
\DeclareDocumentEnvironment { environment } { O{} +v } |
| 153 |
{ |
| 154 |
\clist_map_inline:nn { #2 } |
| 155 |
{ |
| 156 |
\MakeLinkTarget*{environment##1} |
| 157 |
} |
| 158 |
\cs_set_eq:NN \__codedoc_function_index:n \__dcp_codedoc_environment_index:n |
| 159 |
\__codedoc_function:nnw {#1} {#2} |
| 160 |
} |
| 161 |
{ \__codedoc_function_end: } |
| 162 |
\DeclareDocumentEnvironment { hooks } { O{} +v } |
| 163 |
{ |
| 164 |
\clist_map_inline:nn { #2 } |
| 165 |
{ |
| 166 |
\MakeLinkTarget*{hook##1} |
| 167 |
} |
| 168 |
\bool_if:NTF \l__codedoc_in_implementation_bool |
| 169 |
{ |
| 170 |
\cs_set_eq:NN \__codedoc_macro_index:nN \__dcp_codedoc_hookmacro_index:nN |
| 171 |
\__codedoc_macro:nnw { var , #1 } {#2} |
| 172 |
} |
| 173 |
{ |
| 174 |
\cs_set_eq:NN \__codedoc_function_index:n \__dcp_codedoc_hook_index:n |
| 175 |
\__codedoc_function:nnw {#1} {#2} |
| 176 |
} |
| 177 |
} |
| 178 |
{ |
| 179 |
\bool_if:NTF \l__codedoc_in_implementation_bool |
| 180 |
{ \__codedoc_macro_end: } |
| 181 |
{ \__codedoc_function_end: } |
| 182 |
} |
| 183 |
\DeclareDocumentEnvironment { option } { O{} +v } |
| 184 |
{ |
| 185 |
\cs_set_eq:NN \__codedoc_function_index:n \SpecialOptionIndex |
| 186 |
\clist_map_inline:nn { #2 } |
| 187 |
{ |
| 188 |
\MakeLinkTarget*{option##1} |
| 189 |
} |
| 190 |
\__codedoc_function:nnw {#1} {#2} |
| 191 |
} |
| 192 |
{ \__codedoc_function_end: } |
| 193 |
\DeclareDocumentEnvironment { envmacro } { O{} +v } |
| 194 |
{ |
| 195 |
\cs_set_eq:NN \__codedoc_macro_index:nN \__dcp_codedoc_envmacro_index:nN |
| 196 |
\__codedoc_macro:nnw {#1} {#2} |
| 197 |
} |
| 198 |
{ \__codedoc_macro_end: } |
| 199 |
\DeclareDocumentEnvironment { function } { O{} +v } |
| 200 |
{ |
| 201 |
\clist_map_inline:nn { #2 } |
| 202 |
{ |
| 203 |
\MakeLinkTarget*{function##1} |
| 204 |
} |
| 205 |
\__codedoc_function:nnw {#1} {#2} |
| 206 |
} |
| 207 |
{ \__codedoc_function_end: } |
| 208 |
\DeclareDocumentCommand \env { m } |
| 209 |
{ |
| 210 |
\hyperlink{environment#1}{\texttt{#1}} |
| 211 |
} |
| 212 |
\DeclareDocumentCommand \opt { m } |
| 213 |
{ |
| 214 |
\hyperlink{option#1}{\texttt{#1}} |
| 215 |
} |
| 216 |
\DeclareDocumentCommand \hook { m } |
| 217 |
{ |
| 218 |
\hyperlink{hook#1}{\texttt{#1}} |
| 219 |
} |
| 220 |
\DeclareRobustCommand \val {\texttt} |
| 221 |
\DeclareDocumentCommand \fn { O{} m } |
| 222 |
{ |
| 223 |
\hyperlink{function \c_backslash_str #2}{ |
| 224 |
\__codedoc_cmd:no |
| 225 |
{ module = scripture , replace = false , #1 } |
| 226 |
{ \c_backslash_str #2} } |
| 227 |
} |
| 228 |
\makeatother |
| 229 |
\ExplSyntaxOff |
| 230 |
\begin{document} |
| 231 |
\DocInput{\jobname.dtx} |
| 232 |
\end{document} |
| 233 |
%</driver> |
| 234 |
% \fi |
| 235 |
% |
| 236 |
% \changes{v1.0}{2022/07/27}{First public release} |
| 237 |
% \changes{v1.1}{2022/08/27}{Bug fixes} |
| 238 |
% \changes{v1.2}{2022/11/02}{Bug fixes} |
| 239 |
% \changes{v1.3}{2023/01/08}{Bug fixes} |
| 240 |
% \changes{v2.0}{2023/12/26}{Switch \env{scripture} to a \LaTeX{} \val{list} |
| 241 |
% based environment} |
| 242 |
% \changes{v2.0}{2023/12/27}{Bug fixes} |
| 243 |
% \changes{v2.1}{2025/01/02}{Bug fixes} |
| 244 |
% \changes{v2.2}{2025/08/09}{Support footnotes} |
| 245 |
% \changes{v2.2}{2025/08/09}{Bug fixes} |
| 246 |
% |
| 247 |
% \title{The \pkg{scripture} package} |
| 248 |
% \author{David Purton\thanks{Email: \url{[email protected]}}} |
| 249 |
% \date{2025/08/09 v2.2} |
| 250 |
% |
| 251 |
% \maketitle |
| 252 |
% |
| 253 |
% \begin{abstract} |
| 254 |
% The \pkg{scripture} package provides a set of macros for typesetting |
| 255 |
% quotations from the Bible. It provides many features commonly seen in |
| 256 |
% Bibles such as dropped text for chapter numbers, superscripts for verse |
| 257 |
% numbers, indented lines for poetry sections, narrow sections and hanging |
| 258 |
% paragraphs. A reference for the quotation can optionally be added. |
| 259 |
% \end{abstract} |
| 260 |
% |
| 261 |
% \tableofcontents |
| 262 |
% |
| 263 |
% \begin{documentation} |
| 264 |
% |
| 265 |
% \section{Introduction} |
| 266 |
% |
| 267 |
% Bibles tend to use a number of standard features when laying out chapters |
| 268 |
% and verses. The main goal for the \pkg{scripture} package is to be able to |
| 269 |
% quickly and easily input text and have it output nicely with minimal manual |
| 270 |
% adjustment. |
| 271 |
% |
| 272 |
% The package supports dropped text for chapter numbers, superscripts for |
| 273 |
% verse numbers, appropriately indented lines for the first and second halves |
| 274 |
% of poetry, flush right sections, centred sections, narrow sections and |
| 275 |
% hanging sections. |
| 276 |
% |
| 277 |
% The package could be used for typesetting an entire Bible, but it is mainly |
| 278 |
% envisioned that it will be used for producing Scripture quotations. The |
| 279 |
% passage reference can be included on the last line if there is space or |
| 280 |
% failing that on the following line. |
| 281 |
% |
| 282 |
% \subsection{Bug reports and feature requests} |
| 283 |
% |
| 284 |
% Bug reports and feature requests can be made at the \pkg{scripture} package |
| 285 |
% GitHub repository. See \url{https://github.com/dcpurton/scripture}. |
| 286 |
% |
| 287 |
% \subsection{Limitations} |
| 288 |
% |
| 289 |
% The \pkg{scripture} package makes extensive use of \LaTeX{} \val{list} |
| 290 |
% environments and the \cs{parshape} command. This means there are some |
| 291 |
% limitations. In particular, you should not: |
| 292 |
% \begin{itemize} |
| 293 |
% \item Nest the \env{scripture} environment or any of its internal |
| 294 |
% environments. |
| 295 |
% \item Modify the \cs{parshape} within a \env{scripture} environment. |
| 296 |
% \item Include any other \val{list} based environment within a |
| 297 |
% \env{scripture} environment. |
| 298 |
% \item Include any \cs{section} (or similar) functions within the |
| 299 |
% \env{scripture} environment. A simple \fn{heading} function is provided |
| 300 |
% instead. |
| 301 |
% \end{itemize} |
| 302 |
% |
| 303 |
% The code which attempts to avoid drop chapters clashing with text is also a |
| 304 |
% bit fragile and can easily break, especially when there are unexpected |
| 305 |
% paragraph breaks. |
| 306 |
% |
| 307 |
% Footnotes are supported, but as the \env{midparachap} environment is a |
| 308 |
% implemented with a \cs{vbox}, footnotes will vanish. In this case you must |
| 309 |
% use \cs{footnotemark} and then \cs{footnotetext} after the \env{midparachap} |
| 310 |
% environment. |
| 311 |
% |
| 312 |
% The \env{poetry} environment uses \cs{obeylines}. This means that it can not |
| 313 |
% be placed in the argument of a macro. If you want to use the \env{poetry} |
| 314 |
% environment in a \pkg{beamer} slide, you must use the \texttt{fragile} option |
| 315 |
% for the \pkg{beamer} \val{frame} environment. |
| 316 |
% |
| 317 |
% Some attempt is made to encourage appropriate page breaks, especially just |
| 318 |
% before a reference is added to a quotation, but this can still sometimes |
| 319 |
% fail and a reference will end up on the following page. Usually a little |
| 320 |
% more stretchable space on the page before the incorrect break is enough to |
| 321 |
% obtain acceptable output. |
| 322 |
% |
| 323 |
% At least version 2022-11-01 of the \LaTeX\ format is required. |
| 324 |
% |
| 325 |
% \section{Documentation} |
| 326 |
% |
| 327 |
% \subsection{Basic usage} |
| 328 |
% |
| 329 |
% Scripture quotations must be set within a \env{scripture} environment. A |
| 330 |
% simple quotation might be produced as follows: |
| 331 |
% |
| 332 |
% \begin{scriptureexample} |
| 333 |
% \begin{verbatim} |
| 334 |
% \begin{scripture}[Isaiah 56:1--2][version=NIVUK] |
| 335 |
% \ch{56}This is what the \name{Lord} says: |
| 336 |
% \begin{poetry} |
| 337 |
% `Maintain justice |
| 338 |
% and do what is right, |
| 339 |
% |
| 340 |
% for my salvation is close at hand |
| 341 |
% and my righteousness will soon be revealed. |
| 342 |
% |
| 343 |
% \vs{2}Blessed is the one who does this~-- |
| 344 |
% the person who holds it fast, |
| 345 |
% |
| 346 |
% who keeps the Sabbath without desecrating it, |
| 347 |
% and keeps their hands from doing any evil.' |
| 348 |
% \end{poetry} |
| 349 |
% \end{scripture} |
| 350 |
% \end{verbatim} |
| 351 |
% |
| 352 |
% \tcblower |
| 353 |
% |
| 354 |
% \begin{scripture}[Isaiah 56:1--2][version=NIVUK] |
| 355 |
% \ch{56}This is what the \name{Lord} says: |
| 356 |
% \begin{poetry} |
| 357 |
% `Maintain justice |
| 358 |
% and do what is right, |
| 359 |
% |
| 360 |
% for my salvation is close at hand |
| 361 |
% and my righteousness will soon be revealed. |
| 362 |
% |
| 363 |
% \vs{2}Blessed is the one who does this~-- |
| 364 |
% the person who holds it fast, |
| 365 |
% |
| 366 |
% who keeps the Sabbath without desecrating it, |
| 367 |
% and keeps their hands from doing any evil.' |
| 368 |
% \end{poetry} |
| 369 |
% \end{scripture} |
| 370 |
% \end{scriptureexample} |
| 371 |
% |
| 372 |
% \subsection{Macros for typesetting scripture quotations} |
| 373 |
% |
| 374 |
% \subsubsection{Functions} |
| 375 |
% |
| 376 |
% \changes{v1.3}{2022/11/15}{Add feature to highlight translator added words} |
| 377 |
% \begin{function}[added=2022-11-15]{\added} |
| 378 |
% \begin{syntax} |
| 379 |
% |\added|\marg{words} |
| 380 |
% \end{syntax} |
| 381 |
% Some Bible translations mark out words added for clarity not found in the |
| 382 |
% original language (e.g., in italics). This can be done using the \fn{added} |
| 383 |
% function. The font and format can be set using the \opt{added/font} and |
| 384 |
% \opt{added/format} options. |
| 385 |
% \end{function} |
| 386 |
% |
| 387 |
% \begin{scriptureexample} |
| 388 |
% \begin{verbatim} |
| 389 |
% \begin{scripture}[John 1:18][verse/font=\bfseries, |
| 390 |
% verse/format=#1, verse/sep=0.5em, version=KJV] |
| 391 |
% \vs{18}No man hath seen God at any time, the |
| 392 |
% only begotten Son, which is in the bosom of the |
| 393 |
% Father, he hath declared \added{him}. |
| 394 |
% \end{scripture} |
| 395 |
% \end{verbatim} |
| 396 |
% |
| 397 |
% \tcblower |
| 398 |
% |
| 399 |
% \begin{scripture}[John 1:18][verse/font=\bfseries, |
| 400 |
% verse/format=#1, verse/sep=0.5em, version=KJV] |
| 401 |
% \vs{18}No man hath seen God at any time, the |
| 402 |
% only begotten Son, which is in the bosom of the |
| 403 |
% Father, he hath declared \added{him}. |
| 404 |
% \end{scripture} |
| 405 |
% \end{scriptureexample} |
| 406 |
% |
| 407 |
% \changes{v2.2}{2025/03/02}{Add auto chapter numbering} |
| 408 |
% \begin{function}{\ch, \ch*, \newch, \newch*} |
| 409 |
% \begin{syntax} |
| 410 |
% |\ch|\oarg{letter}\marg{chapter number} |
| 411 |
% |\ch*|\oarg{letter}\marg{chapter number} |
| 412 |
% |\newch|\oarg{letter} |
| 413 |
% |\newch*|\oarg{letter} |
| 414 |
% \end{syntax} |
| 415 |
% Format a chapter number. By default these are formatted using drop text |
| 416 |
% taking up two lines and the text is separated from the chapter number by a |
| 417 |
% horizontal space of 0.5\,em. The drop text is aligned to the top of |
| 418 |
% \meta{letter} which defaults to the value of \opt{chapter/xchar}, which in |
| 419 |
% turn defaults to a capital \val{X} in the default font. |
| 420 |
% |
| 421 |
% If the \opt{chapter/drop} option is \val{true} (default), then this function |
| 422 |
% attempts to add sufficient space for the dropped chapter when its |
| 423 |
% paragraph contains only one line. The starred version suppresses this |
| 424 |
% behaviour. |
| 425 |
% |
| 426 |
% \cs{newch} and \cs{newch*} behave similarly except that the chapter number |
| 427 |
% is automatically incremented. The initial chapter can be set by passing |
| 428 |
% \opt{chapter} to the \env{scirpture} environment. |
| 429 |
% \end{function} |
| 430 |
% |
| 431 |
% \begin{scriptureexample}[lefthand ratio=0.55] |
| 432 |
% \textbf{\sffamily|\cs{ch}| example} |
| 433 |
% |
| 434 |
% \begin{verbatim} |
| 435 |
% \begin{scripture}[Exodus 20:1--2] |
| 436 |
% \ch{20}And God spoke all these words: |
| 437 |
% \begin{hanging} |
| 438 |
% \noindent\vs{2}`I am the \name{Lord} |
| 439 |
% your God, who brought you out of Egypt, |
| 440 |
% out of the land of slavery. |
| 441 |
% \end{hanging} |
| 442 |
% \end{scripture} |
| 443 |
% \end{verbatim} |
| 444 |
% |
| 445 |
% \medskip |
| 446 |
% |
| 447 |
% \textbf{\sffamily|\cs{ch*}| example} |
| 448 |
% |
| 449 |
% \begin{verbatim} |
| 450 |
% \begin{scripture}[Exodus 20:1--2] |
| 451 |
% \ch*{20}And God spoke all these words: |
| 452 |
% \begin{hanging} |
| 453 |
% \nohang\vs{2}`I am the \name{Lord} your |
| 454 |
% God, who brought you out of Egypt, out of |
| 455 |
% the land of slavery. |
| 456 |
% \end{hanging} |
| 457 |
% \end{scripture} |
| 458 |
% \end{verbatim} |
| 459 |
% |
| 460 |
% \tcblower |
| 461 |
% |
| 462 |
% \textbf{\sffamily|\cs{ch}| example} |
| 463 |
% |
| 464 |
% \medskip |
| 465 |
% |
| 466 |
% \begin{scripture}[Exodus 20:1--2] |
| 467 |
% \ch{20}And God spoke all these words: |
| 468 |
% \begin{hanging} |
| 469 |
% \noindent\vs{2}`I am the \name{Lord} |
| 470 |
% your God, who brought you out of Egypt, |
| 471 |
% out of the land of slavery. |
| 472 |
% \end{hanging} |
| 473 |
% \end{scripture} |
| 474 |
% |
| 475 |
% \bigskip |
| 476 |
% |
| 477 |
% \textbf{\sffamily|\cs{ch*}| example} |
| 478 |
% |
| 479 |
% \medskip |
| 480 |
% |
| 481 |
% \begin{scripture}[Exodus 20:1--2] |
| 482 |
% \ch*{20}And God spoke all these words: |
| 483 |
% \begin{hanging} |
| 484 |
% \nohang\vs{2}`I am the \name{Lord} your |
| 485 |
% God, who brought you out of Egypt, out of |
| 486 |
% the land of slavery. |
| 487 |
% \end{hanging} |
| 488 |
% \end{scripture} |
| 489 |
% \end{scriptureexample} |
| 490 |
% |
| 491 |
% \begin{function}{\extraskip} |
| 492 |
% \begin{syntax} |
| 493 |
% |\extraskip| |
| 494 |
% \end{syntax} |
| 495 |
% Add a small vertical space of \opt{extraskip} between a paragraph. This |
| 496 |
% function attempts to add additional space to avoid a clash with a drop |
| 497 |
% chapter if required. |
| 498 |
% \end{function} |
| 499 |
% |
| 500 |
% \begin{scriptureexample} |
| 501 |
% \begin{verbatim} |
| 502 |
% \begin{scripture}[Colossians 1:2] |
| 503 |
% \vs{2}To God's holy people in Colossae, the |
| 504 |
% faithful brothers and sisters in Christ: |
| 505 |
% |
| 506 |
% \extraskip |
| 507 |
% |
| 508 |
% Grace and peace to you from God our Father. |
| 509 |
% \end{scripture} |
| 510 |
% \end{verbatim} |
| 511 |
% |
| 512 |
% \tcblower |
| 513 |
% |
| 514 |
% \begin{scripture}[Colossians 1:2] |
| 515 |
% \vs{2}To God's holy people in Colossae, the |
| 516 |
% faithful brothers and sisters in Christ: |
| 517 |
% |
| 518 |
% \extraskip |
| 519 |
% |
| 520 |
% Grace and peace to you from God our Father. |
| 521 |
% \end{scripture} |
| 522 |
% \end{scriptureexample} |
| 523 |
% |
| 524 |
% \changes{v2.1}{2024/11/19}{Add feature to insert simple headings} |
| 525 |
% \changes{v2.1}{2024/11/19}{Add \fn{heading} function} |
| 526 |
% \begin{function}[added=2024-11-19]{\heading} |
| 527 |
% \begin{syntax} |
| 528 |
% |\heading|\marg{section heading} |
| 529 |
% \end{syntax} |
| 530 |
% The \fn{heading} function provides a simple section heading command for |
| 531 |
% use within the \env{scripture} environment. Only one level is heading is |
| 532 |
% provided. Further levels should be placed outside of the \env{scripture} |
| 533 |
% environment. Additionally, the \fn{heading} function may not be used |
| 534 |
% within a \env{scripture} inner environment. |
| 535 |
% |
| 536 |
% The settings of headings can be controlled using the following options: |
| 537 |
% \begin{itemize} |
| 538 |
% \item \opt{heading/aboveskip} |
| 539 |
% \item \opt{heading/afterindent} |
| 540 |
% \item \opt{heading/align} |
| 541 |
% \item \opt{heading/belowskip} |
| 542 |
% \item \opt{heading/font} |
| 543 |
% \item \opt{heading/format} |
| 544 |
% \item \opt{heading/hide} |
| 545 |
% \item \opt{heading/show} |
| 546 |
% \end{itemize} |
| 547 |
% |
| 548 |
% \noindent\textbf{Notes:} |
| 549 |
% \begin{itemize} |
| 550 |
% \item \cs{section} and related functions are not supported within the |
| 551 |
% \env{scripture} environment. |
| 552 |
% \item The \fn{heading} function is ignored when the \opt{inline} option |
| 553 |
% is \val{true}. |
| 554 |
% \end{itemize} |
| 555 |
% \end{function} |
| 556 |
% |
| 557 |
% \begin{scriptureexample} |
| 558 |
% \begin{verbatim} |
| 559 |
% \begin{scripture}[Luke 21:5–6] |
| 560 |
% \heading{Signs of the End of the Age} |
| 561 |
% |
| 562 |
% \vs{5}Some of his disciples were remarking |
| 563 |
% about how the temple was adorned with beautiful |
| 564 |
% stones and with gifts dedicated to God. But |
| 565 |
% Jesus said, \vs{6}``As for what you see here, |
| 566 |
% the time will come when not one stone will be |
| 567 |
% left on another; every one of them will be |
| 568 |
% thrown down.'' |
| 569 |
% \end{scripture} |
| 570 |
% \end{verbatim} |
| 571 |
% |
| 572 |
% \tcblower |
| 573 |
% |
| 574 |
% \begin{scripture}[Luke 21:5–6] |
| 575 |
% \heading{Signs of the End of the Age} |
| 576 |
% |
| 577 |
% \vs{5}Some of his disciples were remarking |
| 578 |
% about how the temple was adorned with beautiful |
| 579 |
% stones and with gifts dedicated to God. But |
| 580 |
% Jesus said, \vs{6}``As for what you see here, |
| 581 |
% the time will come when not one stone will be |
| 582 |
% left on another; every one of them will be |
| 583 |
% thrown down.'' |
| 584 |
% \end{scripture} |
| 585 |
% \end{scriptureexample} |
| 586 |
% |
| 587 |
% \changes{v1.2}{2022/09/01}{Add divine name feature} |
| 588 |
% \begin{function}[added=2022-09-01]{\name, \LORD, \GOD} |
| 589 |
% \begin{syntax} |
| 590 |
% |\name|\marg{divine name} |
| 591 |
% |\LORD| |
| 592 |
% |\GOD| |
| 593 |
% \end{syntax} |
| 594 |
% Modern Bible translations frequently represent God's personal divine name |
| 595 |
% using a small capitals typeface. This can be done using the \fn{name} |
| 596 |
% function. The font and format can be set using the \opt{name/font} and |
| 597 |
% \opt{name/format} options. The \fn{LORD} and \fn{GOD} macros equivalent to |
| 598 |
% \fn{name}|{Lord}| and \fn{name}|{God}| respectively. |
| 599 |
% |
| 600 |
% \textbf{Note:} Watch out that trailing spaces are not eaten by \fn{LORD} |
| 601 |
% and \fn{GOD}. Using \fn{name} is safer and semantically better. |
| 602 |
% \end{function} |
| 603 |
% |
| 604 |
% \begin{scriptureexample} |
| 605 |
% \begin{verbatim} |
| 606 |
% \begin{scripture}[Genesis 15:1--2][version=ESV] |
| 607 |
% \ch{15}After these things the word of the |
| 608 |
% \name{Lord} came to Abram in a vision: ``Fear |
| 609 |
% not, Abram, I am your shield; your reward shall |
| 610 |
% be very great.'' \vs{2}But Abram said, ``O Lord |
| 611 |
% \name{God}, what will you give me, for I |
| 612 |
% continue childless, and the heir of my house is |
| 613 |
% Eliezer of Damascus?'' |
| 614 |
% \end{scripture} |
| 615 |
% \end{verbatim} |
| 616 |
% |
| 617 |
% \tcblower |
| 618 |
% |
| 619 |
% \begin{scripture}[Genesis 15:1--2][version=ESV] |
| 620 |
% \ch{15}After these things the word of the |
| 621 |
% \name{Lord} came to Abram in a vision: ``Fear |
| 622 |
% not, Abram, I am your shield; your reward shall |
| 623 |
% be very great.'' \vs{2}But Abram said, ``O Lord |
| 624 |
% \name{God}, what will you give me, for I |
| 625 |
% continue childless, and the heir of my house is |
| 626 |
% Eliezer of Damascus?'' |
| 627 |
% \end{scripture} |
| 628 |
% \end{scriptureexample} |
| 629 |
% |
| 630 |
% \changes{v1.3}{2022/11/13}{Add \fn{nofirstverse} function} |
| 631 |
% \begin{function}[added=2022-11-13]{\nofirstverse} |
| 632 |
% \begin{syntax} |
| 633 |
% |\nofirstverse| |
| 634 |
% \end{syntax} |
| 635 |
% When \opt{verse/first} is |true|, this causes the next \fn{vs} to print |
| 636 |
% normally, rather than using the format specified by |
| 637 |
% \opt{verse/firstformat}. You might do this if your quote begins half way |
| 638 |
% through a paragraph and the first verse should be printed normally. |
| 639 |
% \end{function} |
| 640 |
% |
| 641 |
% \begin{function}{\nohang} |
| 642 |
% \begin{syntax} |
| 643 |
% |\nohang| |
| 644 |
% \end{syntax} |
| 645 |
% In a \env{hanging} environment, this function indents the first line of |
| 646 |
% the paragraph a length of \opt{hanging/hang} $+$ \opt{parindent}. |
| 647 |
% Remaining lines continue to be indented by a length of \opt{hanging/hang}. |
| 648 |
% \end{function} |
| 649 |
% |
| 650 |
% \begin{scriptureexample} |
| 651 |
% \begin{verbatim} |
| 652 |
% \begin{scripture}[Genesis 1:10--11] |
| 653 |
% \begin{hanging} |
| 654 |
% \noindent\vs{10}God called the dry ground |
| 655 |
% `land', and the gathered waters he called |
| 656 |
% `seas'. And God saw that it was good. |
| 657 |
% |
| 658 |
% \nohang\vs{11}Then God said, `Let the land |
| 659 |
% produce vegetation: seed-bearing plants and |
| 660 |
% trees on the land that bear fruit with seed |
| 661 |
% in it, according to their various kinds.' |
| 662 |
% And it was so. |
| 663 |
% \end{hanging} |
| 664 |
% \end{scripture} |
| 665 |
% \end{verbatim} |
| 666 |
% |
| 667 |
% \tcblower |
| 668 |
% |
| 669 |
% \begin{scripture}[Genesis 1:10--11] |
| 670 |
% \begin{hanging} |
| 671 |
% \noindent\vs{10}God called the dry ground |
| 672 |
% `land', and the gathered waters he called |
| 673 |
% `seas'. And God saw that it was good. |
| 674 |
% |
| 675 |
% \nohang\vs{11}Then God said, `Let the land |
| 676 |
% produce vegetation: seed-bearing plants and |
| 677 |
% trees on the land that bear fruit with seed |
| 678 |
% in it, according to their various kinds.' |
| 679 |
% And it was so. |
| 680 |
% \end{hanging} |
| 681 |
% \end{scripture} |
| 682 |
% \end{scriptureexample} |
| 683 |
% |
| 684 |
% \changes{v2.1}{2024/01/18}{Add \fn{nopilcrow} function} |
| 685 |
% \begin{function}[added=2024-01-18]{\nopilcrow} |
| 686 |
% \begin{syntax} |
| 687 |
% |\nopilcrow| |
| 688 |
% \end{syntax} |
| 689 |
% When \opt{pilcrow} is |true|, this causes the next pilcrow that would |
| 690 |
% normally by printed to be suppressed. You might do this if your quote |
| 691 |
% begins half way through a paragraph and so should not be marked with a |
| 692 |
% pilcrow. |
| 693 |
% \end{function} |
| 694 |
% |
| 695 |
% \changes{v1.2}{2022/08/31}{Add red letter feature} |
| 696 |
% \begin{function}[added=2022-08-31]{\redletteron, \redletteroff} |
| 697 |
% \begin{syntax} |
| 698 |
% |\redletteron| |
| 699 |
% |\redletteroff| |
| 700 |
% \end{syntax} |
| 701 |
% Use \fn{redletteron} and \fn{redletteroff} to mark the beginning and end |
| 702 |
% of sections of text that should be attributed to Jesus speaking. Some |
| 703 |
% attempt is made to ensure that the correct colour continues after an inner |
| 704 |
% environment if \fn{redletteron} or \fn{redletteroff} occurs inside the |
| 705 |
% inner environment. If you experience problems with unexpected colour, try |
| 706 |
% to ensure that matching \fn{redletteron} and \fn{redletteroff} marks occur |
| 707 |
% at the same group level. The colour of the text can be set using the |
| 708 |
% \opt{redletter/colour} option. These commands only have an effect when the |
| 709 |
% \opt{redletter} option is \val{true}. |
| 710 |
% \end{function} |
| 711 |
% |
| 712 |
% \begin{scriptureexample}[lefthand ratio=0.67] |
| 713 |
% \begin{verbatim} |
| 714 |
% \begin{scripture}[Matthew 21:16--17][redletter] |
| 715 |
% \vs{16}`Do you hear what these children are saying?' |
| 716 |
% they asked him. |
| 717 |
% |
| 718 |
% \redletteron `Yes,' \redletteroff replied Jesus, |
| 719 |
% \redletteron `have you |
| 720 |
% never read, |
| 721 |
% \begin{poetry} |
| 722 |
% `\thinspace ``From the lips of children and infants |
| 723 |
% you, Lord, have called forth your praise''?' |
| 724 |
% \end{poetry}\redletteroff |
| 725 |
% |
| 726 |
% \vs{17}And he left them and went out of the city to |
| 727 |
% Bethany, where he spent the night. |
| 728 |
% \end{scripture} |
| 729 |
% \end{verbatim} |
| 730 |
% |
| 731 |
% \tcblower |
| 732 |
% |
| 733 |
% \begin{scripture}[Matthew 21:16--17][redletter] |
| 734 |
% \vs{16}`Do you hear what these children are saying?' |
| 735 |
% they asked him. |
| 736 |
% |
| 737 |
% \redletteron `Yes,' \redletteroff replied Jesus, |
| 738 |
% \redletteron `have you |
| 739 |
% never read, |
| 740 |
% \begin{poetry} |
| 741 |
% `\thinspace ``From the lips of children and infants |
| 742 |
% you, Lord, have called forth your praise''?' |
| 743 |
% \end{poetry}\redletteroff |
| 744 |
% |
| 745 |
% \vs{17}And he left them and went out of the city to |
| 746 |
% Bethany, where he spent the night. |
| 747 |
% \end{scripture} |
| 748 |
% \end{scriptureexample} |
| 749 |
% |
| 750 |
% \changes{v1.1}{2022/08/07}{Add \fn{scripturecurrentchapter} and |
| 751 |
% \fn{scripturecurrentverse} variables} |
| 752 |
% \begin{function}[added=2022-08-07]{\scripturecurrentchapter, \scripturecurrentverse} |
| 753 |
% \begin{syntax} |
| 754 |
% |\scripturecurrentchapter| |
| 755 |
% |\scripturecurrentverse| |
| 756 |
% \end{syntax} |
| 757 |
% \fn{scripturecurrentchapter} and \fn{scripturecurrentverse} globally hold |
| 758 |
% the most recent values parsed to \fn{ch} and \fn{vs}. They can initialised |
| 759 |
% with \cs{renewcommand*} if required and could be used in hooks, for |
| 760 |
% example. |
| 761 |
% \end{function} |
| 762 |
% |
| 763 |
% \begin{function}{\scripturesetup} |
| 764 |
% \begin{syntax} |
| 765 |
% |\scripturesetup|\marg{options} |
| 766 |
% \end{syntax} |
| 767 |
% Set default format for quotations. See section \ref{options} for |
| 768 |
% supported formatting \meta{|options|}. |
| 769 |
% \end{function} |
| 770 |
% |
| 771 |
% \changes{v2.0}{2023/12/27}{Add \fn{scripturestyle} function} |
| 772 |
% \begin{function}[added=2023/12/27]{\scripturestyle, \scripturestyle*} |
| 773 |
% \begin{syntax} |
| 774 |
% |\scripturestyle|\marg{name}\marg{options} |
| 775 |
% |\scripturestyle*|\marg{name}\marg{options} |
| 776 |
% \end{syntax} |
| 777 |
% Set \meta{|options|} which are saved as style with \meta{|name|}. These |
| 778 |
% can later be set with the \opt{style} option. The starred version appends |
| 779 |
% \meta{|options|} to an existing style rather than overwriting all options. |
| 780 |
% \end{function} |
| 781 |
% |
| 782 |
% \changes{v1.1}{2022/07/29}{Add \fn{selah} function} |
| 783 |
% \begin{function}[added=2022-07-29]{\selah} |
| 784 |
% \begin{syntax} |
| 785 |
% |\selah| |
| 786 |
% \end{syntax} |
| 787 |
% In a \env{poetry} environment, this function inserts \emph{Selah} at the |
| 788 |
% end of the current line or the end of the following line if there is |
| 789 |
% insufficient room. See options \opt{selah/font}, \opt{selah/format}, |
| 790 |
% \opt{selah/sep} and \opt{selah/text} for options controlling the output. |
| 791 |
% \end{function} |
| 792 |
% |
| 793 |
% \begin{scriptureexample} |
| 794 |
% \begin{verbatim} |
| 795 |
% \begin{scripture}[Psalm 3:2][version=NIV84] |
| 796 |
% \begin{poetry} |
| 797 |
% \vs{2}Many are saying of me, |
| 798 |
% ``God will not deliver him.''\selah |
| 799 |
% \end{poetry} |
| 800 |
% \end{scripture} |
| 801 |
% \end{verbatim} |
| 802 |
% |
| 803 |
% \tcblower |
| 804 |
% |
| 805 |
% \begin{scripture}[Psalm 3:2][version=NIV84] |
| 806 |
% \begin{poetry} |
| 807 |
% \vs{2}Many are saying of me, |
| 808 |
% ``God will not deliver him.''\selah |
| 809 |
% \end{poetry} |
| 810 |
% \end{scripture} |
| 811 |
% \end{scriptureexample} |
| 812 |
% |
| 813 |
% \changes{v1.2}{2022/08/30}{Add \fn{textright} function} |
| 814 |
% \begin{function}[added=2022-08-30]{\textright} |
| 815 |
% \begin{syntax} |
| 816 |
% |\textright|\marg{text} |
| 817 |
% \end{syntax} |
| 818 |
% This function inserts \meta{|text|} at the end of the current line or the |
| 819 |
% end of the following line if there is insufficient room. The |
| 820 |
% \opt{textright/sep} option controls the minimum allowed space before the |
| 821 |
% \meta{|text|} to be right aligned. |
| 822 |
% \end{function} |
| 823 |
% |
| 824 |
% \begin{scriptureexample} |
| 825 |
% \begin{verbatim} |
| 826 |
% \begin{scripture}[Jeremiah 2:29] |
| 827 |
% \begin{poetry} |
| 828 |
% \vs{5}`Why do you bring charges against me? |
| 829 |
% You have all rebelled against me,' |
| 830 |
% \textright{declares the \name{Lord}.} |
| 831 |
% \end{poetry} |
| 832 |
% \end{scripture} |
| 833 |
% \end{verbatim} |
| 834 |
% |
| 835 |
% \tcblower |
| 836 |
% |
| 837 |
% \begin{scripture}[Jeremiah 2:29] |
| 838 |
% \begin{poetry} |
| 839 |
% \vs{5}`Why do you bring charges against me? |
| 840 |
% You have all rebelled against me,' |
| 841 |
% \textright{declares the \name{Lord}.} |
| 842 |
% \end{poetry} |
| 843 |
% \end{scripture} |
| 844 |
% \end{scriptureexample} |
| 845 |
% |
| 846 |
% \changes{v1.3}{2023/01/07}{Add \fn{textscripture} function} |
| 847 |
% \begin{function}[added=2023-01-07]{\textscripture} |
| 848 |
% \begin{syntax} |
| 849 |
% |\textscripture|\oarg{reference}\oarg{options}\marg{quotation} |
| 850 |
% \end{syntax} |
| 851 |
% \fn{textscripture} sets an inline scripture quotation. The quotation is |
| 852 |
% surrounded be the values of \opt{inline/begin} and \opt{inline/end} which |
| 853 |
% default to |``| and |''|, respectively. This function also sets the |
| 854 |
% \opt{compact} option and places the \meta{\val{reference}} inline. The |
| 855 |
% reference format can be controlled using the following options: |
| 856 |
% \begin{itemize} |
| 857 |
% \item \opt{inline/reference/format} |
| 858 |
% \item \opt{inline/reference/sep} |
| 859 |
% \item \opt{inline/version/delim} |
| 860 |
% \item \opt{inline/version/format} |
| 861 |
% \end{itemize} |
| 862 |
% Other \meta{\val{reference}} and \meta{\opt{version}} options are |
| 863 |
% inherited. |
| 864 |
% |
| 865 |
% This function is equivalent to using the \env{scripture} environment with |
| 866 |
% the \opt{inline} option. |
| 867 |
% |
| 868 |
% \textbf{Warning:} \cs{par} is redefined to \cs{relax} inside the |
| 869 |
% \fn{textscripture} function. If you have anything other than expected |
| 870 |
% macros and environments inside your \fn{textscripture} function \TeX{} |
| 871 |
% will likely get stuck in an infinite loop. |
| 872 |
% \end{function} |
| 873 |
% |
| 874 |
% \begin{scriptureexample} |
| 875 |
% \begin{verbatim} |
| 876 |
% A famous verse in the Bible is: |
| 877 |
% \textscripture[John 3:16][verse/hide]{\vs{16}For |
| 878 |
% God so loved the world that he gave his one and |
| 879 |
% only Son, that whoever believes in him shall not |
| 880 |
% perish but have eternal life.}. |
| 881 |
% \end{verbatim} |
| 882 |
% |
| 883 |
% \tcblower |
| 884 |
% |
| 885 |
% A famous verse in the Bible is: |
| 886 |
% \textscripture[John 3:16][verse/hide]{\vs{16}For |
| 887 |
% God so loved the world that he gave his one and |
| 888 |
% only Son, that whoever believes in him shall not |
| 889 |
% perish but have eternal life.}. |
| 890 |
% \end{scriptureexample} |
| 891 |
% |
| 892 |
% \changes{v2.2}{2025/03/02}{Add auto verse numbering} |
| 893 |
% \begin{function}{\vs, \newvs} |
| 894 |
% \begin{syntax} |
| 895 |
% |\vs|\marg{verse number} |
| 896 |
% |\newvs| |
| 897 |
% \end{syntax} |
| 898 |
% Format a verse number. By default these are formatted using a superscript. |
| 899 |
% |
| 900 |
% \cs{newvs} behaves similarly except that the verse number is automatically |
| 901 |
% incremented. The initial verse can be set by passing \opt{verse} to the |
| 902 |
% \env{scirpture} environment. |
| 903 |
% \end{function} |
| 904 |
% |
| 905 |
% \subsubsection{Environments} |
| 906 |
% |
| 907 |
% All scripture quotations must be set within a \env{scripture} environment. |
| 908 |
% The rest of the environments documented below are only defined with the |
| 909 |
% \env{scripture} environment. In most cases there is a default small |
| 910 |
% \meta{\opt{aboveskip}} and \meta{\opt{belowskip}} inserted above and below |
| 911 |
% these internal environments, but these are ignored if the environment is at |
| 912 |
% the start or end of a \env{scripture} environment. |
| 913 |
% |
| 914 |
% \begin{environment}{center} |
| 915 |
% \begin{syntax} |
| 916 |
% |\begin{center}|\oarg{options} |
| 917 |
% \quad\meta{centred text} |
| 918 |
% |\end{center}| |
| 919 |
% \end{syntax} |
| 920 |
% \end{environment} |
| 921 |
% |
| 922 |
% \noindent Environment for typesetting centred sections of scripture |
| 923 |
% quotations. |
| 924 |
% |
| 925 |
% See section \ref{centeroptions} for supported formatting \meta{|options|}. |
| 926 |
% |
| 927 |
% \begin{scriptureexample} |
| 928 |
% \begin{verbatim} |
| 929 |
% \begin{scripture}[Daniel 5:25] |
| 930 |
% \vs{25}`This is the inscription that was |
| 931 |
% written: |
| 932 |
% \begin{center} |
| 933 |
% \textsc{mene, mene, tekel, parsin} |
| 934 |
% \end{center} |
| 935 |
% \end{scripture} |
| 936 |
% \end{verbatim} |
| 937 |
% |
| 938 |
% \tcblower |
| 939 |
% |
| 940 |
% \begin{scripture}[Daniel 5:25] |
| 941 |
% \vs{25}`This is the inscription that was |
| 942 |
% written: |
| 943 |
% \begin{center} |
| 944 |
% \textsc{mene, mene, tekel, parsin} |
| 945 |
% \end{center} |
| 946 |
% \end{scripture} |
| 947 |
% \end{scriptureexample} |
| 948 |
% |
| 949 |
% \begin{environment}{flushright} |
| 950 |
% \begin{syntax} |
| 951 |
% |\begin{flushright}|\oarg{options} |
| 952 |
% \quad\meta{right aligned text} |
| 953 |
% |\end{flushright}| |
| 954 |
% \end{syntax} |
| 955 |
% \end{environment} |
| 956 |
% |
| 957 |
% \noindent Environment for typesetting right aligned sections of scripture |
| 958 |
% quotations. |
| 959 |
% |
| 960 |
% See section \ref{flushrightoptions} for supported formatting |
| 961 |
% \meta{|options|}. |
| 962 |
% |
| 963 |
% \begin{scriptureexample} |
| 964 |
% \begin{verbatim} |
| 965 |
% \begin{scripture}[Isaiah 40:5] |
| 966 |
% \begin{poetry}[belowskip = 0pt] |
| 967 |
% \vs{5}And the glory of the \name{Lord}\ldots |
| 968 |
% and all people will see it together. |
| 969 |
% \end{poetry} |
| 970 |
% |
| 971 |
% \begin{flushright}[aboveskip = 0pt] |
| 972 |
% For the mouth of the \name{Lord} \\ |
| 973 |
% has spoken.' |
| 974 |
% \end{flushright} |
| 975 |
% \end{scripture} |
| 976 |
% \end{verbatim} |
| 977 |
% |
| 978 |
% \tcblower |
| 979 |
% |
| 980 |
% \begin{scripture}[Isaiah 40:5] |
| 981 |
% \begin{poetry}[belowskip = 0pt] |
| 982 |
% \vs{5}And the glory of the \name{Lord}\ldots |
| 983 |
% and all people will see it together. |
| 984 |
% \end{poetry} |
| 985 |
% |
| 986 |
% \begin{flushright}[aboveskip = 0pt] |
| 987 |
% For the mouth of the \name{Lord} \\ |
| 988 |
% has spoken.' |
| 989 |
% \end{flushright} |
| 990 |
% \end{scripture} |
| 991 |
% \end{scriptureexample} |
| 992 |
% |
| 993 |
% \begin{environment}{hanging} |
| 994 |
% \begin{syntax} |
| 995 |
% |\begin{hanging}|\oarg{options} |
| 996 |
% \quad\meta{hanging text} |
| 997 |
% |\end{hanging}| |
| 998 |
% \end{syntax} |
| 999 |
% \end{environment} |
| 1000 |
% |
| 1001 |
% \noindent Environment for typesetting hanging sections of scripture |
| 1002 |
% quotations. |
| 1003 |
% |
| 1004 |
% See section \ref{hangingoptions} for supported formatting \meta{|options|}. |
| 1005 |
% |
| 1006 |
% \begin{scriptureexample} |
| 1007 |
% \begin{verbatim} |
| 1008 |
% \begin{scripture}[Genesis 1:3--5] |
| 1009 |
% \begin{hanging} |
| 1010 |
% \vs{3}And God said, `Let there be light,' and |
| 1011 |
% there was light. \vs{4}God saw that the light |
| 1012 |
% was good, and he separated the light from the |
| 1013 |
% darkness. \vs{5}God called the light `day', |
| 1014 |
% and the darkness he called `night'. And there |
| 1015 |
% was evening, and there was morn\-ing---the |
| 1016 |
% first day. |
| 1017 |
% \end{hanging} |
| 1018 |
% \end{scripture} |
| 1019 |
% \end{verbatim} |
| 1020 |
% |
| 1021 |
% \tcblower |
| 1022 |
% |
| 1023 |
% \begin{scripture}[Genesis 1:3--5] |
| 1024 |
% \begin{hanging} |
| 1025 |
% \vs{3}And God said, `Let there be light,' and |
| 1026 |
% there was light. \vs{4}God saw that the light |
| 1027 |
% was good, and he separated the light from the |
| 1028 |
% darkness. \vs{5}God called the light `day', |
| 1029 |
% and the darkness he called `night'. And there |
| 1030 |
% was evening, and there was morn\-ing---the |
| 1031 |
% first day. |
| 1032 |
% \end{hanging} |
| 1033 |
% \end{scripture} |
| 1034 |
% \end{scriptureexample} |
| 1035 |
% |
| 1036 |
% \begin{environment}{midparachap} |
| 1037 |
% \begin{syntax} |
| 1038 |
% |\begin{midparachap}|\oarg{options} |
| 1039 |
% \quad\meta{text containing a chapter break} |
| 1040 |
% |\end{midparachap}| |
| 1041 |
% \end{syntax} |
| 1042 |
% \end{environment} |
| 1043 |
% |
| 1044 |
% \noindent Environment for typesetting paragraph with a chapter break within |
| 1045 |
% it. |
| 1046 |
% |
| 1047 |
% See section \ref{midparachapoptions} for supported formatting |
| 1048 |
% \meta{|options|}. |
| 1049 |
% |
| 1050 |
% \begin{scriptureexample} |
| 1051 |
% \begin{verbatim} |
| 1052 |
% \begin{scripture}[1 Corinthians 10:31--11:1] |
| 1053 |
% \begin{midparachap} |
| 1054 |
% \vs{31}So whether you eat or drink or |
| 1055 |
% whatever you do, do it all for the glory of |
| 1056 |
% God. \vs{32}Do not cause anyone to stumble, |
| 1057 |
% whether Jews, Greeks or the church of |
| 1058 |
% God---\vs{33}even as I try to please everyone |
| 1059 |
% in every way. For I am not seeking my own |
| 1060 |
% good but the good of many, so that they may |
| 1061 |
% be saved. \ch{11}Follow my example, as I |
| 1062 |
% follow the example of Christ. |
| 1063 |
% \end{midparachap} |
| 1064 |
% \end{scripture} |
| 1065 |
% \end{verbatim} |
| 1066 |
% |
| 1067 |
% \tcblower |
| 1068 |
% |
| 1069 |
% \begin{scripture}[1 Corinthians 10:31--11:1] |
| 1070 |
% \begin{midparachap} |
| 1071 |
% \vs{31}So whether you eat or drink or |
| 1072 |
% whatever you do, do it all for the glory of |
| 1073 |
% God. \vs{32}Do not cause anyone to stumble, |
| 1074 |
% whether Jews, Greeks or the church of |
| 1075 |
% God---\vs{33}even as I try to please everyone |
| 1076 |
% in every way. For I am not seeking my own |
| 1077 |
% good but the good of many, so that they may |
| 1078 |
% be saved. \ch{11}Follow my example, as I |
| 1079 |
% follow the example of Christ. |
| 1080 |
% \end{midparachap} |
| 1081 |
% \end{scripture} |
| 1082 |
% \end{scriptureexample} |
| 1083 |
% |
| 1084 |
% \begin{environment}{narrow} |
| 1085 |
% \begin{syntax} |
| 1086 |
% |\begin{narrow}|\oarg{options} |
| 1087 |
% \quad\meta{quotation} |
| 1088 |
% |\end{narrow}| |
| 1089 |
% \end{syntax} |
| 1090 |
% \end{environment} |
| 1091 |
% |
| 1092 |
% \noindent Environment for typesetting narrow sections of scripture |
| 1093 |
% quotations. If there is no blank line before the start of a \env{narrow} |
| 1094 |
% environment the indent will be suppressed. |
| 1095 |
% |
| 1096 |
% See section \ref{narrowoptions} for supported formatting \meta{|options|}. |
| 1097 |
% |
| 1098 |
% \begin{scriptureexample} |
| 1099 |
% \begin{verbatim} |
| 1100 |
% \begin{scripture}[2 Kings 18:18--19] |
| 1101 |
% \vs{18}They called for the king; and Eliakim |
| 1102 |
% son of Hilkiah the palace administrator, Shebna |
| 1103 |
% the secretary, and Joah son of Asaph the |
| 1104 |
% recorder went out to them. |
| 1105 |
% |
| 1106 |
% \vs{19}The field commander said to them, `Tell |
| 1107 |
% Hezekiah: |
| 1108 |
% |
| 1109 |
% \begin{narrow} |
| 1110 |
% `\thinspace``This is what the great king, the |
| 1111 |
% king of Assyria, says: on what are you basing |
| 1112 |
% this confidence of yours? |
| 1113 |
% \end{narrow} |
| 1114 |
% \end{scripture} |
| 1115 |
% \end{verbatim} |
| 1116 |
% |
| 1117 |
% \tcblower |
| 1118 |
% |
| 1119 |
% \begin{scripture}[2 Kings 18:18--19] |
| 1120 |
% \vs{18}They called for the king; and Eliakim |
| 1121 |
% son of Hilkiah the palace administrator, Shebna |
| 1122 |
% the secretary, and Joah son of Asaph the |
| 1123 |
% recorder went out to them. |
| 1124 |
% |
| 1125 |
% \vs{19}The field commander said to them, `Tell |
| 1126 |
% Hezekiah: |
| 1127 |
% |
| 1128 |
% \begin{narrow} |
| 1129 |
% `\thinspace``This is what the great king, the |
| 1130 |
% king of Assyria, says: on what are you basing |
| 1131 |
% this confidence of yours? |
| 1132 |
% \end{narrow} |
| 1133 |
% \end{scripture} |
| 1134 |
% \end{scriptureexample} |
| 1135 |
% |
| 1136 |
% \begin{environment}{poetry} |
| 1137 |
% \begin{syntax} |
| 1138 |
% |\begin{poetry}|\oarg{options} |
| 1139 |
% \quad\meta{first half of verse} |
| 1140 |
% \quad\meta{second half of verse} |
| 1141 |
% \quad |
| 1142 |
% \quad\meta{first half of verse} |
| 1143 |
% \quad\meta{second half of verse} |
| 1144 |
% |\end{poetry}| |
| 1145 |
% \end{syntax} |
| 1146 |
% \end{environment} |
| 1147 |
% |
| 1148 |
% \noindent Environment for typesetting poetry sections of scripture |
| 1149 |
% quotations. |
| 1150 |
% |
| 1151 |
% Poetry sections of the Bible often have a first half and a parallel second |
| 1152 |
% half which is indented a little. These should be set on separate consecutive |
| 1153 |
% lines. Leaving a blank line indicates that the next line should return to |
| 1154 |
% the first half indent. |
| 1155 |
% |
| 1156 |
% See section \ref{poetryoptions} for supported formatting \meta{|options|}. |
| 1157 |
% |
| 1158 |
% \begin{scriptureexample} |
| 1159 |
% \begin{verbatim} |
| 1160 |
% \begin{scripture}[Isaiah 1:2] |
| 1161 |
% \begin{poetry} |
| 1162 |
% \vs{2}Hear me, you heavens! Listen, earth! |
| 1163 |
% For the \name{Lord} has spoken: |
| 1164 |
% |
| 1165 |
% `I reared children and brought them up, |
| 1166 |
% but they have rebelled against me. |
| 1167 |
% \end{poetry} |
| 1168 |
% \end{scripture} |
| 1169 |
% \end{verbatim} |
| 1170 |
% |
| 1171 |
% \tcblower |
| 1172 |
% |
| 1173 |
% \begin{scripture}[Isaiah 1:2] |
| 1174 |
% \begin{poetry} |
| 1175 |
% \vs{2}Hear me, you heavens! Listen, earth! |
| 1176 |
% For the \name{Lord} has spoken: |
| 1177 |
% |
| 1178 |
% `I reared children and brought them up, |
| 1179 |
% but they have rebelled against me. |
| 1180 |
% \end{poetry} |
| 1181 |
% \end{scripture} |
| 1182 |
% \end{scriptureexample} |
| 1183 |
% |
| 1184 |
% \begin{environment}{scripture} |
| 1185 |
% \begin{syntax} |
| 1186 |
% |\begin{scripture}|\oarg{reference}\oarg{options} |
| 1187 |
% \quad\meta{quotation} |
| 1188 |
% |\end{scripture}| |
| 1189 |
% \end{syntax} |
| 1190 |
% \end{environment} |
| 1191 |
% |
| 1192 |
% \noindent Main environment for typesetting scripture quotations. |
| 1193 |
% |
| 1194 |
% The optional \meta{|reference|} is printed at the end of the quotation. See |
| 1195 |
% section \ref{options} for supported formatting \meta{|options|}. |
| 1196 |
% |
| 1197 |
% \begin{scriptureexample} |
| 1198 |
% \begin{verbatim} |
| 1199 |
% \begin{scripture}[John 3:16][version=NIV] |
| 1200 |
% \vs{16}For God so loved the world that he gave |
| 1201 |
% his one and only Son, that whoever believes in |
| 1202 |
% him shall not perish but have eternal life. |
| 1203 |
% \end{scripture} |
| 1204 |
% \end{verbatim} |
| 1205 |
% |
| 1206 |
% \tcblower |
| 1207 |
% |
| 1208 |
% \begin{scripture}[John 3:16][version=NIV] |
| 1209 |
% \vs{16}For God so loved the world that he gave |
| 1210 |
% his one and only Son, that whoever believes in |
| 1211 |
% him shall not perish but have eternal life. |
| 1212 |
% \end{scripture} |
| 1213 |
% \end{scriptureexample} |
| 1214 |
% |
| 1215 |
% \subsection{Provided hooks} |
| 1216 |
% |
| 1217 |
% \changes{v1.1}{2022/08/07}{Add before and after hooks for verses and |
| 1218 |
% chapters} |
| 1219 |
% \begin{hooks}[added=2022-08-07]{scripture/chap/before, scripture/chap/after, scripture/verse/before, scripture/verse/after} |
| 1220 |
% The following public hooks are available: |
| 1221 |
% |
| 1222 |
% \begin{description} |
| 1223 |
% \item[\hook{scripture/chap/before}] This hook is executed immediately |
| 1224 |
% before the \opt{chapter/font} is set for the chapter. |
| 1225 |
% \item[\hook{scripture/chap/after}] This hook is executed immediately after |
| 1226 |
% the \opt{chapter/sep} space is inserted. |
| 1227 |
% \item[\hook{scripture/verse/before}] This hook is executed immediately |
| 1228 |
% before the \opt{verse/font} is set for the verse. |
| 1229 |
% \item[\hook{scripture/verse/after}] This hook is executed immediately after |
| 1230 |
% the \opt{verse/sep} space is inserted. |
| 1231 |
% \end{description} |
| 1232 |
% \end{hooks} |
| 1233 |
% |
| 1234 |
% The following example illustrates how these hooks could be used to place the |
| 1235 |
% first and last verse on the page into the header. |
| 1236 |
% |
| 1237 |
% \begin{scriptureexample} |
| 1238 |
% \begin{verbatim} |
| 1239 |
% \documentclass{article} |
| 1240 |
% \usepackage{scripture} |
| 1241 |
% \AddToHook{scripture/chap/after}{% |
| 1242 |
% \markboth |
| 1243 |
% {Mark \scripturecurrentchapter |
| 1244 |
% :\scripturecurrentverse} |
| 1245 |
% {Mark \scripturecurrentchapter |
| 1246 |
% :\scripturecurrentverse}} |
| 1247 |
% \AddToHook{scripture/verse/after}{% |
| 1248 |
% \markboth |
| 1249 |
% {Mark \scripturecurrentchapter |
| 1250 |
% :\scripturecurrentverse} |
| 1251 |
% {Mark \scripturecurrentchapter |
| 1252 |
% :\scripturecurrentverse}} |
| 1253 |
% \renewcommand*{\scripturecurrentchapter}{1} |
| 1254 |
% \usepackage{fancyhdr} |
| 1255 |
% \pagestyle{fancy} |
| 1256 |
% \fancyhf{} |
| 1257 |
% \lhead{\textbf{\rightmark}} |
| 1258 |
% \rhead{\textbf{\leftmark} \textbar\ \thepage} |
| 1259 |
% \begin{document} |
| 1260 |
% \begin{scripture}[][noindent] |
| 1261 |
% \vs{45}Instead he went out and began to talk |
| 1262 |
% freely, spreading the news. As a result, Jesus |
| 1263 |
% could no longer enter a town openly but stayed |
| 1264 |
% outside in lonely places. Yet the people still |
| 1265 |
% came to him from everywhere. |
| 1266 |
% |
| 1267 |
% \extraskip |
| 1268 |
% |
| 1269 |
% \ch{2}A few days later, when Jesus again |
| 1270 |
% entered Capernaum, the people heard that he had |
| 1271 |
% come home. |
| 1272 |
% \end{scripture} |
| 1273 |
% \end{document} |
| 1274 |
% \end{verbatim} |
| 1275 |
% |
| 1276 |
% \tcblower |
| 1277 |
% |
| 1278 |
% \textbf{Mark 1:45\hfill Mark 2:1} \textbar\ 1 |
| 1279 |
% |
| 1280 |
% \rule[2mm]{\linewidth}{0.4pt} |
| 1281 |
% |
| 1282 |
% \begin{scripture}[][noindent] |
| 1283 |
% \vs{45}Instead he went out and began to talk |
| 1284 |
% freely, spreading the news. As a result, Jesus |
| 1285 |
% could no longer enter a town openly but stayed |
| 1286 |
% outside in lonely places. Yet the people still |
| 1287 |
% came to him from everywhere. |
| 1288 |
% |
| 1289 |
% \extraskip |
| 1290 |
% |
| 1291 |
% \ch{2}A few days later, when Jesus again |
| 1292 |
% entered Capernaum, the people heard that he had |
| 1293 |
% come home. |
| 1294 |
% \end{scripture} |
| 1295 |
% \end{scriptureexample} |
| 1296 |
% |
| 1297 |
% \subsection{Options} |
| 1298 |
% \label{options} |
| 1299 |
% |
| 1300 |
% \changes{v1.3}{2023/01/08}{Remove \texttt{reference/delim} option} |
| 1301 |
% |
| 1302 |
% Default formatting \meta{|options|} can be set using |
| 1303 |
% \cs{usepackage}|[|\meta{|options|}|]{scripture}| or |
| 1304 |
% \fn{scripturesetup}|{|\meta{|options|}|}|. Local formatting \meta{|options|} |
| 1305 |
% can be set by passing them to the various environments described above. |
| 1306 |
% |
| 1307 |
% \begin{option}{aboveskip} |
| 1308 |
% \begin{syntax} |
| 1309 |
% aboveskip = \meta{skip} \hfill Default: 0pt |
| 1310 |
% \end{syntax} |
| 1311 |
% \meta{|skip|} inserted above the \env{scripture} environment. |
| 1312 |
% \end{option} |
| 1313 |
% |
| 1314 |
% \changes{v1.3}{2022/11/15}{Add \opt{added/font} option} |
| 1315 |
% \begin{option}[added=2022-11-15]{added/font} |
| 1316 |
% \begin{syntax} |
| 1317 |
% added/font = \meta{font} \hfill Default: \emph{Empty} |
| 1318 |
% \end{syntax} |
| 1319 |
% \meta{|font|} used for the \fn{added} function. |
| 1320 |
% \end{option} |
| 1321 |
% |
| 1322 |
% \changes{v1.3}{2022/11/15}{Add \opt{added/format} option} |
| 1323 |
% \begin{option}[added=2022-11-15]{added/format} |
| 1324 |
% \begin{syntax} |
| 1325 |
% added/format = \meta{macro} \hfill Default: \cs{emph}\{\#1\} |
| 1326 |
% \end{syntax} |
| 1327 |
% \meta{|macro|} used to format the words that should be highlighted as |
| 1328 |
% added by the translators using the \fn{added} function. |#1| contains the |
| 1329 |
% text of the argument to \fn{added}. |
| 1330 |
% \end{option} |
| 1331 |
% |
| 1332 |
% \changes{v2.1}{2024/06/01}{Add \opt{after} option} |
| 1333 |
% \begin{option}[added=2024-06-01]{after} |
| 1334 |
% \begin{syntax} |
| 1335 |
% after = \meta{token list} \hfill Default: \emph{Empty} |
| 1336 |
% \end{syntax} |
| 1337 |
% Execute \meta{|token list|} at the end of the \env{scripture} environment. |
| 1338 |
% \end{option} |
| 1339 |
% |
| 1340 |
% \changes{v2.1}{2024/06/01}{Add \opt{before} option} |
| 1341 |
% \begin{option}[added=2024-06-01]{before} |
| 1342 |
% \begin{syntax} |
| 1343 |
% before = \meta{token list} \hfill Default: \emph{Empty} |
| 1344 |
% \end{syntax} |
| 1345 |
% Execute \meta{|token list|} at the beginning of the \env{scripture} |
| 1346 |
% environment. |
| 1347 |
% \end{option} |
| 1348 |
% |
| 1349 |
% \begin{option}{belowskip} |
| 1350 |
% \begin{syntax} |
| 1351 |
% belowskip = \meta{skip} \hfill Default: 0pt |
| 1352 |
% \end{syntax} |
| 1353 |
% \meta{|skip|} inserted below the \env{scripture} environment. |
| 1354 |
% \end{option} |
| 1355 |
% |
| 1356 |
% \changes{v2.2}{2025/03/02}{Add \opt{book} option} |
| 1357 |
% \begin{option}[added=2025-03-02]{book} |
| 1358 |
% \begin{syntax} |
| 1359 |
% book = name\hfill Default: \emph{Empty} |
| 1360 |
% \end{syntax} |
| 1361 |
% Initialise the book name for the current quotation. |
| 1362 |
% |
| 1363 |
% See also \opt{chapter} and \opt{verse}. |
| 1364 |
% \end{option} |
| 1365 |
% |
| 1366 |
% \changes{v2.2}{2025/03/02}{Add \opt{chapter} option} |
| 1367 |
% \begin{option}[added=2025-03-02]{chapter} |
| 1368 |
% \begin{syntax} |
| 1369 |
% chapter = \meta{integer}\hfill Default: 1 |
| 1370 |
% \end{syntax} |
| 1371 |
% Initialise the chapter number when using automatic chapter numbering with |
| 1372 |
% \cs{newch}. |
| 1373 |
% |
| 1374 |
% See also \opt{book} and \opt{verse}. |
| 1375 |
% \end{option} |
| 1376 |
% |
| 1377 |
% \changes{v2.1}{2024/12/30}{Add \opt{chapter/align} option} |
| 1378 |
% \begin{option}[added=2024-12-30]{chapter/align} |
| 1379 |
% \begin{syntax} |
| 1380 |
% chapter/align = left \textbar\ right\hfill Default: left |
| 1381 |
% \end{syntax} |
| 1382 |
% When \opt{chapter/align} is set to \val{right} a chapter will overlap to |
| 1383 |
% the left when \opt{chapter/nodrop} is set. |
| 1384 |
% |
| 1385 |
% See also \opt{chapter/valign}. |
| 1386 |
% \end{option} |
| 1387 |
% |
| 1388 |
% \changes{v1.2}{2022/09/07}{Add \opt{chapter/colour} option} |
| 1389 |
% \begin{option}[added=2022-09-07]{chapter/colour, chapter/color} |
| 1390 |
% \begin{syntax} |
| 1391 |
% chapter/colour = \meta{colour expression} \hfill Default: . |
| 1392 |
% \end{syntax} |
| 1393 |
% The \pkg{l3color} \meta{|colour expression|} to be used for chapter |
| 1394 |
% numbers. By default the current colour is inherited. \opt{chapter/color} |
| 1395 |
% is an alias for \opt{chapter/colour}. |
| 1396 |
% \end{option} |
| 1397 |
% |
| 1398 |
% \begin{option}{chapter/drop} |
| 1399 |
% \begin{syntax} |
| 1400 |
% chapter/drop = \meta{boolean} \hfill Default: true |
| 1401 |
% \end{syntax} |
| 1402 |
% Whether the chapter should be set as a drop letter taking up two |
| 1403 |
% lines or as a normal letter taking up one line. The value of |
| 1404 |
% \meta{|boolean|} is optional and assumed to be \val{true} if not present. |
| 1405 |
% This option is the opposite of \opt{chapter/nodrop}. |
| 1406 |
% \end{option} |
| 1407 |
% |
| 1408 |
% \begin{option}{chapter/font} |
| 1409 |
% \begin{syntax} |
| 1410 |
% chapter/font = \meta{font} \hfill Default: \cs{bfseries} |
| 1411 |
% \end{syntax} |
| 1412 |
% \meta{|font|} used for the \fn{ch} function. |
| 1413 |
% \end{option} |
| 1414 |
% |
| 1415 |
% \changes{v1.1}{2022/07/28}{Add \opt{chapter/format} option} |
| 1416 |
% \begin{option}[added=2022-07-28]{chapter/format} |
| 1417 |
% \begin{syntax} |
| 1418 |
% chapter/format = \meta{macro} \hfill Default: \#1 |
| 1419 |
% \end{syntax} |
| 1420 |
% \meta{|macro|} used to format the \val{chapter} for a \env{scripture} |
| 1421 |
% quotation. |#1| contains the text of the \val{chapter}. |
| 1422 |
% \end{option} |
| 1423 |
% |
| 1424 |
% \changes{v1.1}{2022/08/15}{Add \opt{chapter/hide} option} |
| 1425 |
% \begin{option}[added=2022-08-15]{chapter/hide} |
| 1426 |
% \begin{syntax} |
| 1427 |
% chapter/hide = \meta{boolean} \hfill Default: false |
| 1428 |
% \end{syntax} |
| 1429 |
% Whether chapters should be shown or hidden. The value of \meta{|boolean|} |
| 1430 |
% is optional and assumed to be \val{true} if not present. This option is |
| 1431 |
% the opposite of \opt{chapter/show}. Note that the \hook{scripture/chap/before} |
| 1432 |
% and \hook{scripture/chap/after} hooks are still executed when chapters are |
| 1433 |
% hidden. |
| 1434 |
% \end{option} |
| 1435 |
% |
| 1436 |
% \begin{scriptureexample} |
| 1437 |
% \begin{verbatim} |
| 1438 |
% \begin{scripture}[Romans 5:1--2][chapter/hide] |
| 1439 |
% \ch{5}Therefore, since we have been justified |
| 1440 |
% through faith, we have peace with God through |
| 1441 |
% our Lord Jesus Christ, \vs{2}through whom we |
| 1442 |
% have gained access by faith into this grace in |
| 1443 |
% which we now stand. And we boast in the hope of |
| 1444 |
% the glory of God. |
| 1445 |
% \end{scripture} |
| 1446 |
% \end{verbatim} |
| 1447 |
% |
| 1448 |
% \tcblower |
| 1449 |
% |
| 1450 |
% \begin{scripture}[Romans 5:1--2][chapter/hide] |
| 1451 |
% \ch{5}Therefore, since we have been justified |
| 1452 |
% through faith, we have peace with God through |
| 1453 |
% our Lord Jesus Christ, \vs{2}through whom we |
| 1454 |
% have gained access by faith into this grace in |
| 1455 |
% which we now stand. And we boast in the hope of |
| 1456 |
% the glory of God. |
| 1457 |
% \end{scripture} |
| 1458 |
% \end{scriptureexample} |
| 1459 |
% |
| 1460 |
% \begin{option}{chapter/nodrop} |
| 1461 |
% \begin{syntax} |
| 1462 |
% chapter/nodrop = \meta{boolean} \hfill Default: false |
| 1463 |
% \end{syntax} |
| 1464 |
% Whether the chapter should be set as a drop letter taking up two lines or |
| 1465 |
% as a normal letter taking up one line. The value of \meta{|boolean|} is |
| 1466 |
% optional and assumed to be \val{true} if not present. This option is the |
| 1467 |
% opposite of \opt{chapter/drop}. |
| 1468 |
% \end{option} |
| 1469 |
% |
| 1470 |
% \begin{scriptureexample} |
| 1471 |
% \begin{verbatim} |
| 1472 |
% \begin{scripture}[John 1:1--3][chapter/nodrop] |
| 1473 |
% \ch{1}In the beginning was the Word, and the |
| 1474 |
% Word was with God, and the Word was God. |
| 1475 |
% \vs{2}He was with God in the beginning. |
| 1476 |
% \vs{3}Through him all things were made; without |
| 1477 |
% him nothing was made that has been made. |
| 1478 |
% \end{scripture} |
| 1479 |
% \end{verbatim} |
| 1480 |
% |
| 1481 |
% \tcblower |
| 1482 |
% |
| 1483 |
% \begin{scripture}[John 1:1--3][chapter/nodrop] |
| 1484 |
% \ch{1}In the beginning was the Word, and the |
| 1485 |
% Word was with God, and the Word was God. |
| 1486 |
% \vs{2}He was with God in the beginning. |
| 1487 |
% \vs{3}Through him all things were made; without |
| 1488 |
% him nothing was made that has been made. |
| 1489 |
% \end{scripture} |
| 1490 |
% \end{scriptureexample} |
| 1491 |
% |
| 1492 |
% \changes{v2.1}{2024/01/05}{Add feature to set chapters in a paragraph of |
| 1493 |
% their own} |
| 1494 |
% \changes{v2.1}{2024/01/05}{Add \opt{chapter/para} option} |
| 1495 |
% \begin{option}[added=2024-01-05]{chapter/para} |
| 1496 |
% \begin{syntax} |
| 1497 |
% chapter/para = \meta{boolean} \hfill Default: false |
| 1498 |
% \end{syntax} |
| 1499 |
% Set chapters in their own paragraph. The spacing before and after the |
| 1500 |
% chapter heading can be set using the \opt{chapter/para/aboveskip} and |
| 1501 |
% \opt{chapter/para/belowskip} options. The value of \meta{|boolean|} is |
| 1502 |
% optional and assumed to be \val{true} if not present. |
| 1503 |
% \end{option} |
| 1504 |
% |
| 1505 |
% \begin{scriptureexample} |
| 1506 |
% \begin{verbatim} |
| 1507 |
% \begin{scripture}[John 1:1][chapter/para, |
| 1508 |
% chapter/format=CHAPTER~#1, version=KJV] |
| 1509 |
% \ch{1}In the beginning was the Word, and the |
| 1510 |
% Word was with God, and the Word was God. |
| 1511 |
% \end{scripture} |
| 1512 |
% \end{verbatim} |
| 1513 |
% |
| 1514 |
% \tcblower |
| 1515 |
% |
| 1516 |
% \begin{scripture}[John 1:1][chapter/para, |
| 1517 |
% chapter/format=CHAPTER~#1, version=KJV] |
| 1518 |
% \ch{1}In the beginning was the Word, and the |
| 1519 |
% Word was with God, and the Word was God. |
| 1520 |
% \end{scripture} |
| 1521 |
% \end{scriptureexample} |
| 1522 |
% |
| 1523 |
% \changes{v2.1}{2024/01/05}{Add \opt{chapter/para/aboveskip} option} |
| 1524 |
% \begin{option}[added=2024-01-05]{chapter/para/aboveskip} |
| 1525 |
% \begin{syntax} |
| 1526 |
% chapter/para/aboveskip = \meta{skip} \hfill Default: \cs{bigskipamount} |
| 1527 |
% \end{syntax} |
| 1528 |
% \meta{|skip|} added above \fn{ch} when \opt{chapter/para} is in effect. |
| 1529 |
% To be consistent with how the \pkg{parskip} package treats headings, no |
| 1530 |
% additional \cs{parskip} is inserted. |
| 1531 |
% \end{option} |
| 1532 |
% |
| 1533 |
% \changes{v2.1}{2024/01/05}{Add \opt{chapter/para/belowskip} option} |
| 1534 |
% \begin{option}[added=2024-01-05]{chapter/para/belowskip} |
| 1535 |
% \begin{syntax} |
| 1536 |
% chapter/para/belowskip = \meta{skip} \hfill Default: \cs{medskipamount} |
| 1537 |
% \end{syntax} |
| 1538 |
% \meta{|skip|} added below \fn{ch} when \opt{chapter/para} is in effect. |
| 1539 |
% To be consistent with how the \pkg{parskip} package treats headings, no |
| 1540 |
% additional \cs{parskip} is inserted. |
| 1541 |
% \end{option} |
| 1542 |
% |
| 1543 |
% \changes{v2.1}{2024/01/05}{Add \opt{chapter/para/indent} option} |
| 1544 |
% \begin{option}[added=2024-01-05]{chapter/para/indent} |
| 1545 |
% \begin{syntax} |
| 1546 |
% chapter/para/indent = \meta{boolean} \hfill Default: true |
| 1547 |
% \end{syntax} |
| 1548 |
% Whether to indent the line following a chapter heading when the |
| 1549 |
% \opt{chapter/para} option is set to \val{true}. This only has an effect in |
| 1550 |
% the \env{scripture}, \env{narrow} and \env{midparachap} environments. The |
| 1551 |
% value of \meta{|boolean|} is optional and assumed to be \val{true} if not |
| 1552 |
% present. |
| 1553 |
% \end{option} |
| 1554 |
% |
| 1555 |
% \begin{option}{chapter/sep} |
| 1556 |
% \begin{syntax} |
| 1557 |
% chapter/sep = \meta{dimen} \hfill Default: 0.5em |
| 1558 |
% \end{syntax} |
| 1559 |
% \meta{|dimen|} used to separate a \fn{ch} from the following text. |
| 1560 |
% \end{option} |
| 1561 |
% |
| 1562 |
% \changes{v1.1}{2022/08/15}{Add \opt{chapter/show} option} |
| 1563 |
% \begin{option}[added=2022-08-15]{chapter/show} |
| 1564 |
% \begin{syntax} |
| 1565 |
% chapter/show = \meta{boolean} \hfill Default: true |
| 1566 |
% \end{syntax} |
| 1567 |
% Whether chapters should be shown or hidden. The value of \meta{|boolean|} |
| 1568 |
% is optional and assumed to be \val{true} if not present. This option is |
| 1569 |
% the opposite of \opt{chapter/hide}. |
| 1570 |
% \end{option} |
| 1571 |
% |
| 1572 |
% \changes{v1.1}{2022/11/14}{Add \opt{chapter/showverse} option} |
| 1573 |
% \begin{option}[added=2022-11-14]{chapter/showverse} |
| 1574 |
% \begin{syntax} |
| 1575 |
% chapter/showverse = \meta{boolean} \hfill Default: false |
| 1576 |
% \end{syntax} |
| 1577 |
% Whether \fn{vs}|{1}| should be automatically inserted after \fn{ch}. The |
| 1578 |
% value of \meta{|boolean|} is optional and assumed to be \val{true} if not |
| 1579 |
% present. See also \opt{midparachap/showverse} and |
| 1580 |
% \opt{midparachap/hideverse}. Note that \opt{chapter/showverse} take |
| 1581 |
% precedence over \opt{midparachap/hideverse}. |
| 1582 |
% \end{option} |
| 1583 |
% |
| 1584 |
% \begin{scriptureexample} |
| 1585 |
% \begin{verbatim} |
| 1586 |
% \begin{scripture}[John 1:1][chapter/showverse] |
| 1587 |
% \ch{1}In the beginning was the Word, and the |
| 1588 |
% Word was with God, and the Word was God. |
| 1589 |
% \end{scripture} |
| 1590 |
% \end{verbatim} |
| 1591 |
% |
| 1592 |
% \tcblower |
| 1593 |
% |
| 1594 |
% \begin{scripture}[John 1:1][chapter/showverse] |
| 1595 |
% \ch{1}In the beginning was the Word, and the |
| 1596 |
% Word was with God, and the Word was God. |
| 1597 |
% \end{scripture} |
| 1598 |
% \end{scriptureexample} |
| 1599 |
% |
| 1600 |
% \changes{v2.1}{2024/12/30}{Add \opt{chapter/smash} option} |
| 1601 |
% \begin{option}[added=2024-12-30]{chapter/smash} |
| 1602 |
% \begin{syntax} |
| 1603 |
% chapter/smash = \meta{boolean} \hfill Default: false |
| 1604 |
% \end{syntax} |
| 1605 |
% Whether a chapter should be wrapped in \cs{smash} when |
| 1606 |
% \opt{chapter/nodrop} is set. This allows the chapter number to be larger |
| 1607 |
% than the line height without affecting line spacing. The value of |
| 1608 |
% \meta{|boolean|} is optional and assumed to be \val{true} if not present. |
| 1609 |
% \end{option} |
| 1610 |
% |
| 1611 |
% \changes{v2.1}{2024/12/30}{Add \opt{chapter/valign} option} |
| 1612 |
% \begin{option}[added=2024-12-30]{chapter/valign} |
| 1613 |
% \begin{syntax} |
| 1614 |
% chapter/align = bottom \textbar\ middle \textbar\ top\hfill Default: bottom |
| 1615 |
% \end{syntax} |
| 1616 |
% Sets how a chapter will align vertically when \opt{chapter/nodrop} is set. |
| 1617 |
% \begin{itemize} |
| 1618 |
% \item \val{bottom}: Chapter will align at the text base line. |
| 1619 |
% \item \val{middle}: Chapter will align at the center of text. |
| 1620 |
% \item \val{top}: Chapter will align at the top of text. |
| 1621 |
% \end{itemize} |
| 1622 |
% |
| 1623 |
% See also \opt{chapter/align}. |
| 1624 |
% \end{option} |
| 1625 |
% |
| 1626 |
% \begin{scriptureexample} |
| 1627 |
% \begin{verbatim} |
| 1628 |
% \documentclass{article} |
| 1629 |
% \usepackage{babel} |
| 1630 |
% \babelprovide[import, main]{english} |
| 1631 |
% \babelprovide[import, |
| 1632 |
% onchar=ids fonts]{ancientgreek} |
| 1633 |
% \babelfont[ancientgreek]{rm}[ |
| 1634 |
% BoldFont=NewCM10-Bold]{NewCM10-Regular} |
| 1635 |
% \usepackage{scripture} |
| 1636 |
% \begin{document} |
| 1637 |
% \begin{scripture}[Κατά Μάρκον 1:1--3][ |
| 1638 |
% chapter/font=\huge\bfseries, |
| 1639 |
% chapter/align=right, chapter/nodrop, |
| 1640 |
% chapter/smash, chapter/valign=top, |
| 1641 |
% hanging/hang=1em, hanging/leftmargin=2em, |
| 1642 |
% hanging/verse/sep=1em, language=ancientgreek, |
| 1643 |
% verse/font=\sffamily\bfseries, |
| 1644 |
% verse/sep=0.25em, version=THGNT] |
| 1645 |
% \begin{hanging} |
| 1646 |
% \ch{1}Ἀρχὴ τοῦ εὐαγγελίου Ἰησοῦ χριστοῦ υἱοῦ |
| 1647 |
% θεοῦ· \vs{2}καθὼς γέγραπται ἐν τῷ Ἡσαΐᾳ τῷ |
| 1648 |
% προφήτῃ· ἰδοὺ ἀποστέλλω τὸν ἄγγελόν μου πρὸ |
| 1649 |
% προσώπου σου, ὃς κατασκευάσει τὴν ὁδόν σου. |
| 1650 |
% \vs{3}φωνὴ βοῶντος ἐν τῇ ἐρήμῳ ἑτοιμάσατε τὴν |
| 1651 |
% ὁδὸν κυρίου, εὐθείας ποιεῖτε τὰς τρίβους αὐτοῦ. |
| 1652 |
% \end{hanging} |
| 1653 |
% \end{scripture} |
| 1654 |
% \end{document} |
| 1655 |
% \end{verbatim} |
| 1656 |
% |
| 1657 |
% \tcblower |
| 1658 |
% |
| 1659 |
% \begin{scripture}[Κατά Μάρκον 1:1--3][ |
| 1660 |
% chapter/font=\huge\bfseries, |
| 1661 |
% chapter/align=right, chapter/nodrop, |
| 1662 |
% chapter/smash, chapter/valign=top, |
| 1663 |
% hanging/hang=1em, hanging/leftmargin=2em, |
| 1664 |
% hanging/verse/sep=1em, language=ancientgreek, |
| 1665 |
% verse/font=\sffamily\bfseries, |
| 1666 |
% verse/sep=0.25em, version=THGNT] |
| 1667 |
% \begin{hanging} |
| 1668 |
% \ch{1}Ἀρχὴ τοῦ εὐαγγελίου Ἰησοῦ χριστοῦ υἱοῦ |
| 1669 |
% θεοῦ· \vs{2}καθὼς γέγραπται ἐν τῷ Ἡσαΐᾳ τῷ |
| 1670 |
% προφήτῃ· ἰδοὺ ἀποστέλλω τὸν ἄγγελόν μου πρὸ |
| 1671 |
% προσώπου σου, ὃς κατασκευάσει τὴν ὁδόν σου. |
| 1672 |
% \vs{3}φωνὴ βοῶντος ἐν τῇ ἐρήμῳ ἑτοιμάσατε τὴν |
| 1673 |
% ὁδὸν κυρίου, εὐθείας ποιεῖτε τὰς τρίβους αὐτοῦ. |
| 1674 |
% \end{hanging} |
| 1675 |
% \end{scripture} |
| 1676 |
% \end{scriptureexample} |
| 1677 |
% |
| 1678 |
% \changes{v2.1}{2025/01/01}{Add \opt{chapter/xchar} option} |
| 1679 |
% \begin{option}[added=2025-01-01]{chapter/xchar} |
| 1680 |
% \begin{syntax} |
| 1681 |
% chapter/xchar = \meta{character}\hfill Default: X |
| 1682 |
% \end{syntax} |
| 1683 |
% Sets the character to which drop chapters and vertically aligned non-drop |
| 1684 |
% chapters are aligned. This can also be set for individual chapters using |
| 1685 |
% an optional argument to \fn{ch}. |
| 1686 |
% \end{option} |
| 1687 |
% |
| 1688 |
% \changes{v1.2}{2022/08/31}{Add \opt{colour} option} |
| 1689 |
% \begin{option}[added=2022-08-31]{colour, color} |
| 1690 |
% \begin{syntax} |
| 1691 |
% colour = \meta{colour expression} \hfill Default: . |
| 1692 |
% \end{syntax} |
| 1693 |
% The \pkg{l3color} \meta{|colour expression|} to be used for the |
| 1694 |
% \env{scripture} environment. By default the current colour is inherited. |
| 1695 |
% \opt{color} is an alias for \opt{colour}. |
| 1696 |
% \end{option} |
| 1697 |
% |
| 1698 |
% \changes{v1.1}{2022/08/15}{Add \opt{compact} option} |
| 1699 |
% \begin{option}[added=2022-08-15]{compact} |
| 1700 |
% \begin{syntax} |
| 1701 |
% compact = \meta{boolean} \hfill Default: false |
| 1702 |
% \end{syntax} |
| 1703 |
% This option removes all paragraph breaks along with any \fn{extraskip} in |
| 1704 |
% the quotation so the whole quotation is a single paragraph of running |
| 1705 |
% prose. This option implies \opt{chapter/nodrop} and all options relating |
| 1706 |
% to inner environments are ignored. |
| 1707 |
% |
| 1708 |
% The value of \meta{|boolean|} is optional and assumed to be \val{true} if |
| 1709 |
% not present. |
| 1710 |
% |
| 1711 |
% \textbf{Warning:} This option redefines \cs{par} to \cs{relax} inside the |
| 1712 |
% \env{scripture} environment. If you have anything other than expected |
| 1713 |
% macros and environments inside your \env{scripture} environment \TeX{} |
| 1714 |
% will likely get stuck in an infinite loop. |
| 1715 |
% \end{option} |
| 1716 |
% |
| 1717 |
% \begin{scriptureexample} |
| 1718 |
% \begin{verbatim} |
| 1719 |
% \begin{scripture}[Jonah 1:17--2:2a][compact] |
| 1720 |
% \begin{midparachap} |
| 1721 |
% \vs{17}Now the \name{Lord} provided a huge |
| 1722 |
% fish to swallow Jonah, and Jonah was in the |
| 1723 |
% belly of the fish three days and three |
| 1724 |
% nights. \ch{2}From inside the fish Jonah |
| 1725 |
% prayed to the \name{Lord} his God. \vs{2}He |
| 1726 |
% said: |
| 1727 |
% \end{midparachap} |
| 1728 |
% \begin{poetry} |
| 1729 |
% `In my distress I called to the \name{Lord}, |
| 1730 |
% and he answered me. |
| 1731 |
% \end{poetry} |
| 1732 |
% \end{scripture} |
| 1733 |
% \end{verbatim} |
| 1734 |
% |
| 1735 |
% \tcblower |
| 1736 |
% |
| 1737 |
% \begin{scripture}[Jonah 1:17--2:2a][compact] |
| 1738 |
% \begin{midparachap} |
| 1739 |
% \vs{17}Now the \name{Lord} provided a huge |
| 1740 |
% fish to swallow Jonah, and Jonah was in the |
| 1741 |
% belly of the fish three days and three |
| 1742 |
% nights. \ch{2}From inside the fish Jonah |
| 1743 |
% prayed to the \name{Lord} his God. \vs{2}He |
| 1744 |
% said: |
| 1745 |
% \end{midparachap} |
| 1746 |
% \begin{poetry} |
| 1747 |
% `In my distress I called to the \name{Lord}, |
| 1748 |
% and he answered me. |
| 1749 |
% \end{poetry} |
| 1750 |
% \end{scripture} |
| 1751 |
% \end{scriptureexample} |
| 1752 |
% |
| 1753 |
% \changes{v2.1}{2025/01/01}{Add \opt{defaults} option} |
| 1754 |
% \begin{option}[added=2025-01-01]{defaults} |
| 1755 |
% \begin{syntax} |
| 1756 |
% defaults |
| 1757 |
% \end{syntax} |
| 1758 |
% Resets options to defaults. |
| 1759 |
% \end{option} |
| 1760 |
% |
| 1761 |
% \begin{option}{extraskip} |
| 1762 |
% \begin{syntax} |
| 1763 |
% extraskip = \meta{skip} \hfill Default: \cs{medskipamount} |
| 1764 |
% \end{syntax} |
| 1765 |
% \meta{|skip|} used for the \fn{extraskip} function. |
| 1766 |
% \end{option} |
| 1767 |
% |
| 1768 |
% \begin{option}{font} |
| 1769 |
% \begin{syntax} |
| 1770 |
% font = \meta{font} \hfill Default: \emph{Empty} |
| 1771 |
% \end{syntax} |
| 1772 |
% \meta{|font|} used for the \env{scripture} environment. |
| 1773 |
% \end{option} |
| 1774 |
% |
| 1775 |
% \changes{v2.1}{2024/11/19}{Add \opt{heading/aboveskip} option} |
| 1776 |
% \begin{option}[added=2024-11-19]{heading/aboveskip} |
| 1777 |
% \begin{syntax} |
| 1778 |
% heading/aboveskip = \meta{skip} \hfill Default: \cs{bigskipamount} |
| 1779 |
% \end{syntax} |
| 1780 |
% \meta{|skip|} inserted above a \fn{heading}. |
| 1781 |
% \end{option} |
| 1782 |
% |
| 1783 |
% \changes{v2.1}{2024/11/19}{Add \opt{heading/afterindent} option} |
| 1784 |
% \begin{option}[added=2024-11-19]{heading/afterindent} |
| 1785 |
% \begin{syntax} |
| 1786 |
% heading/afterindent = \meta{boolean} \hfill Default: false |
| 1787 |
% \end{syntax} |
| 1788 |
% Whether to indent the first paragraph following a \fn{heading}. The value |
| 1789 |
% of \meta{|boolean|} is optional and assumed to be \val{true} if not |
| 1790 |
% present. |
| 1791 |
% \end{option} |
| 1792 |
% |
| 1793 |
% \changes{v2.1}{2024/11/19}{Add \opt{heading/align} option} |
| 1794 |
% \begin{option}[added=2024-11-19]{heading/align} |
| 1795 |
% \begin{syntax} |
| 1796 |
% heading/align = left \textbar\ right \textbar\ center \hfill Default: left |
| 1797 |
% \end{syntax} |
| 1798 |
% Set the alignment of a \fn{heading}. |
| 1799 |
% \end{option} |
| 1800 |
% |
| 1801 |
% \changes{v2.1}{2024/11/19}{Add \opt{heading/belowskip} option} |
| 1802 |
% \begin{option}[added=2024-11-19]{heading/belowskip} |
| 1803 |
% \begin{syntax} |
| 1804 |
% heading/belowskip = \meta{skip} \hfill Default: \cs{medskipamount} |
| 1805 |
% \end{syntax} |
| 1806 |
% \meta{|skip|} inserted below a \fn{heading}. |
| 1807 |
% \end{option} |
| 1808 |
% |
| 1809 |
% \changes{v2.1}{2024/11/19}{Add \opt{heading/font} option} |
| 1810 |
% \begin{option}[added=2024-11-19]{heading/font} |
| 1811 |
% \begin{syntax} |
| 1812 |
% heading/font = \meta{font} \hfill Default: \cs{small}\cs{itshape} |
| 1813 |
% \end{syntax} |
| 1814 |
% \meta{|font|} used for a \fn{heading}. |
| 1815 |
% \end{option} |
| 1816 |
% |
| 1817 |
% \changes{v2.1}{2024/11/19}{Add \opt{heading/format} option} |
| 1818 |
% \begin{option}[added=2024-11-19]{heading/format} |
| 1819 |
% \begin{syntax} |
| 1820 |
% heading/format = \meta{macro} \hfill Default: \#1 |
| 1821 |
% \end{syntax} |
| 1822 |
% \meta{|macro|} used to format a \fn{heading}. |#1| contains the text of |
| 1823 |
% the \val{heading}. |
| 1824 |
% \end{option} |
| 1825 |
% |
| 1826 |
% \changes{v2.1}{2024/11/19}{Add \opt{heading/hide} option} |
| 1827 |
% \begin{option}[added=2024-11-19]{heading/hide} |
| 1828 |
% \begin{syntax} |
| 1829 |
% heading/hide = \meta{boolean} \hfill Default: false |
| 1830 |
% \end{syntax} |
| 1831 |
% Whether to hide \fn{heading} functions. The value of \meta{|boolean|} is |
| 1832 |
% optional and assumed to be \val{true} if not present. This option is the |
| 1833 |
% opposite of \opt{heading/show}. |
| 1834 |
% \end{option} |
| 1835 |
% |
| 1836 |
% \changes{v2.1}{2024/11/19}{Add \opt{heading/show} option} |
| 1837 |
% \begin{option}[added=2024-11-19]{heading/show} |
| 1838 |
% \begin{syntax} |
| 1839 |
% heading/show = \meta{boolean} \hfill Default: true |
| 1840 |
% \end{syntax} |
| 1841 |
% Whether to show \fn{heading} functions. The value of \meta{|boolean|} is |
| 1842 |
% optional and assumed to be \val{true} if not present. This option is the |
| 1843 |
% opposite of \opt{heading/hide}. |
| 1844 |
% \end{option} |
| 1845 |
% |
| 1846 |
% \begin{option}{indent} |
| 1847 |
% \begin{syntax} |
| 1848 |
% indent = \meta{boolean} \hfill Default: true |
| 1849 |
% \end{syntax} |
| 1850 |
% Whether to indent the first line of a \env{scripture} environment or not |
| 1851 |
% by \opt{parindent}. The value of \meta{|boolean|} is optional and assumed |
| 1852 |
% to be \val{true} if not present. This option is the opposite of |
| 1853 |
% \opt{noindent}. |
| 1854 |
% \end{option} |
| 1855 |
% |
| 1856 |
% \changes{v1.3}{2023/01/07}{Add \opt{inline} option} |
| 1857 |
% \begin{option}[added=2023-01-07]{inline} |
| 1858 |
% \begin{syntax} |
| 1859 |
% inline = \meta{boolean} \hfill Default: false |
| 1860 |
% \end{syntax} |
| 1861 |
% Set the scripture quotation inline. The quotation is surrounded be the |
| 1862 |
% values of \opt{inline/begin} and \opt{inline/end} which default to |``| |
| 1863 |
% and |''|, respectively. This option also sets the \opt{compact} option and |
| 1864 |
% sets the \meta{\val{reference}} inline. The reference format can be |
| 1865 |
% controlled using the following options: |
| 1866 |
% \begin{itemize} |
| 1867 |
% \item \opt{inline/reference/format} |
| 1868 |
% \item \opt{inline/reference/sep} |
| 1869 |
% \item \opt{inline/version/delim} |
| 1870 |
% \item \opt{inline/version/format} |
| 1871 |
% \end{itemize} |
| 1872 |
% Other \meta{\val{reference}} and \meta{\opt{version}} options are inherited. |
| 1873 |
% |
| 1874 |
% \textbf{Warning:} \cs{par} is redefined to \cs{relax} when the |
| 1875 |
% \opt{inline} option is set. If you have anything other than expected |
| 1876 |
% macros and environments inside your quotation \TeX{} will likely get stuck |
| 1877 |
% in an infinite loop. |
| 1878 |
% \end{option} |
| 1879 |
% |
| 1880 |
% \changes{v1.3}{2023/01/07}{Add \opt{inline/begin} option} |
| 1881 |
% \begin{option}[added=2023-01-07]{inline/begin} |
| 1882 |
% \begin{syntax} |
| 1883 |
% inline/begin = \meta{text} \hfill Default: |``| |
| 1884 |
% \end{syntax} |
| 1885 |
% Text inserted at the beginning of \fn{textscripture} or a \env{scripture} |
| 1886 |
% environment with the \opt{inline} option set. |
| 1887 |
% \end{option} |
| 1888 |
% |
| 1889 |
% \changes{v1.3}{2023/01/07}{Add \opt{inline/end} option} |
| 1890 |
% \begin{option}[added=2023-01-07]{inline/end} |
| 1891 |
% \begin{syntax} |
| 1892 |
% inline/end = \meta{text} \hfill Default: |''| |
| 1893 |
% \end{syntax} |
| 1894 |
% Text inserted between the end of \fn{textscripture} or a \env{scripture} |
| 1895 |
% environment with the \opt{inline} option set and the \meta{|reference|} |
| 1896 |
% (if specified). |
| 1897 |
% \end{option} |
| 1898 |
% |
| 1899 |
% \changes{v2.0}{2023/12/27}{Add \opt{inline/reference/format} option} |
| 1900 |
% \begin{option}[added=2023-12-27]{inline/reference/format} |
| 1901 |
% \begin{syntax} |
| 1902 |
% inline/reference/format = \meta{macro} \hfill Default: (\#1) |
| 1903 |
% \end{syntax} |
| 1904 |
% \meta{|macro|} used to format the \meta{\val{reference}} for an inline |
| 1905 |
% \env{scripture} quotation. |#1| contains the text of the |
| 1906 |
% \meta{\val{reference}} and \meta{\opt{version}} (if specified). |
| 1907 |
% \end{option} |
| 1908 |
% |
| 1909 |
% \changes{v2.0}{2023/12/27}{Add \opt{inline/reference/sep} option} |
| 1910 |
% \begin{option}[added=2023-12-27]{inline/reference/sep} |
| 1911 |
% \begin{syntax} |
| 1912 |
% inline/reference/sep = \meta{dimen} \hfill Default: 0.5em |
| 1913 |
% \end{syntax} |
| 1914 |
% The \meta{|dimen|} between the end of an inline \env{scripture} quotation |
| 1915 |
% and its \meta{\val{reference}}. |
| 1916 |
% \end{option} |
| 1917 |
% |
| 1918 |
% \changes{v2.0}{2023/12/27}{Add \opt{inline/version/delim} option} |
| 1919 |
% \begin{option}[added=2023-12-27]{inline/version/delim} |
| 1920 |
% \begin{syntax} |
| 1921 |
% inline/version/delim = \meta{delim} \hfill Default: \{\ \} |
| 1922 |
% \end{syntax} |
| 1923 |
% \meta{|delim|} to use between the \meta{\val{reference}} and the |
| 1924 |
% \meta{\opt{version}} of an inline \env{scripture} quotation. |
| 1925 |
% \end{option} |
| 1926 |
% |
| 1927 |
% \changes{v2.0}{2023/12/27}{Add \opt{inline/version/format} option} |
| 1928 |
% \begin{option}[added=2023-12-27]{inline/version/format} |
| 1929 |
% \begin{syntax} |
| 1930 |
% inline/version/format = \meta{macro} \hfill Default: \#1 |
| 1931 |
% \end{syntax} |
| 1932 |
% \meta{|macro|} used to format the \meta{\opt{version}} for an inline |
| 1933 |
% \env{scripture} quotation. |#1| contains the text of the |
| 1934 |
% \meta{\opt{version}}. |
| 1935 |
% \end{option} |
| 1936 |
% |
| 1937 |
% \changes{v1.2}{2022/11/02}{Add \opt{language} option} |
| 1938 |
% \begin{option}[added=2022-11-02]{language} |
| 1939 |
% \begin{syntax} |
| 1940 |
% language = \meta{language name} \hfill Default: \emph{Empty} |
| 1941 |
% \end{syntax} |
| 1942 |
% \pkg{babel} or \pkg{polyglossia} \meta{|language name|} to be used for the |
| 1943 |
% \env{scripture} environment. This calls |
| 1944 |
% \cs{selectlanguage}|{|\meta{|language name|}|}| at the start of the |
| 1945 |
% environment. Make sure you have \pkg{babel} or \pkg{polyglossia} loaded |
| 1946 |
% and correctly set up for your specified language. If unset the current |
| 1947 |
% active language is used. |
| 1948 |
% |
| 1949 |
% Right-to-left languages are only supported with \pkg{babel} and Lua\LaTeX. |
| 1950 |
% You will need to pass \texttt{bidi=basic, layout=lists} as options to |
| 1951 |
% \pkg{babel} to ensure everything is laid out correctly. |
| 1952 |
% \end{option} |
| 1953 |
% |
| 1954 |
% \begin{scriptureexample} |
| 1955 |
% \begingroup |
| 1956 |
% \catcode`@=13 |
| 1957 |
% \def@#1{\ifcase#1\relax \egroup \or \bgroup\textdir TLT \else |
| 1958 |
% \bgroup\textdir TRT \fi} |
| 1959 |
% \begin{verbatim} |
| 1960 |
% \documentclass{article} |
| 1961 |
% \usepackage[bidi=basic, layout=lists]{babel} |
| 1962 |
% \babelprovide[import, main]{english} |
| 1963 |
% \babelprovide[import, mapdigits]{persian} |
| 1964 |
% \babelfont[persian]{rm}[ |
| 1965 |
% Renderer=Harfbuzz]{Amiri} |
| 1966 |
% \usepackage{scripture} |
| 1967 |
% \begin{document} |
| 1968 |
% \begin{scripture}[اِشعیا 56:1--2][version=NMV, |
| 1969 |
% language=persian] |
| 1970 |
% @9@1\ch{56}@0خداوند چنین میفرماید:@0 |
| 1971 |
% \begin{poetry} |
| 1972 |
% @9»انصاف را نگاه داشته،@0 |
| 1973 |
% @9عدالت را به عمل آورید،@0 |
| 1974 |
% |
| 1975 |
% @9زیرا نجات من نزدیک شده،@0 |
| 1976 |
% @9و عدالت من بهزودی منکشف خواهد شد.@0 |
| 1977 |
% |
| 1978 |
% @9@1\vs{2}@0خوشا به حال آن که چنین کند،@0 |
| 1979 |
% @9و کسی که بدین متمسک گردد؛@0 |
| 1980 |
% |
| 1981 |
% @9که شَبّات را نگاه داشته، آن را بیحرمت نسازد،@0 |
| 1982 |
% @9و دست خویش از هر عمل بد باز دارد.«@0 |
| 1983 |
% \end{poetry} |
| 1984 |
% \end{scripture} |
| 1985 |
% \end{document} |
| 1986 |
% \end{verbatim} |
| 1987 |
% \endgroup |
| 1988 |
% |
| 1989 |
% \tcblower |
| 1990 |
% |
| 1991 |
% \shapemode 2 |
| 1992 |
% \begin{scripture}[اِشعیا 56:1--2][version=NMV, |
| 1993 |
% language=persian] |
| 1994 |
% \ch{56}خداوند چنین میفرماید: |
| 1995 |
% \begin{poetry} |
| 1996 |
% «انصاف را نگاه داشته، |
| 1997 |
% عدالت را به عمل آورید، |
| 1998 |
% |
| 1999 |
% زیرا نجات من نزدیک شده، |
| 2000 |
% و عدالت من بهزودی منکشف خواهد شد. |
| 2001 |
% |
| 2002 |
% \vs{2}خوشا به حال آن که چنین کند، |
| 2003 |
% و کسی که بدین متمسک گردد؛ |
| 2004 |
% |
| 2005 |
% که شَبّات را نگاه داشته، آن را بیحرمت نسازد، |
| 2006 |
% و دست خویش از هر عمل بد باز دارد.» |
| 2007 |
% \end{poetry} |
| 2008 |
% \end{scripture} |
| 2009 |
% \end{scriptureexample} |
| 2010 |
% |
| 2011 |
% \textbf{Note} that for CJK scripts the \pkg{scripture} package is compatible |
| 2012 |
% with specialist packages like \pkg{luatexja} and \pkg{ctex}. These packages |
| 2013 |
% can give nicer kerning and protrusion out of the box. Although with some |
| 2014 |
% effort you can set up \pkg{babel} along with \pkg{microtype} to give |
| 2015 |
% comparable output. |
| 2016 |
% |
| 2017 |
% \begin{scriptureexample} |
| 2018 |
% \begin{verbatim} |
| 2019 |
% \documentclass{article} |
| 2020 |
% \usepackage{luatexja} |
| 2021 |
% \usepackage{scripture} |
| 2022 |
% \begin{document} |
| 2023 |
% \begin{scripture}[マルコの福音書 9:33--37][ |
| 2024 |
% version=NJB] |
| 2025 |
% \vs{33}一行はカペナウムに着いた。イエスは家に入ってか |
| 2026 |
% ら、弟子たちにお尋ねになった。「来る途中、何を |
| 2027 |
% 論じ合っていたのですか。」 |
| 2028 |
% \vs{34}彼らは黙っていた。来る途中、だれが一番偉いか論 |
| 2029 |
% じ合っていたからである。 |
| 2030 |
% \vs{35}イエスは腰を下ろすと、十二人を呼んで言われた。 |
| 2031 |
% 「だれでも先頭に立ちたいと思う者は、皆の後にな |
| 2032 |
% り、皆に仕える者になりなさい。」 |
| 2033 |
% \vs{36}それから、イエスは一人の子どもの手を取って、彼 |
| 2034 |
% らの真ん中に立たせ、腕に抱いて彼らに言われた。 |
| 2035 |
% \vs{37}「だれでも、このような子どもたちの一人を、わた |
| 2036 |
% しの名のゆえに受け入れる人は、わたしを受け入れ |
| 2037 |
% るのです。また、だれでもわたしを受け入れる人は |
| 2038 |
% 、わたしではなく、わたしを遣わされた方を受け入 |
| 2039 |
% れるのです。」 |
| 2040 |
% \end{scripture} |
| 2041 |
% \end{document} |
| 2042 |
% \end{verbatim} |
| 2043 |
% |
| 2044 |
% \tcblower |
| 2045 |
% |
| 2046 |
% \enablecjk |
| 2047 |
% |
| 2048 |
% \begin{scripture}[マルコの福音書 9:33--37][ |
| 2049 |
% version=NJB] |
| 2050 |
% \vs{33}一行はカペナウムに着いた。イエスは家に入ってか |
| 2051 |
% ら、弟子たちにお尋ねになった。「来る途中、何を |
| 2052 |
% 論じ合っていたのですか。」 |
| 2053 |
% \vs{34}彼らは黙っていた。来る途中、だれが一番偉いか論 |
| 2054 |
% じ合っていたからである。 |
| 2055 |
% \vs{35}イエスは腰を下ろすと、十二人を呼んで言われた。 |
| 2056 |
% 「だれでも先頭に立ちたいと思う者は、皆の後にな |
| 2057 |
% り、皆に仕える者になりなさい。」 |
| 2058 |
% \vs{36}それから、イエスは一人の子どもの手を取って、彼 |
| 2059 |
% らの真ん中に立たせ、腕に抱いて彼らに言われた。 |
| 2060 |
% \vs{37}「だれでも、このような子どもたちの一人を、わた |
| 2061 |
% しの名のゆえに受け入れる人は、わたしを受け入れ |
| 2062 |
% るのです。また、だれでもわたしを受け入れる人は |
| 2063 |
% 、わたしではなく、わたしを遣わされた方を受け入 |
| 2064 |
% れるのです。」 |
| 2065 |
% \end{scripture} |
| 2066 |
% \end{scriptureexample} |
| 2067 |
% |
| 2068 |
% \changes{v1.2}{2022/11/02}{Add \opt{language/variant} option} |
| 2069 |
% \begin{option}[added=2022-11-02]{language/variant} |
| 2070 |
% \begin{syntax} |
| 2071 |
% language/variant = \meta{language variant name} \hfill Default: \emph{Empty} |
| 2072 |
% \end{syntax} |
| 2073 |
% \pkg{polyglossia} \meta{|language variant name|} to be used along with the |
| 2074 |
% specified \opt{language} for the \env{scripture} environment. This inserts |
| 2075 |
% \cs{selectlanguage}|[|\meta{|language variant name|}|]{|\meta{language |
| 2076 |
% name}|}| at the start of the environment. Make sure you have |
| 2077 |
% \pkg{polyglossia} loaded and correctly set up for your specified language. |
| 2078 |
% \end{option} |
| 2079 |
% |
| 2080 |
% \begin{option}{leftmargin} |
| 2081 |
% \begin{syntax} |
| 2082 |
% leftmargin = \meta{dimen} \hfill Default: 0pt |
| 2083 |
% \end{syntax} |
| 2084 |
% \meta{|dimen|} used for the left margin of the \env{scripture} |
| 2085 |
% environment. |
| 2086 |
% \end{option} |
| 2087 |
% |
| 2088 |
% \changes{v1.2}{2022/09/01}{Add \opt{name/font} option} |
| 2089 |
% \begin{option}[added=2022-09-01]{name/font} |
| 2090 |
% \begin{syntax} |
| 2091 |
% name/font = \meta{font} \hfill Default: \cs{scshape} |
| 2092 |
% \end{syntax} |
| 2093 |
% \meta{|font|} used for the \fn{name} function. |
| 2094 |
% \end{option} |
| 2095 |
% |
| 2096 |
% \changes{v1.2}{2022/09/01}{Add \opt{name/format} option} |
| 2097 |
% \begin{option}[added=2022-09-01]{name/format} |
| 2098 |
% \begin{syntax} |
| 2099 |
% name/format = \meta{macro} \hfill Default: \#1 |
| 2100 |
% \end{syntax} |
| 2101 |
% \meta{|macro|} used to format the \val{divine name} using the \fn{name} |
| 2102 |
% function. |#1| contains the text of the argument to \fn{name}. |
| 2103 |
% \end{option} |
| 2104 |
% |
| 2105 |
% \begin{option}{noindent} |
| 2106 |
% \begin{syntax} |
| 2107 |
% noindent = \meta{boolean} \hfill Default: false |
| 2108 |
% \end{syntax} |
| 2109 |
% Whether to indent the first line of a \env{scripture} environment or not |
| 2110 |
% by \opt{parindent}. The value of \meta{|boolean|} is optional and assumed |
| 2111 |
% to be \val{true} if not present. This option is the opposite of |
| 2112 |
% \opt{indent}. |
| 2113 |
% \end{option} |
| 2114 |
% |
| 2115 |
% \begin{scriptureexample} |
| 2116 |
% \begin{verbatim} |
| 2117 |
% \begin{scripture}[1 Peter 3:18][noindent] |
| 2118 |
% \vs{18}For Christ also suffered once for sins, |
| 2119 |
% the righteous for the unrighteous, to bring you |
| 2120 |
% to God. He was put to death in the body but |
| 2121 |
% made alive in the Spirit. |
| 2122 |
% \end{scripture} |
| 2123 |
% \end{verbatim} |
| 2124 |
% |
| 2125 |
% \tcblower |
| 2126 |
% |
| 2127 |
% \begin{scripture}[1 Peter 3:18][noindent] |
| 2128 |
% \vs{18}For Christ also suffered once for sins, |
| 2129 |
% the righteous for the unrighteous, to bring you |
| 2130 |
% to God. He was put to death in the body but |
| 2131 |
% made alive in the Spirit. |
| 2132 |
% \end{scripture} |
| 2133 |
% \end{scriptureexample} |
| 2134 |
% |
| 2135 |
% \begin{option}{parindent} |
| 2136 |
% \begin{syntax} |
| 2137 |
% parindent = \meta{dimen} \hfill Default: \cs{parindent} |
| 2138 |
% \end{syntax} |
| 2139 |
% \meta{|dimen|} to use when indenting the first line of a paragraph in the |
| 2140 |
% \env{scripture} environment. |
| 2141 |
% \end{option} |
| 2142 |
% |
| 2143 |
% \begin{option}{parskip} |
| 2144 |
% \begin{syntax} |
| 2145 |
% parskip = \meta{skip} \hfill Default: \cs{parskip} |
| 2146 |
% \end{syntax} |
| 2147 |
% \meta{|skip|} to use between paragraphs in the \env{scripture} environment. |
| 2148 |
% \end{option} |
| 2149 |
% |
| 2150 |
% \changes{v2.1}{2024/01/18}{Add feature to add pilcrows at the start of |
| 2151 |
% paragraphs.} |
| 2152 |
% \changes{v2.1}{2024/01/18}{Add \opt{pilcrow} option} |
| 2153 |
% \begin{option}[added=2024-01-18]{pilcrow} |
| 2154 |
% \begin{syntax} |
| 2155 |
% pilcrow = \meta{boolean} \hfill Default: false |
| 2156 |
% \end{syntax} |
| 2157 |
% Whether to insert a pilcrow (\P) at the beginning of each paragraph. This |
| 2158 |
% option only has an effect when using the \opt{compact} and/or |
| 2159 |
% \opt{verse/para} options. The value of \meta{|boolean|} is optional and |
| 2160 |
% assumed to be \val{true} if not present. |
| 2161 |
% |
| 2162 |
% A subsequent pilcrow can be suppressed with the \fn{nopilcrow} macro. |
| 2163 |
% Inner environments start a new paragraph only if there is a blank line |
| 2164 |
% before them and similarly, there is only a new paragraph after an inner |
| 2165 |
% environment if it is followed by a blank line. New paragraphs are not |
| 2166 |
% inserted within a poetry environment, so to obtain a paragraph break |
| 2167 |
% within a block of poetry, use two \env{poetry} environments separated by a |
| 2168 |
% blank line. The exception to this is the \env{midparachap} environment |
| 2169 |
% which always starts and ends a paragraph. |
| 2170 |
% \end{option} |
| 2171 |
% |
| 2172 |
% \begin{scriptureexample} |
| 2173 |
% \begin{verbatim} |
| 2174 |
% \begin{scripture}[Deuteronomy 5:1][chapter/para, |
| 2175 |
% chapter/format=CHAPTER~#1, verse/para, |
| 2176 |
% verse/font=\bfseries, verse/format=#1, |
| 2177 |
% verse/sep=0.5em, pilcrow] |
| 2178 |
% \ch{5}Moses summoned all Israel and said: |
| 2179 |
% |
| 2180 |
% Hear, Israel, the decrees and the laws I declare |
| 2181 |
% in your hearing today. Learn them and be sure to |
| 2182 |
% follow them. |
| 2183 |
% \end{scripture} |
| 2184 |
% \end{verbatim} |
| 2185 |
% |
| 2186 |
% \tcblower |
| 2187 |
% |
| 2188 |
% \begin{scripture}[Deuteronomy 5:1][chapter/para, |
| 2189 |
% chapter/format=CHAPTER~#1, verse/para, |
| 2190 |
% verse/font=\bfseries, verse/format=#1, |
| 2191 |
% verse/sep=0.5em, pilcrow] |
| 2192 |
% \ch{5}Moses summoned all Israel and said: |
| 2193 |
% |
| 2194 |
% Hear, Israel, the decrees and the laws I declare |
| 2195 |
% in your hearing today. Learn them and be sure to |
| 2196 |
% follow them. |
| 2197 |
% \end{scripture} |
| 2198 |
% \end{scriptureexample} |
| 2199 |
% |
| 2200 |
% \changes{v2.1}{2024/01/18}{Add \opt{pilcrow/sep} option} |
| 2201 |
% \begin{option}[added=2024-01-18]{pilcrow/sep} |
| 2202 |
% \begin{syntax} |
| 2203 |
% pilcrow/sep = \meta{dimen} \hfill Default: 0.25em |
| 2204 |
% \end{syntax} |
| 2205 |
% \meta{|dimen|} used to separate a pilcrow (\P) from the following text. |
| 2206 |
% \end{option} |
| 2207 |
% |
| 2208 |
% \changes{v1.2}{2022/08/31}{Add \opt{redletter} option} |
| 2209 |
% \begin{option}[added=2022-08-31]{redletter} |
| 2210 |
% \begin{syntax} |
| 2211 |
% redletter = \meta{boolean} \hfill Default: false |
| 2212 |
% \end{syntax} |
| 2213 |
% Whether to enable highlighting of Jesus' words in red. The value of |
| 2214 |
% \meta{|boolean|} is optional and assumed to be \val{true} if not present. |
| 2215 |
% The text needs to be marked up with \fn{redletteron} and \fn{redletteroff} |
| 2216 |
% for this option to have any effect. |
| 2217 |
% \end{option} |
| 2218 |
% |
| 2219 |
% \changes{v1.2}{2022/08/31}{Add \opt{redletter/colour} option} |
| 2220 |
% \begin{option}[added=2022-08-31]{redletter/colour, redletter/color} |
| 2221 |
% \begin{syntax} |
| 2222 |
% redletter/colour = \meta{colour expression} \hfill Default: red!80!black |
| 2223 |
% \end{syntax} |
| 2224 |
% The \pkg{l3color} \meta{|colour expression|} to be used for the words of |
| 2225 |
% Jesus when the \opt{redletter} option is \val{true}. \fn{redletteron} and |
| 2226 |
% \fn{redletteroff} must be used to mark up the text. \opt{redletter/color} |
| 2227 |
% is an alias for \opt{redletter/colour}. |
| 2228 |
% \end{option} |
| 2229 |
% |
| 2230 |
% \changes{v1.3}{2023/01/08}{Add \opt{reference/align} option} |
| 2231 |
% \begin{option}[added=2023-01-08]{reference/align} |
| 2232 |
% \begin{syntax} |
| 2233 |
% reference/align = left \textbar\ right \hfill Default: right |
| 2234 |
% \end{syntax} |
| 2235 |
% Set the alignment of the reference. Note that in neither case will the |
| 2236 |
% reference break across lines. |
| 2237 |
% \end{option} |
| 2238 |
% |
| 2239 |
% \changes{v1.2}{2022/09/07}{Add \opt{reference/colour} option} |
| 2240 |
% \begin{option}[added=2022-09-07]{reference/colour, reference/color} |
| 2241 |
% \begin{syntax} |
| 2242 |
% reference/colour = \meta{colour expression} \hfill Default: . |
| 2243 |
% \end{syntax} |
| 2244 |
% The \pkg{l3color} \meta{|colour expression|} to be used for the reference |
| 2245 |
% and version. By default the current colour is inherited. |
| 2246 |
% \opt{reference/color} is an alias for \opt{reference/colour}. |
| 2247 |
% \end{option} |
| 2248 |
% |
| 2249 |
% \begin{option}{reference/font} |
| 2250 |
% \begin{syntax} |
| 2251 |
% reference/font = \meta{font} \hfill Default: \cs{bfseries} |
| 2252 |
% \end{syntax} |
| 2253 |
% \meta{|font|} used when printing the \meta{\val{reference}} for a |
| 2254 |
% \env{scripture} quotation. |
| 2255 |
% \end{option} |
| 2256 |
% |
| 2257 |
% \begin{option}{reference/format} |
| 2258 |
% \begin{syntax} |
| 2259 |
% reference/format = \meta{macro} \hfill Default: \#1 |
| 2260 |
% \end{syntax} |
| 2261 |
% \meta{|macro|} used to format the \meta{\val{reference}} for a |
| 2262 |
% \env{scripture} quotation. |#1| contains the text of the |
| 2263 |
% \meta{\val{reference}} and |
| 2264 |
% \meta{\opt{version}} (if specified). |
| 2265 |
% \end{option} |
| 2266 |
% |
| 2267 |
% \changes{v1.3}{2023/01/08}{Add \opt{reference/newline} option} |
| 2268 |
% \begin{option}[added=2023-01-8]{reference/newline} |
| 2269 |
% \begin{syntax} |
| 2270 |
% reference/newline |
| 2271 |
% \end{syntax} |
| 2272 |
% Always push the \meta{\val{reference}} to a newline even if there is space |
| 2273 |
% for it to fit on the last line of the quotation. The option sets |
| 2274 |
% \opt{reference/sep} to \cs{linewidth} so there is never room for the |
| 2275 |
% reference on the final line of the quotation. |
| 2276 |
% \end{option} |
| 2277 |
% |
| 2278 |
% \changes{v2.1}{2024/01/10}{Add feature to place the reference at the start |
| 2279 |
% of the quotation.} |
| 2280 |
% \changes{v2.1}{2024/01/10}{Add \opt{reference/position} option} |
| 2281 |
% \begin{option}[added=2024-01-10]{reference/position} |
| 2282 |
% \begin{syntax} |
| 2283 |
% reference/position = start \textbar\ end \hfill Default: end |
| 2284 |
% \end{syntax} |
| 2285 |
% Set the position of the reference at either the start or end of the |
| 2286 |
% quotation. If \val{start} is specified, then the reference will be set |
| 2287 |
% inline unless the quotation begins with an inner environment. Any \fn{vs} |
| 2288 |
% or \fn{ch} is suppressed at the start of the quotation in the main |
| 2289 |
% \env{scripture} environment. |
| 2290 |
% \end{option} |
| 2291 |
% |
| 2292 |
% \begin{scriptureexample} |
| 2293 |
% \begin{verbatim} |
| 2294 |
% \begin{scripture}[John 1:1][version=NIV, |
| 2295 |
% reference/position=start] |
| 2296 |
% \ch{1}In the beginning was the Word, and the |
| 2297 |
% Word was with God, and the Word was God. |
| 2298 |
% \end{scripture} |
| 2299 |
% \end{verbatim} |
| 2300 |
% |
| 2301 |
% \tcblower |
| 2302 |
% |
| 2303 |
% \begin{scripture}[John 1:1][version=NIV, |
| 2304 |
% reference/position=start] |
| 2305 |
% \ch{1}In the beginning was the Word, and the |
| 2306 |
% Word was with God, and the Word was God. |
| 2307 |
% \end{scripture} |
| 2308 |
% \end{scriptureexample} |
| 2309 |
% |
| 2310 |
% \begin{option}{reference/sep} |
| 2311 |
% \begin{syntax} |
| 2312 |
% reference/sep = \meta{dimen} \hfill Default: 2em |
| 2313 |
% \end{syntax} |
| 2314 |
% The minimum \meta{|dimen|} allowed between the end of a \env{scripture} |
| 2315 |
% quotation and its \meta{\val{reference}} before the \meta{\val{reference}} |
| 2316 |
% is pushed to the following line. |
| 2317 |
% \end{option} |
| 2318 |
% |
| 2319 |
% \changes{v2.1}{2024/01/10}{Add \opt{reference/start/inline} option} |
| 2320 |
% \begin{option}[added=2024-01-10]{reference/start/inline} |
| 2321 |
% \begin{syntax} |
| 2322 |
% reference/start/inline = \meta{boolean} \hfill Default: true |
| 2323 |
% \end{syntax} |
| 2324 |
% When \opt{reference/position} is set to \val{start}, this option controls |
| 2325 |
% whether the reference is set inline or on a line of its own before the |
| 2326 |
% quotation. Note that if the quotation begins with an inner environment the |
| 2327 |
% reference will always be on a new line unless the \opt{compact} option is |
| 2328 |
% also set. The value of \meta{|boolean|} is optional and assumed to be |
| 2329 |
% \val{true} if not present. This option is the opposite of |
| 2330 |
% \opt{reference/start/newline}. |
| 2331 |
% \end{option} |
| 2332 |
% |
| 2333 |
% \changes{v2.1}{2024/01/10}{Add \opt{reference/start/newline} option} |
| 2334 |
% \begin{option}[added=2024-01-10]{reference/start/newline} |
| 2335 |
% \begin{syntax} |
| 2336 |
% reference/start/newline = \meta{boolean} \hfill Default: false |
| 2337 |
% \end{syntax} |
| 2338 |
% When \opt{reference/position} is set to \val{start}, this option controls |
| 2339 |
% whether the reference is set inline or on a line of its own before the |
| 2340 |
% quotation. Note that if the quotation begins with an inner environment the |
| 2341 |
% reference will always be on a new line unless the \opt{compact} option is |
| 2342 |
% also set. The value of \meta{|boolean|} is optional and assumed to be |
| 2343 |
% \val{true} if not present. This option is the opposite of |
| 2344 |
% \opt{reference/start/inline}. |
| 2345 |
% \end{option} |
| 2346 |
% |
| 2347 |
% \begin{scriptureexample} |
| 2348 |
% \begin{verbatim} |
| 2349 |
% \begin{scripture}[John 1:1]% |
| 2350 |
% [reference/position=start, |
| 2351 |
% reference/start/newline] |
| 2352 |
% \ch{1}In the beginning was the Word, and the |
| 2353 |
% Word was with God, and the Word was God. |
| 2354 |
% \end{scripture} |
| 2355 |
% \end{verbatim} |
| 2356 |
% |
| 2357 |
% \tcblower |
| 2358 |
% |
| 2359 |
% \begin{scripture}[John 1:1]% |
| 2360 |
% [reference/position=start, |
| 2361 |
% reference/start/newline] |
| 2362 |
% \ch{1}In the beginning was the Word, and the |
| 2363 |
% Word was with God, and the Word was God. |
| 2364 |
% \end{scripture} |
| 2365 |
% \end{scriptureexample} |
| 2366 |
% |
| 2367 |
% \changes{v2.1}{2024/01/10}{Add \opt{reference/start/sep} option} |
| 2368 |
% \begin{option}[added=2024-01-10]{reference/start/sep} |
| 2369 |
% \begin{syntax} |
| 2370 |
% reference/start/sep = \meta{dimen} \hfill Default: 1em |
| 2371 |
% \end{syntax} |
| 2372 |
% The space inserted between the reference and the quotation when |
| 2373 |
% \opt{reference/position} is set to \val{start}. This only applies when the |
| 2374 |
% reference is inline and not on a line of its own. |
| 2375 |
% \end{option} |
| 2376 |
% |
| 2377 |
% \changes{v2.1}{2024/01/10}{Add \opt{reference/start/vsep} option} |
| 2378 |
% \begin{option}[added=2024-01-10]{reference/start/vsep} |
| 2379 |
% \begin{syntax} |
| 2380 |
% reference/start/vsep = \meta{skip} \hfill Default: 0pt |
| 2381 |
% \end{syntax} |
| 2382 |
% The vertical skip inserted between the reference and the quotation when |
| 2383 |
% \opt{reference/position} is set to \val{start}. This only applies when the |
| 2384 |
% reference is on a line of its own. |
| 2385 |
% \end{option} |
| 2386 |
% |
| 2387 |
% \begin{option}{rightmargin} |
| 2388 |
% \begin{syntax} |
| 2389 |
% rightmargin = \meta{dimen} \hfill Default: 0pt |
| 2390 |
% \end{syntax} |
| 2391 |
% \meta{|dimen|} used for the right margin of the \env{scripture} |
| 2392 |
% environment. |
| 2393 |
% \end{option} |
| 2394 |
% |
| 2395 |
% \begin{option}{selah/font} |
| 2396 |
% \begin{syntax} |
| 2397 |
% selah/font = \meta{font} \hfill Default: \cs{itshape} |
| 2398 |
% \end{syntax} |
| 2399 |
% \meta{|font|} used when printing \fn{selah} in a \env{poetry} environment. |
| 2400 |
% \end{option} |
| 2401 |
% |
| 2402 |
% \begin{option}{selah/format} |
| 2403 |
% \begin{syntax} |
| 2404 |
% selah/format = \meta{macro} \hfill Default: \#1 |
| 2405 |
% \end{syntax} |
| 2406 |
% \meta{|macro|} used to format the \fn{selah} in a \env{poetry} |
| 2407 |
% environment. |#1| contains the value of \opt{selah/text}. |
| 2408 |
% \end{option} |
| 2409 |
% |
| 2410 |
% \begin{option}{selah/sep} |
| 2411 |
% \begin{syntax} |
| 2412 |
% selah/sep = \meta{dimen} \hfill Default: 1em |
| 2413 |
% \end{syntax} |
| 2414 |
% The minimum \meta{|dimen|} allowed between the end of a poetry line and |
| 2415 |
% \emph{Selah} before the \emph{Selah} is pushed to the following line. |
| 2416 |
% \end{option} |
| 2417 |
% |
| 2418 |
% \begin{option}{selah/text} |
| 2419 |
% \begin{syntax} |
| 2420 |
% selah/text = \meta{text} \hfill Default: Selah |
| 2421 |
% \end{syntax} |
| 2422 |
% \meta{|text|} used to for \fn{selah} in a \env{poetry} environment. |
| 2423 |
% \end{option} |
| 2424 |
% |
| 2425 |
% \changes{v2.0}{2023/12/27}{Add \opt{style} option} |
| 2426 |
% \begin{option}[added=2023/12/27]{style} |
| 2427 |
% \begin{syntax} |
| 2428 |
% style = \meta{name} |
| 2429 |
% \end{syntax} |
| 2430 |
% Set options previously saved with \fn{scripturestyle}. An error occurs if |
| 2431 |
% the style isn't defined. |
| 2432 |
% \end{option} |
| 2433 |
% |
| 2434 |
% \changes{v1.2}{2022/08/30}{Add \opt{textright/sep} option} |
| 2435 |
% \begin{option}[added=2022-08-30]{textright/sep} |
| 2436 |
% \begin{syntax} |
| 2437 |
% textright/sep = \meta{dimen} \hfill Default: 1em |
| 2438 |
% \end{syntax} |
| 2439 |
% The minimum \meta{|dimen|} allowed between the end of a line and text |
| 2440 |
% aligned to the right with \fn{textright} before the right aligned text is |
| 2441 |
% pushed to the following line. |
| 2442 |
% \end{option} |
| 2443 |
% |
| 2444 |
% \changes{v2.2}{2025/03/02}{Add \opt{verse} option} |
| 2445 |
% \begin{option}[added=2025-03-02]{verse} |
| 2446 |
% \begin{syntax} |
| 2447 |
% verse = \meta{integer}\hfill Default: 1 |
| 2448 |
% \end{syntax} |
| 2449 |
% Initialise the chapter number when using automatic verse numbering with |
| 2450 |
% \cs{newvs}. |
| 2451 |
% |
| 2452 |
% See also \opt{book} and \opt{chapter}. |
| 2453 |
% \end{option} |
| 2454 |
% |
| 2455 |
% \changes{v1.2}{2022/09/07}{Add \opt{verse/colour} option} |
| 2456 |
% \begin{option}[added=2022-09-07]{verse/colour, verse/color} |
| 2457 |
% \begin{syntax} |
| 2458 |
% verse/colour = \meta{colour expression} \hfill Default: . |
| 2459 |
% \end{syntax} |
| 2460 |
% The \pkg{l3color} \meta{|colour expression|} to be used for verse numbers. |
| 2461 |
% By default the current colour is inherited. \opt{verse/color} is an alias |
| 2462 |
% for \opt{verse/colour}. |
| 2463 |
% \end{option} |
| 2464 |
% |
| 2465 |
% \changes{v1.3}{2022/11/13}{Add \opt{verse/first} option} |
| 2466 |
% \begin{option}[added=2022-11-13]{verse/first} |
| 2467 |
% \begin{syntax} |
| 2468 |
% verse/first = \meta{boolean} \hfill Default: false |
| 2469 |
% \end{syntax} |
| 2470 |
% In prose sections, print the verse number in a different format if it is |
| 2471 |
% at the start of the paragraph. The format and separation between verse and |
| 2472 |
% text are controlled with the \opt{verse/firstformat} and |
| 2473 |
% \opt{verse/firstsep} options. Use \fn{nofirstverse} to suppress this at |
| 2474 |
% the next verse (e.g., if your quote starts mid-way though a paragraph and |
| 2475 |
% a normal verse should be printed). The value of \meta{|boolean|} is optional |
| 2476 |
% and assumed to be true if not present. |
| 2477 |
% \end{option} |
| 2478 |
% |
| 2479 |
% \begin{scriptureexample} |
| 2480 |
% \begin{verbatim} |
| 2481 |
% \begin{scripture}[Luke 18:25--28][noindent, |
| 2482 |
% verse/first, version=NRSV] |
| 2483 |
% \nofirstverse\vs{25}Indeed, it is easier for a |
| 2484 |
% camel to go through the eye of a needle than for |
| 2485 |
% someone who is rich to enter the kingdom of |
| 2486 |
% God.'' |
| 2487 |
% |
| 2488 |
% \vs{26}Those who heard it said, ``Then who can |
| 2489 |
% be saved?'' \vs{27}He replied, ``What is |
| 2490 |
% impossible for mortals is possible for God.'' |
| 2491 |
% |
| 2492 |
% \vs{28}Then Peter said, ``Look, we have left our |
| 2493 |
% homes and followed you.'' |
| 2494 |
% \end{scripture} |
| 2495 |
% \end{verbatim} |
| 2496 |
% |
| 2497 |
% \tcblower |
| 2498 |
% |
| 2499 |
% \begin{scripture}[Luke 18:25--28][noindent, |
| 2500 |
% verse/first, version=NRSV] |
| 2501 |
% \nofirstverse\vs{25}Indeed, it is easier for a |
| 2502 |
% camel to go through the eye of a needle than for |
| 2503 |
% someone who is rich to enter the kingdom of |
| 2504 |
% God.'' |
| 2505 |
% |
| 2506 |
% \vs{26}Those who heard it said, ``Then who can |
| 2507 |
% be saved?'' \vs{27}He replied, ``What is |
| 2508 |
% impossible for mortals is possible for God.'' |
| 2509 |
% |
| 2510 |
% \vs{28}Then Peter said, ``Look, we have left our |
| 2511 |
% homes and followed you.'' |
| 2512 |
% \end{scripture} |
| 2513 |
% \end{scriptureexample} |
| 2514 |
% |
| 2515 |
% \changes{v1.3}{2022/11/13}{Add \opt{verse/firstformat} option} |
| 2516 |
% \begin{option}[added=2022-11-13]{verse/firstformat} |
| 2517 |
% \begin{syntax} |
| 2518 |
% verse/firstformat = \meta{macro} \hfill Default: \#1 |
| 2519 |
% \end{syntax} |
| 2520 |
% \meta{|macro|} used to format the first \fn{vs} in a paragraph. |#1| |
| 2521 |
% contains the argument of \fn{vs}. Only used if \opt{verse/first} is |
| 2522 |
% |true|. |
| 2523 |
% \end{option} |
| 2524 |
% |
| 2525 |
% \changes{v1.3}{2022/11/13}{Add \opt{verse/firstsep} option} |
| 2526 |
% \begin{option}[added=2022-11-13]{verse/firstsep} |
| 2527 |
% \begin{syntax} |
| 2528 |
% verse/firstsep = \meta{dimen} \hfill Default: 0.5em |
| 2529 |
% \end{syntax} |
| 2530 |
% \meta{|dimen|} used to separate the first \fn{vs} in a paragraph from the |
| 2531 |
% following text. Only used if \opt{verse/first} is |true|. |
| 2532 |
% \end{option} |
| 2533 |
% |
| 2534 |
% \begin{option}{verse/font} |
| 2535 |
% \begin{syntax} |
| 2536 |
% verse/font = \meta{font} \hfill Default: \emph{Empty} |
| 2537 |
% \end{syntax} |
| 2538 |
% \meta{|font|} used for the \fn{vs} function. |
| 2539 |
% \end{option} |
| 2540 |
% |
| 2541 |
% \begin{option}{verse/format} |
| 2542 |
% \begin{syntax} |
| 2543 |
% verse/format = \meta{macro} \hfill Default: \cs{textsuperscript}\{\#1\} |
| 2544 |
% \end{syntax} |
| 2545 |
% \meta{|macro|} used to format the \fn{vs} function. |#1| contains the |
| 2546 |
% argument of \fn{vs}. |
| 2547 |
% \end{option} |
| 2548 |
% |
| 2549 |
% \changes{v1.1}{2022/08/15}{Add \opt{verse/hide} option} |
| 2550 |
% \begin{option}[added=2022-08-15]{verse/hide} |
| 2551 |
% \begin{syntax} |
| 2552 |
% verse/hide = \meta{boolean} \hfill Default: false |
| 2553 |
% \end{syntax} |
| 2554 |
% Whether verses should be shown or hidden. The value of \meta{|boolean|} is |
| 2555 |
% optional and assumed to be \val{true} if not present. This option is the |
| 2556 |
% opposite of \opt{verse/show}. Note that the \hook{scripture/verse/before} |
| 2557 |
% and \hook{scripture/verse/after} hooks are still executed when verses are |
| 2558 |
% hidden. |
| 2559 |
% \end{option} |
| 2560 |
% |
| 2561 |
% \begin{scriptureexample} |
| 2562 |
% \begin{verbatim} |
| 2563 |
% \begin{scripture}[Colossians 1:15--16][verse/hide] |
| 2564 |
% \vs{15}The Son is the image of the invisible |
| 2565 |
% God, the firstborn over all creation. |
| 2566 |
% \vs{16}For in him all things were created: |
| 2567 |
% things in heaven and on earth, visible and |
| 2568 |
% invisible, whether thrones or powers or rulers |
| 2569 |
% or authorities; all things have been created |
| 2570 |
% through him and for him. |
| 2571 |
% \end{scripture} |
| 2572 |
% \end{verbatim} |
| 2573 |
% |
| 2574 |
% \tcblower |
| 2575 |
% |
| 2576 |
% \begin{scripture}[Colossians 1:15--16][verse/hide] |
| 2577 |
% \vs{15}The Son is the image of the invisible |
| 2578 |
% God, the firstborn over all creation. |
| 2579 |
% \vs{16}For in him all things were created: |
| 2580 |
% things in heaven and on earth, visible and |
| 2581 |
% invisible, whether thrones or powers or rulers |
| 2582 |
% or authorities; all things have been created |
| 2583 |
% through him and for him. |
| 2584 |
% \end{scripture} |
| 2585 |
% \end{scriptureexample} |
| 2586 |
% |
| 2587 |
% \changes{v2.1}{2024/01/13}{Add feature to set each verse on a new line.} |
| 2588 |
% \changes{v2.1}{2024/01/13}{Add \opt{verse/para} option} |
| 2589 |
% \begin{option}[added=2024-01-13]{verse/para} |
| 2590 |
% \begin{syntax} |
| 2591 |
% verse/para = \meta{boolean} \hfill Default: false |
| 2592 |
% \end{syntax} |
| 2593 |
% Whether to set each verse on its own line. The value of \meta{|boolean|} |
| 2594 |
% is optional and assumed to be \val{true} if not present. Drop chapters and |
| 2595 |
% the shape of inner environments is preserved with this option unless the |
| 2596 |
% \opt{compact} option is also set. |
| 2597 |
% \end{option} |
| 2598 |
% |
| 2599 |
% \begin{scriptureexample} |
| 2600 |
% \begin{verbatim} |
| 2601 |
% \begin{scripture}[Jonah 1:17--2:2a][verse/para, |
| 2602 |
% verse/sep=0.5em, pilcrow, chapter/para, |
| 2603 |
% chapter/format=CHAPTER~#1] |
| 2604 |
% \begin{midparachap} |
| 2605 |
% \vs{17}Now the \name{Lord} provided a huge |
| 2606 |
% fish to swallow Jonah, and Jonah was in the |
| 2607 |
% belly of the fish three days and three |
| 2608 |
% nights. \ch{2}From inside the fish Jonah |
| 2609 |
% prayed to the \name{Lord} his God. \vs{2}He |
| 2610 |
% said: |
| 2611 |
% \end{midparachap} |
| 2612 |
% |
| 2613 |
% \begin{poetry} |
| 2614 |
% `In my distress I called to the \name{Lord}, |
| 2615 |
% and he answered me. |
| 2616 |
% \end{poetry} |
| 2617 |
% \end{scripture} |
| 2618 |
% \end{verbatim} |
| 2619 |
% |
| 2620 |
% \tcblower |
| 2621 |
% |
| 2622 |
% \begin{scripture}[Jonah 1:17--2:2a][verse/para, |
| 2623 |
% verse/format=#1, verse/font=\bfseries, |
| 2624 |
% verse/sep=0.5em, pilcrow, chapter/para, |
| 2625 |
% chapter/format=CHAPTER~#1] |
| 2626 |
% \begin{midparachap} |
| 2627 |
% \vs{17}Now the \name{Lord} provided a huge |
| 2628 |
% fish to swallow Jonah, and Jonah was in the |
| 2629 |
% belly of the fish three days and three |
| 2630 |
% nights. \ch{2}From inside the fish Jonah |
| 2631 |
% prayed to the \name{Lord} his God. \vs{2}He |
| 2632 |
% said: |
| 2633 |
% \end{midparachap} |
| 2634 |
% |
| 2635 |
% \begin{poetry} |
| 2636 |
% `In my distress I called to the \name{Lord}, |
| 2637 |
% and he answered me. |
| 2638 |
% \end{poetry} |
| 2639 |
% \end{scripture} |
| 2640 |
% \end{scriptureexample} |
| 2641 |
% |
| 2642 |
% \begin{scriptureexample} |
| 2643 |
% \begin{verbatim} |
| 2644 |
% \begin{scripture}[Jonah 1:17--2:2a][verse/para, |
| 2645 |
% verse/sep=0.5em, pilcrow, chapter/para, |
| 2646 |
% chapter/format=CHAPTER~#1, compact] |
| 2647 |
% \begin{midparachap} |
| 2648 |
% \vs{17}Now the \name{Lord} provided a huge |
| 2649 |
% fish to swallow Jonah, and Jonah was in the |
| 2650 |
% belly of the fish three days and three |
| 2651 |
% nights. \ch{2}From inside the fish Jonah |
| 2652 |
% prayed to the \name{Lord} his God. \vs{2}He |
| 2653 |
% said: |
| 2654 |
% \end{midparachap} |
| 2655 |
% |
| 2656 |
% \begin{poetry} |
| 2657 |
% `In my distress I called to the \name{Lord}, |
| 2658 |
% and he answered me. |
| 2659 |
% \end{poetry} |
| 2660 |
% \end{scripture} |
| 2661 |
% \end{verbatim} |
| 2662 |
% |
| 2663 |
% \tcblower |
| 2664 |
% |
| 2665 |
% \begin{scripture}[Jonah 1:17--2:2a][verse/para, |
| 2666 |
% verse/format=#1, verse/font=\bfseries, |
| 2667 |
% verse/sep=0.5em, pilcrow, chapter/para, |
| 2668 |
% chapter/format=CHAPTER~#1, compact] |
| 2669 |
% \begin{midparachap} |
| 2670 |
% \vs{17}Now the \name{Lord} provided a huge |
| 2671 |
% fish to swallow Jonah, and Jonah was in the |
| 2672 |
% belly of the fish three days and three |
| 2673 |
% nights. \ch{2}From inside the fish Jonah |
| 2674 |
% prayed to the \name{Lord} his God. \vs{2}He |
| 2675 |
% said: |
| 2676 |
% \end{midparachap} |
| 2677 |
% |
| 2678 |
% \begin{poetry} |
| 2679 |
% `In my distress I called to the \name{Lord}, |
| 2680 |
% and he answered me. |
| 2681 |
% \end{poetry} |
| 2682 |
% \end{scripture} |
| 2683 |
% \end{scriptureexample} |
| 2684 |
% |
| 2685 |
% \changes{v1.1}{2022/07/28}{Add \opt{verse/sep} option with small default} |
| 2686 |
% \begin{option}[added=2022-07-28]{verse/sep} |
| 2687 |
% \begin{syntax} |
| 2688 |
% verse/sep = \meta{dimen} \hfill Default: 0.05em |
| 2689 |
% \end{syntax} |
| 2690 |
% \meta{|dimen|} used to separate a \fn{vs} from the following text. |
| 2691 |
% \end{option} |
| 2692 |
% |
| 2693 |
% \changes{v1.1}{2022/08/15}{Add \opt{verse/show} option} |
| 2694 |
% \begin{option}[added=2022-08-15]{verse/show} |
| 2695 |
% \begin{syntax} |
| 2696 |
% verse/show = \meta{boolean} \hfill Default: true |
| 2697 |
% \end{syntax} |
| 2698 |
% Whether verses should be shown or hidden. The value of \meta{|boolean|} |
| 2699 |
% is optional and assumed to be \val{true} if not present. This option is |
| 2700 |
% the opposite of \opt{verse/hide}. |
| 2701 |
% \end{option} |
| 2702 |
% |
| 2703 |
% \begin{option}{version} |
| 2704 |
% \begin{syntax} |
| 2705 |
% version = \meta{version} \hfill Default: \emph{Empty} |
| 2706 |
% \end{syntax} |
| 2707 |
% \meta{\opt{version}} added to the \meta{\val{reference}} for a |
| 2708 |
% \env{scripture} quotation. |
| 2709 |
% \end{option} |
| 2710 |
% |
| 2711 |
% \begin{option}{version/delim} |
| 2712 |
% \begin{syntax} |
| 2713 |
% version/delim = \meta{delim} \hfill Default: \{\ \} |
| 2714 |
% \end{syntax} |
| 2715 |
% \meta{|delim|} to use between the \meta{\val{reference}} and the |
| 2716 |
% \meta{\opt{version}} of a \env{scripture} quotation. |
| 2717 |
% \end{option} |
| 2718 |
% |
| 2719 |
% \begin{option}{version/format} |
| 2720 |
% \begin{syntax} |
| 2721 |
% version/format = \meta{macro} \hfill Default: (\#1) |
| 2722 |
% \end{syntax} |
| 2723 |
% \meta{|macro|} used to format the \meta{\opt{version}} for a |
| 2724 |
% \env{scripture} quotation. |#1| contains the text of the |
| 2725 |
% \meta{\opt{version}}. |
| 2726 |
% \end{option} |
| 2727 |
% |
| 2728 |
% \changes{v2.1}{2024/01/10}{Add \opt{version/position} option} |
| 2729 |
% \begin{option}[added=2024-01-10]{version/position} |
| 2730 |
% \begin{syntax} |
| 2731 |
% version/position = withref \textbar\ end \hfill Default: withref |
| 2732 |
% \end{syntax} |
| 2733 |
% Set the position of the version at either with the reference or at the end |
| 2734 |
% of the quotation if \opt{reference/position} is set to \val{start}. |
| 2735 |
% \end{option} |
| 2736 |
% |
| 2737 |
% \begin{scriptureexample} |
| 2738 |
% \begin{verbatim} |
| 2739 |
% \begin{scripture}[John 1:1][version=NIV, |
| 2740 |
% reference/position=start, |
| 2741 |
% version/position=end] |
| 2742 |
% \ch{1}In the beginning was the Word, and the |
| 2743 |
% Word was with God, and the Word was God. |
| 2744 |
% \end{scripture} |
| 2745 |
% \end{verbatim} |
| 2746 |
% |
| 2747 |
% \tcblower |
| 2748 |
% |
| 2749 |
% \begin{scripture}[John 1:1][version=NIV, |
| 2750 |
% reference/position=start, |
| 2751 |
% version/position=end] |
| 2752 |
% \ch{1}In the beginning was the Word, and the |
| 2753 |
% Word was with God, and the Word was God. |
| 2754 |
% \end{scripture} |
| 2755 |
% \end{scriptureexample} |
| 2756 |
% |
| 2757 |
% \subsubsection{Options for the \env{center} environment} |
| 2758 |
% \label{centeroptions} |
| 2759 |
% |
| 2760 |
% If these options are passed directly to the \env{center} environment rather |
| 2761 |
% than to the package, \fn{scripturesetup} or the \env{scripture} environment, |
| 2762 |
% then the |center/| prefix should be dropped. |
| 2763 |
% |
| 2764 |
% \begin{option}{center/aboveskip} |
| 2765 |
% \begin{syntax} |
| 2766 |
% center/aboveskip = \meta{skip} \hfill Default: \cs{medskipamount} |
| 2767 |
% \end{syntax} |
| 2768 |
% \meta{|skip|} inserted above the \env{center} environment. |
| 2769 |
% \end{option} |
| 2770 |
% |
| 2771 |
% \begin{option}{center/belowskip} |
| 2772 |
% \begin{syntax} |
| 2773 |
% center/belowskip = \meta{skip} \hfill Default: \cs{medskipamount} |
| 2774 |
% \end{syntax} |
| 2775 |
% \meta{|skip|} inserted below the \env{center} environment. |
| 2776 |
% \end{option} |
| 2777 |
% |
| 2778 |
% \begin{option}{center/leftmargin} |
| 2779 |
% \begin{syntax} |
| 2780 |
% center/leftmargin = \meta{dimen} \hfill Default: 0pt |
| 2781 |
% \end{syntax} |
| 2782 |
% \meta{|dimen|} used for the left margin of the \env{center} environment. |
| 2783 |
% \end{option} |
| 2784 |
% |
| 2785 |
% \begin{option}{center/rightmargin} |
| 2786 |
% \begin{syntax} |
| 2787 |
% center/rightmargin = \meta{dimen} \hfill Default: 0pt |
| 2788 |
% \end{syntax} |
| 2789 |
% \meta{|dimen|} used for the right margin of the \env{center} environment. |
| 2790 |
% \end{option} |
| 2791 |
% |
| 2792 |
% \subsubsection{Options for the \env{flushright} environment} |
| 2793 |
% \label{flushrightoptions} |
| 2794 |
% |
| 2795 |
% If these options are passed directly to the \env{flushright} environment rather |
| 2796 |
% than to the package, \fn{scripturesetup} or the \env{scripture} environment, |
| 2797 |
% then the |flushright/| prefix should be dropped. |
| 2798 |
% |
| 2799 |
% \begin{option}{flushright/aboveskip} |
| 2800 |
% \begin{syntax} |
| 2801 |
% flushright/aboveskip = \meta{skip} \hfill Default: \cs{medskipamount} |
| 2802 |
% \end{syntax} |
| 2803 |
% \meta{|skip|} inserted above the \env{flushright} environment. |
| 2804 |
% \end{option} |
| 2805 |
% |
| 2806 |
% \begin{option}{flushright/belowskip} |
| 2807 |
% \begin{syntax} |
| 2808 |
% flushright/belowskip = \meta{skip} \hfill Default: \cs{medskipamount} |
| 2809 |
% \end{syntax} |
| 2810 |
% \meta{|skip|} inserted below the \env{flushright} environment. |
| 2811 |
% \end{option} |
| 2812 |
% |
| 2813 |
% \begin{option}{flushright/leftmargin} |
| 2814 |
% \begin{syntax} |
| 2815 |
% flushright/leftmargin = \meta{dimen} \hfill Default: 0pt |
| 2816 |
% \end{syntax} |
| 2817 |
% \meta{|dimen|} used for the left margin of the \env{flushright} environment. |
| 2818 |
% \end{option} |
| 2819 |
% |
| 2820 |
% \begin{option}{flushright/rightmargin} |
| 2821 |
% \begin{syntax} |
| 2822 |
% flushright/rightmargin = \meta{dimen} \hfill Default: 0pt |
| 2823 |
% \end{syntax} |
| 2824 |
% \meta{|dimen|} used for the right margin of the \env{flushright} environment. |
| 2825 |
% \end{option} |
| 2826 |
% |
| 2827 |
% \subsubsection{Options for the \env{hanging} environment} |
| 2828 |
% \label{hangingoptions} |
| 2829 |
% |
| 2830 |
% If these options are passed directly to the \env{hanging} environment rather |
| 2831 |
% than to the package, \fn{scripturesetup} or the \env{scripture} environment, |
| 2832 |
% then the |hanging/| prefix should be dropped. |
| 2833 |
% |
| 2834 |
% \begin{option}{hanging/aboveskip} |
| 2835 |
% \begin{syntax} |
| 2836 |
% hanging/aboveskip = \meta{skip} \hfill Default: \cs{medskipamount} |
| 2837 |
% \end{syntax} |
| 2838 |
% \meta{|skip|} inserted above the \env{hanging} environment. |
| 2839 |
% \end{option} |
| 2840 |
% |
| 2841 |
% \begin{option}{hanging/belowskip} |
| 2842 |
% \begin{syntax} |
| 2843 |
% hanging/belowskip = \meta{skip} \hfill Default: \cs{medskipamount} |
| 2844 |
% \end{syntax} |
| 2845 |
% \meta{|skip|} inserted below the \env{hanging} environment. |
| 2846 |
% \end{option} |
| 2847 |
% |
| 2848 |
% \changes{v2.1}{2024/12/31}{Add \opt{hanging/chapter/indent} option} |
| 2849 |
% \begin{option}[added=2024-12-31]{hanging/chapter/indent} |
| 2850 |
% \begin{syntax} |
| 2851 |
% hanging/chapter/indent = \meta{boolean} \hfill Default: true |
| 2852 |
% \end{syntax} |
| 2853 |
% Indent the first line of chapters in \env{hanging} environments. If this |
| 2854 |
% is set to \val{false}, then the paragraph will be set has a normal hanging |
| 2855 |
% paragraph (if there is room). |
| 2856 |
% \end{option} |
| 2857 |
% |
| 2858 |
% \begin{scriptureexample} |
| 2859 |
% \begin{verbatim} |
| 2860 |
% \begin{scripture}[Genesis 1:1--3][% |
| 2861 |
% hanging/chapter/indent=false] |
| 2862 |
% \begin{hanging} |
| 2863 |
% \ch{1}In the beginning God created the heavens |
| 2864 |
% and the earth. \vs{2}Now the earth was |
| 2865 |
% formless and empty, darkness was over the |
| 2866 |
% surface of the deep, and the Spirit of God was |
| 2867 |
% hovering over the waters. |
| 2868 |
% |
| 2869 |
% \vs{3}And God said, ``Let there be light,'' |
| 2870 |
% and there was light. |
| 2871 |
% \end{hanging} |
| 2872 |
% \end{scripture} |
| 2873 |
% \end{verbatim} |
| 2874 |
% |
| 2875 |
% \tcblower |
| 2876 |
% |
| 2877 |
% \begin{scripture}[Genesis 1:1--3][% |
| 2878 |
% hanging/chapter/indent=false] |
| 2879 |
% \begin{hanging} |
| 2880 |
% \ch{1}In the beginning God created the heavens |
| 2881 |
% and the earth. \vs{2}Now the earth was |
| 2882 |
% formless and empty, darkness was over the |
| 2883 |
% surface of the deep, and the Spirit of God was |
| 2884 |
% hovering over the waters. |
| 2885 |
% |
| 2886 |
% \vs{3}And God said, ``Let there be light,'' |
| 2887 |
% and there was light. |
| 2888 |
% \end{hanging} |
| 2889 |
% \end{scripture} |
| 2890 |
% \end{scriptureexample} |
| 2891 |
% |
| 2892 |
% \begin{option}{hanging/hang} |
| 2893 |
% \begin{syntax} |
| 2894 |
% hanging/hang = \meta{dimen} \hfill Default: 2em |
| 2895 |
% \end{syntax} |
| 2896 |
% \meta{|dimen|} used for the indent of subsequent lines of the |
| 2897 |
% \env{hanging} environment. |
| 2898 |
% \end{option} |
| 2899 |
% |
| 2900 |
% \begin{option}{hanging/leftmargin} |
| 2901 |
% \begin{syntax} |
| 2902 |
% hanging/leftmargin = \meta{dimen} \hfill Default: 1em |
| 2903 |
% \end{syntax} |
| 2904 |
% \meta{|dimen|} used for the left margin of the \env{hanging} environment. |
| 2905 |
% \end{option} |
| 2906 |
% |
| 2907 |
% \begin{option}{hanging/rightmargin} |
| 2908 |
% \begin{syntax} |
| 2909 |
% hanging/rightmargin = \meta{dimen} \hfill Default: 1em |
| 2910 |
% \end{syntax} |
| 2911 |
% \meta{|dimen|} used for the right margin of the \env{hanging} environment. |
| 2912 |
% \end{option} |
| 2913 |
% |
| 2914 |
% \changes{v2.1}{2024/12/17}{Add \opt{hanging/verse/left} option} |
| 2915 |
% \begin{option}[added=2024-12-17]{hanging/verse/left} |
| 2916 |
% \begin{syntax} |
| 2917 |
% hanging/verse/left = \meta{boolean} \hfill Default: false |
| 2918 |
% \end{syntax} |
| 2919 |
% Align verse numbers in \env{hanging} environments at the left margin of |
| 2920 |
% the \env{hanging} environment. This is only used for verses at the start |
| 2921 |
% of a paragraph. This option is the opposite of \opt{hanging/verse/right}. |
| 2922 |
% \end{option} |
| 2923 |
% |
| 2924 |
% \begin{scriptureexample} |
| 2925 |
% \begin{verbatim} |
| 2926 |
% \documentclass{article} |
| 2927 |
% \usepackage{babel} |
| 2928 |
% \babelprovide[import, main]{english} |
| 2929 |
% \babelprovide[import, |
| 2930 |
% onchar=ids fonts]{ancientgreek} |
| 2931 |
% \babelfont[ancientgreek]{rm}[ |
| 2932 |
% BoldFont=NewCM10-Bold]{NewCM10-Regular} |
| 2933 |
% \usepackage{scripture} |
| 2934 |
% \begin{document} |
| 2935 |
% \begin{scripture}[Κατά Μάρκον 1:28--30][ |
| 2936 |
% hanging/hang=1em, hanging/leftmargin=2em, |
| 2937 |
% hanging/verse/left, hanging/verse/sep=1em, |
| 2938 |
% language=ancientgreek, verse/sep=0.25em, |
| 2939 |
% verse/font=\sffamily\bfseries, version=THGNT] |
| 2940 |
% \begin{hanging} |
| 2941 |
% \vs{28}Καὶ ἐξῆλθεν ἡ ἀκοὴ αὐτοῦ εὐθὺς πανταχοῦ |
| 2942 |
% εἰς ὅλην τὴν περίχωρον τῆς Γαλιλαίας. |
| 2943 |
% |
| 2944 |
% \vs{29}Καὶ εὐθὺς ἐκ τῆς συναγωγῆς ἐξελθόντες |
| 2945 |
% ἦλθον εἰς τὴν οἰκίαν Σίμωνος καὶ Ἀνδρέου μετὰ |
| 2946 |
% Ἰακώβου καὶ Ἰωάννου. \vs{30}ἡ δὲ πενθερὰ |
| 2947 |
% Σίμωνος κατέκειτο πυρέσσουσα, καὶ εὐθὺς |
| 2948 |
% λέγουσιν αὐτῷ περὶ αὐτῆς. |
| 2949 |
% \end{hanging} |
| 2950 |
% \end{scripture} |
| 2951 |
% \end{document} |
| 2952 |
% \end{verbatim} |
| 2953 |
% |
| 2954 |
% \tcblower |
| 2955 |
% |
| 2956 |
% \begin{scripture}[Κατά Μάρκον 1:28--30][ |
| 2957 |
% hanging/hang=1em, hanging/leftmargin=2em, |
| 2958 |
% hanging/verse/left, hanging/verse/sep=1em, |
| 2959 |
% language=ancientgreek, verse/sep=0.25em, |
| 2960 |
% verse/font=\sffamily\bfseries, version=THGNT] |
| 2961 |
% \begin{hanging} |
| 2962 |
% \vs{28}Καὶ ἐξῆλθεν ἡ ἀκοὴ αὐτοῦ εὐθὺς πανταχοῦ |
| 2963 |
% εἰς ὅλην τὴν περίχωρον τῆς Γαλιλαίας. |
| 2964 |
% |
| 2965 |
% \vs{29}Καὶ εὐθὺς ἐκ τῆς συναγωγῆς ἐξελθόντες |
| 2966 |
% ἦλθον εἰς τὴν οἰκίαν Σίμωνος καὶ Ἀνδρέου μετὰ |
| 2967 |
% Ἰακώβου καὶ Ἰωάννου. \vs{30}ἡ δὲ πενθερὰ |
| 2968 |
% Σίμωνος κατέκειτο πυρέσσουσα, καὶ εὐθὺς |
| 2969 |
% λέγουσιν αὐτῷ περὶ αὐτῆς. |
| 2970 |
% \end{hanging} |
| 2971 |
% \end{scripture} |
| 2972 |
% \end{scriptureexample} |
| 2973 |
% |
| 2974 |
% \changes{v2.1}{2024/12/17}{Add \opt{hanging/verse/right} option} |
| 2975 |
% \begin{option}[added=2024-12-17]{hanging/verse/right} |
| 2976 |
% \begin{syntax} |
| 2977 |
% hanging/verse/right = \meta{boolean} \hfill Default: true |
| 2978 |
% \end{syntax} |
| 2979 |
% Align verse numbers in \env{hanging} environments at the left margin of |
| 2980 |
% the \env{hanging} environment. The verse numbers overlap to the left. This |
| 2981 |
% is only used for verses at the start of a paragraph. This option is the |
| 2982 |
% opposite of \opt{hanging/verse/left}. |
| 2983 |
% \end{option} |
| 2984 |
% |
| 2985 |
% \changes{v2.1}{2024/12/17}{Add \opt{hanging/verse/sep} option} |
| 2986 |
% \begin{option}[added=2024-12-17]{hanging/verse/sep} |
| 2987 |
% \begin{syntax} |
| 2988 |
% hanging/verse/sep = \meta{dimen} \hfill Default: 0.05em |
| 2989 |
% \end{syntax} |
| 2990 |
% \meta{|dimen|} used to separate a \fn{vs} from the following text in a |
| 2991 |
% \env{hanging} environment. This is only used for verses at the start of a |
| 2992 |
% paragraph. |
| 2993 |
% \end{option} |
| 2994 |
% |
| 2995 |
% \subsubsection{Options for the \env{midparachap} environment} |
| 2996 |
% \label{midparachapoptions} |
| 2997 |
% |
| 2998 |
% If these options are passed directly to the \env{midparachap} environment |
| 2999 |
% rather than to the package, \fn{scripturesetup} or the \env{scripture} |
| 3000 |
% environment, then the |midparachap/| prefix should be dropped. |
| 3001 |
% |
| 3002 |
% \begin{option}{midparachap/hideverse} |
| 3003 |
% \begin{syntax} |
| 3004 |
% midparachap/hideverse = \meta{boolean} \hfill Default: false |
| 3005 |
% \end{syntax} |
| 3006 |
% Whether a \fn{vs}|{1}| should automatically be inserted after a \fn{ch} |
| 3007 |
% when the \fn{ch} occurs mid-paragraph. This also affects \fn{ch} in |
| 3008 |
% \env{poetry} environments. The value of \meta{|boolean|} is optional and |
| 3009 |
% assumed to be \val{true} if not present. This option is the opposite of |
| 3010 |
% \opt{midparachap/showverse}. See also \opt{chapter/showverse}. |
| 3011 |
% \end{option} |
| 3012 |
% |
| 3013 |
% \begin{scriptureexample} |
| 3014 |
% \begin{verbatim} |
| 3015 |
% \begin{scripture}[Hosea 11:12--12:1]% |
| 3016 |
% [midparachap/hideverse] |
| 3017 |
% \begin{poetry} |
| 3018 |
% \vs{12}Ephraim has surrounded me with lies, |
| 3019 |
% Israel with deceit. |
| 3020 |
% |
| 3021 |
% And Judah is unruly against God, |
| 3022 |
% even against the faithful Holy One. |
| 3023 |
% |
| 3024 |
% \ch{12}Ephraim feeds on the wind; |
| 3025 |
% he pursues the east wind all day |
| 3026 |
% and multiplies lies and violence. |
| 3027 |
% |
| 3028 |
% He makes a treaty with Assyria |
| 3029 |
% and sends olive oil to Egypt. |
| 3030 |
% \end{poetry} |
| 3031 |
% \end{scripture} |
| 3032 |
% \end{verbatim} |
| 3033 |
% |
| 3034 |
% \tcblower |
| 3035 |
% |
| 3036 |
% \begin{scripture}[Hosea 11:12--12:1]% |
| 3037 |
% [midparachap/hideverse] |
| 3038 |
% \begin{poetry} |
| 3039 |
% \vs{12}Ephraim has surrounded me with lies, |
| 3040 |
% Israel with deceit. |
| 3041 |
% |
| 3042 |
% And Judah is unruly against God, |
| 3043 |
% even against the faithful Holy One. |
| 3044 |
% |
| 3045 |
% \ch{12}Ephraim feeds on the wind; |
| 3046 |
% he pursues the east wind all day |
| 3047 |
% and multiplies lies and violence. |
| 3048 |
% |
| 3049 |
% He makes a treaty with Assyria |
| 3050 |
% and sends olive oil to Egypt. |
| 3051 |
% \end{poetry} |
| 3052 |
% \end{scripture} |
| 3053 |
% \end{scriptureexample} |
| 3054 |
% |
| 3055 |
% \begin{option}{midparachap/showverse} |
| 3056 |
% \begin{syntax} |
| 3057 |
% midparachap/showverse = \meta{boolean} \hfill Default: true |
| 3058 |
% \end{syntax} |
| 3059 |
% Whether a \fn{vs}|{1}| should automatically be inserted after a \fn{ch} |
| 3060 |
% when the \fn{ch} occurs mid-paragraph. This also affects \fn{ch} in |
| 3061 |
% \env{poetry} environments. The value of \meta{|boolean|} is optional and |
| 3062 |
% assumed to be \val{true} if not present. This option is the opposite of |
| 3063 |
% \opt{midparachap/hideverse}. See also \opt{chapter/showverse}. |
| 3064 |
% \end{option} |
| 3065 |
% |
| 3066 |
% \subsubsection{Options for the \env{narrow} environment} |
| 3067 |
% \label{narrowoptions} |
| 3068 |
% |
| 3069 |
% If these options are passed directly to the \env{narrow} environment rather |
| 3070 |
% than to the package, \fn{scripturesetup} or the \env{scripture} environment, |
| 3071 |
% then the |narrow/| prefix should be dropped. |
| 3072 |
% |
| 3073 |
% \begin{option}{narrow/aboveskip} |
| 3074 |
% \begin{syntax} |
| 3075 |
% narrow/aboveskip = \meta{skip} \hfill Default: \cs{medskipamount} |
| 3076 |
% \end{syntax} |
| 3077 |
% \meta{|skip|} inserted above the \env{narrow} environment. |
| 3078 |
% \end{option} |
| 3079 |
% |
| 3080 |
% \begin{option}{narrow/belowskip} |
| 3081 |
% \begin{syntax} |
| 3082 |
% narrow/belowskip = \meta{skip} \hfill Default: \cs{medskipamount} |
| 3083 |
% \end{syntax} |
| 3084 |
% \meta{|skip|} inserted below the \env{narrow} environment. |
| 3085 |
% \end{option} |
| 3086 |
% |
| 3087 |
% \begin{option}{narrow/leftmargin} |
| 3088 |
% \begin{syntax} |
| 3089 |
% narrow/leftmargin = \meta{dimen} \hfill Default: 1em |
| 3090 |
% \end{syntax} |
| 3091 |
% \meta{|dimen|} used for the left margin of the \env{narrow} environment. |
| 3092 |
% \end{option} |
| 3093 |
% |
| 3094 |
% \begin{option}{narrow/rightmargin} |
| 3095 |
% \begin{syntax} |
| 3096 |
% narrow/rightmargin = \meta{dimen} \hfill Default: 1em |
| 3097 |
% \end{syntax} |
| 3098 |
% \meta{|dimen|} used for the right margin of the \env{narrow} environment. |
| 3099 |
% \end{option} |
| 3100 |
% |
| 3101 |
% \subsubsection{Options for the \env{poetry} environment} |
| 3102 |
% \label{poetryoptions} |
| 3103 |
% |
| 3104 |
% If these options are passed directly to the \env{poetry} environment rather |
| 3105 |
% than to the package, \fn{scripturesetup} or the \env{scripture} environment, |
| 3106 |
% then the |poetry/| prefix should be dropped. |
| 3107 |
% |
| 3108 |
% \begin{option}{poetry/aboveskip} |
| 3109 |
% \begin{syntax} |
| 3110 |
% poetry/aboveskip = \meta{skip} \hfill Default: \cs{medskipamount} |
| 3111 |
% \end{syntax} |
| 3112 |
% \meta{|skip|} inserted above the \env{poetry} environment. |
| 3113 |
% \end{option} |
| 3114 |
% |
| 3115 |
% \begin{option}{poetry/belowskip} |
| 3116 |
% \begin{syntax} |
| 3117 |
% poetry/belowskip = \meta{skip} \hfill Default: \cs{medskipamount} |
| 3118 |
% \end{syntax} |
| 3119 |
% \meta{|skip|} inserted below the \env{poetry} environment. |
| 3120 |
% \end{option} |
| 3121 |
% |
| 3122 |
% \begin{option}{poetry/bigindent} |
| 3123 |
% \begin{syntax} |
| 3124 |
% poetry/bigindent = \meta{dimen} \hfill Default: 4em |
| 3125 |
% \end{syntax} |
| 3126 |
% \meta{|dimen|} used for the indent subsequent lines of a line of poetry in |
| 3127 |
% a \env{poetry} environment if it needs to flow on to the following line. |
| 3128 |
% \end{option} |
| 3129 |
% |
| 3130 |
% \begin{option}{poetry/indent} |
| 3131 |
% \begin{syntax} |
| 3132 |
% poetry/indent = \meta{dimen} \hfill Default: 1em |
| 3133 |
% \end{syntax} |
| 3134 |
% \meta{|dimen|} used for the second half of a line of poetry in a |
| 3135 |
% \env{poetry} environment. |
| 3136 |
% \end{option} |
| 3137 |
% |
| 3138 |
% \begin{option}{poetry/leftmargin} |
| 3139 |
% \begin{syntax} |
| 3140 |
% poetry/leftmargin = \meta{dimen} \hfill Default: 1em |
| 3141 |
% \end{syntax} |
| 3142 |
% \meta{|dimen|} used for the left margin of the \env{poetry} environment. |
| 3143 |
% \end{option} |
| 3144 |
% |
| 3145 |
% \begin{option}{poetry/rightmargin} |
| 3146 |
% \begin{syntax} |
| 3147 |
% poetry/rightmargin = \meta{dimen} \hfill Default: 0pt |
| 3148 |
% \end{syntax} |
| 3149 |
% \meta{|dimen|} used for the right margin of the \env{poetry} environment. |
| 3150 |
% \end{option} |
| 3151 |
% |
| 3152 |
% \changes{v1.1}{2022/07/31}{Add \opt{poetry/verse/left} option} |
| 3153 |
% \begin{option}[added=2022-07-31]{poetry/verse/left} |
| 3154 |
% \begin{syntax} |
| 3155 |
% poetry/verse/left = \meta{boolean} \hfill Default: false |
| 3156 |
% \end{syntax} |
| 3157 |
% Align verse numbers in \env{poetry} environments at the left margin of the |
| 3158 |
% \env{scripture} environment. This option is the opposite of |
| 3159 |
% \opt{poetry/verse/right}. |
| 3160 |
% \end{option} |
| 3161 |
% |
| 3162 |
% \begin{scriptureexample}[lefthand ratio=0.65] |
| 3163 |
% \begin{verbatim} |
| 3164 |
% \begin{scripture}[Acts 15:15--18]% |
| 3165 |
% [poetry/leftmargin=2em, poetry/verse/left] |
| 3166 |
% \vs{15}The words of the prophets are in |
| 3167 |
% agreement with this, as it is written: |
| 3168 |
% \begin{poetry} |
| 3169 |
% \vs{16}`\thinspace``After this I will return |
| 3170 |
% and rebuild David's fallen tent. |
| 3171 |
% |
| 3172 |
% Its ruins I will rebuild, |
| 3173 |
% and I will restore it, |
| 3174 |
% |
| 3175 |
% \vs{17}that the rest of mankind may seek the Lord, |
| 3176 |
% even all the Gentiles who bear my name, |
| 3177 |
% |
| 3178 |
% says the Lord, who does these things''--- |
| 3179 |
% \vs{18}things known from long ago. |
| 3180 |
% \end{poetry} |
| 3181 |
% \end{scripture} |
| 3182 |
% \end{verbatim} |
| 3183 |
% |
| 3184 |
% \tcblower |
| 3185 |
% |
| 3186 |
% \begin{scripture}[Acts 15:15--18]% |
| 3187 |
% [poetry/leftmargin=2em, poetry/verse/left] |
| 3188 |
% \vs{15}The words of the prophets are in |
| 3189 |
% agreement with this, as it is written: |
| 3190 |
% \begin{poetry} |
| 3191 |
% \vs{16}`\thinspace``After this I will return |
| 3192 |
% and rebuild David's fallen tent. |
| 3193 |
% |
| 3194 |
% Its ruins I will rebuild, |
| 3195 |
% and I will restore it, |
| 3196 |
% |
| 3197 |
% \vs{17}that the rest of mankind may seek the Lord, |
| 3198 |
% even all the Gentiles who bear my name, |
| 3199 |
% |
| 3200 |
% says the Lord, who does these things''--- |
| 3201 |
% \vs{18}things known from long ago. |
| 3202 |
% \end{poetry} |
| 3203 |
% \end{scripture} |
| 3204 |
% \end{scriptureexample} |
| 3205 |
% |
| 3206 |
% \changes{v1.1}{2022/07/31}{Add \opt{poetry/verse/right} option} |
| 3207 |
% \begin{option}[added=2022-07-31]{poetry/verse/right} |
| 3208 |
% \begin{syntax} |
| 3209 |
% poetry/verse/right = \meta{boolean} \hfill Default: true |
| 3210 |
% \end{syntax} |
| 3211 |
% Align verse numbers in \env{poetry} environments at the left margin of the |
| 3212 |
% poetry environment. The verse numbers overlap to the left. This option is |
| 3213 |
% the opposite of \opt{poetry/verse/left}. |
| 3214 |
% \end{option} |
| 3215 |
% |
| 3216 |
% \changes{v1.1}{2022/07/31}{Add \opt{poetry/verse/sep} option} |
| 3217 |
% \begin{option}[added=2022-07-31]{poetry/verse/sep} |
| 3218 |
% \begin{syntax} |
| 3219 |
% poetry/verse/sep = \meta{dimen} \hfill Default: 0.05em |
| 3220 |
% \end{syntax} |
| 3221 |
% \meta{|dimen|} used to separate a \fn{vs} from the following text in a |
| 3222 |
% \env{poetry} environment. This is only used for verses at the start of a |
| 3223 |
% line. |
| 3224 |
% \end{option} |
| 3225 |
% |
| 3226 |
% \end{documentation} |
| 3227 |
% |
| 3228 |
% \begin{implementation} |
| 3229 |
% |
| 3230 |
% \section{Implementation} |
| 3231 |
% |
| 3232 |
% \begin{macrocode} |
| 3233 |
%<*package> |
| 3234 |
%<@@=scripture> |
| 3235 |
% \end{macrocode} |
| 3236 |
% |
| 3237 |
% \begin{macrocode} |
| 3238 |
\NeedsTeXFormat{LaTeX2e}[2022-11-01] |
| 3239 |
\ProvidesExplPackage{scripture}{2025/08/09}{2.2} |
| 3240 |
{Format Scripture Quotations (DCP)} |
| 3241 |
% \end{macrocode} |
| 3242 |
% |
| 3243 |
% \subsection{Hacks and workarounds} |
| 3244 |
% |
| 3245 |
% Work around odd interaction between \cs{textdir} and display math. See |
| 3246 |
% \url{https://tex.stackexchange.com/q/716621/87678}. |
| 3247 |
% |
| 3248 |
% \begin{macrocode} |
| 3249 |
\bool_new:N \l_@@_textdir_change_in_group_bool |
| 3250 |
\cs_new_protected:Nn \@@_set_textdirection: |
| 3251 |
{ |
| 3252 |
\sys_if_engine_luatex:T |
| 3253 |
{ |
| 3254 |
\textdirection \int_use:N \textdirection |
| 3255 |
\bool_set_true:N \l_@@_textdir_change_in_group_bool |
| 3256 |
} |
| 3257 |
} |
| 3258 |
% \end{macrocode} |
| 3259 |
% |
| 3260 |
% \subsection{Messages} |
| 3261 |
% |
| 3262 |
% \env{scripture} environments along with all internal environments can not be |
| 3263 |
% nested. |
| 3264 |
% |
| 3265 |
% \begin{macrocode} |
| 3266 |
\msg_new:nnnn { scripture } { nested-environment } |
| 3267 |
{ Nesting~of~scripture~environments~not~supported. } |
| 3268 |
{ You~have~tried~to~nest~a~scripture~environment~or \\ |
| 3269 |
one~of~its~internal~environments,~which~is~not~supported. } |
| 3270 |
% \end{macrocode} |
| 3271 |
% |
| 3272 |
% Make sure \pkg{polyglossia} languages and variants are set up. |
| 3273 |
% |
| 3274 |
% \begin{macrocode} |
| 3275 |
\msg_new:nnnn { scripture } { language-error } |
| 3276 |
{ Language~`#1'~not~set~up. } |
| 3277 |
{ Language~`#1'~has~not~been~set~up.~Make~sure~you~set~up~languages~ |
| 3278 |
before~using~the~language~option~of~the~scripture~environment. } |
| 3279 |
% \end{macrocode} |
| 3280 |
% |
| 3281 |
% Warn if a \opt{language} is requested and neither \pkg{babel} nor |
| 3282 |
% \pkg{polyglossia} is loaded. |
| 3283 |
% |
| 3284 |
% \begin{macrocode} |
| 3285 |
\msg_new:nnnn { scripture } { language-warning } |
| 3286 |
{ Language~requested~without~support. } |
| 3287 |
{ You~have~requested~language=#1,~but~neither~babel~nor~polyglossia~ |
| 3288 |
have~been~loaded~and~set~up.~Ignoring~option~language=#1. } |
| 3289 |
% \end{macrocode} |
| 3290 |
% |
| 3291 |
% Error if an \fn{heading} is not used in the main \env{scripture} |
| 3292 |
% environment. |
| 3293 |
% |
| 3294 |
% \begin{macrocode} |
| 3295 |
\msg_new:nnnn { scripture } { heading-error } |
| 3296 |
{ \token_to_str:N \heading \c_space_tl not~support~within~inner~ |
| 3297 |
environments. } |
| 3298 |
{ You~have~tried~to~use~\token_to_str:N \heading \c_space_tl within~the~ |
| 3299 |
`#1'~environment,~but~this~macro~is~only~supported~in~the~main~ |
| 3300 |
`scripture'~environment. } |
| 3301 |
% \end{macrocode} |
| 3302 |
% |
| 3303 |
% Error if an unknown \opt{style} is requested. |
| 3304 |
% |
| 3305 |
% \begin{macrocode} |
| 3306 |
\msg_new:nnnn { scripture } { unknown-style } |
| 3307 |
{ Style~#1~not~defined. } |
| 3308 |
{ You~have~requested~style=#1,~but~it~has~not~been~defined.~ |
| 3309 |
You~can~define~it~using~\token_to_str:N \scripturestyle.~ |
| 3310 |
Ignoring~option~style=#1. } |
| 3311 |
% \end{macrocode} |
| 3312 |
% |
| 3313 |
% \subsection{Options} |
| 3314 |
% |
| 3315 |
% Key-value settings for the \env{scripture} environment and its inner |
| 3316 |
% environments. |
| 3317 |
% \begin{macrocode} |
| 3318 |
\keys_define:nn { scripture } |
| 3319 |
{ |
| 3320 |
, aboveskip .tl_set:N = \l_@@_aboveskip_tl |
| 3321 |
, aboveskip .value_required:n = true |
| 3322 |
, aboveskip .initial:n = \c_zero_skip |
| 3323 |
, added / font .tl_set:N = \l_@@_added_font_tl |
| 3324 |
, added / font .value_required:n = true |
| 3325 |
, added / font .initial:n = |
| 3326 |
, added / format .cs_set:Np = \@@_added_format:n #1 |
| 3327 |
, added / format .value_required:n = true |
| 3328 |
, added / format .initial:n = \emph { #1 } |
| 3329 |
, after .tl_set:N = \l_@@_after_tl |
| 3330 |
, after .value_required:n = true |
| 3331 |
, after .initial:n = |
| 3332 |
, before .tl_set:N = \l_@@_before_tl |
| 3333 |
, before .value_required:n = true |
| 3334 |
, before .initial:n = |
| 3335 |
, belowskip .tl_set:N = \l_@@_belowskip_tl |
| 3336 |
, belowskip .value_required:n = true |
| 3337 |
, belowskip .initial:n = \c_zero_skip |
| 3338 |
, book .tl_gset:N = \g_@@_book_tl |
| 3339 |
, book .value_required:n = true |
| 3340 |
, book .initial:n = |
| 3341 |
, colour .tl_set:N = \l_@@_colour_tl |
| 3342 |
, colour .value_required:n = true |
| 3343 |
, colour .initial:n = . |
| 3344 |
, color .meta:n = { colour = { #1 } } |
| 3345 |
, compact .bool_set:N = \l_@@_compact_bool |
| 3346 |
, compact .default:n = true |
| 3347 |
, compact .initial:n = false |
| 3348 |
, chapter .int_gset:N = \g_@@_chapter_int |
| 3349 |
, chapter .value_required:n = true |
| 3350 |
, chapter .initial:n = \c_one_int |
| 3351 |
, chapter / align .choices:nn = { left, right } |
| 3352 |
{ |
| 3353 |
\tl_if_exist:NF \l_@@_chapter_align_tl |
| 3354 |
{ \tl_new:N \l_@@_chapter_align_tl } |
| 3355 |
\str_case:Vn \l_keys_choice_tl |
| 3356 |
{ |
| 3357 |
{ left } |
| 3358 |
{ |
| 3359 |
\tl_set:Nn \l_@@_chapter_align_tl |
| 3360 |
{ l } |
| 3361 |
} |
| 3362 |
{ right } |
| 3363 |
{ |
| 3364 |
\tl_set:Nn \l_@@_chapter_align_tl |
| 3365 |
{ r } |
| 3366 |
} |
| 3367 |
} |
| 3368 |
} |
| 3369 |
, chapter / align .value_required:n = true |
| 3370 |
, chapter / align .initial:n = left |
| 3371 |
, chapter / font .tl_set:N = \l_@@_chap_font_tl |
| 3372 |
, chapter / font .value_required:n = true |
| 3373 |
, chapter / font .initial:n = \bfseries |
| 3374 |
, chapter / colour .tl_set:N = \l_@@_chapter_colour_tl |
| 3375 |
, chapter / colour .value_required:n = true |
| 3376 |
, chapter / colour .initial:n = . |
| 3377 |
, chapter / color .meta:n = { chapter / colour = { #1 } } |
| 3378 |
, chapter / drop .bool_set:N = \l_@@_chap_drop_bool |
| 3379 |
, chapter / drop .default:n = true |
| 3380 |
, chapter / drop .initial:n = true |
| 3381 |
, chapter / format .cs_set:Np = \@@_chap_format:n #1 |
| 3382 |
, chapter / format .value_required:n = true |
| 3383 |
, chapter / format .initial:n = #1 |
| 3384 |
, chapter / hide .bool_set_inverse:N = \l_@@_chap_show_bool |
| 3385 |
, chapter / hide .default:n = true |
| 3386 |
, chapter / nodrop .bool_set_inverse:N = \l_@@_chap_drop_bool |
| 3387 |
, chapter / nodrop .default:n = true |
| 3388 |
, chapter / para .bool_set:N = \l_@@_chap_para_bool |
| 3389 |
, chapter / para .default:n = true |
| 3390 |
, chapter / para .initial:n = false |
| 3391 |
, chapter / para / aboveskip .tl_set:N = \l_@@_chap_para_aboveskip_tl |
| 3392 |
, chapter / para / aboveskip .value_required:n = true |
| 3393 |
, chapter / para / aboveskip .initial:n = \bigskipamount |
| 3394 |
, chapter / para / belowskip .tl_set:N = \l_@@_chap_para_belowskip_tl |
| 3395 |
, chapter / para / belowskip .value_required:n = true |
| 3396 |
, chapter / para / belowskip .initial:n = \medskipamount |
| 3397 |
, chapter / para / indent .code:n = { |
| 3398 |
\bool_set:Nn |
| 3399 |
\l_@@_chap_para_afterindent_bool |
| 3400 |
{ \str_if_eq_p:nn { #1 } { true } } |
| 3401 |
} |
| 3402 |
, chapter / para / indent .default:n = true |
| 3403 |
, chapter / para / indent .initial:n = true |
| 3404 |
, chapter / sep .tl_set:N = \l_@@_chap_sep_tl |
| 3405 |
, chapter / sep .value_required:n = true |
| 3406 |
, chapter / sep .initial:n = 0.5em |
| 3407 |
, chapter / show .bool_set:N = \l_@@_chap_show_bool |
| 3408 |
, chapter / show .default:n = true |
| 3409 |
, chapter / show .initial:n = true |
| 3410 |
, chapter / showverse .bool_set:N = \l_@@_chap_show_verse_bool |
| 3411 |
, chapter / showverse .default:n = true |
| 3412 |
, chapter / showverse .initial:n = false |
| 3413 |
, chapter / smash .bool_set:N = \l_@@_chap_smash_bool |
| 3414 |
, chapter / smash .default:n = true |
| 3415 |
, chapter / smash .initial:n = false |
| 3416 |
, chapter / valign .choices:nn = { bottom, middle, top } |
| 3417 |
{ |
| 3418 |
\tl_if_exist:NF \l_@@_chapter_valign_tl |
| 3419 |
{ \tl_new:N \l_@@_chapter_valign_tl } |
| 3420 |
\str_case:Vn \l_keys_choice_tl |
| 3421 |
{ |
| 3422 |
{ bottom } |
| 3423 |
{ |
| 3424 |
\tl_set:Nn \l_@@_chapter_valign_tl |
| 3425 |
{ b } |
| 3426 |
} |
| 3427 |
{ middle } |
| 3428 |
{ |
| 3429 |
\tl_set:Nn \l_@@_chapter_valign_tl |
| 3430 |
{ vc } |
| 3431 |
} |
| 3432 |
{ top } |
| 3433 |
{ |
| 3434 |
\tl_set:Nn \l_@@_chapter_valign_tl |
| 3435 |
{ t } |
| 3436 |
} |
| 3437 |
} |
| 3438 |
} |
| 3439 |
, chapter / valign .value_required:n = true |
| 3440 |
, chapter / valign .initial:n = bottom |
| 3441 |
, chapter / xchar .tl_set:N = \l_@@_X_char_tl |
| 3442 |
, chapter / xchar .value_required:n = true |
| 3443 |
, chapter / xchar .initial:n = X |
| 3444 |
, defaults .code:n = \cs_if_exist_use:N \@@_setup_reset_defaults: |
| 3445 |
, defaults .value_forbidden:n = true |
| 3446 |
, extraskip .tl_set:N = \l_@@_extraskip_tl |
| 3447 |
, extraskip .value_required:n = true |
| 3448 |
, extraskip .initial:n = \medskipamount |
| 3449 |
, font .tl_set:N = \l_@@_font_tl |
| 3450 |
, font .value_required:n = true |
| 3451 |
, font .initial:n = |
| 3452 |
, heading / aboveskip .tl_set:N = \l_@@_heading_aboveskip_tl |
| 3453 |
, heading / aboveskip .value_required:n = true |
| 3454 |
, heading / aboveskip .initial:n = \bigskipamount |
| 3455 |
, heading / afterindent .bool_set:N = \l_@@_heading_afterindent_bool |
| 3456 |
, heading / afterindent .default:n = true |
| 3457 |
, heading / afterindent .initial:n = false |
| 3458 |
, heading / align .choices:nn = { left, right, center } |
| 3459 |
{ |
| 3460 |
\tl_if_exist:NF \l_@@_heading_align_tl |
| 3461 |
{ \tl_new:N \l_@@_heading_align_tl } |
| 3462 |
\str_case:Vn \l_keys_choice_tl |
| 3463 |
{ |
| 3464 |
{ left } |
| 3465 |
{ |
| 3466 |
\tl_set:Nn \l_@@_heading_align_tl |
| 3467 |
{ \raggedright } |
| 3468 |
} |
| 3469 |
{ right } |
| 3470 |
{ |
| 3471 |
\tl_set:Nn \l_@@_heading_align_tl |
| 3472 |
{ \raggedleft } |
| 3473 |
} |
| 3474 |
{ center } |
| 3475 |
{ |
| 3476 |
\tl_set:Nn \l_@@_heading_align_tl |
| 3477 |
{ \centering } |
| 3478 |
} |
| 3479 |
} |
| 3480 |
} |
| 3481 |
, heading / align .value_required:n = true |
| 3482 |
, heading / align .initial:n = left |
| 3483 |
, heading / belowskip .tl_set:N = \l_@@_heading_belowskip_tl |
| 3484 |
, heading / belowskip .value_required:n = true |
| 3485 |
, heading / belowskip .initial:n = \medskipamount |
| 3486 |
, heading / font .tl_set:N = \l_@@_heading_font_tl |
| 3487 |
, heading / font .value_required:n = true |
| 3488 |
, heading / font .initial:n = \small\itshape |
| 3489 |
, heading / format .cs_set:Np = \@@_heading_format:n #1 |
| 3490 |
, heading / format .value_required:n = true |
| 3491 |
, heading / format .initial:n = #1 |
| 3492 |
, heading / hide .bool_set_inverse:N = \l_@@_heading_show_bool |
| 3493 |
, heading / hide .default:n = true |
| 3494 |
, heading / show .bool_set:N = \l_@@_heading_show_bool |
| 3495 |
, heading / show .default:n = true |
| 3496 |
, heading / show .initial:n = true |
| 3497 |
, indent .bool_set:N = \l_@@_indent_bool |
| 3498 |
, indent .default:n = true |
| 3499 |
, indent .initial:n = true |
| 3500 |
, inline .bool_set:N = \l_@@_inline_bool |
| 3501 |
, inline .default:n = true |
| 3502 |
, inline .initial:n = false |
| 3503 |
, inline / begin .tl_set:N = \l_@@_inline_begin_tl |
| 3504 |
, inline / begin .value_required:n = true |
| 3505 |
, inline / begin .initial:n = `` |
| 3506 |
, inline / end .tl_set:N = \l_@@_inline_end_tl |
| 3507 |
, inline / end .value_required:n = true |
| 3508 |
, inline / end .initial:n = '' |
| 3509 |
, inline / reference / format .cs_set:Np = \@@_inline_ref_format:n #1 |
| 3510 |
, inline / reference / format .value_required:n = true |
| 3511 |
, inline / reference / format .initial:n = (#1) |
| 3512 |
, inline / reference / sep .tl_set:N = \l_@@_inline_ref_sep_tl |
| 3513 |
, inline / reference / sep .value_required:n = true |
| 3514 |
, inline / reference / sep .initial:n = 0.5em |
| 3515 |
, inline / version / delim .tl_set:N = \l_@@_inline_version_delim_tl |
| 3516 |
, inline / version / delim .value_required:n = true |
| 3517 |
, inline / version / delim .initial:n = \c_space_tl |
| 3518 |
, inline / version / format .cs_set:Np = \@@_inline_version_format:n #1 |
| 3519 |
, inline / version / format .value_required:n = true |
| 3520 |
, inline / version / format .initial:n = #1 |
| 3521 |
, language .tl_set:N = \l_@@_language_tl |
| 3522 |
, language .value_required:n = true |
| 3523 |
, language .initial:n = |
| 3524 |
, language / variant .tl_set:N = \l_@@_language_variant_tl |
| 3525 |
, language / variant .value_required:n = true |
| 3526 |
, language / variant .initial:n = |
| 3527 |
, leftmargin .tl_set:N = \l_@@_leftmargin_tl |
| 3528 |
, leftmargin .value_required:n = true |
| 3529 |
, leftmargin .initial:n = \c_zero_dim |
| 3530 |
, name / font .tl_set:N = \l_@@_name_font_tl |
| 3531 |
, name / font .value_required:n = true |
| 3532 |
, name / font .initial:n = \scshape |
| 3533 |
, name / format .cs_set:Np = \@@_name_format:n #1 |
| 3534 |
, name / format .value_required:n = true |
| 3535 |
, name / format .initial:n = #1 |
| 3536 |
, noindent .bool_set_inverse:N = \l_@@_indent_bool |
| 3537 |
, noindent .default:n = true |
| 3538 |
, parindent .tl_set:N = \l_@@_parindent_tl |
| 3539 |
, parindent .value_required:n = true |
| 3540 |
, parindent .initial:n = \parindent |
| 3541 |
, parskip .tl_set:N = \l_@@_parskip_tl |
| 3542 |
, parskip .value_required:n = true |
| 3543 |
, parskip .initial:n = \parskip |
| 3544 |
, pilcrow .bool_set:N = \l_@@_pilcrow_bool |
| 3545 |
, pilcrow .default:n = true |
| 3546 |
, pilcrow .initial:n = false |
| 3547 |
, pilcrow / sep .tl_set:N = \l_@@_pilcrow_sep_tl |
| 3548 |
, pilcrow / sep .value_required:n = true |
| 3549 |
, pilcrow / sep .initial:n = 0.25em |
| 3550 |
, redletter .bool_set:N = \l_@@_red_letter_bool |
| 3551 |
, redletter .default:n = true |
| 3552 |
, redletter .initial:n = false |
| 3553 |
, redletter / colour .tl_set:N = \l_@@_red_letter_colour_tl |
| 3554 |
, redletter / colour .value_required:n = true |
| 3555 |
, redletter / colour .initial:n = red!80!black |
| 3556 |
, redletter / color .meta:n = { redletter / colour = { #1 } } |
| 3557 |
, reference / align .choices:nn = { left, right } |
| 3558 |
{ |
| 3559 |
\tl_if_exist:NF \l_@@_ref_align_tl |
| 3560 |
{ \tl_new:N \l_@@_ref_align_tl } |
| 3561 |
\tl_set_eq:NN \l_@@_ref_align_tl \l_keys_choice_tl |
| 3562 |
} |
| 3563 |
, reference / align .value_required:n = true |
| 3564 |
, reference / align .initial:n = right |
| 3565 |
, reference / colour .tl_set:N = \l_@@_ref_colour_tl |
| 3566 |
, reference / colour .value_required:n = true |
| 3567 |
, reference / colour .initial:n = . |
| 3568 |
, reference / color .meta:n = { reference / colour = { #1 } } |
| 3569 |
, reference / font .tl_set:N = \l_@@_ref_font_tl |
| 3570 |
, reference / font .value_required:n = true |
| 3571 |
, reference / font .initial:n = \bfseries |
| 3572 |
, reference / format .cs_set:Np = \@@_ref_format:n #1 |
| 3573 |
, reference / format .value_required:n = true |
| 3574 |
, reference / format .initial:n = #1 |
| 3575 |
, reference / newline .meta:n = { reference / sep = \linewidth } |
| 3576 |
, reference / newline .value_forbidden:n = true |
| 3577 |
, reference / position .choices:nn = { start, end } |
| 3578 |
{ |
| 3579 |
\tl_if_exist:NF \l_@@_ref_position_tl |
| 3580 |
{ \tl_new:N \l_@@_ref_position_tl } |
| 3581 |
\tl_set_eq:NN \l_@@_ref_position_tl \l_keys_choice_tl |
| 3582 |
} |
| 3583 |
, reference / position .value_required:n = true |
| 3584 |
, reference / position .initial:n = end |
| 3585 |
, reference / sep .tl_set:N = \l_@@_ref_sep_tl |
| 3586 |
, reference / sep .value_required:n = true |
| 3587 |
, reference / sep .initial:n = 2em |
| 3588 |
, reference / start / inline .bool_set_inverse:N = \l_@@_ref_start_newline_bool |
| 3589 |
, reference / start / inline .default:n = true |
| 3590 |
, reference / start / newline .bool_set:N = \l_@@_ref_start_newline_bool |
| 3591 |
, reference / start / newline .default:n = true |
| 3592 |
, reference / start / newline .initial:n = false |
| 3593 |
, reference / start / sep .tl_set:N = \l_@@_ref_start_sep_tl |
| 3594 |
, reference / start / sep .value_required:n = true |
| 3595 |
, reference / start / sep .initial:n = 1em |
| 3596 |
, reference / start / vsep .tl_set:N = \l_@@_ref_vertical_sep_tl |
| 3597 |
, reference / start / vsep .value_required:n = true |
| 3598 |
, reference / start / vsep .initial:n = 0pt |
| 3599 |
, rightmargin .tl_set:N = \l_@@_rightmargin_tl |
| 3600 |
, rightmargin .value_required:n = true |
| 3601 |
, rightmargin .initial:n = \c_zero_dim |
| 3602 |
, selah / text .tl_set:N = \l_@@_selah_text_tl |
| 3603 |
, selah / text .value_required:n = true |
| 3604 |
, selah / text .initial:n = Selah |
| 3605 |
, selah / font .tl_set:N = \l_@@_selah_font_tl |
| 3606 |
, selah / font .value_required:n = true |
| 3607 |
, selah / font .initial:n = \itshape |
| 3608 |
, selah / format .cs_set:Np = \@@_selah_format:n #1 |
| 3609 |
, selah / format .value_required:n = true |
| 3610 |
, selah / format .initial:n = #1 |
| 3611 |
, selah / sep .tl_set:N = \l_@@_selah_sep_tl |
| 3612 |
, selah / sep .value_required:n = true |
| 3613 |
, selah / sep .initial:n = 1em |
| 3614 |
, style .choice: |
| 3615 |
, style / unknown .code:n = \msg_error:nnx |
| 3616 |
{ scripture } |
| 3617 |
{ unknown-style } |
| 3618 |
{ \exp_not:n {#1} } |
| 3619 |
, textright / sep .tl_set:N = \l_@@_text_right_sep_tl |
| 3620 |
, textright / sep .value_required:n = true |
| 3621 |
, textright / sep .initial:n = 1em |
| 3622 |
, verse .int_gset:N = \g_@@_verse_int |
| 3623 |
, verse .value_required:n = true |
| 3624 |
, verse .initial:n = \c_one_int |
| 3625 |
, verse / colour .tl_set:N = \l_@@_verse_colour_tl |
| 3626 |
, verse / colour .value_required:n = true |
| 3627 |
, verse / colour .initial:n = . |
| 3628 |
, verse / color .meta:n = { verse / colour = { #1 } } |
| 3629 |
, verse / first .bool_set:N = \l_@@_verse_first_bool |
| 3630 |
, verse / first .default:n = true |
| 3631 |
, verse / first .initial:n = false |
| 3632 |
, verse / firstformat .cs_set:Np = \@@_verse_first_format:n #1 |
| 3633 |
, verse / firstformat .value_required:n = true |
| 3634 |
, verse / firstformat .initial:n = #1 |
| 3635 |
, verse / firstsep .tl_set:N = \l_@@_verse_first_sep_tl |
| 3636 |
, verse / firstsep .value_required:n = true |
| 3637 |
, verse / firstsep .initial:n = 0.5em |
| 3638 |
, verse / font .tl_set:N = \l_@@_verse_font_tl |
| 3639 |
, verse / font .value_required:n = true |
| 3640 |
, verse / font .initial:n = |
| 3641 |
, verse / format .cs_set:Np = \@@_verse_format:n #1 |
| 3642 |
, verse / format .value_required:n = true |
| 3643 |
, verse / format .initial:n = \textsuperscript{#1} |
| 3644 |
, verse / hide .bool_set_inverse:N = \l_@@_verse_show_bool |
| 3645 |
, verse / hide .default:n = true |
| 3646 |
, verse / para .bool_set:N = \l_@@_verse_para_bool |
| 3647 |
, verse / para .default:n = true |
| 3648 |
, verse / para .initial:n = false |
| 3649 |
, verse / para / indent .tl_set:N = \l_@@_para_indent_tl |
| 3650 |
, verse / para / indent .value_required:n = true |
| 3651 |
, verse / para / indent .initial:n = \l_@@_parindent_tl |
| 3652 |
, verse / sep .tl_set:N = \l_@@_verse_sep_tl |
| 3653 |
, verse / sep .value_required:n = true |
| 3654 |
, verse / sep .initial:n = 0.05em |
| 3655 |
, verse / show .bool_set:N = \l_@@_verse_show_bool |
| 3656 |
, verse / show .default:n = true |
| 3657 |
, verse / show .initial:n = true |
| 3658 |
, version .tl_set:N = \l_@@_version_tl |
| 3659 |
, version .value_required:n = true |
| 3660 |
, version .initial:n = |
| 3661 |
, version / delim .tl_set:N = \l_@@_version_delim_tl |
| 3662 |
, version / delim .value_required:n = true |
| 3663 |
, version / delim .initial:n = \c_space_tl |
| 3664 |
, version / format .cs_set:Np = \@@_version_format:n #1 |
| 3665 |
, version / format .value_required:n = true |
| 3666 |
, version / format .initial:n = (#1) |
| 3667 |
, version / position .choices:nn = { withref, end } |
| 3668 |
{ |
| 3669 |
\tl_if_exist:NF \l_@@_version_position_tl |
| 3670 |
{ \tl_new:N \l_@@_version_position_tl } |
| 3671 |
\tl_set_eq:NN \l_@@_version_position_tl \l_keys_choice_tl |
| 3672 |
} |
| 3673 |
, version / position .value_required:n = true |
| 3674 |
, version / position .initial:n = withref |
| 3675 |
% \end{macrocode} |
| 3676 |
% Options for the \env{center} environment. |
| 3677 |
% \begin{macrocode} |
| 3678 |
, center / aboveskip .tl_set:N = \l_@@_center_aboveskip_tl |
| 3679 |
, center / aboveskip .value_required:n = true |
| 3680 |
, center / aboveskip .initial:n = \medskipamount |
| 3681 |
, center / belowskip .tl_set:N = \l_@@_center_belowskip_tl |
| 3682 |
, center / belowskip .value_required:n = true |
| 3683 |
, center / belowskip .initial:n = \medskipamount |
| 3684 |
, center / leftmargin .tl_set:N = \l_@@_center_leftmargin_tl |
| 3685 |
, center / leftmargin .value_required:n = true |
| 3686 |
, center / leftmargin .initial:n = \c_zero_dim |
| 3687 |
, center / rightmargin .tl_set:N = \l_@@_center_rightmargin_tl |
| 3688 |
, center / rightmargin .value_required:n = true |
| 3689 |
, center / rightmargin .initial:n = \c_zero_dim |
| 3690 |
% \end{macrocode} |
| 3691 |
% Options for the \env{flushright} environment. |
| 3692 |
% \begin{macrocode} |
| 3693 |
, flushright / aboveskip .tl_set:N = \l_@@_flushright_aboveskip_tl |
| 3694 |
, flushright / aboveskip .value_required:n = true |
| 3695 |
, flushright / aboveskip .initial:n = \medskipamount |
| 3696 |
, flushright / belowskip .tl_set:N = \l_@@_flushright_belowskip_tl |
| 3697 |
, flushright / belowskip .value_required:n = true |
| 3698 |
, flushright / belowskip .initial:n = \medskipamount |
| 3699 |
, flushright / leftmargin .tl_set:N = \l_@@_flushright_leftmargin_tl |
| 3700 |
, flushright / leftmargin .value_required:n = true |
| 3701 |
, flushright / leftmargin .initial:n = \c_zero_dim |
| 3702 |
, flushright / rightmargin .tl_set:N = \l_@@_flushright_rightmargin_tl |
| 3703 |
, flushright / rightmargin .value_required:n = true |
| 3704 |
, flushright / rightmargin .initial:n = \c_zero_dim |
| 3705 |
% \end{macrocode} |
| 3706 |
% Options for the \env{hanging} environment. |
| 3707 |
% \begin{macrocode} |
| 3708 |
, hanging / aboveskip .tl_set:N = \l_@@_hanging_aboveskip_tl |
| 3709 |
, hanging / aboveskip .value_required:n = true |
| 3710 |
, hanging / aboveskip .initial:n = \medskipamount |
| 3711 |
, hanging / belowskip .tl_set:N = \l_@@_hanging_belowskip_tl |
| 3712 |
, hanging / belowskip .value_required:n = true |
| 3713 |
, hanging / belowskip .initial:n = \medskipamount |
| 3714 |
, hanging / chapter / indent .bool_set:N = \l_@@_hanging_chapter_indent_bool |
| 3715 |
, hanging / chapter / indent .default:n = true |
| 3716 |
, hanging / chapter / indent .initial:n = true |
| 3717 |
, hanging / hang .tl_set:N = \l_@@_hanging_hang_tl |
| 3718 |
, hanging / hang .value_required:n = true |
| 3719 |
, hanging / hang .initial:n = 2em |
| 3720 |
, hanging / leftmargin .tl_set:N = \l_@@_hanging_leftmargin_tl |
| 3721 |
, hanging / leftmargin .value_required:n = true |
| 3722 |
, hanging / leftmargin .initial:n = 1em |
| 3723 |
, hanging / rightmargin .tl_set:N = \l_@@_hanging_rightmargin_tl |
| 3724 |
, hanging / rightmargin .value_required:n = true |
| 3725 |
, hanging / rightmargin .initial:n = \c_zero_dim |
| 3726 |
, hanging / verse / left .bool_set_inverse:N = \l_@@_hanging_verse_right_bool |
| 3727 |
, hanging / verse / left .default:n = true |
| 3728 |
, hanging / verse / right .bool_set:N = \l_@@_hanging_verse_right_bool |
| 3729 |
, hanging / verse / right .default:n = true |
| 3730 |
, hanging / verse / right .initial:n = true |
| 3731 |
, hanging / verse / sep .tl_set:N = \l_@@_hanging_verse_sep_tl |
| 3732 |
, hanging / verse / sep .value_required:n = true |
| 3733 |
, hanging / verse / sep .initial:n = 0.05em |
| 3734 |
% \end{macrocode} |
| 3735 |
% Options for the mid-paragraph chapters (including the \env{midparachap} environment). |
| 3736 |
% \begin{macrocode} |
| 3737 |
, midparachap / hideverse .bool_set_inverse:N = \l_@@_midparachap_show_verse_bool |
| 3738 |
, midparachap / hideverse .default:n = true |
| 3739 |
, midparachap / showverse .bool_set:N = \l_@@_midparachap_show_verse_bool |
| 3740 |
, midparachap / showverse .default:n = true |
| 3741 |
, midparachap / showverse .initial:n = true |
| 3742 |
% \end{macrocode} |
| 3743 |
% Options for the \env{narrow} environment. |
| 3744 |
% \begin{macrocode} |
| 3745 |
, narrow / aboveskip .tl_set:N = \l_@@_narrow_aboveskip_tl |
| 3746 |
, narrow / aboveskip .value_required:n = true |
| 3747 |
, narrow / aboveskip .initial:n = \medskipamount |
| 3748 |
, narrow / belowskip .tl_set:N = \l_@@_narrow_belowskip_tl |
| 3749 |
, narrow / belowskip .value_required:n = true |
| 3750 |
, narrow / belowskip .initial:n = \medskipamount |
| 3751 |
, narrow / leftmargin .tl_set:N = \l_@@_narrow_leftmargin_tl |
| 3752 |
, narrow / leftmargin .value_required:n = true |
| 3753 |
, narrow / leftmargin .initial:n = 1em |
| 3754 |
, narrow / rightmargin .tl_set:N = \l_@@_narrow_rightmargin_tl |
| 3755 |
, narrow / rightmargin .value_required:n = true |
| 3756 |
, narrow / rightmargin .initial:n = 1em |
| 3757 |
% \end{macrocode} |
| 3758 |
% Options for the \env{poetry} environment. |
| 3759 |
% \begin{macrocode} |
| 3760 |
, poetry / aboveskip .tl_set:N = \l_@@_poetry_aboveskip_tl |
| 3761 |
, poetry / aboveskip .value_required:n = true |
| 3762 |
, poetry / aboveskip .initial:n = \medskipamount |
| 3763 |
, poetry / belowskip .tl_set:N = \l_@@_poetry_belowskip_tl |
| 3764 |
, poetry / belowskip .value_required:n = true |
| 3765 |
, poetry / belowskip .initial:n = \medskipamount |
| 3766 |
, poetry / bigindent .tl_set:N = \l_@@_poetry_big_indent_tl |
| 3767 |
, poetry / bigindent .value_required:n = true |
| 3768 |
, poetry / bigindent .initial:n = 4em |
| 3769 |
, poetry / indent .tl_set:N = \l_@@_poetry_indent_tl |
| 3770 |
, poetry / indent .value_required:n = true |
| 3771 |
, poetry / indent .initial:n = 1em |
| 3772 |
, poetry / leftmargin .tl_set:N = \l_@@_poetry_leftmargin_tl |
| 3773 |
, poetry / leftmargin .value_required:n = true |
| 3774 |
, poetry / leftmargin .initial:n = 1em |
| 3775 |
, poetry / rightmargin .tl_set:N = \l_@@_poetry_rightmargin_tl |
| 3776 |
, poetry / rightmargin .value_required:n = true |
| 3777 |
, poetry / rightmargin .initial:n = \c_zero_dim |
| 3778 |
, poetry / verse / left .bool_set_inverse:N = \l_@@_poetry_verse_right_bool |
| 3779 |
, poetry / verse / left .default:n = true |
| 3780 |
, poetry / verse / right .bool_set:N = \l_@@_poetry_verse_right_bool |
| 3781 |
, poetry / verse / right .default:n = true |
| 3782 |
, poetry / verse / right .initial:n = true |
| 3783 |
, poetry / verse / sep .tl_set:N = \l_@@_poetry_verse_sep_tl |
| 3784 |
, poetry / verse / sep .value_required:n = true |
| 3785 |
, poetry / verse / sep .initial:n = 0.05em |
| 3786 |
} |
| 3787 |
% \end{macrocode} |
| 3788 |
% Process package options. |
| 3789 |
% \begin{macrocode} |
| 3790 |
\ProcessKeyOptions |
| 3791 |
% \end{macrocode} |
| 3792 |
% |
| 3793 |
% Create interface to reset all keys to defaults. |
| 3794 |
% \begin{macrocode} |
| 3795 |
\tl_new:N \l_@@_default_options_tl |
| 3796 |
\keys_precompile:nnN { scripture } |
| 3797 |
{ |
| 3798 |
, aboveskip = \c_zero_skip |
| 3799 |
, added / font = |
| 3800 |
, added / format = \emph { #1 } |
| 3801 |
, after = |
| 3802 |
, before = |
| 3803 |
, belowskip = \c_zero_skip |
| 3804 |
, book = |
| 3805 |
, colour = . |
| 3806 |
, compact = false |
| 3807 |
, chapter = \c_one_int |
| 3808 |
, chapter / align = left |
| 3809 |
, chapter / font = \bfseries |
| 3810 |
, chapter / colour = . |
| 3811 |
, chapter / drop = true |
| 3812 |
, chapter / format = #1 |
| 3813 |
, chapter / para = false |
| 3814 |
, chapter / para / aboveskip = \bigskipamount |
| 3815 |
, chapter / para / belowskip = \medskipamount |
| 3816 |
, chapter / para / indent = true |
| 3817 |
, chapter / sep = 0.5em |
| 3818 |
, chapter / show = true |
| 3819 |
, chapter / showverse = false |
| 3820 |
, chapter / smash = false |
| 3821 |
, chapter / valign = bottom |
| 3822 |
, chapter / xchar = X |
| 3823 |
, extraskip = \medskipamount |
| 3824 |
, font = |
| 3825 |
, heading / aboveskip = \bigskipamount |
| 3826 |
, heading / afterindent = false |
| 3827 |
, heading / align = left |
| 3828 |
, heading / belowskip = \medskipamount |
| 3829 |
, heading / font = \small\itshape |
| 3830 |
, heading / format = #1 |
| 3831 |
, heading / show = true |
| 3832 |
, indent = true |
| 3833 |
, inline = false |
| 3834 |
, inline / begin = `` |
| 3835 |
, inline / end = '' |
| 3836 |
, inline / reference / format = (#1) |
| 3837 |
, inline / reference / sep = 0.5em |
| 3838 |
, inline / version / delim = \c_space_tl |
| 3839 |
, inline / version / format = #1 |
| 3840 |
, language = |
| 3841 |
, language / variant = |
| 3842 |
, leftmargin = \c_zero_dim |
| 3843 |
, name / font = \scshape |
| 3844 |
, name / format = #1 |
| 3845 |
, parindent = \parindent |
| 3846 |
, parskip = \parskip |
| 3847 |
, pilcrow = false |
| 3848 |
, pilcrow / sep = 0.25em |
| 3849 |
, redletter = false |
| 3850 |
, redletter / colour = red!80!black |
| 3851 |
, reference / align = right |
| 3852 |
, reference / colour = . |
| 3853 |
, reference / font = \bfseries |
| 3854 |
, reference / format = #1 |
| 3855 |
, reference / position = end |
| 3856 |
, reference / sep = 2em |
| 3857 |
, reference / start / newline = false |
| 3858 |
, reference / start / sep = 1em |
| 3859 |
, reference / start / vsep = 0pt |
| 3860 |
, rightmargin = \c_zero_dim |
| 3861 |
, selah / text = Selah |
| 3862 |
, selah / font = \itshape |
| 3863 |
, selah / format = #1 |
| 3864 |
, selah / sep = 1em |
| 3865 |
, textright / sep = 1em |
| 3866 |
, verse = \c_one_int |
| 3867 |
, verse / colour = . |
| 3868 |
, verse / first = false |
| 3869 |
, verse / firstformat = #1 |
| 3870 |
, verse / firstsep = 0.5em |
| 3871 |
, verse / font = |
| 3872 |
, verse / format = \textsuperscript{#1} |
| 3873 |
, verse / para = false |
| 3874 |
, verse / para / indent = \l_@@_parindent_tl |
| 3875 |
, verse / sep = 0.05em |
| 3876 |
, verse / show = true |
| 3877 |
, version = |
| 3878 |
, version / delim = \c_space_tl |
| 3879 |
, version / format = (#1) |
| 3880 |
, version / position = withref |
| 3881 |
, center / aboveskip = \medskipamount |
| 3882 |
, center / belowskip = \medskipamount |
| 3883 |
, center / leftmargin = \c_zero_dim |
| 3884 |
, center / rightmargin = \c_zero_dim |
| 3885 |
, flushright / aboveskip = \medskipamount |
| 3886 |
, flushright / belowskip = \medskipamount |
| 3887 |
, flushright / leftmargin = \c_zero_dim |
| 3888 |
, flushright / rightmargin = \c_zero_dim |
| 3889 |
, hanging / aboveskip = \medskipamount |
| 3890 |
, hanging / belowskip = \medskipamount |
| 3891 |
, hanging / chapter / indent = true |
| 3892 |
, hanging / hang = 2em |
| 3893 |
, hanging / leftmargin = 1em |
| 3894 |
, hanging / rightmargin = \c_zero_dim |
| 3895 |
, hanging / verse / right = true |
| 3896 |
, hanging / verse / sep = 0.05em |
| 3897 |
, midparachap / showverse = true |
| 3898 |
, narrow / aboveskip = \medskipamount |
| 3899 |
, narrow / belowskip = \medskipamount |
| 3900 |
, narrow / leftmargin = 1em |
| 3901 |
, narrow / rightmargin = 1em |
| 3902 |
, poetry / aboveskip = \medskipamount |
| 3903 |
, poetry / belowskip = \medskipamount |
| 3904 |
, poetry / bigindent = 4em |
| 3905 |
, poetry / indent = 1em |
| 3906 |
, poetry / leftmargin = 1em |
| 3907 |
, poetry / rightmargin = \c_zero_dim |
| 3908 |
, poetry / verse / right = true |
| 3909 |
, poetry / verse / sep = 0.05em |
| 3910 |
} |
| 3911 |
\l_@@_default_options_tl |
| 3912 |
\cs_new_protected:Nn \@@_setup_reset_defaults: |
| 3913 |
{ |
| 3914 |
\l_@@_default_options_tl |
| 3915 |
} |
| 3916 |
% \end{macrocode} |
| 3917 |
% |
| 3918 |
% \begin{macro}{\@@_setup_style:nnn} |
| 3919 |
% Specify options which can later be activated using the \opt{style} option. |
| 3920 |
% If the first argument is \val{true}, then the options are appended rather |
| 3921 |
% than replaced. |
| 3922 |
% \begin{macrocode} |
| 3923 |
\cs_new_protected:Nn \@@_setup_style:nnn |
| 3924 |
{ |
| 3925 |
\bool_if:NTF #1 |
| 3926 |
{ |
| 3927 |
\tl_if_exist:cF { g__@@_style_ #2 _tl } |
| 3928 |
{ \tl_new:c { g__@@_style_ #2 _tl } } |
| 3929 |
\@@_setup_style:nne \c_false_bool { #2 } |
| 3930 |
{ \tl_use:c { g__@@_style_ #2 _tl } , #3 } |
| 3931 |
} |
| 3932 |
{ |
| 3933 |
\tl_gset:cn { g__@@_style_ #2 _tl } { #3 } |
| 3934 |
\keys_define:nn { scripture } |
| 3935 |
{ style / #2 .meta:n = { #3 } } |
| 3936 |
} |
| 3937 |
} |
| 3938 |
\cs_generate_variant:Nn \@@_setup_style:nnn { nne } |
| 3939 |
% \end{macrocode} |
| 3940 |
% \end{macro} |
| 3941 |
% |
| 3942 |
% \subsection{Hooks} |
| 3943 |
% |
| 3944 |
% \begin{hooks}{scripture/chap/before, scripture/chap/after, |
| 3945 |
% scripture/verse/before, scripture/verse/after} |
| 3946 |
% Hooks for before and after chapters and verses. The current chapter and |
| 3947 |
% verse is available in the hooks as \fn{scripturecurrentchapter} and |
| 3948 |
% \fn{scripturecurrentverse} respectively. These are global. |
| 3949 |
% \begin{macrocode} |
| 3950 |
\hook_new_pair:nn { scripture / chap / before } { scripture / chap / after } |
| 3951 |
\hook_new_pair:nn { scripture / verse / before } { scripture / verse / after } |
| 3952 |
% \end{macrocode} |
| 3953 |
% \end{hooks} |
| 3954 |
% |
| 3955 |
% \begin{hooks}{scripture/pilcrow, scripture/poetry/pilcrow} |
| 3956 |
% These are internal hooks used to insert a pilcrow at the beginning of a |
| 3957 |
% paragraph. Pilcrows are activated using the \opt{pilcrow} option and are |
| 3958 |
% only in effect when the \opt{verse/para} and/or \opt{compact} options are in |
| 3959 |
% use. |
| 3960 |
% \begin{macrocode} |
| 3961 |
\hook_new:n { scripture / pilcrow } |
| 3962 |
\hook_new:n { scripture / poetry / pilcrow } |
| 3963 |
% \end{macrocode} |
| 3964 |
% \end{hooks} |
| 3965 |
% |
| 3966 |
% \subsection{The main \env{scripture} environment} |
| 3967 |
% |
| 3968 |
% \begin{macro}{\l_@@_active_bool, \l_@@_active_inner_bool} |
| 3969 |
% Flags to ensure that environments are not nested. |
| 3970 |
% \begin{macrocode} |
| 3971 |
\bool_new:N \l_@@_active_bool |
| 3972 |
\bool_new:N \l_@@_active_inner_bool |
| 3973 |
% \end{macrocode} |
| 3974 |
% \end{macro} |
| 3975 |
% |
| 3976 |
% \begin{macro}{\g_@@_first_verse_set_bool} |
| 3977 |
% Set to \val{true} when the first \cs{ch} or \cs{vs} has been set. This is |
| 3978 |
% used to ensure automatic chapter and verse numbering starts at the right |
| 3979 |
% place. |
| 3980 |
% \begin{macrocode} |
| 3981 |
\bool_new:N \g_@@_first_verse_set_bool |
| 3982 |
% \end{macrocode} |
| 3983 |
% \end{macro} |
| 3984 |
% |
| 3985 |
% \begin{macro}{\g_@@_mode_vertical_inner_bool} |
| 3986 |
% Whether an inner environment is starting in vertical mode. This flag is |
| 3987 |
% only used with the \opt{compact} and \opt{verse/para} options. |
| 3988 |
% \begin{macrocode} |
| 3989 |
\bool_new:N \g_@@_mode_vertical_inner_bool |
| 3990 |
% \end{macrocode} |
| 3991 |
% \end{macro} |
| 3992 |
% |
| 3993 |
% \begin{macro}{\l_@@_clubpenalty_saved_int} |
| 3994 |
% Holds saved club penalty so we can change and restore it around chapter |
| 3995 |
% breaks. |
| 3996 |
% \begin{macrocode} |
| 3997 |
\int_new:N \l_@@_clubpenalty_saved_int |
| 3998 |
% \end{macrocode} |
| 3999 |
% \end{macro} |
| 4000 |
% |
| 4001 |
% \begin{macro}{\g_@@_prev_inner_below_skip} |
| 4002 |
% Save the last below skip of an inner environment so it can be removed if |
| 4003 |
% the main scripture environment ends with and inner environment. |
| 4004 |
% \begin{macrocode} |
| 4005 |
\skip_new:N \g_@@_prev_inner_below_skip |
| 4006 |
% \end{macrocode} |
| 4007 |
% \end{macro} |
| 4008 |
% |
| 4009 |
% \begin{macro}{\l_@@_outer_itemindent_dim} |
| 4010 |
% Holds the \cs{itemindent} of the outer list. Used to calculate the |
| 4011 |
% \cs{itemindent} to retain correct indenting when a list environment is |
| 4012 |
% the first thing in an outer list. |
| 4013 |
% \begin{macrocode} |
| 4014 |
\dim_new:N \l_@@_outer_itemindent_dim |
| 4015 |
% \end{macrocode} |
| 4016 |
% \end{macro} |
| 4017 |
% |
| 4018 |
% \begin{macro}{\@@_setup_list_noindent:n} |
| 4019 |
% Set \cs{noindent} to do a negative horizontal skip a list is the first |
| 4020 |
% item in a list then restore it at the end of the paragraph. This allows |
| 4021 |
% \cs{itemindent} to be set to a negative value and still have \cs{noindent} |
| 4022 |
% behave as expected. |
| 4023 |
% \begin{macrocode} |
| 4024 |
\cs_new_protected_nopar:Nn \@@_setup_list_noindent:n |
| 4025 |
{ |
| 4026 |
\legacy_if:nT { @newlist } |
| 4027 |
{ |
| 4028 |
\cs_set_protected_nopar:Npn \noindent |
| 4029 |
{ |
| 4030 |
\skip_horizontal:n { -#1 } |
| 4031 |
\bool_if:NT \l_@@_verse_para_bool |
| 4032 |
{ |
| 4033 |
\peek_analysis_map_inline:n |
| 4034 |
{ |
| 4035 |
\bool_lazy_or:nnTF |
| 4036 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ####1 } \vs } |
| 4037 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ####1 } \newvs } |
| 4038 |
{ |
| 4039 |
\bool_gset_true:N \g_@@_suppress_next_verse_para_bool |
| 4040 |
\@@_set_pilcrow_hook: |
| 4041 |
} |
| 4042 |
{ |
| 4043 |
\str_if_eq:VnF \l_@@_currenvir_str { poetry } |
| 4044 |
{ \@@_pilcrow_output: } |
| 4045 |
} |
| 4046 |
\peek_analysis_map_break:n { ####1 } |
| 4047 |
} |
| 4048 |
} |
| 4049 |
} |
| 4050 |
\hook_gput_next_code:nn { para / end } |
| 4051 |
{ |
| 4052 |
\bool_if:NTF \l_@@_verse_para_bool |
| 4053 |
{ |
| 4054 |
\str_if_eq:VnTF \l_@@_currenvir_str { poetry } |
| 4055 |
{ \cs_set_eq:NN \noindent \tex_noindent:D } |
| 4056 |
{ \cs_set_eq:NN \noindent \@@_para_noindent: } |
| 4057 |
} |
| 4058 |
{ \cs_set_eq:NN \noindent \tex_noindent:D } |
| 4059 |
} |
| 4060 |
} |
| 4061 |
} |
| 4062 |
% \end{macrocode} |
| 4063 |
% \end{macro} |
| 4064 |
% |
| 4065 |
% \begin{macro}{\@@_skip_diff:NN} |
| 4066 |
% Find the difference between two skips while avoiding negative stretch and |
| 4067 |
% shrink components. |
| 4068 |
% \begin{macrocode} |
| 4069 |
\cs_new_protected:Nn \@@_skip_diff:NN |
| 4070 |
{ |
| 4071 |
\skip_eval:n |
| 4072 |
{ |
| 4073 |
\dim_eval:n { \dimexpr #1 - \dimexpr #2 } |
| 4074 |
~ plus ~ |
| 4075 |
\dim_max:nn { \gluestretch #1 - \gluestretch #2 } \c_zero_dim |
| 4076 |
~ minus ~ |
| 4077 |
\dim_max:nn { \glueshrink #1 - \glueshrink #2 } \c_zero_dim |
| 4078 |
} |
| 4079 |
} |
| 4080 |
% \end{macrocode} |
| 4081 |
% \end{macro} |
| 4082 |
% |
| 4083 |
% \begin{macro}{\@@_extra_skip:} |
| 4084 |
% Insert a little extra vertical space between two paragraphs. This function |
| 4085 |
% tests if the previous paragraph is only one line in length and began |
| 4086 |
% with a \fn{ch} function. If this condition is met, more space is added |
| 4087 |
% if necessary to avoid the following paragraph clashing with the drop |
| 4088 |
% chapter. |
| 4089 |
% \begin{macrocode} |
| 4090 |
\cs_new_protected:Nn \@@_extra_skip: |
| 4091 |
{ |
| 4092 |
\mode_if_vertical:F |
| 4093 |
{ |
| 4094 |
\bool_if:NTF \l_@@_verse_para_bool |
| 4095 |
{ \para_end: } |
| 4096 |
{ \par } |
| 4097 |
} |
| 4098 |
\int_compare:nNnT |
| 4099 |
\g_@@_chap_par_prevgraf_int = 1 |
| 4100 |
{ |
| 4101 |
\dim_compare:nNnT |
| 4102 |
{ \parskip + \glueexpr \l_@@_extraskip_tl } < \baselineskip |
| 4103 |
{ |
| 4104 |
\addvspace { \baselineskip } |
| 4105 |
} |
| 4106 |
\int_gzero:N \g_@@_chap_par_prevgraf_int |
| 4107 |
} |
| 4108 |
\addvspace { \l_@@_extraskip_tl } |
| 4109 |
} |
| 4110 |
% \end{macrocode} |
| 4111 |
% \end{macro} |
| 4112 |
% |
| 4113 |
% \begin{macro}{\@@_text_right:nn} |
| 4114 |
% Align a word to the right and finish a paragraph, pushing to the next line |
| 4115 |
% if there is not space for the word. |
| 4116 |
% \begin{macrocode} |
| 4117 |
\cs_new_protected:Nn \@@_text_right:nn |
| 4118 |
{ |
| 4119 |
\bool_lazy_or:nnTF |
| 4120 |
{ \str_if_eq_p:Vn \l_@@_currenvir_str { flushright } } |
| 4121 |
{ \str_if_eq_p:Vn \l_@@_currenvir_str { center } } |
| 4122 |
{ |
| 4123 |
\unskip |
| 4124 |
\break |
| 4125 |
\strut |
| 4126 |
\hfill |
| 4127 |
#2 |
| 4128 |
\para_end: |
| 4129 |
} |
| 4130 |
{ |
| 4131 |
{ |
| 4132 |
\unskip |
| 4133 |
\hfil |
| 4134 |
\penalty 50 |
| 4135 |
\skip_horizontal:n { #1 } |
| 4136 |
\hbox:n {} |
| 4137 |
\nobreak |
| 4138 |
\hfill |
| 4139 |
#2 |
| 4140 |
\skip_zero:N \parfillskip |
| 4141 |
\int_zero:N \finalhyphendemerits |
| 4142 |
\para_end: |
| 4143 |
} |
| 4144 |
} |
| 4145 |
} |
| 4146 |
% \end{macrocode} |
| 4147 |
% \end{macro} |
| 4148 |
% |
| 4149 |
% \subsubsection{Formatting and printing quotation references} |
| 4150 |
% |
| 4151 |
% \begin{macro}{\l_@@_ref_box} |
| 4152 |
% Box to hold the formatted reference. |
| 4153 |
% \begin{macrocode} |
| 4154 |
\box_new:N \l_@@_ref_box |
| 4155 |
% \end{macrocode} |
| 4156 |
% \end{macro} |
| 4157 |
% |
| 4158 |
% \begin{macro}{\@@_format_full_ref:nn} |
| 4159 |
% Format a scripture quotation with its reference. |
| 4160 |
% \begin{macrocode} |
| 4161 |
\cs_new_protected:Nn \@@_format_full_ref:nn |
| 4162 |
{ |
| 4163 |
\group_begin: |
| 4164 |
\l_@@_ref_font_tl |
| 4165 |
\str_if_eq:VnF \l_@@_ref_colour_tl { . } |
| 4166 |
{ \exp_args:NV \color_select:n \l_@@_ref_colour_tl } |
| 4167 |
\@@_ref_format:n |
| 4168 |
{ |
| 4169 |
#1 |
| 4170 |
% \end{macrocode} |
| 4171 |
% Append a Bible version if it has been specified. |
| 4172 |
% \begin{macrocode} |
| 4173 |
\tl_if_empty:oF { #2 } |
| 4174 |
{ |
| 4175 |
\tl_if_empty:oF { #1 } |
| 4176 |
{ \l_@@_version_delim_tl } |
| 4177 |
\@@_version_format:n { #2 } |
| 4178 |
} |
| 4179 |
} |
| 4180 |
\group_end: |
| 4181 |
} |
| 4182 |
% \end{macrocode} |
| 4183 |
% \end{macro} |
| 4184 |
% |
| 4185 |
% \begin{macro}{\@@_reference:n} |
| 4186 |
% Output the reference for the Scripture quotation. |
| 4187 |
% \begin{macrocode} |
| 4188 |
\cs_new_protected:Nn \@@_reference:n |
| 4189 |
{ |
| 4190 |
\hbox_set:Nn \l_@@_ref_box |
| 4191 |
{ |
| 4192 |
\@@_format_full_ref:nn { #1 } \l_@@_version_tl |
| 4193 |
} |
| 4194 |
\dim_compare:nNnT |
| 4195 |
{ \box_wd:N \l_@@_ref_box + \g_@@_final_line_dim + \l_@@_ref_sep_tl } |
| 4196 |
> |
| 4197 |
\linewidth |
| 4198 |
{ |
| 4199 |
\skip_vertical:N \baselineskip |
| 4200 |
\tl_if_eq:NnT \l_@@_ref_align_tl { left } |
| 4201 |
{ |
| 4202 |
\int_compare:nNnT \g_@@_chap_par_prevgraf_int = 1 |
| 4203 |
{ \skip_vertical:N \baselineskip } |
| 4204 |
} |
| 4205 |
} |
| 4206 |
\tl_if_eq:NnTF \l_@@_ref_align_tl { right } |
| 4207 |
{ \hfill } |
| 4208 |
{ |
| 4209 |
\dim_compare:nNnT |
| 4210 |
{ \box_wd:N \l_@@_ref_box + \g_@@_final_line_dim + \l_@@_ref_sep_tl } |
| 4211 |
< |
| 4212 |
\linewidth |
| 4213 |
{ \skip_horizontal:n { \g_@@_final_line_dim + \l_@@_ref_sep_tl } } |
| 4214 |
} |
| 4215 |
\box_use:N \l_@@_ref_box |
| 4216 |
} |
| 4217 |
% \end{macrocode} |
| 4218 |
% \end{macro} |
| 4219 |
% |
| 4220 |
% \begin{macro}{\@@_reference_start_inline:} |
| 4221 |
% Output the reference for the Scripture quotation when inline at the start. |
| 4222 |
% \begin{macrocode} |
| 4223 |
\cs_new_protected:Nn \@@_reference_start_inline: |
| 4224 |
{ |
| 4225 |
\tl_if_empty:NF \l_@@_ref_tl |
| 4226 |
{ |
| 4227 |
\tl_if_eq:NnTF \l_@@_version_position_tl { withref } |
| 4228 |
{ \@@_format_full_ref:nn { \l_@@_ref_tl } { \l_@@_version_tl } } |
| 4229 |
{ \@@_format_full_ref:nn { \l_@@_ref_tl } { } } |
| 4230 |
\skip_horizontal:N \l_@@_ref_start_sep_tl |
| 4231 |
} |
| 4232 |
} |
| 4233 |
% \end{macrocode} |
| 4234 |
% \end{macro} |
| 4235 |
% |
| 4236 |
% \begin{macro}{\@@_reference_start_newline:} |
| 4237 |
% Output the reference for the Scripture quotation when on a new line at the |
| 4238 |
% start. |
| 4239 |
% \begin{macrocode} |
| 4240 |
\cs_new_protected:Nn \@@_reference_start_newline: |
| 4241 |
{ |
| 4242 |
\tl_if_empty:NF \l_@@_ref_tl |
| 4243 |
{ |
| 4244 |
\bool_gset_eq:NN \g_tmpa_bool \g_@@_suppress_next_pilcrow_bool |
| 4245 |
\bool_gset_true:N \g_@@_suppress_next_pilcrow_bool |
| 4246 |
\noindent |
| 4247 |
\bool_gset_eq:NN \g_@@_suppress_next_pilcrow_bool \g_tmpa_bool |
| 4248 |
\str_if_eq:VnF \l_@@_currenvir_str { scripture } |
| 4249 |
{ \skip_horizontal:n { -\leftmargin } } |
| 4250 |
\tl_if_eq:NnTF \l_@@_version_position_tl { withref } |
| 4251 |
{ \@@_format_full_ref:nn { \l_@@_ref_tl } { \l_@@_version_tl } } |
| 4252 |
{ \@@_format_full_ref:nn { \l_@@_ref_tl } { } } |
| 4253 |
\bool_lazy_or:nnT |
| 4254 |
{ \str_if_eq_p:Vn \l_@@_currenvir_str { flushright } } |
| 4255 |
{ \str_if_eq_p:Vn \l_@@_currenvir_str { center } } |
| 4256 |
{ |
| 4257 |
\hfill |
| 4258 |
\strut |
| 4259 |
} |
| 4260 |
\bool_if:NTF \l_@@_compact_bool |
| 4261 |
{ \para_end: } |
| 4262 |
{ |
| 4263 |
\bool_lazy_all:nTF |
| 4264 |
{ |
| 4265 |
{ \l_@@_verse_para_bool } |
| 4266 |
{ \bool_not_p:n { \str_if_eq_p:Vn \l_@@_currenvir_str { hanging } } } |
| 4267 |
{ \bool_not_p:n { \str_if_eq_p:Vn \l_@@_currenvir_str { poetry } } } |
| 4268 |
} |
| 4269 |
{ \para_end: } |
| 4270 |
{ \par } |
| 4271 |
} |
| 4272 |
\nobreak |
| 4273 |
\@afterheading |
| 4274 |
\addvspace { \l_@@_ref_vertical_sep_tl } |
| 4275 |
} |
| 4276 |
} |
| 4277 |
% \end{macrocode} |
| 4278 |
% \end{macro} |
| 4279 |
% |
| 4280 |
% \begin{macro}{\@@_reference_start_peek:} |
| 4281 |
% Peek ahead at the beginning of the \env{scripture} environment to control |
| 4282 |
% how references are inserted at the start of a quotation. |
| 4283 |
% \begin{macrocode} |
| 4284 |
\cs_new_protected:Nn \@@_reference_start_peek: |
| 4285 |
{ |
| 4286 |
\peek_remove_spaces:n |
| 4287 |
{ |
| 4288 |
\bool_lazy_and:nnTF |
| 4289 |
{ \str_if_eq_p:Vn \l_@@_ref_position_tl { start } } |
| 4290 |
{ \bool_not_p:n { \tl_if_empty_p:N \l_@@_ref_tl } } |
| 4291 |
{ |
| 4292 |
\bool_lazy_or:nnF |
| 4293 |
{ \str_if_eq_p:Vn \l_@@_currenvir_str { scripture } } |
| 4294 |
{ \str_if_eq_p:Vn \l_@@_currenvir_str { midparachap } } |
| 4295 |
{ |
| 4296 |
\bool_if:NF \l_@@_compact_bool |
| 4297 |
{ \bool_set_true:N \l_@@_ref_start_newline_bool } |
| 4298 |
} |
| 4299 |
\peek_analysis_map_inline:n |
| 4300 |
{ |
| 4301 |
\bool_case:nF |
| 4302 |
{ |
| 4303 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \heading } |
| 4304 |
{ \@@_reference_start_newline: } |
| 4305 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \noindent } |
| 4306 |
{ |
| 4307 |
\bool_if:NTF \l_@@_ref_start_newline_bool |
| 4308 |
{ \@@_reference_start_newline: } |
| 4309 |
{ \@@_reference_start_inline: } |
| 4310 |
} |
| 4311 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \nohang } |
| 4312 |
{ |
| 4313 |
\bool_if:NTF \l_@@_ref_start_newline_bool |
| 4314 |
{ \@@_reference_start_newline: } |
| 4315 |
{ \@@_reference_start_inline: } |
| 4316 |
} |
| 4317 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \nopilcrow } |
| 4318 |
{ |
| 4319 |
\bool_if:NTF \l_@@_ref_start_newline_bool |
| 4320 |
{ \@@_reference_start_newline: } |
| 4321 |
{ \@@_reference_start_inline: } |
| 4322 |
\peek_analysis_map_break:n |
| 4323 |
{ |
| 4324 |
##1 |
| 4325 |
\@@_fix_protrusion:n { } |
| 4326 |
} |
| 4327 |
} |
| 4328 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \begin } |
| 4329 |
{ |
| 4330 |
\bool_if:NF \l_@@_indent_bool |
| 4331 |
{ |
| 4332 |
\hook_gput_next_code:nn { para / begin } |
| 4333 |
{ |
| 4334 |
\bool_lazy_or:nnT |
| 4335 |
{ \str_if_eq_p:Vn \l_@@_currenvir_str { midparachap } } |
| 4336 |
{ \str_if_eq_p:Vn \l_@@_currenvir_str { scripture } } |
| 4337 |
{ \para_omit_indent: } |
| 4338 |
} |
| 4339 |
} |
| 4340 |
} |
| 4341 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \ch } |
| 4342 |
{ |
| 4343 |
\bool_if:NTF \l_@@_ref_start_newline_bool |
| 4344 |
{ \@@_reference_start_newline: } |
| 4345 |
{ |
| 4346 |
\cs_set_eq:NN \@@_temp_ch \ch |
| 4347 |
\RenewDocumentCommand \ch { s o m } |
| 4348 |
{ |
| 4349 |
\tl_if_novalue:nF { ##2 } |
| 4350 |
{ |
| 4351 |
\tl_set:Nn \l_@@_X_char_tl { ##2 } |
| 4352 |
} |
| 4353 |
\cs_set_eq:NN \ch \@@_temp_ch |
| 4354 |
} |
| 4355 |
\@@_reference_start_inline: |
| 4356 |
} |
| 4357 |
} |
| 4358 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \newch } |
| 4359 |
{ |
| 4360 |
\bool_if:NTF \l_@@_ref_start_newline_bool |
| 4361 |
{ \@@_reference_start_newline: } |
| 4362 |
{ |
| 4363 |
\cs_set_eq:NN \@@_temp_newch \newch |
| 4364 |
\RenewDocumentCommand \newch { s o } |
| 4365 |
{ |
| 4366 |
\tl_if_novalue:nF { ##2 } |
| 4367 |
{ |
| 4368 |
\tl_set:Nn \l_@@_X_char_tl { ##2 } |
| 4369 |
} |
| 4370 |
\cs_set_eq:NN \newch \@@_temp_newch |
| 4371 |
} |
| 4372 |
\@@_reference_start_inline: |
| 4373 |
} |
| 4374 |
} |
| 4375 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \vs } |
| 4376 |
{ |
| 4377 |
\bool_if:NTF \l_@@_ref_start_newline_bool |
| 4378 |
{ \@@_reference_start_newline: } |
| 4379 |
{ |
| 4380 |
\cs_set_eq:NN \@@_temp_vs \vs |
| 4381 |
\RenewDocumentCommand \vs { m } |
| 4382 |
{ \cs_set_eq:NN \vs \@@_temp_vs } |
| 4383 |
\@@_reference_start_inline: |
| 4384 |
} |
| 4385 |
} |
| 4386 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \newvs } |
| 4387 |
{ |
| 4388 |
\bool_if:NTF \l_@@_ref_start_newline_bool |
| 4389 |
{ \@@_reference_start_newline: } |
| 4390 |
{ |
| 4391 |
\cs_set_eq:NN \@@_temp_newvs \newvs |
| 4392 |
\RenewDocumentCommand \newvs { } |
| 4393 |
{ \cs_set_eq:NN \newvs \@@_temp_newvs } |
| 4394 |
\@@_reference_start_inline: |
| 4395 |
} |
| 4396 |
} |
| 4397 |
} |
| 4398 |
{ |
| 4399 |
\bool_if:NTF \l_@@_ref_start_newline_bool |
| 4400 |
{ |
| 4401 |
\@@_reference_start_newline: |
| 4402 |
\bool_if:NTF \l_@@_compact_bool |
| 4403 |
{ |
| 4404 |
\bool_if:NT \g_@@_mode_vertical_inner_bool |
| 4405 |
{ \@@_pilcrow_output: } |
| 4406 |
} |
| 4407 |
{ |
| 4408 |
\str_if_eq:VnF \l_@@_currenvir_str { poetry } |
| 4409 |
{ \@@_pilcrow_output: } |
| 4410 |
} |
| 4411 |
} |
| 4412 |
{ \@@_reference_start_inline: } |
| 4413 |
} |
| 4414 |
\exp_args:No \token_if_eq_meaning:NNF { ##1 } \begin |
| 4415 |
{ |
| 4416 |
\tl_clear:N \l_@@_ref_tl |
| 4417 |
\tl_if_eq:NnF \l_@@_version_position_tl { end } |
| 4418 |
{ \tl_clear:N \l_@@_version_tl } |
| 4419 |
} |
| 4420 |
\peek_analysis_map_break:n |
| 4421 |
{ \@@_fix_protrusion:o { ##1 } } |
| 4422 |
} |
| 4423 |
} |
| 4424 |
{ |
| 4425 |
\peek_analysis_map_inline:n |
| 4426 |
{ |
| 4427 |
\bool_case:nF |
| 4428 |
{ |
| 4429 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \heading } |
| 4430 |
{ } |
| 4431 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \noindent } |
| 4432 |
{ } |
| 4433 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \nohang } |
| 4434 |
{ } |
| 4435 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \nopilcrow } |
| 4436 |
{ |
| 4437 |
\peek_analysis_map_break:n |
| 4438 |
{ |
| 4439 |
##1 |
| 4440 |
\@@_fix_protrusion:n { } |
| 4441 |
} |
| 4442 |
} |
| 4443 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \begin } |
| 4444 |
{ |
| 4445 |
\bool_if:NF \l_@@_indent_bool |
| 4446 |
{ |
| 4447 |
\hook_gput_next_code:nn { para / begin } |
| 4448 |
{ |
| 4449 |
\bool_lazy_or:nnT |
| 4450 |
{ \str_if_eq_p:Vn \l_@@_currenvir_str { midparachap } } |
| 4451 |
{ \str_if_eq_p:Vn \l_@@_currenvir_str { scripture } } |
| 4452 |
{ \para_omit_indent: } |
| 4453 |
} |
| 4454 |
} |
| 4455 |
} |
| 4456 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \ch } |
| 4457 |
{ } |
| 4458 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \newch } |
| 4459 |
{ } |
| 4460 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \vs } |
| 4461 |
{ |
| 4462 |
\mode_if_vertical:F |
| 4463 |
{ \@@_set_pilcrow_hook: } |
| 4464 |
} |
| 4465 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \newvs } |
| 4466 |
{ |
| 4467 |
\mode_if_vertical:F |
| 4468 |
{ \@@_set_pilcrow_hook: } |
| 4469 |
} |
| 4470 |
} |
| 4471 |
{ |
| 4472 |
\bool_if:NTF \l_@@_compact_bool |
| 4473 |
{ |
| 4474 |
\bool_if:NT \g_@@_mode_vertical_inner_bool |
| 4475 |
{ \@@_pilcrow_output: } |
| 4476 |
} |
| 4477 |
{ |
| 4478 |
\str_if_eq:VnF \l_@@_currenvir_str { poetry } |
| 4479 |
{ \@@_pilcrow_output: } |
| 4480 |
} |
| 4481 |
} |
| 4482 |
\peek_analysis_map_break:n |
| 4483 |
{ |
| 4484 |
\@@_fix_protrusion:o { ##1 } |
| 4485 |
} |
| 4486 |
} |
| 4487 |
} |
| 4488 |
} |
| 4489 |
} |
| 4490 |
% \end{macrocode} |
| 4491 |
% \end{macro} |
| 4492 |
% |
| 4493 |
% \begin{macro}{\@@_compact_par:} |
| 4494 |
% \cs{par} macro used when the \opt{compact} option is in use. |
| 4495 |
% \begin{macrocode} |
| 4496 |
\cs_new_protected:Nn \@@_compact_par: |
| 4497 |
{ |
| 4498 |
\bool_gset_false:N \g_@@_mode_vertical_inner_bool |
| 4499 |
\dim_set:Nn \parindent { \l_@@_parindent_tl } |
| 4500 |
\peek_remove_spaces:n |
| 4501 |
{ |
| 4502 |
\peek_analysis_map_inline:n |
| 4503 |
{ |
| 4504 |
\bool_case:n |
| 4505 |
{ |
| 4506 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \begin } |
| 4507 |
{ \bool_gset_true:N \g_@@_mode_vertical_inner_bool } |
| 4508 |
{ \str_if_eq_p:Vn \l_@@_currenvir_str { poetry } } |
| 4509 |
{ } |
| 4510 |
{ \exp_args:No \token_if_letter_p:N { ##1 } } |
| 4511 |
{ \@@_pilcrow_output: } |
| 4512 |
{ \exp_args:No \token_if_active_p:N { ##1 } } |
| 4513 |
{ \@@_pilcrow_output: } |
| 4514 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \vs } |
| 4515 |
{ \@@_set_pilcrow_hook: } |
| 4516 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \newvs } |
| 4517 |
{ \@@_set_pilcrow_hook: } |
| 4518 |
} |
| 4519 |
\peek_analysis_map_break:n { ##1 } |
| 4520 |
} |
| 4521 |
} |
| 4522 |
} |
| 4523 |
% \end{macrocode} |
| 4524 |
% \end{macro} |
| 4525 |
% |
| 4526 |
% \begin{macro}{\@@_para_noindent:} |
| 4527 |
% \cs{noindent} macro used when the \opt{verse/para} option is in use. |
| 4528 |
% \begin{macrocode} |
| 4529 |
\cs_new_protected:Nn \@@_para_noindent: |
| 4530 |
{ |
| 4531 |
\legacy_if:nTF { @newlist } |
| 4532 |
{ |
| 4533 |
\tex_noindent:D |
| 4534 |
\peek_analysis_map_inline:n |
| 4535 |
{ |
| 4536 |
\bool_lazy_or:nnTF |
| 4537 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \vs } |
| 4538 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \newvs } |
| 4539 |
{ \bool_gset_true:N \g_@@_suppress_next_verse_para_bool } |
| 4540 |
{ \@@_pilcrow_output: } |
| 4541 |
\peek_analysis_map_break:n { ##1 } |
| 4542 |
} |
| 4543 |
} |
| 4544 |
{ |
| 4545 |
\peek_analysis_map_inline:n |
| 4546 |
{ |
| 4547 |
\bool_lazy_or:nnTF |
| 4548 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \vs } |
| 4549 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \newvs } |
| 4550 |
{ |
| 4551 |
\bool_if:NT \l_@@_verse_para_bool |
| 4552 |
{ \para_end: } |
| 4553 |
\tex_noindent:D |
| 4554 |
\bool_gset_true:N \g_@@_suppress_next_verse_para_bool |
| 4555 |
\@@_set_pilcrow_hook: |
| 4556 |
} |
| 4557 |
{ \@@_pilcrow_output: } |
| 4558 |
\peek_analysis_map_break:n { ##1 } |
| 4559 |
} |
| 4560 |
} |
| 4561 |
} |
| 4562 |
% \end{macrocode} |
| 4563 |
% \end{macro} |
| 4564 |
% |
| 4565 |
% \begin{macro}{\g_@@_para_mode_vertical_bool} |
| 4566 |
% Flag that \cs{@@_para_par:} has been encountered and pilcrow not yet |
| 4567 |
% printed. |
| 4568 |
% \begin{macrocode} |
| 4569 |
\bool_new:N \g_@@_para_mode_vertical_bool |
| 4570 |
% \end{macrocode} |
| 4571 |
% \end{macro} |
| 4572 |
% |
| 4573 |
% \begin{macro}{\g_@@_post_env_indent_box} |
| 4574 |
% Box to store the indent after an inner environment in the case where it is |
| 4575 |
% dropped by \cs{@@_dopeend:}. This box is then inserted if the next thing |
| 4576 |
% is a \fn{vs}. Only used when the \opt{verse/para} option is active. |
| 4577 |
% \begin{macrocode} |
| 4578 |
\box_new:N \g_@@_post_env_indent_box |
| 4579 |
% \end{macrocode} |
| 4580 |
% \end{macro} |
| 4581 |
% |
| 4582 |
% \begin{macro}{\@@_para_par:} |
| 4583 |
% \cs{par} macro used when the \opt{verse/para} option is in use. |
| 4584 |
% \begin{macrocode} |
| 4585 |
\cs_new_protected:Nn \@@_para_par: |
| 4586 |
{ |
| 4587 |
\bool_gset_true:N \g_@@_para_mode_vertical_bool |
| 4588 |
\dim_set:Nn \parindent { \l_@@_parindent_tl } |
| 4589 |
\peek_remove_spaces:n |
| 4590 |
{ |
| 4591 |
\peek_analysis_map_inline:n |
| 4592 |
{ |
| 4593 |
\bool_case:n |
| 4594 |
{ |
| 4595 |
{ \exp_args:No \token_if_letter_p:N { ##1 } } |
| 4596 |
{ \@@_pilcrow_output: } |
| 4597 |
{ \exp_args:No \token_if_active_p:N { ##1 } } |
| 4598 |
{ \@@_pilcrow_output: } |
| 4599 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \vs } |
| 4600 |
{ \@@_set_pilcrow_hook: } |
| 4601 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \newvs } |
| 4602 |
{ \@@_set_pilcrow_hook: } |
| 4603 |
} |
| 4604 |
\peek_analysis_map_break:n { ##1 } |
| 4605 |
} |
| 4606 |
} |
| 4607 |
} |
| 4608 |
% \end{macrocode} |
| 4609 |
% \end{macro} |
| 4610 |
% |
| 4611 |
% \begin{macro}{\@@_doendpe:} |
| 4612 |
% Custom version of \cs{@doendpe} macro used when the \opt{verse/para} |
| 4613 |
% option is in use. This handles pilcrows after inner environments. |
| 4614 |
% \begin{macrocode} |
| 4615 |
\cs_new_protected:Nn \@@_doendpe: |
| 4616 |
{ |
| 4617 |
\box_gclear:N \g_@@_post_env_indent_box |
| 4618 |
\legacy_if_set_true:n { @endpe } |
| 4619 |
\cs_set_nopar:Npn \par |
| 4620 |
{ |
| 4621 |
\@restorepar |
| 4622 |
\clubpenalty \@clubpenalty |
| 4623 |
\everypar { } |
| 4624 |
\par |
| 4625 |
\legacy_if_set_false:n { @endpe } |
| 4626 |
\bool_gset_false:N \g_@@_suppress_next_pilcrow_bool |
| 4627 |
\@@_para_par: |
| 4628 |
} |
| 4629 |
\everypar |
| 4630 |
{ |
| 4631 |
\box_gset_to_last:N \g_@@_post_env_indent_box |
| 4632 |
\hook_gput_next_code:nn { para / after } |
| 4633 |
{ \box_gclear:N \g_@@_post_env_indent_box } |
| 4634 |
\everypar { } |
| 4635 |
\legacy_if_set_false:n { @endpe } |
| 4636 |
\bool_gset_true:N \g_@@_suppress_next_pilcrow_bool |
| 4637 |
\bool_if:NT \l_@@_verse_para_bool |
| 4638 |
{ |
| 4639 |
\box_set_wd:Nn |
| 4640 |
\g_@@_post_env_indent_box |
| 4641 |
{ \l_@@_para_indent_tl } |
| 4642 |
} |
| 4643 |
} |
| 4644 |
} |
| 4645 |
% \end{macrocode} |
| 4646 |
% \end{macro} |
| 4647 |
% |
| 4648 |
% \begin{macro}{\@@_fix_protrusion:n, \@@_fix_protrusion:o} |
| 4649 |
% The use of \cs{peek} macros breaks protrusion at the beginning of list |
| 4650 |
% environments. This function checks conditions and add \cs{leftprotrusion}. |
| 4651 |
% \begin{macrocode} |
| 4652 |
\cs_new_protected:Nn \@@_fix_protrusion:n |
| 4653 |
{ |
| 4654 |
\bool_if:NTF \l_@@_compact_bool |
| 4655 |
{ |
| 4656 |
\str_if_eq:VnT \l_@@_currenvir_str { scripture } |
| 4657 |
{ \cs_if_exist_use:N \leftprotrusion } |
| 4658 |
} |
| 4659 |
{ \cs_if_exist_use:N \leftprotrusion } |
| 4660 |
#1 |
| 4661 |
} |
| 4662 |
\cs_generate_variant:Nn \@@_fix_protrusion:n { o } |
| 4663 |
% \end{macrocode} |
| 4664 |
% \end{macro} |
| 4665 |
% |
| 4666 |
% \subsubsection{Red lettering} |
| 4667 |
% |
| 4668 |
% \begin{macro}{\g_@@_red_letter_active_bool} |
| 4669 |
% Flag indicating if currently in a red letter block of text. |
| 4670 |
% \begin{macrocode} |
| 4671 |
\bool_new:N \g_@@_red_letter_active_bool |
| 4672 |
% \end{macrocode} |
| 4673 |
% \end{macro} |
| 4674 |
% |
| 4675 |
% \begin{macro}{\@@_red_letter_on:} |
| 4676 |
% Mark the beginning of a section of text attributed to Jesus Christ. |
| 4677 |
% \begin{macrocode} |
| 4678 |
\cs_new_protected:Nn \@@_red_letter_on: |
| 4679 |
{ |
| 4680 |
\bool_if:NT \l_@@_red_letter_bool |
| 4681 |
{ |
| 4682 |
\bool_gset_true:N \g_@@_red_letter_active_bool |
| 4683 |
\exp_args:NV \color_select:n \l_@@_red_letter_colour_tl |
| 4684 |
\str_if_eq:VnF \l_@@_currenvir_str { scripture } |
| 4685 |
{ |
| 4686 |
\hook_gput_next_code:nn { env / \l_@@_currenvir_str / after } |
| 4687 |
{ |
| 4688 |
\exp_args:NV \color_select:n \l_@@_red_letter_colour_tl |
| 4689 |
} |
| 4690 |
} |
| 4691 |
} |
| 4692 |
} |
| 4693 |
% \end{macrocode} |
| 4694 |
% \end{macro} |
| 4695 |
% |
| 4696 |
% \begin{macro}{\@@_red_letter_off:} |
| 4697 |
% Mark the beginning of a section of text attributed to Jesus Christ. |
| 4698 |
% \begin{macrocode} |
| 4699 |
\cs_new_protected:Nn \@@_red_letter_off: |
| 4700 |
{ |
| 4701 |
\bool_if:NT \l_@@_red_letter_bool |
| 4702 |
{ |
| 4703 |
\color_select:n { scripture default colour } |
| 4704 |
\bool_gset_false:N \g_@@_red_letter_active_bool |
| 4705 |
\str_if_eq:VnF \l_@@_currenvir_str { scripture } |
| 4706 |
{ |
| 4707 |
\hook_gput_next_code:nn { env / \l_@@_currenvir_str / after } |
| 4708 |
{ |
| 4709 |
\color_select:n { scripture default colour } |
| 4710 |
} |
| 4711 |
} |
| 4712 |
} |
| 4713 |
} |
| 4714 |
% \end{macrocode} |
| 4715 |
% \end{macro} |
| 4716 |
% |
| 4717 |
% \subsubsection{Selecting language} |
| 4718 |
% |
| 4719 |
% \begin{macro}{\@@_select_language:} |
| 4720 |
% Select specified language if required. |
| 4721 |
% \begin{macrocode} |
| 4722 |
\cs_new_protected:Nn \@@_select_language: |
| 4723 |
{ |
| 4724 |
\tl_if_empty:NF \l_@@_language_tl |
| 4725 |
{ |
| 4726 |
\@ifpackageloaded { babel } |
| 4727 |
{ |
| 4728 |
\@@_set_textdirection: |
| 4729 |
\selectlanguage { \l_@@_language_tl } |
| 4730 |
} |
| 4731 |
{ |
| 4732 |
\@ifpackageloaded { polyglossia } |
| 4733 |
{ |
| 4734 |
\iflanguageloaded { \l_@@_language_tl } |
| 4735 |
{ |
| 4736 |
\tl_if_empty:NTF \l_@@_language_variant_tl |
| 4737 |
{ |
| 4738 |
\selectlanguage { \l_@@_language_tl } |
| 4739 |
} |
| 4740 |
{ |
| 4741 |
\selectlanguage |
| 4742 |
[ variant = \l_@@_language_variant_tl ] |
| 4743 |
{ \l_@@_language_tl } |
| 4744 |
} |
| 4745 |
} |
| 4746 |
{ |
| 4747 |
\msg_error:nnx |
| 4748 |
{ scripture } |
| 4749 |
{ language-error } |
| 4750 |
{ \l_@@_language_tl } |
| 4751 |
} |
| 4752 |
} |
| 4753 |
{ |
| 4754 |
\msg_warning:nnx |
| 4755 |
{ scripture } |
| 4756 |
{ language-warning } |
| 4757 |
{ \l_@@_language_tl } |
| 4758 |
} |
| 4759 |
} |
| 4760 |
} |
| 4761 |
} |
| 4762 |
% \end{macrocode} |
| 4763 |
% \end{macro} |
| 4764 |
% |
| 4765 |
% \subsubsection{Formatting and printing chapter numbers} |
| 4766 |
% |
| 4767 |
% \begin{macro}{\l_@@_chap_box, l_@@_chap_tmp_box} |
| 4768 |
% Boxes use to store and calculate drop chapter. |
| 4769 |
% \begin{macrocode} |
| 4770 |
\box_new:N \l_@@_chap_box |
| 4771 |
\box_new:N \l_@@_chap_tmp_box |
| 4772 |
% \end{macrocode} |
| 4773 |
% \end{macro} |
| 4774 |
% |
| 4775 |
% \begin{macro}{\l_@@_chap_fontsize_dim} |
| 4776 |
% Calculated font size of a drop chapter number. |
| 4777 |
% \begin{macrocode} |
| 4778 |
\dim_new:N \l_@@_chap_fontsize_dim |
| 4779 |
% \end{macrocode} |
| 4780 |
% \end{macro} |
| 4781 |
% |
| 4782 |
% \begin{macro}{\l_@@_chap_height_dim} |
| 4783 |
% Calculated height of a drop chapter number. |
| 4784 |
% \begin{macrocode} |
| 4785 |
\dim_new:N \l_@@_chap_height_dim |
| 4786 |
% \end{macrocode} |
| 4787 |
% \end{macro} |
| 4788 |
% |
| 4789 |
% \begin{macro}{\g_@@_chap_width_dim} |
| 4790 |
% Calculated width of drop chapter number. |
| 4791 |
% \begin{macrocode} |
| 4792 |
\dim_new:N \g_@@_chap_width_dim |
| 4793 |
% \end{macrocode} |
| 4794 |
% \end{macro} |
| 4795 |
% |
| 4796 |
% \begin{macro}{\g_@@_chap_par_prevgraf_int} |
| 4797 |
% Store the number of lines a chapter paragraph takes up. |
| 4798 |
% \begin{macrocode} |
| 4799 |
\int_new:N \g_@@_chap_par_prevgraf_int |
| 4800 |
% \end{macrocode} |
| 4801 |
% \end{macro} |
| 4802 |
% |
| 4803 |
% \begin{macro}{\l_@@_chap_X_height_dim} |
| 4804 |
% Calculated height of X at current font size. This is used as the height |
| 4805 |
% for a drop chapter. |
| 4806 |
% \begin{macrocode} |
| 4807 |
\dim_new:N \l_@@_chap_X_height_dim |
| 4808 |
% \end{macrocode} |
| 4809 |
% \end{macro} |
| 4810 |
% |
| 4811 |
% \begin{macro}{\l_@@_para_chap_indent_dim} |
| 4812 |
% Indent used to center chapters when placed in their own paragraph. |
| 4813 |
% \begin{macrocode} |
| 4814 |
\dim_new:N \l_@@_para_chap_indent_dim |
| 4815 |
% \end{macrocode} |
| 4816 |
% \end{macro} |
| 4817 |
% |
| 4818 |
% \begin{macro}{\l_@@_nodrop_chap_coffin} |
| 4819 |
% Coffin to place non-drop chapters inside. |
| 4820 |
% \begin{macrocode} |
| 4821 |
\coffin_new:N \l_@@_nodrop_chap_coffin |
| 4822 |
% \end{macrocode} |
| 4823 |
% \end{macro} |
| 4824 |
% |
| 4825 |
% \begin{macro}{\l_@@_nodrop_chap_voffset_dim} |
| 4826 |
% Vertical offset to use when setting non-drop chapters. |
| 4827 |
% \begin{macrocode} |
| 4828 |
\dim_new:N \l_@@_nodrop_chap_voffset_dim |
| 4829 |
% \end{macrocode} |
| 4830 |
% \end{macro} |
| 4831 |
% |
| 4832 |
% \begin{macro}{\@@_get_X_height:} |
| 4833 |
% Calculate the height of \cs{l_@@_X_char_tl} for vertical alignment of |
| 4834 |
% non-drop chapters. |
| 4835 |
% \begin{macrocode} |
| 4836 |
\cs_new_protected:Nn \@@_get_X_height: |
| 4837 |
{ |
| 4838 |
\hbox_set:Nn \l_@@_chap_tmp_box { \l_@@_X_char_tl } |
| 4839 |
\dim_set:Nn \l_@@_chap_X_height_dim |
| 4840 |
{ \box_ht:N \l_@@_chap_tmp_box } |
| 4841 |
} |
| 4842 |
% \end{macrocode} |
| 4843 |
% \end{macro} |
| 4844 |
% |
| 4845 |
% \begin{macro}{\@@_drop_chap_set_up:n} |
| 4846 |
% Set up chapter drop cap and calculate its various dimensions. |
| 4847 |
% \begin{macrocode} |
| 4848 |
\cs_new_protected:Nn \@@_drop_chap_set_up:n |
| 4849 |
{ |
| 4850 |
\cs_gset_nopar:Npn \scripturecurrentchapter { #1 } |
| 4851 |
\cs_gset_nopar:Npn \scripturecurrentverse { 1 } |
| 4852 |
\@@_get_X_height: |
| 4853 |
\dim_set:Nn \l_@@_chap_height_dim |
| 4854 |
{ \baselineskip + \l_@@_chap_X_height_dim } |
| 4855 |
\dim_set:Nn \l_@@_chap_fontsize_dim |
| 4856 |
{ |
| 4857 |
\f@size pt * |
| 4858 |
\dim_ratio:nn |
| 4859 |
{ \l_@@_chap_height_dim } |
| 4860 |
{ \l_@@_chap_X_height_dim } |
| 4861 |
} |
| 4862 |
\hbox_set:Nn \l_@@_chap_tmp_box |
| 4863 |
{ |
| 4864 |
\l_@@_chap_font_tl |
| 4865 |
\fontsize |
| 4866 |
{ \l_@@_chap_fontsize_dim } |
| 4867 |
{ \l_@@_chap_fontsize_dim } |
| 4868 |
\selectfont |
| 4869 |
\str_if_eq:VnF \l_@@_chapter_colour_tl { . } |
| 4870 |
{ \exp_args:NV \color_select:n \l_@@_chapter_colour_tl } |
| 4871 |
\@@_chap_format:n { #1 } |
| 4872 |
} |
| 4873 |
\dim_gset:Nn \g_@@_chap_width_dim |
| 4874 |
{ \box_wd:N \l_@@_chap_tmp_box } |
| 4875 |
% \end{macrocode} |
| 4876 |
% Avoid breaks in the middle of drop chapters. |
| 4877 |
% \begin{macrocode} |
| 4878 |
\int_set_eq:NN \l_@@_clubpenalty_saved_int \clubpenalty |
| 4879 |
\clubpenalty 10000 |
| 4880 |
\bool_if:NF \l_@@_verse_para_bool |
| 4881 |
{ |
| 4882 |
\str_if_eq:VnTF \l_@@_currenvir_str { poetry } |
| 4883 |
{ \int_gset_eq:NN \g_@@_current_group_level_b_int \currentgrouplevel } |
| 4884 |
{ |
| 4885 |
\int_gset:Nn \g_@@_current_group_level_b_int { \currentgrouplevel + 1 } |
| 4886 |
} |
| 4887 |
\@@_chap_par_save_prevgraf_at_group_level: |
| 4888 |
} |
| 4889 |
} |
| 4890 |
% \end{macrocode} |
| 4891 |
% \end{macro} |
| 4892 |
% |
| 4893 |
% \begin{macro}{\@@_drop_chap_output:} |
| 4894 |
% Output a drop chapter. |
| 4895 |
% \begin{macrocode} |
| 4896 |
\cs_new_protected:Nn \@@_drop_chap_output: |
| 4897 |
{ |
| 4898 |
\bool_gset_true:N \g_@@_suppress_next_pilcrow_bool |
| 4899 |
\cs_if_eq:NNTF \noindent \@@_para_noindent: |
| 4900 |
{ |
| 4901 |
\legacy_if:nTF { @newlist } |
| 4902 |
{ |
| 4903 |
\skip_horizontal:n { -\l_@@_parindent_tl } |
| 4904 |
} |
| 4905 |
{ \tex_noindent:D } |
| 4906 |
\@@_pilcrow_output: |
| 4907 |
} |
| 4908 |
{ \noindent } |
| 4909 |
\parshape 3 ~ |
| 4910 |
\dim_eval:n |
| 4911 |
{ \@totalleftmargin + \g_@@_chap_width_dim + \l_@@_chap_sep_tl } ~ |
| 4912 |
\dim_eval:n |
| 4913 |
{ \linewidth - \g_@@_chap_width_dim - \l_@@_chap_sep_tl } ~ |
| 4914 |
\dim_eval:n |
| 4915 |
{ \@totalleftmargin + \g_@@_chap_width_dim + \l_@@_chap_sep_tl } ~ |
| 4916 |
\dim_eval:n |
| 4917 |
{ \linewidth - \g_@@_chap_width_dim - \l_@@_chap_sep_tl } ~ |
| 4918 |
\@totalleftmargin ~ |
| 4919 |
\linewidth |
| 4920 |
\group_begin: |
| 4921 |
\hook_use:n { scripture / chap / before } |
| 4922 |
\box_use:N \l_@@_chap_box |
| 4923 |
\hook_use:n { scripture / chap / after } |
| 4924 |
\group_end: |
| 4925 |
\bool_if:NT \l_@@_chap_show_verse_bool |
| 4926 |
{ \@@_verse_output:n { 1 } } |
| 4927 |
\bool_if:NT \l_@@_verse_para_bool |
| 4928 |
{ |
| 4929 |
\int_gset_eq:NN \g_@@_current_group_level_b_int \currentgrouplevel |
| 4930 |
\@@_chap_par_save_prevgraf_at_group_level: |
| 4931 |
} |
| 4932 |
\hook_gclear_next_code:n { scripture / pilcrow } |
| 4933 |
} |
| 4934 |
% \end{macrocode} |
| 4935 |
% \end{macro} |
| 4936 |
% |
| 4937 |
% \begin{macro}{\@@_nodrop_chap:n} |
| 4938 |
% Format a non-drop chapter. |
| 4939 |
% \begin{macrocode} |
| 4940 |
\cs_new_protected:Nn \@@_nodrop_chap:n |
| 4941 |
{ |
| 4942 |
\cs_gset_nopar:Npn \scripturecurrentchapter { #1 } |
| 4943 |
\cs_gset_nopar:Npn \scripturecurrentverse { 1 } |
| 4944 |
\group_begin: |
| 4945 |
\bool_if:NT \l_@@_verse_para_bool |
| 4946 |
{ |
| 4947 |
\legacy_if:nF { @newlist } |
| 4948 |
{ \mode_if_vertical:F \para_end: } |
| 4949 |
} |
| 4950 |
\bool_if:NTF \l_@@_chap_show_bool |
| 4951 |
{ |
| 4952 |
\@@_get_X_height: |
| 4953 |
\hcoffin_set:Nn \l_@@_nodrop_chap_coffin |
| 4954 |
{ |
| 4955 |
\str_if_eq:VnF \l_@@_chapter_colour_tl { . } |
| 4956 |
{ \exp_args:NV \color_select:n \l_@@_chapter_colour_tl } |
| 4957 |
\l_@@_chap_font_tl |
| 4958 |
\@@_chap_format:n { #1 } |
| 4959 |
\kern \l_@@_chap_sep_tl |
| 4960 |
} |
| 4961 |
\dim_zero:N \l_@@_nodrop_chap_voffset_dim |
| 4962 |
\tl_if_eq:NnT \l_@@_chapter_valign_tl { t } |
| 4963 |
{ \dim_set_eq:NN \l_@@_nodrop_chap_voffset_dim \l_@@_chap_X_height_dim } |
| 4964 |
\tl_if_eq:NnT \l_@@_chapter_valign_tl { vc } |
| 4965 |
{ \dim_set:Nn \l_@@_nodrop_chap_voffset_dim { 0.5 \l_@@_chap_X_height_dim } } |
| 4966 |
\hook_use:n { scripture / chap / before } |
| 4967 |
\bool_if:NTF \l_@@_chap_smash_bool |
| 4968 |
{ |
| 4969 |
\mode_leave_vertical: |
| 4970 |
\smash |
| 4971 |
{ |
| 4972 |
\exp_args:NNoo |
| 4973 |
\coffin_typeset:Nnnnn \l_@@_nodrop_chap_coffin |
| 4974 |
{ \l_@@_chapter_align_tl } |
| 4975 |
{ \l_@@_chapter_valign_tl } |
| 4976 |
{ 0pt } |
| 4977 |
{ \l_@@_nodrop_chap_voffset_dim } |
| 4978 |
} |
| 4979 |
} |
| 4980 |
{ |
| 4981 |
\exp_args:NNoo |
| 4982 |
\coffin_typeset:Nnnnn \l_@@_nodrop_chap_coffin |
| 4983 |
{ \l_@@_chapter_align_tl } |
| 4984 |
{ \l_@@_chapter_valign_tl } |
| 4985 |
{ 0pt } |
| 4986 |
{ \l_@@_nodrop_chap_voffset_dim } |
| 4987 |
} |
| 4988 |
\nobreak |
| 4989 |
\skip_horizontal:N \c_zero_skip |
| 4990 |
\hook_use:n { scripture / chap / after } |
| 4991 |
\bool_if:NT \l_@@_chap_show_verse_bool |
| 4992 |
{ |
| 4993 |
\@@_verse_output:n { 1 } |
| 4994 |
} |
| 4995 |
\str_if_eq:VnF \l_@@_currenvir_str { midparachap } |
| 4996 |
{ \@@_pilcrow_output: } |
| 4997 |
} |
| 4998 |
{ |
| 4999 |
\hook_use:n { scripture / chap / before } |
| 5000 |
\hook_use:n { scripture / chap / after } |
| 5001 |
\vs { 1 } |
| 5002 |
} |
| 5003 |
\group_end: |
| 5004 |
\parshape 1 ~ \@totalleftmargin ~ \linewidth |
| 5005 |
\hook_gclear_next_code:n { scripture / pilcrow } |
| 5006 |
} |
| 5007 |
% \end{macrocode} |
| 5008 |
% \end{macro} |
| 5009 |
% |
| 5010 |
% \begin{macro}{\@@_para_chap:n} |
| 5011 |
% Format a chapter in its own paragraph. |
| 5012 |
% \begin{macrocode} |
| 5013 |
\cs_new_protected:Nn \@@_para_chap:n |
| 5014 |
{ |
| 5015 |
\cs_gset_nopar:Npn \scripturecurrentchapter { #1 } |
| 5016 |
\cs_gset_nopar:Npn \scripturecurrentverse { 1 } |
| 5017 |
\group_begin: |
| 5018 |
\skip_zero:N \parskip |
| 5019 |
\bool_if:NTF \l_@@_chap_show_bool |
| 5020 |
{ |
| 5021 |
\dim_set_eq:NN \l_@@_para_chap_indent_dim \linewidth |
| 5022 |
\str_if_eq:VnTF \l_@@_currenvir_str { scripture } |
| 5023 |
{ |
| 5024 |
\dim_set:Nn \l_@@_para_chap_indent_dim { 0.5 \l_@@_para_chap_indent_dim } |
| 5025 |
} |
| 5026 |
{ |
| 5027 |
\dim_add:Nn \l_@@_para_chap_indent_dim { \leftmargin + \rightmargin } |
| 5028 |
\dim_set:Nn \l_@@_para_chap_indent_dim { 0.5 \l_@@_para_chap_indent_dim } |
| 5029 |
\dim_sub:Nn \l_@@_para_chap_indent_dim \leftmargin |
| 5030 |
} |
| 5031 |
\mode_if_vertical:F \para_end: |
| 5032 |
\addvspace { \l_@@_chap_para_aboveskip_tl } |
| 5033 |
\bool_gset_eq:NN \g_tmpa_bool \g_@@_suppress_next_pilcrow_bool |
| 5034 |
\bool_gset_true:N \g_@@_suppress_next_pilcrow_bool |
| 5035 |
\str_if_eq:VnTF \l_@@_currenvir_str { midparachap } |
| 5036 |
{ \tex_noindent:D } |
| 5037 |
{ \noindent } |
| 5038 |
\bool_gset_eq:NN \g_@@_suppress_next_pilcrow_bool \g_tmpa_bool |
| 5039 |
\skip_horizontal:N \l_@@_para_chap_indent_dim |
| 5040 |
\hbox_overlap_center:n |
| 5041 |
{ |
| 5042 |
\hook_use:n { scripture / chap / before } |
| 5043 |
\group_begin: |
| 5044 |
\str_if_eq:VnF \l_@@_chapter_colour_tl { . } |
| 5045 |
{ \exp_args:NV \color_select:n \l_@@_chapter_colour_tl } |
| 5046 |
\l_@@_chap_font_tl |
| 5047 |
\@@_chap_format:n { #1 } |
| 5048 |
\group_end: |
| 5049 |
\hook_use:n { scripture / chap / after } |
| 5050 |
} |
| 5051 |
\para_end: |
| 5052 |
\nobreak |
| 5053 |
\bool_lazy_any:nTF |
| 5054 |
{ |
| 5055 |
{ \str_if_eq_p:Vn \l_@@_currenvir_str { scripture } } |
| 5056 |
{ \str_if_eq_p:Vn \l_@@_currenvir_str { midparachap } } |
| 5057 |
{ \str_if_eq_p:Vn \l_@@_currenvir_str { narrow } } |
| 5058 |
} |
| 5059 |
{ \legacy_if_set:nn { @afterindent } { \l_@@_chap_para_afterindent_bool } } |
| 5060 |
{ \legacy_if_set_true:n { @afterindent } } |
| 5061 |
\@afterheading |
| 5062 |
} |
| 5063 |
{ |
| 5064 |
\hook_use:n { scripture / chap / before } |
| 5065 |
\hook_use:n { scripture / chap / after } |
| 5066 |
} |
| 5067 |
\peek_meaning:NTF \c_space_token |
| 5068 |
{ |
| 5069 |
\addvspace { \l_@@_chap_para_belowskip_tl } |
| 5070 |
\group_end: |
| 5071 |
\hook_use:n { scripture / poetry / pilcrow } |
| 5072 |
} |
| 5073 |
{ |
| 5074 |
\addvspace { \l_@@_chap_para_belowskip_tl } |
| 5075 |
\cs_if_eq:NNTF \vs \@@_poetry_mode_vertical_verse:n |
| 5076 |
{ |
| 5077 |
\bool_gset_eq:NN \g_tmpa_bool \g_@@_suppress_next_pilcrow_bool |
| 5078 |
\bool_gset_true:N \g_@@_suppress_next_pilcrow_bool |
| 5079 |
\noindent |
| 5080 |
\vs { 1 } |
| 5081 |
\bool_gset_eq:NN \g_@@_suppress_next_pilcrow_bool \g_tmpa_bool |
| 5082 |
} |
| 5083 |
{ |
| 5084 |
\str_if_eq:VnT \l_@@_currenvir_str { midparachap } |
| 5085 |
{ \bool_gset_true:N \g_@@_suppress_next_pilcrow_bool } |
| 5086 |
\vs { 1 } |
| 5087 |
} |
| 5088 |
\group_end: |
| 5089 |
\hook_use:n { scripture / poetry / pilcrow } |
| 5090 |
} |
| 5091 |
} |
| 5092 |
% \end{macrocode} |
| 5093 |
% \end{macro} |
| 5094 |
% |
| 5095 |
% \begin{macro}{\@@_chap:n} |
| 5096 |
% Position a drop chapter. |
| 5097 |
% \begin{macrocode} |
| 5098 |
\cs_new_protected:Nn \@@_chap:n |
| 5099 |
{ |
| 5100 |
\@@_drop_chap_set_up:n { #1 } |
| 5101 |
\hbox_set:Nn \l_@@_chap_box |
| 5102 |
{ |
| 5103 |
\box_move_down:nn |
| 5104 |
{ \baselineskip } |
| 5105 |
{ |
| 5106 |
\hbox_overlap_left:n |
| 5107 |
{ |
| 5108 |
\box_use:N \l_@@_chap_tmp_box |
| 5109 |
\skip_horizontal:N \l_@@_chap_sep_tl |
| 5110 |
} |
| 5111 |
} |
| 5112 |
} |
| 5113 |
\box_set_ht:Nn \l_@@_chap_box { \c_zero_dim } |
| 5114 |
\box_set_dp:Nn \l_@@_chap_box { \c_zero_dim } |
| 5115 |
\bool_if:NTF \l_@@_mid_para_chap_bool |
| 5116 |
{ \@@_mid_para_drop_chap_output: } |
| 5117 |
{ |
| 5118 |
\bool_if:NTF \l_@@_verse_para_bool |
| 5119 |
{ \para_end: } |
| 5120 |
{ \par } |
| 5121 |
\@@_drop_chap_output: |
| 5122 |
\str_if_eq:VnF \l_@@_currenvir_str { midparachap } |
| 5123 |
{ \@@_pilcrow_output: } |
| 5124 |
} |
| 5125 |
\int_gset_eq:NN \g_@@_current_group_level_a_int \currentgrouplevel |
| 5126 |
\@@_reset_par_at_group_level: |
| 5127 |
} |
| 5128 |
% \end{macrocode} |
| 5129 |
% \end{macro} |
| 5130 |
% |
| 5131 |
% \begin{macro}{\g_@@_current_group_level_a_int, |
| 5132 |
% \g_@@_current_group_level_a_int, \g_@@_current_group_level_c_int} |
| 5133 |
% Track the group level so indent and spacing is correctly reset after a |
| 5134 |
% drop chapter even if the first paragraph of the chapter contains something |
| 5135 |
% like a \cs{footnote}. |
| 5136 |
% \begin{macrocode} |
| 5137 |
\int_new:N \g_@@_current_group_level_a_int |
| 5138 |
\int_new:N \g_@@_current_group_level_b_int |
| 5139 |
\int_new:N \g_@@_current_group_level_c_int |
| 5140 |
% \end{macrocode} |
| 5141 |
% \end{macro} |
| 5142 |
% |
| 5143 |
% \begin{macro}{\@@_reset_par_at_group_level:} |
| 5144 |
% This function skips over inner groups (like \cs{footnote}) before |
| 5145 |
% resetting the \cs{parshape} after a drop chapter. |
| 5146 |
% \begin{macrocode} |
| 5147 |
\cs_new_protected:Nn \@@_reset_par_at_group_level: |
| 5148 |
{ |
| 5149 |
\hook_gput_next_code:nn { para / before } |
| 5150 |
{ |
| 5151 |
\int_compare:nNnTF |
| 5152 |
{ \g_@@_current_group_level_a_int } = { \currentgrouplevel } |
| 5153 |
{ |
| 5154 |
\legacy_if:nF { @newlist } |
| 5155 |
{ |
| 5156 |
\int_compare:nNnT \g_@@_chap_par_prevgraf_int = 1 |
| 5157 |
{ |
| 5158 |
\dim_compare:nNnT \parskip < \baselineskip |
| 5159 |
{ |
| 5160 |
\dim_compare:nNnT |
| 5161 |
{ \g_@@_chap_width_dim + \l_@@_chap_sep_tl } > \parindent |
| 5162 |
{ |
| 5163 |
\hook_gput_next_code:nn { para / begin } |
| 5164 |
{ |
| 5165 |
\para_omit_indent: |
| 5166 |
\skip_horizontal:n {\g_@@_chap_width_dim + \l_@@_chap_sep_tl } |
| 5167 |
} |
| 5168 |
} |
| 5169 |
} |
| 5170 |
} |
| 5171 |
\int_gzero:N \g_@@_chap_par_prevgraf_int |
| 5172 |
} |
| 5173 |
\parshape 1 ~ \@totalleftmargin ~ \linewidth |
| 5174 |
} |
| 5175 |
{ \@@_reset_par_at_group_level: } |
| 5176 |
} |
| 5177 |
} |
| 5178 |
% \end{macrocode} |
| 5179 |
% \end{macro} |
| 5180 |
% |
| 5181 |
% \begin{macro}{\@@_chap_par_save_prevgraf_at_group_level:} |
| 5182 |
% This function skips over inner groups (like \cs{footnote}) before |
| 5183 |
% saving the \cs{prevgraf}. |
| 5184 |
% \begin{macrocode} |
| 5185 |
\cs_new_protected:Nn \@@_chap_par_save_prevgraf_at_group_level: |
| 5186 |
{ |
| 5187 |
\hook_gput_next_code:nn { para / after } |
| 5188 |
{ |
| 5189 |
\int_compare:nNnTF |
| 5190 |
{ \g_@@_current_group_level_b_int } = { \currentgrouplevel } |
| 5191 |
{ |
| 5192 |
\int_gset_eq:NN \g_@@_chap_par_prevgraf_int \prevgraf |
| 5193 |
\int_compare:nNnT \g_@@_chap_par_prevgraf_int = 1 |
| 5194 |
{ \penalty 10000 } |
| 5195 |
\hook_gput_next_code:nn { para / before } |
| 5196 |
{ \int_set_eq:NN \clubpenalty \l_@@_clubpenalty_saved_int } |
| 5197 |
} |
| 5198 |
{ \@@_chap_par_save_prevgraf_at_group_level: } |
| 5199 |
} |
| 5200 |
} |
| 5201 |
% \end{macrocode} |
| 5202 |
% \end{macro} |
| 5203 |
% |
| 5204 |
% \begin{macro}{\@@_zero_chap_par_prevgraf_at_group_level:} |
| 5205 |
% This function skips over inner groups (like \cs{footnote}) before |
| 5206 |
% zeroing \cs{g_@@_chap_par_prevgraf_int}. |
| 5207 |
% \begin{macrocode} |
| 5208 |
\cs_new_protected:Nn \@@_zero_chap_par_prevgraf_at_group_level: |
| 5209 |
{ |
| 5210 |
\hook_gput_next_code:nn { para / after } |
| 5211 |
{ |
| 5212 |
\int_compare:nNnTF |
| 5213 |
{ \g_@@_current_group_level_c_int } = { \currentgrouplevel } |
| 5214 |
{ |
| 5215 |
\hook_gput_next_code:nn { para / after } |
| 5216 |
{ \int_gzero:N \g_@@_chap_par_prevgraf_int } |
| 5217 |
} |
| 5218 |
{ \@@_zero_chap_par_prevgraf_at_group_level: } |
| 5219 |
} |
| 5220 |
} |
| 5221 |
% \end{macrocode} |
| 5222 |
% \end{macro} |
| 5223 |
% |
| 5224 |
% \subsubsection{Formatting and printing verse numbers} |
| 5225 |
% |
| 5226 |
% \begin{macro}{\l_@@_verse_par_start_bool} |
| 5227 |
% Flag for whether the current verse is at the start of a paragraph. |
| 5228 |
% \begin{macrocode} |
| 5229 |
\bool_new:N \l_@@_verse_par_start_bool |
| 5230 |
% \end{macrocode} |
| 5231 |
% \end{macro} |
| 5232 |
% |
| 5233 |
% \begin{macro}{\l_@@_no_verse_first_bool} |
| 5234 |
% Suppress the next verse from formatting differently if it begins a new |
| 5235 |
% paragraph. |
| 5236 |
% \begin{macrocode} |
| 5237 |
\bool_new:N \l_@@_no_verse_first_bool |
| 5238 |
% \end{macrocode} |
| 5239 |
% \end{macro} |
| 5240 |
% |
| 5241 |
% \begin{macro}{\g_@@_suppress_next_verse_para_bool} |
| 5242 |
% Suppress the next verse from starting a new paragraph when |
| 5243 |
% \opt{verse/para} is in use. |
| 5244 |
% \begin{macrocode} |
| 5245 |
\bool_new:N \g_@@_suppress_next_verse_para_bool |
| 5246 |
% \end{macrocode} |
| 5247 |
% \end{macro} |
| 5248 |
% |
| 5249 |
% \begin{macro}{\@@_verse_output:n} |
| 5250 |
% Output a formatted verse. |
| 5251 |
% \begin{macrocode} |
| 5252 |
\cs_new_protected:Nn \@@_verse_output:n |
| 5253 |
{ |
| 5254 |
\cs_gset_nopar:Npn \scripturecurrentverse { #1 } |
| 5255 |
\legacy_if:nTF { @endpe } |
| 5256 |
{ \bool_set_false:N \l_@@_verse_par_start_bool } |
| 5257 |
{ \bool_set_true:N \l_@@_verse_par_start_bool } |
| 5258 |
\mode_if_vertical:TF |
| 5259 |
{ \mode_leave_vertical: } |
| 5260 |
{ \bool_set_false:N \l_@@_verse_par_start_bool } |
| 5261 |
\bool_if:NT \l_@@_no_verse_first_bool |
| 5262 |
{ |
| 5263 |
\bool_set_false:N \l_@@_verse_par_start_bool |
| 5264 |
\bool_set_false:N \l_@@_no_verse_first_bool |
| 5265 |
} |
| 5266 |
\group_begin: |
| 5267 |
\bool_if:NT \l_@@_verse_para_bool |
| 5268 |
{ |
| 5269 |
\box_if_empty:NF \g_@@_post_env_indent_box |
| 5270 |
{ \box_use_drop:N \g_@@_post_env_indent_box } |
| 5271 |
} |
| 5272 |
\hook_use:n { scripture / verse / before } |
| 5273 |
\bool_if:NT \l_@@_verse_show_bool |
| 5274 |
{ |
| 5275 |
\group_begin: |
| 5276 |
\l_@@_verse_font_tl |
| 5277 |
\str_if_eq:VnF \l_@@_verse_colour_tl { . } |
| 5278 |
{ \exp_args:NV \color_select:n \l_@@_verse_colour_tl } |
| 5279 |
\bool_lazy_all:nTF |
| 5280 |
{ |
| 5281 |
{ \l_@@_verse_first_bool } |
| 5282 |
{ \l_@@_verse_par_start_bool } |
| 5283 |
{ \bool_not_p:n { \str_if_eq_p:Vn \l_@@_currenvir_str { poetry } } } |
| 5284 |
} |
| 5285 |
{ |
| 5286 |
\@@_verse_first_format:n { #1 } |
| 5287 |
\group_end: |
| 5288 |
\kern \l_@@_verse_first_sep_tl |
| 5289 |
} |
| 5290 |
{ |
| 5291 |
\@@_verse_format:n { #1 } |
| 5292 |
\group_end: |
| 5293 |
\kern \l_@@_verse_sep_tl |
| 5294 |
} |
| 5295 |
\nobreak |
| 5296 |
\skip_horizontal:N \c_zero_skip |
| 5297 |
} |
| 5298 |
\hook_use:n { scripture / verse / after } |
| 5299 |
\hook_use:n { scripture / pilcrow } |
| 5300 |
\group_end: |
| 5301 |
} |
| 5302 |
% \end{macrocode} |
| 5303 |
% \end{macro} |
| 5304 |
% |
| 5305 |
% \begin{macro}{\@@_verse_compact_output:n} |
| 5306 |
% Output a formatted verse. |
| 5307 |
% \begin{macrocode} |
| 5308 |
\cs_new_protected:Nn \@@_verse_compact_output:n |
| 5309 |
{ |
| 5310 |
\mode_if_vertical:T |
| 5311 |
{ \@@_set_pilcrow_hook: } |
| 5312 |
\@@_verse_output:n { #1 } |
| 5313 |
} |
| 5314 |
% \end{macrocode} |
| 5315 |
% \end{macro} |
| 5316 |
% |
| 5317 |
% \begin{macro}{\@@_verse_para_output:n} |
| 5318 |
% Output a formatted verse when \opt{verse/para} is set. |
| 5319 |
% \begin{macrocode} |
| 5320 |
\cs_new_protected:Nn \@@_verse_para_output:n |
| 5321 |
{ |
| 5322 |
\mode_if_vertical:T |
| 5323 |
{ \@@_set_pilcrow_hook: } |
| 5324 |
\hook_if_empty:nT { scripture / pilcrow } |
| 5325 |
{ \dim_set:Nn \parindent \l_@@_para_indent_tl } |
| 5326 |
\bool_if:NTF \g_@@_suppress_next_verse_para_bool |
| 5327 |
{ \bool_gset_false:N \g_@@_suppress_next_verse_para_bool } |
| 5328 |
{ |
| 5329 |
\legacy_if:nF { @newlist } |
| 5330 |
{ |
| 5331 |
\mode_if_vertical:F |
| 5332 |
{ |
| 5333 |
\para_end: |
| 5334 |
\parshape 1 ~ \@totalleftmargin ~ \linewidth |
| 5335 |
} |
| 5336 |
} |
| 5337 |
} |
| 5338 |
\@@_verse_output:n { #1 } |
| 5339 |
} |
| 5340 |
% \end{macrocode} |
| 5341 |
% \end{macro} |
| 5342 |
% |
| 5343 |
% \begin{macro}{\@@_hanging_verse_para:n} |
| 5344 |
% Output a formatted verse when \opt{verse/para} is set and in a hanging |
| 5345 |
% environment. |
| 5346 |
% \begin{macrocode} |
| 5347 |
\cs_new_protected:Nn \@@_hanging_verse_para:n |
| 5348 |
{ |
| 5349 |
\mode_if_vertical:T |
| 5350 |
{ \@@_set_pilcrow_hook: } |
| 5351 |
\bool_if:NF \g_@@_suppress_next_verse_para_bool |
| 5352 |
{ |
| 5353 |
\legacy_if:nF { @newlist } |
| 5354 |
{ |
| 5355 |
\mode_if_vertical:F |
| 5356 |
{ |
| 5357 |
\bool_gset_true:N \g_@@_suppress_next_pilcrow_bool |
| 5358 |
\hook_gput_next_code:nn { para / begin } |
| 5359 |
{ \parshape 1 ~ \@totalleftmargin ~ \linewidth } |
| 5360 |
\par |
| 5361 |
\tex_noindent:D |
| 5362 |
} |
| 5363 |
} |
| 5364 |
} |
| 5365 |
\bool_gset_false:N \g_@@_suppress_next_verse_para_bool |
| 5366 |
\@@_hanging_verse:n { #1 } |
| 5367 |
} |
| 5368 |
% \end{macrocode} |
| 5369 |
% \end{macro} |
| 5370 |
% |
| 5371 |
% \subsubsection{Printing pilcrows} |
| 5372 |
% |
| 5373 |
% \begin{macro}{\g_@@_suppress_next_pilcrow_bool} |
| 5374 |
% Flag to suppress the next pilcrow. |
| 5375 |
% \begin{macrocode} |
| 5376 |
\bool_new:N \g_@@_suppress_next_pilcrow_bool |
| 5377 |
% \end{macrocode} |
| 5378 |
% \end{macro} |
| 5379 |
% |
| 5380 |
% \begin{macro}{\@@_set_pilcrow_hook:} |
| 5381 |
% Set the next \hook{scripture/pilcrow} hook to output a pilcrow providing |
| 5382 |
% the hook is currently empty. |
| 5383 |
% \opt{verse/para} or \opt{compact} options are set. |
| 5384 |
% \begin{macrocode} |
| 5385 |
\cs_new_protected:Nn \@@_set_pilcrow_hook: |
| 5386 |
{ |
| 5387 |
\hook_if_empty:nT { scripture / pilcrow } |
| 5388 |
{ |
| 5389 |
\hook_gput_next_code:nn { scripture / pilcrow } { \@@_pilcrow_output: } |
| 5390 |
} |
| 5391 |
} |
| 5392 |
% \end{macrocode} |
| 5393 |
% \end{macro} |
| 5394 |
% |
| 5395 |
% \begin{macro}{\@@_pilcrow_output:} |
| 5396 |
% Output a pilcrow (\P). Pilrows only display when either the |
| 5397 |
% \opt{verse/para} or \opt{compact} options are set. |
| 5398 |
% \begin{macrocode} |
| 5399 |
\cs_new_protected:Nn \@@_pilcrow_output: |
| 5400 |
{ |
| 5401 |
\bool_gset_false:N \g_@@_para_mode_vertical_bool |
| 5402 |
\bool_gset_false:N \g_@@_mode_vertical_inner_bool |
| 5403 |
\bool_if:NT \l_@@_pilcrow_bool |
| 5404 |
{ |
| 5405 |
\bool_lazy_or:nnT \l_@@_verse_para_bool \l_@@_compact_bool |
| 5406 |
{ |
| 5407 |
\bool_if:NTF \g_@@_suppress_next_pilcrow_bool |
| 5408 |
{ \bool_gset_false:N \g_@@_suppress_next_pilcrow_bool } |
| 5409 |
{ |
| 5410 |
\P |
| 5411 |
\kern \l_@@_pilcrow_sep_tl |
| 5412 |
\nobreak |
| 5413 |
\skip_horizontal:N \c_zero_skip |
| 5414 |
} |
| 5415 |
} |
| 5416 |
} |
| 5417 |
} |
| 5418 |
% \end{macrocode} |
| 5419 |
% \end{macro} |
| 5420 |
% |
| 5421 |
% \subsubsection{Calculating the length of the final line in a paragraph} |
| 5422 |
% |
| 5423 |
% \begin{macro}{\g_@@_final_line_dim} |
| 5424 |
% Store the length of the final line in a paragraph. |
| 5425 |
% \begin{macrocode} |
| 5426 |
\dim_new:N \g_@@_final_line_dim |
| 5427 |
% \end{macrocode} |
| 5428 |
% \end{macro} |
| 5429 |
% |
| 5430 |
% \begin{macro}{\@@_calc_final_line_length:} |
| 5431 |
% Calculate the length of the final line in a paragraph. |
| 5432 |
% \begin{macrocode} |
| 5433 |
\cs_new_protected:Nn \@@_calc_final_line_length: |
| 5434 |
{ |
| 5435 |
\skip_set:Nn \abovedisplayshortskip { -\baselineskip } |
| 5436 |
\skip_set_eq:NN \abovedisplayskip \abovedisplayshortskip |
| 5437 |
\skip_zero:N \belowdisplayshortskip |
| 5438 |
\skip_zero:N \belowdisplayskip |
| 5439 |
$$ |
| 5440 |
\hook_use:n { para / after } |
| 5441 |
\dim_compare:nNnTF \predisplaysize > \c_zero_dim |
| 5442 |
{ |
| 5443 |
\dim_gset:Nn \g_@@_final_line_dim |
| 5444 |
{ \predisplaysize - 2em } |
| 5445 |
} |
| 5446 |
{ |
| 5447 |
\bool_if:NT \l_@@_textdir_change_in_group_bool |
| 5448 |
{ |
| 5449 |
\str_if_eq:VnT \l_@@_currenvir_str { scripture } |
| 5450 |
{ \int_set:Nn \prevgraf { \int_use:N \prevgraf - 1 } } |
| 5451 |
} |
| 5452 |
} |
| 5453 |
\cs_gset_nopar:Nx \@@_reset_spacing: |
| 5454 |
{ |
| 5455 |
\dim_set:Nn \predisplaysize { \dim_use:N \predisplaysize } |
| 5456 |
\int_set:Nn \prevgraf { \int_use:N \prevgraf } |
| 5457 |
\int_gset:Nn \g_@@_chap_par_prevgraf_int { \int_use:N \g_@@_chap_par_prevgraf_int } |
| 5458 |
} |
| 5459 |
$$ |
| 5460 |
\@@_reset_spacing: |
| 5461 |
\dim_compare:nNnT \g_@@_final_line_dim > \paperwidth |
| 5462 |
{ \dim_gset:Nn \g_@@_final_line_dim { \@totalleftmargin + \linewidth } } |
| 5463 |
\dim_compare:nNnT \g_@@_final_line_dim > { \c_zero_dim - 1sp } |
| 5464 |
{ \skip_vertical:n { -\baselineskip - \parskip } } |
| 5465 |
} |
| 5466 |
% \end{macrocode} |
| 5467 |
% \end{macro} |
| 5468 |
% |
| 5469 |
% \subsubsection{The \env{scripture} environment} |
| 5470 |
% |
| 5471 |
% \begin{macro}{\l_@@_currenvir_str} |
| 5472 |
% Store the current \env{scripture} environment. |
| 5473 |
% \begin{macrocode} |
| 5474 |
\str_new:N \l_@@_currenvir_str |
| 5475 |
% \end{macrocode} |
| 5476 |
% \end{macro} |
| 5477 |
% |
| 5478 |
% \begin{macro}{\l_@@_parskip_correction_skip} |
| 5479 |
% Correction to ensure consistent \cs{parskip} at start of \env{scripture} |
| 5480 |
% environment with non-zero \opt{parskip} option. |
| 5481 |
% \begin{macrocode} |
| 5482 |
\skip_new:N \l_@@_parskip_correction_skip |
| 5483 |
% \end{macrocode} |
| 5484 |
% \end{macro} |
| 5485 |
% |
| 5486 |
% \begin{macro}{\l_@@_ref_tl} |
| 5487 |
% Store the reference passed to the \env{scripture} environment. |
| 5488 |
% \begin{macrocode} |
| 5489 |
\tl_new:N \l_@@_ref_tl |
| 5490 |
% \end{macrocode} |
| 5491 |
% \end{macro} |
| 5492 |
% |
| 5493 |
% \begin{macro}{\@@_added:n} |
| 5494 |
% Mark text as added. |
| 5495 |
% \begin{macrocode} |
| 5496 |
\cs_new_protected_nopar:Nn \@@_added:n |
| 5497 |
{ |
| 5498 |
\group_begin: |
| 5499 |
\l_@@_added_font_tl |
| 5500 |
\@@_added_format:n { #1 } |
| 5501 |
\group_end: |
| 5502 |
} |
| 5503 |
% \end{macrocode} |
| 5504 |
% \end{macro} |
| 5505 |
% |
| 5506 |
% \begin{macro}{\@@_heading:n} |
| 5507 |
% Output a non-canonical heading. |
| 5508 |
% \begin{macrocode} |
| 5509 |
\cs_new_protected_nopar:Nn \@@_heading:n |
| 5510 |
{ |
| 5511 |
\str_if_eq:VnTF \l_@@_currenvir_str { scripture } |
| 5512 |
{ |
| 5513 |
\bool_if:NTF \l_@@_heading_show_bool |
| 5514 |
{ |
| 5515 |
\parshape 1 ~ \@totalleftmargin ~ \linewidth |
| 5516 |
\group_begin: |
| 5517 |
\bool_set_false:N \l_@@_pilcrow_bool |
| 5518 |
\legacy_if:nTF { @newlist } |
| 5519 |
{ |
| 5520 |
\skip_horizontal:n { -\parindent } |
| 5521 |
} |
| 5522 |
{ |
| 5523 |
\@@_list_para_end: |
| 5524 |
\addvspace { \l_@@_heading_aboveskip_tl } |
| 5525 |
\tex_noindent:D |
| 5526 |
} |
| 5527 |
\l_@@_heading_align_tl |
| 5528 |
\l_@@_heading_font_tl |
| 5529 |
\@@_heading_format:n { #1 } |
| 5530 |
\@@_list_para_end: |
| 5531 |
\group_end: |
| 5532 |
\bool_if:NTF \l_@@_verse_para_bool |
| 5533 |
{ |
| 5534 |
\cs_set_eq:NN \noindent \_@@_para_noindent: |
| 5535 |
} |
| 5536 |
{ |
| 5537 |
\cs_set_eq:NN \noindent \tex_noindent:D |
| 5538 |
} |
| 5539 |
\legacy_if_set:nn { @afterindent } \l_@@_heading_afterindent_bool |
| 5540 |
\bool_if:NF \l_@@_heading_afterindent_bool |
| 5541 |
{ |
| 5542 |
\hook_gput_next_code:nn { para / before } |
| 5543 |
{ \para_omit_indent: } |
| 5544 |
} |
| 5545 |
\nobreak |
| 5546 |
\@afterheading |
| 5547 |
\addvspace { \l_@@_heading_belowskip_tl } |
| 5548 |
} |
| 5549 |
{ \ignorespaces } |
| 5550 |
} |
| 5551 |
{ |
| 5552 |
\msg_error:nnx { scripture } { heading-error } { \l_@@_currenvir_str } |
| 5553 |
} |
| 5554 |
} |
| 5555 |
% \end{macrocode} |
| 5556 |
% \end{macro} |
| 5557 |
% |
| 5558 |
% \begin{macro}{\@@_name:n} |
| 5559 |
% Output divine name. |
| 5560 |
% \begin{macrocode} |
| 5561 |
\cs_new_protected_nopar:Nn \@@_name:n |
| 5562 |
{ |
| 5563 |
\group_begin: |
| 5564 |
\l_@@_name_font_tl |
| 5565 |
\@@_name_format:n { #1 } |
| 5566 |
\group_end: |
| 5567 |
} |
| 5568 |
% \end{macrocode} |
| 5569 |
% \end{macro} |
| 5570 |
% |
| 5571 |
% \begin{macro}{\@@_no_first_verse:} |
| 5572 |
% Suppress special formatting for first verse if active. |
| 5573 |
% \begin{macrocode} |
| 5574 |
\cs_new_protected_nopar:Nn \@@_no_first_verse: |
| 5575 |
{ |
| 5576 |
\bool_set_true:N \l_@@_no_verse_first_bool |
| 5577 |
} |
| 5578 |
% \end{macrocode} |
| 5579 |
% \end{macro} |
| 5580 |
% |
| 5581 |
% \begin{macro}{\@@_ch_output:nn} |
| 5582 |
% Print a chapter number in the main scripture environment. |
| 5583 |
% \begin{macrocode} |
| 5584 |
\cs_new_protected:Nn \@@_ch_output:nn |
| 5585 |
{ |
| 5586 |
\bool_if:NTF \l_@@_chap_show_bool |
| 5587 |
{ |
| 5588 |
\bool_if:NTF \l_@@_chap_drop_bool |
| 5589 |
{ |
| 5590 |
\@@_chap:n { #2 } |
| 5591 |
\bool_lazy_and:nnTF |
| 5592 |
{ #1 } |
| 5593 |
{ \bool_not_p:n { \l_@@_compact_bool } } |
| 5594 |
{ |
| 5595 |
\hook_gput_next_code:nn { para / after } |
| 5596 |
{ |
| 5597 |
\int_gzero:N \g_@@_chap_par_prevgraf_int |
| 5598 |
\int_gzero:N \g_@@_mid_para_chap_prevgraf_int |
| 5599 |
} |
| 5600 |
} |
| 5601 |
{ |
| 5602 |
\hook_gput_next_code:nn { para / after } |
| 5603 |
{ \int_gset_eq:NN \g_@@_mid_para_chap_prevgraf_int \prevgraf } |
| 5604 |
} |
| 5605 |
} |
| 5606 |
{ |
| 5607 |
\bool_if:NTF \l_@@_chap_para_bool |
| 5608 |
{ \@@_para_chap:n { #2 } } |
| 5609 |
{ \@@_nodrop_chap:n { #2 } } |
| 5610 |
} |
| 5611 |
} |
| 5612 |
{ |
| 5613 |
\bool_if:NTF \l_@@_chap_para_bool |
| 5614 |
{ \@@_para_chap:n { #2 } } |
| 5615 |
{ \@@_nodrop_chap:n { #2 } } |
| 5616 |
} |
| 5617 |
} |
| 5618 |
% \end{macrocode} |
| 5619 |
% \end{macro} |
| 5620 |
% |
| 5621 |
% \begin{macro}{\@@_begin:nn} |
| 5622 |
% Begin a scripture quotation. |
| 5623 |
% \begin{macrocode} |
| 5624 |
\cs_new_protected:Nn \@@_begin:nn |
| 5625 |
{ |
| 5626 |
\cs_set_eq:NN \@@_noindent_saved: \noindent |
| 5627 |
\bool_if:NT \l_@@_active_bool |
| 5628 |
{ |
| 5629 |
\msg_error:nn { scripture } { nested-environment } |
| 5630 |
} |
| 5631 |
\bool_set_true:N \l_@@_active_bool |
| 5632 |
\tl_if_novalue:nF { #1 } |
| 5633 |
{ \tl_set:Nn \l_@@_ref_tl { #1 } } |
| 5634 |
\str_set:Nn \l_@@_currenvir_str { scripture } |
| 5635 |
\bool_gset_false:N \g_@@_first_verse_set_bool |
| 5636 |
\int_gset:Nn \g_@@_chapter_int \c_one_int |
| 5637 |
\int_gset:Nn \g_@@_verse_int \c_one_int |
| 5638 |
\tl_gclear:N \g_@@_book_tl |
| 5639 |
\tl_if_novalue:nF { #2 } |
| 5640 |
{ |
| 5641 |
\keys_set:nn { scripture } { #2 } |
| 5642 |
} |
| 5643 |
\l_@@_before_tl |
| 5644 |
\@@_select_language: |
| 5645 |
\int_gzero:N \g_@@_chap_par_prevgraf_int |
| 5646 |
% \end{macrocode} |
| 5647 |
% Empty \cs{everydisplay} to ensure it isn't interring with spacing. |
| 5648 |
% \begin{macrocode} |
| 5649 |
\everydisplay { } |
| 5650 |
\int_set:Nn \predisplaypenalty { 10000 } |
| 5651 |
\int_set_eq:NN \postdisplaypenalty \@lowpenalty |
| 5652 |
\int_set:Nn \@beginparpenalty { -\@lowpenalty } |
| 5653 |
\int_set_eq:NN \@endparpenalty \@lowpenalty |
| 5654 |
\bool_gset_false:N \g_@@_poetry_end_bool |
| 5655 |
\cs_set_eq:NN \extraskip \@@_extra_skip: |
| 5656 |
\cs_set_eq:NN \redletteron \@@_red_letter_on: |
| 5657 |
\cs_set_eq:NN \redletteroff \@@_red_letter_off: |
| 5658 |
\cs_set:Npn \nopilcrow { \bool_gset_true:N \g_@@_suppress_next_pilcrow_bool } |
| 5659 |
\bool_gset_false:N \g_@@_suppress_next_pilcrow_bool |
| 5660 |
\bool_gset_false:N \g_@@_suppress_next_verse_para_bool |
| 5661 |
\bool_gset_false:N \g_@@_mode_vertical_inner_bool |
| 5662 |
\box_gclear:N \g_@@_post_env_indent_box |
| 5663 |
\skip_gzero:N \g_@@_prev_inner_below_skip |
| 5664 |
\bool_if:NT \l_@@_chap_para_bool |
| 5665 |
{ \bool_set_false:N \l_@@_chap_drop_bool } |
| 5666 |
\DeclareDocumentCommand { \ch } { s o m } |
| 5667 |
{ |
| 5668 |
\tl_if_novalue:nF { ##2 } |
| 5669 |
{ |
| 5670 |
\tl_set:Nn \l_@@_X_char_tl { ##2 } |
| 5671 |
} |
| 5672 |
\@@_ch_output:nn { ##1 } { ##3 } |
| 5673 |
} |
| 5674 |
\cs_set_eq:NN \vs \@@_verse_output:n |
| 5675 |
\DeclareDocumentCommand { \newch } { s o } |
| 5676 |
{ |
| 5677 |
\bool_if:NTF \g_@@_first_verse_set_bool |
| 5678 |
{ |
| 5679 |
\int_gincr:N \g_@@_chapter_int |
| 5680 |
\int_gset:Nn \g_@@_verse_int \c_one_int |
| 5681 |
} |
| 5682 |
{ \bool_gset_true:N \g_@@_first_verse_set_bool } |
| 5683 |
\bool_if:nTF { ##1 } |
| 5684 |
{ |
| 5685 |
\ch* [ ##2 ] { \int_use:N \g_@@_chapter_int } |
| 5686 |
} |
| 5687 |
{ |
| 5688 |
\ch [ ##2 ] { \int_use:N \g_@@_chapter_int } |
| 5689 |
} |
| 5690 |
} |
| 5691 |
\DeclareDocumentCommand { \newvs } { } |
| 5692 |
{ |
| 5693 |
\bool_if:NTF \g_@@_first_verse_set_bool |
| 5694 |
{ \int_gincr:N \g_@@_verse_int } |
| 5695 |
{ \bool_gset_true:N \g_@@_first_verse_set_bool } |
| 5696 |
\vs { \int_use:N \g_@@_verse_int } |
| 5697 |
} |
| 5698 |
\cs_set_eq:NN \added \@@_added:n |
| 5699 |
\cs_set_eq:NN \heading \@@_heading:n |
| 5700 |
\cs_set_eq:NN \name \@@_name:n |
| 5701 |
\cs_set_protected_nopar:Npn \LORD { \name { Lord } } |
| 5702 |
\cs_set_protected_nopar:Npn \GOD { \name { God } } |
| 5703 |
\cs_set_eq:NN \nofirstverse \@@_no_first_verse: |
| 5704 |
\cs_set_protected_nopar:Npn \textright ##1 |
| 5705 |
{ \@@_text_right:nn { \l_@@_text_right_sep_tl } { ##1 } } |
| 5706 |
\hook_gclear_next_code:n { para / before } |
| 5707 |
\hook_gclear_next_code:n { scripture / pilcow } |
| 5708 |
\hook_gclear_next_code:n { scripture / poetry / pilcow } |
| 5709 |
\hook_gput_code:nnn { cmd / @makefntext / before } { scripture } |
| 5710 |
{ \cs_set_eq:NN \noindent \tex_noindent:D } |
| 5711 |
\l_@@_font_tl |
| 5712 |
\tl_set:Ne \l_@@_parindent_tl { \dim_eval:n { \l_@@_parindent_tl } } |
| 5713 |
\exp_args:NnV \color_set:nn { scripture default colour } \l_@@_colour_tl |
| 5714 |
\str_if_eq:VnF \l_@@_colour_tl { . } |
| 5715 |
{ \color_select:n { scripture default colour } } |
| 5716 |
\bool_if:NTF \l_@@_inline_bool |
| 5717 |
{ \l_@@_inline_begin_tl } |
| 5718 |
{ |
| 5719 |
\legacy_if:nTF { @newlist } |
| 5720 |
{ \dim_set_eq:NN \l_@@_outer_itemindent_dim \itemindent } |
| 5721 |
{ \dim_zero:N \l_@@_outer_itemindent_dim } |
| 5722 |
\list { } |
| 5723 |
{ |
| 5724 |
\dim_set_eq:NN \leftmargin \l_@@_leftmargin_tl |
| 5725 |
\dim_set_eq:NN \rightmargin \l_@@_rightmargin_tl |
| 5726 |
\dim_set:Nn \itemindent { \l_@@_parindent_tl - \l_@@_outer_itemindent_dim } |
| 5727 |
\dim_set_eq:NN \listparindent \l_@@_parindent_tl |
| 5728 |
\skip_zero:N \partopsep |
| 5729 |
\skip_set_eq:NN \parsep \l_@@_parskip_tl |
| 5730 |
\dim_compare:nNnTF \parskip > \l_@@_aboveskip_tl |
| 5731 |
{ \skip_zero:N \topsep } |
| 5732 |
{ \skip_set:Nn \topsep { \@@_skip_diff:NN \l_@@_aboveskip_tl \parskip } } |
| 5733 |
\@@_setup_list_noindent:n { \l_@@_parindent_tl } |
| 5734 |
\bool_if:NF \l_@@_indent_bool |
| 5735 |
{ |
| 5736 |
\hook_gput_next_code:nn { para / begin } |
| 5737 |
{ |
| 5738 |
\bool_if:NTF \l_@@_compact_bool |
| 5739 |
{ \para_omit_indent: } |
| 5740 |
{ |
| 5741 |
\bool_lazy_any:nT |
| 5742 |
{ |
| 5743 |
{ \str_if_eq_p:Vn \l_@@_currenvir_str { midparachap } } |
| 5744 |
{ \str_if_eq_p:Vn \l_@@_currenvir_str { narrow } } |
| 5745 |
{ \str_if_eq_p:Vn \l_@@_currenvir_str { scripture } } |
| 5746 |
} |
| 5747 |
{ |
| 5748 |
\legacy_if:nTF { @noparlist } |
| 5749 |
{ |
| 5750 |
\bool_lazy_and:nnF |
| 5751 |
{ \str_if_eq_p:Vn \l_@@_currenvir_str { narrow } } |
| 5752 |
{ \str_if_eq_p:Vn \l_@@_ref_position_tl { start } } |
| 5753 |
{ \noindent } |
| 5754 |
} |
| 5755 |
{ \para_omit_indent: } |
| 5756 |
} |
| 5757 |
} |
| 5758 |
} |
| 5759 |
} |
| 5760 |
} |
| 5761 |
\cs_set_eq:NN \@@_list_para_end: \@par |
| 5762 |
\item |
| 5763 |
\relax |
| 5764 |
} |
| 5765 |
} |
| 5766 |
% \end{macrocode} |
| 5767 |
% \end{macro} |
| 5768 |
% |
| 5769 |
% \begin{macro}{\@@_end:} |
| 5770 |
% End a scripture quotation with a reference. |
| 5771 |
% \begin{macrocode} |
| 5772 |
\cs_new_protected:Nn \@@_end: |
| 5773 |
{ |
| 5774 |
\tl_if_eq:NnT \l_@@_ref_position_tl { start } |
| 5775 |
{ |
| 5776 |
\tl_clear:N \l_@@_ref_tl |
| 5777 |
\tl_if_eq:NnT \l_@@_version_position_tl { withref } |
| 5778 |
{ \tl_clear:N \l_@@_version_tl } |
| 5779 |
} |
| 5780 |
\cs_set_eq:NN \noindent \tex_noindent:D |
| 5781 |
\bool_if:NTF \l_@@_inline_bool |
| 5782 |
{ |
| 5783 |
\unskip |
| 5784 |
\@@_red_letter_off: |
| 5785 |
\l_@@_inline_end_tl |
| 5786 |
\bool_lazy_or:nnTF |
| 5787 |
{ \tl_if_novalue_p:n \l_@@_ref_tl } |
| 5788 |
{ \tl_if_empty_p:N \l_@@_ref_tl } |
| 5789 |
{ |
| 5790 |
\tl_if_empty:NF \l_@@_version_tl |
| 5791 |
{ |
| 5792 |
\skip_horizontal:N \l_@@_ref_sep_tl |
| 5793 |
\@@_format_full_ref:nn { } \l_@@_version_tl |
| 5794 |
} |
| 5795 |
} |
| 5796 |
{ |
| 5797 |
\skip_horizontal:N \l_@@_ref_sep_tl |
| 5798 |
\@@_format_full_ref:nn \l_@@_ref_tl \l_@@_version_tl |
| 5799 |
} |
| 5800 |
} |
| 5801 |
{ |
| 5802 |
\@@_red_letter_off: |
| 5803 |
\skip_zero:N \parskip |
| 5804 |
\int_set:Nn \postdisplaypenalty { 10000 } |
| 5805 |
\@@_calc_final_line_length: |
| 5806 |
\dim_gsub:Nn \g_@@_final_line_dim \@totalleftmargin |
| 5807 |
\dim_compare:nNnTF \@outerparskip > \l_@@_belowskip_tl |
| 5808 |
{ \skip_zero:N \@topsepadd } |
| 5809 |
{ \skip_set:Nn \@topsepadd { \@@_skip_diff:NN \l_@@_belowskip_tl \@outerparskip } } |
| 5810 |
% \end{macrocode} |
| 5811 |
% If a \env{scripture} quotation ends with an inner environment, remove the |
| 5812 |
% below skip of the inner environment. Also correct for \cs{textdir} quirk. |
| 5813 |
% \begin{macrocode} |
| 5814 |
\int_compare:nNnT \prevgraf = \c_zero_int |
| 5815 |
{ |
| 5816 |
\bool_if:NT \l_@@_textdir_change_in_group_bool |
| 5817 |
{ \skip_vertical:n { -\baselineskip } } |
| 5818 |
\skip_vertical:n { -\g_@@_prev_inner_below_skip } |
| 5819 |
} |
| 5820 |
\hook_gclear_next_code:n { para / before } |
| 5821 |
\hook_gclear_next_code:n { para / after } |
| 5822 |
\noindent |
| 5823 |
\bool_lazy_or:nnTF |
| 5824 |
{ \tl_if_novalue_p:n \l_@@_ref_tl } |
| 5825 |
{ \tl_if_empty_p:N \l_@@_ref_tl } |
| 5826 |
{ |
| 5827 |
\tl_if_empty:NTF \l_@@_version_tl |
| 5828 |
{ \hbox:n { } } |
| 5829 |
{ \@@_reference:n { } } |
| 5830 |
} |
| 5831 |
{ \@@_reference:n \l_@@_ref_tl } |
| 5832 |
\parshape 1 ~ \@totalleftmargin ~ \linewidth |
| 5833 |
% \end{macrocode} |
| 5834 |
% Set \val{@noparlist} to \val{false} to ensure \cs{topsep} is always added |
| 5835 |
% \env{scripture} environment |
| 5836 |
% \begin{macrocode} |
| 5837 |
\legacy_if_set_false:n { @noparlist } |
| 5838 |
\endlist |
| 5839 |
} |
| 5840 |
\hook_gremove_code:nn { cmd / @makefntext / before } { scripture } |
| 5841 |
\cs_set_eq:NN \noindent \@@_noindent_saved: |
| 5842 |
\l_@@_after_tl |
| 5843 |
} |
| 5844 |
% \end{macrocode} |
| 5845 |
% \end{macro} |
| 5846 |
% |
| 5847 |
% \subsection{Scripture internal environments} |
| 5848 |
% |
| 5849 |
% \begin{macro}{\@@_compact_end_inner:} |
| 5850 |
% End a compact inner environment |
| 5851 |
% \begin{macrocode} |
| 5852 |
\cs_new_protected:Nn \@@_compact_end_inner: |
| 5853 |
{ |
| 5854 |
\hook_gclear_next_code:n { para / before } |
| 5855 |
\hook_gclear_next_code:n { para / begin } |
| 5856 |
\bool_gset_false:N \g_@@_mode_vertical_inner_bool |
| 5857 |
\str_if_eq:VnT \l_@@_ref_position_tl { start } |
| 5858 |
{ |
| 5859 |
\tl_gclear:N \l_@@_ref_tl |
| 5860 |
} |
| 5861 |
\bool_lazy_and:nnT \l_@@_verse_para_bool \l_@@_chap_drop_bool |
| 5862 |
{ |
| 5863 |
\cs_set_eq:NN \par \para_end: |
| 5864 |
\@@_calc_final_line_length: |
| 5865 |
\int_gset_eq:NN \g_@@_mid_para_chap_prevgraf_int \g_@@_chap_par_prevgraf_int |
| 5866 |
\tex_noindent:D |
| 5867 |
\bool_lazy_and:nnTF |
| 5868 |
{ \bool_if_p:N \l_@@_compact_bool } |
| 5869 |
{ \int_compare_p:nNn \g_@@_mid_para_chap_prevgraf_int = 1 } |
| 5870 |
{ |
| 5871 |
\hook_gput_next_code:nn { env / \l_@@_currenvir_str / after } |
| 5872 |
{ |
| 5873 |
\parshape 3 ~ |
| 5874 |
\@totalleftmargin ~ \linewidth ~ |
| 5875 |
\dim_eval:n |
| 5876 |
{ \@totalleftmargin + \g_@@_chap_width_dim + \l_@@_chap_sep_tl } ~ |
| 5877 |
\dim_eval:n |
| 5878 |
{ \linewidth - \g_@@_chap_width_dim - \l_@@_chap_sep_tl } ~ |
| 5879 |
\@totalleftmargin ~ \linewidth |
| 5880 |
} |
| 5881 |
\hbox_to_wd:nn { \g_@@_final_line_dim - \g_@@_chap_width_dim - \l_@@_chap_sep_tl } { } |
| 5882 |
} |
| 5883 |
{ |
| 5884 |
\hbox_to_wd:nn \g_@@_final_line_dim { } |
| 5885 |
} |
| 5886 |
\c_space_token |
| 5887 |
\kern 0pt |
| 5888 |
\cs_set_eq:NN \par \relax |
| 5889 |
\int_gset:Nn \g_@@_current_group_level_a_int { \currentgrouplevel - 1 } |
| 5890 |
\@@_reset_par_at_group_level: |
| 5891 |
} |
| 5892 |
\unskip |
| 5893 |
} |
| 5894 |
% \end{macrocode} |
| 5895 |
% \end{macro} |
| 5896 |
% |
| 5897 |
% |
| 5898 |
% |
| 5899 |
% \subsubsection{The \env{center} environment} |
| 5900 |
% |
| 5901 |
% \begin{macro}{\@@_center_begin:n} |
| 5902 |
% Begin a centred section in a scripture quotation. |
| 5903 |
% \begin{macrocode} |
| 5904 |
\cs_new_protected:Nn \@@_center_begin:n |
| 5905 |
{ |
| 5906 |
\bool_if:NT \l_@@_active_inner_bool |
| 5907 |
{ |
| 5908 |
\msg_error:nn { scripture } { nested-environment } |
| 5909 |
} |
| 5910 |
\bool_set_true:N \l_@@_active_inner_bool |
| 5911 |
\str_set:Nn \l_@@_currenvir_str { center } |
| 5912 |
\tl_if_novalue:nF { #1 } |
| 5913 |
{ |
| 5914 |
\keys_set:nn |
| 5915 |
{ scripture / center } |
| 5916 |
{ #1 } |
| 5917 |
} |
| 5918 |
\legacy_if:nTF { @newlist } |
| 5919 |
{ \dim_add:Nn \l_@@_outer_itemindent_dim \itemindent } |
| 5920 |
{ \dim_zero:N \l_@@_outer_itemindent_dim } |
| 5921 |
\cs_set_eq:NN \par \para_end: |
| 5922 |
\int_gset_eq:NN \g_@@_current_group_level_b_int \currentgrouplevel |
| 5923 |
\list { } |
| 5924 |
{ |
| 5925 |
\bool_lazy_or:nnF |
| 5926 |
{ \mode_if_vertical_p: } |
| 5927 |
{ \g_@@_para_mode_vertical_bool } |
| 5928 |
{ \bool_gset_true:N \g_@@_suppress_next_pilcrow_bool } |
| 5929 |
\dim_zero:N \labelsep |
| 5930 |
\dim_set_eq:NN \leftmargin \l_@@_center_leftmargin_tl |
| 5931 |
\dim_set_eq:NN \rightmargin \l_@@_center_rightmargin_tl |
| 5932 |
\dim_set:Nn \itemindent { -\l_@@_outer_itemindent_dim } |
| 5933 |
\dim_zero:N \listparindent |
| 5934 |
\skip_set_eq:NN \parsep \parskip |
| 5935 |
\skip_zero:N \partopsep |
| 5936 |
\dim_compare:nNnTF \parskip > \l_@@_center_aboveskip_tl |
| 5937 |
{ \skip_zero:N \topsep } |
| 5938 |
{ \skip_set:Nn \topsep { \@@_skip_diff:NN \l_@@_center_aboveskip_tl \parskip } } |
| 5939 |
\@@_setup_list_noindent:n { \c_zero_dim } |
| 5940 |
} |
| 5941 |
\int_compare:nNnT \g_@@_chap_par_prevgraf_int = 1 |
| 5942 |
{ \addvspace { \baselineskip } } |
| 5943 |
\int_gzero:N \g_@@_chap_par_prevgraf_int |
| 5944 |
\centering |
| 5945 |
\bool_if:NT \l_@@_verse_para_bool |
| 5946 |
{ |
| 5947 |
\cs_set_eq:NN \par \@@_para_par: |
| 5948 |
\cs_set_protected:Npn \\ |
| 5949 |
{ |
| 5950 |
\mode_if_horizontal:TF |
| 5951 |
{ \unskip } |
| 5952 |
{ \@nolnerr } |
| 5953 |
} |
| 5954 |
} |
| 5955 |
\item |
| 5956 |
\relax |
| 5957 |
} |
| 5958 |
% \end{macrocode} |
| 5959 |
% \end{macro} |
| 5960 |
% |
| 5961 |
% \begin{macro}{\@@_center_end:} |
| 5962 |
% End a centred section in a scripture quotation. |
| 5963 |
% \begin{macrocode} |
| 5964 |
\cs_new_protected:Nn \@@_center_end: |
| 5965 |
{ |
| 5966 |
\cs_set_eq:NN \par \para_end: |
| 5967 |
\dim_gset:Nn \g_@@_final_line_dim { \@totalleftmargin + \linewidth } |
| 5968 |
\dim_compare:nNnTF \@outerparskip > \l_@@_center_belowskip_tl |
| 5969 |
{ \skip_zero:N \@topsepadd } |
| 5970 |
{ \skip_set:Nn \@topsepadd { \@@_skip_diff:NN \l_@@_center_belowskip_tl \@outerparskip } } |
| 5971 |
\skip_gset_eq:NN \g_@@_prev_inner_below_skip \@topsepadd |
| 5972 |
\legacy_if_set_false:n { @noparlist } |
| 5973 |
\endlist |
| 5974 |
\bool_gset_true:N \g_@@_suppress_next_pilcrow_bool |
| 5975 |
\hook_gput_next_code:nn { para / begin } |
| 5976 |
{ \parshape 1 ~ \@totalleftmargin ~ \linewidth } |
| 5977 |
} |
| 5978 |
% \end{macrocode} |
| 5979 |
% \end{macro} |
| 5980 |
% |
| 5981 |
% \subsubsection{The \env{flushright} environment} |
| 5982 |
% |
| 5983 |
% \begin{macro}{\@@_flushright_begin:n} |
| 5984 |
% Begin a flushright section in a scripture quotation. |
| 5985 |
% \begin{macrocode} |
| 5986 |
\cs_new_protected:Nn \@@_flushright_begin:n |
| 5987 |
{ |
| 5988 |
\bool_if:NT \l_@@_active_inner_bool |
| 5989 |
{ |
| 5990 |
\msg_error:nn { scripture } { nested-environment } |
| 5991 |
} |
| 5992 |
\bool_set_true:N \l_@@_active_inner_bool |
| 5993 |
\str_set:Nn \l_@@_currenvir_str { flushright } |
| 5994 |
\tl_if_novalue:nF { #1 } |
| 5995 |
{ |
| 5996 |
\keys_set:nn |
| 5997 |
{ scripture / flushright } |
| 5998 |
{ #1 } |
| 5999 |
} |
| 6000 |
\legacy_if:nTF { @newlist } |
| 6001 |
{ \dim_add:Nn \l_@@_outer_itemindent_dim \itemindent } |
| 6002 |
{ \dim_zero:N \l_@@_outer_itemindent_dim } |
| 6003 |
\cs_set_eq:NN \par \para_end: |
| 6004 |
\int_gset_eq:NN \g_@@_current_group_level_b_int \currentgrouplevel |
| 6005 |
\list { } |
| 6006 |
{ |
| 6007 |
\bool_lazy_or:nnF |
| 6008 |
{ \mode_if_vertical_p: } |
| 6009 |
{ \g_@@_para_mode_vertical_bool } |
| 6010 |
{ \bool_gset_true:N \g_@@_suppress_next_pilcrow_bool } |
| 6011 |
\dim_zero:N \labelsep |
| 6012 |
\dim_set_eq:NN \leftmargin \l_@@_flushright_leftmargin_tl |
| 6013 |
\dim_set_eq:NN \rightmargin \l_@@_flushright_rightmargin_tl |
| 6014 |
\dim_set:Nn \itemindent { -\l_@@_outer_itemindent_dim } |
| 6015 |
\dim_zero:N \listparindent |
| 6016 |
\skip_set_eq:NN \parsep \parskip |
| 6017 |
\skip_zero:N \partopsep |
| 6018 |
\dim_compare:nNnTF \parskip > \l_@@_flushright_aboveskip_tl |
| 6019 |
{ \skip_zero:N \topsep } |
| 6020 |
{ \skip_set:Nn \topsep { \@@_skip_diff:NN \l_@@_flushright_aboveskip_tl \parskip } } |
| 6021 |
\@@_setup_list_noindent:n { \c_zero_dim } |
| 6022 |
} |
| 6023 |
\int_compare:nNnT \g_@@_chap_par_prevgraf_int = 1 |
| 6024 |
{ \addvspace { \baselineskip } } |
| 6025 |
\int_gzero:N \g_@@_chap_par_prevgraf_int |
| 6026 |
\raggedleft |
| 6027 |
\bool_if:NT \l_@@_verse_para_bool |
| 6028 |
{ |
| 6029 |
\cs_set_eq:NN \par \@@_para_par: |
| 6030 |
\cs_set_protected:Npn \\ |
| 6031 |
{ |
| 6032 |
\mode_if_horizontal:TF |
| 6033 |
{ \unskip } |
| 6034 |
{ \@nolnerr } |
| 6035 |
} |
| 6036 |
} |
| 6037 |
\item |
| 6038 |
\relax |
| 6039 |
} |
| 6040 |
% \end{macrocode} |
| 6041 |
% \end{macro} |
| 6042 |
% |
| 6043 |
% \begin{macro}{\@@_flushright_end:} |
| 6044 |
% End a flushright section in a scripture quotation. |
| 6045 |
% \begin{macrocode} |
| 6046 |
\cs_new_protected:Nn \@@_flushright_end: |
| 6047 |
{ |
| 6048 |
\cs_set_eq:NN \par \para_end: |
| 6049 |
\dim_gset:Nn \g_@@_final_line_dim { \@totalleftmargin + \linewidth } |
| 6050 |
\dim_compare:nNnTF \@outerparskip > \l_@@_flushright_belowskip_tl |
| 6051 |
{ \skip_zero:N \@topsepadd } |
| 6052 |
{ \skip_set:Nn \@topsepadd { \@@_skip_diff:NN \l_@@_flushright_belowskip_tl \@outerparskip } } |
| 6053 |
\skip_gset_eq:NN \g_@@_prev_inner_below_skip \@topsepadd |
| 6054 |
\legacy_if_set_false:n { @noparlist } |
| 6055 |
\endlist |
| 6056 |
\bool_gset_true:N \g_@@_suppress_next_pilcrow_bool |
| 6057 |
\hook_gput_next_code:nn { para / begin } |
| 6058 |
{ \parshape 1 ~ \@totalleftmargin ~ \linewidth } |
| 6059 |
} |
| 6060 |
% \end{macrocode} |
| 6061 |
% \end{macro} |
| 6062 |
% |
| 6063 |
% \subsubsection{The \env{hanging} environment} |
| 6064 |
% |
| 6065 |
% \begin{macro}{\l_@@_hanging_parindent_saved_dim} |
| 6066 |
% Save the \cs{parindent} for later use in \env{hanging} environment. |
| 6067 |
% \begin{macrocode} |
| 6068 |
\dim_new:N \l_@@_hanging_parindent_saved_dim |
| 6069 |
% \end{macrocode} |
| 6070 |
% \end{macro} |
| 6071 |
% |
| 6072 |
% \begin{macro}{\l_@@_hanging_chap_sep_dim} |
| 6073 |
% Calculated chapter separation used in the \env{hanging} environment. |
| 6074 |
% \begin{macrocode} |
| 6075 |
\dim_new:N \l_@@_hanging_chap_sep_dim |
| 6076 |
% \end{macrocode} |
| 6077 |
% \end{macro} |
| 6078 |
% |
| 6079 |
% \begin{macro}{\@@_hanging_ch:n} |
| 6080 |
% Position a chapter in a \env{hanging} environment. |
| 6081 |
% \begin{macrocode} |
| 6082 |
\cs_new_protected:Nn \@@_hanging_ch:n |
| 6083 |
{ |
| 6084 |
\bool_gset_false:N \g_@@_suppress_next_pilcrow_bool |
| 6085 |
\bool_if:NTF \l_@@_chap_show_bool |
| 6086 |
{ |
| 6087 |
\bool_if:NTF \l_@@_chap_drop_bool |
| 6088 |
{ \@@_hanging_chap:n { #1 } } |
| 6089 |
{ |
| 6090 |
\bool_if:NTF \l_@@_chap_para_bool |
| 6091 |
{ \@@_para_chap:n { #1 } } |
| 6092 |
{ \@@_nodrop_chap:n { #1 } } |
| 6093 |
} |
| 6094 |
} |
| 6095 |
{ |
| 6096 |
\bool_if:NTF \l_@@_chap_para_bool |
| 6097 |
{ \@@_para_chap:n { #1 } } |
| 6098 |
{ \@@_nodrop_chap:n { #1 } } |
| 6099 |
} |
| 6100 |
} |
| 6101 |
% \end{macrocode} |
| 6102 |
% \end{macro} |
| 6103 |
% |
| 6104 |
% \begin{macro}{\@@_hanging_chap:n} |
| 6105 |
% Position a drop chapter in a \env{hanging} environment. |
| 6106 |
% \begin{macrocode} |
| 6107 |
\cs_new_protected:Nn \@@_hanging_chap:n |
| 6108 |
{ |
| 6109 |
\dim_set_eq:NN \l_@@_hanging_chap_sep_dim \l_@@_chap_sep_tl |
| 6110 |
\@@_drop_chap_set_up:n { #1 } |
| 6111 |
\dim_compare:nNnTF |
| 6112 |
{ \g_@@_chap_width_dim + \l_@@_hanging_chap_sep_dim } < \leftmargin |
| 6113 |
{ |
| 6114 |
\bool_if:NT \l_@@_hanging_chapter_indent_bool |
| 6115 |
{ |
| 6116 |
\dim_set:Nn \l_@@_hanging_chap_sep_dim |
| 6117 |
{ \leftmargin - \g_@@_chap_width_dim } |
| 6118 |
} |
| 6119 |
} |
| 6120 |
{ |
| 6121 |
\parshape 3 ~ |
| 6122 |
\dim_eval:n |
| 6123 |
{ |
| 6124 |
\@totalleftmargin - \leftmargin + \g_@@_chap_width_dim + |
| 6125 |
\l_@@_hanging_chap_sep_dim |
| 6126 |
} ~ |
| 6127 |
\dim_eval:n |
| 6128 |
{ |
| 6129 |
\linewidth + \leftmargin - \g_@@_chap_width_dim - |
| 6130 |
\l_@@_hanging_chap_sep_dim |
| 6131 |
} ~ |
| 6132 |
\dim_eval:n |
| 6133 |
{ |
| 6134 |
\@totalleftmargin - \leftmargin + \g_@@_chap_width_dim + |
| 6135 |
\l_@@_hanging_chap_sep_dim |
| 6136 |
} ~ |
| 6137 |
\dim_eval:n |
| 6138 |
{ |
| 6139 |
\linewidth + \leftmargin - \g_@@_chap_width_dim - |
| 6140 |
\l_@@_hanging_chap_sep_dim |
| 6141 |
} ~ |
| 6142 |
\@totalleftmargin ~ \linewidth |
| 6143 |
} |
| 6144 |
\par |
| 6145 |
\bool_if:NTF \l_@@_hanging_chapter_indent_bool |
| 6146 |
{ |
| 6147 |
\dim_set:Nn \l_@@_hanging_chap_sep_dim |
| 6148 |
{ \l_@@_hanging_chap_sep_dim + \l_@@_hanging_parindent_saved_dim } |
| 6149 |
\@@_nohang: |
| 6150 |
} |
| 6151 |
{ |
| 6152 |
\mode_leave_vertical: |
| 6153 |
\dim_compare:nNnTF |
| 6154 |
{ \g_@@_chap_width_dim + \l_@@_hanging_chap_sep_dim } > \l_@@_hanging_leftmargin_tl |
| 6155 |
{ |
| 6156 |
\dim_compare:nNnTF |
| 6157 |
{ \g_@@_chap_width_dim + \l_@@_hanging_chap_sep_dim } > \leftmargin |
| 6158 |
{ |
| 6159 |
\skip_horizontal:n { \l_@@_hanging_hang_tl } |
| 6160 |
} |
| 6161 |
{ |
| 6162 |
\skip_horizontal:n |
| 6163 |
{ |
| 6164 |
\l_@@_hanging_chap_sep_dim + |
| 6165 |
\g_@@_chap_width_dim - |
| 6166 |
\l_@@_hanging_leftmargin_tl |
| 6167 |
} |
| 6168 |
} |
| 6169 |
} |
| 6170 |
{ |
| 6171 |
\dim_set:Nn \l_@@_hanging_chap_sep_dim |
| 6172 |
{ \l_@@_hanging_leftmargin_tl - \g_@@_chap_width_dim } |
| 6173 |
} |
| 6174 |
} |
| 6175 |
\hbox_set:Nn \l_@@_chap_box |
| 6176 |
{ |
| 6177 |
\box_move_down:nn |
| 6178 |
{ \baselineskip } |
| 6179 |
{ |
| 6180 |
\hbox_overlap_left:n |
| 6181 |
{ |
| 6182 |
\box_use:N \l_@@_chap_tmp_box |
| 6183 |
\skip_horizontal:N \l_@@_hanging_chap_sep_dim |
| 6184 |
} |
| 6185 |
} |
| 6186 |
} |
| 6187 |
\box_set_ht:Nn \l_@@_chap_box { \c_zero_dim } |
| 6188 |
\box_set_dp:Nn \l_@@_chap_box { \c_zero_dim } |
| 6189 |
\group_begin: |
| 6190 |
\hook_use:n { scripture / chap / before } |
| 6191 |
\box_use:N \l_@@_chap_box |
| 6192 |
\hook_use:n { scripture / chap / after } |
| 6193 |
\group_end: |
| 6194 |
\bool_if:NT \l_@@_chap_show_verse_bool |
| 6195 |
{ |
| 6196 |
\@@_verse_output:n { 1 } |
| 6197 |
} |
| 6198 |
\@@_pilcrow_output: |
| 6199 |
\bool_if:NT \l_@@_verse_para_bool |
| 6200 |
{ |
| 6201 |
\hook_gput_next_code:nn { para / after } |
| 6202 |
{ |
| 6203 |
\int_gset_eq:NN \g_@@_chap_par_prevgraf_int \prevgraf |
| 6204 |
\int_compare:nNnT \g_@@_chap_par_prevgraf_int = 1 |
| 6205 |
{ \penalty 10000 } |
| 6206 |
\hook_gput_next_code:nn { para / before } |
| 6207 |
{ |
| 6208 |
\int_set_eq:NN \clubpenalty \l_@@_clubpenalty_saved_int |
| 6209 |
} |
| 6210 |
} |
| 6211 |
} |
| 6212 |
\hook_gput_next_code:nn { para / begin } |
| 6213 |
{ |
| 6214 |
\int_compare:nNnTF \g_@@_chap_par_prevgraf_int = \c_one_int |
| 6215 |
{ |
| 6216 |
\dim_compare:nNnTF |
| 6217 |
{ \l_@@_hanging_leftmargin_tl } < |
| 6218 |
{ \g_@@_chap_width_dim + \l_@@_hanging_chap_sep_dim } |
| 6219 |
{ |
| 6220 |
\parshape 2 ~ |
| 6221 |
\dim_eval:n |
| 6222 |
{ |
| 6223 |
\@totalleftmargin - \leftmargin + \g_@@_chap_width_dim + |
| 6224 |
\l_@@_hanging_chap_sep_dim |
| 6225 |
} ~ |
| 6226 |
\dim_eval:n |
| 6227 |
{ |
| 6228 |
\linewidth + \leftmargin - \g_@@_chap_width_dim - |
| 6229 |
\l_@@_hanging_chap_sep_dim |
| 6230 |
} ~ |
| 6231 |
\@totalleftmargin ~ \linewidth |
| 6232 |
} |
| 6233 |
{ \parshape 1 ~ \@totalleftmargin ~ \linewidth } |
| 6234 |
\hook_gput_next_code:nn { para / begin } |
| 6235 |
{ \parshape 1 ~ \@totalleftmargin ~ \linewidth } |
| 6236 |
} |
| 6237 |
{ \parshape 1 ~ \@totalleftmargin ~ \linewidth } |
| 6238 |
\int_gzero:N \g_@@_chap_par_prevgraf_int |
| 6239 |
} |
| 6240 |
} |
| 6241 |
% \end{macrocode} |
| 6242 |
% \end{macro} |
| 6243 |
% |
| 6244 |
% \begin{macro}{\@@_hanging_verse:n} |
| 6245 |
% Position a \fn{vs} in a \env{hanging} environment. The verse is set to |
| 6246 |
% overlap to the left if at the beginning of a hanging paragraph. |
| 6247 |
% \begin{macrocode} |
| 6248 |
\cs_new_protected:Nn \@@_hanging_verse:n |
| 6249 |
{ |
| 6250 |
\mode_if_vertical:TF |
| 6251 |
{ |
| 6252 |
\tl_set_eq:NN \l_tmpa_tl \l_@@_verse_sep_tl |
| 6253 |
\tl_set_eq:NN \l_@@_verse_sep_tl \l_@@_hanging_verse_sep_tl |
| 6254 |
\bool_lazy_and:nnTF |
| 6255 |
{ \legacy_if_p:n { @newlist } } |
| 6256 |
{ \g_@@_suppress_next_pilcrow_bool } |
| 6257 |
{ |
| 6258 |
\strut |
| 6259 |
\bool_if:NTF \l_@@_hanging_verse_right_bool |
| 6260 |
{ |
| 6261 |
\hbox_overlap_left:n |
| 6262 |
{ |
| 6263 |
\@@_verse_output:n { #1 } |
| 6264 |
} |
| 6265 |
} |
| 6266 |
{ |
| 6267 |
\hbox_overlap_left:n |
| 6268 |
{ |
| 6269 |
\hbox_overlap_right:n |
| 6270 |
{ |
| 6271 |
\@@_verse_output:n { #1 } |
| 6272 |
} |
| 6273 |
\skip_horizontal:N \l_@@_hanging_leftmargin_tl |
| 6274 |
} |
| 6275 |
} |
| 6276 |
} |
| 6277 |
{ |
| 6278 |
\bool_gset_true:N \g_@@_suppress_next_pilcrow_bool |
| 6279 |
\strut |
| 6280 |
\bool_if:NTF \l_@@_hanging_verse_right_bool |
| 6281 |
{ |
| 6282 |
\hbox_overlap_left:n |
| 6283 |
{ |
| 6284 |
\@@_verse_output:n { #1 } |
| 6285 |
} |
| 6286 |
} |
| 6287 |
{ |
| 6288 |
\hbox_overlap_left:n |
| 6289 |
{ |
| 6290 |
\hbox_overlap_right:n |
| 6291 |
{ |
| 6292 |
\@@_verse_output:n { #1 } |
| 6293 |
} |
| 6294 |
\skip_horizontal:N \l_@@_hanging_leftmargin_tl |
| 6295 |
} |
| 6296 |
} |
| 6297 |
\@@_pilcrow_output: |
| 6298 |
} |
| 6299 |
\tl_set_eq:NN \l_@@_verse_sep_tl \l_tmpa_tl |
| 6300 |
} |
| 6301 |
{ \@@_verse_output:n { #1 } } |
| 6302 |
} |
| 6303 |
% \end{macrocode} |
| 6304 |
% \end{macro} |
| 6305 |
% |
| 6306 |
% \begin{macro}{\@@_nohang:} |
| 6307 |
% Don't hang a paragraph in a \env{hanging} environment. Instead the |
| 6308 |
% paragraph is indented by \cs{parindent} from its normal hanging position. |
| 6309 |
% \begin{macrocode} |
| 6310 |
\cs_new_protected_nopar:Nn \@@_nohang: |
| 6311 |
{ |
| 6312 |
\legacy_if:nTF {@newlist} |
| 6313 |
{ \skip_horizontal:n { \l_@@_hanging_hang_tl } } |
| 6314 |
{ \tex_noindent:D } |
| 6315 |
\hbox_to_wd:nn { \l_@@_hanging_parindent_saved_dim } { } |
| 6316 |
\peek_analysis_map_inline:n |
| 6317 |
{ |
| 6318 |
\bool_lazy_or:nnT |
| 6319 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \vs } |
| 6320 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \newvs } |
| 6321 |
{ |
| 6322 |
\bool_gset_true:N \g_@@_suppress_next_verse_para_bool |
| 6323 |
\@@_set_pilcrow_hook: |
| 6324 |
} |
| 6325 |
\peek_analysis_map_break:n { ##1 } |
| 6326 |
} |
| 6327 |
} |
| 6328 |
% \end{macrocode} |
| 6329 |
% \end{macro} |
| 6330 |
% |
| 6331 |
% \begin{macro}{\@@_hanging_begin:n} |
| 6332 |
% Begin a hanging section in a scripture quotation. |
| 6333 |
% \begin{macrocode} |
| 6334 |
\cs_new_protected:Nn \@@_hanging_begin:n |
| 6335 |
{ |
| 6336 |
\bool_if:NT \l_@@_active_inner_bool |
| 6337 |
{ |
| 6338 |
\msg_error:nn { scripture } { nested-environment } |
| 6339 |
} |
| 6340 |
\bool_set_true:N \l_@@_active_inner_bool |
| 6341 |
\str_set:Nn \l_@@_currenvir_str { hanging } |
| 6342 |
\tl_if_novalue:nF { #1 } |
| 6343 |
{ |
| 6344 |
\keys_set:nn |
| 6345 |
{ scripture / hanging } |
| 6346 |
{ #1 } |
| 6347 |
} |
| 6348 |
\DeclareDocumentCommand { \ch } { s o m } |
| 6349 |
{ |
| 6350 |
\tl_if_novalue:nF { ##2 } |
| 6351 |
{ |
| 6352 |
\tl_set:Nn \l_@@_X_char_tl { ##2 } |
| 6353 |
} |
| 6354 |
\@@_hanging_ch:n { ##3 } |
| 6355 |
} |
| 6356 |
\bool_if:NTF \l_@@_verse_para_bool |
| 6357 |
{ \cs_set_eq:NN \vs \@@_hanging_verse_para:n } |
| 6358 |
{ \cs_set_eq:NN \vs \@@_hanging_verse:n } |
| 6359 |
\cs_set_eq:NN \nohang \@@_nohang: |
| 6360 |
\dim_set_eq:NN \l_@@_hanging_parindent_saved_dim \parindent |
| 6361 |
\legacy_if:nTF { @newlist } |
| 6362 |
{ \dim_add:Nn \l_@@_outer_itemindent_dim \itemindent } |
| 6363 |
{ \dim_zero:N \l_@@_outer_itemindent_dim } |
| 6364 |
\cs_set_eq:NN \par \para_end: |
| 6365 |
\hook_gclear_next_code:n { para / before } |
| 6366 |
\int_gset_eq:NN \g_@@_current_group_level_b_int \currentgrouplevel |
| 6367 |
\list { } |
| 6368 |
{ |
| 6369 |
\bool_lazy_or:nnF |
| 6370 |
{ \mode_if_vertical_p: } |
| 6371 |
{ \g_@@_para_mode_vertical_bool } |
| 6372 |
{ \bool_gset_true:N \g_@@_suppress_next_pilcrow_bool } |
| 6373 |
\dim_zero:N \labelsep |
| 6374 |
\dim_set:Nn \leftmargin { \l_@@_hanging_leftmargin_tl + \l_@@_hanging_hang_tl } |
| 6375 |
\dim_set_eq:NN \rightmargin \l_@@_hanging_rightmargin_tl |
| 6376 |
\dim_set:Nn \itemindent { -\l_@@_hanging_hang_tl - \l_@@_outer_itemindent_dim } |
| 6377 |
\dim_set:Nn \listparindent { -\l_@@_hanging_hang_tl } |
| 6378 |
\skip_set_eq:NN \parsep \parskip |
| 6379 |
\skip_zero:N \partopsep |
| 6380 |
\dim_compare:nNnTF \parskip > \l_@@_hanging_aboveskip_tl |
| 6381 |
{ \skip_zero:N \topsep } |
| 6382 |
{ \skip_set:Nn \topsep { \@@_skip_diff:NN \l_@@_hanging_aboveskip_tl \parskip } } |
| 6383 |
\@@_setup_list_noindent:n { -\l_@@_hanging_hang_tl } |
| 6384 |
} |
| 6385 |
\int_compare:nNnT \g_@@_chap_par_prevgraf_int = 1 |
| 6386 |
{ \addvspace { \baselineskip } } |
| 6387 |
\int_gzero:N \g_@@_chap_par_prevgraf_int |
| 6388 |
\item |
| 6389 |
\relax |
| 6390 |
} |
| 6391 |
% \end{macrocode} |
| 6392 |
% \end{macro} |
| 6393 |
% |
| 6394 |
% \begin{macro}{\@@_hanging_end:} |
| 6395 |
% End a hanging section in a scripture quotation. |
| 6396 |
% \begin{macrocode} |
| 6397 |
\cs_new_protected:Nn \@@_hanging_end: |
| 6398 |
{ |
| 6399 |
\@@_calc_final_line_length: |
| 6400 |
\dim_compare:nNnTF \@outerparskip > \l_@@_hanging_belowskip_tl |
| 6401 |
{ \skip_zero:N \@topsepadd } |
| 6402 |
{ \skip_set:Nn \@topsepadd { \@@_skip_diff:NN \l_@@_hanging_belowskip_tl \@outerparskip } } |
| 6403 |
\skip_gset_eq:NN \g_@@_prev_inner_below_skip \@topsepadd |
| 6404 |
\legacy_if_set_false:n { @noparlist } |
| 6405 |
\endlist |
| 6406 |
\bool_gset_true:N \g_@@_suppress_next_pilcrow_bool |
| 6407 |
\hook_gput_next_code:nn { para / begin } |
| 6408 |
{ \parshape 1 ~ \@totalleftmargin ~ \linewidth } |
| 6409 |
} |
| 6410 |
% \end{macrocode} |
| 6411 |
% \end{macro} |
| 6412 |
% |
| 6413 |
% \subsubsection{The \env{midparachap} environment} |
| 6414 |
% |
| 6415 |
% \begin{macro}{\@@_vbox_set_top:Nw} |
| 6416 |
% Define missing \cs{vbox_set_top:Nw} function. |
| 6417 |
% \begin{macrocode} |
| 6418 |
\cs_new_protected:Npn \@@_vbox_set_top:Nw #1 |
| 6419 |
{ |
| 6420 |
\tex_setbox:D #1 \tex_vtop:D |
| 6421 |
\c_group_begin_token |
| 6422 |
\color_group_begin: |
| 6423 |
} |
| 6424 |
% \end{macrocode} |
| 6425 |
% \end{macro} |
| 6426 |
% |
| 6427 |
% \begin{macro}{\l_@@_mid_para_chap_bool} |
| 6428 |
% Flag if setting a paragraph containing a mid-paragraph chapter. |
| 6429 |
% \begin{macrocode} |
| 6430 |
\bool_new:N \l_@@_mid_para_chap_bool |
| 6431 |
% \end{macrocode} |
| 6432 |
% \end{macro} |
| 6433 |
% |
| 6434 |
% \begin{macro}{\l_@@_mid_para_chap_line_box} |
| 6435 |
% Store last line before a mid-paragraph chapter. |
| 6436 |
% \begin{macrocode} |
| 6437 |
\box_new:N \l_@@_mid_para_chap_line_box |
| 6438 |
% \end{macrocode} |
| 6439 |
% \end{macro} |
| 6440 |
% |
| 6441 |
% \begin{macro}{\g_@@_mid_para_chap_prevdepth_dim} |
| 6442 |
% Store the \cs{prevdepth} of the final paragraph in a \env{midparachap} |
| 6443 |
% environment. |
| 6444 |
% \begin{macrocode} |
| 6445 |
\dim_new:N \g_@@_mid_para_chap_prevdepth_dim |
| 6446 |
% \end{macrocode} |
| 6447 |
% \end{macro} |
| 6448 |
% |
| 6449 |
% \begin{macro}{\l_@@_mid_para_chap_totalleftmargin_dim} |
| 6450 |
% Save the \cs{@totalleftmargin} before starting a \env{midparachap} |
| 6451 |
% environment. |
| 6452 |
% \begin{macrocode} |
| 6453 |
\dim_new:N \l_@@_mid_para_chap_totalleftmargin_dim |
| 6454 |
% \end{macrocode} |
| 6455 |
% \end{macro} |
| 6456 |
% |
| 6457 |
% \begin{macro}{\g_@@_mid_para_chap_prevgraf_int} |
| 6458 |
% Store the \cs{prevgraf} of the final paragraph in a \env{midparachap} |
| 6459 |
% environment. |
| 6460 |
% \begin{macrocode} |
| 6461 |
\int_new:N \g_@@_mid_para_chap_prevgraf_int |
| 6462 |
% \end{macrocode} |
| 6463 |
% \end{macro} |
| 6464 |
% |
| 6465 |
% \begin{macro}{\l_@@_mid_para_chap_snap_box} |
| 6466 |
% Store unpacked last line before a mid-paragraph chapter. |
| 6467 |
% \begin{macrocode} |
| 6468 |
\box_new:N \l_@@_mid_para_chap_snap_box |
| 6469 |
% \end{macrocode} |
| 6470 |
% \end{macro} |
| 6471 |
% |
| 6472 |
% \begin{macro}{\l_@@_mid_para_chap_spacefactor_int} |
| 6473 |
% Store space factor before a mid-paragraph chapter. |
| 6474 |
% \begin{macrocode} |
| 6475 |
\int_new:N \l_@@_mid_para_chap_spacefactor_int |
| 6476 |
% \end{macrocode} |
| 6477 |
% \end{macro} |
| 6478 |
% |
| 6479 |
% \begin{macro}{\@@_mid_para_chap_end_orig:n, |
| 6480 |
% \@@_mid_para_chap_end:n} |
| 6481 |
% Custom \cs{end} macro for the \env{midparachap} environment. This is only |
| 6482 |
% used when the \opt{verse/para} and/or \opt{compact} options are in use. |
| 6483 |
% \begin{macrocode} |
| 6484 |
\cs_set_eq:Nc \@@_mid_para_chap_end_orig:n { end ~ } |
| 6485 |
\cs_new_nopar:Nn \@@_mid_para_chap_end:n |
| 6486 |
{ |
| 6487 |
\@@_mid_para_chap_end_orig:n { #1 } |
| 6488 |
\bool_if:NT \l_@@_compact_bool |
| 6489 |
{ \c_space_token } |
| 6490 |
\peek_remove_spaces:n |
| 6491 |
{ |
| 6492 |
\peek_analysis_map_inline:n |
| 6493 |
{ |
| 6494 |
\bool_case:n |
| 6495 |
{ |
| 6496 |
{ \exp_args:No \token_if_letter_p:N { ##1 } } |
| 6497 |
{ \@@_pilcrow_output: } |
| 6498 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \vs } |
| 6499 |
{ \@@_set_pilcrow_hook: } |
| 6500 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \newvs } |
| 6501 |
{ \@@_set_pilcrow_hook: } |
| 6502 |
} |
| 6503 |
\peek_analysis_map_break:n { ##1 } |
| 6504 |
} |
| 6505 |
} |
| 6506 |
} |
| 6507 |
% \end{macrocode} |
| 6508 |
% \end{macro} |
| 6509 |
% |
| 6510 |
% \begin{macro}{\l_@@_mid_para_chap_box, |
| 6511 |
% \l_@@_mid_para_chap_split_box, |
| 6512 |
% \l_@@_mid_para_chap_split_top_box} |
| 6513 |
% Boxes containing a paragraph with a chapter break and its split if needed. |
| 6514 |
% \begin{macrocode} |
| 6515 |
\box_new:N \l_@@_mid_para_chap_box |
| 6516 |
\box_new:N \l_@@_mid_para_chap_split_box |
| 6517 |
\box_new:N \l_@@_mid_para_chap_split_top_box |
| 6518 |
% \end{macrocode} |
| 6519 |
% \end{macro} |
| 6520 |
% |
| 6521 |
% \begin{macro}{\@@_mid_para_drop_chap_output:} |
| 6522 |
% Output a mid-paragraph drop chapter. |
| 6523 |
% \begin{macrocode} |
| 6524 |
\cs_new_protected:Nn \@@_mid_para_drop_chap_output: |
| 6525 |
{ |
| 6526 |
\unskip |
| 6527 |
\int_set_eq:NN \l_@@_mid_para_chap_spacefactor_int \spacefactor |
| 6528 |
\strut |
| 6529 |
\par |
| 6530 |
\box_set_to_last:N \l_@@_mid_para_chap_line_box |
| 6531 |
\hbox_set:Nn \l_@@_mid_para_chap_snap_box |
| 6532 |
{ |
| 6533 |
\hbox_unpack_drop:N \l_@@_mid_para_chap_line_box |
| 6534 |
\unskip |
| 6535 |
\unskip |
| 6536 |
\unpenalty |
| 6537 |
} |
| 6538 |
\nointerlineskip |
| 6539 |
\dim_compare:nNnTF |
| 6540 |
{ |
| 6541 |
\box_wd:N \l_@@_mid_para_chap_snap_box + |
| 6542 |
\g_@@_chap_width_dim + |
| 6543 |
\l_@@_chap_sep_tl |
| 6544 |
} |
| 6545 |
< |
| 6546 |
{ \linewidth - \leftskip - \rightskip - 3em } |
| 6547 |
{ |
| 6548 |
\@@_drop_chap_output: |
| 6549 |
\hbox_unpack_drop:N \l_@@_mid_para_chap_snap_box |
| 6550 |
\int_set_eq:NN \spacefactor \l_@@_mid_para_chap_spacefactor_int |
| 6551 |
\c_space_tl |
| 6552 |
\@@_verse_output:n { 1 } |
| 6553 |
} |
| 6554 |
{ |
| 6555 |
\group_begin: |
| 6556 |
\noindent |
| 6557 |
\skip_horizontal:n { -\leftskip } |
| 6558 |
\hbox_unpack_drop:N \l_@@_mid_para_chap_snap_box |
| 6559 |
\skip_zero:N \parfillskip |
| 6560 |
\par |
| 6561 |
\group_end: |
| 6562 |
\@@_drop_chap_output: |
| 6563 |
\bool_if:NT \l_@@_midparachap_show_verse_bool |
| 6564 |
{ |
| 6565 |
\@@_verse_output:n { 1 } |
| 6566 |
} |
| 6567 |
} |
| 6568 |
} |
| 6569 |
% \end{macrocode} |
| 6570 |
% \end{macro} |
| 6571 |
% |
| 6572 |
% \begin{macro}{\@@_mid_para_chap_begin:n} |
| 6573 |
% Begin a paragraph containing a mid-paragraph chapter. |
| 6574 |
% \begin{macrocode} |
| 6575 |
\cs_new_protected:Nn \@@_mid_para_chap_begin:n |
| 6576 |
{ |
| 6577 |
\str_set:Nn \l_@@_currenvir_str { midparachap } |
| 6578 |
\tl_if_novalue:nF { #1 } |
| 6579 |
{ |
| 6580 |
\keys_set:nn |
| 6581 |
{ scripture / midparachap } |
| 6582 |
{ #1 } |
| 6583 |
} |
| 6584 |
\bool_lazy_and:nnT \l_@@_chap_show_verse_bool \l_@@_chap_drop_bool |
| 6585 |
{ |
| 6586 |
\bool_set_true:N \l_@@_midparachap_show_verse_bool |
| 6587 |
\bool_set_false:N \l_@@_chap_show_verse_bool |
| 6588 |
} |
| 6589 |
\par |
| 6590 |
\bool_set_true:N \l_@@_mid_para_chap_bool |
| 6591 |
\@@_vbox_set_top:Nw \l_@@_mid_para_chap_box |
| 6592 |
\dim_zero:N \leftskip |
| 6593 |
\dim_zero:N \rightskip |
| 6594 |
\dim_set_eq:NN \l_@@_mid_para_chap_totalleftmargin_dim \@totalleftmargin |
| 6595 |
\dim_zero:N \@totalleftmargin |
| 6596 |
\dim_set_eq:NN \hsize \linewidth |
| 6597 |
\skip_zero:N \parskip |
| 6598 |
} |
| 6599 |
% \end{macrocode} |
| 6600 |
% \end{macro} |
| 6601 |
% |
| 6602 |
% \begin{macro}{\@@_mid_para_chap_end:} |
| 6603 |
% End a paragraph containing a mid-paragraph chapter. |
| 6604 |
% \begin{macrocode} |
| 6605 |
\cs_new_protected:Nn \@@_mid_para_chap_end: |
| 6606 |
{ |
| 6607 |
\par |
| 6608 |
\dim_gset_eq:NN \g_@@_mid_para_chap_prevdepth_dim \prevdepth |
| 6609 |
\box_set_to_last:N \l_@@_mid_para_chap_line_box |
| 6610 |
\hbox_set:Nn \l_@@_mid_para_chap_snap_box |
| 6611 |
{ |
| 6612 |
\hbox_unpack:N \l_@@_mid_para_chap_line_box |
| 6613 |
\unskip |
| 6614 |
\unskip |
| 6615 |
\unpenalty |
| 6616 |
} |
| 6617 |
\dim_gset:Nn \g_@@_final_line_dim |
| 6618 |
{ \box_wd:N \l_@@_mid_para_chap_snap_box + \l_@@_mid_para_chap_totalleftmargin_dim } |
| 6619 |
\box_clear:N \l_@@_mid_para_chap_snap_box |
| 6620 |
\nointerlineskip |
| 6621 |
\int_compare:nNnT |
| 6622 |
\prevgraf < 3 |
| 6623 |
{ |
| 6624 |
\noindent |
| 6625 |
\skip_horizontal:n { \g_@@_chap_width_dim + \l_@@_chap_sep_tl } |
| 6626 |
\dim_gadd:Nn \g_@@_final_line_dim { \g_@@_chap_width_dim + \l_@@_chap_sep_tl } |
| 6627 |
} |
| 6628 |
\box_use_drop:N \l_@@_mid_para_chap_line_box |
| 6629 |
\vbox_set_end: |
| 6630 |
% \end{macrocode} |
| 6631 |
% Attempt to allow the mid-paragraph chapter box to break across pages. |
| 6632 |
% \begin{macrocode} |
| 6633 |
\mode_if_inner:TF |
| 6634 |
{ |
| 6635 |
\noindent |
| 6636 |
\box_use_drop:N \l_@@_mid_para_chap_box |
| 6637 |
} |
| 6638 |
{ |
| 6639 |
\dim_compare:nNnTF |
| 6640 |
{ \box_ht_plus_dp:N \l_@@_mid_para_chap_box } |
| 6641 |
> |
| 6642 |
{ \pagegoal - \pagetotal - \baselineskip } |
| 6643 |
{ |
| 6644 |
\int_set:Nn \vbadness { 10000 } |
| 6645 |
\vbox_set_split_to_ht:NNn |
| 6646 |
\l_@@_mid_para_chap_split_box \l_@@_mid_para_chap_box |
| 6647 |
{ \pagegoal - \pagetotal - \baselineskip } |
| 6648 |
\vbox_set_top:Nn \l_@@_mid_para_chap_split_top_box |
| 6649 |
{ \vbox_unpack_drop:N \l_@@_mid_para_chap_split_box } |
| 6650 |
\noindent |
| 6651 |
\box_use_drop:N \l_@@_mid_para_chap_split_top_box |
| 6652 |
\goodbreak |
| 6653 |
\box_use_drop:N \l_@@_mid_para_chap_box |
| 6654 |
} |
| 6655 |
{ |
| 6656 |
\noindent |
| 6657 |
\box_use_drop:N \l_@@_mid_para_chap_box |
| 6658 |
} |
| 6659 |
} |
| 6660 |
\par |
| 6661 |
\dim_set_eq:NN \prevdepth \g_@@_mid_para_chap_prevdepth_dim |
| 6662 |
\int_zero:N \prevgraf |
| 6663 |
\skip_vertical:n { -\parskip - \baselineskip } |
| 6664 |
\noindent |
| 6665 |
\skip_horizontal:N \g_@@_final_line_dim |
| 6666 |
\int_gset_eq:NN \g_@@_chap_par_prevgraf_int \g_@@_mid_para_chap_prevgraf_int |
| 6667 |
\int_gset:Nn \g_@@_current_group_level_a_int { \currentgrouplevel - 1 } |
| 6668 |
\@@_reset_par_at_group_level: |
| 6669 |
} |
| 6670 |
% \end{macrocode} |
| 6671 |
% \end{macro} |
| 6672 |
% |
| 6673 |
% \subsubsection{The \env{narrow} environment} |
| 6674 |
% |
| 6675 |
% \begin{macro}{\@@_narrow_begin:n} |
| 6676 |
% Begin a narrow section in a scripture quotation. |
| 6677 |
% \begin{macrocode} |
| 6678 |
\cs_new_protected:Nn \@@_narrow_begin:n |
| 6679 |
{ |
| 6680 |
\bool_if:NT \l_@@_active_inner_bool |
| 6681 |
{ |
| 6682 |
\msg_error:nn { scripture } { nested-environment } |
| 6683 |
} |
| 6684 |
\bool_set_true:N \l_@@_active_inner_bool |
| 6685 |
\str_set:Nn \l_@@_currenvir_str { narrow } |
| 6686 |
\tl_if_novalue:nF { #1 } |
| 6687 |
{ |
| 6688 |
\keys_set:nn |
| 6689 |
{ scripture / narrow } |
| 6690 |
{ #1 } |
| 6691 |
} |
| 6692 |
\legacy_if:nTF { @newlist } |
| 6693 |
{ \dim_add:Nn \l_@@_outer_itemindent_dim \itemindent } |
| 6694 |
{ \dim_zero:N \l_@@_outer_itemindent_dim } |
| 6695 |
\cs_set_eq:NN \par \para_end: |
| 6696 |
\int_gset_eq:NN \g_@@_current_group_level_b_int \currentgrouplevel |
| 6697 |
\list { } |
| 6698 |
{ |
| 6699 |
\dim_zero:N \labelsep |
| 6700 |
\dim_set_eq:NN \leftmargin \l_@@_narrow_leftmargin_tl |
| 6701 |
\dim_set_eq:NN \rightmargin \l_@@_narrow_rightmargin_tl |
| 6702 |
\dim_set_eq:NN \listparindent \parindent |
| 6703 |
\bool_lazy_or:nnTF |
| 6704 |
{ \mode_if_vertical_p: } |
| 6705 |
{ \g_@@_para_mode_vertical_bool } |
| 6706 |
{ |
| 6707 |
\dim_set:Nn \itemindent { \parindent - \l_@@_outer_itemindent_dim } |
| 6708 |
\@@_setup_list_noindent:n { \parindent } |
| 6709 |
} |
| 6710 |
{ |
| 6711 |
\bool_gset_true:N \g_@@_suppress_next_pilcrow_bool |
| 6712 |
\dim_set:Nn \itemindent { -\l_@@_outer_itemindent_dim } |
| 6713 |
\@@_setup_list_noindent:n { \c_zero_dim } |
| 6714 |
} |
| 6715 |
\skip_set_eq:NN \parsep \parskip |
| 6716 |
\skip_zero:N \partopsep |
| 6717 |
\dim_compare:nNnTF \parskip > \l_@@_narrow_aboveskip_tl |
| 6718 |
{ \skip_zero:N \topsep } |
| 6719 |
{ \skip_set:Nn \topsep { \@@_skip_diff:NN \l_@@_narrow_aboveskip_tl \parskip } } |
| 6720 |
} |
| 6721 |
\int_compare:nNnT \g_@@_chap_par_prevgraf_int = 1 |
| 6722 |
{ \addvspace { \baselineskip } } |
| 6723 |
\int_gzero:N \g_@@_chap_par_prevgraf_int |
| 6724 |
\bool_if:NT \l_@@_verse_para_bool |
| 6725 |
{ \cs_set_eq:NN \par \@@_para_par: } |
| 6726 |
\item |
| 6727 |
\relax |
| 6728 |
} |
| 6729 |
% \end{macrocode} |
| 6730 |
% \end{macro} |
| 6731 |
% |
| 6732 |
% \begin{macro}{\@@_narrow_end:} |
| 6733 |
% End a narrow section in a scripture quotation. |
| 6734 |
% \begin{macrocode} |
| 6735 |
\cs_new_protected:Nn \@@_narrow_end: |
| 6736 |
{ |
| 6737 |
\cs_set_eq:NN \par \para_end: |
| 6738 |
\@@_calc_final_line_length: |
| 6739 |
\dim_compare:nNnTF \@outerparskip > \l_@@_narrow_belowskip_tl |
| 6740 |
{ \skip_zero:N \@topsepadd } |
| 6741 |
{ \skip_set:Nn \@topsepadd { \@@_skip_diff:NN \l_@@_narrow_belowskip_tl \@outerparskip } } |
| 6742 |
\skip_gset_eq:NN \g_@@_prev_inner_below_skip \@topsepadd |
| 6743 |
\legacy_if_set_false:n { @noparlist } |
| 6744 |
\endlist |
| 6745 |
\bool_gset_true:N \g_@@_suppress_next_pilcrow_bool |
| 6746 |
\hook_gput_next_code:nn { para / begin } |
| 6747 |
{ \parshape 1 ~ \@totalleftmargin ~ \linewidth } |
| 6748 |
} |
| 6749 |
% \end{macrocode} |
| 6750 |
% \end{macro} |
| 6751 |
% |
| 6752 |
% \subsubsection{The \env{poetry} environment} |
| 6753 |
% |
| 6754 |
% \begin{hooks}{scripture/poetry/para/after} |
| 6755 |
% This hook is an internal hook used to adjust the \cs{parshape} within a |
| 6756 |
% \env{poetry} environment after drop chapter numbers. |
| 6757 |
% \begin{macrocode} |
| 6758 |
\hook_new:n { scripture / poetry / para / after } |
| 6759 |
% \end{macrocode} |
| 6760 |
% \end{hooks} |
| 6761 |
% |
| 6762 |
% \begin{macro}{\g_@@_poetry_end_bool} |
| 6763 |
% Flag indicating that a \env{poetry} environment just ended. |
| 6764 |
% \begin{macrocode} |
| 6765 |
\bool_new:N \g_@@_poetry_end_bool |
| 6766 |
% \end{macrocode} |
| 6767 |
% \end{macro} |
| 6768 |
% |
| 6769 |
% \begin{macro}{\l_@@_poetry_midparachap_show_verse_bool} |
| 6770 |
% Flag indicating whether the verse number should be printed immediately |
| 6771 |
% after a \fn{ch} or not in a \env{poetry} environment. |
| 6772 |
% \begin{macrocode} |
| 6773 |
\bool_new:N \l_@@_poetry_midparachap_show_verse_bool |
| 6774 |
% \end{macrocode} |
| 6775 |
% \end{macro} |
| 6776 |
% |
| 6777 |
% \begin{macro}{\l_@@_poetry_chap_indent_dim, \l_@@_poetry_chap_sep_dim} |
| 6778 |
% Store calculated indent and sep when a drop chapter appears in a |
| 6779 |
% \env{poetry} environment. |
| 6780 |
% \begin{macrocode} |
| 6781 |
\dim_new:N \l_@@_poetry_chap_indent_dim |
| 6782 |
\dim_new:N \l_@@_poetry_chap_sep_dim |
| 6783 |
% \end{macrocode} |
| 6784 |
% \end{macro} |
| 6785 |
% |
| 6786 |
% \begin{macro}{\l_@@_poetry_chap_parshape_correction_dim} |
| 6787 |
% Correction to \cs{parshape} in chapter affected lines in a \env{poetry} |
| 6788 |
% environment. |
| 6789 |
% \begin{macrocode} |
| 6790 |
\dim_new:N \l_@@_poetry_chap_parshape_correction_dim |
| 6791 |
% \end{macrocode} |
| 6792 |
% \end{macro} |
| 6793 |
% |
| 6794 |
% \begin{macro}{\l_@@_poetry_prevgraf_int} |
| 6795 |
% Store the number of lines a line of poetry takes up. |
| 6796 |
% \begin{macrocode} |
| 6797 |
\int_new:N \l_@@_poetry_prevgraf_int |
| 6798 |
% \end{macrocode} |
| 6799 |
% \end{macro} |
| 6800 |
% |
| 6801 |
% \begin{macro}{\@@_poetry_text_right:nn} |
| 6802 |
% Align a word to the right and finish a paragraph, pushing to the next line |
| 6803 |
% if there is not space for the word. |
| 6804 |
% \begin{macrocode} |
| 6805 |
\cs_new_protected:Nn \@@_poetry_text_right:nn |
| 6806 |
{ |
| 6807 |
{ |
| 6808 |
\unskip |
| 6809 |
\hfil |
| 6810 |
\penalty 50 |
| 6811 |
\skip_horizontal:n { #1 } |
| 6812 |
\hbox:n {} |
| 6813 |
\nobreak |
| 6814 |
\hfill |
| 6815 |
#2 |
| 6816 |
\skip_zero:N \parfillskip |
| 6817 |
\int_zero:N \finalhyphendemerits |
| 6818 |
} |
| 6819 |
} |
| 6820 |
% \end{macrocode} |
| 6821 |
% \end{macro} |
| 6822 |
% |
| 6823 |
% \begin{macro}{\@@_selah_output:} |
| 6824 |
% Output Selah at the end of a line. |
| 6825 |
% \begin{macrocode} |
| 6826 |
\cs_new_protected:Nn \@@_selah_output: |
| 6827 |
{ |
| 6828 |
\group_begin: |
| 6829 |
\l_@@_selah_font_tl |
| 6830 |
\@@_poetry_text_right:nn |
| 6831 |
{ \l_@@_selah_sep_tl } |
| 6832 |
{ \@@_selah_format:n { \l_@@_selah_text_tl } } |
| 6833 |
\group_end: |
| 6834 |
} |
| 6835 |
% \end{macrocode} |
| 6836 |
% \end{macro} |
| 6837 |
% |
| 6838 |
% \begin{macro}{\@@_poetry_ch:n} |
| 6839 |
% Position a chapter in a \env{poetry} environment. |
| 6840 |
% \begin{macrocode} |
| 6841 |
\cs_new_protected:Nn \@@_poetry_ch:n |
| 6842 |
{ |
| 6843 |
\bool_if:NTF \l_@@_chap_show_bool |
| 6844 |
{ |
| 6845 |
\bool_if:NTF \l_@@_chap_drop_bool |
| 6846 |
{ \@@_poetry_chap:n { #1 } } |
| 6847 |
{ |
| 6848 |
\bool_if:NTF \l_@@_chap_para_bool |
| 6849 |
{ \@@_para_chap:n { #1 } } |
| 6850 |
{ \@@_poetry_nodrop_chap:n { #1 } } |
| 6851 |
} |
| 6852 |
} |
| 6853 |
{ |
| 6854 |
\bool_if:NTF \l_@@_chap_para_bool |
| 6855 |
{ \@@_para_chap:n { #1 } } |
| 6856 |
{ \@@_poetry_nodrop_chap:n { #1 } } |
| 6857 |
} |
| 6858 |
} |
| 6859 |
% \end{macrocode} |
| 6860 |
% \end{macro} |
| 6861 |
% |
| 6862 |
% \begin{macro}{\@@_poetry_chap:n} |
| 6863 |
% Position a drop chapter in a \env{poetry} environment. |
| 6864 |
% \begin{macrocode} |
| 6865 |
\cs_new_protected:Nn \@@_poetry_chap:n |
| 6866 |
{ |
| 6867 |
\@@_drop_chap_set_up:n { #1 } |
| 6868 |
\int_gset_eq:NN \g_@@_current_group_level_c_int \currentgrouplevel |
| 6869 |
\@@_zero_chap_par_prevgraf_at_group_level: |
| 6870 |
\cs_if_eq:NNTF \vs \@@_poetry_mode_vertical_verse:n |
| 6871 |
{ |
| 6872 |
\dim_zero:N \l_@@_poetry_chap_indent_dim |
| 6873 |
\noindent |
| 6874 |
} |
| 6875 |
{ |
| 6876 |
\dim_set_eq:NN \l_@@_poetry_chap_indent_dim \l_@@_poetry_indent_tl |
| 6877 |
\mode_leave_vertical: |
| 6878 |
} |
| 6879 |
\dim_set_eq:NN \l_@@_poetry_chap_sep_dim \l_@@_chap_sep_tl |
| 6880 |
\dim_compare:nNnT |
| 6881 |
{ \g_@@_chap_width_dim + \l_@@_chap_sep_tl } |
| 6882 |
< |
| 6883 |
{ \l_@@_poetry_leftmargin_tl + \l_@@_poetry_chap_indent_dim } |
| 6884 |
{ |
| 6885 |
\dim_set:Nn \l_@@_poetry_chap_sep_dim |
| 6886 |
{ |
| 6887 |
\l_@@_poetry_leftmargin_tl + \l_@@_poetry_chap_indent_dim - |
| 6888 |
\g_@@_chap_width_dim |
| 6889 |
} |
| 6890 |
} |
| 6891 |
\hbox_set:Nn \l_@@_chap_box |
| 6892 |
{ |
| 6893 |
\box_move_down:nn |
| 6894 |
{ \baselineskip } |
| 6895 |
{ |
| 6896 |
\hbox_overlap_left:n |
| 6897 |
{ |
| 6898 |
\box_use:N \l_@@_chap_tmp_box |
| 6899 |
\skip_horizontal:N \l_@@_poetry_chap_sep_dim |
| 6900 |
} |
| 6901 |
} |
| 6902 |
} |
| 6903 |
\box_set_ht:Nn \l_@@_chap_box { \c_zero_dim } |
| 6904 |
\box_set_dp:Nn \l_@@_chap_box { \c_zero_dim } |
| 6905 |
\dim_set:Nn \l_@@_poetry_chap_parshape_correction_dim |
| 6906 |
{ |
| 6907 |
\g_@@_chap_width_dim + \l_@@_poetry_chap_sep_dim - |
| 6908 |
\l_@@_poetry_leftmargin_tl - \l_@@_poetry_chap_indent_dim |
| 6909 |
} |
| 6910 |
\parshape 2 ~ |
| 6911 |
\dim_eval:n |
| 6912 |
{ \@totalleftmargin + \l_@@_poetry_chap_parshape_correction_dim } ~ |
| 6913 |
\dim_eval:n |
| 6914 |
{ \linewidth - \l_@@_poetry_chap_parshape_correction_dim } ~ |
| 6915 |
\dim_eval:n |
| 6916 |
{ \@totalleftmargin + \l_@@_poetry_big_indent_tl } ~ |
| 6917 |
\dim_eval:n |
| 6918 |
{ \linewidth - \l_@@_poetry_big_indent_tl } |
| 6919 |
% \end{macrocode} |
| 6920 |
% Set the \cs{parshape} for the second line after a drop chapter number. |
| 6921 |
% \begin{macrocode} |
| 6922 |
\dim_compare:nNnT |
| 6923 |
{ \g_@@_chap_width_dim + \l_@@_poetry_chap_sep_dim } |
| 6924 |
> |
| 6925 |
\l_@@_poetry_leftmargin_tl |
| 6926 |
{ |
| 6927 |
\hook_gput_next_code:nn { scripture / poetry / para / after } |
| 6928 |
{ |
| 6929 |
\int_compare:nNnT \l_@@_poetry_prevgraf_int = 1 |
| 6930 |
{ |
| 6931 |
\cs_if_eq:NNTF \vs \@@_poetry_mode_vertical_verse:n |
| 6932 |
% \end{macrocode} |
| 6933 |
% This \cs{parshape} is in effect when the next line is the first half of a |
| 6934 |
% poetry verse. |
| 6935 |
% \begin{macrocode} |
| 6936 |
{ |
| 6937 |
\dim_compare:nNnTF |
| 6938 |
{ \g_@@_chap_width_dim + \l_@@_chap_sep_tl } |
| 6939 |
< |
| 6940 |
\l_@@_poetry_leftmargin_tl |
| 6941 |
{ \dim_zero:N \l_@@_poetry_chap_parshape_correction_dim } |
| 6942 |
{ |
| 6943 |
\dim_set:Nn \l_@@_poetry_chap_parshape_correction_dim |
| 6944 |
{ |
| 6945 |
\g_@@_chap_width_dim + \l_@@_chap_sep_tl - |
| 6946 |
\l_@@_poetry_leftmargin_tl |
| 6947 |
} |
| 6948 |
} |
| 6949 |
\int_compare:nNnT \g_@@_chap_par_prevgraf_int = 1 |
| 6950 |
{ |
| 6951 |
\parshape 2 ~ |
| 6952 |
\dim_eval:n |
| 6953 |
{ \@totalleftmargin + \l_@@_poetry_chap_parshape_correction_dim } ~ |
| 6954 |
\dim_eval:n |
| 6955 |
{ \linewidth - \l_@@_poetry_chap_parshape_correction_dim } ~ |
| 6956 |
\dim_eval:n |
| 6957 |
{ \@totalleftmargin + \l_@@_poetry_big_indent_tl } ~ |
| 6958 |
\dim_eval:n |
| 6959 |
{ \linewidth - \l_@@_poetry_big_indent_tl } |
| 6960 |
} |
| 6961 |
} |
| 6962 |
% \end{macrocode} |
| 6963 |
% This \cs{parshape} is in effect when the next line is the second half of a |
| 6964 |
% poetry verse. |
| 6965 |
% \begin{macrocode} |
| 6966 |
{ |
| 6967 |
\dim_compare:nNnTF |
| 6968 |
{ \g_@@_chap_width_dim + \l_@@_chap_sep_tl } |
| 6969 |
< |
| 6970 |
{ \l_@@_poetry_leftmargin_tl + \l_@@_poetry_indent_tl } |
| 6971 |
{ \dim_zero:N \l_@@_poetry_chap_parshape_correction_dim } |
| 6972 |
{ |
| 6973 |
\dim_set:Nn \l_@@_poetry_chap_parshape_correction_dim |
| 6974 |
{ |
| 6975 |
\g_@@_chap_width_dim + \l_@@_chap_sep_tl - |
| 6976 |
\l_@@_poetry_leftmargin_tl - \l_@@_poetry_indent_tl |
| 6977 |
} |
| 6978 |
} |
| 6979 |
\parshape 2 ~ |
| 6980 |
\dim_eval:n |
| 6981 |
{ \@totalleftmargin + \l_@@_poetry_chap_parshape_correction_dim } ~ |
| 6982 |
\dim_eval:n |
| 6983 |
{ \linewidth - \l_@@_poetry_chap_parshape_correction_dim } ~ |
| 6984 |
\dim_eval:n |
| 6985 |
{ \@totalleftmargin + \l_@@_poetry_big_indent_tl } ~ |
| 6986 |
\dim_eval:n |
| 6987 |
{ \linewidth - \l_@@_poetry_big_indent_tl } |
| 6988 |
} |
| 6989 |
} |
| 6990 |
} |
| 6991 |
} |
| 6992 |
\group_begin: |
| 6993 |
\hook_use:n { scripture / chap / before } |
| 6994 |
\box_use:N \l_@@_chap_box |
| 6995 |
\hook_use:n { scripture / chap / after } |
| 6996 |
\group_end: |
| 6997 |
\bool_lazy_or:nnT \l_@@_chap_show_verse_bool \l_@@_poetry_midparachap_show_verse_bool |
| 6998 |
{ \@@_verse_output:n { 1 } } |
| 6999 |
\hook_use:n { scripture / poetry / pilcrow } |
| 7000 |
} |
| 7001 |
% \end{macrocode} |
| 7002 |
% \end{macro} |
| 7003 |
% |
| 7004 |
% \begin{macro}{\@@_poetry_nodrop_chap:n} |
| 7005 |
% Format a non-drop chapter for \env{poetry} environment in a |
| 7006 |
% \env{scripture} quotation. |
| 7007 |
% \begin{macrocode} |
| 7008 |
\cs_new_protected:Nn \@@_poetry_nodrop_chap:n |
| 7009 |
{ |
| 7010 |
\cs_gset_nopar:Npn \scripturecurrentchapter { #1 } |
| 7011 |
\cs_gset_nopar:Npn \scripturecurrentverse { 1 } |
| 7012 |
\group_begin: |
| 7013 |
\cs_if_eq:NNT \vs \@@_poetry_mode_vertical_verse:n |
| 7014 |
{ \noindent } |
| 7015 |
\bool_if:NTF \l_@@_chap_show_bool |
| 7016 |
{ |
| 7017 |
\hbox_overlap_left:n |
| 7018 |
{ |
| 7019 |
\hook_use:n { scripture / chap / before } |
| 7020 |
\group_begin: |
| 7021 |
\l_@@_chap_font_tl |
| 7022 |
\str_if_eq:VnF \l_@@_chapter_colour_tl { . } |
| 7023 |
{ \exp_args:NV \color_select:n \l_@@_chapter_colour_tl } |
| 7024 |
\@@_chap_format:n { #1 } |
| 7025 |
\group_end: |
| 7026 |
\skip_horizontal:N \l_@@_chap_sep_tl |
| 7027 |
\hook_use:n { scripture / chap / after } |
| 7028 |
\bool_lazy_or:nnT \l_@@_chap_show_verse_bool \l_@@_poetry_midparachap_show_verse_bool |
| 7029 |
{ \@@_verse_output:n { 1 } } |
| 7030 |
} |
| 7031 |
} |
| 7032 |
{ |
| 7033 |
\hook_use:n { scripture / chap / before } |
| 7034 |
\hook_use:n { scripture / chap / after } |
| 7035 |
\vs { 1 } |
| 7036 |
} |
| 7037 |
\group_end: |
| 7038 |
\hook_use:n { scripture / poetry / pilcrow } |
| 7039 |
} |
| 7040 |
% \end{macrocode} |
| 7041 |
% \end{macro} |
| 7042 |
% |
| 7043 |
% \begin{macro}{\@@_poetry_mode_vertical_verse:n} |
| 7044 |
% Format a verse for poetry scripture quotations in vertical mode. |
| 7045 |
% \begin{macrocode} |
| 7046 |
\cs_new_protected:Nn \@@_poetry_mode_vertical_verse:n |
| 7047 |
{ |
| 7048 |
\group_begin: |
| 7049 |
\tl_set_eq:NN \l_@@_verse_sep_tl \l_@@_poetry_verse_sep_tl |
| 7050 |
\hook_gclear_next_code:n { scripture / pilcrow } |
| 7051 |
\strut |
| 7052 |
\int_compare:nNnTF \g_@@_chap_par_prevgraf_int = 1 |
| 7053 |
{ |
| 7054 |
\@@_verse_output:n { #1 } |
| 7055 |
} |
| 7056 |
{ |
| 7057 |
\bool_if:NTF \l_@@_poetry_verse_right_bool |
| 7058 |
{ |
| 7059 |
\hbox_overlap_left:n |
| 7060 |
{ |
| 7061 |
\@@_verse_output:n { #1 } |
| 7062 |
} |
| 7063 |
} |
| 7064 |
{ |
| 7065 |
\hbox_overlap_left:n |
| 7066 |
{ |
| 7067 |
\hbox_overlap_right:n |
| 7068 |
{ |
| 7069 |
\@@_verse_output:n { #1 } |
| 7070 |
} |
| 7071 |
\skip_horizontal:N \l_@@_poetry_leftmargin_tl |
| 7072 |
} |
| 7073 |
} |
| 7074 |
} |
| 7075 |
\group_end: |
| 7076 |
\bool_if:NF \g_@@_suppress_next_pilcrow_bool |
| 7077 |
{ \hook_use:n { scripture / poetry / pilcrow } } |
| 7078 |
\cs_set_eq:NN \vs \@@_verse_output:n |
| 7079 |
} |
| 7080 |
% \end{macrocode} |
| 7081 |
% \end{macro} |
| 7082 |
% |
| 7083 |
% \begin{macro}{\@@_poetry_mode_horizontal_verse:n} |
| 7084 |
% Format a verse for poetry scripture quotations in horizontal mode. |
| 7085 |
% \begin{macrocode} |
| 7086 |
\cs_new_protected:Nn \@@_poetry_mode_horizontal_verse:n |
| 7087 |
{ |
| 7088 |
\group_begin: |
| 7089 |
\tl_set_eq:NN \l_@@_verse_sep_tl \l_@@_poetry_verse_sep_tl |
| 7090 |
\int_compare:nNnTF \g_@@_chap_par_prevgraf_int = 1 |
| 7091 |
{ |
| 7092 |
\@@_poetry_mode_vertical_verse:n { #1 } |
| 7093 |
} |
| 7094 |
{ |
| 7095 |
\skip_horizontal:n { -\listparindent } |
| 7096 |
\@@_poetry_mode_vertical_verse:n { #1 } |
| 7097 |
\skip_horizontal:N \listparindent |
| 7098 |
} |
| 7099 |
\group_end: |
| 7100 |
\cs_set_eq:NN \vs \@@_verse_output:n |
| 7101 |
} |
| 7102 |
% \end{macrocode} |
| 7103 |
% \end{macro} |
| 7104 |
% |
| 7105 |
% \begin{macro}{\@@_poetry_par:} |
| 7106 |
% par macro for poetry sections |
| 7107 |
% \begin{macrocode} |
| 7108 |
\cs_new_protected:Nn \@@_poetry_par: |
| 7109 |
{ |
| 7110 |
\para_end: |
| 7111 |
\int_set:Nn \l_@@_poetry_prevgraf_int { \int_use:N \prevgraf } |
| 7112 |
\parshape 2 ~ |
| 7113 |
\@totalleftmargin ~ |
| 7114 |
\linewidth ~ |
| 7115 |
\dim_eval:n |
| 7116 |
{ \@totalleftmargin + \l_@@_poetry_big_indent_tl } ~ |
| 7117 |
\dim_eval:n |
| 7118 |
{ \linewidth - \l_@@_poetry_big_indent_tl } |
| 7119 |
\hook_use:n { scripture / poetry / para / after } |
| 7120 |
} |
| 7121 |
% \end{macrocode} |
| 7122 |
% \end{macro} |
| 7123 |
% |
| 7124 |
% \begin{macro}{\@@_obeylines:} |
| 7125 |
% Special version of obeylines which doesn't insert par at end of |
| 7126 |
% environment. |
| 7127 |
% \begin{macrocode} |
| 7128 |
\group_begin: |
| 7129 |
\char_set_catcode_active:N \^^M |
| 7130 |
\cs_gset_protected_nopar:Nn \@@_obeylines: % |
| 7131 |
{% |
| 7132 |
\char_set_catcode_active:N \^^M% |
| 7133 |
\cs_set_eq:NN ^^M \@@_obeylines_eol:% |
| 7134 |
}% |
| 7135 |
\group_end: |
| 7136 |
\cs_new_protected:Nn \@@_obeylines_eol: |
| 7137 |
{ |
| 7138 |
\mode_if_vertical:TF |
| 7139 |
{ |
| 7140 |
\cs_set_eq:NN \vs \@@_poetry_mode_vertical_verse:n |
| 7141 |
\hook_gput_next_code:nn { scripture / poetry / para / after } |
| 7142 |
{ \bool_set_false:N \l_@@_poetry_midparachap_show_verse_bool } |
| 7143 |
} |
| 7144 |
{ \cs_set_eq:NN \vs \@@_poetry_mode_horizontal_verse:n } |
| 7145 |
\peek_analysis_map_inline:n |
| 7146 |
{ |
| 7147 |
\bool_case:nF |
| 7148 |
{ |
| 7149 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \ch } |
| 7150 |
{ |
| 7151 |
\bool_set_eq:NN \l_@@_poetry_midparachap_show_verse_bool \l_@@_midparachap_show_verse_bool |
| 7152 |
\@@_poetry_par: |
| 7153 |
\peek_analysis_map_break:n { ##1 } |
| 7154 |
} |
| 7155 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \newch } |
| 7156 |
{ |
| 7157 |
\bool_set_eq:NN \l_@@_poetry_midparachap_show_verse_bool \l_@@_midparachap_show_verse_bool |
| 7158 |
\@@_poetry_par: |
| 7159 |
\peek_analysis_map_break:n { ##1 } |
| 7160 |
} |
| 7161 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \end } |
| 7162 |
{ \peek_analysis_map_break:n { ##1 } } |
| 7163 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \extraskip } |
| 7164 |
{ \peek_analysis_map_break:n { ##1 } } |
| 7165 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \nopilcrow } |
| 7166 |
{ |
| 7167 |
\@@_poetry_par: |
| 7168 |
\cs_if_eq:NNT \vs \@@_poetry_mode_vertical_verse:n |
| 7169 |
{ \noindent } |
| 7170 |
\peek_analysis_map_break:n |
| 7171 |
{ |
| 7172 |
\@@_fix_protrusion:o { ##1 } |
| 7173 |
} |
| 7174 |
} |
| 7175 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \vs } |
| 7176 |
{ |
| 7177 |
\@@_poetry_par: |
| 7178 |
\cs_if_eq:NNT \vs \@@_poetry_mode_vertical_verse:n |
| 7179 |
{ \noindent } |
| 7180 |
\peek_analysis_map_break:n { ##1 } |
| 7181 |
} |
| 7182 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \newvs } |
| 7183 |
{ |
| 7184 |
\@@_poetry_par: |
| 7185 |
\cs_if_eq:NNT \vs \@@_poetry_mode_vertical_verse:n |
| 7186 |
{ \noindent } |
| 7187 |
\peek_analysis_map_break:n { ##1 } |
| 7188 |
} |
| 7189 |
{ \exp_args:No \token_if_eq_meaning_p:NN { ##1 } \@@_obeylines_eol: } |
| 7190 |
{ \cs_set_eq:NN \vs \@@_poetry_mode_vertical_verse:n } |
| 7191 |
} |
| 7192 |
{ |
| 7193 |
\@@_poetry_par: |
| 7194 |
\cs_if_eq:NNT \vs \@@_poetry_mode_vertical_verse:n |
| 7195 |
{ \noindent } |
| 7196 |
\cs_set_eq:NN \vs \@@_verse_output:n |
| 7197 |
\bool_if:NT \l_@@_verse_para_bool |
| 7198 |
{ |
| 7199 |
\@@_pilcrow_output: |
| 7200 |
\bool_set_false:N \l_@@_verse_para_bool |
| 7201 |
\bool_set_false:N \l_@@_pilcrow_bool |
| 7202 |
} |
| 7203 |
\peek_analysis_map_break:n |
| 7204 |
{ |
| 7205 |
\@@_fix_protrusion:o { ##1 } |
| 7206 |
} |
| 7207 |
} |
| 7208 |
} |
| 7209 |
} |
| 7210 |
% \end{macrocode} |
| 7211 |
% \end{macro} |
| 7212 |
% |
| 7213 |
% \begin{macro}{\@@_poetry_begin:} |
| 7214 |
% Begin a poetry section in a scripture quotation. |
| 7215 |
% \begin{macrocode} |
| 7216 |
\cs_new_protected:Nn \@@_poetry_begin: |
| 7217 |
{ |
| 7218 |
\bool_if:NT \l_@@_active_inner_bool |
| 7219 |
{ |
| 7220 |
\msg_error:nn { scripture } { nested-environment } |
| 7221 |
} |
| 7222 |
\bool_set_true:N \l_@@_active_inner_bool |
| 7223 |
\str_set:Nn \l_@@_currenvir_str { poetry } |
| 7224 |
\bool_gset_false:N \g_@@_poetry_midparachap_show_verse_bool |
| 7225 |
\DeclareDocumentCommand { \ch } { s o m } |
| 7226 |
{ |
| 7227 |
\tl_if_novalue:nF { ##2 } |
| 7228 |
{ |
| 7229 |
\tl_set:Nn \l_@@_X_char_tl { ##2 } |
| 7230 |
} |
| 7231 |
\@@_poetry_ch:n { ##3 } |
| 7232 |
} |
| 7233 |
\cs_set_eq:NN \vs \@@_poetry_mode_vertical_verse:n |
| 7234 |
\cs_set_eq:NN \selah \@@_selah_output: |
| 7235 |
\cs_set_protected_nopar:Npn \textright ##1 |
| 7236 |
{ \@@_poetry_text_right:nn { \l_@@_text_right_sep_tl } { ##1 } } |
| 7237 |
\legacy_if:nTF { @newlist } |
| 7238 |
{ \dim_add:Nn \l_@@_outer_itemindent_dim \itemindent } |
| 7239 |
{ \dim_zero:N \l_@@_outer_itemindent_dim } |
| 7240 |
\cs_set_eq:NN \par \para_end: |
| 7241 |
\cs_set_eq:NN \noindent \tex_noindent:D |
| 7242 |
\hook_gclear_next_code:n { para / before } |
| 7243 |
\hook_gput_next_code:nn { scripture / poetry / pilcrow } |
| 7244 |
{ |
| 7245 |
\@@_pilcrow_output: |
| 7246 |
\bool_set_false:N \l_@@_pilcrow_bool |
| 7247 |
\bool_set_false:N \l_@@_verse_para_bool |
| 7248 |
} |
| 7249 |
\int_gset_eq:NN \g_@@_current_group_level_b_int \currentgrouplevel |
| 7250 |
\list { } |
| 7251 |
{ |
| 7252 |
\bool_lazy_or:nnF |
| 7253 |
{ \mode_if_vertical_p: } |
| 7254 |
{ \g_@@_para_mode_vertical_bool } |
| 7255 |
{ \bool_gset_true:N \g_@@_suppress_next_pilcrow_bool } |
| 7256 |
\dim_zero:N \labelsep |
| 7257 |
\dim_set_eq:NN \leftmargin \l_@@_poetry_leftmargin_tl |
| 7258 |
\dim_set_eq:NN \rightmargin \l_@@_poetry_rightmargin_tl |
| 7259 |
\dim_set:Nn \itemindent { \l_@@_poetry_indent_tl - \l_@@_outer_itemindent_dim } |
| 7260 |
\dim_set_eq:NN \listparindent \l_@@_poetry_indent_tl |
| 7261 |
\skip_zero:N \parsep |
| 7262 |
\skip_zero:N \partopsep |
| 7263 |
\dim_compare:nNnTF \parskip > { \l_@@_poetry_aboveskip_tl } |
| 7264 |
{ \skip_zero:N \topsep } |
| 7265 |
{ \skip_set:Nn \topsep { \@@_skip_diff:NN \l_@@_poetry_aboveskip_tl \parskip } } |
| 7266 |
\@@_setup_list_noindent:n { \l_@@_poetry_indent_tl } |
| 7267 |
} |
| 7268 |
\int_compare:nNnT \g_@@_chap_par_prevgraf_int = 1 |
| 7269 |
{ \addvspace { \baselineskip } } |
| 7270 |
\int_gzero:N \g_@@_chap_par_prevgraf_int |
| 7271 |
\raggedright |
| 7272 |
\dim_set_eq:NN \parindent \l_@@_poetry_indent_tl |
| 7273 |
\item |
| 7274 |
\relax |
| 7275 |
} |
| 7276 |
% \end{macrocode} |
| 7277 |
% \end{macro} |
| 7278 |
% |
| 7279 |
% \begin{macro}{\@@_poetry_end:} |
| 7280 |
% End a poetry section in a scripture quotation. |
| 7281 |
% \begin{macrocode} |
| 7282 |
\cs_new_protected:Nn \@@_poetry_end: |
| 7283 |
{ |
| 7284 |
\@@_calc_final_line_length: |
| 7285 |
\dim_compare:nNnTF \@outerparskip > { \l_@@_poetry_belowskip_tl } |
| 7286 |
{ \skip_zero:N \@topsepadd } |
| 7287 |
{ \skip_set:Nn \@topsepadd { \@@_skip_diff:NN \l_@@_poetry_belowskip_tl \@outerparskip } } |
| 7288 |
\skip_gset_eq:NN \g_@@_prev_inner_below_skip \@topsepadd |
| 7289 |
\legacy_if_set_false:n { @noparlist } |
| 7290 |
\endlist |
| 7291 |
\bool_gset_true:N \g_@@_suppress_next_pilcrow_bool |
| 7292 |
\hook_gclear_next_code:n { scripture / poetry / pilcrow } |
| 7293 |
\bool_gset_true:N \g_@@_poetry_end_bool |
| 7294 |
\hook_gput_next_code:nn { para / begin } |
| 7295 |
{ |
| 7296 |
\bool_gset_false:N \g_@@_poetry_end_bool |
| 7297 |
\parshape 1 ~ \@totalleftmargin ~ \linewidth |
| 7298 |
} |
| 7299 |
} |
| 7300 |
% \end{macrocode} |
| 7301 |
% \end{macro} |
| 7302 |
% |
| 7303 |
% |
| 7304 |
% \subsection{Public \LaTeX{} Interface} |
| 7305 |
% |
| 7306 |
% \begin{macro}{\scripturecurrentchapter, \scripturecurrentverse} |
| 7307 |
% Globally stores the most recent argument of \fn{ch} and \fn{vs}. These |
| 7308 |
% could be used in hooks, for example. |
| 7309 |
% \begin{macrocode} |
| 7310 |
\cs_set_nopar:Npn \scripturecurrentchapter { } |
| 7311 |
\cs_set_nopar:Npn \scripturecurrentverse { } |
| 7312 |
% \end{macrocode} |
| 7313 |
% \end{macro} |
| 7314 |
% |
| 7315 |
% \begin{macro}{\scripturesetup} |
| 7316 |
% \begin{arguments} |
| 7317 |
% \item \meta{|options|} to set. |
| 7318 |
% \end{arguments} |
| 7319 |
% Set key-value settings. |
| 7320 |
% \begin{macrocode} |
| 7321 |
\NewDocumentCommand { \scripturesetup } { m } |
| 7322 |
{ |
| 7323 |
\keys_set:nn { scripture } { #1 } |
| 7324 |
} |
| 7325 |
% \end{macrocode} |
| 7326 |
% \end{macro} |
| 7327 |
% |
| 7328 |
% \begin{macro}{\scripturestyle} |
| 7329 |
% \begin{arguments} |
| 7330 |
% \item \meta{|name|} of the style. |
| 7331 |
% \item \meta{|options|} to set for the style. |
| 7332 |
% \end{arguments} |
| 7333 |
% Set key-value settings to be applied when using the \opt{style} option |
| 7334 |
% with value \val{name}. You may want to pass \opt{defaults} as the first |
| 7335 |
% option to ensure any unset options in your style are expected defaults. |
| 7336 |
% The starred version appends the \val{options} to any existing ones. |
| 7337 |
% \begin{macrocode} |
| 7338 |
\NewDocumentCommand { \scripturestyle } { s m m } |
| 7339 |
{ |
| 7340 |
\@@_setup_style:nnn { #1 } { #2 } { #3 } |
| 7341 |
} |
| 7342 |
% \end{macrocode} |
| 7343 |
% \end{macro} |
| 7344 |
% |
| 7345 |
% \begin{macro}{\textscripture} |
| 7346 |
% \begin{arguments} |
| 7347 |
% \item \meta{|reference|} of quotation. |
| 7348 |
% \item \meta{|options|} to set. |
| 7349 |
% \item \meta{|quotation|} text. |
| 7350 |
% \end{arguments} |
| 7351 |
% Set an inline quotation. This is equivalent to calling the |
| 7352 |
% \env{scripture} environment with the \opt{inline} option set. |
| 7353 |
% \begin{macrocode} |
| 7354 |
\NewDocumentCommand { \textscripture } { o o +m } |
| 7355 |
{ |
| 7356 |
\tl_if_novalue:nTF { #2 } |
| 7357 |
{ |
| 7358 |
\begin { scripture } [ #1 ] [ inline ] |
| 7359 |
} |
| 7360 |
{ |
| 7361 |
\begin { scripture } [ #1 ] [ inline, #2 ] |
| 7362 |
} |
| 7363 |
#3 |
| 7364 |
\end { scripture } |
| 7365 |
} |
| 7366 |
% \end{macrocode} |
| 7367 |
% \end{macro} |
| 7368 |
% |
| 7369 |
% \begin{envmacro}{scripture} |
| 7370 |
% \begin{arguments} |
| 7371 |
% \item \meta{|reference|} of quotation. |
| 7372 |
% \item \meta{|options|} to set. |
| 7373 |
% \end{arguments} |
| 7374 |
% Format a scripture quotation with optional reference. |
| 7375 |
% \begin{macrocode} |
| 7376 |
\NewDocumentEnvironment { scripture } { o o } |
| 7377 |
{ |
| 7378 |
\@@_begin:nn { #1 } { #2 } |
| 7379 |
% \end{macrocode} |
| 7380 |
% \begin{envmacro}{center} |
| 7381 |
% \begin{arguments} |
| 7382 |
% \item \meta{|options|} to set. |
| 7383 |
% \end{arguments} |
| 7384 |
% \begin{macrocode} |
| 7385 |
\DeclareDocumentEnvironment { center } { o } |
| 7386 |
{ |
| 7387 |
\@@_center_begin:n { ##1 } |
| 7388 |
\@@_reference_start_peek: |
| 7389 |
} |
| 7390 |
{ \@@_center_end: } |
| 7391 |
% \end{macrocode} |
| 7392 |
% \end{envmacro} |
| 7393 |
% \begin{envmacro}{flushright} |
| 7394 |
% \begin{arguments} |
| 7395 |
% \item \meta{|options|} to set. |
| 7396 |
% \end{arguments} |
| 7397 |
% \begin{macrocode} |
| 7398 |
\DeclareDocumentEnvironment { flushright } { o } |
| 7399 |
{ |
| 7400 |
\@@_flushright_begin:n { ##1 } |
| 7401 |
\@@_reference_start_peek: |
| 7402 |
} |
| 7403 |
{ \@@_flushright_end: } |
| 7404 |
% \end{macrocode} |
| 7405 |
% \end{envmacro} |
| 7406 |
% \begin{envmacro}{hanging} |
| 7407 |
% \begin{arguments} |
| 7408 |
% \item \meta{|options|} to set. |
| 7409 |
% \end{arguments} |
| 7410 |
% \begin{macrocode} |
| 7411 |
\DeclareDocumentEnvironment { hanging } { o } |
| 7412 |
{ |
| 7413 |
\@@_hanging_begin:n { ##1 } |
| 7414 |
\@@_reference_start_peek: |
| 7415 |
} |
| 7416 |
{ \@@_hanging_end: } |
| 7417 |
% \end{macrocode} |
| 7418 |
% \end{envmacro} |
| 7419 |
% \vspace{-2\baselineskip} |
| 7420 |
% \begin{envmacro}{midparachap} |
| 7421 |
% \begin{macrocode} |
| 7422 |
\DeclareDocumentEnvironment { midparachap } { o } |
| 7423 |
{ |
| 7424 |
\@@_mid_para_chap_begin:n { ##1 } |
| 7425 |
\@@_reference_start_peek: |
| 7426 |
} |
| 7427 |
{ \@@_mid_para_chap_end: } |
| 7428 |
% \end{macrocode} |
| 7429 |
% \end{envmacro} |
| 7430 |
% \begin{envmacro}{narrow} |
| 7431 |
% \begin{arguments} |
| 7432 |
% \item \meta{|options|} to set. |
| 7433 |
% \end{arguments} |
| 7434 |
% \begin{macrocode} |
| 7435 |
\DeclareDocumentEnvironment { narrow } { o } |
| 7436 |
{ |
| 7437 |
\@@_narrow_begin:n { ##1 } |
| 7438 |
\@@_reference_start_peek: |
| 7439 |
} |
| 7440 |
{ \@@_narrow_end: } |
| 7441 |
% \end{macrocode} |
| 7442 |
% \end{envmacro} |
| 7443 |
% \begin{envmacro}{poetry} |
| 7444 |
% \begin{arguments} |
| 7445 |
% \item \meta{|options|} to set. |
| 7446 |
% \end{arguments} |
| 7447 |
% The \val{poetryaux} environment is required because \cs{@@_obeylines:} |
| 7448 |
% breaks the reading of optional arguments. |
| 7449 |
% \begin{macrocode} |
| 7450 |
\DeclareDocumentEnvironment { poetryaux } { o } |
| 7451 |
{ |
| 7452 |
\tl_if_novalue:nF { ##1 } |
| 7453 |
{ |
| 7454 |
\keys_set:nn |
| 7455 |
{ scripture / poetry } |
| 7456 |
{ ##1 } |
| 7457 |
} |
| 7458 |
\@@_poetry_begin: |
| 7459 |
\@@_reference_start_peek: |
| 7460 |
} |
| 7461 |
{ \@@_poetry_end: } |
| 7462 |
\DeclareDocumentEnvironment { poetry } { } |
| 7463 |
{ |
| 7464 |
\@@_obeylines: |
| 7465 |
\poetryaux |
| 7466 |
} |
| 7467 |
{ \endpoetryaux } |
| 7468 |
% \end{macrocode} |
| 7469 |
% \end{envmacro} |
| 7470 |
% \begin{macrocode} |
| 7471 |
\bool_if:NT \l_@@_inline_bool |
| 7472 |
{ |
| 7473 |
\tl_set:Nn \l_@@_aboveskip_tl { 0pt } |
| 7474 |
\tl_set:Nn \l_@@_belowskip_tl { 0pt } |
| 7475 |
\tl_set:Nn \l_@@_leftmargin_tl { 0pt } |
| 7476 |
\tl_set:Nn \l_@@_rightmargin_tl { 0pt } |
| 7477 |
\cs_set_eq:NN \@@_ref_format:n \@@_inline_ref_format:n |
| 7478 |
\tl_set_eq:NN \l_@@_ref_sep_tl \l_@@_inline_ref_sep_tl |
| 7479 |
\cs_set_eq:NN \@@_version_format:n \@@_inline_version_format:n |
| 7480 |
\tl_set_eq:NN \l_@@_version_delim_tl \l_@@_inline_version_delim_tl |
| 7481 |
\bool_set_false:N \l_@@_chap_para_bool |
| 7482 |
\bool_set_true:N \l_@@_compact_bool |
| 7483 |
\bool_set_false:N \l_@@_heading_show_bool |
| 7484 |
} |
| 7485 |
\bool_if:NT \l_@@_chap_para_bool |
| 7486 |
{ |
| 7487 |
\RenewDocumentEnvironment { midparachap } { o } { \ignorespaces } { \unskip } |
| 7488 |
} |
| 7489 |
\bool_if:NT \l_@@_verse_para_bool |
| 7490 |
{ |
| 7491 |
\cs_set_eq:NN \vs \@@_verse_para_output:n |
| 7492 |
\cs_set_eq:NN \par \@@_para_par: |
| 7493 |
\cs_set_eq:NN \@par \@@_para_par: |
| 7494 |
\cs_set_eq:NN \@doendpe \@@_doendpe: |
| 7495 |
\cs_set_eq:NN \noindent \@@_para_noindent: |
| 7496 |
\cs_set_protected:Npn \\ |
| 7497 |
{ |
| 7498 |
\mode_if_horizontal:TF |
| 7499 |
{ \unskip } |
| 7500 |
{ \@nolnerr } |
| 7501 |
} |
| 7502 |
\RenewDocumentEnvironment { midparachap } { o } |
| 7503 |
{ |
| 7504 |
\str_set:Nn \l_@@_currenvir_str { midparachap } |
| 7505 |
\cs_set_eq:NN \noindent \tex_noindent:D |
| 7506 |
\cs_set_eq:cN { end ~ } \@@_mid_para_chap_end:n |
| 7507 |
\@@_reference_start_peek: |
| 7508 |
} |
| 7509 |
{ |
| 7510 |
\para_end: |
| 7511 |
\bool_gset_false:N \g_@@_suppress_next_pilcrow_bool |
| 7512 |
} |
| 7513 |
} |
| 7514 |
\bool_if:NT \l_@@_compact_bool |
| 7515 |
{ |
| 7516 |
\cs_set_eq:NN \noindent \@@_para_noindent: |
| 7517 |
\bool_if:NF \l_@@_verse_para_bool |
| 7518 |
{ |
| 7519 |
\bool_set_false:N \l_@@_chap_drop_bool |
| 7520 |
\bool_set_false:N \l_@@_chap_drop_llap_bool |
| 7521 |
\bool_set_false:N \l_@@_chap_drop_smash_bool |
| 7522 |
\bool_set_false:N \l_@@_chap_para_bool |
| 7523 |
\cs_set_eq:NN \vs \@@_verse_compact_output:n |
| 7524 |
} |
| 7525 |
\bool_gset:Nn \g_@@_mode_vertical_inner_bool |
| 7526 |
{ \mode_if_vertical_p: } |
| 7527 |
\RenewDocumentEnvironment { center } { o } |
| 7528 |
{ |
| 7529 |
\str_set:Nn \l_@@_currenvir_str { center } |
| 7530 |
\@@_reference_start_peek: |
| 7531 |
} |
| 7532 |
{ \@@_compact_end_inner: } |
| 7533 |
\RenewDocumentEnvironment { flushright } { o } |
| 7534 |
{ |
| 7535 |
\str_set:Nn \l_@@_currenvir_str { flushright } |
| 7536 |
\@@_reference_start_peek: |
| 7537 |
} |
| 7538 |
{ \@@_compact_end_inner: } |
| 7539 |
\RenewDocumentEnvironment { hanging } { o } |
| 7540 |
{ |
| 7541 |
\str_set:Nn \l_@@_currenvir_str { hanging } |
| 7542 |
\@@_reference_start_peek: |
| 7543 |
} |
| 7544 |
{ \@@_compact_end_inner: } |
| 7545 |
\RenewDocumentEnvironment { midparachap } { o } |
| 7546 |
{ |
| 7547 |
\str_set:Nn \l_@@_currenvir_str { midparachap } |
| 7548 |
\cs_set_eq:cN { end ~ } \@@_mid_para_chap_end:n |
| 7549 |
\@@_reference_start_peek: |
| 7550 |
} |
| 7551 |
{ \@@_compact_end_inner: } |
| 7552 |
\RenewDocumentEnvironment { narrow } { o } |
| 7553 |
{ |
| 7554 |
\str_set:Nn \l_@@_currenvir_str { narrow } |
| 7555 |
\@@_reference_start_peek: |
| 7556 |
} |
| 7557 |
{ \@@_compact_end_inner: } |
| 7558 |
\RenewDocumentEnvironment { poetry } { o } |
| 7559 |
{ |
| 7560 |
\str_set:Nn \l_@@_currenvir_str { poetry } |
| 7561 |
\@@_reference_start_peek: |
| 7562 |
} |
| 7563 |
{ \@@_compact_end_inner: } |
| 7564 |
\cs_set_eq:NN \\ \unskip |
| 7565 |
\cs_set_eq:NN \par \@@_compact_par: |
| 7566 |
\cs_set_eq:NN \extraskip \relax |
| 7567 |
\cs_set_eq:NN \nohang \relax |
| 7568 |
\cs_set:Npn \selah |
| 7569 |
{ |
| 7570 |
\group_begin: |
| 7571 |
\l_@@_selah_font_tl |
| 7572 |
\c_space_tl |
| 7573 |
\@@_selah_format:n { \l_@@_selah_text_tl } |
| 7574 |
\c_space_tl |
| 7575 |
\group_end: |
| 7576 |
} |
| 7577 |
\cs_set_protected_nopar:Npn \textright ##1 |
| 7578 |
{ |
| 7579 |
\unskip |
| 7580 |
\c_space_tl |
| 7581 |
##1 |
| 7582 |
} |
| 7583 |
} |
| 7584 |
\@@_reference_start_peek: |
| 7585 |
} |
| 7586 |
{ |
| 7587 |
\bool_lazy_or:nnT \l_@@_compact_bool \l_@@_verse_para_bool |
| 7588 |
{ \cs_set_eq:NN \par \para_end: } |
| 7589 |
\@@_end: |
| 7590 |
} |
| 7591 |
% \end{macrocode} |
| 7592 |
% \end{envmacro} |
| 7593 |
% \begin{macrocode} |
| 7594 |
%</package> |
| 7595 |
% \end{macrocode} |
| 7596 |
% \end{implementation} |
| 7597 |
% |
| 7598 |
% \PrintChanges |
| 7599 |
% |
| 7600 |
% \PrintIndex |