summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-01-09 03:04:35 +0000
committerNorbert Preining <norbert@preining.info>2023-01-09 03:04:35 +0000
commit61f8490e549cb7af263b9d903bc20d61ea37a2d7 (patch)
tree60395031acdc563731253b8433644130a524df58 /macros
parent7d5553601ccc6f3feed4f9563a6270739bd4da54 (diff)
CTAN sync 202301090304
Diffstat (limited to 'macros')
-rw-r--r--macros/latex/contrib/bibcop/DEPENDS.txt1
-rw-r--r--macros/latex/contrib/bibcop/LICENSE.txt2
-rw-r--r--macros/latex/contrib/bibcop/README.md8
-rw-r--r--macros/latex/contrib/bibcop/bibcop.12
-rw-r--r--macros/latex/contrib/bibcop/bibcop.dtx36
-rw-r--r--macros/latex/contrib/bibcop/bibcop.ins4
-rw-r--r--macros/latex/contrib/bibcop/bibcop.pdfbin342237 -> 342958 bytes
-rwxr-xr-xmacros/latex/contrib/bibcop/bibcop.pl6
-rw-r--r--macros/latex/contrib/colorist/colorart.cls2
-rw-r--r--macros/latex/contrib/colorist/colorbook.cls2
-rw-r--r--macros/latex/contrib/colorist/colorist-fancy.sty52
-rw-r--r--macros/latex/contrib/colorist/colorist.sty2
-rw-r--r--macros/latex/contrib/nicefilelist/README13
-rw-r--r--macros/latex/contrib/nicefilelist/doc/SrcFILEs.txt24
-rw-r--r--macros/latex/contrib/nicefilelist/doc/nicefilelist.RLS21
-rw-r--r--macros/latex/contrib/nicefilelist/doc/nicefilelist.pdfbin599529 -> 604616 bytes
-rw-r--r--macros/latex/contrib/nicefilelist/source/nicefilelist.tex82
-rw-r--r--macros/latex/contrib/nicefilelist/source/provonly.fd2
-rw-r--r--macros/latex/contrib/nicefilelist/source/srcfiles.tex2
-rw-r--r--macros/latex/contrib/nicefilelist/tex/nicefilelist.sty384
-rw-r--r--macros/latex/contrib/scripture/README.md2
-rw-r--r--macros/latex/contrib/scripture/scripture.dtx667
-rw-r--r--macros/latex/contrib/scripture/scripture.ins4
-rw-r--r--macros/latex/contrib/scripture/scripture.pdfbin911199 -> 956076 bytes
24 files changed, 990 insertions, 328 deletions
diff --git a/macros/latex/contrib/bibcop/DEPENDS.txt b/macros/latex/contrib/bibcop/DEPENDS.txt
index 6767eafad4..32acfffc04 100644
--- a/macros/latex/contrib/bibcop/DEPENDS.txt
+++ b/macros/latex/contrib/bibcop/DEPENDS.txt
@@ -1,3 +1,2 @@
hard iexec
-hard verbatimcopy
hard pgfopts
diff --git a/macros/latex/contrib/bibcop/LICENSE.txt b/macros/latex/contrib/bibcop/LICENSE.txt
index 463e7d252d..4351be233c 100644
--- a/macros/latex/contrib/bibcop/LICENSE.txt
+++ b/macros/latex/contrib/bibcop/LICENSE.txt
@@ -1,6 +1,6 @@
(The MIT License)
-Copyright (c) 2022 Yegor Bugayenko
+Copyright (c) 2022-2023 Yegor Bugayenko
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the 'Software'), to deal
diff --git a/macros/latex/contrib/bibcop/README.md b/macros/latex/contrib/bibcop/README.md
index f3cf12395b..471c4dcdcb 100644
--- a/macros/latex/contrib/bibcop/README.md
+++ b/macros/latex/contrib/bibcop/README.md
@@ -5,10 +5,10 @@
[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/yegor256/bibcop/blob/master/LICENSE.txt)
This LaTeX package checks the quality of your `.bib` file and
-emits warning message if any issues found. You may also like
+emits warning message if any issues are found. You may also like
[biblint](https://github.com/Kingsford-Group/biblint) and
[biblatex-check](https://github.com/pezmc/biblatex-check) tools —
-they does almost the same but from the command line.
+they do _almost_ the same but from the command line.
First, [install it](https://en.wikibooks.org/wiki/LaTeX/Installing_Extra_Packages)
from [CTAN](https://ctan.org/pkg/bibcop)
@@ -23,9 +23,9 @@ and then use in the preamble (if you use BibTeX, for example):
\end{document}
```
-Otherwise, you can download [`bibcop.sty`](https://raw.githubusercontent.com/yegor256/bibcop/gh-pages/bibcop/bibcop.sty) and add to your project.
+Otherwise, you can download [`bibcop.sty`](https://raw.githubusercontent.com/yegor256/bibcop/gh-pages/bibcop/bibcop.sty) and add to your project (together with [`bibcop.pl`](https://raw.githubusercontent.com/yegor256/bibcop/master/bibcop.pl)!).
-You can also download [bibcop.pl](https://raw.githubusercontent.com/yegor256/bibcop/master/bibcop.pl)
+You can also download [`bibcop.pl`](https://raw.githubusercontent.com/yegor256/bibcop/master/bibcop.pl)
and use it as a command line tool
to check your `.bib` files and to auto-fix them
(you should have [Perl](https://www.perl.org) installed):
diff --git a/macros/latex/contrib/bibcop/bibcop.1 b/macros/latex/contrib/bibcop/bibcop.1
index ad76da0bf0..4e45ba6c02 100644
--- a/macros/latex/contrib/bibcop/bibcop.1
+++ b/macros/latex/contrib/bibcop/bibcop.1
@@ -1,4 +1,4 @@
-.TH bibcop 1 "2022-12-18"
+.TH bibcop 1 "2023-01-08"
.SH NAME
bibcop \- Style Checker and Fixer of BibTeX Files (.bib)
.SH SYNOPSIS
diff --git a/macros/latex/contrib/bibcop/bibcop.dtx b/macros/latex/contrib/bibcop/bibcop.dtx
index ce2e070d3e..d084f00961 100644
--- a/macros/latex/contrib/bibcop/bibcop.dtx
+++ b/macros/latex/contrib/bibcop/bibcop.dtx
@@ -1,7 +1,7 @@
% \iffalse meta-comment
% (The MIT License)
%
-% Copyright (c) 2022 Yegor Bugayenko
+% Copyright (c) 2022-2023 Yegor Bugayenko
%
% Permission is hereby granted, free of charge, to any person obtaining a copy
% of this software and associated documentation files (the 'Software'), to deal
@@ -50,7 +50,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{bibcop}
%<*package>
-[2022-12-18 0.0.5 Style Checker of Bibliography Files]
+[2023-01-08 0.0.6 Style Checker of Bibliography Files]
%</package>
%<*driver>
\documentclass{ltxdoc}
@@ -137,6 +137,18 @@
%</verb>
%\fi
+% \DescribeMacro{script}
+% The package depends on the |bibcop.pl| file, which is a Perl script that does all the work. This file is supposed to be located either in the current directory or in the |texmf-dist/scripts/bibcop/| directory. Using the |script| option the location of the script may be explicitly defined (it is not recommended to use this option unless there is a special demand for it):
+%\iffalse
+%<*verb>
+%\fi
+\begin{verbatim}
+\usepackage[script=my-perl-script.pl]{bibcop}
+\end{verbatim}
+%\iffalse
+%</verb>
+%\fi
+
% \section{The Rules}
% This is a more or less complete list of rules enforced on a |.bib| file:
@@ -375,6 +387,7 @@ booktitle = {{Proceedings of the International
% \changes{0.0.4}{2022/12/14}{Extra checks for the typography, together with more extensive Perl testing.}
% \changes{0.0.4}{2022/12/14}{The \texttt{--verbose} option introduced, to enable debugging information only on demand.}
% \changes{0.0.4}{2022/12/15}{Package options introduced, the \texttt{verbose} option enables detailed logging inside the \TeX{} log.}
+% \changes{0.0.6}{2023/01/08}{The \texttt{script} package option introduced, to enable explicit configuration of the location of the \texttt{bibcop.pl} Perl script.}
% First, we include a few packages.
% We need \href{https://ctan.org/pkg/iexec}{iexec} for executing Perl scripts:
@@ -388,17 +401,22 @@ booktitle = {{Proceedings of the International
\pgfkeys{
/bibcop/.cd,
verbose/.store in=\bibcop@verbose,
+ script/.store in = \bibcop@script,
}
\ProcessPgfPackageOptions{/bibcop}
% \end{macrocode}
% \begin{macro}{bibcop.pl}
-% Then, we copy the Perl script using |\VerbatimCopy| from
-% \href{https://ctan.org/pkg/verbatimcopy}{verbatimcopy}:
+% Then, we find the Perl script:
% \begin{macrocode}
-\RequirePackage{verbatimcopy}
-\VerbatimCopy{bibcop.pl}{bibcop.tmp.pl}
-\message{bibcop: File with Perl script 'bibcop.pl' copied^^J}%
+\makeatletter
+\ifdefined\bibcop@script\else
+ \IfFileExists{bibcop.pl}
+ {\gdef\bibcop@script{perl ./bibcop.pl}}
+ {\gdef\bibcop@script{bibcop}}
+\fi
+\message{bibcop: The Perl script is at '\bibcop@script'^^J}%
+\makeatother
% \end{macrocode}
% \end{macro}
@@ -409,7 +427,7 @@ booktitle = {{Proceedings of the International
\ifdefined\bibliography
\let\bibcop@oldbibliography\bibliography
\renewcommand\bibliography[1]{%
- \iexec{perl "./bibcop.tmp.pl"\space
+ \iexec{\bibcop@script\space
\ifdefined\bibcop@verbose--verbose\fi\space
--latex '#1.bib'}%
\message{bibcop: style checking finished^^J}%
@@ -427,7 +445,7 @@ booktitle = {{Proceedings of the International
\ifdefined\addbibresource
\let\bibcop@oldaddbibresource\addbibresource
\renewcommand\addbibresource[1]{%
- \iexec{perl "./bibcop.tmp.pl"\space
+ \iexec{\bibcop@script\space
\ifdefined\bibcop@verbose--verbose\fi\space
--latex '#1'}%
\message{bibcop: style checking finished^^J}%
diff --git a/macros/latex/contrib/bibcop/bibcop.ins b/macros/latex/contrib/bibcop/bibcop.ins
index 4c619469dd..d0ea50f43c 100644
--- a/macros/latex/contrib/bibcop/bibcop.ins
+++ b/macros/latex/contrib/bibcop/bibcop.ins
@@ -1,6 +1,6 @@
%% (The MIT License)
%%
-%% Copyright (c) 2022 Yegor Bugayenko
+%% Copyright (c) 2022-2023 Yegor Bugayenko
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this software and associated documentation files (the 'Software'), to deal
@@ -26,7 +26,7 @@
\preamble
(The MIT License)
-Copyright (c) 2022 Yegor Bugayenko
+Copyright (c) 2022-2023 Yegor Bugayenko
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the 'Software'), to deal
diff --git a/macros/latex/contrib/bibcop/bibcop.pdf b/macros/latex/contrib/bibcop/bibcop.pdf
index 3acc1c3c70..1971661357 100644
--- a/macros/latex/contrib/bibcop/bibcop.pdf
+++ b/macros/latex/contrib/bibcop/bibcop.pdf
Binary files differ
diff --git a/macros/latex/contrib/bibcop/bibcop.pl b/macros/latex/contrib/bibcop/bibcop.pl
index 9027dd483f..3deda06e45 100755
--- a/macros/latex/contrib/bibcop/bibcop.pl
+++ b/macros/latex/contrib/bibcop/bibcop.pl
@@ -1,7 +1,7 @@
#!/usr/bin/perl
# (The MIT License)
#
-# Copyright (c) 2022 Yegor Bugayenko
+# Copyright (c) 2022-2023 Yegor Bugayenko
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the 'Software'), to deal
@@ -530,7 +530,7 @@ sub listed_tags {
sub error {
my ($txt) = @_;
if (exists $args{'--latex'}) {
- print "\\PackageError{bibcop}{$txt}\n";
+ print "\\PackageError{bibcop}{$txt}{}\n";
exit 0;
} else {
print STDERR $txt . "\n";
@@ -581,7 +581,7 @@ if (@ARGV+0 eq 0 or exists $args{'--help'} or exists $args{'-?'}) {
" --latex Report errors in LaTeX format using \\PackageWarningNoLine command\n\n" .
"If any issues, report to GitHub: https://github.com/yegor256/bibcop");
} elsif (exists $args{'--version'} or exists $args{'-v'}) {
- info('0.0.5');
+ info('0.0.6');
} else {
my ($file) = grep { not($_ =~ /^--.*$/) } @ARGV;
if (not $file) {
diff --git a/macros/latex/contrib/colorist/colorart.cls b/macros/latex/contrib/colorist/colorart.cls
index 041d38111f..16858b67a9 100644
--- a/macros/latex/contrib/colorist/colorart.cls
+++ b/macros/latex/contrib/colorist/colorart.cls
@@ -18,7 +18,7 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplClass
{colorart}
- {2023/01/05} {}
+ {2023/01/08} {}
{A colorful article style}
\tl_const:Nn \l__colorclass_base_class_tl { article }
diff --git a/macros/latex/contrib/colorist/colorbook.cls b/macros/latex/contrib/colorist/colorbook.cls
index f4f8e267b6..913e17590d 100644
--- a/macros/latex/contrib/colorist/colorbook.cls
+++ b/macros/latex/contrib/colorist/colorbook.cls
@@ -18,7 +18,7 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplClass
{colorbook}
- {2023/01/05} {}
+ {2023/01/08} {}
{A colorful book style}
\tl_const:Nn \l__colorclass_base_class_tl { book }
diff --git a/macros/latex/contrib/colorist/colorist-fancy.sty b/macros/latex/contrib/colorist/colorist-fancy.sty
index 76b7acf3a1..0d620fed42 100644
--- a/macros/latex/contrib/colorist/colorist-fancy.sty
+++ b/macros/latex/contrib/colorist/colorist-fancy.sty
@@ -18,7 +18,7 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplPackage
{colorist-fancy}
- {2023/01/05} {}
+ {2023/01/08} {}
{The fancy style of colorist}
\IfPackageLoadedTF { colorist } {}
@@ -451,19 +451,19 @@
{\titlerule*[10pt]{\parbox{3pt}{\hspace*{-.25pt}\textcolor{main-text!15!paper}{.}}}\color{maintheme}\normalfont\sffamily\contentspage}
\titlecontents{section}
[5.25em] % i.e., 2em (chapter) + 2.75em + 0.5em
- {\addvspace{.3pc}\normalfont\color{maintheme}\sffamily}
+ {\addvspace{.3pc}\normalfont\color{main-text}\sffamily}
{\contentslabel{2.75em}}
{\hspace*{-2.75em}}
- {\titlerule*[10pt]{\parbox{3pt}{\textcolor{main-text!15!paper}{.}}}\color{maintheme}\contentspage}
+ {\titlerule*[10pt]{\parbox{3pt}{\textcolor{main-text!15!paper}{.}}}\color{main-text}\contentspage}
\titlecontents{subsection}
- [9.5em] % i.e., 5.25em (section) + 3.5em + 0.75em
- {\addvspace{.15pc}\normalfont\sffamily}
+ [9em] % i.e., 5.25em (section) + 3.5em + 0.25em
+ {\addvspace{.15pc}\normalfont\color{main-text!60!paper}\sffamily}
{\contentslabel{3.50em}}
{\hspace*{-3.50em}}
- {\titlerule*[10pt]{\parbox{3pt}{\textcolor{main-text!15!paper}{.}}}\color{main-text!45!paper}\contentspage}
+ {\titlerule*[10pt]{\parbox{3pt}{\textcolor{main-text!15!paper}{.}}}\color{main-text!60!paper}\contentspage}
\titlecontents{subsubsection}
- [14em] % i.e., 9.5em (subsection) + 3.75em + 0.75em
- {\normalfont\sffamily}
+ [13em] % i.e., 9em (subsection) + 3.75em + 0.25em
+ {\normalfont\color{main-text!45!paper}\sffamily}
{\contentslabel{3.75em}}
{\hspace*{-3.75em}}
{\titlerule*[10pt]{\parbox{3pt}{\textcolor{main-text!15!paper}{.}}}\color{main-text!45!paper}\contentspage}
@@ -776,10 +776,19 @@ heading_suffix "}\n"
\renewcommand\Hy@numberline[1]{#1.~}
% https://tex.stackexchange.com/a/1821
% Add the bookmark of ToC
- \hook_gput_code:nnn { cmd/tableofcontents/before } { colorist }
+ \bool_if:NTF \l__colorist_is_book_bool
+ {
+ \hook_gput_code:nnn { cmd/tableofcontents/before } { colorist }
+ {
+ \if@openright\cleardoublepage\else\clearpage\fi
+ \pdfbookmark[0]{\contentsname}{toc}
+ }
+ }
{
- \if@openright\cleardoublepage\else\clearpage\fi
- \pdfbookmark[0]{\contentsname}{toc}
+ \hook_gput_code:nnn { cmd/tableofcontents/before } { colorist }
+ {
+ \pdfbookmark[1]{\contentsname}{toc}
+ }
}
}
@@ -1133,16 +1142,15 @@ heading_suffix "}\n"
}
\RequirePackage { projlib-titlepage }
- \renewcommand{\maketitle}{
- \LocallyStopLineNumbers
- \ProjLibTitlePage
- {
- , title = \@title
- , author = \@author
- , date = \@date
- }
- \ResumeLineNumbers
- }
+ \RenewDocumentCommand \maketitle { O{} }
+ {
+ \ProjLibTitlePage[#1]
+ {
+ , title = \@title
+ , author = \@author
+ , date = \@date
+ }
+ }
}
{
\renewcommand{\@maketitle}
@@ -1186,7 +1194,7 @@ heading_suffix "}\n"
}
\newenvironment{keyword}
- {\small\centerline{{ \colorist_bfseries: \keywordname}}\vspace{-0.3\baselineskip}
+ {\small\centerline{{ \colorist_bfseries: \sffamily\keywordname}}\vspace{-0.3\baselineskip}
\color{main-text!80!paper}\begin{center}}
{\end{center}\medskip}
} % end of \bool_if:NTF \l__colorist_is_book_bool
diff --git a/macros/latex/contrib/colorist/colorist.sty b/macros/latex/contrib/colorist/colorist.sty
index d85b763893..551a9add41 100644
--- a/macros/latex/contrib/colorist/colorist.sty
+++ b/macros/latex/contrib/colorist/colorist.sty
@@ -18,7 +18,7 @@
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\ProvidesExplPackage
{colorist}
- {2023/01/05} {}
+ {2023/01/08} {}
{A colorful style for articles and books}
\keys_define:nn { colorist }
diff --git a/macros/latex/contrib/nicefilelist/README b/macros/latex/contrib/nicefilelist/README
index ab4964ab74..7c56b70707 100644
--- a/macros/latex/contrib/nicefilelist/README
+++ b/macros/latex/contrib/nicefilelist/README
@@ -1,25 +1,28 @@
README for the `nicefilelist' package
\listfiles Alignment with Date and Version Columns
© Uwe Lück 2012/10/30 (deceased June 2020,
- 2022-12-05 v0.8a patched by H.-Martin Münch,
+ 2023-01-08 v0.9a patched by H.-Martin Münch,
original package version 0.7a has been archived at
https://web.archive.org/web/20221205210517/
https://mirror.mwt.me/ctan/install/macros/
latex/contrib/nicefilelist.tds.zip)
While `longnamefilelist.sty' improves LaTeX's \listfiles with
-respect to long base filenames only, the present `nicefilelist.sty'
+respect to long base file-names only, the present `nicefilelist.sty'
can keep separate columns for
(i) date (ii) version, and (iii) "caption"
(don't write caption text in date column),
-their alignment not being disturbed by short filename extensions
+their alignment not being disturbed by short file-name extensions
such as `.fd'. This is achieved basing on the `monofill' package.
v0.7 offers a package option `[wrap]' for automatic word wrapping
within the caption column, using the `hardwrap' package,
-so filenames and captions can be quite long without disturbing
+so file-names and captions can be quite long without disturbing
the alignment.
+v0.9a offers a package option `[autolength]' for automatic sizing
+of the columns, using the `xstring' package.
+
As opposed to the `dateiliste' package, this is about the plain
text output in the `.log' file or, with `myfilist', as a stand-
alone plain text file.
@@ -51,6 +54,6 @@ The latest public version of the package is available at
https://mirror.ctan.org/macros/latex/contrib/nicefilelist/
-A TDS version of the package is available as
+A TDS version of the package is available at
https://mirror.ctan.org/install/macros/latex/contrib/nicefilelist.tds.zip \ No newline at end of file
diff --git a/macros/latex/contrib/nicefilelist/doc/SrcFILEs.txt b/macros/latex/contrib/nicefilelist/doc/SrcFILEs.txt
index 6209222cfb..1d0a9bc538 100644
--- a/macros/latex/contrib/nicefilelist/doc/SrcFILEs.txt
+++ b/macros/latex/contrib/nicefilelist/doc/SrcFILEs.txt
@@ -1,17 +1,17 @@
*File List*
------RELEASE.--- -- -- -- -- --
-nicefilelist.RLS 2022/12/05 v0.8a date: dashes OK
------PACKAGE.--- -- -- -- -- --
-nicefilelist.sty 2022/12/05 v0.8a more file list alignment (UL)
-------DOCSRC.--- -- -- -- -- --
-nicefilelist.tex 2022/12/05 -- documenting nicefilelist.sty
- srcfiles.tex 2022/12/05 -- file infos -> SrcFILEs.txt
---------DEMO.--- -- -- -- -- --
+-----RELEASE.--- -- -- -- -- --
+nicefilelist.RLS 2023/01/08 v0.9a ver@@; option autolength
+-----PACKAGE.--- -- -- -- -- --
+nicefilelist.sty 2023/01/08 v0.9a more file list alignment (UL)
+------DOCSRC.--- -- -- -- -- --
+nicefilelist.tex 2023/01/08 -- documenting nicefilelist.sty
+ srcfiles.tex 2023/01/08 -- file infos -> SrcFILEs.txt
+--------DEMO.--- -- -- -- -- --
provonly.fd -- -- -- -- no date, no version, but a lot of info,
look how that is wrapped!
wrong.prv * NOT FOUND *
empty.f * NOT FOUND *
---------USED.--- -- -- -- -- --
+--------USED.--- -- -- -- -- --
hardwrap.sty 2011/02/12 v0.2 Hard wrap messages
myfilist.sty 2012/11/22 v0.71 \listfiles -- mine only (UL)
readprov.sty 2012/11/22 v0.5 file infos without loading (UL)
@@ -21,9 +21,9 @@ nicefilelist.tex 2022/12/05 -- documenting nicefilelist.sty
texlinks.sty 2015/07/20 v0.83 TeX-related links (UL)
makedoc.cfg 2013/03/25 -- documentation settings
mdoccorr.cfg 2012/11/13 -- `makedoc' local typographical corrections
--not-so-much.--- -- -- -- -- --
- kvsetkeys.sty 2019/12/15 v1.18 Key value parser (HO)
+-not-so-much.--- -- -- -- -- --
+ kvsetkeys.sty 2022-10-05 v1.19 Key value parser (HO)
***********
- List made at 2022/12/05, 16:05
+ List made at 2023/01/08, 00:00
from script file srcfiles.tex \ No newline at end of file
diff --git a/macros/latex/contrib/nicefilelist/doc/nicefilelist.RLS b/macros/latex/contrib/nicefilelist/doc/nicefilelist.RLS
index a40c48ea2b..fee0d9b4ca 100644
--- a/macros/latex/contrib/nicefilelist/doc/nicefilelist.RLS
+++ b/macros/latex/contrib/nicefilelist/doc/nicefilelist.RLS
@@ -1,10 +1,11 @@
-\ProvidesFile{nicefilelist.RLS} %% RELEASE INFO
- [{2022/12/05 v0.8a date: dashes OK}]
- [{2012/12/12 v0.7a [wrap], `mono' typo, vs.}]
- [{2012/10/30 r0.7 v0.7 [wrap] option}]
- [{2012/10/11 r0.6 v0.6 \string\MaxBaseEmptyList*}]
- [2012/10/01 r0.5 v0.5 \string\MaxBaseEmptyList]
- [{2012/05/20 r0.4 v0.4 Kabelschacht + [r] }]
- [2012/05/20 v0.3 Kabelschacht reimplementation]
- [2012/03/29 v0.2 reimpl.: much within \string\typeout]
- [2012/03/23 v0.1(a) initial] \ No newline at end of file
+\ProvidesFile{nicefilelist.RLS}%% RELEASE INFO
+ [2023/01/08 v0.9a ver@@; option autolength]
+ [2022/12/05 v0.8a date: dashes OK]
+ [2012/12/12 v0.7a [wrap], `mono' typo, vs.]
+ [2012/10/30 r0.7 v0.7 [wrap] option]
+ [2012/10/11 r0.6 v0.6 \string\MaxBaseEmptyList*]
+ [2012/10/01 r0.5 v0.5 \string\MaxBaseEmptyList]
+ [2012/05/20 r0.4 v0.4 Kabelschacht + [r]]
+ [2012/05/20 v0.3 Kabelschacht reimplementation]
+ [2012/03/29 v0.2 reimpl.: much within \string\typeout]
+ [2012/03/23 v0.1(a) initial] \ No newline at end of file
diff --git a/macros/latex/contrib/nicefilelist/doc/nicefilelist.pdf b/macros/latex/contrib/nicefilelist/doc/nicefilelist.pdf
index ec61c39601..c062cb5c46 100644
--- a/macros/latex/contrib/nicefilelist/doc/nicefilelist.pdf
+++ b/macros/latex/contrib/nicefilelist/doc/nicefilelist.pdf
Binary files differ
diff --git a/macros/latex/contrib/nicefilelist/source/nicefilelist.tex b/macros/latex/contrib/nicefilelist/source/nicefilelist.tex
index 61681852f7..40cdb2f8aa 100644
--- a/macros/latex/contrib/nicefilelist/source/nicefilelist.tex
+++ b/macros/latex/contrib/nicefilelist/source/nicefilelist.tex
@@ -1,4 +1,4 @@
-\ProvidesFile{nicefilelist.tex}[2022/12/05 documenting nicefilelist.sty]
+\ProvidesFile{nicefilelist.tex}[2023/01/08 documenting nicefilelist.sty]
\title{\pkg{\huge nicefilelist.sty
}\\---\\\cs{listfiles} Alignment for Connoisseurs\thanks{This
document describes version
@@ -19,7 +19,7 @@
While \CtanPkgRef{longnamefilelist}{longnamefilelist.sty}
improves \LaTeX's \cs{listfiles} with respect to long base filenames only,
'nicefilelist.sty' can keep separate columns for
-(i)~date, (ii)~version, and (iii)~``caption" %% 1st , 2012/10/30
+(i)~date, (ii)~version, and (iii)~``caption" %% 1st, 2012/10/30
(don't write caption text in date column),
their alignment not being disturbed by short filename extensions such as `.fd'.
This is achieved basing on the \ctanpkgref{monofill} package.
@@ -84,7 +84,7 @@ you load 'nicefilelist.sty' (as usually) by
\[`\usepackage{nicefilelist}'\]
or by
\[`\usepackage[<options>]{nicefilelist}'\]
-where <options> may be `r', `wrap', or `r,wrap'~\dots---see
+where <options> may be `r', `wrap', and/or `autolength'---see
summaries in sections~\ref{sec:set} and \ref{sec:opt}
on the package options and an example in section~\ref{sec:short}.
Alternatively---e.g., for use with \ctanpkgref{myfilist} from the
@@ -159,6 +159,10 @@ Probably only adjusting the width for \emph{base} filenames
is required in real life, see the example in section~\ref{sec:short}.
(But there exist extensions .info and .mkii and versions
v4.6.3.1 (fontawesome.sty).)
+%% 2023-01-06
+Option `autolength' measures the respective length of the field and
+writes it into the .aux file for use in the next compilation run.
+This option requires \LaTeX{} format-version at least 2022-11-01.
The spaces between the columns are determined by macros
|\NFLspaceI|, |\NFLspaceII|, and |\NFLspaceIII|,
@@ -185,22 +189,21 @@ some ``newline sequence" before the first word that is too much,
and we use this feature here to put the next word into the
\emph{caption column} rather than at the beginning of the next line.
(Details and implementation are in section~\ref{sec:opt}.)
-\pagebreak
If you are not happy with the column width that 'hardwrap'
chooses, but want to assume your own width <max-line-chars>
(e.g., your width, measured by your doctor, divided by the
width of one character),
compute its difference <max-line-chars-minus-one> to 1
-(maybe by your electronic calculator, or an emulation, or
- a Lua script, cf.~\ctanpkgref{lualatex-doc}, or by
- \ctanpkgref{bigintcalc}), and enter
+(maybe by your electronic calculator, or an emulation,
+or a Lua script, cf.~\ctanpkgref{lualatex-doc}, or by
+\ctanpkgref{bigintcalc}), and enter
the 'hardwrap' instruction
\[|\setmaxprintline{<max-line-chars-minus-one>}|\]
when 'hardwrap' or 'nicefilelist' have been loaded
\emph{and} before the internal macro `\@dofilelist' is run
(which happens at the end of the document or when
- \ctanpkgref{myfilist}'s `\ListInfos' is issued, for instance).
+\ctanpkgref{myfilist}'s `\ListInfos' is issued, for instance).
\subsection{Usage and Samples with 'myfilist.sty'}
\label{sec:myfilist}
@@ -253,32 +256,47 @@ The previous code mentions the following files:
Moreover, my `.tex' files have dates, but not version numbers,
so you see what happens then:
\vskip\topsep
-\begin{small}\tt
-\obeyspaces\obeylines
-~ *File List*
-nicefilelist.sty 2012/03/23 v0.1 \rlap{more file list alignment (UL)}
-~ monofill.sty 2012/03/19 v0.1a monospace alignment (UL)
-~ myfilist.sty 2011/01/30 v0.3a \rlap{\cs{listfiles} -- mine only (UL)}
-~ readprov.sty 2010/11/27 v0.3 \rlap{file infos without loading (UL)}
-nicefilelist.tex 2012/03/23 -- \rlap{documenting nicefilelist.sty}
-~ provonly.fd -- -- -- -- such
-~ wrong.prv * NOT FOUND *
-~ empty.f * NOT FOUND *
-~ srcfiles.tex 2012/03/23 -- file infos -> SrcFILEs.txt
-~ ***********
-~
-~List made at 2012/03/23, 10:31
-~from script file srcfiles.tex
+\begin{small}
+\begin{verbatim}
+ *File List*
+-----RELEASE.--- -- -- -- -- --
+nicefilelist.RLS 2023/01/08 v0.9a ver@@; option autolength
+-----PACKAGE.--- -- -- -- -- --
+nicefilelist.sty 2023/01/08 v0.9a more file list alignment (UL)
+------DOCSRC.--- -- -- -- -- --
+nicefilelist.tex 2023/01/08 -- documenting nicefilelist.sty
+ srcfiles.tex 2023/01/08 -- file infos -> SrcFILEs.txt
+--------DEMO.--- -- -- -- -- --
+ provonly.fd -- -- -- -- no date, no version, but a lot of info,
+ look how that is wrapped!
+ wrong.prv * NOT FOUND *
+ empty.f * NOT FOUND *
+--------USED.--- -- -- -- -- --
+ hardwrap.sty 2011/02/12 v0.2 Hard wrap messages
+ myfilist.sty 2012/11/22 v0.71 \listfiles -- mine only (UL)
+ readprov.sty 2012/11/22 v0.5 file infos without loading (UL)
+ fifinddo.sty 2012/11/17 v0.61 filtering TeX(t) files by TeX (UL)
+ makedoc.sty 2012/08/28 v0.52 TeX input from *.sty (UL)
+ niceverb.sty 2015/11/21 v0.62 minimize doc markup (UL)
+ texlinks.sty 2015/07/20 v0.83 TeX-related links (UL)
+ makedoc.cfg 2013/03/25 -- documentation settings
+ mdoccorr.cfg 2012/11/13 -- `makedoc' local typographical corrections
+-not-so-much.--- -- -- -- -- --
+ kvsetkeys.sty 2022-10-05 v1.19 Key value parser (HO)
+ ***********
+
+ List made at 2023/01/08, 00:00
+ from script file srcfiles.tex
+\end{verbatim}
\end{small}
-%% TODO update example!?
-%%
+
\subsubsection{More Generally and Shorthand}
\label{sec:short}
\AddQuotes %% 2012/10/11
In the above example, the 'myfilist' command `\EmptyFileList'
-was missing---it was not intended there. Usually however, %% is -> was 2012/10/29
+was missing---it was not intended there. Usually however, %% is -> was 2012/10/29
it \emph{is} intended, i.e., the following sequence of
lines is wanted:
\begin{quotation}\tt\small
@@ -304,8 +322,6 @@ with 'myfilist'.
\DontAddQuotes
-\pagebreak
-
'nicefilelist' formats file lists nicely
even when base filenames have eight characters at most,
what \LaTeX's original `\listfiles' was made for.
@@ -316,7 +332,7 @@ works like `\MaxBaseEmptyList{nicefile}' (eight characters)---still,
optional `[<read-again-files>]' may follow. This feature is demonstrated
with \ctanpkgref{inputtrc} v/r0.3.
-\subsubsection{Sample with Wrapped Caption Column} %% 2012/10/30
+\subsubsection{Sample with Wrapped Caption Column} %% 2012/10/30
\AddQuotes
@@ -364,9 +380,8 @@ of the \TeX\ script `srcfiles.tex':
\subsection{Package File Header (Legalese)}
\input{nicefilelist.doc}
-\pagebreak
\section{Credits}
-\begin{enumerate} %% 2012/05/20
+\begin{enumerate} %% 2012/05/20
\item It was \ctanpkgauref{muench-hm}{\textsc{Martin M\"{u}nch}}
who pointed out the shortcomings
of 'longnamefilelist' that the present package addresses---thanks!
@@ -408,4 +423,5 @@ VERSION HISTORY
usage restructured and extended
2012/10/30 \listfiles
2012/12/12 for v0.7a vs.\
-2022/12/05 for v0.8a accepts also the new date format \ No newline at end of file
+2022/12/05 for v0.8a accepts also the new date format with dashes
+2023/01/06 for v0.9a regards |ver@@| for version; new option [autolength] \ No newline at end of file
diff --git a/macros/latex/contrib/nicefilelist/source/provonly.fd b/macros/latex/contrib/nicefilelist/source/provonly.fd
index 357896e8f8..278740491c 100644
--- a/macros/latex/contrib/nicefilelist/source/provonly.fd
+++ b/macros/latex/contrib/nicefilelist/source/provonly.fd
@@ -1,4 +1,4 @@
-%\ProvidesFile{provonly.fd}[2022/12/05 v0.11a such]
+%\ProvidesFile{provonly.fd}[2023/01/08 v0.12a such]
%\ProvidesFile{provonly.fd}[such]
\ProvidesFile{provonly.fd}[no date, no version, but a lot of info,
look how that is wrapped!] \ No newline at end of file
diff --git a/macros/latex/contrib/nicefilelist/source/srcfiles.tex b/macros/latex/contrib/nicefilelist/source/srcfiles.tex
index 359d5bd323..f11a4891fb 100644
--- a/macros/latex/contrib/nicefilelist/source/srcfiles.tex
+++ b/macros/latex/contrib/nicefilelist/source/srcfiles.tex
@@ -1,5 +1,5 @@
\ProvidesFile{srcfiles.tex}
- [2022/12/05 file infos -> SrcFILEs.txt]
+ [2023/01/08 file infos -> SrcFILEs.txt]
\RequirePackage[r,wrap]{nicefilelist}
\RequirePackage{filedate}
\MaxBaseEmptyList{nicefilelist}
diff --git a/macros/latex/contrib/nicefilelist/tex/nicefilelist.sty b/macros/latex/contrib/nicefilelist/tex/nicefilelist.sty
index aa82af7f27..ce80cd1666 100644
--- a/macros/latex/contrib/nicefilelist/tex/nicefilelist.sty
+++ b/macros/latex/contrib/nicefilelist/tex/nicefilelist.sty
@@ -1,5 +1,5 @@
-\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{nicefilelist}[2022/12/05 v0.8a
+\NeedsTeXFormat{LaTeX2e}[1994/12/01]% Option autolength needs 2022-11-01!
+\ProvidesPackage{nicefilelist}[2023/01/08 v0.9a
more file list alignment (UL)]
%% Copyright (C) 2012 Uwe Lück (deceased June 2020)
%%
@@ -12,7 +12,7 @@
%% https://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.
-%%
+%%
%%
%%
%%
@@ -22,59 +22,57 @@
\RequirePackage{monofill}[2012/10/29]
%% See its documentation for details.
%% %% <- added 2012/10/29 ->
-%% The `[wrap]' option provided by 'nicefilelist' v0.7 requires
+%% The `[wrap]' option provided by 'nicefilelist' v0.7 requires
%% 'monofill' v0.2 as of 2012-10-29.
%%
-%% We support three alignment ``fields" according to the terminology of \pkg{monofill}.
-%% Their ids are |f-base| for base filenames, |f-ext| for filename extensions,
-%% % |f-date| for the revision date,
-%% and |f-version| for the revision version id of a file %%% ,
-%% % the latter two
-%% as read from `\ProvidesFile', `\ProvidesPackage',
+%% We support three alignment ``fields" according to the terminology of \pkg{monofill}.
+%% Their ids are |f-base| for base file-names, |f-ext| for file-name extensions,
+%% % |f-date| for the revision date,
+%% and |f-version| for the revision version id of a file
+%% %, the latter two
+%% as read from `\ProvidesFile', `\ProvidesPackage',
%% or `\ProvidesClass' command in the file.
%% Initial settings for them are following.
-%% For modifying them, load 'nicefilelist.sty',
+%% For modifying them, load 'nicefilelist.sty',
%% then type your own settings, then issue `\listfiles'
%% or load 'myfilist.sty'.
\MFfieldtemplate{f-base}{nicefilelist}
\MFfieldtemplate{f-ext}{tex}
\MFfieldtemplate{f-version}{v0.11a}
-%% We are not supporting version numbers greater than 9 at present---sorry! (TODO)
-%% \pagebreak
-%%
-%% |\NFLspaceI|, |\NFLspaceII|, and |\NFLspaceIII|
-%% determine the space between the four
+%%
+%% |\NFLspaceI|, |\NFLspaceII|, and |\NFLspaceIII|
+%% determine the space between the four
%% columns for names, dates, versions, and ``captions":
\newcommand*{\NFLspaceI} { \space}
\newcommand*{\NFLspaceII} { \space}
\newcommand*{\NFLspaceIII}{ }
-%%
+%%
%% === Failure Displays ===
%% \label{sec:fail} %% was failure 2012/10/29
-%% |\NFLnodate| is displayed in place of a file date if it seems
+%% |\NFLnodate| is displayed in place of a file date if it seems
%% not to be given (configurable):
\newcommand*{\NFLnodate}{ -- \space-- --}
-%% |\NFLnoversion| likewise---however, for alignment,
+%% |\NFLnoversion| likewise---however, for alignment,
%% each wanted space must be specified as `\space'
-%% (not just a code blank space).
+%% (not just a code blank space).
%% It may need adjustment (by `\renewcommand') when
%% `\MFfieldtemplate{f-version}' is modified:
\newcommand*{\NFLnoversion}{\space--}
-%% |\NFLnotfound| is for files with wrong or no
+%% |\NFLnotfound| is for files with wrong or no
%% \cs{Provides.\empty..} command:
\newcommand*{\NFLnotfound}{ * NOT FOUND *}
-%%
+%%
%% === Package Options ===
%% \label{sec:opt}
%% v0.4 offers package option |[r]| that allows strings with `r' %% |...| 2012/10/30
%% in place of `v', for ``release." `\NFL@v@digit''s definition
-%% therefore depends ... we use |\@listfiles| for a ``message"
-%% there. For the original restricted functionality, it expands
-%% to |\NFL@false|.
+%% therefore depends ... we use |\@listfiles| for a ``message"
+%% there. For the original restricted functionality, it expands
+%% to |\NFL@false|.
\def\@listfiles{\noexpand\NFL@false}
%% Package option `[r]' carries out another test instead.
-%% See the accompanying file `SrcFILEs.txt' to see the effect.
-%% TODO: update example!?
+%% See the accompanying file `SrcFILEs.txt' to see the effect.
+%% TO DO: update example!?
\DeclareOption{r}{%
\def\@listfiles{%
{\noexpand\NFL@ifx@kbl##1r%
@@ -82,19 +80,21 @@
\noexpand\NFL@false}%
}%
}
-%% v0.7 offers package option |[wrap]| for automatical wrapping within %% |...| 2012/10/30
-%% the "captions" column, based on Will Robertson's and Kevin Godby's
-%% \ctanpkgref{hardwrap} package. The difference between this option
-%% and the functionality without is controlled by the macro
-%% `\NFL@filerow'.
+%% v0.7 offers package option |[wrap]| for automatic wrapping within %% |...| 2012/10/30
+%% the "captions" column, based on Will Robertson's and Kevin Godby's
+%% \ctanpkgref{hardwrap} package. The difference between this option
+%% and the functionality without is controlled by the macro
+%% `\NFL@filerow'.
%% %% 2012/10/30:
%% \emph{Without} it expands to `\typeout'
\newcommand*{\NFL@filerow}{\typeout}
-%% ---`\let' doesn't work with 'myfilist''s redefinition of
+%% ---`\let' doesn't work with 'myfilist''s redefinition of
%% `\typeout'.
-%% \emph{With} `[wrap]', `\NFL@filerow' applies 'hardwrap''s
+%% \emph{With} `[wrap]', `\NFL@filerow' applies 'hardwrap''s
%% `\HardWrap':
+\newif\ifNFLwrap%
\DeclareOption{wrap}{%
+ \NFLwraptrue%
\renewcommand*{\NFL@filerow}[1]{%
\HardWrap\typeout\hw@maxprintline\relax{^^J%
\MFrightinfield\space{f-base} %
@@ -102,58 +102,228 @@
\NFLspaceI\@spaces\space\@spaces\space \NFLspaceII
\MFrightinfield\space{f-version}\NFLspaceIII}{%
#1}}%
-%% Alignment of filenames with 'hardwrap' seems to need
+%% Alignment of file-names with 'hardwrap' seems to need
\renewcommand*{\MFfillelement}{\MFotherspace}
%% from \ctanpkgref{monofill} v0.2. %% was `monospace' 2012/12/12
}
-%% The display width is controlled by 'hardwrap''s counter
-%% `\hw@maxprintline'. Unless 'hardwrap' finds something special,
-%% its content is 79, corresponding to a display width of
-%% 80 characters (I believe---counting the leftmost character
-%% as \qtd{0}, as editors like to do). You can choose a different
+%% The display width is controlled by 'hardwrap''s counter
+%% `|\hw@maxprintline|'. Unless 'hardwrap' finds something special,
+%% its content is 79, corresponding to a display width of
+%% 80~characters (I~believe---counting the leftmost character
+%% as~\qtd{0}, as~editors like to~do). You can choose a different
%% content value <max-char-col> by 'hardwrap''s
%% \[|\setmaxprintline{<max-char-col>}|\]
+%%
+%% \noindent v0.9a offers package option |[autolength]| %% |...| 2023-01-08
+%% for automatic setting of lengths of base file-name, extension, and version.
+\newif\ifNFLautolength
+
+\DeclareOption{autolength}{% v0.9a 2023-01-08
+%% We just measure the respective length and write it into the .aux file
+%% for use in the next compilation run.
+%% The \ctanpkgref{xstring} package requires e-\TeX. |\AddToHook{enddocument/afterlastpage}|
+%% ensures that the nicefilelist package still works when |\AtEndDocument| would be gone.
+%% The |\ver@@|-fix for the file-list was introduced 2022. Thus instead of \LaTeX{} format
+%% version 1994/12/01 option [autolength] requires format-version 2022-11-01 or newer.
+%% (2018 might be sufficient, but testing was only done with a current format.)
+ \@ifl@t@r\fmtversion{2022/11/01}{
+ % would have understood
+ % \IfFormatAtLeastTF{2022-11-01}{<true code>}{<false code>}
+ \NFLautolengthtrue
+ }{\PackageError{nicefilelist}{%
+ Option autolength needs newer LaTeX format%
+ }{Needed LaTeX format version: 2022-11-01 or newer.\MessageBreak%
+ Found LaTeX format version: \fmtversion.\MessageBreak%
+ To use option autolength update your TeX distribution.%
+ }
+ }
+ }
+
\ProcessOptions
-%% The next `\ifx' is to check whether `[wrap]' has been demanded
+
+%% The next `\if' is to check whether `[wrap]' has been demanded
%% and 'hardwrap' is needed:
-\ifx\NFL@filerow\typeout \else
- \RequirePackage{hardwrap}
+\ifNFLwrap\RequirePackage{hardwrap}\fi
+
+\ifNFLautolength
+ \RequirePackage{xstring}[2021-07-21]% v1.84; needs e-TeX
+ \AddToHook{enddocument/afterlastpage}{%
+ \xdef\NFLbaselengthmax{nicefilelist}%
+ \xdef\NFLextlengthmax{sty}%
+ \xdef\NFLversionlengthmax{v0.9a}%
+ \xdef\NFLcaptionlengthmax{more file list alignment (UL)}%
+ \xdef\NFLbaselengthtmp{0}%
+ \xdef\NFLextlengthtmp{0}%
+ \xdef\NFLversionlengthtmp{0}%
+ \xdef\NFLcaptionlengthtmp{0}%
+ \xdef\NFLtotallengthtmp{0}%
+ \@for\@currname:=\@filelist\do{%
+ % This starts the loop through the list of files.
+ \filename@parse\@currname%
+ \StrLen{\filename@base}[\NFLbaselengthcurrent]%
+ \ifnum \NFLbaselengthcurrent > \NFLbaselengthtmp \relax%
+ {\xdef\NFLbaselengthtmp{\NFLbaselengthcurrent}%
+ \xdef\NFLbaselengthmax{\filename@base}%
+ }%
+ \fi%
+ \StrLen{\filename@ext}[\NFLextlengthcurrent]%
+ \ifnum \NFLextlengthcurrent > \NFLextlengthtmp \relax%
+ {\xdef\NFLextlengthtmp{\NFLextlengthcurrent}%
+ \xdef\NFLextlengthmax{\filename@ext}%
+ }%
+ \fi%
+ \expandafter\let\expandafter\@NFLtempb\csname ver@\filename@base.\filename@ext\endcsname%
+ \StrBetween[1,2]{\@NFLtempb}{ }{ }[\@NFLtempc]%
+ % assuming date space version space description
+ \IfBeginWith{\@NFLtempc}{v}{%
+ % fails if version omitted and description starts with v - evil!
+ \xdef\filename@version{\@NFLtempc}}{%
+ % else: empty or unusual format
+ % Packages that \relax their \ver@... (e.g., fontenc)
+ % can use \ver@@... to store the version information instead:
+ \expandafter\let\expandafter\@NFLtempd\csname ver@@\filename@base.\filename@ext\endcsname%
+ \StrBetween[1,2]{\@NFLtempd}{ }{ }[\@NFLtempc]%
+ % assuming date space version space description again
+ \IfBeginWith{\@NFLtempc}{v}{\xdef\filename@version{\@NFLtempc}%
+ }{% else: no usual version found
+ \xdef\filename@version{}%
+ }%
+ }%
+ \StrLen{\filename@version}[\NFLversionlengthcurrent]%
+ \ifnum \NFLversionlengthcurrent > \NFLversionlengthtmp \relax%
+ {\xdef\NFLversionlengthtmp{\NFLversionlengthcurrent}%
+ \xdef\NFLversionlengthmax{\filename@version}%
+ }%
+ \fi%
+ \ifx\filename@version\empty\relax%
+ \StrBehind[1]{\@NFLtempb}{ }[\@NFLtempc]%
+ \else%
+ \StrBehind[2]{\@NFLtempb}{ }[\@NFLtempc]%
+ \fi%
+ \StrLen{\@NFLtempc}[\NFLcaptionlengthcurrent]%
+ \ifnum \NFLcaptionlengthcurrent > \NFLcaptionlengthtmp \relax%
+ {\xdef\NFLcaptionlengthtmp{\NFLcaptionlengthcurrent}%
+ \xdef\NFLcaptionlengthmax{\@NFLtempc}%
+ }%
+ \fi%
+ }%
+ \message{^^J^^J%
+ ******************************************************************************^^J%
+ Package nicefilelist Info:^^J}%
+ \@ifundefined{hw@maxprintline}{%
+ \IfPackageLoadedTF{hardwrap}{%
+ \message{\space\string\hw@maxprintline\space unknown.^^J}%
+ }{\message{\space\string\hw@maxprintline\space %
+ unknown because not loading the hardwrap package.^^J}%
+ }%
+ \message{\space Now guessing it to be 79.}%
+ \global\newcount\hw@maxprintline%
+ \hw@maxprintline=79\relax% the default value
+ }{% was already defined by hardwrap package or manually
+ }%
+ \StrLen{\NFLbaselengthmax .\NFLextlengthmax\NFLspaceI %
+ yyyy-mm-dd\NFLspaceII \NFLversionlengthmax \NFLspaceIII %
+ \NFLcaptionlengthmax}[\@NFLtempc]%
+ \message{%
+ Longest base file-name: \NFLbaselengthmax\space - %
+ \NFLbaselengthtmp\space characters^^J%
+ Longest file extension: \NFLextlengthmax\space - %
+ \NFLextlengthtmp\space characters^^J%
+ Longest file version: \space\space\NFLversionlengthmax\space - %
+ \NFLversionlengthtmp\space characters^^J%
+ Longest file caption: \space\space\NFLcaptionlengthmax\space - %
+ \NFLcaptionlengthtmp\space characters^^J%
+ Total length of^^J%
+ base-filename.extension\string\NFLspaceI\space date%
+ \string\NFLspaceII\space version\string\NFLspaceIII\space %
+ caption:^^J
+ \@NFLtempc\space characters^^J%
+ Linewidth: \the\hw@maxprintline\space characters^^J%
+ }%
+%% There exists ``beamercolorthememetropolis-highcontrast.sty''.
+ \ifnum \@NFLtempc > \the\hw@maxprintline\relax%
+ \IfPackageLoadedTF{hardwrap}{%
+ \xdef\roomforcaption{%
+ \the\numexpr(\the\hw@maxprintline-(\@NFLtempc-\NFLcaptionlengthtmp))\relax}%
+ \ifnum\numexpr(2*\roomforcaption) < \NFLcaptionlengthtmp\relax%
+ \xdef\NFLmaybe{%
+ \the\numexpr(\NFLbaselengthtmp+(2*\roomforcaption-\NFLcaptionlengthtmp)+1)\relax}%
+ \gdef\NFLbaselengthmaybe{}%
+ \newcounter{NFLcounter}%
+ \loop%
+ \xdef\NFLbaselengthmaybe{A\NFLbaselengthmaybe}%
+ \addtocounter{NFLcounter}{1}%
+ \ifnum\value{NFLcounter}<\NFLmaybe%
+ \repeat%
+ \message{Warning:^^J%
+ Caption needs more than two lines, %
+ wrapping was not implemented for this.^^J%
+ Maybe set the lengths for base file-name, %
+ -extension, and -version manually^^J%
+ or increase the max_print_line.^^J%
+ Instead of using option autolength, after^^J%
+ \string\usepackage[<options>]{nicefilelist}^^J%
+ try adding^^J%
+ \string\MFfieldtemplate{f-base}{\NFLbaselengthmaybe}^^J%
+ \string\MFfieldtemplate{f-ext}{\NFLextlengthmax}^^J%
+ \string\MFfieldtemplate{f-version}{\NFLversionlengthmax}^^J%
+ and recompile twice - %
+ or look for the second longest file name^^J%
+ and use that for \string\MFfieldtemplate{f-base}.^^J}%
+ \fi%
+ }{\message{Warning:^^J%
+ File information does not always fit into a single %
+ line; this might look ugly.^^J%
+ Maybe set the lengths for base file-name, %
+ -extension, and -version manually^^J%
+ or increase the max_print_line.^^J}%
+ }%
+ \fi%
+ \message{%
+ ******************************************************************************^^J^^J}%
+ \if@filesw%
+ \immediate\write\@auxout{\string\IfPackageLoadedTF{nicefilelist}{\string\relax}{%
+ \string\newcommand\string\MFfieldtemplate[2]{\string\relax}}}%
+ \immediate\write\@auxout{\string\MFfieldtemplate{f-base}{\NFLbaselengthmax}}%
+ \immediate\write\@auxout{\string\MFfieldtemplate{f-ext}{\NFLextlengthmax}}%
+ \immediate\write\@auxout{\string\MFfieldtemplate{f-version}{\NFLversionlengthmax}}%
+ \fi%
+ }
\fi
-%%
%% === Safe Tests === %% below options 2012/10/29
%% \label{sec:safe}
%% For fairly safe tests, we brief{}ly use an exotic version of `Q'
%% (similarly to \ctanpkgref{ifmptarg} and \ctanpkgref{url}):
\catcode`\Q=7 \let\NFL@criterion=Q \catcode`\Q=11
%% %% 2012/03/27:
-%% It appears to me that expandable tests like the ones employed here
-%% never are perfectly safe; you only can say that it is safe with a
-%% source meeting certain conditions. \ctanpkgref{fifinddo} originally
-%% was made for ``plain text," to be read from files without assigning
-%% \TeX's special category codes. \emph{Here} we assume that the source
-%% (text in \cs{Provides.\empty..} arguments) will never contain such a
+%% It appears to me that expandable tests like the ones employed here
+%% never are perfectly safe; you only can say that it is safe with a
+%% source meeting certain conditions. \ctanpkgref{fifinddo} originally
+%% was made for ``plain text," to be read from files without assigning
+%% \TeX's special category codes. \emph{Here} we assume that the source
+%% (text in \cs{Provides.\empty..} arguments) will never contain such a
%% ``funny `Q'".
%%
%% === Redefining \cs{listfiles} ===
-%% Similarly to original \LaTeX, |\listfiles| carries almost everything
-%% that is needed for the file list only. 2012-10-29: little point
-%% in this, perhaps, in that the package should be loaded when
-%% running `\listfiles' is intended---TODO. Or maybe it is loaded
+%% Similarly to original \LaTeX, |\listfiles| carries almost everything
+%% that is needed for the file list only. 2012-10-29: little point
+%% in this, perhaps, in that the package should be loaded when
+%% running `\listfiles' is intended---TO-DO. Or maybe it is loaded
%% \emph{just in case?}
\renewcommand*{\listfiles}{%
\let\listfiles\relax
-%% ---this clears memory. Now \LaTeX\ doesn't collect file names for
-%% &\listfiles when &\@listfiles is undefined, therefore
+%% ---this clears memory. Now \LaTeX\ doesn't collect file names for
+%% &\listfiles when &\@listfiles is undefined, therefore
% \let\@listfiles\relax
%% % although we don't use it.
-%% % (TODO use it in place of some `\NFL@'...?)
-%% ... postponed for v0.4 ...
+%% % (TO-DO use it in place of some `\NFL@'...?)
+%% ... postponed for future version...
%% \vskip\smallskipamount\noindent
%% |\@dofilelist| is executed by the standard \LaTeX\ `\enddocument'
%% macro or by `\ListInfos' from the \ctanpkgref{myfilist} package.
\def\@dofilelist{%
%% ``Title:"
- \typeout{^^J %% trick 2012/03/29 vv
+ \typeout{^^J %% trick 2012/03/29
\MFrightinfield{*File Lis}{f-base}t*}%
\@for\@currname:=\@filelist\do{%
%% This starts the loop through the list of files
@@ -163,12 +333,18 @@
%% Like \LaTeX's &\reserved@b:
\expandafter\let\expandafter\@tempb
\csname ver@\filename@base.\filename@ext\endcsname
-%% According to `source2e.pdf', &\filename@area may be a directory.
-%% Trying support of this is seems to be a new feature with v0.2---not
-%% tested, TODO!
+%% Packages that |\relax| their |\ver@|... (e.g., fontenc) %% v0.9a 2023-01-08
+%% can use |\ver@@|... to store the version information instead:
+ \ifx\@tempb\relax%
+ \expandafter\let\expandafter\@tempb
+ \csname ver@@\filename@base.\filename@ext\endcsname
+ \fi%
+%% According to `source2e.pdf', &\filename@area may be a directory.
+%% Trying support of this, it seems to be a new feature with v0.2
+%% --- not tested, TO-DO!
\edef\@tempa{\filename@area\filename@base}%
-%% Actually I would like to be able to do even the filename parsing
-%% expandably---for all systems, `texsys.cfg'!?? TODO
+%% Actually I would like to be able to do even the file-name parsing
+%% in an expandable way --- for all systems, `texsys.cfg'?! TO-DO
\NFL@filerow{%
%% Now all parsing and checking must be expandable.
\NFL@make@macro@arg\MFrightinfield\@tempa {f-base}.%
@@ -182,39 +358,39 @@
}%
}%
%% The line of stars:
- \typeout{ %% trick vvv 2012/03/29
+ \typeout{ %% trick v 2012/03/29
\MFrightinfield{********}{f-base}***^^J}%
-%% TODO or more stars as with 'longnamefilelist'?
+%% TO-DO or more stars as with 'longnamefilelist'?
}%
-%% This finishes the definition of `\@dofilelist'.
+%% This finishes the definition of `\@dofilelist'.
%% % The definitions of macros called from `\@dofilelist' are following.
-%% \[|\NFL@make@macro@arg<cmd-1><cmd-2>|\] results in
-%% `<cmd-1>{<t-list>}' where <t-list> is the one-step expansion of
+%% \[|\NFL@make@macro@arg<cmd-1><cmd-2>|\] results in
+%% `<cmd-1>{<t-list>}' where <t-list> is the one-step expansion of
%% <cmd-2>:
\def\NFL@make@macro@arg##1##2{\expandafter##1\expandafter{##2}}%
%% |\NFL@space@split{<token-list>}{<spaced>}{<unspaced>}|
-%% passes prefix and suffix as arguments to <spaced>
-%% if a space token is within <token-list>, otherwise
-%% <unspaced> gets the original <token-list> as single
-%% argument. The latter is useful here where <token-list>
+%% passes prefix and suffix as arguments to <spaced>
+%% if a space token is within <token-list>, otherwise
+%% <unspaced> gets the original <token-list> as single
+%% argument. The latter is useful here where <token-list>
%% becomes visible only by an &\expandafter.
-%% The following construction is discussed more generally
+%% The following construction is discussed more generally
%% in the \ctanpkgref{bitelist} package.
\def\NFL@space@split##1{%
\NFL@return@space@split##1\@nil: \NFL@criterion\@nil\@nil@{##1}}%
-%% `\NFL@return@spaces@split' essentially has \emph{three} parameters
+%% `\NFL@return@spaces@split' essentially has \emph{three} parameters
%% delimited by ` ', `\@nil', and `\@nil' again.
\def\NFL@return@space@split##1 ##2\@nil##3\@nil@##4##5##6{%
\NFL@ifx@kbl\NFL@criterion{##2}%
-%% If #2 is empty, `\NFL@ifx@kbl' (as of v0.3) compares
-%% `\NFL@criterion' (criterion indicating ``unspaced") with
-%% `\expandafter'. This only happens when the space is the last thing
+%% If #2 is empty, `\NFL@ifx@kbl' (as of v0.3) compares
+%% `\NFL@criterion' (criterion indicating ``unspaced") with
+%% `\expandafter'. This only happens when the space is the last thing
%% in <token-list>, and `<spaced>' is chosen correctly.
{##6{##4}}{##5{##1}{##2}}}%
-%% |\NFL@ifx@kbl{<token>}{<maybe-token>}{<ifx>}{<unlessx>}|
-%% as of v0.3 should save some tokens, in some longer run,
-%% especially if we want to add nestings---cf. \file{source2e.pdf}
-%% for ``Kabelschacht."
+%% |\NFL@ifx@kbl{<token>}{<maybe-token>}{<ifx>}{<unlessx>}|
+%% as of v0.3 should save some tokens, in some longer run,
+%% especially if we want to add nestings---{}%
+%% cf.~\file{source2e.pdf} for ``Kabelschacht".
\def\NFL@ifx@kbl##1##2{%
\ifx##1##2\expandafter \@firstoftwo
\else \expandafter \@secondoftwo \fi}%
@@ -245,9 +421,9 @@
{\NFL@ifx@kbl##8-\NFL@ten@only\NFL@false}%
\NFL@false
{##1##2##3##4##6##7}}%
-%% If the word is a date, we now have taken 6 of the 8 digits.
+%% If the word is a date, we now have taken 6 of the 8 digits.
%% \[|\NFL@ten@only{<digits>}<digit><digit>Q|\]
-%% takes the two remaining and then a thing that should be `Q'
+%% takes the two remaining and then a thing that should be `Q'
%% in the funny sense of Sec.~\ref{sec:safe}.
\def\NFL@ten@only##1##2##3##4{%
\NFL@ifx@kbl\NFL@xi##4\NFL@digits\NFL@false
@@ -269,15 +445,15 @@
\def\NFL@false##1\@nil{\@secondoftwo}%
%% |\NFL@true| skips further candidates and dummies and chooses <yes>:
\def\NFL@true##1\@nil{\@firstoftwo}%
-%% We don't support version without date, therefore run
-%% |\NFL@no@date@version| as soon as we find that the file info
+%% We don't support version without date, therefore run
+%% |\NFL@no@date@version| as soon as we find that the file info
%% does not start with a date:
\def\NFL@no@date@version{%
\NFLnodate\NFLspaceII\NFLnoversion@\NFLspaceIII}%
%% |\NFLnoversion@| adds filler to &\NFLnoversion:
\def\NFLnoversion@{%
\NFL@make@macro@arg\NFL@place@version\NFLnoversion}%
-%% |\NFL@maybe@three{<word-1>}{<rest>}| looks whether <word-1>
+%% |\NFL@maybe@three{<word-1>}{<rest>}| looks whether <word-1>
%% is a date. If it is, it is written to screen, and then we look
%% if <rest> contains a version id. Otherwise ```<word-1>_<rest>'"
%% is considered a ``caption" only.
@@ -293,8 +469,6 @@
\NFL@maybe@version@rest
\NFL@version@or@rest}%
{\NFL@no@date@version##1 ##2}}}%
-%% \pagebreak
-%%
%% |\NFL@version@or@rest{<token-list>}|:
\def\NFL@version@or@rest##1{%
\NFL@if@version{##1}%
@@ -302,12 +476,12 @@
{\NFLnoversion@\NFLspaceIII##1}}%
%% |\NFL@if@version{<token-list>}{<yes>}{<no>}|:
\def\NFL@if@version##1{\NFL@v@digit##1xy\@nil}%
-%% TODO: At applications you see how some tokens could be saved.
-%% On the other hand, the macros are more transparent in the
+%% TO-DO: At applications you see how some tokens could be saved.
+%% On the other hand, the macros are more transparent in the
%% present way.
%% \vskip\smallskipamount\noindent
%% |\NFL@v@digit{<t1>}{<t2>}{<rest>}| checks whether the first thing
-%% is a `v' and the second a digit---unless package option `[r]'
+%% is a `v' and the second a digit---unless package option `[r]'
%% was chosen. v0.4 uses `\edef' for choosing:
\edef\NFL@v@digit##1##2##3\@nil{%
\noexpand\NFL@ifx@kbl##1v%
@@ -327,9 +501,9 @@
}
%% === Shorthand for 'myfilist' ===
%% \[|\MaxBaseEmptyList{<longest-name>}[<read-again-files>]|\]
-%% (v0.5) or
+%% (v0.5) or
%% \[|\MaxBaseEmptyList*[<read-again-files>]|\]
-%% (v0.6) as described in Section~\ref{sec:short}:
+%% (v0.6) as described in Section~\ref{sec:short}:
\newcommand*{\MaxBaseEmptyList}{%
\@ifstar{\maxBaseEmptyList{abcdabcd}}\maxBaseEmptyList}
\newcommand*{\maxBaseEmptyList}[1]{%
@@ -343,19 +517,17 @@
%%
%% === VERSION HISTORY ===
-v0.1 2012/03/20 started
+v0.1 2012/03/20 started
2012/03/22 almost ready
- 2012/03/23 debugging; \NFLspaceI etc.;
- documentation completed
-
+ 2012/03/23 debugging; \NFLspaceI etc.;
+ documentation completed
v0.2 2012/03/24 file info processed by \typeout - start
2012/03/25 trying, debugging
- 2012/03/26 continued; \NFL@place@version, \NFLnoversion@;
+ 2012/03/26 continued; \NFL@place@version, \NFLnoversion@;
works, reordered; another fix about Q -> \@empty
2012/03/27 undone the latter, explained; improved remarks on
\@listfiles
2012/03/29 alignment of title/stars with base<11
-
v0.30 2012/05/18f. \NFL@ifx@kbl in \NFL@return@space@split
2012/05/20 all \ifx reimplemented, old code kept
STORED INTERNALLY
@@ -370,14 +542,20 @@ v0.5 2012/09/30 \MaxBaseEmptyList
v0.6 2012/10/03 \MaxBaseEmptyLists first arg. only optional
2012/10/11 ... bad with 2nd opt. arg., *
v0.7 2012/10/13 "updating" date in \Provides...!
- 2012/10/28 \HardWrap first try
+ 2012/10/28 \HardWrap first try
2012/10/29 \HardWrap newline material -> [wrap]
sec:test below sec:opt, mentioning `url'
- 2012/10/30 correcting \NFL@filerow without wrapping,
+ 2012/10/30 correcting \NFL@filerow without wrapping,
doc.: |...| in sec:opt
v0.7a 2012/12/12 doc. monospace -> monofill; archived at:
https://web.archive.org/web/20221205210517/
https://mirror.mwt.me/ctan/install/macros/
latex/contrib/nicefilelist.tds.zip
-v0.8a 2022/12/05 Accepting also dashes instead of dashes in date
+v0.8a 2022/12/05 Accepting also dashes instead of slashes in date
+ (one-time fix by H.-Martin Münch); archived at:
+ https://web.archive.org/web/20230106193203/
+ https://mirror.mwt.me/ctan/install/macros/
+ latex/contrib/nicefilelist.tds.zip
+v0.9a 2023/01/08 now also regarding |ver@@| for version;
+ new option [autolength] (using .aux file)
(one-time fix by H.-Martin Münch) \ No newline at end of file
diff --git a/macros/latex/contrib/scripture/README.md b/macros/latex/contrib/scripture/README.md
index a90ab28fe7..22b19c5254 100644
--- a/macros/latex/contrib/scripture/README.md
+++ b/macros/latex/contrib/scripture/README.md
@@ -57,7 +57,7 @@ l3build install --full
## Licence
```
-Copyright (c) 2022 David Purton <dcpurton@marshwiggle.net>
+Copyright (c) 2022-2023 David Purton <dcpurton@marshwiggle.net>
This work may be distributed and/or modified under the conditions of
the LaTeX Project Public License, either version 1.3c of this license
diff --git a/macros/latex/contrib/scripture/scripture.dtx b/macros/latex/contrib/scripture/scripture.dtx
index 7f658465e1..c54a361a5a 100644
--- a/macros/latex/contrib/scripture/scripture.dtx
+++ b/macros/latex/contrib/scripture/scripture.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (c) 2022 David Purton <dcpurton@marshwiggle.net>
+% Copyright (c) 2022-2023 David Purton <dcpurton@marshwiggle.net>
%
% This work may be distributed and/or modified under the conditions of
% the LaTeX Project Public License, either version 1.3c of this license
@@ -11,6 +11,7 @@
% version 2005/12/01 or later.
%
%<*driver>
+\DocumentMetadata{}
\documentclass[a4paper]{l3doc}
\usepackage[parindent=1em]{scripture}
\usepackage[skins]{tcolorbox}
@@ -183,10 +184,11 @@
% \changes{v1.0}{2022/07/27}{First public release}
% \changes{v1.1}{2022/08/27}{Bug fixes}
% \changes{v1.2}{2022/11/02}{Bug fixes}
+% \changes{v1.3}{2023/01/08}{Bug fixes}
%
% \title{The \pkg{scripture} package}
% \author{David Purton\thanks{Email: \url{dcpurton@marshwiggle.net}}}
-% \date{2022/11/02 v1.2}
+% \date{2023/01/08 v1.3}
%
% \maketitle
%
@@ -237,6 +239,9 @@
% \env{scripture} environment.
% \end{itemize}
%
+% The \env{poetry} environment uses \cs{obeylines}. This means that it can not
+% be placed in the argument of a macro.
+%
% 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
@@ -404,6 +409,37 @@
% \end{scripture}
% \end{scriptureexample}
%
+% \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 \cs{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}
+%
% \changes{v1.2}{2022/09/01}{Add divine name feature}
% \begin{function}[added=2022-09-01]{\name, \LORD, \GOD}
% \begin{syntax}
@@ -424,29 +460,40 @@
% \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?”
+% \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?”
+% \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 \cs{nofirstverse} function}
+% \begin{function}[added=2022-11-13]{\nofirstverse}
+% \begin{syntax}
+% |\nofirstverse|
+% \end{syntax}
+% When \opt{verse/first} is |true|, this causes the next \cs{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|
@@ -514,7 +561,7 @@
% they asked him.
%
% \redletteron `Yes,' \redletteroff replied Jesus,
-% \redletteron ‘have you
+% \redletteron `have you
% never read,
% \begin{poetry}
% `\thinspace ``From the lips of children and infants
@@ -533,7 +580,7 @@
% they asked him.
%
% \redletteron `Yes,' \redletteroff replied Jesus,
-% \redletteron ‘have you
+% \redletteron `have you
% never read,
% \begin{poetry}
% `\thinspace ``From the lips of children and infants
@@ -639,6 +686,50 @@
% \end{scripture}
% \end{scriptureexample}
%
+% \changes{v1.3}{2023/01/07}{Add \cs{textscripture} function}
+% \begin{function}[added=2023-01-07]{\textscripture}
+% \begin{syntax}
+% |\textscripture|\oarg{reference}\oarg{options}\marg{quotation}
+% \end{syntax}
+% \cs{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 changes the
+% defaults of some options as follows:
+% \begin{itemize}
+% \item \opt{compact} is set
+% \item \opt{reference/align} is set to |inline|
+% \item \opt{reference/sep} is set to |0.5em|
+% \item \opt{reference/format} is set to |(#1)|
+% \item \opt{version/format} is set to |#1|
+% \end{itemize}
+%
+% 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
+% \cs{textscripture} function. If you have anything other than expected
+% macros and environments inside your \cs{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}
@@ -714,7 +805,7 @@
%
% \begin{flushright}[aboveskip = 0pt]
% For the mouth of the \name{Lord} \\
-% has spoken.’
+% has spoken.'
% \end{flushright}
% \end{scripture}
% \end{verbatim}
@@ -729,7 +820,7 @@
%
% \begin{flushright}[aboveskip = 0pt]
% For the mouth of the \name{Lord} \\
-% has spoken.’
+% has spoken.'
% \end{flushright}
% \end{scripture}
% \end{scriptureexample}
@@ -1041,6 +1132,8 @@
% \subsection{Options}
% \label{options}
%
+% \changes{v1.3}{2023/01/08}{Remove \opt{reference/delim} option}
+%
% Default formatting \meta{|options|} can be set using
% \cs{usepackage}|[|\meta{|options|}|]{scripture}| or
% \cs{scripturesetup}|{|\meta{|options|}|}|. Local formatting \meta{|options|}
@@ -1060,6 +1153,24 @@
% \meta{|skip|} inserted above the \env{scripture} environment.
% \end{option}
%
+% \changes{v1.3}{2022/11/15}{Add \opt{added/font} option}
+% \begin{option}[added=2022-11-15]{added/font}
+% \begin{syntax}
+% added/font = \meta{font} \hfill Default: \emph{Empty}
+% \end{syntax}
+% \meta{|font|} used for the \cs{added} function.
+% \end{option}
+%
+% \changes{v1.3}{2022/11/15}{Add \opt{added/format} option}
+% \begin{option}[added=2022-11-15]{added/format}
+% \begin{syntax}
+% added/format = \meta{macro} \hfill Default: \cs{emph}\{\#1\}
+% \end{syntax}
+% \meta{|macro|} used to format the words that should be highlighted as
+% added by the translators using the \cs{added} function. |#1| contains the
+% text of the argument to \cs{added}.
+% \end{option}
+%
% \begin{option}{belowskip}
% \begin{syntax}
% belowskip = \meta{skip} \hfill Default: 0pt
@@ -1188,6 +1299,34 @@
% the opposite of \opt{chapter/hide}.
% \end{option}
%
+% \changes{v1.1}{2022/11/14}{Add \opt{chapter/showverse} option}
+% \begin{option}[added=2022-11-14]{chapter/showverse}
+% \begin{syntax}
+% chapter/showverse = \meta{boolean} \hfill Default: false
+% \end{syntax}
+% Whether \cs{vs}|\{1\}| should be automatically inserted after \cs{ch}. The
+% value of \meta{|boolean|} is optional and assumed to be \val{true} if not
+% present. See also \opt{midparachap/showverse} and
+% \opt{midparachap/hideverse}. Note that \opt{chapter/showverse} take
+% precedence over \opt{midparachap/hideverse}.
+% \end{option}
+%
+% \begin{scriptureexample}
+% \begin{verbatim}
+% \begin{scripture}[John 1:1][chapter/showverse]
+% \ch{1}In the beginning was the Word, and the
+% Word was with God, and the Word was God.
+% \end{scripture}
+% \end{verbatim}
+%
+% \tcblower
+%
+% \begin{scripture}[John 1:1][chapter/showverse]
+% \ch{1}In the beginning was the Word, and the
+% Word was with God, and the Word was God.
+% \end{scripture}
+% \end{scriptureexample}
+%
% \changes{v1.2}{2022/08/31}{Add \opt{colour} option}
% \begin{option}[added=2022-08-31]{colour, color}
% \begin{syntax}
@@ -1267,6 +1406,48 @@
% \meta{|font|} used for the \env{scripture} environment.
% \end{option}
%
+% \changes{v1.3}{2023/01/07}{Add \opt{inline} option}
+% \begin{option}[added=2023-01-07]{inline}
+% \begin{syntax}
+% inline
+% \end{syntax}
+% Set the scripture quotation inline. The quotation is surrounded be the
+% values of \opt{inline/begin} and \opt{inline/end} which default to |``\,|
+% and |\,''|, respectively. This option also changes the defaults of some
+% other options as follows:
+% \begin{itemize}
+% \item \opt{compact} is set
+% \item \opt{reference/align} is set to |inline|
+% \item \opt{reference/sep} is set to |0.5em|
+% \item \opt{reference/format} is set to |(#1)|
+% \item \opt{version/format} is set to |#1|
+% \end{itemize}
+%
+% \textbf{Warning:} \cs{par} is redefined to \cs{relax} when the
+% \opt{inline} option is set. If you have anything other than expected
+% macros and environments inside your quotation \TeX{} will likely get stuck
+% in an infinite loop.
+% \end{option}
+%
+% \changes{v1.3}{2023/01/07}{Add \opt{inline/begin} option}
+% \begin{option}[added=2023-01-07]{inline/begin}
+% \begin{syntax}
+% inline/begin = \meta{text} \hfill Default: |``\,|
+% \end{syntax}
+% Text inserted at the beginning of \cs{textscripture} or a \env{scripture}
+% environment with the \opt{inline} option set.
+% \end{option}
+%
+% \changes{v1.3}{2023/01/07}{Add \opt{inline/end} option}
+% \begin{option}[added=2023-01-07]{inline/end}
+% \begin{syntax}
+% inline/end = \meta{text} \hfill Default: |\,''|
+% \end{syntax}
+% Text inserted between the end of \cs{textscripture} or a \env{scripture}
+% environment with the \opt{inline} option set and the \meta{|reference|}
+% (if specified).
+% \end{option}
+%
% \begin{option}{indent}
% \begin{syntax}
% indent = \meta{boolean} \hfill Default: true
@@ -1394,6 +1575,15 @@
% is an alias for \opt{redletter/colour}.
% \end{option}
%
+% \changes{v1.3}{2023/01/08}{Add \opt{reference/align} option}
+% \begin{option}[added=2023-01-08]{reference/align}
+% \begin{syntax}
+% reference/align = inline \textbar\ left \textbar\ right \hfill Default: right
+% \end{syntax}
+% Set the alignment of the reference. For |left| and |right| the reference
+% will not break across lines, but a line break is permitted for |inline|.
+% \end{option}
+%
% \changes{v1.2}{2022/09/07}{Add \opt{reference/colour} option}
% \begin{option}[added=2022-09-07]{reference/colour, reference/color}
% \begin{syntax}
@@ -1404,14 +1594,6 @@
% \opt{reference/color} is an alias for \opt{reference/colour}.
% \end{option}
%
-% \begin{option}{reference/delim}
-% \begin{syntax}
-% reference/delim = \meta{delim} \hfill Default: \cs{hfill}
-% \end{syntax}
-% \meta{|delim|} to use between the \env{scripture} quotation and its
-% \val{reference}.
-% \end{option}
-%
% \begin{option}{reference/font}
% \begin{syntax}
% reference/font = \meta{font} \hfill Default: \cs{bfseries}
@@ -1425,7 +1607,19 @@
% reference/format = \meta{macro} \hfill Default: \#1
% \end{syntax}
% \meta{|macro|} used to format the \val{reference} for a \env{scripture}
-% quotation. |#1| contains the text of the \val{reference}.
+% quotation. |#1| contains the text of the \val{reference} and \val{version}
+% (if specified).
+% \end{option}
+%
+% \changes{v1.3}{2023/01/08}{Add \opt{reference/newline} option}
+% \begin{option}[added=2023-01-8]{reference/newline}
+% \begin{syntax}
+% reference/newline
+% \end{syntax}
+% Always push the \val{reference} to a newline even if there is space for it
+% to fit on the last line of the quotation. The option sets
+% \opt{reference/sep} to \cs{linewidth} so there is never room for the
+% reference on the final line of the quotation.
% \end{option}
%
% \begin{option}{reference/sep}
@@ -1495,6 +1689,75 @@
% for \opt{verse/colour}.
% \end{option}
%
+% \changes{v1.3}{2022/11/13}{Add \opt{verse/first} option}
+% \begin{option}[added=2022-11-13]{verse/first}
+% \begin{syntax}
+% verse/first = \meta{boolean} \hfill Default: false
+% \end{syntax}
+% In prose sections, print the verse number in a different format if it is
+% at the start of the paragraph. The format and separation between verse and
+% text are controlled with the \opt{verse/firstformat} and
+% \opt{verse/firstsep} options. Use \cs{noversefirst} to suppress this at
+% the next verse (e.g., if your quote starts mid-way though a paragraph and
+% a normal verse should be printed). The value of \meta{|boolean|} is optional
+% and assumed to be true if not present.
+% \end{option}
+%
+% \begin{scriptureexample}
+% \begin{verbatim}
+% \begin{scripture}[Luke 18:25--28][noindent,
+% verse/first, version=NRSV]
+% \nofirstverse\vs{25}Indeed, it is easier for a
+% camel to go through the eye of a needle than for
+% someone who is rich to enter the kingdom of
+% God.''
+%
+% \vs{26}Those who heard it said, ``Then who can
+% be saved?'' \vs{27}He replied, ``What is
+% impossible for mortals is possible for God.''
+%
+% \vs{28}Then Peter said, ``Look, we have left our
+% homes and followed you.''
+% \end{scripture}
+% \end{verbatim}
+%
+% \tcblower
+%
+% \begin{scripture}[Luke 18:25--28][noindent,
+% verse/first, version=NRSV]
+% \nofirstverse\vs{25}Indeed, it is easier for a
+% camel to go through the eye of a needle than for
+% someone who is rich to enter the kingdom of
+% God.''
+%
+% \vs{26}Those who heard it said, ``Then who can
+% be saved?'' \vs{27}He replied, ``What is
+% impossible for mortals is possible for God.''
+%
+% \vs{28}Then Peter said, ``Look, we have left our
+% homes and followed you.''
+% \end{scripture}
+% \end{scriptureexample}
+%
+% \changes{v1.3}{2022/11/13}{Add \opt{verse/firstformat} option}
+% \begin{option}[added=2022-11-13]{verse/firstformat}
+% \begin{syntax}
+% verse/firstformat = \meta{macro} \hfill Default: \#1
+% \end{syntax}
+% \meta{|macro|} used to format the first \cs{vs} in a paragraph. |#1|
+% contains the argument of \cs{vs}. Only used if \opt{verse/first} is
+% |true|.
+% \end{option}
+%
+% \changes{v1.3}{2022/11/13}{Add \opt{verse/firstsep} option}
+% \begin{option}[added=2022-11-13]{verse/firstsep}
+% \begin{syntax}
+% verse/firstsep = \meta{dimen} \hfill Default: 0.5em
+% \end{syntax}
+% \meta{|dimen|} used to separate the first \cs{vs} in a paragraph from the
+% following text. Only used if \opt{verse/first} is |true|.
+% \end{option}
+%
% \begin{option}{verse/font}
% \begin{syntax}
% verse/font = \meta{font} \hfill Default: \emph{Empty}
@@ -1719,7 +1982,7 @@
% \env{poetry} environments. \cs{extraskip} begins a new paragraph in a
% \env{poetry} environment. The value of \meta{|boolean|} is optional and
% assumed to be \val{true} if not present. This option is the opposite of
-% \opt{midparachap/showverse}.
+% \opt{midparachap/showverse}. See also \opt{chapter/showverse}.
% \end{option}
%
% \begin{scriptureexample}
@@ -1773,7 +2036,7 @@
% \env{poetry} environments. \cs{extraskip} begins a new paragraph in a
% \env{poetry} environment. The value of \meta{|boolean|} is optional and
% assumed to be \val{true} if not present. This option is the opposite of
-% \opt{midparachap/hideverse}.
+% \opt{midparachap/hideverse}. See also \opt{chapter/showverse}.
% \end{option}
%
% \subsubsection{Options for the \env{narrow} environment}
@@ -1880,7 +2143,7 @@
% agreement with this, as it is written:
% \begin{poetry}
% \vs{16}`\thinspace``After this I will return
-% and rebuild David’s fallen tent.
+% and rebuild David's fallen tent.
%
% Its ruins I will rebuild,
% and I will restore it,
@@ -1902,7 +2165,7 @@
% agreement with this, as it is written:
% \begin{poetry}
% \vs{16}`\thinspace``After this I will return
-% and rebuild David’s fallen tent.
+% and rebuild David's fallen tent.
%
% Its ruins I will rebuild,
% and I will restore it,
@@ -1949,7 +2212,7 @@
%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
-\ProvidesExplPackage{scripture}{2022/11/02}{1.2}
+\ProvidesExplPackage{scripture}{2023/01/08}{1.3}
{Format Scripture Quotations (DCP)}
% \end{macrocode}
%
@@ -1994,6 +2257,12 @@
, aboveskip .tl_set:N = \l_@@_aboveskip_tl
, aboveskip .value_required:n = true
, aboveskip .initial:n = \c_zero_skip
+ , added / font .tl_set:N = \l_@@_added_font_tl
+ , added / font .value_required:n = true
+ , added / font .initial:n =
+ , added / format .cs_set:Np = \@@_added_format:n #1
+ , added / format .value_required:n = true
+ , added / format .initial:n = \emph { #1 }
, belowskip .tl_set:N = \l_@@_belowskip_tl
, belowskip .value_required:n = true
, belowskip .initial:n = \c_zero_skip
@@ -2027,6 +2296,9 @@
, chapter / show .bool_set:N = \l_@@_chap_show_bool
, chapter / show .default:n = true
, chapter / show .initial:n = true
+ , chapter / showverse .bool_set:N = \l_@@_chap_show_verse_bool
+ , chapter / showverse .default:n = true
+ , chapter / showverse .initial:n = false
, extraskip .tl_set:N = \l_@@_extraskip_tl
, extraskip .value_required:n = true
, extraskip .initial:n = \medskipamount
@@ -2036,6 +2308,23 @@
, indent .bool_set:N = \l_@@_indent_bool
, indent .default:n = true
, indent .initial:n = true
+ , _inline .bool_set:N = \l_@@_inline_bool
+ , _inline .initial:n = false
+ , inline .meta:n = {
+ _inline = true ,
+ compact ,
+ reference / format = (##1) ,
+ reference / align = inline ,
+ reference / sep = 0.5 em,
+ version / format = ##1
+ }
+ , inline .value_forbidden:n = true
+ , inline / begin .tl_set:N = \l_@@_inline_begin_tl
+ , inline / begin .value_required:n = true
+ , inline / begin .initial:n = ``\,
+ , inline / end .tl_set:N = \l_@@_inline_end_tl
+ , inline / end .value_required:n = true
+ , inline / end .initial:n = \,''
, language .tl_set:N = \l_@@_language_tl
, language .value_required:n = true
, language .initial:n =
@@ -2066,19 +2355,26 @@
, redletter / colour .value_required:n = true
, redletter / colour .initial:n = red!80!black
, redletter / color .meta:n = { redletter / colour = { #1 } }
+ , reference / align .choices:nn = { inline, left, right }
+ {
+ \tl_if_exist:NF \l_@@_ref_align_tl
+ { \tl_new:N \l_@@_ref_align_tl }
+ \tl_set_eq:NN \l_@@_ref_align_tl \l_keys_choice_tl
+ }
+ , reference / align .value_required:n = true
+ , reference / align .initial:n = right
, reference / colour .tl_set:N = \l_@@_ref_colour_tl
, reference / colour .value_required:n = true
, reference / colour .initial:n = .
, reference / color .meta:n = { reference / colour = { #1 } }
- , reference / delim .tl_set:N = \l_@@_ref_delim_tl
- , reference / delim .value_required:n = true
- , reference / delim .initial:n = \hfill
, reference / font .tl_set:N = \l_@@_ref_font_tl
, reference / font .value_required:n = true
, reference / font .initial:n = \bfseries
, reference / format .cs_set:Np = \@@_ref_format:n #1
, reference / format .value_required:n = true
, reference / format .initial:n = #1
+ , reference / newline .meta:n = { reference / sep = \linewidth }
+ , reference / newline .value_forbidden:n = true
, reference / sep .tl_set:N = \l_@@_ref_sep_tl
, reference / sep .value_required:n = true
, reference / sep .initial:n = 2 em
@@ -2104,6 +2400,15 @@
, verse / colour .value_required:n = true
, verse / colour .initial:n = .
, verse / color .meta:n = { verse / colour = { #1 } }
+ , verse / first .bool_set:N = \l_@@_verse_first_bool
+ , verse / first .default:n = true
+ , verse / first .initial:n = false
+ , verse / firstformat .cs_set:Np = \@@_verse_first_format:n #1
+ , verse / firstformat .value_required:n = true
+ , verse / firstformat .initial:n = #1
+ , verse / firstsep .tl_set:N = \l_@@_verse_first_sep_tl
+ , verse / firstsep .value_required:n = true
+ , verse / firstsep .initial:n = 0.5em
, verse / font .tl_set:N = \l_@@_verse_font_tl
, verse / font .value_required:n = true
, verse / font .initial:n =
@@ -2234,7 +2539,7 @@
\ProcessKeyOptions
% \end{macrocode}
%
-% \subsection{hooks}
+% \subsection{Hooks}
%
% \begin{hooks}{scripture/chap/before, scripture/chap/after,
% scripture/verse/before, scripture/verse/after}
@@ -2278,7 +2583,7 @@
\g_@@_chap_par_prevgraf_int = 1
{
\dim_compare:nNnT
- { \parskip + \l_@@_extraskip_tl } < \baselineskip
+ { \parskip + \glueexpr \l_@@_extraskip_tl } < \baselineskip
{
\addvspace { \baselineskip }
}
@@ -2343,14 +2648,17 @@
\l_@@_ref_font_tl
\str_if_eq:VnF \l_@@_ref_colour_tl { . }
{ \exp_args:NV \color_select:n \l_@@_ref_colour_tl }
- \@@_ref_format:n { #1 }
+ \@@_ref_format:n
+ {
+ #1
% \end{macrocode}
% Append a Bible version if it has been specified.
% \begin{macrocode}
- \tl_if_empty:NF \l_@@_version_tl
- {
- \l_@@_version_delim_tl
- \@@_version_format:n { \l_@@_version_tl }
+ \tl_if_empty:NF \l_@@_version_tl
+ {
+ \l_@@_version_delim_tl
+ \@@_version_format:n { \l_@@_version_tl }
+ }
}
\group_end:
}
@@ -2385,7 +2693,17 @@
% \begin{macrocode}
\int_compare:nNnT \prevgraf = \c_zero_int
{ \skip_vertical:n { -\baselineskip } }
- \l_@@_ref_delim_tl
+ \tl_if_eq:NnT \l_@@_ref_align_tl { right }
+ { \hfill }
+ \tl_if_eq:NnT \l_@@_ref_align_tl { left }
+ {
+ \mode_leave_vertical:
+ \dim_compare:nNnT
+ { \box_wd:N \l_@@_ref_box + \g_@@_final_line_dim + \l_@@_ref_sep_tl }
+ <
+ \linewidth
+ { \skip_horizontal:n { \g_@@_final_line_dim + \l_@@_ref_sep_tl } }
+ }
\box_use:N \l_@@_ref_box
}
% \end{macrocode}
@@ -2399,7 +2717,7 @@
\bool_new:N \g_@@_red_letter_active_bool
% \end{macrocode}
% \end{macro}
-
+%
% \begin{macro}{\@@_red_letter_on:}
% Mark the beginning of a section of text attributed to Jesus Christ.
% \begin{macrocode}
@@ -2607,6 +2925,10 @@
\box_use:N \l_@@_chap_box
\hook_use:n { scripture / chap / after }
\group_end:
+ \bool_if:NT \l_@@_chap_show_verse_bool
+ {
+ \@@_verse_output:n { 1 }
+ }
}
% \end{macrocode}
% \end{macro}
@@ -2630,6 +2952,10 @@
\group_end:
\skip_horizontal:N \l_@@_chap_sep_tl
\hook_use:n { scripture / chap / after }
+ \bool_if:NT \l_@@_chap_show_verse_bool
+ {
+ \@@_verse_output:n { 1 }
+ }
}
{
\hook_use:n { scripture / chap / before }
@@ -2683,14 +3009,38 @@
%
% \subsubsection{Formatting and printing verse numbers}
%
+% \begin{macro}{\l_@@_verse_par_start_bool}
+% Flag for whether the current verse is at the start of a paragraph.
+% \begin{macrocode}
+\bool_new:N \l_@@_verse_par_start_bool
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\l_@@_no_verse_first_bool}
+% Suppress the next verse from formatting differently if it begins a new
+% paragraph.
+% \begin{macrocode}
+\bool_new:N \l_@@_no_verse_first_bool
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\@@_verse_output:n}
% Output a formatted verse.
% \begin{macrocode}
\cs_new_protected:Nn \@@_verse_output:n
{
\cs_gset_nopar:Npn \scripturecurrentverse { #1 }
- \mode_if_vertical:T
+ \legacy_if:nTF { @endpe }
+ { \bool_set_false:N \l_@@_verse_par_start_bool }
+ { \bool_set_true:N \l_@@_verse_par_start_bool }
+ \mode_if_vertical:TF
{ \mode_leave_vertical: }
+ { \bool_set_false:N \l_@@_verse_par_start_bool }
+ \bool_if:NT \l_@@_no_verse_first_bool
+ {
+ \bool_set_false:N \l_@@_verse_par_start_bool
+ \bool_set_false:N \l_@@_no_verse_first_bool
+ }
\group_begin:
\hook_use:n { scripture / verse / before }
\bool_if:NT \l_@@_verse_show_bool
@@ -2699,9 +3049,22 @@
\l_@@_verse_font_tl
\str_if_eq:VnF \l_@@_verse_colour_tl { . }
{ \exp_args:NV \color_select:n \l_@@_verse_colour_tl }
- \@@_verse_format:n { #1 }
- \group_end:
- \kern \l_@@_verse_sep_tl
+ \bool_lazy_all:nTF
+ {
+ { \l_@@_verse_first_bool }
+ { \l_@@_verse_par_start_bool }
+ { \bool_not_p:n { \str_if_eq_p:Vn \l_@@_currenvir_str { poetry } } }
+ }
+ {
+ \@@_verse_first_format:n { #1 }
+ \group_end:
+ \kern \l_@@_verse_first_sep_tl
+ }
+ {
+ \@@_verse_format:n { #1 }
+ \group_end:
+ \kern \l_@@_verse_sep_tl
+ }
}
\hook_use:n { scripture / verse / after }
\group_end:
@@ -2840,6 +3203,13 @@
\cs_set_eq:NN \redletteron \@@_red_letter_on:
\cs_set_eq:NN \redletteroff \@@_red_letter_off:
\cs_set_eq:NN \vs \@@_verse_output:n
+ \cs_set_protected_nopar:Npn \added ##1
+ {
+ \group_begin:
+ \l_@@_added_font_tl
+ \@@_added_format:n { ##1 }
+ \group_end:
+ }
\cs_set_protected_nopar:Npn \name ##1
{
\group_begin:
@@ -2847,6 +3217,10 @@
\@@_name_format:n { ##1 }
\group_end:
}
+ \cs_set_protected_nopar:Npn \nofirstverse
+ {
+ \bool_set_true:N \l_@@_no_verse_first_bool
+ }
\cs_set_protected_nopar:Npn \LORD
{
\name { Lord }
@@ -2906,6 +3280,8 @@
{ \para_omit_indent: }
}
}
+ \bool_if:NT \l_@@_inline_bool
+ { \l_@@_inline_begin_tl }
}
% \end{macrocode}
% \end{macro}
@@ -2915,6 +3291,21 @@
% \begin{macrocode}
\cs_new_protected:Nn \@@_end:n
{
+ \tl_if_eq:NnTF \l_@@_ref_align_tl { inline }
+ {
+ \bool_lazy_or:nnF
+ { \tl_if_novalue_p:n { #1 } }
+ { \tl_if_empty_p:n { #1 } }
+ {
+ \unskip
+ \@@_red_letter_off:
+ \bool_if:NT \l_@@_inline_bool
+ { \l_@@_inline_end_tl }
+ \skip_horizontal:N \l_@@_ref_sep_tl
+ \@@_format_full_ref:n { #1 }
+ }
+ }
+ {
% \end{macrocode}
% Normally \cs{unskip} does not work in vertical mode, but there are some
% situations where it does work. The following condition is true if the
@@ -2922,66 +3313,67 @@
% environments. This removes any unwanted \opt{belowskip} if present and
% leaves the previously calculated line length of the final paragraph intact.
% \begin{macrocode}
- \@@_red_letter_off:
- \mode_if_vertical:TF
- {
- \unskip
- \unskip
- }
- {
- \tl_if_novalue:nTF { #1 }
- { \int_zero:N \postdisplaypenalty }
- { \int_set_eq:NN \postdisplaypenalty \@highpenalty }
- \@@_calc_final_line_length:
- }
+ \mode_if_vertical:TF
+ {
+ \unskip
+ \unskip
+ }
+ {
+ \tl_if_novalue:nTF { #1 }
+ { \int_zero:N \postdisplaypenalty }
+ { \int_set_eq:NN \postdisplaypenalty \@highpenalty }
+ \@@_calc_final_line_length:
+ }
% \end{macrocode}
% Restore left margin by resetting the \cs{parshape} if in a list
% based environment, otherwise the space required for the reference is
% incorrectly calculated.
% \begin{macrocode}
- \bool_lazy_or:nnTF
- { \dim_compare_p:n { \l_@@_leftmargin_tl > 0pt } }
- { \dim_compare_p:n { \l_@@_rightmargin_tl > 0pt } }
- {
- \dim_add:Nn \linewidth \l_@@_leftmargin_tl
- \int_compare:nNnT
- \@listdepth > \c_zero_int
- {
- \dim_sub:Nn \@totalleftmargin \l_@@_leftmargin_tl
- \parshape 1 ~ \@totalleftmargin ~ \linewidth
- }
- }
- { \parshape 1 ~ \@totalleftmargin ~ \linewidth }
- \bool_lazy_or:nnF
- { \tl_if_novalue_p:n { #1 } }
- { \tl_if_empty_p:n { #1 } }
- { \@@_reference:n { #1 } }
- \par
+ \bool_lazy_or:nnTF
+ { \dim_compare_p:n { \l_@@_leftmargin_tl > 0pt } }
+ { \dim_compare_p:n { \l_@@_rightmargin_tl > 0pt } }
+ {
+ \dim_add:Nn \linewidth \l_@@_leftmargin_tl
+ \int_compare:nNnT
+ \@listdepth > \c_zero_int
+ {
+ \dim_sub:Nn \@totalleftmargin \l_@@_leftmargin_tl
+ \parshape 1 ~ \@totalleftmargin ~ \linewidth
+ }
+ }
+ { \parshape 1 ~ \@totalleftmargin ~ \linewidth }
+ \@@_red_letter_off:
+ \bool_lazy_or:nnF
+ { \tl_if_novalue_p:n { #1 } }
+ { \tl_if_empty_p:n { #1 } }
+ { \@@_reference:n { #1 } }
+ \par
% \end{macrocode}
% Restore right margin by resetting the \cs{parshape} if in a \LaTeX{} list
% based environment, since only the left margin was restored above.
% \begin{macrocode}
- \bool_lazy_or:nnT
- { \dim_compare_p:n { \l_@@_leftmargin_tl > 0pt } }
- { \dim_compare_p:n { \l_@@_rightmargin_tl > 0pt } }
- {
- \int_compare:nNnT
- \@listdepth > \c_zero_int
- {
- \dim_add:Nn \linewidth \l_@@_rightmargin_tl
- \parshape 1 ~ \@totalleftmargin ~ \linewidth
- }
- }
- \dim_compare:nNnTF
- \l_@@_belowskip_tl > \parskip
- {
- \addvspace
- {
- \skip_eval:n { \l_@@_belowskip_tl - \parskip }
- }
- }
- {
- \addvspace { \l_@@_belowskip_tl }
+ \bool_lazy_or:nnT
+ { \dim_compare_p:n { \l_@@_leftmargin_tl > 0pt } }
+ { \dim_compare_p:n { \l_@@_rightmargin_tl > 0pt } }
+ {
+ \int_compare:nNnT
+ \@listdepth > \c_zero_int
+ {
+ \dim_add:Nn \linewidth \l_@@_rightmargin_tl
+ \parshape 1 ~ \@totalleftmargin ~ \linewidth
+ }
+ }
+ \dim_compare:nNnTF
+ { \glueexpr \l_@@_belowskip_tl } > \parskip
+ {
+ \addvspace
+ {
+ \skip_eval:n { \l_@@_belowskip_tl - \parskip }
+ }
+ }
+ {
+ \addvspace { \l_@@_belowskip_tl }
+ }
}
}
% \end{macrocode}
@@ -3034,7 +3426,7 @@
}
{
\dim_compare:nTF
- { \parskip >= \l_@@_center_aboveskip_tl > \c_zero_skip }
+ { \parskip >= \glueexpr \l_@@_center_aboveskip_tl > \c_zero_skip }
{
\skip_zero:N \topsep
\skip_zero:N \l_@@_delta_below_skip
@@ -3108,7 +3500,7 @@
}
{
\dim_compare:nTF
- { \parskip >= \l_@@_flushright_aboveskip_tl > \c_zero_skip }
+ { \parskip >= \glueexpr \l_@@_flushright_aboveskip_tl > \c_zero_skip }
{
\skip_zero:N \topsep
\skip_zero:N \l_@@_delta_below_skip
@@ -3225,6 +3617,10 @@
\box_use:N \l_@@_chap_box
\hook_use:n { scripture / chap / after }
\group_end:
+ \bool_if:NT \l_@@_chap_show_verse_bool
+ {
+ \@@_verse_output:n { 1 }
+ }
\hook_gput_next_code:nn { para / begin }
{ \parshape 1 ~ \@totalleftmargin ~ \linewidth }
}
@@ -3296,7 +3692,7 @@
}
{
\dim_compare:nTF
- { \parskip >= \l_@@_hanging_aboveskip_tl > \c_zero_skip }
+ { \parskip >= \glueexpr \l_@@_hanging_aboveskip_tl > \c_zero_skip }
{
\skip_zero:N \topsep
\skip_zero:N \l_@@_delta_below_skip
@@ -3482,6 +3878,13 @@
{ scripture / midparachap }
{ #1 }
}
+ \bool_lazy_and:nnT
+ { \bool_if_p:n \l_@@_chap_show_verse_bool }
+ { \bool_if_p:n \l_@@_chap_drop_bool }
+ {
+ \bool_set_true:N \l_@@_midparachap_show_verse_bool
+ \bool_set_false:N \l_@@_chap_show_verse_bool
+ }
\par
\bool_set_true:N \l_@@_mid_para_chap_bool
\@@_vbox_set_top:Nw \l_@@_mid_para_chap_box
@@ -3602,7 +4005,7 @@
}
{
\dim_compare:nTF
- { \parskip >= \l_@@_narrow_aboveskip_tl > \c_zero_skip }
+ { \parskip >= \glueexpr \l_@@_narrow_aboveskip_tl > \c_zero_skip }
{
\skip_zero:N \topsep
\skip_zero:N \l_@@_delta_below_skip
@@ -3882,7 +4285,9 @@
\box_use:N \l_@@_chap_box
\hook_use:n { scripture / chap / after }
\group_end:
- \bool_if:NT \g_@@_poetry_midparachap_show_verse_bool
+ \bool_lazy_or:nnT
+ { \bool_if_p:n \l_@@_chap_show_verse_bool }
+ { \bool_if_p:n \g_@@_poetry_midparachap_show_verse_bool }
{
\@@_verse_output:n { 1 }
}
@@ -3913,7 +4318,9 @@
\skip_horizontal:N \l_@@_chap_sep_tl
\hook_use:n { scripture / chap / after }
}
- \bool_if:NT \g_@@_poetry_midparachap_show_verse_bool
+ \bool_lazy_or:nnT
+ { \bool_if_p:n \l_@@_chap_show_verse_bool }
+ { \bool_if_p:n \g_@@_poetry_midparachap_show_verse_bool }
{
\@@_verse_output:n { 1 }
}
@@ -4044,7 +4451,7 @@
}
{
\dim_compare:nTF
- { \parskip >= \l_@@_poetry_aboveskip_tl > \c_zero_skip }
+ { \parskip >= \glueexpr \l_@@_poetry_aboveskip_tl > \c_zero_skip }
{
\skip_zero:N \topsep
\skip_zero:N \l_@@_delta_below_skip
@@ -4137,6 +4544,30 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\textscripture}
+% \begin{arguments}
+% \item \meta{|reference|} of quotation.
+% \item \meta{|options|} to set.
+% \item \meta{|quotation|} text.
+% \end{arguments}
+% Set an inline quotation. This is equivalent to calling the
+% \env{scripture} environment with the \opt{inline} option set.
+% \begin{macrocode}
+\NewDocumentCommand { \textscripture } { oo+m }
+ {
+ \tl_if_novalue:nTF { #2 }
+ {
+ \begin { scripture } [ #1 ] [ inline ]
+ }
+ {
+ \begin { scripture } [ #1 ] [ inline, #2 ]
+ }
+ #3
+ \end { scripture }
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{envmacro}{scripture}
% \begin{arguments}
% \item \meta{|reference|} of quotation.
@@ -4239,15 +4670,23 @@
% \end{macrocode}
% \end{envmacro}
% \begin{macrocode}
+ \bool_if:NT \l_@@_inline_bool
+ {
+ \tl_set:Nn \l_@@_aboveskip_tl { 0pt }
+ \tl_set:Nn \l_@@_belowskip_tl { 0pt }
+ \tl_set:Nn \l_@@_leftmargin_tl { 0pt }
+ \tl_set:Nn \l_@@_rightmargin_tl { 0pt }
+ }
\bool_if:NT \l_@@_compact_bool
{
\scripturesetup { chapter / nodrop }
- \RenewDocumentEnvironment { center } { o } { \ignorespaces } { }
- \RenewDocumentEnvironment { flushright } { o } { \ignorespaces } { }
- \RenewDocumentEnvironment { hanging } { o } { \ignorespaces } { }
- \RenewDocumentEnvironment { midparachap } { o } { \ignorespaces } { }
- \RenewDocumentEnvironment { narrow } { o } { \ignorespaces } { }
- \RenewDocumentEnvironment { poetry } { o } { \ignorespaces } { }
+ \RenewDocumentEnvironment { center } { o } { \ignorespaces } { \unskip }
+ \RenewDocumentEnvironment { flushright } { o } { \ignorespaces } { \unskip }
+ \RenewDocumentEnvironment { hanging } { o } { \ignorespaces } { \unskip }
+ \RenewDocumentEnvironment { midparachap } { o } { \ignorespaces } { \unskip }
+ \RenewDocumentEnvironment { narrow } { o } { \ignorespaces } { \unskip }
+ \RenewDocumentEnvironment { poetry } { o } { \ignorespaces } { \unskip }
+ \cs_set_eq:NN \\ \unskip
\cs_set_eq:NN \par \relax
\cs_set_eq:NN \extraskip \relax
\cs_set_eq:NN \nohang \relax
diff --git a/macros/latex/contrib/scripture/scripture.ins b/macros/latex/contrib/scripture/scripture.ins
index 44698f3ffd..c61f1dab65 100644
--- a/macros/latex/contrib/scripture/scripture.ins
+++ b/macros/latex/contrib/scripture/scripture.ins
@@ -1,6 +1,6 @@
\iffalse meta-comment
-Copyright (c) 2022 David Purton <dcpurton@marshwiggle.net>
+Copyright (c) 2022-2023 David Purton <dcpurton@marshwiggle.net>
This work may be distributed and/or modified under the conditions of
the LaTeX Project Public License, either version 1.3c of this license
@@ -19,7 +19,7 @@ version 2005/12/01 or later.
This is a generated file.
-Copyright (c) 2022 David Purton <dcpurton@marshwiggle.net>
+Copyright (c) 2022-2023 David Purton <dcpurton@marshwiggle.net>
This work may be distributed and/or modified under the conditions of
the LaTeX Project2 Public License, either version 1.3c of this license
diff --git a/macros/latex/contrib/scripture/scripture.pdf b/macros/latex/contrib/scripture/scripture.pdf
index 2c1dc513c8..6d1f35df3c 100644
--- a/macros/latex/contrib/scripture/scripture.pdf
+++ b/macros/latex/contrib/scripture/scripture.pdf
Binary files differ