-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscripture.dtx
7364 lines (7364 loc) · 259 KB
/
scripture.dtx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
% \iffalse meta-comment
%
% Copyright (c) 2022-2025 David Purton <[email protected]>
%
% This work may be distributed and/or modified under the conditions of
% the LaTeX Project Public License, either version 1.3c of this license
% or (at your option) any later version. The latest version of this
% license is in
% http://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
%
%<*driver>
\DocumentMetadata{lang=en}
\documentclass[a4paper]{l3doc}
\usepackage[bidi=basic, layout=lists]{babel}
\babelprovide[import, main]{australian}
\babelprovide[import, onchar=ids fonts]{ancientgreek}
\babelprovide[import, onchar=ids fonts]{japanese}
\babelprovide[import, mapdigits, onchar=ids fonts]{persian}
\babelfont[ancientgreek]{rm}[BoldFont=NewCM10-Bold]{NewCM10-Regular}
\babelfont[ancientgreek]{tt}{NewCMMono10-Regular}
\babelfont[japanese]{tt}[Scale=.9]{IPAMincho}
\babelfont[persian]{rm}[Renderer = Harfbuzz]{Amiri}
\babelfont[persian]{tt}[Renderer = Harfbuzz, Scale=.75]{Kawkab Mono Regular}
\usepackage{luatexja-fontspec}
\newcommand{\disablecjk}{%
\ltjsetparameter{jacharrange={-1, -2, -3, -4, -5, -6, -7, -8, -9}}}
\newcommand{\enablecjk}{%
\ltjsetparameter{jacharrange={-1, +2, +3, -4, -5, +6, +7, -8, +9}}}
\disablecjk
\usepackage[parindent=1em]{scripture}
\usepackage[skins]{tcolorbox}
\newtcolorbox{scriptureexample}[1][]{%
bicolor, colframe=cyan, colback=cyan!10, colbacklower=white, left=2mm,
fonttitle=\normalsize\sffamily\bfseries,
subtitle style={before skip=3mm, after skip=3mm},
right=2mm, fontupper=\footnotesize, fontlower=\footnotesize, sidebyside,
sidebyside gap=6mm, sidebyside align=top, lefthand ratio=0.6, before
skip=\bigskipamount, after skip=\bigskipamount, #1
}
\tcbset{%
sidebysidecompare/.style={%
enhanced, colback=white, lefthand ratio=0.5, segmentation empty},
compare/.style={%
standard, colback=white, sidebyside=false}
}
\ExplSyntaxOn
\makeatletter
\hook_gput_code:nnn
{ env / scripture / begin }
{ scripturedoc }
{
\cs_set_eq:NN \list \__codedoc_oldlist:nn
}
\cs_new_protected:Npn \__dcp_codedoc_environment_index:n #1
{
\@bsphack
\begingroup
\__codedoc_target:
\index
{
#1\actualchar{\protect\ttfamily#1}~(environment)
\encapchar hdclindex{\the\c@HD@hypercount}{usage}
}
\index
{
environments:\levelchar#1\actualchar{\protect\ttfamily#1}
\encapchar hdclindex{\the\c@HD@hypercount}{usage}
}
\endgroup
\@esphack
}
\cs_new_protected:Npn \__dcp_codedoc_envmacro_index:nN #1#2
{
\DoNotIndex {#1}
\bool_if:NT #2
{
\__codedoc_if_macro_internal:nF {#1}
{ \seq_gput_right:Nn \g_doc_macros_seq {#1} }
\hbox_set:Nw \l__codedoc_macro_index_box
\hbox_unpack_drop:N \l__codedoc_macro_index_box
\int_gincr:N \c@CodelineNo
\@bsphack
\begingroup
\__codedoc_target:
\index
{
#1\actualchar{\protect\ttfamily#1}~(environment)
\encapchar hdclindex{\the\c@HD@hypercount}{main}
}
\index
{
environments:\levelchar#1\actualchar{\protect\ttfamily#1}
\encapchar hdclindex{\the\c@HD@hypercount}{main}
}
\endgroup
\@esphack
\int_gdecr:N \c@CodelineNo
\exp_args:NNNo \hbox_set_end:
\tl_set:Nn \saved@indexname { \l__codedoc_index_key_tl }
}
}
\cs_new_protected:Npn \__dcp_codedoc_hook_index:n #1
{
\@bsphack
\begingroup
\__codedoc_target:
\index
{
#1\actualchar{\protect\ttfamily#1}~(hook)
\encapchar hdclindex{\the\c@HD@hypercount}{usage}
}
\index
{
hooks:\levelchar#1\actualchar{\protect\ttfamily#1}
\encapchar hdclindex{\the\c@HD@hypercount}{usage}
}
\endgroup
\@esphack
}
\cs_new_protected:Npn \__dcp_codedoc_hookmacro_index:nN #1#2
{
\DoNotIndex {#1}
\bool_if:NT #2
{
\__codedoc_if_macro_internal:nF {#1}
{ \seq_gput_right:Nn \g_doc_macros_seq {#1} }
\hbox_set:Nw \l__codedoc_macro_index_box
\hbox_unpack_drop:N \l__codedoc_macro_index_box
\int_gincr:N \c@CodelineNo
\@bsphack
\begingroup
\__codedoc_target:
\index
{
#1\actualchar{\protect\ttfamily#1}~(hook)
\encapchar hdclindex{\the\c@HD@hypercount}{main}
}
\index
{
hooks:\levelchar#1\actualchar{\protect\ttfamily#1}
\encapchar hdclindex{\the\c@HD@hypercount}{main}
}
\endgroup
\@esphack
\int_gdecr:N \c@CodelineNo
\exp_args:NNNo \hbox_set_end:
\tl_set:Nn \saved@indexname { \l__codedoc_index_key_tl }
}
}
\DeclareDocumentEnvironment { environment } { O{} +v }
{
\clist_map_inline:nn { #2 }
{
\MakeLinkTarget*{environment##1}
}
\cs_set_eq:NN \__codedoc_function_index:n \__dcp_codedoc_environment_index:n
\__codedoc_function:nnw {#1} {#2}
}
{ \__codedoc_function_end: }
\DeclareDocumentEnvironment { hooks } { O{} +v }
{
\clist_map_inline:nn { #2 }
{
\MakeLinkTarget*{hook##1}
}
\bool_if:NTF \l__codedoc_in_implementation_bool
{
\cs_set_eq:NN \__codedoc_macro_index:nN \__dcp_codedoc_hookmacro_index:nN
\__codedoc_macro:nnw { var , #1 } {#2}
}
{
\cs_set_eq:NN \__codedoc_function_index:n \__dcp_codedoc_hook_index:n
\__codedoc_function:nnw {#1} {#2}
}
}
{
\bool_if:NTF \l__codedoc_in_implementation_bool
{ \__codedoc_macro_end: }
{ \__codedoc_function_end: }
}
\DeclareDocumentEnvironment { option } { O{} +v }
{
\cs_set_eq:NN \__codedoc_function_index:n \SpecialOptionIndex
\clist_map_inline:nn { #2 }
{
\MakeLinkTarget*{option##1}
}
\__codedoc_function:nnw {#1} {#2}
}
{ \__codedoc_function_end: }
\DeclareDocumentEnvironment { envmacro } { O{} +v }
{
\cs_set_eq:NN \__codedoc_macro_index:nN \__dcp_codedoc_envmacro_index:nN
\__codedoc_macro:nnw {#1} {#2}
}
{ \__codedoc_macro_end: }
\DeclareDocumentEnvironment { function } { O{} +v }
{
\clist_map_inline:nn { #2 }
{
\MakeLinkTarget*{function##1}
}
\__codedoc_function:nnw {#1} {#2}
}
{ \__codedoc_function_end: }
\DeclareDocumentCommand \env { m }
{
\hyperlink{environment#1}{\texttt{#1}}
}
\DeclareDocumentCommand \opt { m }
{
\hyperlink{option#1}{\texttt{#1}}
}
\DeclareDocumentCommand \hook { m }
{
\hyperlink{hook#1}{\texttt{#1}}
}
\DeclareRobustCommand \val {\texttt}
\DeclareDocumentCommand \fn { O{} m }
{
\hyperlink{function \c_backslash_str #2}{
\__codedoc_cmd:no
{ module = scripture , replace = false , #1 }
{ \c_backslash_str #2} }
}
\makeatother
\ExplSyntaxOff
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
%</driver>
% \fi
%
% \changes{v1.0}{2022/07/27}{First public release}
% \changes{v1.1}{2022/08/27}{Bug fixes}
% \changes{v1.2}{2022/11/02}{Bug fixes}
% \changes{v1.3}{2023/01/08}{Bug fixes}
% \changes{v2.0}{2023/12/26}{Switch \env{scripture} to a \LaTeX{} \val{list}
% based environment}
% \changes{v2.0}{2023/12/27}{Bug fixes}
% \changes{v2.1}{2025/01/02}{Bug fixes}
%
% \title{The \pkg{scripture} package}
% \author{David Purton\thanks{Email: \url{[email protected]}}}
% \date{2025/01/02 v2.1}
%
% \maketitle
%
% \begin{abstract}
% The \pkg{scripture} package provides a set of macros for typesetting
% quotations from the Bible. It provides many features commonly seen in
% Bibles such as dropped text for chapter numbers, superscripts for verse
% numbers, indented lines for poetry sections, narrow sections and hanging
% paragraphs. A reference for the quotation can optionally be added.
% \end{abstract}
%
% \tableofcontents
%
% \begin{documentation}
%
% \section{Introduction}
%
% Bibles tend to use a number of standard features when laying out chapters
% and verses. The main goal for the \pkg{scripture} package is to be able to
% quickly and easily input text and have it output nicely with minimal manual
% adjustment.
%
% The package supports dropped text for chapter numbers, superscripts for
% verse numbers, appropriately indented lines for the first and second halves
% of poetry, flush right sections, centred sections, narrow sections and
% hanging sections.
%
% The package could be used for typesetting an entire Bible, but it is mainly
% envisioned that it will be used for producing Scripture quotations. The
% passage reference can be included on the last line if there is space or
% failing that on the following line.
%
% \subsection{Bug reports and feature requests}
%
% Bug reports and feature requests can be made at the \pkg{scripture} package
% GitHub repository. See \url{https://github.com/dcpurton/scripture}.
%
% \subsection{Limitations}
%
% The \pkg{scripture} package makes extensive use of \LaTeX{} \val{list}
% environments and the \cs{parshape} command. This means there are some
% limitations. In particular, you should not:
% \begin{itemize}
% \item Nest the \env{scripture} environment or any of its internal
% environments.
% \item Modify the \cs{parshape} within a \env{scripture} environment.
% \item Include any other \val{list} based environment within a
% \env{scripture} environment.
% \item Include any \cs{section} (or similar) functions within the
% \env{scripture} environment. A simple \fn{heading} function is provided
% instead.
% \end{itemize}
%
% The \env{poetry} environment uses \cs{obeylines}. This means that it can not
% be placed in the argument of a macro. If you want to use the \env{poetry}
% environment in a \pkg{beamer} slide, you must use the \texttt{fragile} option
% for the \pkg{beamer} \val{frame} environment.
%
% Some attempt is made to encourage appropriate page breaks, especially just
% before a reference is added to a quotation, but this can still sometimes
% fail and a reference will end up on the following page. Usually a little
% more stretchable space on the page before the incorrect break is enough to
% obtain acceptable output.
%
% At least version 2022-11-01 of the \LaTeX\ format is required.
%
% \section{Documentation}
%
% \subsection{Basic usage}
%
% Scripture quotations must be set within a \env{scripture} environment. A
% simple quotation might be produced as follows:
%
% \begin{scriptureexample}
% \begin{verbatim}
% \begin{scripture}[Isaiah 56:1--2][version=NIVUK]
% \ch{56}This is what the \name{Lord} says:
% \begin{poetry}
% `Maintain justice
% and do what is right,
%
% for my salvation is close at hand
% and my righteousness will soon be revealed.
%
% \vs{2}Blessed is the one who does this~--
% the person who holds it fast,
%
% who keeps the Sabbath without desecrating it,
% and keeps their hands from doing any evil.'
% \end{poetry}
% \end{scripture}
% \end{verbatim}
%
% \tcblower
%
% \begin{scripture}[Isaiah 56:1--2][version=NIVUK]
% \ch{56}This is what the \name{Lord} says:
% \begin{poetry}
% `Maintain justice
% and do what is right,
%
% for my salvation is close at hand
% and my righteousness will soon be revealed.
%
% \vs{2}Blessed is the one who does this~--
% the person who holds it fast,
%
% who keeps the Sabbath without desecrating it,
% and keeps their hands from doing any evil.'
% \end{poetry}
% \end{scripture}
% \end{scriptureexample}
%
% \subsection{Macros for typesetting scripture quotations}
%
% \subsubsection{Functions}
%
% \changes{v1.3}{2022/11/15}{Add feature to highlight translator added words}
% \begin{function}[added=2022-11-15]{\added}
% \begin{syntax}
% |\added|\marg{words}
% \end{syntax}
% Some Bible translations mark out words added for clarity not found in the
% original language (e.g., in italics). This can be done using the \fn{added}
% function. The font and format can be set using the \opt{added/font} and
% \opt{added/format} options.
% \end{function}
%
% \begin{scriptureexample}
% \begin{verbatim}
% \begin{scripture}[John 1:18][verse/font=\bfseries,
% verse/format=#1, verse/sep=0.5em, version=KJV]
% \vs{18}No man hath seen God at any time, the
% only begotten Son, which is in the bosom of the
% Father, he hath declared \added{him}.
% \end{scripture}
% \end{verbatim}
%
% \tcblower
%
% \begin{scripture}[John 1:18][verse/font=\bfseries,
% verse/format=#1, verse/sep=0.5em, version=KJV]
% \vs{18}No man hath seen God at any time, the
% only begotten Son, which is in the bosom of the
% Father, he hath declared \added{him}.
% \end{scripture}
% \end{scriptureexample}
%
% \begin{function}{\ch, \ch*}
% \begin{syntax}
% |\ch|\oarg{letter}\marg{chapter number}
% |\ch*|\oarg{letter}\marg{chapter number}
% \end{syntax}
% Format a chapter number. By default these are formatted using drop text
% taking up two lines and the text is separated from the chapter number by a
% horizontal space of 0.5\,em. The drop text is aligned to the top of
% \meta{letter} which defaults to the value of \opt{chapter/xchar}, which in
% turn defaults to a capital \val{X} in the default font.
%
% If the \opt{chapter/drop} option is \val{true} (default), then this function
% attempts to add sufficient space for the dropped chapter when its
% paragraph contains only one line. The starred version suppresses this
% behaviour.
% \end{function}
%
% \begin{scriptureexample}[lefthand ratio=0.55]
% \textbf{\sffamily|\cs{ch}| example}
%
% \begin{verbatim}
% \begin{scripture}[Exodus 20:1--2]
% \ch{20}And God spoke all these words:
% \begin{hanging}
% \noindent\vs{2}`I am the \name{Lord}
% your God, who brought you out of Egypt,
% out of the land of slavery.
% \end{hanging}
% \end{scripture}
% \end{verbatim}
%
% \medskip
%
% \textbf{\sffamily|\cs{ch*}| example}
%
% \begin{verbatim}
% \begin{scripture}[Exodus 20:1--2]
% \ch*{20}And God spoke all these words:
% \begin{hanging}
% \nohang\vs{2}`I am the \name{Lord} your
% God, who brought you out of Egypt, out of
% the land of slavery.
% \end{hanging}
% \end{scripture}
% \end{verbatim}
%
% \tcblower
%
% \textbf{\sffamily|\cs{ch}| example}
%
% \medskip
%
% \begin{scripture}[Exodus 20:1--2]
% \ch{20}And God spoke all these words:
% \begin{hanging}
% \noindent\vs{2}`I am the \name{Lord}
% your God, who brought you out of Egypt,
% out of the land of slavery.
% \end{hanging}
% \end{scripture}
%
% \bigskip
%
% \textbf{\sffamily|\cs{ch*}| example}
%
% \medskip
%
% \begin{scripture}[Exodus 20:1--2]
% \ch*{20}And God spoke all these words:
% \begin{hanging}
% \nohang\vs{2}`I am the \name{Lord} your
% God, who brought you out of Egypt, out of
% the land of slavery.
% \end{hanging}
% \end{scripture}
% \end{scriptureexample}
%
% \begin{function}{\extraskip}
% \begin{syntax}
% |\extraskip|
% \end{syntax}
% Add a small vertical space of \opt{extraskip} between a paragraph. This
% function attempts to add additional space to avoid a clash with a drop
% chapter if required.
% \end{function}
%
% \begin{scriptureexample}
% \begin{verbatim}
% \begin{scripture}[Colossians 1:2]
% \vs{2}To God's holy people in Colossae, the
% faithful brothers and sisters in Christ:
%
% \extraskip
%
% Grace and peace to you from God our Father.
% \end{scripture}
% \end{verbatim}
%
% \tcblower
%
% \begin{scripture}[Colossians 1:2]
% \vs{2}To God's holy people in Colossae, the
% faithful brothers and sisters in Christ:
%
% \extraskip
%
% Grace and peace to you from God our Father.
% \end{scripture}
% \end{scriptureexample}
%
% \changes{v2.1}{2024/11/19}{Add feature to insert simple headings}
% \changes{v2.1}{2024/11/19}{Add \fn{heading} function}
% \begin{function}[added=2024-11-19]{\heading}
% \begin{syntax}
% |\heading|\marg{section heading}
% \end{syntax}
% The \fn{heading} function provides a simple section heading command for
% use within the \env{scripture} environment. Only one level is heading is
% provided. Further levels should be placed outside of the \env{scripture}
% environment. Additionally, the \fn{heading} function may not be used
% within a \env{scripture} inner environment.
%
% The settings of headings can be controlled using the following options:
% \begin{itemize}
% \item \opt{heading/aboveskip}
% \item \opt{heading/afterindent}
% \item \opt{heading/align}
% \item \opt{heading/belowskip}
% \item \opt{heading/font}
% \item \opt{heading/format}
% \item \opt{heading/hide}
% \item \opt{heading/show}
% \end{itemize}
%
% \noindent\textbf{Notes:}
% \begin{itemize}
% \item \cs{section} and related functions are not supported within the
% \env{scripture} environment.
% \item The \fn{heading} function is ignored when the \opt{inline} option
% is \val{true}.
% \end{itemize}
% \end{function}
%
% \begin{scriptureexample}
% \begin{verbatim}
% \begin{scripture}[Luke 21:5–6]
% \heading{Signs of the End of the Age}
%
% \vs{5}Some of his disciples were remarking
% about how the temple was adorned with beautiful
% stones and with gifts dedicated to God. But
% Jesus said, \vs{6}``As for what you see here,
% the time will come when not one stone will be
% left on another; every one of them will be
% thrown down.''
% \end{scripture}
% \end{verbatim}
%
% \tcblower
%
% \begin{scripture}[Luke 21:5–6]
% \heading{Signs of the End of the Age}
%
% \vs{5}Some of his disciples were remarking
% about how the temple was adorned with beautiful
% stones and with gifts dedicated to God. But
% Jesus said, \vs{6}``As for what you see here,
% the time will come when not one stone will be
% left on another; every one of them will be
% thrown down.''
% \end{scripture}
% \end{scriptureexample}
%
% \changes{v1.2}{2022/09/01}{Add divine name feature}
% \begin{function}[added=2022-09-01]{\name, \LORD, \GOD}
% \begin{syntax}
% |\name|\marg{divine name}
% |\LORD|
% |\GOD|
% \end{syntax}
% Modern Bible translations frequently represent God's personal divine name
% using a small capitals typeface. This can be done using the \fn{name}
% function. The font and format can be set using the \opt{name/font} and
% \opt{name/format} options. The \fn{LORD} and \fn{GOD} macros equivalent to
% \fn{name}|{Lord}| and \fn{name}|{God}| respectively.
%
% \textbf{Note:} Watch out that trailing spaces are not eaten by \fn{LORD}
% and \fn{GOD}. Using \fn{name} is safer and semantically better.
% \end{function}
%
% \begin{scriptureexample}
% \begin{verbatim}
% \begin{scripture}[Genesis 15:1--2][version=ESV]
% \ch{15}After these things the word of the
% \name{Lord} came to Abram in a vision: ``Fear
% not, Abram, I am your shield; your reward shall
% be very great.'' \vs{2}But Abram said, ``O Lord
% \name{God}, what will you give me, for I
% continue childless, and the heir of my house is
% Eliezer of Damascus?''
% \end{scripture}
% \end{verbatim}
%
% \tcblower
%
% \begin{scripture}[Genesis 15:1--2][version=ESV]
% \ch{15}After these things the word of the
% \name{Lord} came to Abram in a vision: ``Fear
% not, Abram, I am your shield; your reward shall
% be very great.'' \vs{2}But Abram said, ``O Lord
% \name{God}, what will you give me, for I
% continue childless, and the heir of my house is
% Eliezer of Damascus?''
% \end{scripture}
% \end{scriptureexample}
%
% \changes{v1.3}{2022/11/13}{Add \fn{nofirstverse} function}
% \begin{function}[added=2022-11-13]{\nofirstverse}
% \begin{syntax}
% |\nofirstverse|
% \end{syntax}
% When \opt{verse/first} is |true|, this causes the next \fn{vs} to print
% normally, rather than using the format specified by
% \opt{verse/firstformat}. You might do this if your quote begins half way
% through a paragraph and the first verse should be printed normally.
% \end{function}
%
% \begin{function}{\nohang}
% \begin{syntax}
% |\nohang|
% \end{syntax}
% In a \env{hanging} environment, this function indents the first line of
% the paragraph a length of \opt{hanging/hang} $+$ \opt{parindent}.
% Remaining lines continue to be indented by a length of \opt{hanging/hang}.
% \end{function}
%
% \begin{scriptureexample}
% \begin{verbatim}
% \begin{scripture}[Genesis 1:10--11]
% \begin{hanging}
% \noindent\vs{10}God called the dry ground
% `land', and the gathered waters he called
% `seas'. And God saw that it was good.
%
% \nohang\vs{11}Then God said, `Let the land
% produce vegetation: seed-bearing plants and
% trees on the land that bear fruit with seed
% in it, according to their various kinds.'
% And it was so.
% \end{hanging}
% \end{scripture}
% \end{verbatim}
%
% \tcblower
%
% \begin{scripture}[Genesis 1:10--11]
% \begin{hanging}
% \noindent\vs{10}God called the dry ground
% `land', and the gathered waters he called
% `seas'. And God saw that it was good.
%
% \nohang\vs{11}Then God said, `Let the land
% produce vegetation: seed-bearing plants and
% trees on the land that bear fruit with seed
% in it, according to their various kinds.'
% And it was so.
% \end{hanging}
% \end{scripture}
% \end{scriptureexample}
%
% \changes{v2.1}{2024/01/18}{Add \fn{nopilcrow} function}
% \begin{function}[added=2024-01-18]{\nopilcrow}
% \begin{syntax}
% |\nopilcrow|
% \end{syntax}
% When \opt{pilcrow} is |true|, this causes the next pilcrow that would
% normally by printed to be suppressed. You might do this if your quote
% begins half way through a paragraph and so should not be marked with a
% pilcrow.
% \end{function}
%
% \changes{v1.2}{2022/08/31}{Add red letter feature}
% \begin{function}[added=2022-08-31]{\redletteron, \redletteroff}
% \begin{syntax}
% |\redletteron|
% |\redletteroff|
% \end{syntax}
% Use \fn{redletteron} and \fn{redletteroff} to mark the beginning and end
% of sections of text that should be attributed to Jesus speaking. Some
% attempt is made to ensure that the correct colour continues after an inner
% environment if \fn{redletteron} or \fn{redletteroff} occurs inside the
% inner environment. If you experience problems with unexpected colour, try
% to ensure that matching \fn{redletteron} and \fn{redletteroff} marks occur
% at the same group level. The colour of the text can be set using the
% \opt{redletter/colour} option. These commands only have an effect when the
% \opt{redletter} option is \val{true}.
% \end{function}
%
% \begin{scriptureexample}[lefthand ratio=0.67]
% \begin{verbatim}
% \begin{scripture}[Matthew 21:16--17][redletter]
% \vs{16}`Do you hear what these children are saying?'
% they asked him.
%
% \redletteron `Yes,' \redletteroff replied Jesus,
% \redletteron `have you
% never read,
% \begin{poetry}
% `\thinspace ``From the lips of children and infants
% you, Lord, have called forth your praise''?'
% \end{poetry}\redletteroff
%
% \vs{17}And he left them and went out of the city to
% Bethany, where he spent the night.
% \end{scripture}
% \end{verbatim}
%
% \tcblower
%
% \begin{scripture}[Matthew 21:16--17][redletter]
% \vs{16}`Do you hear what these children are saying?'
% they asked him.
%
% \redletteron `Yes,' \redletteroff replied Jesus,
% \redletteron `have you
% never read,
% \begin{poetry}
% `\thinspace ``From the lips of children and infants
% you, Lord, have called forth your praise''?'
% \end{poetry}\redletteroff
%
% \vs{17}And he left them and went out of the city to
% Bethany, where he spent the night.
% \end{scripture}
% \end{scriptureexample}
%
% \changes{v1.1}{2022/08/07}{Add \fn{scripturecurrentchapter} and
% \fn{scripturecurrentverse} variables}
% \begin{function}[added=2022-08-07]{\scripturecurrentchapter, \scripturecurrentverse}
% \begin{syntax}
% |\scripturecurrentchapter|
% |\scripturecurrentverse|
% \end{syntax}
% \fn{scripturecurrentchapter} and \fn{scripturecurrentverse} globally hold
% the most recent values parsed to \fn{ch} and \fn{vs}. They can initialised
% with \cs{renewcommand*} if required and could be used in hooks, for
% example.
% \end{function}
%
% \begin{function}{\scripturesetup}
% \begin{syntax}
% |\scripturesetup|\marg{options}
% \end{syntax}
% Set default format for quotations. See section \ref{options} for
% supported formatting \meta{|options|}.
% \end{function}
%
% \changes{v2.0}{2023/12/27}{Add \fn{scripturestyle} function}
% \begin{function}[added=2023/12/27]{\scripturestyle, \scripturestyle*}
% \begin{syntax}
% |\scripturestyle|\marg{name}\marg{options}
% |\scripturestyle*|\marg{name}\marg{options}
% \end{syntax}
% Set \meta{|options|} which are saved as style with \meta{|name|}. These
% can later be set with the \opt{style} option. The starred version appends
% \meta{|options|} to an existing style rather than overwriting all options.
% \end{function}
%
% \changes{v1.1}{2022/07/29}{Add \fn{selah} function}
% \begin{function}[added=2022-07-29]{\selah}
% \begin{syntax}
% |\selah|
% \end{syntax}
% In a \env{poetry} environment, this function inserts \emph{Selah} at the
% end of the current line or the end of the following line if there is
% insufficient room. See options \opt{selah/font}, \opt{selah/format},
% \opt{selah/sep} and \opt{selah/text} for options controlling the output.
% \end{function}
%
% \begin{scriptureexample}
% \begin{verbatim}
% \begin{scripture}[Psalm 3:2][version=NIV84]
% \begin{poetry}
% \vs{2}Many are saying of me,
% ``God will not deliver him.''\selah
% \end{poetry}
% \end{scripture}
% \end{verbatim}
%
% \tcblower
%
% \begin{scripture}[Psalm 3:2][version=NIV84]
% \begin{poetry}
% \vs{2}Many are saying of me,
% ``God will not deliver him.''\selah
% \end{poetry}
% \end{scripture}
% \end{scriptureexample}
%
% \changes{v1.2}{2022/08/30}{Add \fn{textright} function}
% \begin{function}[added=2022-08-30]{\textright}
% \begin{syntax}
% |\textright|\marg{text}
% \end{syntax}
% This function inserts \meta{|text|} at the end of the current line or the
% end of the following line if there is insufficient room. The
% \opt{textright/sep} option controls the minimum allowed space before the
% \meta{|text|} to be right aligned.
% \end{function}
%
% \begin{scriptureexample}
% \begin{verbatim}
% \begin{scripture}[Jeremiah 2:29]
% \begin{poetry}
% \vs{5}`Why do you bring charges against me?
% You have all rebelled against me,'
% \textright{declares the \name{Lord}.}
% \end{poetry}
% \end{scripture}
% \end{verbatim}
%
% \tcblower
%
% \begin{scripture}[Jeremiah 2:29]
% \begin{poetry}
% \vs{5}`Why do you bring charges against me?
% You have all rebelled against me,'
% \textright{declares the \name{Lord}.}
% \end{poetry}
% \end{scripture}
% \end{scriptureexample}
%
% \changes{v1.3}{2023/01/07}{Add \fn{textscripture} function}
% \begin{function}[added=2023-01-07]{\textscripture}
% \begin{syntax}
% |\textscripture|\oarg{reference}\oarg{options}\marg{quotation}
% \end{syntax}
% \fn{textscripture} sets an inline scripture quotation. The quotation is
% surrounded be the values of \opt{inline/begin} and \opt{inline/end} which
% default to |``| and |''|, respectively. This function also sets the
% \opt{compact} option and places the \meta{\val{reference}} inline. The
% reference format can be controlled using the following options:
% \begin{itemize}
% \item \opt{inline/reference/format}
% \item \opt{inline/reference/sep}
% \item \opt{inline/version/delim}
% \item \opt{inline/version/format}
% \end{itemize}
% Other \meta{\val{reference}} and \meta{\opt{version}} options are
% inherited.
%
% This function is equivalent to using the \env{scripture} environment with
% the \opt{inline} option.
%
% \textbf{Warning:} \cs{par} is redefined to \cs{relax} inside the
% \fn{textscripture} function. If you have anything other than expected
% macros and environments inside your \fn{textscripture} function \TeX{}
% will likely get stuck in an infinite loop.
% \end{function}
%
% \begin{scriptureexample}
% \begin{verbatim}
% A famous verse in the Bible is:
% \textscripture[John 3:16][verse/hide]{\vs{16}For
% God so loved the world that he gave his one and
% only Son, that whoever believes in him shall not
% perish but have eternal life.}.
% \end{verbatim}
%
% \tcblower
%
% A famous verse in the Bible is:
% \textscripture[John 3:16][verse/hide]{\vs{16}For
% God so loved the world that he gave his one and
% only Son, that whoever believes in him shall not
% perish but have eternal life.}.
% \end{scriptureexample}
%
% \begin{function}{\vs}
% \begin{syntax}
% |\vs|\marg{verse number}
% \end{syntax}
% Format a verse number. By default these are formatted using a superscript.
% \end{function}
%
% \subsubsection{Environments}
%
% All scripture quotations must be set within a \env{scripture} environment.
% The rest of the environments documented below are only defined with the
% \env{scripture} environment. In most cases there is a default small
% \meta{\opt{aboveskip}} and \meta{\opt{belowskip}} inserted above and below
% these internal environments, but these are ignored if the environment is at
% the start or end of a \env{scripture} environment.
%
% \begin{environment}{center}
% \begin{syntax}
% |\begin{center}|\oarg{options}
% \quad\meta{centred text}
% |\end{center}|
% \end{syntax}
% \end{environment}
%
% \noindent Environment for typesetting centred sections of scripture
% quotations.
%
% See section \ref{centeroptions} for supported formatting \meta{|options|}.
%
% \begin{scriptureexample}
% \begin{verbatim}
% \begin{scripture}[Daniel 5:25]
% \vs{25}`This is the inscription that was
% written:
% \begin{center}
% \textsc{mene, mene, tekel, parsin}
% \end{center}
% \end{scripture}
% \end{verbatim}
%
% \tcblower
%
% \begin{scripture}[Daniel 5:25]
% \vs{25}`This is the inscription that was
% written:
% \begin{center}
% \textsc{mene, mene, tekel, parsin}
% \end{center}
% \end{scripture}
% \end{scriptureexample}
%
% \begin{environment}{flushright}
% \begin{syntax}
% |\begin{flushright}|\oarg{options}
% \quad\meta{right aligned text}
% |\end{flushright}|
% \end{syntax}
% \end{environment}
%
% \noindent Environment for typesetting right aligned sections of scripture
% quotations.
%
% See section \ref{flushrightoptions} for supported formatting
% \meta{|options|}.
%
% \begin{scriptureexample}
% \begin{verbatim}
% \begin{scripture}[Isaiah 40:5]
% \begin{poetry}[belowskip = 0pt]
% \vs{5}And the glory of the \name{Lord}\ldots
% and all people will see it together.
% \end{poetry}
%
% \begin{flushright}[aboveskip = 0pt]
% For the mouth of the \name{Lord} \\
% has spoken.'
% \end{flushright}
% \end{scripture}
% \end{verbatim}
%
% \tcblower
%
% \begin{scripture}[Isaiah 40:5]
% \begin{poetry}[belowskip = 0pt]
% \vs{5}And the glory of the \name{Lord}\ldots
% and all people will see it together.
% \end{poetry}
%
% \begin{flushright}[aboveskip = 0pt]
% For the mouth of the \name{Lord} \\
% has spoken.'
% \end{flushright}
% \end{scripture}
% \end{scriptureexample}
%
% \begin{environment}{hanging}
% \begin{syntax}
% |\begin{hanging}|\oarg{options}
% \quad\meta{hanging text}
% |\end{hanging}|
% \end{syntax}
% \end{environment}
%
% \noindent Environment for typesetting hanging sections of scripture
% quotations.
%
% See section \ref{hangingoptions} for supported formatting \meta{|options|}.
%
% \begin{scriptureexample}
% \begin{verbatim}
% \begin{scripture}[Genesis 1:3--5]
% \begin{hanging}
% \vs{3}And God said, `Let there be light,' and
% there was light. \vs{4}God saw that the light
% was good, and he separated the light from the
% darkness. \vs{5}God called the light `day',
% and the darkness he called `night'. And there
% was evening, and there was morn\-ing---the
% first day.
% \end{hanging}
% \end{scripture}
% \end{verbatim}
%
% \tcblower
%
% \begin{scripture}[Genesis 1:3--5]
% \begin{hanging}