summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-02-02 03:04:47 +0000
committerNorbert Preining <norbert@preining.info>2022-02-02 03:04:47 +0000
commit460879b45ff6e83765da88734e8cc0c6da5043eb (patch)
tree8bbeaad213d6647db82d17b25a6ffd5bab08da18 /macros
parent811714247a66acfce87bba00b9758441ff9d1413 (diff)
CTAN sync 202202020304
Diffstat (limited to 'macros')
-rw-r--r--macros/latex/contrib/csvsimple/CHANGES.md14
-rw-r--r--macros/latex/contrib/csvsimple/README.md2
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-doc.sty6
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-example.pdfbin75628 -> 75624 bytes
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-example.tex2
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-l3.pdfbin1087253 -> 1093900 bytes
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-l3.sty53
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-l3.tex56
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-legacy.pdfbin823839 -> 823702 bytes
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-legacy.sty4
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple-legacy.tex2
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple.pdfbin309007 -> 309204 bytes
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple.sty4
-rw-r--r--macros/latex/contrib/csvsimple/csvsimple.tex2
-rw-r--r--macros/latex/contrib/dtxdescribe/README.txt5
-rw-r--r--macros/latex/contrib/dtxdescribe/dtxdescribe.dtx658
-rw-r--r--macros/latex/contrib/dtxdescribe/dtxdescribe.pdfbin334193 -> 389219 bytes
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx6
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin575824 -> 575857 bytes
-rw-r--r--macros/latex/contrib/easybook/easybook.tex52
-rw-r--r--macros/latex/contrib/fcolumn/README11
-rw-r--r--macros/latex/contrib/fcolumn/fcolumn.dtx595
-rw-r--r--macros/latex/contrib/fcolumn/fcolumn.ins6
-rw-r--r--macros/latex/contrib/fcolumn/fcolumn.pdfbin318179 -> 319237 bytes
-rw-r--r--macros/latex/contrib/fcolumn/makefile2
-rw-r--r--macros/latex/contrib/lwarp/README.txt4
-rw-r--r--macros/latex/contrib/lwarp/lwarp.dtx3649
-rw-r--r--macros/latex/contrib/lwarp/lwarp.ins2
-rw-r--r--macros/latex/contrib/lwarp/lwarp.pdfbin3144374 -> 3176264 bytes
-rwxr-xr-xmacros/latex/contrib/lwarp/lwarpmk.lua13
-rw-r--r--macros/latex/contrib/mindflow/README.md4
-rw-r--r--macros/latex/contrib/mindflow/mindflow.dtx112
-rw-r--r--macros/latex/contrib/mindflow/mindflow.pdfbin172607 -> 191911 bytes
-rw-r--r--macros/latex/contrib/proof-at-the-end/README.md13
-rw-r--r--macros/latex/contrib/proof-at-the-end/proof-at-the-end.dtx55
-rw-r--r--macros/latex/contrib/proof-at-the-end/proof-at-the-end.ins2
-rw-r--r--macros/latex/contrib/proof-at-the-end/proof-at-the-end.pdfbin347459 -> 315974 bytes
-rw-r--r--macros/latex/contrib/proof-at-the-end/proof-at-the-end_demo.pdfbin121561 -> 121558 bytes
-rw-r--r--macros/latex/contrib/zref-vario/CHANGELOG.md7
-rw-r--r--macros/latex/contrib/zref-vario/zref-vario-code.pdfbin539239 -> 538943 bytes
-rw-r--r--macros/latex/contrib/zref-vario/zref-vario.dtx140
-rw-r--r--macros/latex/contrib/zref-vario/zref-vario.pdfbin119911 -> 121131 bytes
-rw-r--r--macros/latex/contrib/zref-vario/zref-vario.tex23
43 files changed, 3412 insertions, 2092 deletions
diff --git a/macros/latex/contrib/csvsimple/CHANGES.md b/macros/latex/contrib/csvsimple/CHANGES.md
index 717bee870a..f41204bcb7 100644
--- a/macros/latex/contrib/csvsimple/CHANGES.md
+++ b/macros/latex/contrib/csvsimple/CHANGES.md
@@ -17,6 +17,20 @@ and this project adheres to
+## [2.3.0] - 2022-02-01
+
+### Added
+- Option `column names detection` (related to issue #16)
+- Documentation: csvautotabular inspired example for tabularray.
+
+### Changed
+- `\csvlinetotablerow` changed to be expandable and to be
+ usable inside a *Data Collection* (issue #16)
+- Options `autotabular`, `autobooktabular`, `autolongtable`, `autobooklongtable`
+ use `column names detection=false` now.
+
+
+
## [2.2.1] - 2022-01-07
### Fixed
diff --git a/macros/latex/contrib/csvsimple/README.md b/macros/latex/contrib/csvsimple/README.md
index 64b189014c..f874770dd8 100644
--- a/macros/latex/contrib/csvsimple/README.md
+++ b/macros/latex/contrib/csvsimple/README.md
@@ -1,4 +1,4 @@
-# The LaTeX package csvsimple - version 2.2.1 (2022/01/07)
+# The LaTeX package csvsimple - version 2.3.0 (2022/02/01)
> Copyright (c) 2008-2022 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
diff --git a/macros/latex/contrib/csvsimple/csvsimple-doc.sty b/macros/latex/contrib/csvsimple/csvsimple-doc.sty
index 913d36faa0..4d4d8beba8 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-doc.sty
+++ b/macros/latex/contrib/csvsimple/csvsimple-doc.sty
@@ -1,5 +1,5 @@
% !TeX encoding=UTF-8
-%% The LaTeX package csvsimple - version 2.2.1 (2022/01/07)
+%% The LaTeX package csvsimple - version 2.3.0 (2022/02/01)
%% csvsimple-doc.sty: style file for the documentation
%%
%% -------------------------------------------------------------------------------------------
@@ -18,8 +18,8 @@
%%
%% This work consists of all files listed in README.md
%%
-\def\version{2.2.1}%
-\def\datum{2022/01/07}%
+\def\version{2.3.0}%
+\def\datum{2022/02/01}%
\IfFileExists{csvsimple-doc.cfg}{\input{csvsimple-doc.cfg}}{}\providecommand\csvpkgprefix{}
diff --git a/macros/latex/contrib/csvsimple/csvsimple-example.pdf b/macros/latex/contrib/csvsimple/csvsimple-example.pdf
index 5bf8775667..b59dc4f269 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-example.pdf
+++ b/macros/latex/contrib/csvsimple/csvsimple-example.pdf
Binary files differ
diff --git a/macros/latex/contrib/csvsimple/csvsimple-example.tex b/macros/latex/contrib/csvsimple/csvsimple-example.tex
index 9c06e60240..ee5efffe8a 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-example.tex
+++ b/macros/latex/contrib/csvsimple/csvsimple-example.tex
@@ -1,4 +1,4 @@
-%% The LaTeX package csvsimple - version 2.2.1 (2022/01/07)
+%% The LaTeX package csvsimple - version 2.3.0 (2022/02/01)
%% csvsimple-example.tex: an example for csvsimple
%%
%% -------------------------------------------------------------------------------------------
diff --git a/macros/latex/contrib/csvsimple/csvsimple-l3.pdf b/macros/latex/contrib/csvsimple/csvsimple-l3.pdf
index e456d428df..2ed9105de7 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-l3.pdf
+++ b/macros/latex/contrib/csvsimple/csvsimple-l3.pdf
Binary files differ
diff --git a/macros/latex/contrib/csvsimple/csvsimple-l3.sty b/macros/latex/contrib/csvsimple/csvsimple-l3.sty
index 12230aa6e6..1af04edf9c 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-l3.sty
+++ b/macros/latex/contrib/csvsimple/csvsimple-l3.sty
@@ -1,4 +1,4 @@
-%% The LaTeX package csvsimple - version 2.2.1 (2022/01/07)
+%% The LaTeX package csvsimple - version 2.3.0 (2022/02/01)
%% csvsimple-l3.sty: Simple LaTeX CSV file processing (LaTeX3)
%%
%% -------------------------------------------------------------------------------------------
@@ -17,7 +17,7 @@
%%
%% This work consists of all files listed in README.md
%%
-\ProvidesExplPackage{csvsimple-l3}{2022/01/07}{2.2.1}
+\ProvidesExplPackage{csvsimple-l3}{2022/02/01}{2.3.0}
{LaTeX3 CSV file processing}
@@ -41,6 +41,7 @@
\bool_new:N \g__csvsim_check_column_count_bool
\bool_new:N \g__csvsim_collect_data_bool
+\bool_new:N \g__csvsim_colnames_detection_bool
\bool_new:N \g__csvsim_firstline_bool
\bool_new:N \g__csvsim_head_bool
\bool_new:N \g__csvsim_head_to_colnames_bool
@@ -196,7 +197,6 @@
{
\tl_set:No \l_tmpa_tl {\cs:w csvcol\int_to_roman:n{#1} \cs_end:}
\exp_args:NnV \cs_set_nopar:cpn {__csvsim__/\l_tmpa_tl} \l_tmpa_tl
-
\bool_if:NT \g__csvsim_head_to_colnames_bool
{
\tl_set:No \l_tmpb_tl {\cs:w \g__csvsim_headname_prefix_tl \l_tmpa_tl \cs_end:}
@@ -216,7 +216,10 @@
{
\int_gzero:N \g_csvsim_columncount_int
\__csvsim_scan_line:
- \int_step_function:nN \g_csvsim_columncount_int \__csvsim_process_head_name:n
+ \bool_if:NT \g__csvsim_colnames_detection_bool
+ {
+ \int_step_function:nN \g_csvsim_columncount_int \__csvsim_process_head_name:n
+ }
}
}
@@ -401,22 +404,28 @@
%---- auxiliary user macros
-\NewDocumentCommand \csvlinetotablerow { }
+% \NewDocumentCommand \csvlinetotablerow { }
+ % {
+ % \tl_clear:N \l_tmpa_tl
+ % \bool_set_false:N \l_tmpa_bool
+ % \seq_map_inline:Nn \g__csvsim_line_seq
+ % {
+ % \bool_if:NTF \l_tmpa_bool
+ % {
+ % \tl_put_right:Nn \l_tmpa_tl { & ##1 }
+ % }
+ % {
+ % \tl_put_right:Nn \l_tmpa_tl { ##1 }
+ % \bool_set_true:N \l_tmpa_bool
+ % }
+ % }
+ % \l_tmpa_tl
+ % }
+
+
+\NewExpandableDocumentCommand \csvlinetotablerow { }
{
- \tl_clear:N \l_tmpa_tl
- \bool_set_false:N \l_tmpa_bool
- \seq_map_inline:Nn \g__csvsim_line_seq
- {
- \bool_if:NTF \l_tmpa_bool
- {
- \tl_put_right:Nn \l_tmpa_tl { & ##1 }
- }
- {
- \tl_put_right:Nn \l_tmpa_tl { ##1 }
- \bool_set_true:N \l_tmpa_bool
- }
- }
- \l_tmpa_tl
+ \seq_use:Nn \g__csvsim_line_seq { & }
}
@@ -593,6 +602,7 @@
head .bool_gset:N = \g__csvsim_head_bool,
head~to~column~names~prefix .tl_gset:N = \g__csvsim_headname_prefix_tl,
head~to~column~names .bool_gset:N = \g__csvsim_head_to_colnames_bool,
+ column~names~detection .bool_gset:N = \g__csvsim_colnames_detection_bool,
column~count .int_gset:N = \g_csvsim_columncount_int,
separator .choice:,
separator/comma .code:n =
@@ -1178,6 +1188,7 @@
{
_autotabular_ = #1,
head,
+ column~names~detection = false,
after~head = \g__csvsim_before_table_tl
\begin{tabular}{|*{\int_use:N\g_csvsim_columncount_int}{l|}}
\g__csvsim_table_head_tl,
@@ -1198,6 +1209,7 @@
{
_autotabular_ = #1,
head,
+ column~names~detection = false,
after~head = \g__csvsim_before_table_tl
\begin{tabular}{*{\int_use:N\g_csvsim_columncount_int}{l}}
\g__csvsim_table_head_tl,
@@ -1224,6 +1236,7 @@
{
_autolongtable_ = #1,
head,
+ column~names~detection = false,
after~head = \g__csvsim_before_table_tl
\begin{longtable}{|*{\int_use:N\g_csvsim_columncount_int}{l|}}
\g__csvsim_table_head_tl,
@@ -1244,6 +1257,7 @@
{
_autolongtable_ = #1,
head,
+ column~names~detection = false,
after~head = \g__csvsim_before_table_tl
\begin{longtable}{*{\int_use:N\g_csvsim_columncount_int}{l}}
\g__csvsim_table_head_tl,
@@ -1408,6 +1422,7 @@
command = \csvline,
column~names~reset,
head,
+ column~names~detection,
check~column~count,
head~to~column~names~prefix = ,
head~to~column~names = false,
diff --git a/macros/latex/contrib/csvsimple/csvsimple-l3.tex b/macros/latex/contrib/csvsimple/csvsimple-l3.tex
index a8ed99a34b..d8bd01a613 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-l3.tex
+++ b/macros/latex/contrib/csvsimple/csvsimple-l3.tex
@@ -1,6 +1,6 @@
% \LaTeX-Main\
% !TeX encoding=UTF-8
-%% The LaTeX package csvsimple - version 2.2.1 (2022/01/07)
+%% The LaTeX package csvsimple - version 2.3.0 (2022/02/01)
%% csvsimple.tex: Manual
%%
%% -------------------------------------------------------------------------------------------
@@ -708,12 +708,13 @@ purpose:
\end{docCommand}
-\begin{docCommand}[doc updated=2016-07-01]{csvlinetotablerow}{}
+\clearpage
+\begin{docCommand}[doc updated=2022-01-11]{csvlinetotablerow}{}
Typesets the current processed data line with |&| between the entries.
- %Most users will never apply this command.
+ This macro is \emph{expandable}.
\end{docCommand}
-\clearpage
+
\begin{docCommands}{
{ doc name = thecsvrow , doc updated = 2021-06-25 },
{ doc name = g_csvsim_row_int, doc new = 2021-06-25 }
@@ -975,6 +976,16 @@ see Section~\ref{subsec:tabsupport} from page~\pageref{subsec:tabsupport}.
\end{docCsvKey}
+\begin{docCsvKey}[][doc new=2022-02-01]{column names detection}{\colOpt{=true\textbar false}}{default |true|, initially |true|}
+ If this key is set, the header line is detected for names which can be used
+ for \refKey{/csvsim/column names} and \refKey{/csvsim/head to column names}.
+ Otherwise, these options are not functional.\\
+ This key can and should be set to |false|, if the header line contains
+ macros or characters not allowed inside \LaTeX\ control sequences, because
+ otherwise compilation error are to be expected.
+\end{docCsvKey}
+
+
\clearpage
\subsection{Consistency Check}\label{sec:consistency}%
@@ -1554,7 +1565,7 @@ completeness, but are unlikely to be used directly.
doc description = no default,
]
{
- { doc name = autotabular },
+ { doc name = autotabular, doc updated = {2022-02-01} },
{ doc name = autotabular* },
}
Reads the whole CSV file denoted \meta{file name} with an automated formatting.
@@ -1567,7 +1578,7 @@ completeness, but are unlikely to be used directly.
doc description = no default,
]
{
- { doc name = autolongtable },
+ { doc name = autolongtable, doc updated = {2022-02-01} },
{ doc name = autolongtable* },
}
Reads the whole CSV file denoted \meta{file name} with an automated formatting
@@ -1581,7 +1592,7 @@ completeness, but are unlikely to be used directly.
doc description = no default,
]
{
- { doc name = autobooktabular },
+ { doc name = autobooktabular, doc updated = {2022-02-01} },
{ doc name = autobooktabular* },
}
Reads the whole CSV file denoted \meta{file name} with an automated formatting
@@ -1595,7 +1606,7 @@ completeness, but are unlikely to be used directly.
doc description = no default,
]
{
- { doc name = autobooklongtable },
+ { doc name = autobooklongtable, doc updated = {2022-02-01} },
{ doc name = autobooklongtable* },
}
Reads the whole CSV file denoted \meta{file name} with an automated formatting
@@ -2032,6 +2043,7 @@ Observe the following hints for \refKey{/csvsim/command}:
the \emph{value} of this macro to \refCom{csvdatacollection}.
This is optional, if |\csvcoli| contains numbers or text without active
characters, but essential, if it contains macros.
+\item \refCom{csvlinetotablerow} is to be used \emph{without} |\csvexpval|.
\item For macros like |\textbf| use |\csvexpnot\textbf| to \emph{prevent}
expansion.
\item Using computations or not expandable conditionals may likely cause
@@ -2071,7 +2083,7 @@ Sets the collection macro to an alternative for \refCom{csvdatacollection}.
\begin{docCommand}[doc new=2021-07-06]{csvdatacollection}{}
Macro which contains the collected data of a CSV file processed with
\refKey{/csvsim/collect data}. This macro name can be changed by
- settiing \refKey{/csvsim/data collection}.
+ setting \refKey{/csvsim/data collection}.
\end{docCommand}
@@ -2088,6 +2100,8 @@ Sets the collection macro to an alternative for \refCom{csvdatacollection}.
Alternatively, |\noexpand| could be used.
\end{docCommand}
+The following macros can only be used inside keys which are \emph{not}
+collected to \refCom{csvdatacollection}, e.g. inside \refKey{/csvsim/after filter}.
\begin{docCommand}[doc new=2021-07-06]{csvcollectn}{\marg{code}}
Appends the given \meta{code} to \refCom{csvdatacollection}.\\
@@ -2703,6 +2717,30 @@ Display data from line 3 on:\par
\end{dispExample}
+\clearpage
+
+The following example displays a \ctanpkg{tabularray} variant of the
+\refCom{csvautotabular} command. Note the \refKey{/csvsim/no head} option
+to read the first line as data line. Also note that \refCom{csvlinetotablerow}
+is used without preceding modifier.
+
+\begin{dispExample}
+% \usepackage{tabularray}
+\csvreader[
+ no head,
+ centered tabularray =
+ {
+ row{odd} = {blue!85!gray!7},
+ row{1} = {blue!50!gray!25, font=\bfseries},
+ },
+ table head = {\hline[0.1em,blue!50!black]},
+ table foot = {\hline[0.1em,blue!50!black]},
+ late after first line = {\\\hline[blue!50!black]},
+]{data.csv}{}{%
+ \csvlinetotablerow%
+}
+\end{dispExample}
+
\clearpage
\subsection{Imported CSV data}\label{sec:importeddata}%
diff --git a/macros/latex/contrib/csvsimple/csvsimple-legacy.pdf b/macros/latex/contrib/csvsimple/csvsimple-legacy.pdf
index 2679c11d73..dc99089c0a 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-legacy.pdf
+++ b/macros/latex/contrib/csvsimple/csvsimple-legacy.pdf
Binary files differ
diff --git a/macros/latex/contrib/csvsimple/csvsimple-legacy.sty b/macros/latex/contrib/csvsimple/csvsimple-legacy.sty
index 8451131c6e..9495978c55 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-legacy.sty
+++ b/macros/latex/contrib/csvsimple/csvsimple-legacy.sty
@@ -1,4 +1,4 @@
-%% The LaTeX package csvsimple - version 2.2.1 (2022/01/07)
+%% The LaTeX package csvsimple - version 2.3.0 (2022/02/01)
%% csvsimple-legacy.sty: Simple LaTeX CSV file processing (LaTeX2e)
%%
%% -------------------------------------------------------------------------------------------
@@ -18,7 +18,7 @@
%% This work consists of all files listed in README.md
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{csvsimple-legacy}[2022/01/07 version 2.2.1 LaTeX2e CSV file processing]
+\ProvidesPackage{csvsimple-legacy}[2022/02/01 version 2.3.0 LaTeX2e CSV file processing]
%---- check package
diff --git a/macros/latex/contrib/csvsimple/csvsimple-legacy.tex b/macros/latex/contrib/csvsimple/csvsimple-legacy.tex
index 711798f4a9..bffc4b53b4 100644
--- a/macros/latex/contrib/csvsimple/csvsimple-legacy.tex
+++ b/macros/latex/contrib/csvsimple/csvsimple-legacy.tex
@@ -1,6 +1,6 @@
% \LaTeX-Main\
% !TeX encoding=UTF-8
-%% The LaTeX package csvsimple - version 2.2.1 (2022/01/07)
+%% The LaTeX package csvsimple - version 2.3.0 (2022/02/01)
%% csvsimple.tex: Manual
%%
%% -------------------------------------------------------------------------------------------
diff --git a/macros/latex/contrib/csvsimple/csvsimple.pdf b/macros/latex/contrib/csvsimple/csvsimple.pdf
index 8ef7047fb2..0b356e3122 100644
--- a/macros/latex/contrib/csvsimple/csvsimple.pdf
+++ b/macros/latex/contrib/csvsimple/csvsimple.pdf
Binary files differ
diff --git a/macros/latex/contrib/csvsimple/csvsimple.sty b/macros/latex/contrib/csvsimple/csvsimple.sty
index 9d8f85bbb3..b34de03816 100644
--- a/macros/latex/contrib/csvsimple/csvsimple.sty
+++ b/macros/latex/contrib/csvsimple/csvsimple.sty
@@ -1,4 +1,4 @@
-%% The LaTeX package csvsimple - version 2.2.1 (2022/01/07)
+%% The LaTeX package csvsimple - version 2.3.0 (2022/02/01)
%% csvsimple.sty: Simple LaTeX CSV file processing
%%
%% -------------------------------------------------------------------------------------------
@@ -19,7 +19,7 @@
%%
\RequirePackage{l3keys2e}
-\ProvidesExplPackage{csvsimple}{2022/01/07}{2.2.1}
+\ProvidesExplPackage{csvsimple}{2022/02/01}{2.3.0}
{LaTeX CSV file processing}
\cs_if_exist:NT \c__csvsim_package_expl_bool
diff --git a/macros/latex/contrib/csvsimple/csvsimple.tex b/macros/latex/contrib/csvsimple/csvsimple.tex
index 0f98435406..a9870b5063 100644
--- a/macros/latex/contrib/csvsimple/csvsimple.tex
+++ b/macros/latex/contrib/csvsimple/csvsimple.tex
@@ -1,6 +1,6 @@
% \LaTeX-Main\
% !TeX encoding=UTF-8
-%% The LaTeX package csvsimple - version 2.2.1 (2022/01/07)
+%% The LaTeX package csvsimple - version 2.3.0 (2022/02/01)
%% csvsimple.tex: Manual
%%
%% -------------------------------------------------------------------------------------------
diff --git a/macros/latex/contrib/dtxdescribe/README.txt b/macros/latex/contrib/dtxdescribe/README.txt
index 60d788aa99..ec9337e57f 100644
--- a/macros/latex/contrib/dtxdescribe/README.txt
+++ b/macros/latex/contrib/dtxdescribe/README.txt
@@ -1,8 +1,9 @@
The LaTeX dtxdescribe package
Describe additional object types in dtx source files.
-v1.01 — 2019/03/22
-Copyright 2016–2019 Brian Dunn — www.BDTechConcepts.com
+v1.03 — 2012/02/01
+Copyright 2016–2022 Brian Dunn — www.BDTechConcepts.com
+
LaTeX Project Public License, version 1.3
The doc package includes tools for describing macros and environments in
diff --git a/macros/latex/contrib/dtxdescribe/dtxdescribe.dtx b/macros/latex/contrib/dtxdescribe/dtxdescribe.dtx
index 1c7ae225e3..0f12529663 100644
--- a/macros/latex/contrib/dtxdescribe/dtxdescribe.dtx
+++ b/macros/latex/contrib/dtxdescribe/dtxdescribe.dtx
@@ -1,7 +1,7 @@
% \iffalse meta-comment
%
-% Copyright 2016-2019 Brian Dunn
+% Copyright 2016-2022 Brian Dunn
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -17,7 +17,7 @@
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{dtxdescribe}
-%<package> [2019/07/16 v1.02 Describe additional object types in source files.]
+%<package> [2022/02/01 v1.03 Describe additional object types in source files.]
%
%<*driver>
\documentclass{ltxdoc}
@@ -26,6 +26,10 @@
\newcommand{\quicksummary}{Describe additional object types in \texttt{dtx} source files.}
+\usepackage{iftex}
+
+\ifpdftex
+
% \usepackage{lmodern}
% \usepackage{libertine}
\usepackage[space]{erewhon}
@@ -41,10 +45,6 @@
\usepackage[utf8]{inputenc}
\usepackage{textcomp} % provides \degree, \textquotesingle, \textmu
-
-
-
-
% copy/paste special unicode symbols:
\input{glyphtounicode}
\pdfglyphtounicode{prime}{2032}% hex
@@ -74,24 +74,26 @@
\newunicodechar{‡}{\ddag}
\newunicodechar{⚠}{\warningsign}
-\usepackage{microtype}
+\else
+
+\usepackage{fontspec}
+
+\setmainfont{Erewhon-Regular}
+\setsansfont{Cabin}
+\setmonofont{inconsolata}
+
+\fi
-\usepackage{metalogo}
-\makeatletter
-\@ifpackageloaded{erewhon}{
-\setlogokern{Te}{-.08em}
-\setlogokern{eX}{-0.04em}
-\setlogokern{La}{-.25em}
-\setlogokern{aT}{-.08em}
-\setlogokern{Xe}{-.04em}
-\setlogokern{eL}{-.06em}
-\setlogodrop{0.27ex}
-}{}
-\makeatother
\usepackage{etoolbox}
-\usepackage[log-declarations=false]{xparse}
+\usepackage{xparse}
+
+
+
+\usepackage{microtype}
+
+\usepackage{metalogox}
\usepackage{titleps}
@@ -119,7 +121,7 @@
\usepackage{\mypackagename}
-\usepackage[pdftex,bookmarks=true,hidelinks,%
+\usepackage[bookmarks=true,hidelinks,%
colorlinks,linkcolor=mylinkcolor,urlcolor=myurlcolor,%
pageanchor=true,hyperindex=true,
]{hyperref}
@@ -136,6 +138,21 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
\usepackage{cleveref}
+\renewenvironment{abstract}
+ {
+ \bigskip
+ \begin{center}
+ \textbf{\abstractname}
+ \end{center}
+% \small
+ \setlength{\parindent}{2em}
+ \setlength{\parskip}{0ex}
+ }
+ {
+ \bigskip
+ }
+
+
\setcounter{IndexColumns}{2}
\DisableCrossrefs
@@ -153,7 +170,7 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
%<*package>
% \fi
%
-% \CheckSum{1118}
+% \CheckSum{1211}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -176,6 +193,7 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
% \changes{v1.00}{2019/01/11}{\ 2019/01/11}
% \changes{v1.01}{2019/03/22}{\ 2019/03/22}
% \changes{v1.02}{2019/07/16}{\ 2019/07/16}
+% \changes{v1.03}{2022/02/01}{\ 2022/02/01}
@@ -200,12 +218,14 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
%
% \bigskip
%
-% {\small\textcopyright{} 2016--2018} Brian Dunn\\ \small \texttt{bd@BDTechConcepts.com}
+% {\small\textcopyright{} 2016--2022} Brian Dunn\\ \small \texttt{bd@BDTechConcepts.com}
%
% \vspace{.5in}
%
% {\Large \textup{\quicksummary}}
%
+% \end{center}
+%
% \vfill
%
%
@@ -214,7 +234,7 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
% The \pkg{doc} package includes tools for describing macros and environments
% in \LaTeX\ source \filenm{.dtx} format.
% The \pkg{dtxdescribe} package adds additional tools for describing
-% booleans, lengths, counters, keys, packages, classes, options,
+% booleans, lengths, counters, hooks, keys, packages, classes, options,
% files, commands, arguments, and other objects.
% \pkg{dtxdescribe} also works with the regular document classes, for those
% who do not wish to use the \pkg{ltxdoc} class and \filenm{.dtx} files.
@@ -240,12 +260,13 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
% the \env{macro} and \env{environment} environments are not supported.
% Either \pkg{makeidx} or \pkg{splitidx} may be loaded by the user.
% \pkg{makeidx} will be used by default.
-% \end{abstract}
%
+% \pkg{dtxdescribe} works with pdf\TeX, \XeTeX, and \LuaTeX, and perhaps other engines
+% as well.
+% \end{abstract}
%
% \vfill
%
-% \end{center}
% \clearpage
%
% \tableofcontents
@@ -312,8 +333,8 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
% %</driver>
% \end{sourceverb}
-% Various objects inside the |dtx| file may be described with \cs{DescribeBoolean},
-% \cs{DescribeLength}, \cs{DescribeCounter}, and related macros,
+% Various objects inside the |dtx| file may be described with new
+% macros such as \cs{DescribeBoolean}, \cs{DescribeLength}, \cs{DescribeCounter},
% similar to the already-familiar \cs{DescribeMacro} and \cs{DescribeEnv}.
% Optional ``classes'' may be assigned to the objects being described, including the new versions
@@ -419,7 +440,7 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
% See \cref{ex:arguments} on \cpageref{ex:arguments}.
-% \subsection{Booleans, lengths, counters, keys}
+% \subsection{Booleans, lengths, counters, hooks, keys}
%
% See \cref{ex:common} on \cpageref{ex:common}.
%
@@ -438,6 +459,16 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
% Describes a counter. Given a `Ctr' tag in the margin and index.
%
%
+% \DescribeMacro{\DescribeHook} \oarg{class} \marg{name}
+%
+% Describes a hook. Given a `Hook' tag in the margin and index.
+% The |class| may be used to categorize hooks by package.
+% Example:
+% \begin{sourceverb}
+% \DescribeHook[LaTeX]{para/begin}
+% \end{sourceverb}
+%
+%
% \DescribeMacro{\DescribeKey} \oarg{class} \marg{name}
%
% Describes a key. Given a `Key' tag in the margin and index.
@@ -523,6 +554,8 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
%
% \DescribeMacro{\ItemDescribeCounter} \oarg{class} \marg{name} A description.
%
+% \DescribeMacro{\ItemDescribeHook} \oarg{class} \marg{name} A description.
+%
% \DescribeMacro{\ItemDescribeKey} \oarg{class} \marg{name} A description.
%
% \DescribeMacro{\ItemDescribePackage} \oarg{class} \marg{package\_name} With underscores.
@@ -558,6 +591,29 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
% \DescribeDefault{green!50!black}
+% \subsection{Nesting}
+%
+% \DescribeMacro{\shownesting}
+% * \oarg{fraction of \cs{linewidth}} \marg{container name} \marg{contents}
+%
+% It may be useful to show which objects contain which other objects.
+% \cs{shownesting} shows a box enclosing a name for the container,
+% and the container's contents.
+% \cs{shownesting} be nested, showing boxes inside other boxes,
+% which displays how each environment and macro is fit together inside each other.
+%
+% The optional argument is the fraction of \cs{linewidth} to use for the box,
+% from |[0]| to |[1]|.
+% The default is |[1]|.
+% Each \cs{shownesting} starts its own paragraph, unless the star |*| is used,
+% in which case the \cs{shownesting*} appears inline with previous text.
+% To place two \cs{shownesting} boxes side-by-side, use optional arguments to
+% specify less than full \cs{linewidth} for each box, and use \cs{shownesting*} for
+% the second box to place it inline.
+%
+% See \cref{ex:nesting} on \cpageref{ex:nesting} for an example.
+
+
% \subsection{\cs{margintag}, \cs{watchout}}
%
%
@@ -616,13 +672,15 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
%
% \subsection{\env{noindmacro} and \env{noindenvironment} environments}
%
-% These only make sense if using the \pkg{ltxdoc} class and \pkg{doc} package
+% These are like \env{macro} and \env{environment}, but not indexed.
% \watchout[\filenm{.dtx} only]
+% These only make sense if using the \pkg{ltxdoc} class and \pkg{doc} package
% to document a \filenm{.dtx} file, where comments are used by \prog{docstrip}
% to disable these environments in the resulting \filenm{.sty} file.
-% When using the regular document classes, the \env{noindmacro} and
-% \env{noindenvironment} environments would localize any definitions,
-% and \cs{DescribeMacro} and \cs{DescribeEnv} should be used instead.
+% When using the regular document classes, \env{noindmacro} and
+% \env{noindenvironment} environments should not be used, as they
+% would localize any definitions.
+% \cs{DescribeMacro} and \cs{DescribeEnv} should be used instead.
%
% \DescribeEnv{noindmacro} \marg{\cs{name}}
% To document macros which should not be included in the index.
@@ -704,22 +762,32 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
%
% Macros to format references to various kinds of objects.
%
-% This \pkg{dtxdescribe} package documentation uses \pkg{erewhon}, \pkg{roboto},
-% and \pkg{inconsolata}, along with \pkg{metalogo},
+% This \pkg{dtxdescribe} package documentation uses \pkg{erewhon}, \pkg{cabin},
+% and \pkg{inconsolata}, along with \pkg{metalogox},
% to demonstrate the following font effects.
%
%
% \subsubsection{\LaTeX\ objects}
%
-% \DescribeMacro{\pkg} \pkg{packagename}, also for a \pkg{classname}
+% \DescribeMacro{\pkg} \marg{packagename} \quad Prints as \pkg{packagename}.
+% Also for a \pkg{classname}.
+
+% \DescribeMacro{\cs} \marg{csname} \quad Prints as \cs{csname}.
+
+% \DescribeMacro{\env} \marg{environment} \quad Prints as \env{environment}.
+
+% \DescribeMacro{\marg} \marg{argument} \quad Prints \marg{arg}. Mandatory argument.
-% \DescribeMacro{\env} \env{environment}
+% \DescribeMacro{\oarg} \marg{argument} \quad Prints \oarg{arg}. Optional argument.
-% \DescribeMacro{\ctr} \ctr{counter}
+% \DescribeMacro{\parg} \marg{argument} \quad Prints \parg{arg}. Picture-mode argument.
-% \DescribeMacro{\bool} \bool{boolean}
+% \DescribeMacro{\ctr} \marg{counter} \quad Prints as \ctr{counter}.
-% \DescribeMacro{\optn} \optn{option}: to a macro, package, class
+% \DescribeMacro{\bool} \marg{boolean} \quad Prints as \bool{boolean}.
+
+% \DescribeMacro{\optn} \marg{option} \quad Prints as \optn{option},
+% for example to a macro, package, class.
% \DescribeMacro{\TOC} \TOC: Table of contents.
@@ -730,17 +798,17 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
% \subsubsection{Programs and commands}
-% \DescribeMacro{\progcode} \progcode{inline program code}:
+% \DescribeMacro{\progcode} Prints as \progcode{inline program code}:
% Escape underscores and other special characters such as \{, \%, \$.
-% \DescribeMacro{\prog} \prog{grep}, \prog{make}: A program name. Underscores allowed.
+% \DescribeMacro{\prog} Prints as \prog{grep}, \prog{make}: A program name. Underscores allowed.
-% \DescribeMacro{\filenm} \filenm{file_name}: Underscores allowed.
+% \DescribeMacro{\filenm} Prints as \filenm{file_name}: Underscores allowed.
-% \DescribeMacro{\UI} \UI{General user-interface text.} What the user sees on the display.
+% \DescribeMacro{\UI} Prints as \UI{General user-interface text.} What the user sees on the display.
% Also see the \env{UIdisplay} environment.
%
-% \DescribeMacro{\cmds} \cmds{commands to be entered}: What the user enters.
+% \DescribeMacro{\cmds} Prints as \cmds{Commands to be entered}: What the user enters.
% Escape underscores and other special characters such as \{, \%, \$.
% Also see the \cs{userentry} macro.
%
@@ -770,9 +838,17 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
% \DescribeMacro{\URL} \URL: Uniform Resource Locator
-% \DescribeMacro{\element} \element{element}: \HTML \Slash \CSS\ element
+% \DescribeMacro{\element} \marg{element name} \quad Prints as \element{element},
+% an \HTML \Slash \CSS\ element
+
+% \DescribeMacro{\attribute} \marg{attribute name} \quad Prints as \attribute{attribute},
+% an \HTML \Slash \CSS\ attribute.
+% pdf\TeX\ and \XeTeX\ only.
+% \textcolor{\watchoutcolor}{Not for \LuaTeX.}
-% \DescribeMacro{\attribute} \attribute{attribute}: \HTML \Slash \CSS\ attribute
+% \DescribeMacro{\attrib} \marg{attribute name} \quad Prints as \attribute{attribute},
+% an \HTML \Slash \CSS\ attribute.
+% pdf\TeX, \XeTeX, or \LuaTeX.
% \DescribeMacro{\HTML} \HTML: Hypertext Markup Language
@@ -789,18 +865,20 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
%
% \DescribeMacro{\tikz} \tikz: Package logo
-% \DescribeMacro{\MathML} \MathML: Mathematical Markup Language
-
% \DescribeMacro{\CTAN} \CTAN: Comprehensive \TeX\ Archive Network
% \DescribeMacro{\TDS} \TDS: \TeX\ Directory Structure
%
+% \DescribeMacro{\MathML} \MathML: Mathematical Markup Language
+%
+% \DescribeMacro{\MathJax} \MathJax: Math on the web.
+%
%
% \subsubsection{Acronyms, brand names, trademarks}
%
-% \DescribeMacro{\brand} \brand{Brandname}, \brand{Company Name}
+% \DescribeMacro{\brand} \marg{name} \quad \brand{Brandname}, \brand{Company Name}
-% \DescribeMacro{\acro} \acro{acro}: Acronym
+% \DescribeMacro{\acro} \marg{acronym} \quad \acro{acro}: Acronym
% \DescribeMacro{\supregistered} Superscript trademark symbol\supregistered
%
@@ -809,7 +887,17 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
%
% \subsection{Logos}
%
-% Several additional logos are provided:
+% Several additional logos are provided.
+%
+% Also see the \pkg{metalogo} and \pkg{metalogox} packages.
+%
+% \DescribeMacro{\dviTeX} \dviTeX
+%
+% \DescribeMacro{\dviLaTeX} \dviLaTeX
+%
+% \DescribeMacro{\pdfTeX} \pdfTeX
+%
+% \DescribeMacro{\pdfLaTeX} \pdfLaTeX
%
% \DescribeMacro{\LuaTeX} \LuaTeX
%
@@ -1072,6 +1160,31 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
% Uses a \env{description} environment to describe objects.
+% \clearpage
+%
+% \begin{dtxexample}{Nesting\label{ex:nesting}}
+% \shownesting{\env{environmentA}}{
+% \shownesting{\cs{macroB}}{
+% \shownesting{\env{environmentC}}{
+% The contents.
+% }
+% }
+% }
+%
+% \shownesting{\env{sidebyside}}{
+% \shownesting[.35]{minipage}{
+% Left contents.
+% }
+% \hfill \cs{hfill} \hfill
+% \shownesting*[.35]{minipage}{
+% Right contents.
+% }
+% }
+% \end{dtxexample}
+%
+% Note the use of the optional arguments to select less than full \cs{linewidth},
+% and the starred form for the second box to place it inline with the \cs{hfill} text.
+
% \clearpage
%
@@ -1192,7 +1305,7 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
% It may be useful to use \cs{DeclareBoolean} and friends both at the code location
% and also in the User's Manual section.
%
-% \item[Extra spaces:] When placing multiple \cs{Describe}, \cs{index}, \cs{margintag}, and
+% \item[Extra spaces:] When placing multiple uses of \cs{Describe}, \cs{index}, \cs{margintag}, and
% \cs{watchout} macros
% together, care must be taken to avoid extra space in the printed text where
% these macros occur.
@@ -1270,12 +1383,12 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
\RequirePackage{xparse}
% \end{macrocode}
-% \DescribePackage{xifthen} Used for the examples.
+% \changes{v1.03}{2021/09/02}{No longer requires \pkg{xifthen}.}
+
+% \DescribePackage{calc} Used for \cs{shownesting}.
% \begin{macrocode}
-\RequirePackage{xifthen}
+\RequirePackage{calc}
% \end{macrocode}
-%
-%
% \DescribePackage{xcolor} Used for the examples.
@@ -1345,7 +1458,6 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
\def\filenm#1{\detokenize{#1}}%
\def\brand#1{#1}%
\def\acro#1{#1}%
- \def\HTML{HTML}%
\def\ODT{ODT}%
\def\SVG{SVG}%
\def\PNG{PNG}%
@@ -1358,6 +1470,7 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
\def\URL{URL}%
\def\element#1{#1}%
\def\attribute#1{#1}%
+ \def\attrib#1{#1}%
\def\HTML{HTML}%
\def\HTMLfive{HTML5}%
\def\CSS{CSS}%
@@ -1580,18 +1693,23 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
% The |class| is used to sub-categories keys into their key/value groups.
%
% \changes{v1.01}{2019/01/20}{Put margin tag class in brackets.}
+% \changes{v1.03}{2022/01/08}{Reduce hbox warnings.}
% \begin{macrocode}
\newcommand*{\DTXD@margintag}[3]{%
-\@ifundefined{@captype}{% not float?
-\leavevmode%
-\marginpar{%
-\DTXD@printtype{%
-#3% margintag
-\ifblank{#1}{}{ [#1]}% class
-}% Desc@Type
-\texttt{#2}% name
-}% marginpar
-}{}% not float?
+ \@ifundefined{@captype}{% not float?
+ \leavevmode%
+ \marginpar{%
+ {%
+ \hbadness=10000%
+ \hfuzz=5em%
+ \DTXD@printtype{%
+ #3% margintag
+ \ifblank{#1}{}{ [#1]}% class
+ }%
+ \texttt{#2}% name
+ }%
+ }% marginpar
+ }{}% not float?
}
% \end{macrocode}
% \end{macro}
@@ -1731,15 +1849,20 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
\@bsphack%
% \end{macrocode}
% Create a margin tag with the name of the macro:
+% \changes{v1.03}{2022/01/08}{Reduce hbox warnings.}
% \begin{macrocode}
\@ifundefined{@captype}{% not float?
\leavevmode%
\marginpar{%
-\DTXD@printtype{%
-#3% margin tag
-\ifblank{#1}{}{ [#1]}% class
-}% Desc@Type
-\cmd{#2}% name
+ {%
+ \hbadness=10000%
+ \hfuzz=5em%
+ \DTXD@printtype{%
+ #3% margin tag
+ \ifblank{#1}{}{ [#1]}% class
+ }%
+ \cmd{#2}% name
+ }%
}% marginpar
}{}% not float?
% \end{macrocode}
@@ -1786,6 +1909,7 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
% \changes{v1.00}{2019/01/09}{Sans tag font.}
% \changes{v1.01}{2019/01/20}{Put margin tag class in brackets.}
% \changes{v1.02}{2019/07/14}{Fix if not \pkg{ltxdoc} class.}
+% \changes{v1.03}{2022/01/08}{Reduce hbox warnings.}
% \begin{macrocode}
\providecommand*{\DescribeMacro}{}
\renewcommand*{\DescribeMacro}[2][]{%
@@ -1796,12 +1920,17 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
\@ifundefined{@captype}{% not float?
\leavevmode%
\marginpar{%
-\raggedleft%
-\ifblank{#1}{}{{\scriptsize\textsf{[#1]}} }% class
-\cmd{#2}% name
+ {%
+ \hbadness=10000%
+ \hfuzz=5em%
+ \raggedleft%
+ \ifblank{#1}{}{{\scriptsize\textsf{[#1]}} }% class
+ \cmd{#2}% name
+ }%
}% marginpar
}{}% not float?
% \end{macrocode}
+%
% Write the index sorted by the name without the backslash,
% followed by the actual name with the backslash.
% Append the class if given.
@@ -1810,9 +1939,10 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
% \begin{macrocode}
\begingroup%
\DTXD@origwrindex{%
-\DTXD@macroname{#2}\actualchar\DTXD@verbatimcmd{#2}% name
-\ifblank{#1}{}{\levelchar[#1]}% class
-\encapchar usage}%
+ \DTXD@macroname{#2}\actualchar\DTXD@verbatimcmd{#2}% name
+ \ifblank{#1}{}{\levelchar[#1]}% class
+ \encapchar usage%
+}%
% \end{macrocode}
% Only if a class was given:
% \begin{macrocode}
@@ -1823,11 +1953,11 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
%
% Write class=(class):>name=csname\verb+|usage+
% \begin{macrocode}
-\begingroup%
-\DTXD@origwrindex{%
-#1\actualchar[#1]:\levelchar%
-\DTXD@macroname{#2}\actualchar\DTXD@verbatimcmd{#2}%
-\encapchar usage}%
+ \begingroup%
+ \DTXD@origwrindex{%
+ #1\actualchar[#1]:\levelchar%
+ \DTXD@macroname{#2}\actualchar\DTXD@verbatimcmd{#2}%
+ \encapchar usage}%
}% class given
\@esphack%
\ignorespaces%
@@ -2054,6 +2184,15 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\DescribeHook} \oarg{class} \marg{name}
+% \changes{v1.03}{2021/12/18}{Added.}
+% \begin{macrocode}
+\newcommand*{\DescribeHook}[2][]
+ {\DTXD@margintagindex{#1}{#2}{Hook}{hook}{usage}}
+% \end{macrocode}
+% \end{macro}
+%
+%
% \begin{macro}{\DescribeKey} \oarg{class} \marg{name}
%
% The |class| may be used to categorize keys by their kev/value group.
@@ -2072,35 +2211,39 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
% \changes{v1.01}{2019/01/20}{Put margin tag class in brackets.}
% \changes{v1.02}{2019/07/14}{Added \cs{ignorespaces}.}
% \changes{v1.02}{2019/07/16}{\cs{raggedleft} margin par.}
+% \changes{v1.03}{2022/01/08}{Reduce hbox warnings.}
% \begin{macrocode}
\newcommand*{\DescribeObject}[2][]{%
\@ifundefined{@captype}{% not float?
-\@bsphack%
-\leavevmode%
-\marginpar{%
- \raggedleft%
- \ifblank{#1}{}{\raggedleft{\scriptsize[#1]} }
- \texttt{#2}%
-}%
+ \@bsphack%
+ \leavevmode%
+ \marginpar{%
+ \hbadness=10000%
+ \hfuzz=5em%
+ \raggedleft%
+ \ifblank{#1}{}{\raggedleft{\scriptsize[#1]} }
+ \texttt{#2}%
+ }%
}{}% not float?
\ifblank{#1}%
-{\begingroup%
-\DTXD@origwrindex{%
-#2\actualchar{\protect\ttfamily#2}%
-\encapchar usage%
-}%
-}%
{%
-\begingroup%
-\DTXD@origwrindex{%
-#2\actualchar{\protect\ttfamily#2} [#1]%
-\encapchar usage%
-}%
-\begingroup%
-\DTXD@origwrindex{%
-#1\actualchar[#1]:\levelchar#2\actualchar{\protect\ttfamily#2}%
-\encapchar usage%
+ \begingroup%
+ \DTXD@origwrindex{%
+ #2\actualchar{\protect\ttfamily#2}%
+ \encapchar usage%
+ }%
}%
+{%
+ \begingroup%
+ \DTXD@origwrindex{%
+ #2\actualchar{\protect\ttfamily#2} [#1]%
+ \encapchar usage%
+ }%
+ \begingroup%
+ \DTXD@origwrindex{%
+ #1\actualchar[#1]:\levelchar#2\actualchar{\protect\ttfamily#2}%
+ \encapchar usage%
+ }%
}%
\@esphack%
\ignorespaces%
@@ -2115,27 +2258,30 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
% \changes{v1.01}{2019/01/20}{Put margin tag class in brackets.}
% \changes{v1.02}{2019/07/14}{Added \cs{ignorespaces}.}
% \changes{v1.02}{2019/07/16}{\cs{raggedleft} margin par.}
+% \changes{v1.03}{2022/01/08}{Reduce hbox warnings.}
% \begin{macrocode}
\newcommand*{\DescribeOther}[2][]{%
\@ifundefined{@captype}{% not float?
-\@bsphack%
-\leavevmode%
-\marginpar{%
- \raggedleft%
- \ifblank{#1}{}{\raggedleft{\scriptsize[#1]} }%
- #2%
-}%
+ \@bsphack%
+ \leavevmode%
+ \marginpar{%
+ \hbadness=10000%
+ \hfuzz=5em%
+ \raggedleft%
+ \ifblank{#1}{}{\raggedleft{\scriptsize[#1]} }%
+ #2%
+ }%
}{}% not float?
\ifblank{#1}%
{%
-\begingroup%
-\DTXD@origwrindex{#2\encapchar usage}%
+ \begingroup%
+ \DTXD@origwrindex{#2\encapchar usage}%
}%
{%
-\begingroup%
-\DTXD@origwrindex{#2 [#1]\encapchar usage}%
-\begingroup%
-\DTXD@origwrindex{#1\actualchar[#1]:\levelchar#2\encapchar usage}%
+ \begingroup%
+ \DTXD@origwrindex{#2 [#1]\encapchar usage}%
+ \begingroup%
+ \DTXD@origwrindex{#1\actualchar[#1]:\levelchar#2\encapchar usage}%
}%
\@esphack%
\ignorespaces%
@@ -2184,9 +2330,9 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
% \changes{v1.00}{2019/01/09}{Added.}
% \begin{macrocode}
\newcommand{\ItemDescribeMacro}[2][]{%
-\item[\cmd{#2}:]%
-\setlength{\parskip}{1.5ex}%
-\DescribeMacro[#1]{#2}%
+ \item[\cmd{#2}:]%
+ \setlength{\parskip}{1.5ex}%
+ \DescribeMacro[#1]{#2}%
}
% \end{macrocode}
% \end{macro}
@@ -2195,9 +2341,9 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
% \changes{v1.00}{2019/01/09}{Added.}
% \begin{macrocode}
\newcommand{\ItemDescribeEnv}[2][]{%
-\item[\env{#2}:]%
-\setlength{\parskip}{1.5ex}%
-\DescribeEnv[#1]{#2}%
+ \item[\env{#2}:]%
+ \setlength{\parskip}{1.5ex}%
+ \DescribeEnv[#1]{#2}%
}
% \end{macrocode}
% \end{macro}
@@ -2206,9 +2352,9 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
% \changes{v1.00}{2019/01/09}{Added.}
% \begin{macrocode}
\newcommand{\ItemDescribeArgument}[2][]{%
-\item[\texttt{#2}:]%
-\setlength{\parskip}{1.5ex}%
-\DescribeArgument[#1]{#2}%
+ \item[\texttt{#2}:]%
+ \setlength{\parskip}{1.5ex}%
+ \DescribeArgument[#1]{#2}%
}
% \end{macrocode}
% \end{macro}
@@ -2217,9 +2363,9 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
% \changes{v1.00}{2019/01/09}{Added.}
% \begin{macrocode}
\newcommand{\ItemDescribeBoolean}[2][]{%
-\item[\texttt{#2}:]%
-\setlength{\parskip}{1.5ex}%
-\DescribeBoolean[#1]{#2}%
+ \item[\texttt{#2}:]%
+ \setlength{\parskip}{1.5ex}%
+ \DescribeBoolean[#1]{#2}%
}
% \end{macrocode}
% \end{macro}
@@ -2228,9 +2374,9 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
% \changes{v1.00}{2019/01/09}{Added.}
% \begin{macrocode}
\newcommand{\ItemDescribeLength}[2][]{%
-\item[\cmd{#2}:]%
-\setlength{\parskip}{1.5ex}%
-\DescribeLength[#1]{#2}%
+ \item[\cmd{#2}:]%
+ \setlength{\parskip}{1.5ex}%
+ \DescribeLength[#1]{#2}%
}
% \end{macrocode}
% \end{macro}
@@ -2239,9 +2385,20 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
% \changes{v1.00}{2019/01/09}{Added.}
% \begin{macrocode}
\newcommand{\ItemDescribeCounter}[2][]{%
-\item[\texttt{#2}:]%
-\setlength{\parskip}{1.5ex}%
-\DescribeCounter[#1]{#2}%
+ \item[\texttt{#2}:]%
+ \setlength{\parskip}{1.5ex}%
+ \DescribeCounter[#1]{#2}%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\ItemDescribeHook} \oarg{class} \marg{name}
+% \changes{v1.03}{2021/12/18}{Added.}
+% \begin{macrocode}
+\newcommand{\ItemDescribeHook}[2][]{%
+ \item[\texttt{#2}:]%
+ \setlength{\parskip}{1.5ex}%
+ \DescribeHook[#1]{#2}%
}
% \end{macrocode}
% \end{macro}
@@ -2250,9 +2407,9 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
% \changes{v1.00}{2019/01/09}{Added.}
% \begin{macrocode}
\newcommand{\ItemDescribeKey}[2][]{%
-\item[\texttt{#2}:]%
-\setlength{\parskip}{1.5ex}%
-\DescribeKey[#1]{#2}%
+ \item[\texttt{#2}:]%
+ \setlength{\parskip}{1.5ex}%
+ \DescribeKey[#1]{#2}%
}
% \end{macrocode}
% \end{macro}
@@ -2261,14 +2418,14 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
% \changes{v1.00}{2019/01/09}{Added.}
% \begin{macrocode}
\newcommand{\DTXD@ItemDescribePackage}[2][]{%
-\item[\texttt{#2}:]%
-\setlength{\parskip}{1.5ex}%
-\DescribePackage[#1]{#2}%
-\endgroup
+ \item[\texttt{#2}:]%
+ \setlength{\parskip}{1.5ex}%
+ \DescribePackage[#1]{#2}%
+ \endgroup%
}
\newcommand{\ItemDescribePackage}{%
-\begingroup\catcode`\_=12 \DTXD@ItemDescribePackage%
+ \begingroup\catcode`\_=12 \DTXD@ItemDescribePackage%
}
% \end{macrocode}
% \end{macro}
@@ -2277,14 +2434,14 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
% \changes{v1.00}{2019/01/09}{Added.}
% \begin{macrocode}
\newcommand{\DTXD@ItemDescribeClass}[2][]{%
-\item[\texttt{#2}:]%
-\setlength{\parskip}{1.5ex}%
-\DescribeClass[#1]{#2}%
-\endgroup
+ \item[\texttt{#2}:]%
+ \setlength{\parskip}{1.5ex}%
+ \DescribeClass[#1]{#2}%
+ \endgroup%
}
\newcommand{\ItemDescribeClass}{%
-\begingroup\catcode`\_=12 \DTXD@ItemDescribeClass%
+ \begingroup\catcode`\_=12 \DTXD@ItemDescribeClass%
}
% \end{macrocode}
% \end{macro}
@@ -2293,9 +2450,9 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
% \changes{v1.00}{2019/01/09}{Added.}
% \begin{macrocode}
\newcommand{\ItemDescribeOption}[2][]{%
-\item[\texttt{#2}:]%
-\setlength{\parskip}{1.5ex}%
-\DescribeOption[#1]{#2}%
+ \item[\texttt{#2}:]%
+ \setlength{\parskip}{1.5ex}%
+ \DescribeOption[#1]{#2}%
}
% \end{macrocode}
% \end{macro}
@@ -2305,14 +2462,14 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
% \changes{v1.00}{2019/01/09}{Added.}
% \begin{macrocode}
\newcommand{\DTXD@ItemDescribeFile}[2][]{%
-\item[\texttt{#2}:]%
-\setlength{\parskip}{1.5ex}%
-\DescribeFile[#1]{#2}%
-\endgroup
+ \item[\texttt{#2}:]%
+ \setlength{\parskip}{1.5ex}%
+ \DescribeFile[#1]{#2}%
+ \endgroup%
}
\newcommand{\ItemDescribeFile}{%
-\begingroup\catcode`\_=12 \DTXD@ItemDescribeFile%
+ \begingroup\catcode`\_=12 \DTXD@ItemDescribeFile%
}
% \end{macrocode}
% \end{macro}
@@ -2321,14 +2478,14 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
% \changes{v1.00}{2019/01/09}{Added.}
% \begin{macrocode}
\newcommand{\DTXD@ItemDescribeProgram}[2][]{%
-\item[\texttt{#2}:]%
-\setlength{\parskip}{1.5ex}%
-\DescribeProgram[#1]{#2}%
-\endgroup
+ \item[\texttt{#2}:]%
+ \setlength{\parskip}{1.5ex}%
+ \DescribeProgram[#1]{#2}%
+ \endgroup%
}
\newcommand{\ItemDescribeProgram}{%
-\begingroup\catcode`\_=12 \DTXD@ItemDescribeProgram%
+ \begingroup\catcode`\_=12 \DTXD@ItemDescribeProgram%
}
% \end{macrocode}
% \end{macro}
@@ -2337,14 +2494,14 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
% \changes{v1.00}{2019/01/09}{Added.}
% \begin{macrocode}
\newcommand{\DTXD@ItemDescribeCommand}[2][]{%
-\item[\texttt{#2}:]%
-\setlength{\parskip}{1.5ex}%
-\DescribeCommand[#1]{#2}%
-\endgroup
+ \item[\texttt{#2}:]%
+ \setlength{\parskip}{1.5ex}%
+ \DescribeCommand[#1]{#2}%
+ \endgroup%
}
\newcommand{\ItemDescribeCommand}{%
-\begingroup\catcode`\_=12 \DTXD@ItemDescribeCommand%
+ \begingroup\catcode`\_=12 \DTXD@ItemDescribeCommand%
}
% \end{macrocode}
% \end{macro}
@@ -2353,9 +2510,9 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
% \changes{v1.00}{2019/01/09}{Added.}
% \begin{macrocode}
\newcommand{\ItemDescribeObject}[2][]{%
-\item[\texttt{#2}:]%
-\setlength{\parskip}{1.5ex}%
-\DescribeObject[#1]{#2}%
+ \item[\texttt{#2}:]%
+ \setlength{\parskip}{1.5ex}%
+ \DescribeObject[#1]{#2}%
}
% \end{macrocode}
% \end{macro}
@@ -2364,9 +2521,9 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
% \changes{v1.00}{2019/01/09}{Added.}
% \begin{macrocode}
\newcommand{\ItemDescribeOther}[2][]{%
-\item[\texttt{#2}:]%
-\setlength{\parskip}{1.5ex}%
-\DescribeOther[#1]{#2}%
+ \item[\texttt{#2}:]%
+ \setlength{\parskip}{1.5ex}%
+ \DescribeOther[#1]{#2}%
}
% \end{macrocode}
% \end{macro}
@@ -2434,6 +2591,35 @@ Keywords={LaTeX, dtx, source, DescribeMacro}%
% \end{macro}
+% \subsection{Nesting}
+%
+% Shows a box enclosing a label for the container, and the container's contents.
+% May be nested.
+%
+% \begin{macro}{\shownesting}
+% \oarg{fraction of \cs{linewidth}} \marg{container} \marg{contents}
+% \changes{v1.03}{2021/09/01}{Added.}
+% \begin{macrocode}
+\NewDocumentCommand{\shownesting}{s O{1} m m}{
+ \IfBooleanF{#1}{
+ \par\smallskip
+ }
+ \fbox{
+ \begin{minipage}{#2\linewidth-2em}
+ \hbadness=10000\relax%
+ #3\par\smallskip
+ \hspace{1em}
+ \begin{minipage}{\linewidth-1.5em}
+ #4
+ \end{minipage}
+ \end{minipage}
+ }
+}
+% \end{macrocode}
+% \end{macro}
+
+
+
% \subsection{The \env{dtxexample} environment}
%
% Also see \cref{ex:dtxexample} on page \cpageref{ex:dtxexample}.
@@ -2760,31 +2946,62 @@ position=top,
%
% \subsubsection{\LaTeX\ objects}
%
-% \begin{macro}{\pkg} or class
+% \begin{macro}{\pkg} \marg{name} \quad Also useable for class names.
% \begin{macrocode}
\providerobustcmd*{\pkg}[1]{\mbox{\textsf{#1}}}
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\env}
+% \begin{macro}{\cs} \marg{csname} \quad From \pkg{ltxdoc}.
+% \changes{v1.03}{2021/09/02}{Provided.}
+% \begin{macrocode}
+\providerobustcmd*{\cs}[1]{\texttt{\char`\\#1}}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\env} \marg{name}
% \begin{macrocode}
\providerobustcmd*{\env}[1]{\mbox{\texttt{#1}}}
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\ctr}
+% \begin{macro}{\marg} \marg{argument} \quad From \pkg{ltxdoc}.
+% \changes{v1.03}{2021/09/02}{Provided.}
+% \begin{macrocode}
+\providecommand\marg[1]{%
+ {\ttfamily\char`\{}\meta{#1}{\ttfamily\char`\}}}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\oarg} \oarg{argument} \quad From \pkg{ltxdoc}.
+% \changes{v1.03}{2021/09/02}{Provided.}
+% \begin{macrocode}
+\providecommand\oarg[1]{%
+ {\ttfamily[}\meta{#1}{\ttfamily]}}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\parg} \parg{argument} \quad From \pkg{ltxdoc}.
+% \changes{v1.03}{2021/09/02}{Provided.}
+% \begin{macrocode}
+\providecommand\parg[1]{%
+ {\ttfamily(}\meta{#1}{\ttfamily)}}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\ctr} \marg{name}
% \begin{macrocode}
\providerobustcmd*{\ctr}[1]{\mbox{\texttt{#1}}}
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\bool}
+% \begin{macro}{\bool} \marg{name}
% \begin{macrocode}
\providerobustcmd*{\bool}[1]{\mbox{\texttt{#1}}}
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\optn}
+% \begin{macro}{\optn} \marg{name}
% \begin{macrocode}
\providerobustcmd*{\optn}[1]{\mbox{\texttt{#1}}}
% \end{macrocode}
@@ -2811,19 +3028,21 @@ position=top,
% \subsubsection{Programs and commands}
-% \begin{macro}{\cmds}
+% \begin{macro}{\cmds} \marg{commands to print}
+% \quad No processing is provided for special characters.
% \begin{macrocode}
\providerobustcmd*{\cmds}[1]{\mbox{\textbf{\texttt{#1}}}}
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\progcode}
+% \begin{macro}{\progcode} \marg{code to print}
+% \quad No processing is provided for special characters.
% \begin{macrocode}
\providerobustcmd*{\progcode}[1]{\mbox{\texttt{#1}}}
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\prog}
+% \begin{macro}{\prog} \marg{program name} \quad Underscores are allowed.
% \begin{macrocode}
\newcommand*{\DTXD@prog}[1]{%
\mbox{\textsf{\textsl{\detokenize{#1}}}}%
@@ -2838,7 +3057,7 @@ position=top,
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\filenm}
+% \begin{macro}{\filenm} \marg{file name} \quad Underscores are allowed.
% \begin{macrocode}
\newcommand*{\DTXD@filenm}[1]{%
\mbox{\texttt{\detokenize{#1}}}%
@@ -2925,17 +3144,27 @@ position=top,
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\element}
+% \begin{macro}{\element} \marg{name}
% \begin{macrocode}
\providerobustcmd*{\element}[1]{\texttt{<#1>}}
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\attribute}
+% \begin{macro}{\attribute} \marg{name}
+% \begin{macro}{\attrib} \marg{name}
+%
+% Each of these is ``provided'', and any prior meaning will
+% be unchanged.
+% In particular, \LuaTeX\ uses \cs{attribute}, so its meaning
+% is unchanged if using \LuaTeX.
+% \changes{v1.03}{2021/09/01}{For \LuaTeX.}
% \begin{macrocode}
+\providerobustcmd*{\attrib}[1]{\mbox{\texttt{#1}}}
+
\providerobustcmd*{\attribute}[1]{\mbox{\texttt{#1}}}
% \end{macrocode}
% \end{macro}
+% \end{macro}
% \begin{macro}{\HTML}
% \begin{macrocode}
@@ -2976,12 +3205,6 @@ position=top,
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\MathML}
-% \begin{macrocode}
-\providerobustcmd*{\MathML}{Math\acro{ML}}
-% \end{macrocode}
-% \end{macro}
-
% \begin{macro}{\CTAN}
% \begin{macrocode}
\providerobustcmd*{\CTAN}{\acro{CTAN}}
@@ -2994,16 +3217,29 @@ position=top,
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\MathML}
+% \begin{macrocode}
+\providerobustcmd*{\MathML}{Math\acro{ML}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\MathJax}
+% \changes{v1.03}{2021/09/02}{Added.}
+% \begin{macrocode}
+\providerobustcmd*{\MathJax}{\brand{MathJax}}
+% \end{macrocode}
+% \end{macro}
+%
%
% \subsubsection{Acronyms, brand names, trademarks}
%
-% \begin{macro}{\brand}
+% \begin{macro}{\brand} \marg{name}
% \begin{macrocode}
\providerobustcmd*{\brand}[1]{\textsc{#1}}
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\acro}
+% \begin{macro}{\acro} \marg{acronym}
% \begin{macrocode}
\providerobustcmd*{\acro}[1]{\textsc{\lowercase{#1}}}
% \end{macrocode}
@@ -3022,6 +3258,34 @@ position=top,
%
% \changes{v1.00}{2019/01/11}{Added logos.}
%
+% \begin{macro}{\dviTeX} \dviTeX
+% \changes{v1.03}{2021/09/02}{Added.}
+% \begin{macrocode}
+\providerobustcmd*{\dviTeX}{\mbox{\DVI\,\TeX}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\dviLaTeX} \dviLaTeX
+% \changes{v1.03}{2021/09/02}{Added.}
+% \begin{macrocode}
+\providerobustcmd*{\dviLaTeX}{\mbox{\DVI\,\LaTeX}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pdfTeX} \pdfTeX
+% \changes{v1.03}{2021/09/02}{Added.}
+% \begin{macrocode}
+\providerobustcmd*{\pdfTeX}{\mbox{\PDF\,\TeX}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\pdfLaTeX} \pdfLaTeX
+% \changes{v1.03}{2021/09/02}{Added.}
+% \begin{macrocode}
+\providerobustcmd*{\pdfLaTeX}{\mbox{\PDF\,\LaTeX}}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\LuaTeX} \LuaTeX
% \begin{macrocode}
\providerobustcmd*{\LuaTeX}{\mbox{Lua\TeX}}
@@ -3116,13 +3380,17 @@ position=top,
%
% \begin{macro}{\thinbrspace} A thin space which allows a line break.
% \begin{macrocode}
-\newcommand{\thinbrspace}{\hspace{.16667em}\penalty\exhyphenpenalty\hspace{0pt}}
+\newcommand{\thinbrspace}{%
+ \hspace{.16667em}\penalty\exhyphenpenalty\hspace{0pt}%
+}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\thinthinbrspace} A thin space which allows a line break.
% \begin{macrocode}
-\newcommand{\thinthinbrspace}{\hspace{.08333em}\penalty\exhyphenpenalty\hspace{0pt}}
+\newcommand{\thinthinbrspace}{%
+ \hspace{.08333em}\penalty\exhyphenpenalty\hspace{0pt}%
+}
% \end{macrocode}
% \end{macro}
%
diff --git a/macros/latex/contrib/dtxdescribe/dtxdescribe.pdf b/macros/latex/contrib/dtxdescribe/dtxdescribe.pdf
index 25fb713686..28847b413e 100644
--- a/macros/latex/contrib/dtxdescribe/dtxdescribe.pdf
+++ b/macros/latex/contrib/dtxdescribe/dtxdescribe.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index 7c5b54eddd..a95ac16fc4 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -15,7 +15,7 @@
%<*class>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2022/01/31}{1.58}
+\ProvidesExplClass{easybook}{2022/02/01}{1.59}
{Typeset Chinese theses or books}
\bool_set_false:N \l__eb_compile_draft_bool
@@ -305,7 +305,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2022/01/31}{1.58}
+\ProvidesExplPackage{easybase}{2022/02/01}{1.59}
{Typeset Chinese theses or books}
\cs_generate_variant:Nn \dim_set:Nn { NV }
@@ -2343,7 +2343,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2022/01/31}{1.58}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2022/02/01}{1.59}
{Customization of tcolorbox for easybook}
\cs_set_protected:Npn \addtotcbstyle #1#2
diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf
index 2380b1c3d2..cca5377c8e 100644
--- a/macros/latex/contrib/easybook/easybook.pdf
+++ b/macros/latex/contrib/easybook/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/easybook.tex b/macros/latex/contrib/easybook/easybook.tex
index 0a8668bd86..8c16272c70 100644
--- a/macros/latex/contrib/easybook/easybook.tex
+++ b/macros/latex/contrib/easybook/easybook.tex
@@ -21,8 +21,8 @@
name = easybook,
color-scheme = blue,
title = EASYBOOK 使用手册,
- version = v1.58,
- date = 2022/01/31,
+ version = v1.59,
+ date = 2022/02/01,
authors = 瞿毅,
info = 排版简体中文学位论文和书籍,
email = q1jx@foxmail.com,
@@ -244,7 +244,7 @@
\keyval-{config}{配置文件列表}
载入用户配置的文件名列表,文件列表以花括号包裹并以英文逗号分隔。文件名应包含如 \code{tex}、\code{def} 或 \code{cfg} 等扩展名。若配置文件不在当前文件夹则文件名需要包含路径。
\keybool{floatpage}\dtag\Default{false}
- 开启这个选项后浮动环境 \env*{table} 和 \env*{figure} 的比例参数会使用默认值,关闭它则尽可能避免出现浮动页,使图表环境与正文段落更加紧凑,减少多余的空白版面。
+ 开启这个选项后浮动环境 \env*{table} 和 \env*{figure} 的比例参数会使用默认值。关闭它则尽可能避免出现浮动页,使图表环境与正文段落更加紧凑,减少多余的空白版面。
\keybool{theorem}\dtag\Default{true}
是否提供定理功能支持。选项开启时定理样式模块生效,此时会载入 \pkg*{amsthm} 和 \pkg*{thmtools} 宏包。
\end{options}
@@ -266,7 +266,7 @@
\subsection{英文字体}
\begin{options}
\keychoice{font}{noto,times,times*,ebgaramond,libertine,palatino,auto}\Default{auto}
- 预置的英文字体相关配置方案如下表所示,这些字体已经包含在了 \TeX Live 发行版中,所以通常不需要再专门安装。如果您想使用其它英文字体,可以使用 \pkg*{fontspec} 宏包的相关命令进行设置。
+ 预置的英文字体相关配置方案如下表所示。这些字体已经包含在了 \TeX Live 发行版中,所以通常不需要再专门安装。如果您想使用其它英文字体,可以使用 \pkg*{fontspec} 宏包的相关命令进行设置。
\insertblr
{
colspec = @{}*{4}{c}@{},
@@ -410,7 +410,7 @@
\label{sec:interface options}
\begin{commands}
\command*{ctexset}[\marg{键值列表}]
- \cls*{easybook} 扩展了 C\TeX 宏集 \hologo{LaTeX3} 风格键值的通用控制命令 \cs*{ctexset},接口选项同样可用它设置, 原有的 \meta{键值列表} 仍然可用。本文档类目前有 9 个模块用于实现常规的排版功能,如下表所示。模块名也是统一接口 \cs*{ctexset} 的路径,不同模块单独接口的命令名\textbf{加上前缀} \code{eb}:
+ \cls*{easybook} 扩展了 C\TeX 宏集 \hologo{LaTeX3} 风格键值的通用控制命令 \cs*{ctexset},接口选项同样可用它设置,原有的 \meta{键值列表} 仍然可用。本文档类目前有 9 个模块用于实现常规的排版功能,如下表所示。模块名也是统一接口 \cs*{ctexset} 的路径,不同模块单独接口的命令名\textbf{加上前缀} \code{eb}:
\insertblr
{
colspec = @{}*{5}{c}@{},
@@ -451,7 +451,7 @@
声明新的颜色主题命令。它的参数以英文逗号分隔,第一部分为颜色风格名称,后面三部分为 \code{HTML} 颜色代码,构成主题颜色列表。类似地更改超链接颜色见\ref{subsec:hyperlinks}。
\end{commands}
\keyval-{color-every}{HTML颜色代码}
- 统一设置主题的各部分颜色,参数是 6 个十六进制数字组成的 \code{HTML} 颜色代码,任意颜色的代码可以在常见的图片处理工具拾色器中查看。
+ 统一设置主题的各部分颜色。参数是 6 个十六进制数字组成的 \code{HTML} 颜色代码,任意颜色的代码可以在常见的图片处理工具拾色器中查看。
\keyval-{multoc}{整数}\Default{2}
使目录多栏排版,与\ref{sec:document command} 中目录命令的同名选项有相同效果。
\keybool{withpart}\Default{false}
@@ -467,7 +467,7 @@
\ebstyle{brackets = {\bracketsf,]}}
\end{ctexexam}
\kvsplit-{figurepath}{\marg{路径名1}\marg{路径名2}}
- 设置插入图片的文件夹路径名,可以有多个路径名,每个路径包含在括号分隔,只有一个路径时需要包含在两层括号内。
+ 设置插入图片的文件夹路径名。可以有多个路径名,每个路径包含在花括号内分隔,只有一个路径时需要包含在两层括号内。
\end{options}
\subsubsection{连字符}
@@ -518,15 +518,15 @@
模块 \module*{refset} 将超链接选项交给 \pkg*{hyperref} 宏包处理,除了一些关于 \code{pdf} 书签或已预设的选项可能失效,其它由接口命令 \cs*{hypersetup} 支持的多数选项可用。
\begin{options}
\keychoice{linktype}{edge,colors,none}\Module{refset}\Default{edge}
- 超链接类型,\code{edge} 使超链接形式为边框,\code{colors} 使超链接字体为彩色,\code{none} 关闭超链接边框与颜色,此时 \option{linkcolor} 选项无效。
+ 超链接类型。\code{edge} 使超链接形式为边框,\code{colors} 使超链接字体为彩色,\code{none} 关闭超链接边框与颜色,此时 \option{linkcolor} 选项无效。
\keychoice{linkcolor}{fresh,cutepink,navyblue,crimson}\Default{navyblue}
- 超链接颜色样式,预置了四种超链接颜色风格。为使相关颜色能够正确显示,\option{linkcolor} 选项应当在 \option{linktype} 前使用。
+ 超链接颜色样式。预置了四种超链接颜色风格。为使相关颜色能够正确显示,\option{linkcolor} 选项应当在 \option{linktype} 前使用。
\begin{commands}
\command{DeclareLinkColor}[\splitmarg{风格名称,ctex@link,ctex@url,ctex@cite}]
声明新的超链接颜色样式命令。它的参数以英文逗号分隔,第一部分为颜色风格名称,后面三部分为 \code{HTML} 颜色代码,构成超链接颜色列表。
\end{commands}
\keyval-{linkcolor-every}{HTML颜色代码}
- 统一设置超链接的各部分颜色,参数是 6 个十六进制数字组成的 \code{HTML} 颜色代码,任意颜色的代码可以在常见的图片处理工具拾色器中查看。
+ 统一设置超链接的各部分颜色。参数是 6 个十六进制数字组成的 \code{HTML} 颜色代码,任意颜色的代码可以在常见的图片处理工具拾色器中查看。
\keychoice{linktoc}{none,section,page,all}\Default{all}
将目录中的超链接取消、置于标题上、置于页码上或置于标题和页码上。
\end{options}
@@ -538,7 +538,7 @@
\keyval-{line}{数值}\Module{spread}\Default{1.354}
正文行距因子,注意 C\TeX 宏集原有的行距选项 \option*{linespread} 失效。
\keyval-{table}{数值}\Default{1.354}
- 表格内容行距因子,对传统表格 \env*{tabular} 和 \env*{tabularx} 等环境以及 \pkg*{tabularray} 宏包的 \env{tblr} 环境生效,同时 \env{tblr} 也自带有 \option*{stretch} 选项设置行距系数。
+ 表格内容行距因子。对传统表格 \env*{tabular} 和 \env*{tabularx} 等环境以及 \pkg*{tabularray} 宏包的 \env{tblr} 环境生效,同时 \env{tblr} 也自带有 \option*{stretch} 选项设置行距系数。
\keyval-{math}{数值}\Default{1.3}
数学环境的行距因子,包含了 \pkg*{amsmath} 和 \pkg*{mathtools} 宏包提供的公式环境。
\keyval-{caption-figure}{数值}\Default{1.2}
@@ -665,7 +665,7 @@
\keyval-{headpunct}{代码}
紧随定理标题末尾的标记代码,位于定理第一段内容的间距 \option{postheadspace} 之前,可以是字符或插入换行符 \cs*{newline} 等命令。
\keyval-{headindent}{刚性长度}
- 定理标题的缩进,默认无缩进,可用 \cs*{parindent} 命令设置为段落缩进。
+ 定理标题的缩进。默认无缩进,可用 \cs*{parindent} 命令设置为段落缩进。
\keyval-{postheadspace}{刚性长度}
定理标题后与定理第一段内容的间距。
\keyval-{spaceabove}{弹性长度}
@@ -724,7 +724,7 @@
\keyval-{subsec-mark}{标题标记}
标题标记命令 \cs*{subsectionmark} 的内容,包括了标签选项 \option{subsec-label} 的内容。
\kvsplit-{chap-label}{\oarg{数字输出命令}\marg{距离命令}}\Default{\cs*{hspace}\Marg{1em}}
- 标题标记命令 \cs*{chaptermark} 内容的标签(标题有编号时),比标题标记选项更常用,可选参数是对应于章节编号计数器的输出命令,必选参数是编号与标题之间的距离命令:
+ 标题标记命令 \cs*{chaptermark} 内容的标签(标题有编号时)。比标题标记选项更常用,可选参数是对应于章节编号计数器的输出命令,必选参数是编号与标题之间的距离命令:
\begin{ctexexam}
\ebhdrset
{
@@ -776,7 +776,7 @@
模块 \module*{hdrset} 还可以灵活调整脚注编号和内容的格式。格式主要包括脚注标记的编号类型、字体、附加符号、对齐方式和缩进距离等,以及脚注内容的首行缩进、行距和字体等。基本思想是默认脚注和自定义编号脚注标记的格式分离,两种类型脚注各自正文和内容的标记又共享格式,默认脚注中正文和内容标记的编号类型分离。
\begin{options}
\keychoice{footnotetype}{hang,default,flush,bottom}\Module{hdrset}\Default{hang}
- 脚注的类型,悬挂缩进 \code{hang} 是默认值,\code{default} 是原始的类型,在一些浮动体排版的情况下,脚注可能位于页面中间,\code{bottom} 使脚注始终位于页面底端,\code{flush} 使脚注内容标记位于脚注首行边缘外侧并右对齐。其中 \code{bottom} 是复合选项,可以与前三种类型重复或复合使用:
+ 脚注的类型。悬挂缩进 \code{hang} 是默认值,\code{default} 是原始的类型。在一些浮动体排版的情况下,脚注可能位于页面中间,\code{bottom} 使脚注始终位于页面底端,\code{flush} 使脚注内容标记位于脚注首行边缘外侧并右对齐。其中 \code{bottom} 是复合选项,可以与前三种类型重复或复合使用:
\begin{ctexexam}
\ebhdrset{footnotetype = default,footnotetype = bottom}
\ebhdrset{footnotetype = {hang,bottom}}
@@ -790,7 +790,7 @@
\keychoice{fntext-pos}{normal,super}\Default{super}
设置脚注内容标记的位置,正常文本或是上标形式。
\keychoice{fnmark-num}{plain,pifont,pifont*,pisans,pisans*,short num}\Default{plain}
- 脚注正文标记编号的类型,默认为原生样式 \code{plain},还可以改为 \code{pifont} 的各个版本,从左往右依次为普通版、阴文衬线版、阳文无衬线版和阴文无衬线版,缺点是它们的编号仅包括 1-10。
+ 脚注正文标记编号的类型。默认为原生样式 \code{plain},还可以改为 \code{pifont} 的各个版本,从左往右依次为普通版、阴文衬线版、阳文无衬线版和阴文无衬线版,缺点是它们的编号仅包括 1-10。
短编号的形式与列表环境类似,不过增加了中文数字 \code{c} 和符号 \code{s} 格式参数。原生样式 \code{plain} 等同于单独使用数字 \code{1} 参数。这个选项可以用在正文中改变其后脚注编号类型。
\begin{commands}
@@ -812,17 +812,17 @@
\end{ctexexam}
\end{commands}
\keychoice{fntext-num}{plain,pifont,pifont*,pisans,pisans*,short num}\Default{plain}
- 脚注内容标记编号的类型,用法与 \option{fnmark-num} 一样,所以脚注内容与正文标记编号类型\textbf{可以不同}。
+ 脚注内容标记编号的类型。用法与 \option{fnmark-num} 一样,所以脚注内容与正文标记编号类型\textbf{可以不同}。
\keychoice{fnmate-num}{plain,pifont,pifont*,pisans,pisans*,short num}\Default{plain}
同时设定脚注正文标记编号 \option{fnmark-num} 与脚注内容标记编号 \option{fntext-num} 的类型。目前脚注编号类型选项对于迷你页环境 \env*{minipage} 无效,其中的脚注保持默认英文字母的编号类型。
\keychoice{fnmark-vmove}{fixed length,match}\Default{0pt}
- 脚注正文标记的垂直偏移,可以设为刚性长度,或用 \code{match} 匹配 \option*{spvmove} 全局的值。
+ 脚注正文标记的垂直偏移。可以设为刚性长度,或用 \code{match} 匹配 \option*{spvmove} 全局的值。
\keychoice{fnmark-hmove}{fixed length,match}\Default{0pt}
- 脚注正文标记的水平偏移,可以设为刚性长度,或用 \code{match} 匹配 \option*{sphmove} 全局的值。
+ 脚注正文标记的水平偏移。可以设为刚性长度,或用 \code{match} 匹配 \option*{sphmove} 全局的值。
\keychoice{fntext-vmove}{fixed length,match}\Default{0pt}
- 脚注内容标记的垂直偏移,可以设为刚性长度,或用 \code{match} 匹配 \option*{spvmove} 全局的值。
+ 脚注内容标记的垂直偏移。可以设为刚性长度,或用 \code{match} 匹配 \option*{spvmove} 全局的值。
\keychoice{fnmate-form}{format code,match}
- 默认脚注标记的格式,选项 \code{match} 可以匹配 \option*{spcmd} 全局的值。一般与 \keyis-{fnmate-num}{plain} 原生编号形式使用,例如用 \pkg*{circledsteps} 宏包的带圈符号命令 \cs*{Circled} 给脚注标记添加圆圈:
+ 默认脚注标记的格式,选项 \code{match} 可以匹配 \option*{spcmd} 全局的值。一般配合 \keyis-{fnmate-num}{plain} 原生编号形式使用,例如用 \pkg*{circledsteps} 宏包的带圈符号命令 \cs*{Circled} 给脚注标记添加圆圈:
\begin{ctexexam}
\usepackage{circledsteps}
\ebhdrset
@@ -863,7 +863,7 @@
\keyval-{fnpara-form}{格式代码}
脚注内容的格式,在此设置字体命令会覆盖 \option{footnote} 的设置,最后一个格式命令可以带有一个参数接受脚注内容。
\kvsplit{fntext-code}{前代码,后代码}
- 可以用 \meta{前代码} 与 \meta{后代码} 额外增加脚注内容标记前后的代码,也可以只有前部分,\meta{前代码} 中最后一个格式命令可以带有一个参数接受脚注内容标记。由于脚注标记处于水平模式,一般用于在脚注内容标记与脚注首行间插入一点距离,或与脚注正文标记的格式稍有不同。
+ 可以用 \meta{前代码} 与 \meta{后代码} 额外增加脚注内容标记前后的代码。也可以只有前部分,\meta{前代码} 中最后一个格式命令可以带有一个参数接受脚注内容标记。由于脚注标记处于水平模式,一般用于在脚注内容标记与脚注首行间插入一点距离,或与脚注正文标记的格式稍有不同。
\begin{ctexexam}
\ebhdrset
{
@@ -878,7 +878,7 @@
模块 \module*{tocset} 将使用 \pkg*{titletoc} 宏包处理目录样式。模块或扩展包括了 \module*{part}、\module*{chapter}、\module*{section}、\module*{subsection}、\module*{figure}、\module*{table} 和 \module*{lstlisting} 二级路径,而使用 \module*{list} 路径可以统一设置图片、表格和代码目录的样式。选项前带有 \ding{73} 符号表示支持所有相应\textbf{标题级别}的路径,其它选项则处于 \module*{tocset} 路径下。目前支持标准的论文目录样式,更复杂的样式可以查看 \pkg*{titletoc} 的相关用法。
\begin{options}
\keyval-{tocformat}{条目格式}\dtag\smodule{tocset}%
- 目录中各级别条目的格式,可以设置条目字体和加入垂直间距等,垂直间距最好使用防止垂直间距重合的 \cs*{addvspace} 命令。
+ 目录中各级别条目的格式。可以设置条目字体和加入垂直间距等,垂直间距最好使用防止垂直间距重合的 \cs*{addvspace} 命令。
\keyval-{tocformat+}{条目格式}\dtag
与 \option{tocformat} 用法一样,只是在已有的格式命令后附加代码。
\keyval-{tocindent}{刚性长度}\dtag
@@ -902,7 +902,7 @@
\command{tocrule}[\sarg\harg\oarg{引导点间距}\darg{放大因子}\marg{引导点}\oarg{页码格式}]
目录命令 \cs{tocrule} 生成目录引导线,需要在引导线选项 \option{tocrule} 中使用。带有星号的命令会使当前级别的目录引导线右端与页码相连而不是对齐。带有 \harg{} 号的命令不添加引导线后的目录页码。\meta{引导点间距} 需带有长度单位,\meta{放大因子} 不带单位,为 \meta{引导点} 的放大倍数,\meta{引导点} 一般为英文句号或 \cs*{cdot} 中心点符号。\meta{页码格式} 的代码位于页码前面,可以设置页码字体和距离等,最后一个命令可以带有一个参数,这个参数为页码编号。
\command*{CTEXnumberline}[\marg{编号级别}]
- 目录命令 \cs*{CTEXnumberline} 用于在 C\TeX 文档类的 \option*{tocline} 选项中设置章节的目录标签,它已经被重新定义,使得目录标签后代码选项 \option{tocafter} 仍然有效。\meta{编号级别} 为 \code{chapter} 和 \code{section} 等,也可用参数 \code{\#1} 代替当前级别类型,标题名用参数 \code{\#2} 代替一般不变。
+ 目录命令 \cs*{CTEXnumberline} 用于在 C\TeX 文档类的 \option*{tocline} 选项中设置章节的目录标签。它已经被重新定义,使得目录标签后代码选项 \option{tocafter} 仍然有效。\meta{编号级别} 为 \code{chapter} 和 \code{section} 等,也可用参数 \code{\#1} 代替当前级别类型,标题名用参数 \code{\#2} 代替一般不变。
\command{listnumberline}[\marg{编号级别}]
这个命令用于设置图片、表格或代码的目录标签,默认包含与题注名相同的目录标签名。其中 \meta{编号级别} 需要显示指定,即为 \code{figure}、\code{table} 或 \code{lstlisting}。关于命令的用法可见\ref{exam:list command usage}。
\begin{ctexexam}
@@ -921,11 +921,11 @@
\begin{options}
\keybool{hang}\Default{true}
- 悬挂缩进选项 \option{hang} 使目录标题为悬挂缩进形式,缩进距离为标签及其与标题间距的长度,但此时标题编号会失去超链接。这个选项对所有标题级别有效。
+ 悬挂缩进选项 \option{hang} 使目录标题为悬挂缩进形式。缩进距离为标签及其与标题间距的长度,但此时标题编号会失去超链接。这个选项对所有标题级别有效。
\keyval-{lolskip}{弹性长度}\Default{10pt}
- 代码目录中每章代码标题的额外距离,与 C\TeX 的表格和图片目录中每章间的标题距离选项 \option*{lotskip} 和 \option*{lofskip} 类似,在 \cls*{article} 模式中此选项失效。
+ 代码目录中每章代码标题的额外距离。与 C\TeX 的表格和图片目录中每章间的标题距离选项 \option*{lotskip} 和 \option*{lofskip} 类似,在 \cls*{article} 模式中此选项失效。
\keyval-{between}{代码钩子}
- 目录标题与内容间的钩子,一般插入负的垂直距离代码,用于抵消目录首行额外的垂直间距。一级路径此选项对应文档主目录的钩子,二级路径为 \module*{figure}、\module*{table} 和 \module*{lstlisting},或者用位于 \module*{list} 路径的此选项统一设置相应类型目录的钩子。
+ 目录标题与内容间的钩子,一般插入负的垂直距离代码用于抵消目录首行额外的垂直间距。一级路径此选项对应文档主目录的钩子,二级路径为 \module*{figure}、\module*{table} 和 \module*{lstlisting},或者用位于 \module*{list} 路径的此选项统一设置相应类型目录的钩子。
\keybool{dotalign}\Default{true}
引导线选项 \option{dotalign} 可以使目录引导线右端对齐并与页码保持一定间距,否则会与页码相连。
\keyval-{pagenumwd}{刚性长度}\Default{1.55em}
diff --git a/macros/latex/contrib/fcolumn/README b/macros/latex/contrib/fcolumn/README
index e585aa6aaf..2e9980d6a2 100644
--- a/macros/latex/contrib/fcolumn/README
+++ b/macros/latex/contrib/fcolumn/README
@@ -15,7 +15,7 @@ column. For example the f-column in the current version of the package
is using 3,2 as #3, meaning that numbers are typeset with 2 decimal
digits and grouping is done on 3 digits. The grouping character is
``.'' and the decimal separator is ``,'', thereby coding for the
-continental European standard. People in the Anglo-saxon world would
+continental European standard. People in the Anglo-Saxon world would
rather code |\newcolumntype{f}{F{,}{.}{3,2}{}}|.
To show where and how the f-column is used, let's look at a typical
@@ -48,7 +48,8 @@ which allows one to restart a table, so that multiple tables
that are aligned are possible in one tabular environment.
The fcolumn specifier can be used in a tabular environment
and in the longtable environment. Specific fcolumn formatting,
-like colour and/or font changes are possible.
+like colour and/or font changes are possible, see the file
+fcolumn.pdf.
To install:
-----------
@@ -56,12 +57,12 @@ Run the file fcolumn.ins through (La)TeX (in a directory also
containing fcolumn.dtx) or type ``make install'' and move the
resultant file fcolumn.sty to a place searched by TeX.
-To produce the documentation:
------------------------------
+To generate the documentation:
+------------------------------
Type ``make''. Or run the file fcolumn.dtx through LaTeX,
update the glossary and index by makeindex:
makeindex -s gglo.ist -o fcolumn.gls fcolumn.glo
- makeindex -s gglo.ist -o fcolumn.ind fcolumn.idx
+ makeindex -s gind.ist -o fcolumn.ind fcolumn.idx
and then LaTeX fcolumn.dtx again; presto!
diff --git a/macros/latex/contrib/fcolumn/fcolumn.dtx b/macros/latex/contrib/fcolumn/fcolumn.dtx
index 26aaf7faff..0aef28889c 100644
--- a/macros/latex/contrib/fcolumn/fcolumn.dtx
+++ b/macros/latex/contrib/fcolumn/fcolumn.dtx
@@ -1,5 +1,5 @@
% \iffalse meta-comment
-% Copyright (C) 2015--2021 by Edgar Olthof
+% Copyright (C) 2015--2022 by Edgar Olthof
%
% This file may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -14,13 +14,14 @@
% \fi
% \iffalse
%<package>\ProvidesPackage{fcolumn}
-%<package> [2021/11/22 v1.4 Automatic Currency Package (EHTO)]
+%<package> [2022/02/01 v1.4.1 Automatic Currency Package (EHTO)]
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\RequirePackage{array}[v2.4k]
%<*driver>
\documentclass{ltxdoc}
-\usepackage{longtable}
-\usepackage{fcolumn}
+\usepackage{longtable}
+\usepackage{dcolumn}
+\usepackage{fcolumn}
\usepackage{booktabs}
\usepackage[tableposition=top,aboveskip=0pt]{caption}
\DeclareCaptionStyle{normal}{labelfont={rm,bf,small},textfont={rm,small},%
@@ -40,7 +41,7 @@ indention=0pt,labelsep=colon,justification=raggedright}
%</driver>
% \fi
% \RecordChanges
-% \CheckSum{1292}
+% \CheckSum{1200}
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
@@ -80,6 +81,8 @@ indention=0pt,labelsep=colon,justification=raggedright}
% backwards compatible to~1.2: it only adds functionality.}
% \changes{v1.4}{2021/11/21}{More robust version on the extra formatting information: alternative
% formatting after the comma (if any), instead of additional information. Corrected a few typos.}
+% \changes{v1.4.1}{2022/01/31}{Definition needed for longtable only if that package is loaded.
+% General update, streamlining code. Excess digits silently ignored when all zero.}
% \GetFileInfo{fcolumn.sty}
% \DoNotIndex{\@@endpbox,\@@startpbox,\@acol,\@arstrut,\@arstrutbox,\@classiv,\@classz,\@depth}
% \DoNotIndex{\@firstampfalse,\@firstamptrue,\@gobble,\@halignto,\@height,\@mkpream,\@ne,\@nextchar}
@@ -121,16 +124,15 @@ indention=0pt,labelsep=colon,justification=raggedright}
% People in the Anglo-Saxon world would rather code
% |\newcolumntype{f}{F{,}{.}{3,2}{}}| for the same input, yielding
% $12{,}345{.}67$ as output for the number given above. The default
-% value for |#3| is |3,2|, indicating
-% that grouping of the integer part is by three digits, that a comma is
-% used in the \TeX-source to indicate the decimal separator, and that
-% the decimal part consists of two digits.
-% If however, in your country or company grouping is done with a thinspace every
-% four digits, that the separator in the source should be the character |p|,
-% and there are three digits after the decimal mark---that happens to be a
-% |\cdot|---, then simply specify |\newcolumntype{f}{F{\,}{\cdot}{4p3}{}}| in
-% that case. The input could be 123456p78 then, yielding $12{\,}3456{\cdot}780$
-% as output.
+% value for |#3| is |3,2|, indicating that grouping of the integer
+% part is by three digits, that a comma is used in the \TeX-source to
+% indicate the decimal mark, and that the decimal part consists of
+% two digits. However, if in your country or company grouping is done
+% with a thinspace every four digits, that the decimal mark in the
+% source should be the character |p|, and there are three digits after
+% the decimal mark---that happens to be a |\cdot|---, then simply specify
+% |\newcolumntype{f}{F{\,}{\cdot}{4p3}{}}| in that case. The input could
+% be 123456p78 then, yielding $12{\,}3456{\cdot}780$ as output.
%
% By default two digits are used for the decimal part, so if you really
% want no decimal digits (in that case of course also skipping the decimal
@@ -153,10 +155,10 @@ indention=0pt,labelsep=colon,justification=raggedright}
% \toprule
% properties & \leeg{31 dec 2014} & debts & \leeg{31 dec 2014}\\
% \midrule
-% house & 200000 & equity capital& 50000 \\
-% bank account & -603,23 & mortgage & 150000 \\
-% savings & 28000 \\
-% cash & 145,85 & profit & 27542,62 \\
+% house & 200000 & equity capital & 50000 \\
+% bank account & -603,23 & mortgage & 150000 \\
+% savings & 28000 \\
+% cash & 145,85 & profit & 27542,62 \\
% \sumline
% \bottomrule
% \end{tabular}
@@ -174,10 +176,10 @@ indention=0pt,labelsep=colon,justification=raggedright}
%\toprule
%properties & \leeg{31 dec 2014} & debts & \leeg{31 dec 2014}\\
%\midrule
-%house & 200000 & equity capital& 50000 \\
-%bank account & -603,23 & mortgage & 150000 \\
-%savings & 28000 \\
-%cash & 145,85 & profit & 27542,62 \\
+%house & 200000 & equity capital & 50000 \\
+%bank account & -603,23 & mortgage & 150000 \\
+%savings & 28000 \\
+%cash & 145,85 & profit & 27542,62 \\
%\sumline
%\bottomrule
%\end{tabular}
@@ -192,8 +194,8 @@ indention=0pt,labelsep=colon,justification=raggedright}
% package~\cite{booktabs} was used, but that is not the point here.
%
% This package is heavily inspired by the |dcolumn| package by
-% David Carlisle~\cite{dcolumn}, some constructions are more or less
-% copied from that package. Version~1.4 (this version) incorporates the idea
+% David Carlisle~\cite{dcolumn}; some constructions are more or less
+% copied from that package. From version~1.3 onwards it incorporates the idea
% of Christian Hoff of providing additional (formatting) information per column.
% A rather contrived example is given in Table~\ref{tab:ex3}, combining colour and fonts.
% \newcolumntype{q}[1]{F{.}{,}{3,2}{#1}}
@@ -205,10 +207,10 @@ indention=0pt,labelsep=colon,justification=raggedright}
% \toprule
% properties & \leeg{31 dec 2014} & debts & \leeg{31 dec 2014}\\
% \midrule
-% house & 200000 & equity capital& 50000 \\
-% bank account & -603,23 & mortgage & 150000 \\
-% savings & 28000 \\
-% cash & 145,85 & profit & 27542,62 \\
+% house & 200000 & equity capital & 50000 \\
+% bank account & -603,23 & mortgage & 150000 \\
+% savings & 28000 \\
+% cash & 145,85 & profit & 27542,62 \\
% \sumline
% \bottomrule
% \end{tabular}
@@ -225,7 +227,7 @@ indention=0pt,labelsep=colon,justification=raggedright}
%\begin{tabular}{@{}lq{\color{red}\mathsf,\mathbf}lq{\color{green}}@{}}
%\multicolumn4c{\bfseries Balance sheet}\\
%...
-%...(same financial contents as in Table 1)
+%... (Same financial contents as in Table 1.)
%...
%\end{tabular}
%\end{table}
@@ -234,13 +236,13 @@ indention=0pt,labelsep=colon,justification=raggedright}
% The font changing commands like |\mathsf| and |\mathbf| act on an argument, hence require
% braces, but these are already provided internally for this purpose. For that reason this
% type of commands must be given last, without braces (and if you don't specify a font
-% changing command, these extra internal braces are just redundant). The argument to the
+% changing command, these extra internal braces are just redundant). The fourth argument to the
% new columntype may consist of two parts, separated by a comma. In that case, the part to
% the left of the comma is applied to the data entered by the user and the right part
% is applied to the result. The example in Table~\ref{tab:ex3} shows this: the bold font
-% is only used in the |\sumline| and also the colour is back to the default (black). If
-% you want formatting for the whole column, like green colour as in the last column of
-% Table~\ref{tab:ex3}, leave out the comma.
+% is only used in the |\sumline| and there is no colour specification, so that's back to
+% the default (black). If you want formatting for the whole column, like green colour as
+% in the last column of Table~\ref{tab:ex3}, leave out the comma.
%
% Note that changes in font size, e.g., ``|\huge|'' in ``|\huge\color{red}\mathbf|''
% as parameter to column type |q| are ignored by \LaTeX, since the formatting
@@ -266,18 +268,21 @@ indention=0pt,labelsep=colon,justification=raggedright}
%\midrule
%\endfirsthead
%\caption[]{\textit{(continued from previous page)\/}}\\
-%\midrule
+%\toprule
%properties & \leeg{31 dec 2014} & debts & \leeg{31 dec 2014}\\
%\midrule
%\endhead
+%\bottomrule
%\multicolumn4{r@{}}{\small\textit{(Table continues on next page)\/}}\\
-%\midrule
%\endfoot
%\bottomrule
%\endlastfoot
+%house & 200000 & equity capital & 50000 \\
%...
-%...(somewhat altered financial contents as in Table 1)
+%... (Somewhat altered financial contents compared to
+%... Table 1 to demonstrate the page break.)
%...
+%\sumline
%\end{longtable}
% \end{verbatim}
% \end{table}
@@ -295,35 +300,27 @@ indention=0pt,labelsep=colon,justification=raggedright}
% \midrule
% \endfirsthead
% \caption[]{\textit{(continued from previous page)\/}}\\
-% \midrule
+% \toprule
% properties & \leeg{31 dec 2014} & debts & \leeg{31 dec 2014}\\
% \midrule
% \endhead
+% \bottomrule
% \multicolumn4{r@{}}{\small\textit{(Table continues on next page)\/}}\\
-% \midrule
% \endfoot
% \bottomrule
% \endlastfoot
-% house & 200000 & equity capital& 50000 \\
-% bank account & -603,23 & mortgage & 150000 \\
-% savings 1 & 2000 \\
-% savings 2 & 2000 \\
-% savings 3 & 2000 \\
-% savings 4 & 2000 \\
-% savings 5 & 2000 \\
-% savings 6 & 2000 \\
-% savings 7 & 2000 \\
-% savings 8 & 2000 \\
-% savings 9 & 2000 \\
-% savings 10 & 2000 \\
-% savings 11 & 2000 \\
-% savings 12 & 2000 \\
-% savings 13 & 2000 \\
-% savings 14 & 2000 \\
-% cash & 145,85 & profit & 27542,62 \\
+% house & 200000 & equity capital & 50000 \\
+% bank account & -603,23 & mortgage & 150000 \\
+% savings 1 & 4000 \\
+% savings 2 & 4000 \\
+% savings 3 & 4000 \\
+% savings 4 & 4000 \\
+% savings 5 & 4000 \\
+% savings 6 & 4000 \\
+% savings 7 & 4000 \\
+% cash & 145,85 & profit & 27542,62 \\
% \sumline
% \end{longtable}
-
% \section{Commands}
% The user only needs to know six commands or constructions. These six are given here.
% \begin{macro}{F}
@@ -340,7 +337,7 @@ indention=0pt,labelsep=colon,justification=raggedright}
% than just setting the input decimal mark. By default the input grouping
% character is the dot, except when the dot is specified as input decimal
% mark; in that case the comma is acting as input grouping character. With
-% this convention the continental Europe and Anglo-Saxon part of the world
+% this convention continental Europe and the Anglo-Saxon part of the world
% is served. And using input grouping markers is optional anyway.
% \end{macro}
% \begin{macro}{\sumline}
@@ -364,7 +361,7 @@ indention=0pt,labelsep=colon,justification=raggedright}
% |\sumline|. Give, e.g., |\sumline[10pt]|, in case you want this spacing
% to be 10\thinspace pt. And you may even give two options, like in
% |\sumline[10pt][5pt]|, in which the second option is the extra space below
-% the summary row. In fact that second option is the option to |\\| that is
+% the summary row. In fact that second option is parsed to |\\|, that is
% implicit in |\sumline|.
% \end{macro}
% \begin{macro}{\resetsumline}
@@ -441,7 +438,7 @@ indention=0pt,labelsep=colon,justification=raggedright}
% \end{macro}
% \begin{macro}{\leeg}
% If an |F|-column should be empty then simply leave it empty. If however
-% it should not be empty but the entry should be treated as text---even
+% it should not be empty but the entry should be treated as text---even
% if it is a number---, this can be done with |\leeg|. It expects an
% argument and this argument is typeset in the column. The common case is
% where |p.m.| (\textit{pro memoria}) is entered. In contrast to v1.1.2
@@ -451,21 +448,21 @@ indention=0pt,labelsep=colon,justification=raggedright}
% The automatic column balance check can also be done manually. If
% |F|-columns~1 and~4 should balance and you want them to be checked,
% then simply say |\checkfcolumns14|. With more than nine |F|-columns
-% you may be forced to say something like |\checkfcolumns{10}{12}|. If
+% you may be forced to say something like |\checkfcolumns{10}{12}|. If
% |\checkfcolumns| is used, the automatic check is disabled. Multiple
% |\checkfcolumns|s are supported; if |F|-columns~1, 2, and~3 should
% balance, you specify |\checkfcolumns12| and |\checkfcolumns23|.
% There is no explicit command to disable all checking, but
-% |\checkfcolumns11| obviously also serves that purpose.
+% |\checkfcolumns11| obviously does the trick.
% \end{macro}
% \begin{macro}{\ifstrict@ccounting}
% In the rare occasion that a negative number occurs in a financial table,
-% the sign of that number can be an explicit minus sign ($-$) or the number
+% the sign of that number can be an explicit minus sign~($-$) or the number
% is coloured red, or it is typeset between parentheses, and there may be
% even other ways. By default (for aesthetic reasons) |fcolumn| typesets
% it with a minus~sign, but strict accounting prescibes that the number
% should be put between parentheses. The latter can be accomplished by
-% setting |\strict@ccountingtrue|. But since this contains a non-letter,
+% setting |\strict@ccountingtrue|, but since this contains a non-letter,
% it is also possible to invoke |fcolumn| with the option |strict|, i.e.,
% |\usepackage[strict]{fcolumn}|, which sets this flag.
% \end{macro}
@@ -513,7 +510,7 @@ indention=0pt,labelsep=colon,justification=raggedright}
% an amount expressed in cents (dollar cents, euro cents, centen, Pfennige,
% centimes, kopecks, groszy) and typesets it as the amount in entire
% currency units (dollars, euros, guldens, Marke, francs, rubles, z\l oty)
-% with comma as decimal separator and the dot as grouping character
+% with comma as decimal mark and the dot as grouping character
% (thousand separator if the first part of |#1| is~3).
% As explained, this can be changed. It uses two private booleans:
% |\withs@p| and |\strict@ccounting|. The latter is used to typeset
@@ -536,14 +533,14 @@ indention=0pt,labelsep=colon,justification=raggedright}
% are always used within |$|s, so it is really a minus sign that is printed, not a hyphen.
% All calculations are done with |\count0|, |\count1|, etc.\ i.e., without |F|-column-specific
% \meta{count}s because it is all done locally. Leaving the tabular environment will
-% restore their values. This is also true for the effect of |\FCform@t|, so that formatting
-% information is local to this column. The reason for inserting the opening brace between
-% |\FCform@t| and |\ifnum| (and the accompanying closing brace after |\fi|) is to facilitate
-% the possible use of |\mathbf| or any other font changing command as the last item in |\FCform@t|.
+% restore their values. This is also true for the effect of |\FCform@t|, so that
+% formatting information is local to this column. The reason for inserting the |{|
+% between |\FCform@t| and |\ifnum| (and the accompanying |}| just before finishing
+% this definition) is to facilitate the possible use of |\mathbf| or any other font
+% changing command as the last item in |\FCform@t|.
% \begin{macrocode}
-\def\g@ldm@cro#1\relax#2{\FCform@t{\ifnum#2<0 \ifstrict@ccounting (\else
- -\fi \count2=-#2 \else\count2=#2
-\fi
+\def\g@ldm@cro#1\relax#2{\FCform@t{\ifnum#2<0 \ifstrict@ccounting
+ (\else -\fi \count2=-#2 \else\count2=#2 \fi
% \end{macrocode}
% Calculate the entire currency units: this is the result of $x/a$ as integer
% division, with $a=10^n$ and $n$ the part of |#1| after the separator (if any).
@@ -613,7 +610,7 @@ indention=0pt,labelsep=colon,justification=raggedright}
% |\count0| locally. This also implies that tail recursion is not
% possible here, but that is not very important, as the largest number
% (which is $2^{31}-1$) will only cause a threefold recursion using the
-% default |3,2| (ninefold when using |1,0|, but who does that?). The
+% default |3,2| (ninefold when using~|1,0|, but who does that?). The
% largest amount this package can deal with is therefore 2.147.483.647
% (using |3,0|). For most people this is probably more than enough if
% the currency is euros or dollars. And otherwise make clear that you
@@ -623,8 +620,8 @@ indention=0pt,labelsep=colon,justification=raggedright}
% would lead to a maximum of slightly more than 92.2\thinspace P\EUR{};
% about 100 times the current world economy~\cite{world_economy}. Yet
% another method is to use Heiko Oberdiek's package |bigintcalc|:
-% then only memory restrictions apply. This, however, requires a major
-% rewrite of |fcolumn|. For now, version~1.4 sticks to the moderate amounts.
+% then only memory restrictions apply. This, however, would require
+% a major rewrite of |fcolumn|.
%
% There is no straightforward interpretation of |#1| being zero or
% negative, therefore this is used as an indicator that no grouping
@@ -705,7 +702,7 @@ indention=0pt,labelsep=colon,justification=raggedright}
% First it checks whether there is a risk of overflow in this step. If
% $A$ and $B$ are two \TeX-registers and $B$ is to be added to $A$,
% overflow will not occur if one is (or both are) zero or if $A$ and~$B$
-% have different signs. Otherwise, be careful. Note that \TeX\ does not
+% have different signs; otherwise be careful. Note that \TeX\ does not
% check for overflow when performing an |\advance| (done in section~1238
% of Ref.~\cite{CandTB}), in contrast to |\multiply|, see section~105.
% \begin{macrocode}
@@ -722,9 +719,9 @@ indention=0pt,labelsep=colon,justification=raggedright}
\global\advance\csname FCtot@\romannumeral\FCsc@l\endcsname by \count0
\ifx\FCs@gn\m@ne
% \end{macrocode}
-% They had the same sign: risk of overflow. Record the sign
-% of |\count0| (and of the original total of this column; they were
-% the same) in |\FCs@gn|. Table~\ref{tab:ex9}
+% They have the same sign, hence risk of overflow. Record the sign
+% of |\count0| (and of the original total of this column; we just established
+% they were the same) in |\FCs@gn|. Table~\ref{tab:ex9}
% \begin{table}[htb]
% \def\PackageError#1#2#3{\PackageWarning{#1}{#2: #3}}
% \caption{Examples on overflow.}
@@ -735,8 +732,9 @@ indention=0pt,labelsep=colon,justification=raggedright}
% income & \leeg{31 dec 2014} & \leeg{31 dec 2015} & \leeg{31 dec 2016} \\
% \midrule
% item~1 & 20000000 & 20000000 &20000000 \\
-% item~2 & 10000000 & 2000000 &-2000000 \\
-% item~3 & 5000000 & -2000000 & 2000000 \\
+% item~2 & 10000000 & 2000000 &-1500000 \\
+% item~3 & 5000000 & -1500000 & 2000000 \\
+% \checkfcolumns12
% \checkfcolumns23
% \sumline
% \bottomrule
@@ -750,18 +748,19 @@ indention=0pt,labelsep=colon,justification=raggedright}
% is correct in the end. Nevertheless, it is advised to swap the two
% items that caused the overflow, as shown in the right |F|-column.
%
-% Since the absolute value of |\FCs@gn| is unity, no overflow will
-% occur in the multiplication step below.
+% Check that the sign of the updated column total is still correct.
+% If so, |\FCs@gn| is reset (to |\@ne|) at the end of this chunk.
% \begin{macrocode}
\ifnum\count0>0 \let\FCs@gn\@ne \fi
\count0=\csname FCtot@\romannumeral\FCsc@l\endcsname
- \multiply\count0 by \FCs@gn
+ \ifnum\FCs@gn<0 \count0=-\count0 \fi
\ifnum\count0<0
\let\FCs@gn=\m@ne
\PackageError{fcolumn}{Register overflow}{Overflow occurred
- in fcolumn \number\FCsc@l. You can press <enter> now and I'll
- proceed,\MessageBreak but check your table. The offending entry is
- indicated with an exclamation\MessageBreak mark in the output.}%
+ in fcolumn \number\FCsc@l.\MessageBreak You can press <enter>
+ now and I'll proceed, but check\MessageBreak your table. The
+ offending entry is indicated with an\MessageBreak exclamation
+ mark in the output.}%
\else\let\FCs@gn=\@ne
\fi
\fi
@@ -775,7 +774,7 @@ indention=0pt,labelsep=colon,justification=raggedright}
% \end{macrocode}
% \end{macro}
%
-% The \meta{count}s |\FC@l| and |\FC@r| capture the part to the left and to the
+% The \meta{count}s |\FC@l| and |\FC@r| capture the parts to the left and to the
% right of the decimal mark, respectively.
% \begin{macrocode}
\newcount\FC@l \newcount\FC@r
@@ -786,6 +785,22 @@ indention=0pt,labelsep=colon,justification=raggedright}
\def\assignform@t#1,#2,#3\assignform@t{\def\FCform@t{#1}%
\def\FCform@tt{#2}\ifx\FCform@tt\@empty \def\FCform@tt{#1}\fi}
% \end{macrocode}
+% \begin{macro}{\m@thcodeswitch}
+% As will be shown below, once the first digit, or sign, or decimal mark, or
+% grouping character is scanned, the decimal digits should loose their
+% activeness. That is done here for the digits in a rather blunt way, by putting their
+% |\mathcode|s to zero if |#1| equals~0, since the actual |\mathcode| is not important---as
+% long as it is not |"8000|---because the digits are not used for typesetting.
+% (And even if they were; it's inside |\box0|, whose contents will be discarded.)
+% When the |$| in |\e@fi| is encountered, the digits get back their original
+% |\mathcode|s so that the actual typesetting in |\zetg@ld| is correct again.
+% With a non-zero |#1| the activeness is switched on.
+% \begin{macrocode}
+\def\m@thcodeswitch#1{\count0=10 \loop\ifnum\count0>0
+\advance\count0 by \m@ne\mathcode\expandafter`\the\count0=
+\ifnum#1=0 0 \else "8000 \fi\repeat}
+% \end{macrocode}
+% \end{macro}
% \def\<#1>{\leavevmode\hbox{$\langle$#1\/$\rangle$}}
% \begin{macro}{\b@fi}
% The macro |\b@fi| provides the beginning of the financial column. It
@@ -800,10 +815,9 @@ indention=0pt,labelsep=colon,justification=raggedright}
% An intermediate macro |\sep@xt| to extract the first character
% of |#1|, which in most cases will be the only character.
% \begin{macrocode}
-\def\sep@xt##1##2\end{\def\sep@rator{{##1}}}%
-\sep@xt#1\end\def\decim@lmark{{#2}}%
-\def\sp@l{#3}\assignform@t#4,,\assignform@t\global\advance\FCsc@l by
- \@ne \global\FC@l=0 \global\FC@r=1
+\def\sep@xt##1##2\end{\def\sep@rator{{##1}}}\sep@xt#1\end
+\def\decim@lmark{{#2}}\def\sp@l{#3}\assignform@t#4,,\assignform@t
+\global\advance\FCsc@l by \@ne\global\FC@l=0 \global\FC@r=1
% \end{macrocode}
% The value specified by the user is then captured by |\FC@l| and
% this is done in a special way: |\FC@l| is assigned globally within
@@ -817,12 +831,13 @@ indention=0pt,labelsep=colon,justification=raggedright}
% \<integer constant>. Here \<sign> is a plus or minus character with
% category code~12, \<integer constant> is a sequence of zero
% or more (decimal) \<digit>s, and \<decimal mark> is the middel
-% part of |#3|, i.e., the comma in |3,2| or the period in |3.2|.
-% If the \<decimal mark> is absent with no space characters between
-% the two \<integer constant> terms, these merge, making four redundant
-% entries. One of the combinations is \<empty>, a sequence of exactly
-% zero non-space tokens: this is the only combination that doesn't put
-% anything in an |F|-column---and was the most difficult part to handle.
+% part of |#3|, i.e., the comma in |3,2| or the period in |3.2|. If
+% the \<decimal mark> is absent with no space characters between the
+% two \<integer constant> terms, these merge, making four redundant
+% entries. One of the combinations is \<empty>, a sequence of characters
+% outside the ones that are made active, e.g., plain text or nothing at all:
+% this is the only combination that doesn't put anything in an |F|-column---and
+% was the most difficult part to handle.
%
% The minus sign must be captured separately, because in an entry like
% |-0,07| the 7~cents are negative, but this cannot be seen from the
@@ -831,22 +846,16 @@ indention=0pt,labelsep=colon,justification=raggedright}
% |\ifnum-0<0| yields |false|. |\FCs@gn| is a general purpose flag. Its
% first use is to capture the sign.
% \begin{macrocode}
-\let\FCs@gn=\@ne\relax \setbox0\hbox\bgroup$%
+\let\FCs@gn=\@ne\relax \setbox0\hbox\bgroup$
% \end{macrocode}
-% Do the scan inside a box and inside math mode. Start with
-% defining all characters that may appear as the first one in an |F|-column
-% as active.
+% Do the scan inside a box and inside math mode. Start with defining all
+% characters that may appear as the first one in an |F|-column as active;
+% digits first. This needs a complicated |\edef| with accompanying |\noexpand|
+% because the starting digit for |\FC@l| must be packed inside each definition.
% \begin{macrocode}
-\uccode`\~=`0\relax \uppercase{\def~}{\restorem@thcodes \global\FC@l=0}
-\uccode`\~=`1\relax \uppercase{\def~}{\restorem@thcodes \global\FC@l=1}
-\uccode`\~=`2\relax \uppercase{\def~}{\restorem@thcodes \global\FC@l=2}
-\uccode`\~=`3\relax \uppercase{\def~}{\restorem@thcodes \global\FC@l=3}
-\uccode`\~=`4\relax \uppercase{\def~}{\restorem@thcodes \global\FC@l=4}
-\uccode`\~=`5\relax \uppercase{\def~}{\restorem@thcodes \global\FC@l=5}
-\uccode`\~=`6\relax \uppercase{\def~}{\restorem@thcodes \global\FC@l=6}
-\uccode`\~=`7\relax \uppercase{\def~}{\restorem@thcodes \global\FC@l=7}
-\uccode`\~=`8\relax \uppercase{\def~}{\restorem@thcodes \global\FC@l=8}
-\uccode`\~=`9\relax \uppercase{\def~}{\restorem@thcodes \global\FC@l=9}
+\count@=10 \loop\ifnum\count@>0 \advance\count@ by \m@ne
+ \uccode`\~=\expandafter`\the\count@ \uppercase{\edef~}{\noexpand
+ \m@thcodeswitch0 \global\FC@l=\the\count@}\repeat
% \end{macrocode}
% For the input decimal mark something extra is needed: if it is the
% first character in an |F|-column (like in |,07|), it should also
@@ -854,14 +863,14 @@ indention=0pt,labelsep=colon,justification=raggedright}
% is the first is easy, since in that case the |\mathcode|s of the
% decimal digits is still |"8000|. The assignment to |\FC@r| starts
% with~1, so that appended digits get captured correctly, even if they
-% start with~0. Postprocessing of |\FC@r| is done in |\e@fi|.
+% start with~0; postprocessing of |\FC@r| is done in |\e@fi|.
% The input decimal mark switches itself off as active character,
-% so at most one input decimal separator is allowed (N.B.:
+% so at most one input decimal mark is allowed (N.B.:
% this makes sense).
% \begin{macrocode}
\def\deactdecm@rk##1##2\relax{\mathcode`##1=0 }%
\afterassignment\setucc@de\count@#3\relax
-\uppercase{\def~}{\ifnum\mathcode`\0=\mathcode`- \restorem@thcodes\fi
+\uppercase{\def~}{\ifnum\mathcode`\0="8000 \m@thcodeswitch0 \fi
\afterassignment\deactdecm@rk\count@#3\relax \global\FC@r=1}%
% \end{macrocode}
% The input grouping character effectively expands to ``nothing, i.e.,
@@ -872,14 +881,14 @@ indention=0pt,labelsep=colon,justification=raggedright}
% input decimal mark was encountered; that can be checked by looking
% at its |\mathcode|.
%
-% The input grouping character is the dot |.|, except when that character
+% The input grouping character is the dot ``|.|'', except when that character
% was already chosen as input decimal mark. In that case, the grouping
-% character will be the comma. This is easy to check because the |\uccode|
+% character will be the comma. This is easy to check because the |\uccode|
% of |`\~| is still preserved.
% \begin{macrocode}
\def\d@cm##1##2{\count@=\mathcode`##1 }
\ifnum\uccode`\~=`. \uccode`\~=`,\relax\else \uccode`\~=`.\relax\fi
-\uppercase{\def~}{\ifnum\mathcode`\0=\mathcode`- \restorem@thcodes\fi
+\uppercase{\def~}{\ifnum\mathcode`\0="8000 \m@thcodeswitch0 \fi
\afterassignment\d@cm\count@#3\relax
% \end{macrocode}
% The |\expandafter| below is necessary because the global assignment
@@ -892,37 +901,28 @@ indention=0pt,labelsep=colon,justification=raggedright}
% needed (it should be: a minus sign between digits screws up everything),
% and start scanning the number.
% \begin{macrocode}
-\uccode`\~=`+\relax
-\uppercase{\def~}{\ifnum\mathcode`\0=\mathcode`-
-\restorem@thcodes\fi\global\FC@l=0}%
-\uccode`\~=`-\relax
-\uppercase{\def~}{\ifnum\mathcode`\0=\mathcode`-
-\restorem@thcodes\fi\global\let\FCs@gn\m@ne \global\FC@l=0}%
+\uccode`\~=`+\relax \uppercase{\def~}{\ifnum\mathcode`\0="8000
+\m@thcodeswitch0 \fi\global\FC@l=0}
+\uccode`\~=`-\relax \uppercase{\def~}{\ifnum\mathcode`\0="8000
+\m@thcodeswitch0 \fi\global\let\FCs@gn\m@ne \global\FC@l=0}%
% \end{macrocode}
-% Now actually activate all these codes. The first is simple, but
-% after that, one can't say |"8000| anymore because |0| acts as active.
-% But copying |\mathcode|s still works.
+% Now actually activate all these codes.
% \begin{macrocode}
-\mathcode`-="8000 \mathcode`+=\mathcode`- \mathcode`.=\mathcode`-
+\mathcode`-="8000 \mathcode`+="8000 \mathcode`.="8000
% \end{macrocode}
% These three remain active until the |$| in |\e@fi| is encountered.
% The following ones will, except in the \<empty> case, have their activeness
% turned off at some time.
% \begin{macrocode}
-\def\actdecm@rk##1##2\relax{\ifx##1.\relax \mathcode`,=\mathcode`-
-\else \mathcode`##1=\mathcode`- \fi}%
-\afterassignment\actdecm@rk\count@#3\relax
-\mathcode`\0=\mathcode`- \mathcode`\1=\mathcode`-
-\mathcode`\2=\mathcode`- \mathcode`\3=\mathcode`-
-\mathcode`\4=\mathcode`- \mathcode`\5=\mathcode`-
-\mathcode`\6=\mathcode`- \mathcode`\7=\mathcode`-
-\mathcode`\8=\mathcode`- \mathcode`\9=\mathcode`- }
+\m@thcodeswitch1 \def\actdecm@rk##1##2\relax{%
+\ifx##1.\relax \mathcode`,="8000 \else \mathcode`##1="8000 \fi}%
+\afterassignment\actdecm@rk\count@#3\relax}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\e@fi}
% If the digits are still active then either nothing was entered or only
% characters that did not deactivate the digits were entered. In
-% either case the output should be \<empty>. To flag this outside
+% both cases the output should be \<empty>. To flag this outside
% the group that started with the opening |$| of |\b@fi|, |\FC@r| is set
% globally to a negative value. This doesn't harm, because it didn't
% contain relevant information anyway. Outside the group, the sign
@@ -930,7 +930,7 @@ indention=0pt,labelsep=colon,justification=raggedright}
% |\count|, but now it's documented. In effect, |\FC@r| can only be~|-1|,
% |1|, or at least~|10|, so the comparison |\ifnum\FC@r>0| does not miss~0.
% \begin{macrocode}
-\def\e@fi{\ifnum\mathcode`\0=\mathcode`- \global\FC@r=\m@ne\fi$\egroup
+\def\e@fi{\ifnum\mathcode`\0="8000 \global\FC@r=\m@ne\fi$\egroup
\ifnum\FC@r>0
% \end{macrocode}
% If there was no decimal mark or if there was a decimal mark but no
@@ -941,22 +941,41 @@ indention=0pt,labelsep=colon,justification=raggedright}
% \end{macrocode}
% Next is a loop for bringing the decimal part in the correct way to
% the integer part. The loop is performed the number of decimal
-% digits to be printed (the~2 in |3,2| of the default setting). This also
-% means that if you provided more decimal digits than this, the excess
-% digit(s) will not be handled and a |\PackageWarning| will be given,
-% showing these excess digits. This is truncation, not rounding!
-% There is one situation in which this code doesn't catch all:
-% when exactly one extra zero was provided. And in that case truncation
-% is a no-op.
+% digits to be printed (the~2 in |3,2| of the default setting).
% \begin{macrocode}
\def\i@ts##1##2{\count0=##2}
\afterassignment\i@ts\count@\sp@l
\loop\ifnum\count0>0 \multiply\FC@l by 10
- \expandafter\secd@xt\number\FC@r\end \advance\count0 by \m@ne
+ \expandafter\secd@xt\number\FC@r\secd@xt \advance\count0 by \m@ne
\repeat
- \ifnum\FC@r>10
+% \end{macrocode}
+% This also means that if you provided more decimal digits than this, the excess
+% digit(s) will not be handled. This is truncation, not rounding! If all
+% truncated digits are zero, this truncation is a no-op and they are silently ignored,
+% see the example Table~\ref{tab:ex10},
+% \begin{table}[htb]
+% \newcolumntype{d}{D{,}{,}{-1}}
+% \caption{Truncating excess digits.}
+% \label{tab:ex10}
+% \begin{tabular}{@{}ldfl@{}}
+% \toprule
+% composer & \multicolumn1c{raw entry} & \leeg{debt} & remark \\
+% \midrule
+% Berg & 123,450 & 123,450 & ``0'' silently ignored \\
+% Eisler & 234,567 & 234,567 & ``7'' ignored with warning \\
+% Sch\"onberg & 345,6709 & 345,6709 & ``09'' ignored with warning \\
+% Webern & 2,3456 & 2,3456 & ``56'' ignored with warning \\
+% \sumline
+% \bottomrule
+% \end{tabular}
+% \end{table}
+% that was created with |@{}ldfl@{}| (|d| for centering on the decimal
+% mark~\cite{dcolumn}) as tabular key. If, however, at least one of them is
+% not zero, a |\PackageWarning| will be given, showing the excess digit(s).
+% \begin{macrocode}
+ \ifnum\expandafter\@gobble\number\FC@r>0
\def\tw@l##1##2\relax{##2}
- \PackageWarning{fcolumn}{Excess digit\ifnum\FC@r>100 s\fi\space
+ \PackageWarning{fcolumn}{Excess digit\ifnum\FC@r>19 s\fi\space
``\expandafter\tw@l\number\FC@r\relax'' in decimal part
\MessageBreak ignored near or}
\fi
@@ -974,72 +993,48 @@ indention=0pt,labelsep=colon,justification=raggedright}
% The second digit from the left is needed from a string of characters
% representing a decimal number. The macro |\secd@xt| extracts that digit,
% provided that the number has at least two digits, but that is guaranteed by
-% |\e@fi|. That second digit is then added to |\FC@l|. A new number is
-% assigned to |\FC@r|, that consists of the digits of |#1#3|. If |#3| was
-% empty, 10 is assigned. In this way |\FC@r| is prepared for insertion in
-% the next invocation of |\secd@xt|. In iterating: 1234 yields~134, yields~14,
-% yields~10, stays~10, etc.
+% |\e@fi|. That second digit is then added to |\FC@l|.
+% A new number is assigned to |\FC@r|, that consists
+% of the digits of |#1#3|. If |#3| was empty, 10 is assigned. In this way
+% |\FC@r| is prepared for insertion in the next invocation of |\secd@xt|.
+% In iterating: 1234 yields~134, yields~14, yields~10, stays~10, etc.
% \begin{macrocode}
-\def\secd@xt#1#2#3\end{\advance\FC@l by #2
+\def\secd@xt#1#2#3\secd@xt{\advance\FC@l by #2
\FC@r=#1#3 \ifnum\FC@r=1 \FC@r=10 \fi}
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\restorem@thcodes}
-% As shown above, once the first digit, or sign, or decimal separator, or
-% grouping character is scanned, the decimal digits should loose their
-% activeness. That is done here in a rather blunt way, since the actual
-% |\mathcode| is not important---as long as it is not |"8000|---because
-% the digits are not used for typesetting (and even if they were; it's
-% inside |\box0|, whose contents will be discarded). When the |$|
-% in |\e@fi| is encountered, the digits get back their original
-% |\mathcode|s so that the actual typesetting in |\zetg@ld| is
-% correct again.
-% \begin{macrocode}
-\def\restorem@thcodes{\mathcode`\0=0 \mathcode`\1=0
-\mathcode`\2=0 \mathcode`\3=0 \mathcode`\4=0 \mathcode`\5=0
-\mathcode`\6=0 \mathcode`\7=0 \mathcode`\8=0 \mathcode`\9=0 }
-% \end{macrocode}
-% \end{macro}
% \subsection{Adaptations to existing macros}
% \begin{macro}{\@array}
% The definition of |\@array| had to be extended slightly because it should
% also include |\@mksumline| (acting on the same |#2| as |\@mkpream| gets).
% This change is transparant: it only adds functionality and if you don't
% use that, you won't notice the difference. It starts by just copying the
-% original definition from v2.4k of the |array| package~\cite{array}.
+% original definition from v2.4k of the |array| package~\cite{array},
+% compacted.
% \begin{macrocode}
-\def\@array[#1]#2{%
-\@tempdima \ht \strutbox
-\advance \@tempdima by\extrarowheight
-\setbox \@arstrutbox \hbox{\vrule
- \@height \arraystretch \@tempdima
- \@depth \arraystretch \dp \strutbox
- \@width \z@}%
+\def\@array[#1]#2{\@tempdima\ht\strutbox\advance\@tempdima by
+ \extrarowheight\setbox\@arstrutbox\hbox{\vrule\@height\arraystretch
+ \@tempdima\@depth\arraystretch\dp\strutbox\@width\z@}%
% \end{macrocode}
% Here comes the first change: after each |\\| (or |\cr| for that matter)
% the \meta{count} |\FCsc@l| should be reset. This is easiest done with
% |\everycr|, but |\everycr| is put to |{}| by |\ialign|, so that definition
% should change. The resetting should be done globally.
% \begin{macrocode}
-\def\ialign{\everycr{\noalign{\global\FCsc@l=0 }}%
- \tabskip\z@skip\halign}
+\def\ialign{\everycr{\noalign{\global\FCsc@l=0 }}\tabskip\z@skip\halign}
% \end{macrocode}
% Then the definition is picked up again.
% \begin{macrocode}
-\begingroup
-\@mkpream{#2}%
-\xdef\@preamble{\noexpand \ialign \@halignto
+\begingroup\@mkpream{#2}\xdef\@preamble{\noexpand\ialign\@halignto
\bgroup\@arstrut\@preamble\tabskip\z@\cr}%
\endgroup
% \end{macrocode}
-% The combination |\endgroup| followed by |\begingroup| seems redundant,
-% but that is not the case: the |\endgroup| restores everything that was
-% not |\global|. With the following |\begingroup| it is ensured that
-% |\@mksumline| experiences the same settings as |\@mkpream| did.
+% The combination |\endgroup| in the previous chunk followed by |\begingroup|
+% in the next chunk seems redundant, but that is not the case: the |\endgroup|
+% restores everything that was not |\global|. With the following |\begingroup|
+% it is ensured that |\@mksumline| experiences the same settings as |\@mkpream| did.
% \begin{macrocode}
-\begingroup
-\@mksumline{#2}%
-\endgroup
+\begingroup\@mksumline{#2}\endgroup
% \end{macrocode}
% As a side product of |\@mksumline| also the \meta{count}s for the totals
% and \meta{dimen}s for the widths of the colums are created. The columns
@@ -1049,14 +1044,9 @@ indention=0pt,labelsep=colon,justification=raggedright}
% \end{macrocode}
% From here on it is just the old definition of |array.sty|.
% \begin{macrocode}
-\@arrayleft
-\if #1t\vtop \else \if#1b\vbox \else \vcenter \fi \fi
-\bgroup
-\let \@sharp ##\let \protect \relax
-\lineskip \z@
-\baselineskip \z@
-\m@th
-\let\\\@arraycr \let\tabularnewline\\\let\par\@empty \@preamble}
+\@arrayleft\if #1t\vtop\else\if#1b\vbox\else\vcenter\fi\fi\bgroup
+\let\@sharp ##\let\protect\relax\lineskip\z@\baselineskip\z@
+\m@th \let\\\@arraycr \let\tabularnewline\\\let\par\@empty \@preamble}
% \end{macrocode}
% Because |\@array| was changed here and it is this version that should
% be used, |\@@array| should be |\let| equal to |\@array| again.
@@ -1072,11 +1062,11 @@ indention=0pt,labelsep=colon,justification=raggedright}
% is grammatically correct because it has already been screened by |\@mkpream|.
% Furthermore, most entries will simply add nothing to |\s@ml@ne|, e.g., |@|, |!|,
% and \verb+|+ can be fully ignored. Ampersands are only inserted by |c|, |l|, |r|,
-% |p|, |m|, and |b|. So a specifier like |@{}lflf@{}| will yield the sumline
-% |&\a&&\a\\|, (where |\a| is a macro that prints the desired result of the column,
-% see below). Had the specifier been \verb+l|f||@{ }l|f+, then the same sumline must
-% be constructed: all difficulties are already picked up and solved in the creation
-% of the preamble.
+% |p|, |m|, and |b|. So, if |\a| is a macro that prints the desired result of the
+% column (see below), then a specifier like |@{}lflf@{}| will yield the sumline
+% |&\a&&\a\\|. Had the specifier been \verb+l|f||@{ }l|f+, then the same
+% sumline must be constructed: all difficulties are already picked up and
+% solved in the creation of the preamble.
%
% In reality the sumline must be constructed from the expanded form of the
% specifier, so |@{}lf@{}| will expand as
@@ -1089,9 +1079,10 @@ indention=0pt,labelsep=colon,justification=raggedright}
% \item ignore everything else;
% \item close with a |\\|.
% \end{compactitem}
-% (In reality also the column check is inserted just before the |\\|, see
-% |\aut@check|.) To discriminate, a special version of |\@testpach| could
-% be written, but that is not necessary: |\@testpach| can do all the work,
+% (For completeness' sake it should be mentioned that prior to the |\\| also the column
+% check is inserted, see |\aut@check|.)
+% To discriminate, a special version of |\@testpach|~\cite{array}
+% could be written, but that is not necessary: |\@testpach| can do all the work,
% although much of it will be discarded. Here speed is sacrificed for space
% and this can be afforded because the creation of the sumline is done only
% once per |\tabular| or |\longtable|.
@@ -1108,9 +1099,8 @@ indention=0pt,labelsep=colon,justification=raggedright}
% \end{macrocode}
% Then |\@mkpream| is picked up again.
% \begin{macrocode}
-\@temptokena{#1}\@tempswatrue
-\@whilesw\if@tempswa\fi{\@tempswafalse\the\NC@list}%
-\count0\m@ne\let\the@toks\relax\prepnext@tok
+\@temptokena{#1}\@tempswatrue\@whilesw\if@tempswa\fi{\@tempswafalse
+\the\NC@list}\count0\m@ne\let\the@toks\relax\prepnext@tok
% \end{macrocode}
% Next is the loop over all tokens in the expanded form of the specifier. The change
% with respect to |\@mkpream| is that the body of the loop is now only dealing
@@ -1118,11 +1108,9 @@ indention=0pt,labelsep=colon,justification=raggedright}
% what to do when constructing the preamble, so special definitions are created, see
% below.
% \begin{macrocode}
-\expandafter \@tfor \expandafter \@nextchar
- \expandafter :\expandafter =\the\@temptokena \do
- {\@testpach
- \ifcase \@chclass \@classfz \or \or \@classfii \or \or \or \or \or
- \or \or \or \@classfx \fi\@lastchclass\@chclass}%
+\expandafter\@tfor\expandafter\@nextchar\expandafter:\expandafter=\the
+\@temptokena\do{\@testpach\ifcase\@chclass\@classfz\or\or\@classfii\or
+\or\or\or\or\or\or\or\@classfx\fi\@lastchclass\@chclass}%
% \end{macrocode}
% And the macro is finished by applying the |\aut@check| and appending the
% |\\| to the sumline. Note that the |\aut@check| is performed {\itshape
@@ -1149,9 +1137,9 @@ indention=0pt,labelsep=colon,justification=raggedright}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\@classfz}
-% Class~f0 is applicable for specifiers |c|, |l|, and |r|, and if the arguments of |p|,
-% |m|, or |b| are given. The latter three cases, with |\@chnum| is 0, 1, or~2 should be
-% ignored and the first three cases are now similar to class~f10.
+% Class~f0 is applicable for specifiers |c|, |l|, and |r|, and if the arguments
+% of |p|, |m|, or |b| are given. The latter three cases, with |\@chnum| is 0,
+% 1, or~2 should be ignored and the first three cases are now similar to class~f10.
% \begin{macrocode}
\def\@classfz{\ifnum\@chnum<\thr@@ \@classfx\fi}
% \end{macrocode}
@@ -1170,14 +1158,15 @@ indention=0pt,labelsep=colon,justification=raggedright}
\edef\t@stn{\string\e@fi}
\ifx\t@stm\t@stn
% \end{macrocode}
-% If both tests yield |true|, i.e., we encountered a |<{\e@fi}| where we expect one to
-% find, then add the macro to typeset everything.
+% If both tests yield |true|, i.e., we encountered a |<{\e@fi}| where we expect
+% one to find, then add the macro to typeset everything.
% \begin{macrocode}
\@addtosumline{\prr@sult}
% \end{macrocode}
-% But we're not done yet: in the following lines of code the appropriate \meta{count}s and
-% \meta{dimen}s are created, if necessary. Note that |\FCsc@l| was set to~0 in the
-% beginning of |\@mksumline|, so it is well-defined when |\@classfii| is used.
+% But we're not done yet: in the following lines of code the appropriate
+% \meta{count}s and \meta{dimen}s are created, if necessary. Note that
+% |\FCsc@l| was set to~0 in the beginning of |\@mksumline|, so it is
+% well-defined when |\@classfii| is used.
% \begin{macrocode}
\global\advance\FCsc@l by \@ne
\ifnum\FCsc@l>\FCtc@l
@@ -1217,7 +1206,7 @@ indention=0pt,labelsep=colon,justification=raggedright}
\else
\PackageError{fcolumn}{Name clash for <dimen>}{\expandafter\csname
FCwd@\romannumeral\FCsc@l\endcsname is already defined and it may
- not even be a <dimen>. If you're\MessageBreak sure it is a <dimen>,
+ not even be a <dimen>. If you're\MessageBreak sure it is a <dimen>,
you can press <enter> now and I'll proceed, but things\MessageBreak
will get overwritten.}%
\fi
@@ -1250,8 +1239,8 @@ indention=0pt,labelsep=colon,justification=raggedright}
% \end{macrocode}
% Then the information for the last line is computed. It is not sufficient
% to calculate the width of the result (in points) to use that as the width
-% of the rule separating the individual entries and the result. It may be
-% that the sum is larger (in points) than any of the entries, e.g., when the
+% of the rule separating the individual entries and the result. It may happen
+% that the sum is wider (in points) than any of the entries, e.g., when the
% result of $6+6$ (using specifier~|3,2|) is typeset. The width of the rule
% should be equal to the width of |\hbox{$12{,}00$}| then. On the other
% hand the width of the rule when summing $24$ and $-24$ should be that of
@@ -1283,17 +1272,18 @@ FCtot@\romannumeral\FCsc@l\endcsname}$}%
% a number in the table, e.g., |\leeg{p.m.}|, this definition is without
% at-sign. By defining |\leeg| in this way, instead of |\multicolumn1r{}|
% (which contains |\omit|), the default spacing in the column is retained.
-% It has its normal effect on the column width, but doesn't alter the
-% width of the sumrule.
+% It doesn't alter the width of the sumrule, but has its normal effect on
+% the column width, so be careful: don't insert the unabridged version of
+% Romeo and Juliet~\cite{RJ} here. It is not typeset in math mode, nor
+% does it use the extra (formatting) information of |#4| of the fcolumn,
+% so you're completely free here.
% \begin{macrocode}
\def\leeg#1{$\egroup \let\e@fi=\relax #1}
% \end{macrocode}
% Note that anything may be given as argument to |\leeg|, so in principle
-% it can also be used to cheat: |\leeg{0,03}| will insert |0,03| in the
-% table but it doesn't increase the totals of that column by~3 (assuming
-% |3,2| coding for the separations). But you won't cheat, won't you?
-% It may affect the width, so be careful: don't insert the unabridged
-% version of Romeo and Juliet~\cite{RJ} here.
+% it can also be used to cheat: |\leeg{0,03}| will insert the text~|0,03|
+% in the table but it doesn't increase the totals of that column by~3
+% (assuming |3,2| coding for the separations). But you won't cheat, won't you?
% \end{macro}
% \begin{macro}{\res@tsumline}
% Since all changes to the totals and widths of the columns are global,
@@ -1341,24 +1331,25 @@ FCtot@\romannumeral\FCsc@l\endcsname}$}%
\count0=\@ne \count1=\FCsc@l
\divide\count1 by \tw@
\loop\ifnum\count1<\FCsc@l
- \advance\count1 by \@ne
- \xdef\FC@chklist{\FC@chklist\number\count0,\number\count1;}%
- \advance\count0 by\@ne
+ \advance\count1 by \@ne
+ \xdef\FC@chklist{\FC@chklist\number\count0,\number\count1;}%
+ \advance\count0 by\@ne
\repeat
- \fi
+ \fi
\fi
% \end{macrocode}
% Then this list is peeled off and processed.
% \begin{macrocode}
\loop
- \ifx\FC@chklist\@empty\let\FCs@gn=\@ne\else\let\FCs@gn=\m@ne\fi
- \ifx\FCs@gn\m@ne
- \expandafter\fre@t\FC@chklist\end
- \ifnum\csname FCtot@\romannumeral\count0\endcsname=
- \csname FCtot@\romannumeral\count1\endcsname\else
- \PackageWarning{fcolumn}{F-columns \number\count0 \space
- and \number\count1 \space do not balance near or}%
- \fi
+\ifx\FC@chklist\@empty\let\FCs@gn=\@ne\else\let\FCs@gn=\m@ne\fi
+\ifx\FCs@gn\m@ne
+ \expandafter\fre@t\FC@chklist\end
+ \ifnum\csname FCtot@\romannumeral\count0\endcsname=
+ \csname FCtot@\romannumeral\count1\endcsname\else
+ \PackageWarning{fcolumn}{F-columns \number\count0 \space and
+ \number\count1 \space do not balance due to \string\sumline
+ \MessageBreak near or}%
+ \fi
\repeat}
% \end{macrocode}
% When |\aut@check| is finished, |\FC@chklist| is empty again, i.e., well
@@ -1386,83 +1377,69 @@ FCtot@\romannumeral\FCsc@l\endcsname}$}%
% \end{macrocode}
% \end{macro}
% \subsection{Support for package longtable}
-% Package |longtable| is used for tables that may span multiple pages. |fcolumn| and
-% |longtable| work together as long as |longtable| is loaded first, so that |fcolumn|
-% can adapt one definition of |longtable|. If |longtable| is not loaded, that definition
-% is just that: a definition. If |longtable| is loaded before |fcolumn|, it is a
-% redefinition, and it should be. For that reason the user is warned (not loading
-% |longtable| is not an error if you don't use it) if |fcolumn| is loaded without prior
-% loading of |longtable|.
+% Package |longtable| is used for tables that may span multiple pages. The
+% packages |fcolumn| and |longtable| work together provided |longtable| is
+% loaded first, so that |fcolumn| can adapt one definition of |longtable|. If
+% |longtable| is not loaded, it's a waste of memory having that definition, so
+% it is only defined when necessary. For that reason the user is warned (not
+% loading |longtable| is obviously not an error if you don't use it) if
+% |fcolumn| is loaded without prior loading of |longtable|.
% \begin{macrocode}
\ifx\longtable\@undefined
- \PackageWarningNoLine{fcolumn}{fcolumn is loaded without longtable. That's
- OK, but\MessageBreak if you want to load longtable as well, make sure
- \MessageBreak it is done before loading fcolumn}
-\fi
+ \PackageWarningNoLine{fcolumn}{fcolumn is loaded without longtable.
+ That's OK, but\MessageBreak if you want to load longtable as well,
+ make sure \MessageBreak it is done before loading fcolumn}\else
% \end{macrocode}
% \begin{macro}{\LT@array}
-% And here is the only definition of |longtable| that needs to be adapted a bit, to make
-% |fcolumn| work with that package.
-% \begin{macrocode}
-\def\LT@array[#1]#2{%
- \refstepcounter{table}\stepcounter{LT@tables}%
- \if l#1 \LTleft\z@\LTright\fill
- \else\if r#1 \LTleft\fill\LTright\z@
- \else\if c#1 \LTleft\fill\LTright\fill
- \fi\fi\fi
- \let\LT@mcol\multicolumn\let\LT@@tabarray\@tabarray\let\LT@@hl\hline
- \def\@tabarray{\let\hline\LT@@hl \LT@@tabarray}%
- \let\\\LT@tabularcr\let\tabularnewline\\%
- \def\newpage{\noalign{\break}}%
- \def\pagebreak{\noalign{\ifnum`}=0\fi\@testopt{\LT@no@pgbk-}4}%
- \def\nopagebreak{\noalign{\ifnum`}=0\fi\@testopt\LT@no@pgbk4}%
- \let\hline\LT@hline\let\kill\LT@kill\let\caption\LT@caption
- \@tempdima\ht\strutbox\let\@endpbox\LT@endpbox
- \ifx\extrarowheight\@undefined
- \let\@acol\@tabacol\let\@classz\@tabclassz\let\@classiv\@tabclassiv
- \def\@startpbox{\vtop\LT@startpbox}\let\@@startpbox
- \@startpbox\let\@@endpbox\@endpbox\let\LT@LL@FM@cr\@tabularcr
- \else
- \advance\@tempdima\extrarowheight \col@sep\tabcolsep
- \let\@startpbox\LT@startpbox\let\LT@LL@FM@cr\@arraycr
- \fi
- \setbox\@arstrutbox\hbox{\vrule\@height\arraystretch\@tempdima
- \@depth\arraystretch\dp\strutbox\@width\z@}%
- \let\@sharp##\let\protect\relax
- \begingroup
- \@mkpream{#2}%
- \xdef\LT@bchunk{%
- \global\advance\c@LT@chunks\@ne\global\LT@rows\z@
- \setbox\z@\vbox\bgroup\LT@setprevdepth\tabskip\LTleft
- \noexpand\halign to\hsize\bgroup\tabskip\z@\@arstrut
- \@preamble\tabskip\LTright\cr}%
- \endgroup
-% \end{macrocode}
-% Until this line it was just the code for |\LT@array| from package |longtable|.
-% The five lines of the next chunk are new to |\LT@array|. Their
+% And here is the only definition of |longtable| that needs to be extended
+% to make |fcolumn| work with that package. The lines are compacted a bit
+% w.r.t.\ the original |longtable| code; if you want to study the
+% code, have a look at the documentation~\cite{longtable}.
+% \begin{macrocode}
+ \def\LT@array[#1]#2{\refstepcounter{table}\stepcounter{LT@tables}\if
+ l#1 \LTleft\z@\LTright\fill\else\if r#1 \LTleft\fill\LTright\z@\else
+ \if c#1 \LTleft\fill\LTright\fill\fi\fi\fi\let\LT@mcol\multicolumn
+ \let\LT@@tabarray\@tabarray\let\LT@@hl\hline\def\@tabarray{\let
+ \hline\LT@@hl\LT@@tabarray}\let\\\LT@tabularcr\let\tabularnewline\\
+ \def\newpage{\noalign{\break}}\def\pagebreak{\noalign{\ifnum`}=0\fi
+ \@testopt{\LT@no@pgbk-}4}\def\nopagebreak{\noalign{\ifnum`}=0\fi
+ \@testopt\LT@no@pgbk4}\let\hline\LT@hline\let\kill\LT@kill\let\caption
+ \LT@caption\@tempdima\ht\strutbox\let\@endpbox\LT@endpbox\ifx
+ \extrarowheight\@undefined\let\@acol\@tabacol\let\@classz\@tabclassz
+ \let\@classiv\@tabclassiv\def\@startpbox{\vtop\LT@startpbox}\let
+ \@@startpbox\@startpbox\let\@@endpbox\@endpbox\let\LT@LL@FM@cr
+ \@tabularcr\else\advance\@tempdima\extrarowheight\col@sep\tabcolsep
+ \let\@startpbox\LT@startpbox\let\LT@LL@FM@cr\@arraycr\fi\setbox
+ \@arstrutbox\hbox{\vrule\@height\arraystretch\@tempdima\@depth
+ \arraystretch\dp\strutbox\@width\z@}\let\@sharp##\let\protect\relax
+ \begingroup\@mkpream{#2}\xdef\LT@bchunk{\global\advance\c@LT@chunks
+ \@ne\global\LT@rows\z@\setbox\z@\vbox\bgroup\LT@setprevdepth\tabskip
+ \LTleft\noexpand\halign to\hsize\bgroup\tabskip\z@\@arstrut\@preamble
+ \tabskip\LTright\cr}\endgroup
+% \end{macrocode}
+% Until this line it was just the code for |\LT@array| from package~|longtable|.
+% The two lines of the next chunk are new to |\LT@array|. Their
% purpose is the same as in |\@array| above.
% \begin{macrocode}
- \begingroup
- \@mksumline{#2}%
- \endgroup
- \res@tsumline
+ \begingroup\@mksumline{#2}\endgroup\res@tsumline
\everycr{\noalign{\global\FCsc@l=0 }}%
% \end{macrocode}
-% From here on |\LT@array| is picked up again.
+% From here on |\LT@array| is picked up again, ending with the |\fi| that belongs
+% to the |\ifx| that started this definition.
% \begin{macrocode}
- \expandafter\LT@nofcols\LT@bchunk&\LT@nofcols
- \LT@make@row\m@th\let\par\@empty
- \lineskip\z@\baselineskip\z@\LT@bchunk}
+ \expandafter\LT@nofcols\LT@bchunk&\LT@nofcols\LT@make@row\m@th\let
+ \par\@empty\lineskip\z@\baselineskip\z@\LT@bchunk}
+\fi
% \end{macrocode}
% \end{macro}
% That's it!
% \section*{Acknowledgement}
-% Thanks to Karl Berry for valuable comments regarding the consistency of
-% the installation procedure of this version. Frank Mittelbach gave
-% various useful suggestions for improving the input parsing as well as
-% hints to make the package more \LaTeX-like. He also challenged me to make |fcolumn|
-% compatible with |longtable|. Christian Hoff's request on column formatting triggered
-% many happy hours of coding.
+% Thanks to Karl Berry for valuable comments regarding the consistency of the
+% installation procedure of this version. Frank Mittelbach gave various useful
+% suggestions for improving the input parsing as well as hints to make the package
+% more \LaTeX-like. He also challenged me to make |fcolumn| compatible with
+% |longtable|. Christian Hoff's request on column formatting triggered many
+% happy hours of coding.
% \bibliographystyle{plain}
% \begin{thebibliography}{9}
% \itemsep0pt
@@ -1470,7 +1447,7 @@ FCtot@\romannumeral\FCsc@l\endcsname}$}%
% \parskip0pt
% \bibitem{array} Frank Mittelbach and David Carlisle.
% A new implementation of \LaTeX's |tabular| and |array| environment.
-% \bibitem{booktabs} Simon Fear. Publication quality tables in \LaTeX.
+% \bibitem{booktabs} Simon Fear. The |booktabs| package. Publication quality tables in \LaTeX.
% \bibitem{dcolumn} David Carlisle. The |dcolumn| package.
% \bibitem{longtable} David Carlisle. The |longtable| package.
% \bibitem{world_economy} According to the IMF \url{www.imf.org}.
diff --git a/macros/latex/contrib/fcolumn/fcolumn.ins b/macros/latex/contrib/fcolumn/fcolumn.ins
index 993ad041c8..d4074c1507 100644
--- a/macros/latex/contrib/fcolumn/fcolumn.ins
+++ b/macros/latex/contrib/fcolumn/fcolumn.ins
@@ -17,7 +17,7 @@
This is a generated file.
-Copyright (C) 2015--2021 by Edgar Olthof
+Copyright (C) 2015--2022 by Edgar Olthof
This file may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
@@ -42,12 +42,12 @@ LaTeX version 1999/12/01 or later.
\Msg{* fcolumn.sty *}
\Msg{* *}
\Msg{* into a directory searched by TeX. *}
-\Msg{* To produce the documentation, type ``make'' or *}
+\Msg{* To generate the documentation, type ``make'' or *}
\Msg{* run the file fcolumn.dtx through LaTeX. Make sure *}
\Msg{* the glossary and index are updated by makeindex: *}
\Msg{* *}
\Msg{* makeindex -s gglo.ist -o fcolumn.gls fcolumn.glo *}
-\Msg{* makeindex -s gglo.ist -o fcolumn.ind fcolumn.idx *}
+\Msg{* makeindex -s gind.ist -o fcolumn.ind fcolumn.idx *}
\Msg{* *}
\Msg{* and then LaTeX again; presto! *}
\Msg{* *}
diff --git a/macros/latex/contrib/fcolumn/fcolumn.pdf b/macros/latex/contrib/fcolumn/fcolumn.pdf
index 6b7dfce975..e6755b2495 100644
--- a/macros/latex/contrib/fcolumn/fcolumn.pdf
+++ b/macros/latex/contrib/fcolumn/fcolumn.pdf
Binary files differ
diff --git a/macros/latex/contrib/fcolumn/makefile b/macros/latex/contrib/fcolumn/makefile
index 1197a57167..6a05537aa6 100644
--- a/macros/latex/contrib/fcolumn/makefile
+++ b/macros/latex/contrib/fcolumn/makefile
@@ -25,7 +25,7 @@ install:
pdftex fcolumn.ins
dist: $(DIST)
- mkdir FCv1.4; cp $(DIST) FCv1.4; tar -czf fcolumn.tgz FCv1.4; rm -r FCv1.4
+ mkdir FCv1.4.1temp; cp $(DIST) FCv1.4.1temp; tar -czf fcolumn.tgz FCv1.4.1temp; rm -r FCv1.4.1temp
fcolumn.pdf: fcolumn.dtx fcolumn.gls fcolumn.ind fcolumn.sty
fcolumn.glo fcolumn.idx: fcolumn.dtx
diff --git a/macros/latex/contrib/lwarp/README.txt b/macros/latex/contrib/lwarp/README.txt
index d6e0d17d05..5b687de6c9 100644
--- a/macros/latex/contrib/lwarp/README.txt
+++ b/macros/latex/contrib/lwarp/README.txt
@@ -1,5 +1,5 @@
-LaTeX lwarp package v0.902 README.txt
+LaTeX lwarp package v0.903 README.txt
Files included are:
@@ -41,7 +41,7 @@ and version 1.3 or later is part of all distributions of LaTeX
version 2005/12/01 or later.
-Copyright 2016-2021 Brian Dunn
+Copyright 2016-2022 Brian Dunn
Homepage: http://BDTechConcepts.com
Email: bd@BDTechConcepts.com
diff --git a/macros/latex/contrib/lwarp/lwarp.dtx b/macros/latex/contrib/lwarp/lwarp.dtx
index 743e616dc1..9800198020 100644
--- a/macros/latex/contrib/lwarp/lwarp.dtx
+++ b/macros/latex/contrib/lwarp/lwarp.dtx
@@ -1,7 +1,7 @@
%
% \iffalse meta-comment
%
-% Copyright 2016-2021 Brian Dunn
+% Copyright 2016-2022 Brian Dunn
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -16,7 +16,7 @@
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{lwarp}
-%<package> [2021/10/01 v0.902 Allows LaTeX to directly produce HTML5 output.]
+%<package> [2022/02/01 v0.903 Allows LaTeX to directly produce HTML5 output.]
%
%<*driver>
\documentclass{ltxdoc}
@@ -197,7 +197,7 @@
% Indexing, logos, \Describexxxx, etc:
-\usepackage{dtxdescribe}[2021/09/02]
+\usepackage{dtxdescribe}[2021/12/18]
\usepackage{splitidx}
@@ -267,7 +267,7 @@ Keywords={LaTeX, HTML, conversion}%
\newcommand*{\AV}{\acro{A}\Slash\acro{V}}
\makeatletter
-\@ifpackageloaded{erewhon}{\renewcommand*{\HTMLfive}{\acro{HTML}\textosf{5}}}{}
+\IfPackageLoadedTF{erewhon}{\renewcommand*{\HTMLfive}{\acro{HTML}\textosf{5}}}{}
\makeatother
\newcommand{\credits}[1]{{\footnotesize(\textit{Emulates or patches code by} \textsc{#1}.)}}
@@ -1837,6 +1837,7 @@ Do not use the \optn{scale} option, since it is not well supported by \HTML\ bro
\margintag{options}
\optn{origin}, \optn{rotate} and \optn{scale},
plus new \optn{class} and \optn{alt} keys.
+(\optn{alt} has recently been incorportated into \pkg{graphicx} itself.)
With \HTML\ output, \cs{includegraphics} accepts an optional
\margintag{\HTML\ class}
@@ -2929,6 +2930,10 @@ The result usually looks fine, and otherwise is enough to get the meaning across
Document modifications required for \MathJax:
\begin{itemize}
+\item Place \cs{sisetup} in the preamble before \texttt{\cs{begin}\{document\}}.
+ \watchout[\cs{sisetup}]
+ Changes made later may be ignored, especially with \MathJax.
+ The \MathJax\ emulation also ignores most macro options.
\item Custom units may be added with \cs{CustomizeMathJax}.
\margintag{custom units}
See the \pkg{lwarp-siunitx} code for examples.
@@ -2942,6 +2947,8 @@ Document modifications required for \MathJax:
\cs{cubic}\textred{\{}\cs{centi}\cs{meter}\textred{\}}
\end{sourcedisplay}
Single units do not require braces.
+\item For \cs{numlist}, the argument is printed as text as-is,
+ so use space between semicolons for improved readability.
\end{itemize}
Also see \nameref{sec:limitsmathjax}, \cref{sec:limitsmathjax}.
@@ -3083,6 +3090,14 @@ using \cmds{pdflatex filename.tex} or similar, after which
\prog{lwarpmk} may then be used with the new configuration files.
}
+\newcommand*{\newimagechecksums}{
+Due to changes in how automatically-generated
+\watchout[New images]
+\SVG\ image file names are computed,
+after \cmds{lwarpmk html} use \cmds{lwarpmk cleanlimages} a single time,
+and then \cmds{lwarpmk limages} to generate the new images.
+}
+
\newcommand*{\describehashing}{%
If starred, a hashed filename is used.\margintag{image filename hashing}
@@ -3097,7 +3112,7 @@ but also enough additional information to provide a unique hash.
An example is when the expression is a complicated \TeX\ expression, which would not
copy/paste well. A simplified tag may be used, while the complicated expression is
-duplicated in the additional hashing argument.
+used in the additional hashing argument to ensure a unique image.
Another example is when the expression is simple, but the image depends
on options. These options may be decoded into text form and
@@ -3137,6 +3152,11 @@ This boolean may be tested by the user for later use.
\setcounter{IndexColumns}{2}
+
+% To color the text of the listing, but this makes it harder to read:
+% \apptocmd{\MacroFont}{\color{blue!40!black}}{}{}
+
+
\DisableCrossrefs
\CodelineIndex
\RecordChanges
@@ -3152,7 +3172,7 @@ This boolean may be tested by the user for later use.
%<*package>
% \fi
%
-% \CheckSum{54254}
+% \CheckSum{54471}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -3296,6 +3316,8 @@ This boolean may be tested by the user for later use.
% \changes{v0.900}{2021/07/17}{\ 2021/07/17}
% \changes{v0.901}{2021/08/27}{\ 2021/08/27}
% \changes{v0.902}{2021/10/01}{\ 2021/10/01}
+% \changes{v0.903}{2021/12/23}{Now uses \cs{IfPackageLoadedTF}, etc.}
+% \changes{v0.903}{2022/02/01}{\ 2022/02/01}
@@ -3328,7 +3350,7 @@ This boolean may be tested by the user for later use.
%
% \fileversion{} \Dash \filedate
%
-% {\small\textcopyright{} 2016--2021} Brian Dunn\\ \small \texttt{bd@BDTechConcepts.com}
+% {\small\textcopyright{} 2016--2022} Brian Dunn\\ \small \texttt{bd@BDTechConcepts.com}
%
% \end{center}
%
@@ -3530,6 +3552,28 @@ This boolean may be tested by the user for later use.
%
% \begin{description}
% \needspace{2\baselineskip}
+% \item[v0.903:] Various updates and improvements.
+% \begin{itemize}
+% \item Error if \prog{pdftotext} not available.
+% \margintag{\prog{lwarpmk}}
+% Ensures that \brand{poppler} programs are installed.
+% \item \prog{ps2pdf}: Allow transparency due to recent changes in \prog{ps2pdf}.
+% \margintag{core}
+% \item \newimagechecksums
+% \item Improved back refs.
+% \item Fixed \env{verbatim*}.
+% \item Various internal updates for recent \LaTeX\ release.
+% \item \pkg{cuted}: Updated to v2.0.
+% \margintag{packages}
+% \item \pkg{flushend}: Updated to v4.0.
+% \item \pkg{mathalpha}: Updated for v1.14+.
+% \item \pkg{minted}: Updated to v2.6.
+% \item \pkg{cases}: Updated to v3.2.
+% \item \pkg{siunitx} with \MathJax: Improved \cs{per}, \cs{numlist}, \cs{SIlist},
+% comma decimal points.
+% \item Added \pkg{showlabels}, \pkg{wrapfig2}.
+% \end{itemize}
+% \needspace{2\baselineskip}
% \item[v0.902:] \pkg{beamerarticle}, footnotes, paragraph tags.
% \begin{itemize}
% \item Fixed footnotes inside descriptions, minipages, \pkg{amsthm}, \cs{nameref}.
@@ -5931,7 +5975,7 @@ This boolean may be tested by the user for later use.
% \epkg{nonfloat}, \mpkg{picinpar}, \ipkg{placeins}, \epkg{rotfloat}, \ipkg{stfloats},
% \mpkg{subcaption}, \mpkg{subfig}, \epkg{subfigure}, \spkg{subfloat},
% \epkg{swfigure},
-% \epkg{topcapt}, \epkg{trivfloat}, \epkg{wrapfig}. \\
+% \epkg{topcapt}, \epkg{trivfloat}, \epkg{wrapfig}, \epkg{wrapfig2}. \\
%
% \midrule
%
@@ -6137,6 +6181,7 @@ This boolean may be tested by the user for later use.
%
% Debug: & \ipkg{chkfloat}, \ipkg{cmdtrack}, \ipkg{dprogress}, \mpkg{lipsum},
% \ipkg{lua-visual-debug}, \mpkg{mwe}, \ipkg{refcheck},
+% \ipkg{showlabels}, \ipkg{showkeys},
% \ipkg{srcltx}, \ipkg{srctex}, \ipkg{vpe}, \ipkg{xbmks}. \\
%
% \midrule
@@ -6655,6 +6700,13 @@ This boolean may be tested by the user for later use.
%
% \changes{v0.27}{2017/04/02}{Docs: Installing utilities for \brand{MacOS}.}
%
+% \trouble{poppler=\prog{poppler}>install}
+% \trouble{perl=\prog{perl}}
+% \trouble{pdfcrop=\prog{pdfcrop}}
+% \trouble{pdftotext=\prog{pdftotex}}
+% \trouble{pdfseparate=\prog{pdfseparate}}
+% \trouble{pdftocairo=\prog{pdftocairo}}
+%
% \begin{description}
% \item [To test for the existence of the additional utilities:] \
%
@@ -7016,13 +7068,13 @@ This boolean may be tested by the user for later use.
%
% \qquad Open the file |tutorial.html| in a web browser.
%
-% Note that math is still displayed as its \attribute{alt} tag, which is
-% \margintag{math}
-% the plain-text \LaTeX\ source,
-% until the
-% images of the math expressions have been generated. Math may be
-% displayed as \SVG\ images or by a \MathJax\ script, as seen in
-% \cref{sec:tutorialsvgmath,sec:tutorialmathjax}.
+% Note that math images have not yet been generated,
+% \margintag{math images}
+% \changes{v0.903}{2022/01/24}{Docs: Math images.}
+% so math is still displayed as its \attribute{alt} tag, which is
+% set to the plain-text \LaTeX\ source for that expression.
+% Math may be displayed as \SVG\ images (\cref{sec:tutorialsvgmath})
+% or by a \MathJax\ script (\cref{sec:tutorialmathjax}).
%
% \item Force a recompile:
% \userentry{lwarpmk again}
@@ -8939,6 +8991,9 @@ This boolean may be tested by the user for later use.
% Do not nest \env{warpsvg} inside itself. \watchout[nesting]
% \env{warpsvg} may be used inside \env{warpHTML}.
%
+% To define macros or environments which behave differently depending
+% \margintag{\cs{LWR@formatted}}
+% on print or \HTML\ output, see \cref{sec:definingprinthtml}.
%
%
% \subsection{Commands to be placed into the \env{warpprint} environment}
@@ -11104,14 +11159,14 @@ This boolean may be tested by the user for later use.
% {
% latex tm \LWRopseq
% dvips -o tm-pics.ps tm.dvi \LWRopseq
-% ps2pdf tm-pics.ps \LWRopseq
+% ps2pdf -dALLOWPSTRANSPARENCY tm-pics.ps \LWRopseq
% pdflatex tm.tex
% } ,
% HTMLLatexCmd=
% {
% latex tm_html \LWRopseq
% dvips -o tm_html-pics.ps tm_html.dvi \LWRopseq
-% ps2pdf tm_html-pics.ps \LWRopseq
+% ps2pdf -dALLOWPSTRANSPARENCY tm_html-pics.ps \LWRopseq
% pdflatex tm_html.tex
% }
% }
@@ -12841,13 +12896,25 @@ This boolean may be tested by the user for later use.
%
% \section{Early package requirements}
%
-% \DescribePackage{etoolbox}
-% Provides \cs{ifbool} and other functions.
%
-% \DescribePackage{xpatch}
-% Patches macros with optional arguments.
+% \DescribePackage{etoolbox} Provides \cs{ifbool} and other functions.
+%
% \begin{macrocode}
\RequirePackage{etoolbox}[2011/01/03]% v2.6 for \BeforeBeginEnvironment, etc.
+% \end{macrocode}
+%
+% Patch to fix copy of environment with a \cs{par}:
+%
+% \href{https://github.com/josephwright/etoolbox/issues/35}{https://github.com/josephwright/etoolbox/issues/35}
+% \changes{v0.903}{2021/12/21}{\pkg{etoolbox}: Patch for \cs{NewCommandCopy}.}
+% \begin{macrocode}
+\long\def\etb@carsquare#1#2#3\@nil{#1#2}
+% \end{macrocode}
+%
+%
+% \DescribePackage{xpatch} Patches macros with optional arguments.
+%
+% \begin{macrocode}
\RequirePackage{xpatch}
% \end{macrocode}
@@ -12902,7 +12969,7 @@ This boolean may be tested by the user for later use.
%
% \begin{macrocode}
\newcommand*{\LWR@loadafter}[1]{%
-\@ifpackageloaded{#1}
+\IfPackageLoadedTF{#1}
{
\PackageError{lwarp}
{%
@@ -12931,7 +12998,7 @@ This boolean may be tested by the user for later use.
%
% \changes{v0.45}{2017/12/03}{Added.}
% \begin{macrocode}
-\@ifclassloaded{memoir}
+\IfClassLoadedTF{memoir}
{\newcommand*{\LWR@notmemoirloadafter}[1]{}}
{\LetLtxMacro\LWR@notmemoirloadafter\LWR@loadafter}
% \end{macrocode}
@@ -12946,17 +13013,17 @@ This boolean may be tested by the user for later use.
% \begin{macrocode}
\LetLtxMacro\LWR@notltjloadafter\LWR@loadafter
-\@ifclassloaded{ltjarticle}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{}
-\@ifclassloaded{ltjbook}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{}
-\@ifclassloaded{ltjreport}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{}
-\@ifclassloaded{ltjsarticle}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{}
-\@ifclassloaded{ltjsbook}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{}
-\@ifclassloaded{ltjsreport}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{}
-\@ifclassloaded{ltjspf}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{}
-\@ifclassloaded{ltjskiyou}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{}
-\@ifclassloaded{ltjtarticle}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{}
-\@ifclassloaded{ltjtbook}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{}
-\@ifclassloaded{ltjtreport}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{}
+\IfClassLoadedTF{ltjarticle}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{}
+\IfClassLoadedTF{ltjbook}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{}
+\IfClassLoadedTF{ltjreport}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{}
+\IfClassLoadedTF{ltjsarticle}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{}
+\IfClassLoadedTF{ltjsbook}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{}
+\IfClassLoadedTF{ltjsreport}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{}
+\IfClassLoadedTF{ltjspf}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{}
+\IfClassLoadedTF{ltjskiyou}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{}
+\IfClassLoadedTF{ltjtarticle}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{}
+\IfClassLoadedTF{ltjtbook}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{}
+\IfClassLoadedTF{ltjtreport}{\renewcommand*{\LWR@notltjloadafter}[1]{}}{}
% \end{macrocode}
% \end{macro}
@@ -12968,7 +13035,7 @@ This boolean may be tested by the user for later use.
%
% \begin{macrocode}
\newcommand*{\LWR@loadbefore}[1]{%
-\@ifpackageloaded{#1}
+\IfPackageLoadedTF{#1}
{\relax}
{
\PackageError{lwarp}
@@ -13065,7 +13132,7 @@ This boolean may be tested by the user for later use.
%
% \begin{macrocode}
\newcommand*{\LWR@earlyloadnever}[2]{%
- \@ifpackageloaded{#1}{%
+ \IfPackageLoadedTF{#1}{%
\LWR@loadnever{#1}{#2}%
}{}%
}
@@ -13083,7 +13150,7 @@ This boolean may be tested by the user for later use.
%
% \begin{macrocode}
\newcommand*{\LWR@earlyclassloadnever}[2]{%
-\@ifclassloaded{#1}{%
+\IfClassLoadedTF{#1}{%
\PackageError{lwarp}
{%
Class #1 is not supported\MessageBreak
@@ -13164,7 +13231,7 @@ This boolean may be tested by the user for later use.
\LWR@checkloadnever{libgreek}{libertinust1math, newtx}
\LWR@checkloadnever{newthm}{ntheorem}
\LWR@checkloadnever{pdfcprot}{microtype}
-\LWR@checkloadnever{picins}{floatflt, wrapfig}
+\LWR@checkloadnever{picins}{floatflt, wrapfig, wrapfig2}
\LWR@checkloadnever{rplain}{fancyhdr}
\LWR@checkloadnever{si}{siunitx}
\LWR@checkloadnever{sistyle}{siunitx}
@@ -13187,7 +13254,12 @@ This boolean may be tested by the user for later use.
\LWR@checkloadnever{arraycols}{}
\LWR@checkloadnever{bidi}{}
\LWR@checkloadnever{cals}{}
-\LWR@checkloadnever{cellspace}{}
+% \end{macrocode}
+% \changes{v0.903}{2022/01/06}{Alternative for \pkg{cellspace}.}
+% \begin{macrocode}
+\LWR@checkloadnever{cellspace}{tabls}
+% \end{macrocode}
+% \begin{macrocode}
\LWR@checkloadnever{cgloss4e}{}
\LWR@checkloadnever{collcell}{}
\LWR@checkloadnever{colophon}{}
@@ -13285,7 +13357,7 @@ This boolean may be tested by the user for later use.
%
% The older \pkg{CJK} and \pkg{CJKutf8} only work with \pkg{xeCJK}:
% \begin{macrocode}
-\@ifpackageloaded{xeCJK}{}{
+\IfPackageLoadedTF{xeCJK}{}{
\LWR@checkloadnever{CJK}{ctex, xeCJK}
\LWR@checkloadnever{CJKutf8}{ctex, xeCJK}
}
@@ -13764,6 +13836,7 @@ This boolean may be tested by the user for later use.
\LWR@loadafter{shadow}
\LWR@loadafter{shapepar}
\LWR@notmemoirloadafter{showidx}
+\LWR@loadafter{showlabels}
\LWR@loadafter{showkeys}
\LWR@loadafter{showtags}
\LWR@loadafter{shuffle}
@@ -13881,6 +13954,7 @@ This boolean may be tested by the user for later use.
\LWR@loadafter{widows-and-orphans}
\LWR@loadafter{witharrows}
\LWR@loadafter{wrapfig}
+\LWR@loadafter{wrapfig2}
\LWR@loadafter{xbmks}
\LWR@loadafter{xcolor}
\LWR@loadafter{xechangebar}
@@ -13966,8 +14040,8 @@ This boolean may be tested by the user for later use.
\newcommand*{\LWR@pdfencoding}{%
\RequirePackage[T1]{fontenc}
- \@ifpackageloaded{inputenc}{}{
- \@ifpackageloaded{inputenx}{}{
+ \IfPackageLoadedTF{inputenc}{}{
+ \IfPackageLoadedTF{inputenx}{}{
\RequirePackage[utf8]{inputenc}
}
}
@@ -14093,7 +14167,7 @@ This boolean may be tested by the user for later use.
% \begin{macrocode}
\ifxetexorluatex
\AtBeginDocument{
- \@ifpackageloaded{kpfonts}{
+ \IfPackageLoadedTF{kpfonts}{
\PackageError{lwarp}
{%
When using XeLaTeX or LuaLaTeX,\MessageBreak
@@ -14173,7 +14247,7 @@ This boolean may be tested by the user for later use.
% \end{macro}
-% \subsection{Patching}
+% \subsection{Patching macros}
% \begin{macro}{\LWR@patcherror} \marg{packagename} \marg{macroname}
%
@@ -14193,6 +14267,35 @@ This boolean may be tested by the user for later use.
% \end{macro}
%
%
+% \subsection{Copying macros}
+%
+% \begin{macro}{\csNewCommandCopycs} \marg{dest csname} \marg{source csname}
+%
+% Given a cs-name for each, copies a macro to a new definition.
+%
+% \changes{v0.903}{2021/12/21}{Added.}
+% \begin{macrocode}
+\providecommand*{\csNewCommandCopycs}[2]{%
+ \expandafter\NewCommandCopy\csname#1\expandafter\endcsname%
+ \csname#2\endcsname%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\NewEnvironmentCopy} \marg{dest} \marg{source}
+%
+% Copies an environment to a new definition.
+%
+% \changes{v0.903}{2021/12/21}{Added.}
+% \begin{macrocode}
+\providecommand*{\NewEnvironmentCopy}[2]{%
+ \csNewCommandCopycs{#1}{#2}%
+ \csNewCommandCopycs{end#1}{end#2}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
% \subsection{Chinese text isolation}
%
% \begin{macro}{\LWR@isolate} \marg{text}
@@ -14206,11 +14309,11 @@ This boolean may be tested by the user for later use.
% \begin{macrocode}
\newcommand{\LWR@isolate}[1]{#1}%
-\@ifpackageloaded{ctexpatch}{
+\IfPackageLoadedTF{ctexpatch}{
\renewcommand{\LWR@isolate}[1]{\null#1\null}%
}{}
-\@ifpackageloaded{xeCJK}{
+\IfPackageLoadedTF{xeCJK}{
\renewcommand{\LWR@isolate}[1]{\null#1\null}%
}{}
% \end{macrocode}
@@ -15384,7 +15487,7 @@ This boolean may be tested by the user for later use.
% \changes{v0.50}{2018/02/24}{Fix: Load \pkg{fontspec} if necessary.}
% \begin{macrocode}
\ifxetexorluatex
-\@ifpackageloaded{fontspec}{}{
+\IfPackageLoadedTF{fontspec}{}{
\usepackage[no-math]{fontspec}
}
% \end{macrocode}
@@ -15459,7 +15562,7 @@ This boolean may be tested by the user for later use.
% \LaTeX{} dash and quote ligatures, which may fail on older browers
% but at least won't corrupt written words.
% \begin{macrocode}
-\RequirePackage {microtype}
+\RequirePackage{microtype}
\microtypesetup{
protrusion=false,
@@ -15560,7 +15663,7 @@ This boolean may be tested by the user for later use.
% These will be replaced by \pkg{lwarp} \cs{AtBeginDocument}
% with a very large page size to reduce \HTML\ tag overflow off the page.
% \begin{macrocode}
-\@ifpackageloaded{geometry}
+\IfPackageLoadedTF{geometry}
{}{
\RequirePackage[
reset,
@@ -15763,18 +15866,8 @@ This boolean may be tested by the user for later use.
% Used to emulate \cs{nameref}.
% \begin{macrocode}
\RequirePackage{gettitlestring}
-% \end{macrocode}
-% \DescribePackage{everyhook}
-%
-% \pkg{everyhook} is used to patch paragraph handling.
-%
-% \changes{v0.63}{2018/11/29}{\pkg{everyhook}: Fix for \pkg{bxjs*} classes.}
-% \begin{macrocode}
-\@ifundefined{bxjs@everypar}{}{\let\everypar\bxjs@everypar}
-
-\RequirePackage{everyhook}
\end{warpHTML}
% \end{macrocode}
@@ -15804,7 +15897,7 @@ This boolean may be tested by the user for later use.
\LetLtxMacro\LWR@orig@filec@ntents\filec@ntents
- \@ifpackagelater{filecontents}{2011/10/08}
+ \IfPackageAtLeastTF{filecontents}{2011/10/08}
{
% \end{macrocode}
% For a newer version of the \pkg{filecontents} package, simply
@@ -16288,7 +16381,7 @@ This boolean may be tested by the user for later use.
% if a package has already been loaded, it is loaded again with its original options.
% \changes{v0.79}{2019/12/31}{Fix: \pkg{catoptions}.}
% \begin{macrocode}
- \@ifpackageloaded{#1}{%
+ \IfPackageLoadedTF{#1}{%
\edef\LWR@tempone{\csuse{opt@#1.sty}}%
\IfValueTF{#2}%
{%
@@ -16624,11 +16717,17 @@ This boolean may be tested by the user for later use.
% \section{Defining print and \HTML\ versions of macros and environments}
% \label{sec:definingprinthtml}
-% \gindex{print>selecting print/HTML definitions}
-% \gindex{HTML>selecting print/HTML definitions}
+% \gindex{print>defining print \Slash HTML macros \Slash envs}
+% \gindex{HTML>defining print \Slash HTML macros \Slash envs}
+% \gindex{LWR@formatted=\cs{LWR@formatted} print \Slash HTML}
+% \gindex{defining print \Slash HTML macros \Slash envs}
+%
+% \changes{v0.903}{2021/12/19}{Docs: Now using \cs{NewCommandCopy}, \pkg{xparse} OK.}
%
-% The following refers to defining objects inside \pkg{lwarp}, and is not
-% for the user's document.
+% The following refers to defining objects inside \pkg{lwarp},
+% and may also be of some use for package authors to adapt their
+% packages for \pkg{lwarp}.
+% The following is not for the user's document.
%
% Many macros and environments must be provided as both print and \HTML\ versions.
%
@@ -16648,97 +16747,51 @@ This boolean may be tested by the user for later use.
%
% \begin{description}
%
-% \item[For a preexisting macro, not defined with \pkg{xparse}:] An \HTML\ version
+% \item[For a preexisting macro:] An \HTML\ version
% is provided with a special name, inside a \env{warpHTML} environment,
% then \cs{LWR@formatted} is used to redefine and patch various macros:
% \needspace{5\baselineskip}
% \begin{sourceverb}
% \begin{warpHTML}
-% \newcommand{\LWR@HTML@name}{...}% may also use xparse
+% \newcommand{\LWR@HTML@name}{...}
%
% \LWR@formatted{name}
% \end{warpHTML}
% \end{sourceverb}
-% |\LWR@formatted{name}| copies the original print version,
+% |\LWR@formatted{name}| copies the original print version to a new
+% name \cs{LWR@print@<name>},
% then redefines \cs{name} to use either the print or \HTML\ version depending
-% on which mode \pkg{lwarp} is using. \pkg{xparse} may be used to
-% define the new \HTML\ version, even if the original did not use \pkg{xparse}.
-% \pkg{expl3} syntax may be used as well.
+% on which mode \pkg{lwarp} is using.
-% \item[For a preexisiting environment, not defined with \pkg{xparse}:] The process
+% \item[For a preexisiting environment:] The process
% is similar. Note the use of \cs{LWR@formattedenv} instead of \cs{LWR@formatted}.
% \needspace{5\baselineskip}
% \begin{sourceverb}
% \begin{warpHTML}
-% \newenvironment{LWR@HTML@name}{...}% may also use xparse
+% \newenvironment{LWR@HTML@name}{...}{..}
%
% \LWR@formattedenv{name}
% \end{warpHTML}
% \end{sourceverb}
-% \item[If the original used \pkg{xparse}:] A copy must be made using a new name:
-% \needspace{7\baselineskip}
-% \begin{sourceverb}
-% \begin{warpHTML}
-% \NewDocumentCommand{\LWR@print@name}{..}{..}% copy the original
-%
-% \NewDocumentCommand{\LWR@HTML@name}{..}{..}% or use \newcommand
-%
-% \LWR@formatted{name}
-% \end{warpHTML}
-% \end{sourceverb}
-% Similar for an environment, using \cs{LWR@formattedenv}.
-% (\cs{LWR@formatted} and \cs{LWR@formattedenv} use \cs{LetLtxMacro} to
-% copy the original print definiton,
-% which may not work with macros and environments created by \pkg{xparse},
-% so the print version must be manually recreated in the \pkg{lwarp} source.)
-
-% \item[For a new macro or environment, not using \pkg{xparse} for the print version:] \
+% \item[For a new macro or environment:] The print version is defined inside
+% \env{warpall}, so that it can also be seen and modified by during \HTML\ outut.
% \needspace{9\baselineskip}
% \begin{sourceverb}
% \begin{warpall}
-% \newcommand{\name}{...}% NOT xparse!
+% \newcommand{\name}{...}% The print version.
% \end{warpall}
%
% \begin{warpHTML}
-% \newcommand{\LWR@HTML@name}{...}% may use xparse for HTML
+% \newcommand{\LWR@HTML@name}{...}
%
% \LWR@formatted{name}
% \end{warpHTML}
% \end{sourceverb}
-% Similar for an environment.
-% The plain \cs{name} or environment \env{name} is used for the printed
-% version, and is placed inside \env{warpall}.
-% \pkg{xparse} may be used for the \cs{LWR@HTML@<name>} version.
-% \pkg{expl3} syntax may be used for the print and \HTML\ versions.
-%
-% \item [For a new macro or environment, using \pkg{xparse}:]
-% It is possible to use \pkg{xparse} for an entirely new macro or environment
-% by defining the \cs{LWR@print@<name>} version with \pkg{xparse}, along with
-% \cs{name} defined without \pkg{xparse} to refer directly to the \cs{LWR@print}
-% version:
-% \needspace{16\baselineskip}
-% \begin{sourceverb}
-% \begin{warpall}
-% \NewDocumentCommand{\LWR@print@name}{...} {...}% -or-
-% \NewDocumentEnvironment{\LWR@print@name}{...} {...} {...}
-%
-% % Simply a call to \LWR@print@name:
-% \newcommand{\name}{\LWR@print@name}% -or-
-% \newenvironment{name}{\LWR@print@name}{\endLWR@print@name}
-% \end{warpall}
-%
-% \begin{warpHTML}
-% \NewDocumentCommand{\LWR@HTML@name}{...} {...}% -or-
-% \NewDocumentEnvironment{\LWR@HTML@name}{...} {...} {...}
-%
-% \LWR@formatted{name}% -or-
-% \LWR@formattedenv{name}
-% \end{warpHTML}
-% \end{sourceverb}
+% Similar for an environment, using \cs{formattedenv}.
%
% \end{description}
-%
+
% In general, \cs{LWR@formatted} or \cs{LWR@formattedenv} are placed inside
% a \env{warpHTML} environment, and while producing an \HTML\ document
% they do the following:
@@ -16755,16 +16808,16 @@ This boolean may be tested by the user for later use.
% used, as well as any new definitions defined in \env{warpall} above.
% \item When \pkg{lwarp} is generating \HTML\ output, \cs{LWR@formatting} is
% set to ``|HTML|'', and \cs{name} is directed to \cs{LWR@HTML@<name>}.
+% For an environment, \cs{endname} is directed to \cs{endLWR@HTML@<name>}.
% \item When \pkg{lwarp} is generating \HTML\ output
% but enters a \env{lateximage} environment,
% or for some other reason needs to draw images using the original print
% defintions, \cs{LWR@formatting} is changed to ``|print|'' and \cs{name} is
% then redirected to \cs{LWR@print@<name>}, which was the original \cs{name}.
+% \item Since the new \cs{name} does not process any arguments,
+% they are processed by \cs{LWR@print@name} or \cs{LWR@HTML@name}.
% \end{itemize}
%
-% Since arguments are not handled by the new \cs{name}, any star and other arguments
-% are processed by the print or \HTML\ version.
-%
% Expandable versions are also provided as well.
% These usually are necessary for anything which could appear inside a \env{tabular},
% without which a ``|Misplaced \omit|'' error may occur.
@@ -16861,12 +16914,12 @@ This boolean may be tested by the user for later use.
% where <format> is set by \cs{LWR@formatting}, and is |print| or |HTML|.
%
% \changes{v0.893}{2020/11/15}{Improved error handling.}
+% \changes{v0.903}{2021/12/19}{Now using \cs{NewCommandCopy}.}
% \begin{macrocode}
\newcommand*{\LWR@formatted}[1]{%
\LWR@formatted@checkname{#1}%
\ifcsundef{LWR@print@#1}{%
- \expandafter\LetLtxMacro\csname LWR@print@#1\expandafter\endcsname%
- \csname#1\endcsname%
+ \csNewCommandCopycs{LWR@print@#1}{#1}%
}{}%
\ifcsundef{#1}{%
\expandafter\newrobustcmd\csname #1\endcsname{%
@@ -16888,12 +16941,12 @@ This boolean may be tested by the user for later use.
% An expandable version of \cs{LWR@formatted}.
%
% \changes{v0.893}{2020/11/15}{Improved error handling.}
+% \changes{v0.903}{2021/12/19}{Now using \cs{NewCommandCopy}.}
% \begin{macrocode}
\newcommand*{\LWR@expandableformatted}[1]{%
\LWR@formatted@checkname{#1}%
\ifcsundef{LWR@print@#1}{%
- \expandafter\LetLtxMacro\csname LWR@print@#1\expandafter\endcsname%
- \csname#1\endcsname%
+ \csNewCommandCopycs{LWR@print@#1}{#1}%
}{}%
\ifcsundef{#1}{%
\expandafter\newcommand\csname #1\endcsname{%
@@ -16917,14 +16970,13 @@ This boolean may be tested by the user for later use.
% where <format> is set by \cs{LWR@formatting}, and is |print| or |HTML|.
%
% \changes{v0.893}{2020/11/15}{Improved error handling.}
+% \changes{v0.903}{2021/12/19}{Now using \cs{NewCommandCopy}.}
% \begin{macrocode}
\newcommand*{\LWR@formattedenv}[1]{%
\LWR@formatted@checkname{#1}%
\LWR@formatted@checkendname{#1}%
\ifcsundef{LWR@print@#1}{%
- \expandafter\LetLtxMacro\csname LWR@print@#1\expandafter\endcsname%
- \csname#1\endcsname%
- \csletcs{endLWR@print@#1}{end#1}%
+ \NewEnvironmentCopy{LWR@print@#1}{#1}%
}{}%
\DeclareDocumentEnvironment{#1}{}%
{%
@@ -16943,14 +16995,13 @@ This boolean may be tested by the user for later use.
% An expandable version of \env{LWR@formattedenv}.
%
% \changes{v0.893}{2020/11/15}{Improved error handling.}
+% \changes{v0.903}{2021/12/19}{Now using \cs{NewCommandCopy}.}
% \begin{macrocode}
\newcommand*{\LWR@expandableformattedenv}[1]{%
\LWR@formatted@checkname{#1}%
\LWR@formatted@checkendname{#1}%
\ifcsundef{LWR@print@#1}{%
- \expandafter\LetLtxMacro\csname LWR@print@#1\expandafter\endcsname%
- \csname#1\endcsname%
- \csletcs{endLWR@print@#1}{end#1}%
+ \NewEnvironmentCopy{LWR@print@#1}{#1}%
}{}%
\DeclareExpandableDocumentEnvironment{#1}{}%
{%
@@ -17236,7 +17287,7 @@ This boolean may be tested by the user for later use.
\LetLtxMacro\LWR@orig@textquotedbl\LWR@orig@@textquotedbl
\AtEndPreamble{
-\@ifpackageloaded{libertinus-otf}{
+\IfPackageLoadedTF{libertinus-otf}{
\renewcommand{\LWR@orig@textquotedbl}{\LWR@orig@@textquotedbl\kern-.15em}
\LetLtxMacro\textquotedbl\LWR@orig@textquotedbl
}{}
@@ -17764,16 +17815,17 @@ This boolean may be tested by the user for later use.
}{% dvips
% \end{macrocode}
% For \DVI\ \prog{latex} with \prog{dvips} and \prog{ps2pdf}:
+% \changes{v0.903}{2021/10/04}{Allow transparency.}
% \begin{macrocode}
\def\LWR@tempprintlatexcmd{%
\LWR@compilecmd{latex}{}
\LWR@addcompilecmd{dvips}{}
- \LWR@addcompilecmd{ps2pdf}{}.ps
+ \LWR@addcompilecmd{ps2pdf -dALLOWPSTRANSPARENCY}{}.ps
}
\def\LWR@tempHTMLlatexcmd{%
\LWR@compilecmd{latex}{_html}
\LWR@addcompilecmd{dvips}{_html}
- \LWR@addcompilecmd{ps2pdf}{_html}.ps
+ \LWR@addcompilecmd{ps2pdf -dALLOWPSTRANSPARENCY}{_html}.ps
}
}
}
@@ -17785,12 +17837,12 @@ This boolean may be tested by the user for later use.
% \changes{v0.63}{2018/11/25}{\pkg{ujarticle} and related: Compile options.}
% \changes{v0.64}{2018/12/07}{\pkg{utarticle} and related: Added.}
% \begin{macrocode}
-\@ifclassloaded{ujarticle}{\LWR@compileuplatex}{}
-\@ifclassloaded{ujbook}{\LWR@compileuplatex}{}
-\@ifclassloaded{ujreport}{\LWR@compileuplatex}{}
-\@ifclassloaded{utarticle}{\LWR@compileuplatex}{}
-\@ifclassloaded{utbook}{\LWR@compileuplatex}{}
-\@ifclassloaded{utreport}{\LWR@compileuplatex}{}
+\IfClassLoadedTF{ujarticle}{\LWR@compileuplatex}{}
+\IfClassLoadedTF{ujbook}{\LWR@compileuplatex}{}
+\IfClassLoadedTF{ujreport}{\LWR@compileuplatex}{}
+\IfClassLoadedTF{utarticle}{\LWR@compileuplatex}{}
+\IfClassLoadedTF{utbook}{\LWR@compileuplatex}{}
+\IfClassLoadedTF{utreport}{\LWR@compileuplatex}{}
% \end{macrocode}
% Only make the setting permanent if the original was empty:
% \changes{v0.61}{2018/09/20}{Added \optn{PrintLatexCmd} option.}
@@ -17969,6 +18021,7 @@ This boolean may be tested by the user for later use.
% \changes{v0.902}{2021/09/15}{\filenm{lwarp.css}: Centered \element{div} \attribute{author}.}
% \changes{v0.902}{2021/09/15}{\filenm{lwarp.css}: Added \pkg{beamerarticle}.}
% \changes{v0.902}{2021/09/28}{\filenm{lwarp.css}: Added \attribute{textnormal}.}
+% \changes{v0.903}{2022/01/02}{\filenm{lwarp.css}: Improved pars in lists.}
%
% ^^A *lwarp.css
%
@@ -17978,7 +18031,7 @@ This boolean may be tested by the user for later use.
\begin{filecontents*}[overwrite]{lwarp.css}
/*
CSS stylesheet for the LaTeX Lwarp package
- Copyright 2016-2021 Brian Dunn — BD Tech Concepts LLC
+ Copyright 2016-2022 Brian Dunn — BD Tech Concepts LLC
*/
@@ -18490,7 +18543,7 @@ div.bodywithoutsidetoc main.bodycontainer {
}
section.textbody div.footnotes{
- margin: 3ex 2em .5ex 2em ;
+ margin: 1ex 2em 2ex 2em ;
border-bottom: 2px solid silver ;
}
@@ -18527,6 +18580,8 @@ body dir, body menu {
li { margin: 0ex 0em 1ex 0em; }
+li.p { display: inline ; }
+
html {
margin: 0;
padding: 0;
@@ -20807,6 +20862,7 @@ MathJax = {
% \changes{v0.84}{2020/03/30}{\prog{lwarpmk}: \optn{clean} also removes \filenm{comment_*.cut}}
% \changes{v0.89}{2020/08/29}{\prog{lwarpmk}: \optn{clean} also removes \filenm{*.bbl}}
% \changes{v0.899}{2021/05/30}{\prog{lwarpmk}: Warn if \pkg{lwarp} package not detected.}
+% \changes{v0.903}{2021/11/30}{\prog{lwarpmk}: Error if \prog{pdftotext} not available.}
%
% The following is only generated if the \optn{lwarpmk} option
% was given to \pkg{lwarp}.
@@ -20819,10 +20875,10 @@ MathJax = {
\begin{filecontents*}[overwrite]{lwarpmk.lua}
#!/usr/bin/env texlua
--- Copyright 2016-2021 Brian Dunn
+-- Copyright 2016-2022 Brian Dunn
-printversion = "v0.902"
+printversion = "v0.903"
requiredconfversion = "2" -- also at *lwarpmk.conf
function printhelp ()
@@ -21219,8 +21275,15 @@ function pdftohtml ()
-- Convert to text:
print ("lwarpmk: Converting " .. sourcename
.."_html.pdf to " .. sourcename .. "_html.html")
-os.execute("pdftotext -enc " .. pdftotextenc .. " -nopgbrk -layout "
+err = os.execute("pdftotext -enc " .. pdftotextenc .. " -nopgbrk -layout "
.. sourcename .. "_html.pdf " .. sourcename .. "_html.html")
+if ( err ~= 0 ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: Ensure that the Poppler utilities are installed." )
+ print ("lwarpmk: See the Lwarp manual: `Installing additional utilities'." )
+ print ("lwarpmk: ===")
+ os.exit(1)
+end
-- Split the result into individual HTML files:
splitfile (homehtmlfilename .. ".html" , sourcename .. "_html.html")
end
@@ -22079,15 +22142,40 @@ end -- not --version
% \begin{macro}{\LWR@setexparray} \marg{name} \marg{index} \marg{contents}
% \changes{v0.66}{2018/12/31}{Fix with \cs{par}.}
% \changes{v0.79}{2020/01/18}{Fix: Nested \env{tabular}s.}
+% \changes{v0.903}{2021/12/17}{Par handling.}
% \begin{macrocode}
+\newbool{LWR@setexparray@doingparhooks}
+
\NewDocumentCommand{\LWR@setexparray}{m m m}{%
- \let\LWR@temp@par\par%
+% \end{macrocode}
+%
+% Temporarily disable paragraph handling during the assignment.
+% This is not done in a group with global assignments because
+% a table may be nested.
+% \begin{macrocode}
+ \let\ifLWR@setexparray@doingparhooks\ifLWR@doingparhooks%
+ \setbool{LWR@doingparhooks}{false}%
+ \let\LWR@setexparray@par\par%
\let\par\relax%
- \edef\LWR@thisexparrayname{#1#2}%
+% \end{macrocode}
+%
+% The name of the control sequence is the given name with the
+% index appended.
+% \begin{macrocode}
+ \xdef\LWR@thisexparrayname{#1#2}%
+% \end{macrocode}
+%
+% Locally assign the value to the control sequence:
+% \begin{macrocode}
\ifstrempty{#3}%
{\csdef{\LWR@thisexparrayname}{}}%
{\csedef{\LWR@thisexparrayname}{#3}}%
- \let\par\LWR@temp@par%
+% \end{macrocode}
+%
+% Restore the paragraph handling:
+% \begin{macrocode}
+ \let\ifLWR@doingparhooks\ifLWR@setexparray@doingparhooks%
+ \let\par\LWR@setexparray@par%
}
% \end{macrocode}
% \end{macro}
@@ -23012,6 +23100,7 @@ end -- not --version
% \subsection{Hook while processing tags}
%
+% \DescribeHook[lwarp]{\cs{LWR@hook@processingtags}}
% This is used to disable special text processing while processing \HTML\ tags.
% Special processing includes that done by
% \pkg{babel-french}, \pkg{luavina}, \pkg{xevlna}.
@@ -23197,60 +23286,60 @@ end -- not --version
% \changes{v0.84}{2020/04/22}{Nullified \env{minipage}, \cs{parbox} inside a span.}
% \changes{v0.84}{2020/04/22}{Issue warnings inside a span.}
% \changes{v0.896}{2021/03/05}{Issue \env{BlockClassWP} warning inside a span.}
+% \changes{v0.903}{2021/12/17}{Par handling.}
%
% \begin{macrocode}
\newcommand*{\LWR@nestspanitem}{%
- \if@newlist\else{\LWR@htmltagc{br /}}\fi%
+ \if@newlist\else{
+ \LWR@htmltagc{br /}%
+ \LWR@orignewline%
+ }\fi%
\LWR@origitem%
}
\newenvironment*{LWR@nestspan}
{%
-\LWR@traceinfo{LWR@nestspan starting}%
-\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
-{%
- \LWR@traceinfo{LWR@nestspan: inside a lateximage}%
-}%
-{% not in a lateximage
- \LWR@traceinfo{LWR@nestspan: NOT inside a lateximage}%
- \addtocounter{LWR@spandepth}{1}%
+ \LWR@traceinfo{LWR@nestspan starting}%
+ \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
+ {%
+ \LWR@traceinfo{LWR@nestspan: inside a lateximage}%
+ }%
+ {% not in a lateximage
+ \LWR@traceinfo{LWR@nestspan: NOT inside a lateximage}%
+ \addtocounter{LWR@spandepth}{1}%
% \end{macrocode}
% Nullify several objects inside the span:
% ^^A {\LWR@subhtmlelementclass{span}{inlineminipage}}%
% ^^A {\LWR@htmltagc{/span}}%
% \begin{macrocode}
- \RenewDocumentEnvironment{minipage}{O{t} o O{t} m}%
- {\LWR@spanwarnformat{minipage or \protect\parbox}}%
- {}%
- \RenewDocumentEnvironment{BlockClass}{o m}%
- {\LWR@spanwarnformat{multi-paragraph object}}%
- {}%
- \RenewDocumentEnvironment{LWR@BlockClassWP}{m m D(){} m}%
- {\LWR@spanwarnformat{multi-paragraph object}}%
- {}%
- \renewcommand{\BlockClassSingle}[2]{%
- {\LWR@spanwarnformat{multi-paragraph object}}%
- ##2%
- }%
- \renewcommand{\LWR@forcenewpage}{}%
- \renewcommand{\LWR@liststart}{%
- \LetLtxMacro\item\LWR@nestspanitem%
- }%
- \renewcommand{\LWR@listend}{\LWR@htmltagc{br /}\LWR@htmltagc{br /}}%
- \renewenvironment{quote}{\LWR@htmltagc{br /}}{\LWR@htmltagc{br /}}%
- \renewenvironment{quotation}{\LWR@htmltagc{br /}}{\LWR@htmltagc{br /}}%
-}% not in a lateximage
-\LWR@traceinfo{LWR@nestspan starting: done}%
+ \RenewDocumentEnvironment{minipage}{O{t} o O{t} m}%
+ {\LWR@spanwarnformat{minipage or \protect\parbox}}%
+ {}%
+ \RenewDocumentEnvironment{BlockClass}{o m}%
+ {\LWR@spanwarnformat{multi-paragraph object}}%
+ {}%
+ \RenewDocumentEnvironment{LWR@BlockClassWP}{m m D(){} m}%
+ {\LWR@spanwarnformat{multi-paragraph object}}%
+ {}%
+ \renewcommand{\BlockClassSingle}[2]{%
+ {\LWR@spanwarnformat{multi-paragraph object}}%
+ ##2%
+ }%
+ \renewcommand{\LWR@forcenewpage}{}%
+ \renewcommand{\LWR@liststart}{\LetLtxMacro\item\LWR@nestspanitem}%
+ \renewcommand{\LWR@listend}{\leavevmode}%
+ \renewenvironment{quote}{\LWR@htmltagc{br /}}{\LWR@htmltagc{br /}}%
+ \renewenvironment{quotation}{\LWR@htmltagc{br /}}{\LWR@htmltagc{br /}}%
+ }% not in a lateximage
+ \LWR@traceinfo{LWR@nestspan starting: done}%
}% starting env
{% ending env
-\LWR@traceinfo{LWR@nestspan ending}%
-\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
-{}%
-{\addtocounter{LWR@spandepth}{-1}}%
-\LWR@traceinfo{LWR@nestspan ending: done}%
+ \LWR@traceinfo{LWR@nestspan ending}%
+ \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
+ {}%
+ {\addtocounter{LWR@spandepth}{-1}}%
+ \LWR@traceinfo{LWR@nestspan ending: done}%
}
-
-\AfterEndEnvironment{LWR@nestspan}{\global\let\par\LWR@closeparagraph}
% \end{macrocode}
% \end{environment}
@@ -23265,12 +23354,12 @@ end -- not --version
%
% \begin{macrocode}
\NewDocumentCommand{\LWR@htmlspan}{m +m}{%
-\LWR@ensuredoingapar%
-\LWR@htmltagc{#1}%
-\begin{LWR@nestspan}%
-#2%
-\LWR@htmltagc{/#1}%
-\end{LWR@nestspan}%
+ \LWR@ensuredoingapar%
+ \LWR@htmltagc{#1}%
+ \begin{LWR@nestspan}%
+ #2%
+ \LWR@htmltagc{/#1}%
+ \end{LWR@nestspan}%
}
% \end{macrocode}
% \end{macro}
@@ -23303,9 +23392,7 @@ end -- not --version
% Print an \HTML\ tag: \textless{}tag\textgreater{}
% \begin{macrocode}
\newcommand*{\LWR@htmltag}[1]{%
-% \LWR@traceinfo{LWR@htmltagb !\detokenize{#1}!}%
-\LWR@htmltagc{#1}%
-% \LWR@traceinfo{LWR@htmltagb: done}%
+ \LWR@htmltagc{#1}%
}
% \end{macrocode}
% \end{macro}
@@ -23321,25 +23408,21 @@ end -- not --version
% \changes{v0.85}{2020/04/29}{Fix: Added print macros for \pkg{fontspec}.}
% \begin{macrocode}
\newcommand*{\LWR@htmlopencomment}{%
-{%
% \LWR@traceinfo{LWR@htmlopencomment}%
-\begingroup%
-\LWR@hook@processingtags%
-\ifmmode\else\protect\LWR@print@normalfont\protect\LWR@origttfamily\fi%
-\LWR@print@mbox{\LWR@origtextless{}!-\/-}%
-\endgroup%
-}%
+ \begingroup%
+ \LWR@hook@processingtags%
+ \ifmmode\else\protect\LWR@print@normalfont\protect\LWR@origttfamily\fi%
+ \LWR@print@mbox{\LWR@origtextless{}!-\/-}%
+ \endgroup%
}
\newcommand*{\LWR@htmlclosecomment}{%
-{%
% \LWR@traceinfo{LWR@htmlclosecomment}%
-\begingroup%
-\LWR@hook@processingtags%
-\ifmmode\else\protect\LWR@print@normalfont\protect\LWR@origttfamily\fi%
-\LWR@print@mbox{-\/-\LWR@origtextgreater}%
-\endgroup%
-}%
+ \begingroup%
+ \LWR@hook@processingtags%
+ \ifmmode\else\protect\LWR@print@normalfont\protect\LWR@origttfamily\fi%
+ \LWR@print@mbox{-\/-\LWR@origtextgreater}%
+ \endgroup%
}
% \end{macrocode}
% \end{macro}
@@ -23352,16 +23435,16 @@ end -- not --version
% \changes{v0.893}{2020/10/16}{Disabled in math mode.}
% \begin{macrocode}
\newcommand{\LWR@htmlcomment}[1]{%
-\ifmmode%
-\else%
- \LWR@htmlopencomment{}%
- {%
- \LWR@print@normalfont%
- \LWR@origttfamily% break ligatures
- #1%
- }%
- \LWR@htmlclosecomment{}%
-\fi%
+ \ifmmode%
+ \else%
+ \LWR@htmlopencomment{}%
+ {%
+ \LWR@print@normalfont%
+ \LWR@origttfamily% break ligatures
+ #1%
+ }%
+ \LWR@htmlclosecomment{}%
+ \fi%
}
% \end{macrocode}
% \end{macro}
@@ -23370,16 +23453,16 @@ end -- not --version
% \begin{macro}{\LWR@htmlblockcomment} \marg{comment}
% \begin{macrocode}
\newcommand{\LWR@htmlblockcomment}[1]
-{\LWR@stoppars\LWR@htmlcomment{#1}\LWR@startpars}
+ {\LWR@stoppars\LWR@htmlcomment{#1}\LWR@startpars}
% \end{macrocode}
% \end{macro}
% \begin{macro}{\LWR@htmlblocktag} \marg{tag} print a stand-alone \HTML\ tag
% \begin{macrocode}
\newcommand*{\LWR@htmlblocktag}[1]{%
-\LWR@stoppars%
-\LWR@htmltag{#1}%
-\LWR@startpars%
+ \LWR@stoppars%
+ \LWR@htmltag{#1}%
+ \LWR@startpars%
}
% \end{macrocode}
% \end{macro}
@@ -23408,24 +23491,24 @@ end -- not --version
%
% \begin{macrocode}
\NewDocumentCommand{\LWR@subhtmlelementclass}{m O{} D(){} m}{%
-\LWR@traceinfo{LWR@subhtmlelementclass !#1!#2!#3!#4!}%
-\ifblank{#2}%
-{% empty style
- \LWR@htmltag{%
- #1%
- \ifblank{#3}{}{ role=\textquotedbl#3\textquotedbl}% spaces
- \ifblank{#4}{}{ class=\textquotedbl#4\textquotedbl}% spaces
+ \LWR@traceinfo{LWR@subhtmlelementclass !#1!#2!#3!#4!}%
+ \ifblank{#2}%
+ {% empty style
+ \LWR@htmltag{%
+ #1%
+ \ifblank{#3}{}{ role=\textquotedbl#3\textquotedbl}% spaces
+ \ifblank{#4}{}{ class=\textquotedbl#4\textquotedbl}% spaces
+ }%
}%
-}%
-{% non-empty style
- \LWR@htmltag{%
- #1\LWR@indentHTML%
- \ifblank{#3}{}{role=\textquotedbl#3\textquotedbl\LWR@indentHTML}%
- \ifblank{#4}{}{class=\textquotedbl#4\textquotedbl\LWR@indentHTML}%
- style=\textquotedbl#2\textquotedbl\LWR@orignewline%
+ {% non-empty style
+ \LWR@htmltag{%
+ #1\LWR@indentHTML%
+ \ifblank{#3}{}{role=\textquotedbl#3\textquotedbl\LWR@indentHTML}%
+ \ifblank{#4}{}{class=\textquotedbl#4\textquotedbl\LWR@indentHTML}%
+ style=\textquotedbl#2\textquotedbl\LWR@orignewline%
+ }%
}%
-}%
-\LWR@traceinfo{LWR@subhtmlelementclass done}%
+ \LWR@traceinfo{LWR@subhtmlelementclass done}%
}
% \end{macrocode}
% \end{macro}
@@ -23497,12 +23580,12 @@ end -- not --version
% \changes{v0.73}{2019/06/26}{Vertical space.}
% \begin{macrocode}
\NewDocumentCommand{\LWR@htmlelementclassline}{m o m +m}{%
-\LWR@stoppars
-\LWR@forceemptyline%
-\LWR@subhtmlelementclass{#1}[#2]{#3}%
-#4%
-\LWR@htmltag{/#1}
-\LWR@startpars
+ \LWR@stoppars
+ \LWR@forceemptyline%
+ \LWR@subhtmlelementclass{#1}[#2]{#3}%
+ #4%
+ \LWR@htmltag{/#1}
+ \LWR@startpars
}
% \end{macrocode}
% \end{macro}
@@ -23516,7 +23599,7 @@ end -- not --version
% \begin{macro}{\LWR@htmlelement} \marg{element}
% \begin{macrocode}
\newcommand*{\LWR@htmlelement}[1]{%
-\LWR@htmlblocktag{#1}
+ \LWR@htmlblocktag{#1}
}
% \end{macrocode}
% \end{macro}
@@ -23524,9 +23607,9 @@ end -- not --version
% \begin{macro}{\LWR@htmlelementend} \marg{element}
% \begin{macrocode}
\newcommand*{\LWR@htmlelementend}[1]{%
-\LWR@stoppars
-\LWR@htmltag{/#1}
-\LWR@startpars
+ \LWR@stoppars
+ \LWR@htmltag{/#1}
+ \LWR@startpars
}
\end{warpHTML}
@@ -23558,12 +23641,13 @@ end -- not --version
% \changes{v0.34}{2017/08/02}{Moved optional argument in front of mandatory.}
% \changes{v0.57}{2018/05/28}{Improved print/\HTML\ output selection.}
% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.}
+% \changes{v0.903}{2021/12/19}{Now using \cs{NewCommandCopy}.}
%
-% \codeprint
+% \codeall
% \begin{macrocode}
-\begin{warpprint}
+\begin{warpall}
\NewDocumentEnvironment{BlockClass}{o D(){} m}{}{}
-\end{warpprint}
+\end{warpall}
% \end{macrocode}
% \end{environment}
%
@@ -23571,8 +23655,6 @@ end -- not --version
% \begin{macrocode}
\begin{warpHTML}
-\NewDocumentEnvironment{LWR@print@BlockClass}{o D(){} m}{}{}%
-
\NewDocumentEnvironment{LWR@HTML@BlockClass}{o D(){} m}%
{\LWR@htmldivclass[#1](#2){#3}}%
{\LWR@htmldivclassend{#3}}
@@ -23623,30 +23705,29 @@ end -- not --version
% \changes{v0.34}{2017/08/02}{Moved optional argument in front of mandatory.}
% \changes{v0.57}{2018/05/28}{Improved print/\HTML\ output selection.}
% \changes{v0.62}{2018/10/24}{Added optional word-processing style. Replaces \cs{LWR@HTMLtextstyle}.}
+% \changes{v0.903}{2021/12/19}{Now using \cs{NewCommandCopy}.}
%
-% \codeprint
+% \codeall
% \begin{macrocode}
-\begin{warpprint}
+\begin{warpall}
\NewDocumentCommand{\InlineClass}{D{(}{)}{} o m +m}{#4}%
-\end{warpprint}
+\end{warpall}
% \end{macrocode}
% \end{macro}
%
% \codehtml
% \begin{macrocode}
\begin{warpHTML}
-\NewDocumentCommand{\LWR@print@InlineClass}{D{(}{)}{} o m +m}{#4}%
-
\NewDocumentCommand{\LWR@HTML@InlineClass}{D{(}{)}{} o m +m}{%
-\LWR@traceinfo{LWR@HTML@InlineClass #3}%
-\ifbool{FormatWP}{%
- \LWR@traceinfo{LWR@HTML@InlineClass: FormatWP}%
- \LWR@htmlspanclass[#1]{#3}{#4}%
-}{%
- \LWR@traceinfo{LWR@HTML@InlineClass: not FormatWP}%
- \LWR@htmlspanclass[#2]{#3}{#4}%
-}%
-\LWR@traceinfo{LWR@HTML@InlineClass: done}%
+ \LWR@traceinfo{LWR@HTML@InlineClass #3}%
+ \ifbool{FormatWP}{%
+ \LWR@traceinfo{LWR@HTML@InlineClass: FormatWP}%
+ \LWR@htmlspanclass[#1]{#3}{#4}%
+ }{%
+ \LWR@traceinfo{LWR@HTML@InlineClass: not FormatWP}%
+ \LWR@htmlspanclass[#2]{#3}{#4}%
+ }%
+ \LWR@traceinfo{LWR@HTML@InlineClass: done}%
}
\LWR@formatted{InlineClass}
@@ -23667,48 +23748,47 @@ end -- not --version
% \changes{v0.57}{2018/05/28}{Improved print/\HTML\ output selection.}
% \changes{v0.63}{2018/11/24}{Fix for \pkg{xeCJK}.}
% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.}
+% \changes{v0.903}{2021/12/19}{Now using \cs{NewCommandCopy}.}
%
-% \codeprint
+% \codeall
% \begin{macrocode}
-\begin{warpprint}
+\begin{warpall}
\NewDocumentEnvironment{LWR@BlockClassWP}{m m D(){} m}{}{}
-\end{warpprint}
+\end{warpall}
% \end{macrocode}
% \end{environment}
%
% \codehtml
% \begin{macrocode}
\begin{warpHTML}
-\NewDocumentEnvironment{LWR@print@LWR@BlockClassWP}{m m D(){} m}{}{}%
-
\NewDocumentEnvironment{LWR@HTML@LWR@BlockClassWP}{m m D(){} m}%
-{%
-\LWR@stoppars%
-\ifbool{FormatWP}%
-{%
- \addtocounter{LWR@thisautoidWP}{1}%
+ {%
+ \LWR@stoppars%
+ \ifbool{FormatWP}%
+ {%
+ \addtocounter{LWR@thisautoidWP}{1}%
% \end{macrocode}
% \changes{v0.65}{2018/12/21}{Fix space between class and id.}
% \begin{macrocode}
- \LWR@htmltag{%
- div class=\textquotedbl#4\textquotedbl\ % space
- id=\textquotedbl%
- \LWR@print@mbox{autoidWP-\arabic{LWR@thisautoidWP}}%
- \textquotedbl%
- \ifblank{#3}{}{ role=\textquotedbl#3\textquotedbl}%
- \ifblank{#1}{}{ style=\textquotedbl#1\textquotedbl}%
- }%
-}% FormatWP
-{% not FormatWP
- \LWR@htmltag{%
- div class=\textquotedbl#4\textquotedbl%
- \ifblank{#3}{}{ role=\textquotedbl#3\textquotedbl}%
- \ifblank{#2}{}{ style=\textquotedbl#2\textquotedbl}%
- }%
-}% not FormatWP
-\LWR@startpars%
-}
-{\LWR@htmldivclassend{#4}}
+ \LWR@htmltag{%
+ div class=\textquotedbl#4\textquotedbl\ % space
+ id=\textquotedbl%
+ \LWR@print@mbox{autoidWP-\arabic{LWR@thisautoidWP}}%
+ \textquotedbl%
+ \ifblank{#3}{}{ role=\textquotedbl#3\textquotedbl}%
+ \ifblank{#1}{}{ style=\textquotedbl#1\textquotedbl}%
+ }%
+ }% FormatWP
+ {% not FormatWP
+ \LWR@htmltag{%
+ div class=\textquotedbl#4\textquotedbl%
+ \ifblank{#3}{}{ role=\textquotedbl#3\textquotedbl}%
+ \ifblank{#2}{}{ style=\textquotedbl#2\textquotedbl}%
+ }%
+ }% not FormatWP
+ \LWR@startpars%
+ }
+ {\LWR@htmldivclassend{#4}}
\LWR@formattedenv{LWR@BlockClassWP}
\end{warpHTML}
@@ -23775,14 +23855,16 @@ end -- not --version
% Paragraph tags are or are not allowed depending on many conditions.
% \Cref{sec:parstartstop} has high-level commands which allow
% paragraph-tag generation to start/stop.
-% Even when allowed (\cs{LWR@doingstartpars}),
+% Even when allowed (\bool{LWR@doingstartpars}),
% tags are not generated until a \LaTeX{} paragraph
-% is being used (\cs{LWR@doingapar}).
-% |LWR@lateximagedepth| is used to prevent nesting tags inside
-% a |lateximage|.
-% |LWR@spandepth| is used to prevent nesting paragraph tags inside
+% is being used (\bool{LWR@doingapar}).
+% \ctr{LWR@lateximagedepth} is used to prevent nesting tags inside
+% a \env{lateximage}.
+% \ctr{LWR@spandepth} is used to prevent nesting paragraph tags inside
% a paragraph, which became important inside \cs{fbox} commands and other spans.
-
+%
+% The \LaTeX\ paragraph hooks are used to manage tag creation.
+%
% \codehtml
% \begin{macrocode}
\begin{warpHTML}
@@ -23797,6 +23879,31 @@ end -- not --version
% \end{macrocode}
+% \DescribeBoolean{LWR@doingparhooks}
+% Tells whether the \pkg{lwarp} paragraph hooks are to be active.
+% \begin{macrocode}
+\newbool{LWR@doingparhooks}
+\boolfalse{LWR@doingparhooks}
+% \end{macrocode}
+
+% \DescribeBoolean{LWR@in@multirow@par}
+% Tells whether to generate break instead of paragraph tags inside a \cs{multirow}.
+% \changes{v0.903}{2021/12/17}{Par handling.}
+% \begin{macrocode}
+\newbool{LWR@in@multirow@par}
+\boolfalse{LWR@in@multirow@par}
+% \end{macrocode}
+
+
+% \DescribeBoolean{LWR@starting@fancybox}
+% Suppresses \element{br} if beginning a \pkg{fancybox} environment.
+% \changes{v0.903}{2022/01/29}{Par handling.}
+% \begin{macrocode}
+\newbool{LWR@starting@fancybox}
+\boolfalse{LWR@starting@fancybox}
+% \end{macrocode}
+
+
% \DescribeBoolean{LWR@doingstartpars}
% Tells whether paragraphs may be generated.
% \begin{macrocode}
@@ -23843,17 +23950,20 @@ end -- not --version
%
% See if paragraph handling is enabled:
% \begin{macrocode}
-\ifbool{LWR@doingstartpars}%
-{% handling pars
+ \ifboolexpr{
+ bool{LWR@doingparhooks} and
+ bool{LWR@doingstartpars}
+ }%
+ {% handling pars
% \end{macrocode}
%
% See if have already started a \env{lateximage} or a \element{span}.
% If so, do not generate nested paragraph tags.
% \begin{macrocode}
- \ifboolexpr{
- test {\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}} or
- test {\ifnumcomp{\value{LWR@spandepth}}{>}{0}}
- }% nested par tags?
+ \ifboolexpr{
+ test {\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}} or
+ test {\ifnumcomp{\value{LWR@spandepth}}{>}{0}}
+ }% nested par tags?
% \end{macrocode}
%
% If so: Do nothing if already started a \env{lateximage} page.
@@ -23861,14 +23971,14 @@ end -- not --version
% Also do nothing if already inside a \element{span}. Do not nest paragraph tags
% inside a \element{span}.
% \begin{macrocode}
- {}% no nested par tags
+ {}% no nested par tags
% \end{macrocode}
%
% Else: No \env{lateximage} or \element{span} has been started yet,
% so it's OK to generate paragraph tags.
% \begin{macrocode}
- {% yes nest par tags
- \ifbool{LWR@doingapar}{}{%
+ {% yes nest par tags
+ \ifbool{LWR@doingapar}{}{%
% \end{macrocode}
%
% If \pkg{parnotes} is used, paragraph notes are inserted
@@ -23876,35 +23986,30 @@ end -- not --version
% \changes{v0.56}{2018/05/09}{Added support for \pkg{parnotes}.}
% \changes{v0.902}{2021/09/20}{Improved \pkg{parnotes}.}
% \begin{macrocode}
- \PN@parnotes@auto%
+ \PN@parnotes@auto%
% \end{macrocode}
%
% Set flag before creating the tag, so that the tag itself does not trigger
% a new paragraph:
% \changes{v0.902}{2021/09/20}{Improved par tags.}
% \begin{macrocode}
- \global\booltrue{LWR@doingapar}%
+ \global\booltrue{LWR@doingapar}%
% \end{macrocode}
%
% The opening paragraph tag.
% Do not create tag if doing \pkg{algorithm2e} handling instead:
% \changes{v0.66}{2019/02/02}{Improved \HTML\ formatting.}
+% \changes{v0.903}{2021/12/17}{Par handling.}
% \begin{macrocode}
- \ifbool{LWR@algocf@dopars}{}{%
- \LWR@htmltagc{\LWR@tagregularparagraph}\LWR@orignewline%
+ \ifbool{LWR@algocf@dopars}{}{%
+ \ifbool{LWR@in@multirow@par}%
+ {}%
+ {\LWR@htmltagc{\LWR@tagregularparagraph}\LWR@orignewline}%
+ }%
}%
- }%
-% \end{macrocode}
-%
-% At the endof each paragraph,
-% generate closing tag and do regular |/par| stuff.
-% (Attempting to use the \pkg{everyhook} |cr| hook
-% for \cs{LWR@closeparagraph} does not work well.)
-% \begin{macrocode}
- \let\par\LWR@closeparagraph%
- }% end of yes nest par tags
-}% end of handling pars
-{}% not handling pars
+ }% end of yes nest par tags
+ }% end of handling pars
+ {}% not handling pars
}
\let\LWR@ensuredoingapar\LWR@openparagraph
@@ -23919,17 +24024,18 @@ end -- not --version
% and not in tabular metadata. Factored from \cs{LWR@closeparagraph}.
%
% \changes{v0.66}{2019/01/01}{Factored.}
+% \changes{v0.903}{2021/12/17}{Par handling.}
% \begin{macrocode}
\newcommand*{\LWR@closeparagraph@br}
{%
\ifboolexpr{
test {\ifnumcomp{\value{LWR@spandepth}}{>}{0}} and
test {\ifnumcomp{\value{LWR@lateximagedepth}}{=}{0}} and
- not bool {LWR@intabularmetadata}
+ not bool {LWR@starting@fancybox} and
+ not bool {LWR@intabularmetadata} or
+ bool {LWR@in@multirow@par}
}%
- {%
- \unskip\LWR@htmltagc{br /}%
- }%
+ {\unskip\LWR@htmltagc{br /}}%
{}%
}
% \end{macrocode}
@@ -23948,36 +24054,39 @@ end -- not --version
%
% See if paragraph handling is enabled:
% \begin{macrocode}
-\ifbool{LWR@doingapar}%
+ \ifbool{LWR@doingparhooks}{%
+ \ifbool{LWR@doingapar}%
% \end{macrocode}
%
% If currently in paragraph mode:
% \begin{macrocode}
-{% handling pars
+ {% handling pars
% \end{macrocode}
%
% See if already started a \env{lateximage} or a \element{span}:
+% \changes{v0.903}{2021/12/17}{Par handling.}
% \begin{macrocode}
- \ifboolexpr{
- test {\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}} or
- test {\ifnumcomp{\value{LWR@spandepth}}{>}{0}}
- }%
+ \ifboolexpr{
+ test {\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}} or
+ test {\ifnumcomp{\value{LWR@spandepth}}{>}{0}} or
+ bool{LWR@in@multirow@par}
+ }%
% \end{macrocode}
%
% Add a parbreak if in a span, not in a lateximage,
% and not in table metadata.
% \begin{macrocode}
- {% no nested par tags
- \LWR@closeparagraph@br%
- }% no nested par tags
+ {% no nested par tags
+ \LWR@closeparagraph@br%
+ }% no nested par tags
% \end{macrocode}
%
% If have not already started a \env{lateximage} or a \element{span}:
% \begin{macrocode}
- {% yes nest par tags
+ {% yes nest par tags
% \end{macrocode}
%
-% Print a closing tag and some extra vertical space.
+% Print a closing tag.
%
% (The fill seems to be required to force the \pkg{caption}
% package to create flush left caption text in the \HTML.)
@@ -23985,20 +24094,20 @@ end -- not --version
% \changes{v0.70}{2019/03/25}{Reduced underfull \cs{hbox} warnings.}
% \changes{v0.71}{2019/04/08}{Flush left captions.}
% \begin{macrocode}
- \@hspacer{\fill}% \hspace*{\fill}
- \leavevmode\LWR@orignewline%
- \LWR@htmltagc{/\LWR@tagregularparagraph}%
+ \@hspacer{\fill}% \hspace*{\fill}
+ \leavevmode\LWR@orignewline%
+ \LWR@htmltagc{/\LWR@tagregularparagraph}%
% \end{macrocode}
%
% No longer doing a paragraph:
% \begin{macrocode}
- \global\boolfalse{LWR@doingapar}% keep
+ \global\boolfalse{LWR@doingapar}%
% \end{macrocode}
%
% Disable the special \env{minipage} \& \cs{hspace} interaction
% until a new minipage is found:
% \begin{macrocode}
- \global\boolfalse{LWR@minipagethispar}%
+ \global\boolfalse{LWR@minipagethispar}%
% \end{macrocode}
%
% If \pkg{parnotes} is used, paragraph notes are inserted
@@ -24006,53 +24115,71 @@ end -- not --version
% \changes{v0.56}{2018/05/09}{Added support for \pkg{parnotes}.}
% \changes{v0.902}{2021/09/20}{Improved \pkg{parnotes}.}
% \begin{macrocode}
- \PN@parnotes@auto%
+ \PN@parnotes@auto%
% \end{macrocode}
%
-% After creating par notes, not yet started a new paragraph:
% \begin{macrocode}
- \global\boolfalse{LWR@doingapar}%
- }% end of yes nest par tags
-}% end of handling pars
+ }% end of yes nest par tags
+ }% LWR@doingapar: end of handling pars
% \end{macrocode}
%
% Add a parbreak if in a span, not in a lateximage,
% and not in table metadata.
% \changes{v0.66}{2019/01/01}{Fix: Combined span, \env{tabular}, and \env{lateximage}.}
% \begin{macrocode}
-{% not handling pars
- \LWR@closeparagraph@br%
-}% not handling pars
+ {% not LWR@doingapar: not handling pars
+ \LWR@closeparagraph@br%
+ }% not handling pars
% \end{macrocode}
%
% In most cases, finish with a \LaTeX\ \cs{par}, but in the case
-% of paragraphs between lines in a tabular fetch the next token instead:
+% of paragraphs between lines in a tabular fetch the next token instead.
+% Required for \cs{multicolumn}.
% \changes{v0.46}{2018/01/19}{Fix: Tabular empty lines.}
% \begin{macrocode}
-\ifboolexpr{%
- not bool {LWR@doingapar} and
- test {\ifnumcomp{\value{LWR@tabulardepth}}{>}{0}} and
- test {
- \ifnumcomp{\value{LWR@tabulardepth}}{=}{\value{LWR@tabularpardepth}}
- } and
- bool {LWR@intabularmetadata} and
- not bool {LWR@tableparcell} and
- test {\ifnumcomp{\value{LWR@lateximagedepth}}{=}{0}}
-}%
-{%
- \LWR@getmynexttoken%
-}{%
- \LWR@origpar%
-}%
+ \ifboolexpr{%
+ not bool {LWR@doingapar} and
+ test {\ifnumcomp{\value{LWR@tabulardepth}}{>}{0}} and
+ test {
+ \ifnumcomp{\value{LWR@tabulardepth}}{=}{\value{LWR@tabularpardepth}}
+ } and
+ bool {LWR@intabularmetadata} and
+ not bool {LWR@tableparcell} and
+ test {\ifnumcomp{\value{LWR@lateximagedepth}}{=}{0}}
+ }%
+ {\LWR@getmynexttoken}%
+ {}%
+ }% LWR@doingparhooks
+ {}% not LWR@doingparhooks
+% Do not place anything here, due to the above \LWR@getmynexttoken.
}
% \end{macrocode}
% \end{macro}
+
+% \subsection{Paragraph Hooks}
+%
+% \changes{v0.903}{2021/12/17}{Par handling.}
+%
+% \DescribeHook[LaTeX]{para/begin}
+% \begin{macrocode}
+\AddToHook{para/begin}[lwarp]{\LWR@openparagraph}
+% \end{macrocode}
+%
+% \DescribeHook[LaTeX]{para/end}
+% \begin{macrocode}
+\AddToHook{para/end}[lwarp]{\LWR@closeparagraph}
+% \end{macrocode}
+
+
% \begin{macrocode}
\end{warpHTML}
% \end{macrocode}
+
+
+
% \section{Paragraph start/stop handling}
% \label{sec:parstartstop}
% These commands allow/disallow the generation of \HTML\
@@ -24061,8 +24188,8 @@ end -- not --version
% \Cref{sec:parhanding} has the commands which actually generate
% the tags.
%
-% The |everyhook| package is used to generate the opening
-% paragraph tags. The closing tags are generated by \cs{par}.
+% The \LaTeX\ paragraph hooks are used to generate the opening and closing
+% paragraph tags.
% \codehtml
% \begin{macrocode}
@@ -24074,62 +24201,49 @@ end -- not --version
% Begin handling \HTML\ paragraphs.
% This allows an \HTML\ paragraph to start, but one has not yet begun.
% \changes{v0.84}{2020/04/14}{Ignore if in \env{lateximage}.}
+% \changes{v0.903}{2021/12/17}{Par handling.}
% \begin{macrocode}
\newcommand*{\LWR@startpars}%
{%
-% \LWR@traceinfo{LWR@startpars}%
% \end{macrocode}
%
% Ignore if inside a \env{lateximage} or \element{span}:
% \begin{macrocode}
-\ifboolexpr{
- test {\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}} or
- test {\ifnumcomp{\value{LWR@spandepth}}{>}{0}}
-}%
-{}%
-{%
+ \ifboolexpr{
+ test {\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}} or
+ test {\ifnumcomp{\value{LWR@spandepth}}{>}{0}}
+ }%
+ {}% nesting
+ {% not nesting
% \end{macrocode}
%
+% The \LaTeX\ paragraph hook controls tag generation for
+% the start and end of paragraphs.
+%
% See if currently handling \HTML\ paragraphs:
% \begin{macrocode}
- \ifbool{LWR@doingstartpars}%
+ \ifboolexpr {bool{LWR@doingparhooks} and bool{LWR@doingstartpars}}%
% \end{macrocode}
%
% If already in paragraph mode, do nothing.
% \begin{macrocode}
- {}%
+ {}%
% \end{macrocode}
%
% If not currently in paragraph mode:
% \begin{macrocode}
- {%
-% \end{macrocode}
-%
-% At the start of each paragraph, generate an opening tag:
-% \gindex{par=\cs{par}>hooks}
-% \changes{v0.902}{2021/09/24}{Cleared hook before adding.}
-% \begin{macrocode}
- \ClearPreHook{par}%
- \PushPreHook{par}{\LWR@openparagraph}%
-% \end{macrocode}
-%
-% At the end of each paragraph, generate closing tag then do regular |/par| actions:
-% \begin{macrocode}
- \let\par\LWR@closeparagraph
-
- }% an intentionally blank line
+ {\par}%
% \end{macrocode}
%
% Are now handling paragraphs, but have not yet actually started one:
% \begin{macrocode}
- \global\setbool{LWR@doingstartpars}{true}%
+ \global\booltrue{LWR@doingstartpars}%
% \end{macrocode}
%
% No \element{par} tag yet to undo:
% \begin{macrocode}
- \global\boolfalse{LWR@doingapar}%
-}% nestspan
-% \LWR@traceinfo{LWR@startpars: done}%
+ \global\boolfalse{LWR@doingapar}%
+ }% not nesting
}
% \end{macrocode}
% \end{macro}
@@ -24141,6 +24255,7 @@ end -- not --version
%
% \changes{v0.36}{2017/08/15}{Extra \protect\HTML\ source space after paragraphs.}
% \changes{v0.84}{2020/04/14}{Ignore if in \env{lateximage}.}
+% \changes{v0.903}{2021/12/17}{Par handling.}
% \begin{macrocode}
\newcommand*{\LWR@stoppars}%
{%
@@ -24148,74 +24263,59 @@ end -- not --version
%
% Ignore if inside a \env{lateximage} or \element{span}:
% \begin{macrocode}
-\ifboolexpr{
- test {\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}} or
- test {\ifnumcomp{\value{LWR@spandepth}}{>}{0}}
-}%
-{}%
-{%
+ \ifboolexpr{
+ test {\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}} or
+ test {\ifnumcomp{\value{LWR@spandepth}}{>}{0}}
+ }%
+ {}% nesting
+ {% not nesting
% \end{macrocode}
%
% See if currently handling \HTML\ paragraphs:
% \begin{macrocode}
- \ifbool{LWR@doingapar}%
+ \ifboolexpr{bool{LWR@doingparhooks} and bool{LWR@doingapar}}%
% \end{macrocode}
%
% if currently in an \HTML\ paragraph:
% \begin{macrocode}
- {%
+ {%
% \end{macrocode}
%
% Print a closing tag:
% \changes{v0.66}{2019/02/02}{Improved \HTML\ formatting.}
% \begin{macrocode}
- \leavevmode\LWR@orignewline%
- \LWR@htmltagc{/\LWR@tagregularparagraph}%
- \LWR@orignewline%
+ \leavevmode\LWR@orignewline%
+ \LWR@htmltagc{/\LWR@tagregularparagraph}%
+ \LWR@orignewline%
% \end{macrocode}
%
% No longer have an open \HTML\ paragraph:
% \begin{macrocode}
- \global\boolfalse{LWR@doingapar}%
+ \global\boolfalse{LWR@doingapar}%
% \end{macrocode}
%
% Disable the special \env{minipage} \& \cs{hspace} interaction
% until a new minipage is found:
% \changes{v0.71}{2019/04/08}{Reduced underfull \cs{hbox} warnings.}
% \begin{macrocode}
- \global\boolfalse{LWR@minipagethispar}
- }%
+ \global\boolfalse{LWR@minipagethispar}%
+ }%
% \end{macrocode}
%
% If was not in an \HTML\ paragraph:
% \begin{macrocode}
- {}%
-% \end{macrocode}
-%
-% See if currently allowing \HTML\ paragraphs:
-% \begin{macrocode}
- \ifbool{LWR@doingstartpars}%
-% \end{macrocode}
-%
-% If so: clear the |par| hook to no longer catch paragraphs:
-% \begin{macrocode}
- {\ClearPreHook{par}}%
-% \end{macrocode}
-%
-% Else: Do nothing:
-% \begin{macrocode}
- {}%
+ {}%
% \end{macrocode}
%
% No longer in paragraph mode:
% \begin{macrocode}
- \global\setbool{LWR@doingstartpars}{false}%
+ \global\setbool{LWR@doingstartpars}{false}%
% \end{macrocode}
%
% No \element{p} tag to undo:
% \begin{macrocode}
- \global\boolfalse{LWR@doingapar}%
-}% nestspan
+ \global\boolfalse{LWR@doingapar}%
+ }% not nesting
}
% \end{macrocode}
% \end{macro}
@@ -24352,8 +24452,8 @@ end -- not --version
%
% \begin{macrocode}
\newcommand*{\CSSFilename}[1]{%
-\renewcommand*{\LWR@currentcss}{#1}%
-\@onelevel@sanitize\LWR@currentcss%
+ \renewcommand*{\LWR@currentcss}{#1}%
+ \@onelevel@sanitize\LWR@currentcss%
}
\end{warpHTML}
@@ -24930,6 +25030,18 @@ end -- not --version
% \end{macro}
%
+% \begin{macro}{\LWR@nullifyfootnotes}
+%
+% Cancels footnotes, such as inside an \HTML\ comment or a \cs{nameref}.
+% \changes{v0.903}{2021/12/28}{Added.}
+% \begin{macrocode}
+\newcommand*{\LWR@nullifyfootnotes}{%
+ \renewcommand{\footnote}[2][]{}%
+ \renewcommand{\footnotemark}[1][]{}%
+}
+% \end{macrocode}
+% \end{macro}
+
% \begin{macrocode}
\end{warpHTML}
@@ -24957,9 +25069,10 @@ end -- not --version
\renewcommand{\marginpar}[2][]{%
\ifbool{FormatWP}%
{%
-\begin{LWR@BlockClassWP}{width:2in; float:right; margin:10pt}{}(note){marginblock}%
-#2
-\end{LWR@BlockClassWP}%
+ \begin{LWR@BlockClassWP}%
+ {width:2in; float:right; margin:10pt}{}(note){marginblock}%
+ #2
+ \end{LWR@BlockClassWP}%
}%
{%
\LWR@htmlspanclass(note){marginpar}{#2}%
@@ -24982,18 +25095,22 @@ end -- not --version
% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.}
% \begin{macrocode}
\newcommand{\marginparBlock}[2][]{%
-\LWR@stoppars%
-\ifbool{FormatWP}%
-{%
- \begin{LWR@BlockClassWP}{width:2in; float:right; margin:10pt}{}(note){marginblock}%
- #2
- \end{LWR@BlockClassWP}
-}{%
- \begin{BlockClass}[width:2in; float:right; margin:10pt](note){marginparblock}%
- #2
- \end{BlockClass}
-}%
-\LWR@startpars%
+ \LWR@stoppars%
+ \ifbool{FormatWP}%
+ {%
+ \begin{LWR@BlockClassWP}%
+ {width:2in; float:right; margin:10pt}{}%
+ (note){marginblock}%
+ #2
+ \end{LWR@BlockClassWP}
+ }%
+ {%
+ \begin{BlockClass}[width:2in; float:right; margin:10pt]%
+ (note){marginparblock}%
+ #2
+ \end{BlockClass}
+ }%
+ \LWR@startpars%
}
% \end{macrocode}
% \end{macro}
@@ -25605,30 +25722,33 @@ end -- not --version
% \end{macro}
-% \begin{macro}{\LWR@HTMLsanitize} \marg{text}
+% \begin{macro}{\LWR@HTMLsanitizedetokenized} \marg{detokenized text}
%
-% Prints the sanitized text.
+% Prints the sanitized text, already detokenized.
%
+% \changes{v0.903}{2021/12/17}{Added.}
% \begin{macrocode}
-\newrobustcmd{\LWR@HTMLsanitize}[1]{%
+\newrobustcmd{\LWR@HTMLsanitizedetokenized}[1]{%
+ \LWR@traceinfo{LWR@HTMLsanitizedetokenized !#1!}%
% \end{macrocode}
% Cancel French \pkg{babel} character handling,
% and fully expand the strings:
% \begin{macrocode}
\begingroup%
\LWR@hook@processingtags%
- \edef\LWR@strresult{\detokenize{#1}}%
+ \edef\LWR@strresult{#1}%
\LWR@subHTMLsanitize%
\LWR@strresult%
\endgroup%
+ \LWR@traceinfo{LWR@HTMLsanitize done}%
}
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\LWR@HTMLsanitizeexpand} \marg{text}
+% \begin{macro}{\LWR@HTMLsanitizeexpanded} \marg{text}%
%
-% This version expands the argument before sanitizing it.
+% This version must be given the detokenized and expanded text.
% This is only used for adding math to \MathJax\ expressions or
% \env{lateximage} \attribute{alt} tags.
%
@@ -25636,7 +25756,6 @@ end -- not --version
% \changes{v0.51}{2018/03/07}{Fix: Escapes double quotes.}
% ^^A \changes{v0.79}{2020/01/27}{Fix: \cs{\&}.}
% \changes{v0.89}{2020/08/08}{Fix: Nested \MathJax\ environments.}
-% ^^A *88*
% \begin{macrocode}
\edef\LWR@beginspaceleftbrace{begin \LWRleftbrace}
\edef\LWR@beginspaceleftbrace{\detokenize\expandafter{\LWR@beginspaceleftbrace}}
@@ -25648,7 +25767,7 @@ end -- not --version
\edef\LWR@endrightbrace{end\LWRrightbrace}
\edef\LWR@endrightbrace{\detokenize\expandafter{\LWR@endrightbrace}}
-\newrobustcmd{\LWR@HTMLsanitizeexpand}[1]{%
+\newrobustcmd{\LWR@HTMLsanitizeexpanded}[1]{%
% \end{macrocode}
% Cancel French \pkg{babel} character handling,
% and fully expand the strings:
@@ -25656,11 +25775,10 @@ end -- not --version
\begingroup%
\LWR@hook@processingtags%
% \end{macrocode}
-% The difference between this and \cs{LWR@HTMLsanitize} (without ``expand'')
-% is the following \cs{expandafter}:
% \begin{macrocode}
- \edef\LWR@strresult{\detokenize\expandafter{#1}}%
+ \edef\LWR@strresult{#1}%
% \end{macrocode}
+%
% The math expression may includes spaces between tokens,
% but \MathJax\ does not want a space between \cs{begin} or \cs{end}
% and the following brace.
@@ -25734,7 +25852,7 @@ end -- not --version
\StrLen{\detokenize{#1}}[\LWR@tempone]%
\ifnumgreater{\LWR@tempone}{350}{%
\AtEndDocument{%
- \PackageWarningNoLine{lwarp}{%
+ \PackageNoteNoLine{lwarp}{%
To ensure faster MathJax compilation, place each\MessageBreak
custom macro in its own \protect\CustomizeMathJax.\MessageBreak
See the Lwarp documentation regarding customizing\MessageBreak
@@ -26714,19 +26832,31 @@ end -- not --version
% \changes{v0.52}{2018/03/28}{Fix: Footnote numbering: Limited \HTML\ comment if starred.}
% \changes{v0.52}{2018/03/28}{Fix: Footnote numbering: Use short \TOC\ entry
% for HTMLDebug comments.}
+% \changes{v0.903}{2021/12/28}{Add: Sectioning \HTML\ comment divider.}
+% \changes{v0.903}{2021/12/28}{Fix: Nullfiy footnotes in \HTML\ comment.}
% \begin{macrocode}
-\ifbool{HTMLDebugComments}{%
- \begingroup%
- \LWR@nullfonts%
- \IfBooleanTF{#1}% starred
- {\LWR@htmlcomment{Opening #4*}}%
+\begingroup%
+\LWR@nullfonts%
+\LWR@nullifyfootnotes%
+\LWR@htmlcomment{................................}%
+\LWR@orignewline%
+\ifbool{HTMLDebugComments}%
{%
- \IfNoValueTF{#2}% short TOC
- {\LWR@htmlcomment{Opening #4 ``#3''}}%
- {\LWR@htmlcomment{Opening #4 ``#2''}}%
- }\LWR@orignewline%
- \endgroup%
-}{}
+ \IfBooleanTF{#1}% starred
+ {%
+ \IfNoValueTF{#2}% short TOC
+ {\LWR@htmlcomment{Opening #4* ``#3''}}%
+ {\LWR@htmlcomment{Opening #4* ``#2''}}%
+ }%
+ {%
+ \IfNoValueTF{#2}% short TOC
+ {\LWR@htmlcomment{Opening #4 ``#3''}}%
+ {\LWR@htmlcomment{Opening #4 ``#2''}}%
+ }%
+ \LWR@orignewline%
+ }%
+ {}%
+\endgroup%
% \end{macrocode}
%
% For inline sections paragraph and subparagraph, start a new paragraph now:
@@ -27286,10 +27416,14 @@ end -- not --version
% \changes{v0.84}{2020/04/12}{Improved \HTML\ title.}
% \begin{macrocode}
\StrSubstitute{\theHTMLSection}{\protect}{\detokenize{-}}[\theHTMLSection]%
-\StrSubstitute{\theHTMLSection}{\detokenize{-----}}{\detokenize{-}}[\theHTMLSection]%
-\StrSubstitute{\theHTMLSection}{\detokenize{----}}{\detokenize{-}}[\theHTMLSection]%
-\StrSubstitute{\theHTMLSection}{\detokenize{---}}{\detokenize{-}}[\theHTMLSection]%
-\StrSubstitute{\theHTMLSection}{\detokenize{--}}{\detokenize{-}}[\theHTMLSection]%
+\StrSubstitute{\theHTMLSection}%
+ {\detokenize{-----}}{\detokenize{-}}[\theHTMLSection]%
+\StrSubstitute{\theHTMLSection}%
+ {\detokenize{----}}{\detokenize{-}}[\theHTMLSection]%
+\StrSubstitute{\theHTMLSection}%
+ {\detokenize{---}}{\detokenize{-}}[\theHTMLSection]%
+\StrSubstitute{\theHTMLSection}%
+ {\detokenize{--}}{\detokenize{-}}[\theHTMLSection]%
% \end{macrocode}
%
% If starts with a dash, remove the leading dash:
@@ -27574,9 +27708,18 @@ end -- not --version
%
% Not yet started any paragraph handling:
% \begin{macrocode}
+\global\booltrue{LWR@doingparhooks}
\global\boolfalse{LWR@doingapar}
\global\boolfalse{LWR@doingstartpars}
% \end{macrocode}
+%
+% \cs{color@endgroup}'s \cs{endgraf} was conflicting with \pkg{lwarp}'s
+% paragraph handling.
+% \changes{v0.903}{2021/12/13}{Par handling.}
+% \begin{macrocode}
+\let\color@endgroup\endgroup
+% \end{macrocode}
+%
% Document and page settings:
% \changes{v0.45}{2017/12/08}{Fix: Lateximages on incorrect pages with \brand{Mathjax}.}
% \begin{macrocode}
@@ -27804,13 +27947,15 @@ end -- not --version
% \end{macro}
+% \DescribeHook[LaTeX]{enddocument/info} Used to close the \filenm{*-images.txt} file.
% \begin{macro}{\enddocument}
% If labels have not changed, mark successful completion
% of the \filenm{lateximages.txt} file.
% Executed as everything is being shut down.
%
-% For the newer kernel hooks, see \cmds{texdoc lthooks-doc} and \cmds{texdoc ltshipout-doc}.
+% For the newer kernel hooks, see \cmds{texdoc lthooks-doc}
+% and \cmds{texdoc ltshipout-doc}.
% \changes{v0.70}{2019/03/26}{If labels changed, require recompile before making limages.}
% \changes{v0.89}{2020/07/28}{Adapt to \LaTeX\ core changes.}
% \begin{macrocode}
@@ -27876,6 +28021,10 @@ end -- not --version
%
% See \cmds{texdoc lthooks-doc} and \cmds{textdoc ltshipout-doc}.
%
+% \DescribeHook[LaTeX]{shipoout/background} Nullified.
+%
+% \DescribeHook[LaTeX]{shipoout/foreground} Nullified.
+%
% \changes{v0.89}{2020/07/28}{Foreground/background hooks: Adapt to \LaTeX\ core changes.}
% \begin{macrocode}
\ifdef{\RemoveFromHook}{
@@ -28078,7 +28227,7 @@ end -- not --version
}
\AtBeginDocument{
-\@ifpackageloaded{titling}{
+\IfPackageLoadedTF{titling}{
\AtBeginEnvironment{titlingpage}{
\renewrobustcmd{\affiliation}[1]{\\ \textsc{\small#1}}
}
@@ -28297,7 +28446,7 @@ end -- not --version
%
%
% \begin{macrocode}
-\@ifclassloaded{memoir}
+\IfClassLoadedTF{memoir}
{
\newcommand{\LWR@setfootnoteseries}{%
\renewcommand\thefootnote{\@arabic\c@footnote}%
@@ -28562,7 +28711,7 @@ end -- not --version
%
% \begin{macrocode}
\newcommand*{\AddSubtitlePublished}{%
-\@ifpackageloaded{titling}{% yes titling package
+\IfPackageLoadedTF{titling}{% yes titling package
\newcommand{\@published}{}%
\newcommand{\published}[1]{\gdef\@published{##1}}%
\renewcommand*{\maketitlehooka}{\printpublished}%
@@ -28999,6 +29148,7 @@ end -- not --version
%
% \changes{v0.20}{2016/12/24}{Added.}
% \changes{v0.84}{2020/04/16}{Added print mode.}
+% \changes{v0.903}{2022/01/02}{Added \env{verbatim*}.}
%
% \begin{macrocode}
\AfterEndPreamble{
@@ -29018,6 +29168,22 @@ end -- not --version
\LWR@afterendverbatim%
}%
}
+%
+\AtBeginEnvironment{verbatim*}{%
+ \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
+ {}%
+ {%
+ \LWR@forcenewpage%
+ \LWR@atbeginverbatim{verbatim}%
+ }%
+}
+\AfterEndEnvironment{verbatim*}{%
+ \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
+ {}%
+ {%
+ \LWR@afterendverbatim%
+ }%
+}
}
% \end{macrocode}
% \end{environment}
@@ -29031,8 +29197,10 @@ end -- not --version
% \changes{v0.52}{2018/03/27}{Fix to allow inside \env{lateximage}.}
% \changes{v0.58}{2018/06/07}{Improved print/\HTML\ output selection.}
% \changes{v0.84}{2020/04/17}{Restore spacing.}
+% \changes{v0.903}{2021/12/20}{Converted to env.}
% \begin{macrocode}
-\newcommand*{\LWR@HTML@tabbing}{%
+\newenvironment*{LWR@HTML@tabbing}
+{%
\LWR@forcenewpage%
\LWR@atbeginverbatim{tabbing}%
\let\enskip\LWR@origenskip%
@@ -29044,14 +29212,12 @@ end -- not --version
\let\negthinspace\LWR@orignegthinspace%
\LWR@print@tabbing%
}
-
-\newcommand*{\LWR@HTML@endtabbing}{%
- \LWR@print@endtabbing%
+{%
+ \endLWR@print@tabbing%
\LWR@afterendverbatim%
}
-\LWR@formatted{tabbing}
-\LWR@formatted{endtabbing}
+\LWR@formattedenv{tabbing}
% \end{macrocode}
%
% \end{environment}
@@ -29260,11 +29426,9 @@ end -- not --version
\else
% \if@inlabel
% \indent
- \par
% \fi
\ifhmode
% \unskip\unskip
- \par
\fi
\if@newlist
\if@nobreak
@@ -29361,12 +29525,15 @@ end -- not --version
% leave room for the label while inside a list during paragraph construction.
%
% \changes{v0.44}{2017/11/15}{Added \env{list} and \env{trivlist}.}
+% \changes{v0.903}{2021/12/17}{Par handling.}
% \begin{macrocode}
\newcommand*{\LWR@listitem}{%
\LWR@stoppars%
\LWR@startnewdepth{listitem}%
\LWR@htmltag{li}%
+ \LWR@orignewline%
\LWR@startpars%
+ \LWR@ensuredoingapar%
\LWR@origitem%
}
% \end{macrocode}
@@ -29432,12 +29599,15 @@ end -- not --version
%
% See \cs{LWR@openparagraph} where extra \cs{hspace} is used to
% leave room for the label while inside a list during paragraph construction.
+% \changes{v0.903}{2021/12/17}{Par handling.}
% \begin{macrocode}
\newcommand*{\LWR@itemizeitem}{%
\LWR@stoppars%
\LWR@startnewdepth{listitem}%
\LWR@htmltag{li}%
+ \LWR@orignewline%
\LWR@startpars%
+ \LWR@ensuredoingapar%
\LWR@origitem%
}
% \end{macrocode}
@@ -29654,13 +29824,17 @@ end -- not --version
% \end{macrocode}
% \end{macro}
-% \cs{futurelet} copies the next token then executes a function to analyze it.
-
-% \cs{LWR@futurenonspacelet} does the same, but ignores intervening white space
-
-% Based on the \pkg{booktabs} style:
% \begin{macro}{\LWR@futurenonspacelet}
+%
+% \cs{futurelet} copies the next token then executes a function to analyze it.
+%
+% \cs{LWR@futurenonspacelet} does the same, but ignores intervening spaces
+% and paragraphs.
+%
+% Based on the \pkg{booktabs} style:
+%
+% \changes{v0.903}{2021/10/13}{Now ignores \cs{par}.}
% \begin{macrocode}
\def\LWR@futurenonspacelet#1{\def\LWR@cs{#1}%
\afterassignment\LWR@fnslone\let\nexttoken= }
@@ -29668,19 +29842,30 @@ end -- not --version
\def\LWR@fnslone{\expandafter\futurelet\LWR@cs\LWR@fnsltwo}
\def\LWR@fnsltwo{%
-\expandafter\ifx\LWR@cs\@sptoken\let\next=\LWR@fnslthree%
-\else\let\next=\nexttoken\fi\next}
+ \expandafter\ifx\LWR@cs\@sptoken%
+ \let\next=\LWR@fnslthree%
+ \else%
+ \expandafter\ifx\LWR@cs\par%
+ \let\next=\LWR@fnslthree%
+ \else%
+ \let\next=\nexttoken%
+ \fi%
+ \fi\next}
\def\LWR@fnslthree{\afterassignment\LWR@fnslone\let\next= }
% \end{macrocode}
% \end{macro}
+
% \begin{macro}{\LWR@getmynexttoken}
% Looks ahead and copies the next token into \cs{LWR@mynexttoken}.
% \begin{macrocode}
\newcommand*{\LWR@getmynexttoken}{%
\LWR@traceinfo{LWR@getmynexttoken}%
-% nothing must follow this next line
+% \end{macrocode}
+%
+% Nothing must follow this next line:\watchout
+% \begin{macrocode}
\LWR@futurenonspacelet\LWR@mynexttoken\LWR@tabledatacolumntag
}
% \end{macrocode}
@@ -31776,11 +31961,10 @@ end -- not --version
% left to right columns.
%
% \begin{macrocode}
-\NewDocumentCommand{\LWR@docdashline}
- {>{\SplitArgument{1}{-}}m}%
- {%
- \LWR@subcdashline#1%
- }
+\NewDocumentCommand{\LWR@docdashline}{>{\SplitArgument{1}{-}}m}%
+{%
+ \LWR@subcdashline#1%
+}
% \end{macrocode}
% \end{macro}
@@ -31831,7 +32015,7 @@ end -- not --version
% \begin{macrocode}
\newcommand*{\LWR@subaddcmidruletrim}[2]{%
\setlength{\LWR@templengthone}{%
- \LWR@getexparray{LWR@midrules}{\arabic{LWR@tableLaTeXcolindex}}%
+ \LWR@getexparray{LWR@midrules}{\arabic{LWR@tableLaTeXcolindex}}%
}%
\ifdimcomp{\LWR@templengthone}{>}{0pt}%
{%
@@ -32995,13 +33179,13 @@ end -- not --version
{% \@xmultirow defined, so some version of multirow was loaded
% \end{macrocode}
%
-% |\@ifpackageloaded{multirow}| determines if v2.0 or later of
+% |\IfPackageLoadedTF{multirow}| determines if v2.0 or later of
% \pkg{multirow} was used, which included the \cs{ProvidesPackage} macro.
%
% The print version:
% \begin{macrocode}
-\@ifpackageloaded{multirow}{% v2.0 or newer
-\@ifpackagelater{multirow}{2016/09/01}% 2016/09/27 for v2.0
+\IfPackageLoadedTF{multirow}{% v2.0 or newer
+\IfPackageAtLeastTF{multirow}{2016/09/01}% 2016/09/27 for v2.0
{% v2.0+:
\DeclareExpandableDocumentCommand{\LWR@print@multicolumnrow}%
{+m +m +O{c} +m +O{0} +m +O{0pt} +m}%
@@ -33015,7 +33199,7 @@ end -- not --version
}% packageloaded{multirow}
% \end{macrocode}
%
-% If not |\@ifpackageloaded{multirow}| but \cs{@xmultirow} is defined,
+% If not |\IfPackageLoadedTF{multirow}| but \cs{@xmultirow} is defined,
% then this must be v1.6 or earlier, which did not |\ProvidesPackage{multirow}|,
% and did not have the \optn{vposn} option.
%
@@ -33166,23 +33350,28 @@ end -- not --version
{%
\LWR@traceinfo{LWR@tabledatacolumntag}%
% \end{macrocode}
+%
% \hspace*{.5in} |\show\LWR@mynexttoken| to see what tokens to look for
% \begin{macrocode}
% \end{macrocode}
+%
% If not any of the below, start a new table cell:
% \begin{macrocode}
\global\let\LWR@mynextaction\LWR@tabledatasinglecolumntag%
% \end{macrocode}
+%
% If exiting the tabular:
% \begin{macrocode}
\ifdefequal{\LWR@mynexttoken}{\end}%
{\booltrue{LWR@exitingtabular}}{}%
% \end{macrocode}
+%
% \env{longtable} can have a caption in a cell
% \begin{macrocode}
\ifdefequal{\LWR@mynexttoken}{\caption}%
{\global\let\LWR@mynextaction\LWR@donothing}{}%
% \end{macrocode}
+%
% Look for other things which would not start a table cell:
% \begin{macrocode}
\ifdefequal{\LWR@mynexttoken}{\multicolumn}%
@@ -33194,11 +33383,13 @@ end -- not --version
\ifdefequal{\LWR@mynexttoken}{\noalign}%
{\global\let\LWR@mynextaction\LWR@donothing}{}%
% \end{macrocode}
+%
% If an \cs{mrowcell}, this is a cell to be skipped over:
% \begin{macrocode}
\ifdefequal{\LWR@mynexttoken}{\mrowcell}%
{\global\let\LWR@mynextaction\LWR@donothing}{}%
% \end{macrocode}
+%
% If an \cs{mcolrowcell}, this is a cell to be skipped over:
% \begin{macrocode}
\ifdefequal{\LWR@mynexttoken}{\mcolrowcell}%
@@ -33298,11 +33489,14 @@ end -- not --version
\ifdefequal{\LWR@mynexttoken}{\lasthdashline}%
{\global\let\LWR@mynextaction\LWR@donothing}{}%
% \end{macrocode}
+%
% Ignore an empty line between rows:
% \changes{v0.45}{2017/12/06}{Fix: Empty line between rows.}
% \begin{macrocode}
\ifdefequal{\LWR@mynexttoken}{\par}%
- {\global\let\LWR@mynextaction\LWR@donothing}{}%
+ {%
+ \global\let\LWR@mynextaction\LWR@donothing%
+ }{}%
% \end{macrocode}
%
% No action for an \cs{end} token.
@@ -33312,9 +33506,8 @@ end -- not --version
%
% Start the new table cell if was not any of the above:
% \begin{macrocode}
- \LWR@traceinfo{LWR@tabledatacolumntag: about to do mynext}%
+ \LWR@traceinfo{LWR@tabledatacolumntag: done, about to do LWR@mynextaction}%
\LWR@mynextaction%
- \LWR@traceinfo{LWR@tabledatacolumntag: done}%
}
% \end{macrocode}
% \end{macro}
@@ -33423,7 +33616,7 @@ end -- not --version
% \begin{macrocode}
\AtBeginDocument{
-\@ifpackageloaded{lwarp-tabls}
+\IfPackageLoadedTF{lwarp-tabls}
{
\newcommand*{\LWR@HTMLhline}[1][]{%
\ifbool{FormatWP}%
@@ -33563,16 +33756,28 @@ end -- not --version
\boolfalse{LWR@foundmrowcell}%
% \end{macrocode}
%
-%
+% In case of nesting:
% \begin{macrocode}
\renewcommand*{\LWR@multicoltext}{}%
+ \booltrue{LWR@intabularmetadata}%
+% \end{macrocode}
+%
+% New \PDF\ page, unless in a \cs{multirow}:
+% \changes{v0.903}{2021/12/17}{Par handling.}
+% \begin{macrocode}
+ \ifbool{LWR@in@multirow@par}%
+ {\leavevmode\LWR@orignewline}%
+ {\LWR@forcenewpage}%
+% \end{macrocode}
+%
+% In case of nesting, locally no longer in a \cs{multirow}:
+% \changes{v0.903}{2021/12/17}{Par handling.}
+% \begin{macrocode}
+ \boolfalse{LWR@in@multirow@par}%
% \end{macrocode}
%
% Create the |table| tag:
% \begin{macrocode}
- \booltrue{LWR@intabularmetadata}%
- \LWR@traceinfo{LWR@@tabular: About to LWR@forecenewpage.}%
- \LWR@forcenewpage
\LWR@htmlblocktag{table}%
% \end{macrocode}
% Parse the table columns:
@@ -34018,12 +34223,11 @@ end -- not --version
% \begin{macro}{\LWR@nameref} \marg{label}
% Returns the section name for this label:
% \changes{v0.66}{2019/01/27}{No longer use \pkg{zref}.}
-% \changes{v0.902}{2021/09/24}{Disable footnotes in \cs{nameref}.}
+% \changes{v0.902}{2021/09/24}{Nullify footnotes in \cs{nameref}.}
% \begin{macrocode}
\newcommand*{\LWR@nameref}[1]{%
\begingroup%
- \renewcommand{\footnote}[2][]{}%
- \renewcommand{\footnotemark}[1][]{}%
+ \LWR@nullifyfootnotes%
\expandafter\LWR@setref\csname r@#1@lwarp\endcsname\LWR@firstoffive{#1}%
\endgroup%
}
@@ -34369,7 +34573,8 @@ end -- not --version
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\ref} * \marg{label} \quad
+% \begin{macro}{\ref} * \marg{label}
+%
% \cs{ref} is redefined to \cs{LWR@HTML@ref},
% except inside the text part of a \cs{hyperref},
% where it is redefined to \cs{LWR@ref@ignorestar}.
@@ -34400,16 +34605,76 @@ end -- not --version
% \end{macrocode}
%
%
-% \begin{macro}{\LWR@refwithsection}
+% \begin{macro}{\LWR@refwithsection} * \marg{label}
+%
+% Creates a reference, using the section number as the text.
+% Used for back references.
+%
% \changes{v0.896}{2021/04/21}{Added.}
+% \changes{v0.903}{2021/12/13}{Fixed: Ref undefined or w/o label.}
% \begin{macrocode}
\NewDocumentCommand{\LWR@refwithsection}{s m}{%
\LWR@traceinfo{LWR@refwithsection !#2!}%
+% \end{macrocode}
+%
+% If starred, just use the text without a hyperlink:
+% \begin{macrocode}
\IfBooleanTF{#1}%
{\LWR@print@ref{\BaseJobname-autopage-\LWR@currentautosecpageref{#2}}}%
{%
+% \end{macrocode}
+%
+% Open the reference:
+% \begin{macrocode}
\LWR@startref{#2}%
- \LWR@print@ref{\BaseJobname-autopage-\LWR@currentautosecpageref{#2}}%
+% \end{macrocode}
+%
+% Add the text of the link.
+%
+% Check for and handle an undefined reference:
+% \begin{macrocode}
+ \edef\@tempa{\LWR@currentautosecpageref{#2}}%
+ \ifdefstring{\@tempa}{??}%
+ {??}%
+% \end{macrocode}
+%
+% For a defined reference:
+% \begin{macrocode}
+ {%
+% \end{macrocode}
+%
+% Set \cs{@tempa} to \cs{r@<label>}, which is |{section number}{page number}|.
+% \begin{macrocode}
+ \edef\@tempa{%
+ \csname
+ r@\BaseJobname-autopage-\LWR@currentautosecpageref{#2}%
+ \endcsname%
+ }%
+% \end{macrocode}
+%
+% Check the section number alone:
+% \begin{macrocode}
+ \edef\@tempa{\expandafter\@firstoftwo\@tempa}%
+% \end{macrocode}
+%
+% If the reference has no section number print an asterisk:
+% \begin{macrocode}
+ \expandafter\ifblank\expandafter{\@tempa}%
+ {*}
+% \end{macrocode}
+%
+% If there is a section number, print it:
+% \begin{macrocode}
+ {%
+ \LWR@print@ref{%
+ \BaseJobname-autopage-\LWR@currentautosecpageref{#2}%
+ }%
+ }%
+ }%
+% \end{macrocode}
+%
+% Close the reference:
+% \begin{macrocode}
\LWR@htmltag{/a}%
}%
}
@@ -34712,8 +34977,8 @@ end -- not --version
% \begin{macrocode}
\newcommand*{\LWR@subinlineimage}[6]{%
\ifblank{#6}%
- {\renewcommand*{\LWR@tempone}{}}
- {\renewcommand*{\LWR@tempone}{role="#6"\LWR@indentHTML}}
+ {\renewcommand*{\LWR@tempone}{}}%
+ {\renewcommand*{\LWR@tempone}{role="#6"\LWR@indentHTML}}%
\ifblank{#1}%
{%
\LWR@htmltag{img \LWR@indentHTML
@@ -34871,7 +35136,7 @@ end -- not --version
% \begin{macrocode}
\AtBeginDocument{
-\@ifpackageloaded{tocbasic}{
+\IfPackageLoadedTF{tocbasic}{
\appto\figure@atbegin{%
\LWR@futurenonspacelet\LWR@mynexttoken\LWR@floatalignment%
@@ -35098,7 +35363,7 @@ end -- not --version
% \changes{v0.84}{2020/04/20}{\pkg{caption} now optional.}
% \begin{macrocode}
\AtBeginDocument{
- \@ifpackageloaded{caption}{}{
+ \IfPackageLoadedTF{caption}{}{
\let\LWR@orig@caption\@caption%
\long\def\@caption#1[#2]{%
% \end{macrocode}
@@ -35286,7 +35551,7 @@ end -- not --version
% \changes{v0.84}{2020/04/20}{\pkg{caption} now optional.}
% \begin{macrocode}
\AtBeginDocument{%
-\@ifpackageloaded{caption}{
+\IfPackageLoadedTF{caption}{
\let\LWR@origcaptionlistentry\captionlistentry
\renewcommand*{\captionlistentry}{%
@@ -35805,7 +36070,7 @@ end -- not --version
% \DescribeCounter{lofdepth} \TOC\ depth for figures.
% \begin{macrocode}
-\@ifclassloaded{memoir}{}{
+\IfClassLoadedTF{memoir}{}{
\newcounter{lofdepth}
\setcounter{lofdepth}{1}
}
@@ -35813,7 +36078,7 @@ end -- not --version
% \DescribeCounter{lotdepth} \TOC\ depth for tables.
% \begin{macrocode}
-\@ifclassloaded{memoir}{}{
+\IfClassLoadedTF{memoir}{}{
\newcounter{lotdepth}
\setcounter{lotdepth}{1}
}
@@ -36681,14 +36946,20 @@ end -- not --version
\linespread{1}%
% \end{macrocode}
%
+% \changes{v0.903}{2021/12/17}{Par handling.}
% \begin{macrocode}
- \let\par\LWR@origpar%
+ \setbool{LWR@doingparhooks}{false}%
% \end{macrocode}
%
% \begin{macrocode}
\LWR@select@print@hspace%
% \end{macrocode}
%
+% \changes{v0.903}{2021/12/13}{Par handling.}
+% \begin{macrocode}
+ \def\color@endgroup{\endgraf\endgroup}%
+% \end{macrocode}
+%
% \changes{v0.48}{2018/02/04}{Fix: Spacing in \SVG\ math, \env{lateximage}, \tikz.}
% \begin{macrocode}
\LetLtxMacro\hfil\LWR@orighfil%
@@ -37264,12 +37535,12 @@ end -- not --version
\IfFileExists{\LWR@baselinename}%
{
- \@ifpackageloaded{graphicx}{
+ \IfPackageLoadedTF{graphicx}{
\newcommand*{\LWR@addbaselinemarker}{%
\LWR@origincludegraphics{\LWR@baselinename}%
}
}{
- \@ifpackageloaded{graphics}{
+ \IfPackageLoadedTF{graphics}{
\newcommand*{\LWR@addbaselinemarker}{%
\LWR@origincludegraphics{\LWR@baselinename}%
}
@@ -37279,7 +37550,7 @@ end -- not --version
}
\AtEndDocument{
\ifbool{LWR@warnbaselinemarker}{
- \PackageWarningNoLine{lwarp}{%
+ \PackageNoteNoLine{lwarp}{%
Load graphicx or graphics for improved\MessageBreak
SVG math sizing and baselines%
}
@@ -37462,6 +37733,7 @@ end -- not --version
% \changes{v0.79}{2019/12/14}{Factored.}
% \begin{macrocode}
\newcommand*{\LWR@subsingledollarsvg}[4]{%
+ \LWR@traceinfo{LWR@subsingledollartsvg}%
% \end{macrocode}
% Measure the depth, width, and height of the math image:
% \changes{v0.51}{2018/03/04}{Fix: \SVG\ math with enclosed \env{lateximage}.}
@@ -37541,14 +37813,14 @@ end -- not --version
% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.}
% \begin{macrocode}
\ifbool{LWR@dynamicmath}{%
- \LWR@traceinfo{subsingledollar: dynamic}%
+ \LWR@traceinfo{subsingledollarsvg: dynamic}%
\begin{lateximage}% no hashing
[\MathImageAltText]% alt tag
[]% no add'l hashing
[\LWR@singledollarstyle \LWR@singledollardepthstyle]% CSS
(math)% ARIA
}{% not dynamic math
- \LWR@traceinfo{subsingledollar: static}%
+ \LWR@traceinfo{subsingledollarsvg: static}%
\IfValueTF{#1}{% #1 True
\LWR@findcurrenttextcolor% sets \LWR@tempcolor
% \end{macrocode}
@@ -37560,6 +37832,7 @@ end -- not --version
{\def\LWR@tempone{N}}%
% \end{macrocode}
% \begin{macrocode}
+ \LWR@traceinfo{subsingledollarsvg about to lateximage}%
\begin{lateximage}*% use hashing
[#2]% alt
*% do not add open/closing braces
@@ -37574,6 +37847,7 @@ end -- not --version
]%
[\LWR@singledollarstyle \LWR@singledollardepthstyle]% CSS
(math)% ARIA
+ \LWR@traceinfo{subsingledollar did lateximage}%
}{% #1 False
\begin{lateximage}% no hashing
[#2]% alt
@@ -37649,7 +37923,7 @@ end -- not --version
\newsavebox{\LWR@singledollarbox}
\NewDocumentCommand{\LWR@subsingledollar}{s m m m}{%
- \LWR@traceinfo{LWR@subsingledollar}%
+ \LWR@traceinfo{LWR@subsingledollar !#2!}%
% \end{macrocode}
% \begin{macrocode}
\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
@@ -37701,9 +37975,10 @@ end -- not --version
% \end{macrocode}
% \cs{ifmmode} to avoid error about \cs{ttfamily} inside math mode
% in the case of nested math, ex. equation with tcolorbox with math.
+% \changes{v0.903}{2021/12/18}{Improved math sanitization.}
% \begin{macrocode}
\ifmmode\else\LWR@print@ttfamily\fi%
- \LWR@HTMLsanitize{#4}%
+ \LWR@HTMLsanitizedetokenized{\detokenize{#4}}%
}%
\textbackslash)%
}%
@@ -37764,24 +38039,30 @@ end -- not --version
%
% \changes{v0.42}{2017/10/16}{Improved \cs{ensuremath}.}
%
-% Redefine the double dollar sign to place math inside a \env{lateximage}, or use \MathJax:
+% Redefine the double dollar sign to place math inside a \env{lateximage},
+% or use \MathJax:
% \begin{macrocode}
\protected\gdef\LWR@doubledollar$#1$${%
% \end{macrocode}
+%
% If \MathJax\ or formatting for a word processor, print the \LaTeX\ expression:
% \changes{v0.19}{2016/05/25}{\MathJax\ support.}
% \changes{v0.42}{2017/10/26}{If \progcode{FormatWP} print LaTeX expression.}
% \begin{macrocode}
-\ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
+ \ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
% \end{macrocode}
-% For \MathJax, print the math between |\[| and |\]|:
+%
+% For \MathJax, print the math between |\[| and |\]|.
+% If there is a footnote, endnote, or other kind of note (`|note|' is present),
+% sync the note numbers.
+%
% \changes{v0.42}{2017/10/16}{Improved line spacing with mathjax.}
% \changes{v0.89}{2020/08/01}{TT font for \MathJax.}
% \changes{v0.896}{2021/04/07}{Fix: Displaymath notes with \MathJax.}
% \begin{macrocode}
-{
+ {% intentional blank line:
- \IfSubStr{\detokenize\expandafter{#1}}{\detokenize{note}}{%
+ \IfSubStr{\detokenize\expandafter{#1}}{\detokenize{note}}{%
% \end{macrocode}
%
% The equation is printed to the \PDF\ output inside \HTML\ comment tags.
@@ -37789,91 +38070,105 @@ end -- not --version
% The \env{math} environment is selected here, and \cs{LWR@hidelatexequation}
% will use the original print-mode meaning of \env{math}.
% \begin{macrocode}
- \LWR@hidelatexequation{math}{#1}%
+ \LWR@hidelatexequation{math}{#1}%
% \end{macrocode}
+%
+% \changes{v0.903}{2021/12/18}{Improved math sanitization.}
% \begin{macrocode}
- \InlineClass{hidden}{\LWR@syncnotenumbers}%
- \textbackslash[%
- {\LWR@print@ttfamily\LWR@HTMLsanitize{#1}}%
- \textbackslash]
- \InlineClass{hidden}{\LWR@syncnotenames}%
- }{%
- \textbackslash[%
- {\LWR@print@ttfamily\LWR@HTMLsanitize{#1}}%
- \textbackslash]
- }%
+ \InlineClass{hidden}{\LWR@syncnotenumbers}%
+ \textbackslash[%
+ {%
+ \LWR@print@ttfamily%
+ \LWR@HTMLsanitizedetokenized{\detokenize{#1}}%
+ }%
+ \textbackslash]
+ \InlineClass{hidden}{\LWR@syncnotenames}%
+ }{%
+ \textbackslash[%
+ {%
+ \LWR@print@ttfamily%
+ \LWR@HTMLsanitizedetokenized{\detokenize{#1}}%
+ }%
+ \textbackslash]
+ }%
-}% mathjax
+ }% mathjax
% \end{macrocode}
+%
% For \SVG, print the math inside a \env{lateximage},
% with an \element{alt} tag of the \LaTeX\ code:
% \changes{v0.50}{2018/02/24}{Improved \SVG\ math \attribute{alt} tags.}
% \changes{v0.50}{2018/03/02}{Improved \SVG\ math display.}
% \changes{v0.51}{2018/03/11}{Fix: \cs{addcontentsline} inside \SVG\ math. Provides an autoid anchor.}
% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.}
+% \changes{v0.903}{2021/12/18}{Improved alt tag sanitization.}
% \begin{macrocode}
-{% not mathjax
- \begin{BlockClass}{displaymath}%
- \LWR@newautoidanchor%
- \booltrue{LWR@indisplaymathimage}%
- \begin{lateximage}%
- [%
- \textbackslash{[} % extra space
- \LWR@HTMLsanitize{#1} % extra space
- \textbackslash{]}%
- ]%
- *% do not add open/closing braces
- (math)% ARIA
+ {% not mathjax
+ \begin{BlockClass}{displaymath}%
+ \LWR@newautoidanchor%
+ \booltrue{LWR@indisplaymathimage}%
+ \begin{lateximage}%
+ [%
+ \textbackslash{[} % extra space
+ \LWR@HTMLsanitizedetokenized{\detokenize{#1}} % extra space
+ \textbackslash{]}%
+ ]%
+ *% do not add open/closing braces
+ (math)% ARIA
% \end{macrocode}
+%
% Support for \pkg{xfakebold}:
% \changes{v0.67}{2019/02/17}{\pkg{xfakebold}: Added support.}
% \begin{macrocode}
- \LWR@applyxfakebold%
+ \LWR@applyxfakebold%
% \end{macrocode}
% \begin{macrocode}
- \LWR@origdollar\LWR@origdollar#1\LWR@origdollar\LWR@origdollar%
- \end{lateximage}%
- \end{BlockClass}%
-}% not mathjax
+ \LWR@origdollar\LWR@origdollar#1\LWR@origdollar\LWR@origdollar%
+ \end{lateximage}%
+ \end{BlockClass}%
+ }% not mathjax
% \end{macrocode}
% Clear the single-use \attribute{alt} text:
% \changes{v0.74}{2019/08/20}{Add \cs{ThisAltText}.}
% \begin{macrocode}
-\gdef\LWR@ThisAltText{}%
+ \gdef\LWR@ThisAltText{}%
}%
% \end{macrocode}
% \end{macro}
%
%
%
-% \begin{macro}{\LWR@singledollar} \marg{alt text} \marg{math expression}
+% \begin{macro}{\LWR@singledollar} \marg{math expression}
% \changes{v0.89}{2020/08/01}{TT font for \MathJax.}
+% \changes{v0.903}{2021/12/18}{Improved alt tag sanitization.}
% \begin{macrocode}
\protected\gdef\LWR@singledollar#1${%
-\ifbool{mathjax}{%
- \LWR@subsingledollar*%
- {% alt tag
- \textbackslash( %
- \LWR@HTMLsanitize{#1} % extra space
- \textbackslash)%
- }%
- {singledollar}% add'l hashing
- {#1}% contents
-}{% not mathjax
- \LWR@subsingledollar*%
- {% alt tag
- \textbackslash( %
- \LWR@HTMLsanitize{#1} % extra space
- \textbackslash)%
- }%
- {singledollar}% add'l hashing
- {\LWR@origensuredmath{#1}}% contents
-}% not mathjax
+ \LWR@traceinfo{LWR@singledollar}%
+ \ifbool{mathjax}{%
+ \LWR@subsingledollar*%
+ {% alt tag
+ \textbackslash( %
+ \LWR@HTMLsanitizedetokenized{\detokenize{#1}} % extra space
+ \textbackslash)%
+ }%
+ {singledollar}% add'l hashing
+ {#1}% contents
+ }{% not mathjax
+ \LWR@subsingledollar*%
+ {% alt tag
+ \textbackslash( %
+ \LWR@HTMLsanitizedetokenized{\detokenize{#1}} % extra space
+ \textbackslash)%
+ }%
+ {singledollar}% add'l hashing
+ {\LWR@origensuredmath{#1}}% contents
+ }% not mathjax
% \end{macrocode}
+%
% Clear the single-use \attribute{alt} text:
% \changes{v0.74}{2019/08/20}{Add \cs{ThisAltText}.}
% \begin{macrocode}
-\gdef\LWR@ThisAltText{}%
+ \gdef\LWR@ThisAltText{}%
}
% \end{macrocode}
% \end{macro}
@@ -37913,6 +38208,7 @@ end -- not --version
% \changes{v0.50}{2018/02/23}{Fix: Use \env{lateximage} even if \MathJax.}
% \changes{v0.50}{2018/02/24}{Improved \SVG\ math \attribute{alt} tags.}
% \changes{v0.52}{2018/03/25}{Improved hashing expansion.}
+% \changes{v0.903}{2021/12/18}{Improved math sanitization.}
% \begin{macrocode}
\LetLtxMacro\LWR@origensuredmath\@ensuredmath
@@ -37920,7 +38216,7 @@ end -- not --version
\ifbool{mathjax}{%
\LWR@subsingledollar*{\AltTextOpen\MathImageAltText\AltTextClose}%
{%
- \protect\LWR@HTMLsanitize{\detokenize\expandafter{#1}}%
+ \protect\LWR@HTMLsanitizedetokenized{\detokenize\expandafter{#1}}%
}%
{%
\relax%
@@ -37942,7 +38238,11 @@ end -- not --version
{%
\LWR@subsingledollar*%
{\AltTextOpen\MathImageAltText\AltTextClose}%
- {\protect\LWR@HTMLsanitize{\detokenize\expandafter{#1}}}%
+ {%
+ \protect\LWR@HTMLsanitizedetokenized{%
+ \detokenize\expandafter{#1}%
+ }%
+ }%
{\LWR@origensuredmath{#1}}%
}%
\fi%
@@ -38239,7 +38539,7 @@ end -- not --version
% The environment contents and \cs{end}:
% \begin{macrocode}
\LWR@orignewline%
- \LWR@HTMLsanitizeexpand{\detokenize\expandafter{#2}}%
+ \LWR@HTMLsanitizeexpanded{\detokenize\expandafter{#2}}%
\LWR@orignewline%
\textbackslash{}end\{#1\}
}%
@@ -38335,7 +38635,7 @@ end -- not --version
(\LWR@equationtag) % automatic numbering
}%
\textbackslash{begin\{#2\}} % extra space
- \LWR@HTMLsanitizeexpand{\detokenize\expandafter{#1}} % extra space
+ \LWR@HTMLsanitizeexpanded{\detokenize\expandafter{#1}} % extra space
\textbackslash{end\{#2\}}%
]*(math)% alt tag, ARIA
% \end{macrocode}
@@ -39027,7 +39327,7 @@ end -- not --version
\newcommand*{\LWR@amsmathbody}[1]
{%
\textbackslash\{begin\}\{#1\} % extra space
- \LWR@HTMLsanitizeexpand{\detokenize\expandafter{\the\@envbody}}%
+ \LWR@HTMLsanitizeexpanded{\detokenize\expandafter{\the\@envbody}}%
\textbackslash\{end\}\{#1\}%
}
% \end{macrocode}
@@ -39088,6 +39388,7 @@ end -- not --version
% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.}
% \begin{macrocode}
\newcommand{\LWR@lateximage@oneimage}[5]{%
+ \LWR@traceinfo{LWR@lateximage@oneimage !#1!#2!#3!#4!#5!}%
\ifdefvoid{\LWR@ThisAltText}{%
\IfBooleanTF{#4}{%
\LWR@lateximage@oneimageb{#1}{#2}{#3}{#5}%
@@ -39157,6 +39458,7 @@ end -- not --version
\NewDocumentEnvironment{lateximage}{s O{\ImageAltText} s O{} O{} D(){}}%
{%
+\LWR@traceinfo{lateximage !#1!#2!#3!#4!#5!#6!}%
\LWR@traceinfo{lateximage: starting on \jobname.pdf page \arabic{page}}%
\LWR@traceinfo{lateximage: entering depth is \arabic{LWR@lateximagedepth}}%
% \end{macrocode}
@@ -39436,6 +39738,7 @@ end -- not --version
% \changes{v0.74}{2019/08/20}{New syntax for \cs{LWR@subinlineimage}.}
% \changes{v0.896}{2021/03/05}{Added \ARIA\ role.}
% \begin{macrocode}
+ \LWR@traceinfo{about to LWR@lateximage@oneimage !#2!}%
\IfBooleanTF{#1}% starred
{% hash
\LWR@lateximage@oneimage{#2}{\LWR@hashedname}{#5}{#3}{#6}%
@@ -39656,7 +39959,7 @@ end -- not --version
% \changes{v0.65}{2018/12/21}{\cs{AtBeginDocument} to avoid option clashes.}
% \begin{macrocode}
\newcommand*{\LWR@PreloadedPackage}[1]{%
- \@ifpackageloaded{#1}%
+ \IfPackageLoadedTF{#1}%
{%
\AtBeginDocument{
\LWR@origRequirePackage{lwarp-#1}%
@@ -39834,17 +40137,17 @@ end -- not --version
%
% For print output, accept and then discard the new |class| key:
% \changes{v0.65}{2018/12/19}{\pkg{graphics}: Added \cs{includegraphics} \attribute{alt} key.}
+% \changes{v0.903}{2021/12/23}{\pkg{graphics}: \attribute{alt} now in \pkg{graphicx} core.}
% \begin{macrocode}
\begin{warpprint}
\define@key{Gin}{class}{}
-\define@key{Gin}{alt}{}
% \end{macrocode}
%
% Print-mode additions for the \pkg{overpic} package.
% See \cref{sec:overpic} for the \HTML\ version.
% \begin{macrocode}
\AtBeginDocument{
-\@ifpackageloaded{overpic}{
+\IfPackageLoadedTF{overpic}{
\newcommand*{\overpicfontsize}{12}
\newcommand*{\overpicfontskip}{14}
}{}
@@ -39884,7 +40187,7 @@ end -- not --version
% \end{macrocode}
% \textred{\dots\ and \emph{only} if \pkg{xcolor} was loaded:}
% \begin{macrocode}
-\@ifpackageloaded{xcolor}{
+\IfPackageLoadedTF{xcolor}{
\LWR@traceinfo{patching xcolor}
% \end{macrocode}
%
@@ -39915,14 +40218,14 @@ end -- not --version
\newsavebox{\LWR@colorminipagebox}
\NewDocumentCommand{\LWR@print@fcolorbox}{o m o m +m}{%
-\LWR@traceinfo{LWR@print@fcolorbox #2 #4}%
+ \LWR@traceinfo{LWR@print@fcolorbox #2 #4}%
% \end{macrocode}
% Pre-load the contents into an LR box so that they can
% be used inside a \cs{fcolorbox}:
% \begin{macrocode}
-\begin{lrbox}{\LWR@colorminipagebox}%
-#5%
-\end{lrbox}%
+ \begin{lrbox}{\LWR@colorminipagebox}%
+ #5%
+ \end{lrbox}%
% \end{macrocode}
% Sort out the various optional arguments and the background color of |none|.
% In each case, the LRbox is placed inside a \cs{fcolorbox}.
@@ -39931,33 +40234,33 @@ end -- not --version
% color is used for the contents.
% \changes{v0.62}{2018/10/18}{Fix: No longer requires \pkg{xifthen}.}
% \begin{macrocode}
-\ifstrequal{#4}{none}%
-{% #4 none
- \LWR@traceinfo{background is none}%
- {% scope the \colorlet
- \colorlet{LWR@currentcolor}{.}%
- \color{#2}%
- \fbox{%
- \color{LWR@currentcolor}%
- \usebox{\LWR@colorminipagebox}%
- }% fbox
- }% colorlet
-}% #4 none
-{% #4 not none
-\LWR@traceinfo{background not none}%
-\IfValueTF{#1}%
-{%
- \IfValueTF{#3}%
- {\LWR@orig@print@fcolorbox[#1]{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}%
- {\LWR@orig@print@fcolorbox[#1]{#2}{#4}{\usebox{\LWR@colorminipagebox}}}%
-}%
-{% no value #1
- \IfValueTF{#3}%
- {\LWR@orig@print@fcolorbox{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}%
- {\LWR@orig@print@fcolorbox{#2}{#4}{\usebox{\LWR@colorminipagebox}}}%
-}% no value #1
-}% #4 not none
-\LWR@traceinfo{LWR@print@fcolorbox done}%
+ \ifstrequal{#4}{none}%
+ {% #4 none
+ \LWR@traceinfo{background is none}%
+ {% scope the \colorlet
+ \colorlet{LWR@currentcolor}{.}%
+ \color{#2}%
+ \fbox{%
+ \color{LWR@currentcolor}%
+ \usebox{\LWR@colorminipagebox}%
+ }% fbox
+ }% colorlet
+ }% #4 none
+ {% #4 not none
+ \LWR@traceinfo{background not none}%
+ \IfValueTF{#1}%
+ {%
+ \IfValueTF{#3}%
+ {\LWR@orig@print@fcolorbox[#1]{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}%
+ {\LWR@orig@print@fcolorbox[#1]{#2}{#4}{\usebox{\LWR@colorminipagebox}}}%
+ }%
+ {% no value #1
+ \IfValueTF{#3}%
+ {\LWR@orig@print@fcolorbox{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}%
+ {\LWR@orig@print@fcolorbox{#2}{#4}{\usebox{\LWR@colorminipagebox}}}%
+ }% no value #1
+ }% #4 not none
+ \LWR@traceinfo{LWR@print@fcolorbox done}%
}
% \end{macrocode}
%
@@ -39988,26 +40291,27 @@ end -- not --version
% \oarg{5:align} \oarg{6:height} \oarg{7:inner-align} \marg{8:width}
%
% In print mode, becomes a \cs{fcolorbox} containing a \env{minipage}:
+% \changes{v0.903}{2021/12/19}{Now using \cs{NewCommandCopy}.}
% \begin{macrocode}
-\NewDocumentEnvironment{LWR@print@fcolorminipage}{o m o m O{c} O{} o m}
+\NewDocumentEnvironment{fcolorminipage}{o m o m O{c} O{} o m}
{%
-\LWR@traceinfo{*** fcolorminipage: #2 #4 #8}%
+ \LWR@traceinfo{*** fcolorminipage: #2 #4 #8}%
% \end{macrocode}
% Pre-load the contents into an LR box so that they can
% be used inside a \cs{fcolorbox}:
% \begin{macrocode}
-\begin{lrbox}{\LWR@colorminipagebox}%
+ \begin{lrbox}{\LWR@colorminipagebox}%
% \end{macrocode}
% If inner alignment is not given, use the outer alignment instead:
% \begin{macrocode}
-\IfValueTF{#7}%
-{\begin{minipage}[#5][#6][#7]{#8}}%
-{\begin{minipage}[#5][#6][#5]{#8}}%
+ \IfValueTF{#7}%
+ {\begin{minipage}[#5][#6][#7]{#8}}%
+ {\begin{minipage}[#5][#6][#5]{#8}}%
}%
{%
-\end{minipage}%
-\end{lrbox}%
-\LWR@traceinfo{*** starting end fcolorminipage #1 #2 #3 #4 #8}%
+ \end{minipage}%
+ \end{lrbox}%
+ \LWR@traceinfo{*** starting end fcolorminipage #1 #2 #3 #4 #8}%
% \end{macrocode}
% Sort out the various optional arguments and the background color of |none|.
% In each case, the LRbox is placed inside a \cs{fcolorbox}.
@@ -40016,43 +40320,35 @@ end -- not --version
% color is used for the contents.
% \changes{v0.62}{2018/10/18}{Fix: No longer requires \pkg{xifthen}.}
% \begin{macrocode}
-\ifstrequal{#4}{none}%
-{% #4 none
- {% scope the \colorlet
- \colorlet{LWR@currentcolor}{.}%
- \color{#2}%
- \fbox{%
- \color{LWR@currentcolor}%
- \usebox{\LWR@colorminipagebox}%
- }% fbox
- }% colorlet
-}% #4 none
-{% #4 not none
- \IfValueTF{#1}%
- {%
- \IfValueTF{#3}%
- {\LWR@orig@print@fcolorbox[#1]{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}%
- {\LWR@orig@print@fcolorbox[#1]{#2}{#4}{\usebox{\LWR@colorminipagebox}}}%
- }%
- {% no value #1
- \IfValueTF{#3}%
- {\LWR@orig@print@fcolorbox{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}%
- {\LWR@orig@print@fcolorbox{#2}{#4}{\usebox{\LWR@colorminipagebox}}}%
- }% no value #1
-}% #4 not none
-\LWR@traceinfo{*** finished end fcolorminipage}%
+ \ifstrequal{#4}{none}%
+ {% #4 none
+ {% scope the \colorlet
+ \colorlet{LWR@currentcolor}{.}%
+ \color{#2}%
+ \fbox{%
+ \color{LWR@currentcolor}%
+ \usebox{\LWR@colorminipagebox}%
+ }% fbox
+ }% colorlet
+ }% #4 none
+ {% #4 not none
+ \IfValueTF{#1}%
+ {%
+ \IfValueTF{#3}%
+ {\LWR@orig@print@fcolorbox[#1]{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}%
+ {\LWR@orig@print@fcolorbox[#1]{#2}{#4}{\usebox{\LWR@colorminipagebox}}}%
+ }%
+ {% no value #1
+ \IfValueTF{#3}%
+ {\LWR@orig@print@fcolorbox{#2}[#3]{#4}{\usebox{\LWR@colorminipagebox}}}%
+ {\LWR@orig@print@fcolorbox{#2}{#4}{\usebox{\LWR@colorminipagebox}}}%
+ }% no value #1
+ }% #4 not none
+ \LWR@traceinfo{*** finished end fcolorminipage}%
}
% \end{macrocode}
-
-% \changes{v0.80}{2020/02/03}{Made robust.}
-% \begin{macrocode}
-\NewDocumentEnvironment{fcolorminipage}{}
- {\LWR@print@fcolorminipage}
- {\endLWR@print@fcolorminipage}
-% \end{macrocode}
% \end{environment}
-
% \pkg{xcolor} is known to have been loaded, and provided
% \HTML\ versions of the following, and the print versions are provide above,
% so now they may be \cs{LW@formatted}.
@@ -40094,7 +40390,7 @@ end -- not --version
% \begin{macrocode}
\AtBeginDocument{
-\@ifpackageloaded{chemmacros}{
+\IfPackageLoadedTF{chemmacros}{
% \end{macrocode}
%
% \begin{noindenvironment}{polymerdelims}
@@ -40803,14 +41099,14 @@ color:\LWR@origpound\LWR@tempcolor%
% may have loaded:
% \begin{macrocode}
\newcommand{\LWR@HTML@fbox}[1]{%
-\LWR@traceinfo{HTML fbox}%
-\LWR@forceminwidth{\fboxrule}%
-\LWR@traceinfo{HTML fbox B}%
-\InlineClass[%
- \LWR@print@mbox{display:inline-block} ; %
- \LWR@fboxstyle%
-]{fbox}{#1}%
-\LWR@traceinfo{HTML fbox: done}%
+ \LWR@traceinfo{HTML fbox}%
+ \LWR@forceminwidth{\fboxrule}%
+ \LWR@traceinfo{HTML fbox B}%
+ \InlineClass[%
+ \LWR@print@mbox{display:inline-block} ; %
+ \LWR@fboxstyle%
+ ]{fbox}{#1}%
+ \LWR@traceinfo{HTML fbox: done}%
}
% \end{macrocode}
% \pkg{xcolor} \cs{let}s things to \cs{fbox} when it is loaded,
@@ -40831,6 +41127,7 @@ color:\LWR@origpound\LWR@tempcolor%
% \codeall
% \begin{macrocode}
\end{warpHTML}
+
\begin{warpall}
\let\fboxBlock\fbox
\end{warpall}
@@ -40848,9 +41145,7 @@ color:\LWR@origpound\LWR@tempcolor%
\newcommand{\LWR@HTML@fboxBlock}[1]{%
\LWR@forceminwidth{\fboxrule}%
\LWR@stoppars%
-\begin{BlockClass}[%
-\LWR@fboxstyle%
-]{fboxBlock}
+\begin{BlockClass}[\LWR@fboxstyle]{fboxBlock}
#1
\end{BlockClass}
\LWR@startpars%
@@ -40868,6 +41163,7 @@ color:\LWR@origpound\LWR@tempcolor%
% Creates a framed \HTML\ \element{div} around its contents.
% \changes{v0.34}{2017/07/31}{Added.}
% \changes{v0.57}{2018/05/28}{Improved print/\HTML\ output selection.}
+% \changes{v0.903}{2021/12/19}{Now using \cs{NewCommandCopy}.}
%
% Print version:
% \codeall \\
@@ -40877,7 +41173,7 @@ color:\LWR@origpound\LWR@tempcolor%
\newsavebox{\LWR@fminipagebox}
-\NewDocumentEnvironment{LWR@print@fminipage}{O{t} o O{t} m}
+\NewDocumentEnvironment{fminipage}{O{t} o O{t} m}
{%
% \end{macrocode}
% An outer minipage will be used for vertical alignment.
@@ -40921,11 +41217,6 @@ color:\LWR@origpound\LWR@tempcolor%
% \begin{macrocode}
\endminipage%
}
-
-\LetLtxMacro\fminipage\LWR@print@fminipage
-\LetLtxMacro\endfminipage\endLWR@print@fminipage
-% \newenvironment{fminipage}{\LWR@print@fminipage}{\endLWR@print@fminipage}
-
\end{warpall}
% \end{macrocode}
%
@@ -41098,7 +41389,7 @@ color:\LWR@origpound\LWR@tempcolor%
% \begin{macro}{\texteb} \marg{text} \qquad From \pkg{nfssext-cfr}.
% \changes{v0.72}{2019/05/26}{\pkg{nfssext-cfr}: Added.}
% \begin{macrocode}
-\@ifpackageloaded{nfssext-cfr}{
+\IfPackageLoadedTF{nfssext-cfr}{
\DeclareRobustCommand{\LWR@HTML@texteb}[1]{%
{%
\LWR@HTML@ebweight%
@@ -41117,7 +41408,7 @@ color:\LWR@origpound\LWR@tempcolor%
% \begin{macro}{\textlg} \marg{text} \qquad From \pkg{nfssext-cfr}.
% \changes{v0.72}{2019/05/26}{\pkg{nfssext-cfr}: Added.}
% \begin{macrocode}
-\@ifpackageloaded{nfssext-cfr}{
+\IfPackageLoadedTF{nfssext-cfr}{
\DeclareRobustCommand{\LWR@HTML@textlg}[1]{%
{%
\LWR@HTML@lgweight%
@@ -41415,7 +41706,7 @@ color:\LWR@origpound\LWR@tempcolor%
% \begin{macro}{\ebweight} From \pkg{nfssext-cfr}.
% \changes{v0.72}{2019/05/26}{\pkg{nfssext-cfr}: Added.}
% \begin{macrocode}
-\@ifpackageloaded{nfssext-cfr}{
+\IfPackageLoadedTF{nfssext-cfr}{
\newrobustcmd*{\LWR@HTML@ebweight}{%
\LWR@print@ebweight%
\renewcommand*{\LWR@f@series}{eb}%
@@ -41428,7 +41719,7 @@ color:\LWR@origpound\LWR@tempcolor%
% \begin{macro}{\lgweight} From \pkg{nfssext-cfr}.
% \changes{v0.72}{2019/05/26}{\pkg{nfssext-cfr}: Added.}
% \begin{macrocode}
-\@ifpackageloaded{nfssext-cfr}{
+\IfPackageLoadedTF{nfssext-cfr}{
\newrobustcmd*{\LWR@HTML@lgweight}{%
\LWR@print@lgweight%
\renewcommand*{\LWR@f@series}{lg}%
@@ -42460,8 +42751,8 @@ color:\LWR@origpound\LWR@tempcolor%
}
\AtBeginDocument{
- \@ifpackageloaded{graphics}{
- \@ifpackageloaded{metalogo}{}{
+ \IfPackageLoadedTF{graphics}{
+ \IfPackageLoadedTF{metalogo}{}{
\renewrobustcmd*{\Xe}
{X\hspace{-.1667em}\raisebox{-.5ex}{\reflectbox{E}}}
}
@@ -42470,7 +42761,7 @@ color:\LWR@origpound\LWR@tempcolor%
\AtEndDocument{
\ifbool{LWR@warnXe}{
- \PackageWarningNoLine{lwarp}{Load graphicx or graphics
+ \PackageNoteNoLine{lwarp}{Load graphicx or graphics
for improved XeTeX logo}
}{}
}
@@ -42741,7 +43032,7 @@ color:\LWR@origpound\LWR@tempcolor%
% \begin{macrocode}
\begin{warpHTML}
\AtBeginDocument{
- \@ifpackageloaded{everyshi}{
+ \IfPackageLoadedTF{everyshi}{
\RequirePackage{lwarp-everyshi}
}{}
}
@@ -42775,13 +43066,13 @@ color:\LWR@origpound\LWR@tempcolor%
% \changes{v0.89}{2020/08/12}{Allow preload of \pkg{amsmath}, \pkg{amsthm}, \pkg{centernot}.}
% \begin{macrocode}
\begin{warpHTML}
-\@ifpackageloaded{amsthm}{
+\IfPackageLoadedTF{amsthm}{
\RequirePackage{lwarp-amsthm}
}{}
% \end{macrocode}
%
% \begin{macrocode}
-\@ifpackageloaded{amsmath}{
+\IfPackageLoadedTF{amsmath}{
\RequirePackage{lwarp-amsmath}
}{}
% \end{macrocode}
@@ -42789,7 +43080,7 @@ color:\LWR@origpound\LWR@tempcolor%
%
% \pkg{amsthm} may load \pkg{centernot}, so \pkg{centernot} must be checked second.
% \begin{macrocode}
-\@ifpackageloaded{centernot}{
+\IfPackageLoadedTF{centernot}{
\RequirePackage{lwarp-centernot}
}{}
\end{warpHTML}
@@ -42806,9 +43097,9 @@ color:\LWR@origpound\LWR@tempcolor%
% \end{macrocode}
%
% \begin{macrocode}
-\@ifclassloaded{scrbook}{\RequirePackage{lwarp-patch-komascript}}{}
-\@ifclassloaded{scrartcl}{\RequirePackage{lwarp-patch-komascript}}{}
-\@ifclassloaded{scrreprt}{\RequirePackage{lwarp-patch-komascript}}{}
+\IfClassLoadedTF{scrbook}{\RequirePackage{lwarp-patch-komascript}}{}
+\IfClassLoadedTF{scrartcl}{\RequirePackage{lwarp-patch-komascript}}{}
+\IfClassLoadedTF{scrreprt}{\RequirePackage{lwarp-patch-komascript}}{}
% \end{macrocode}
%
% \begin{macrocode}
@@ -42826,14 +43117,14 @@ color:\LWR@origpound\LWR@tempcolor%
% \codeprint
% \begin{macrocode}
\begin{warpprint}
-\@ifclassloaded{memoir}{\LWR@origRequirePackage{xcolor}}{}
+\IfClassLoadedTF{memoir}{\LWR@origRequirePackage{xcolor}}{}
\end{warpprint}
% \end{macrocode}
% \codehtml
% \begin{macrocode}
\begin{warpHTML}
-\@ifclassloaded{memoir}{\RequirePackage{lwarp-patch-memoir}}{}
+\IfClassLoadedTF{memoir}{\RequirePackage{lwarp-patch-memoir}}{}
\end{warpHTML}
% \end{macrocode}
@@ -42905,23 +43196,23 @@ color:\LWR@origpound\LWR@tempcolor%
}
}
-\@ifclassloaded{ujarticle}{\LWR@patchujtclasses}{}
-\@ifclassloaded{ujbook}{\LWR@patchujtclasses}{}
-\@ifclassloaded{ujreport}{\LWR@patchujtclasses}{}
-\@ifclassloaded{utarticle}{\LWR@patchujtclasses}{}
-\@ifclassloaded{utbook}{\LWR@patchujtclasses}{}
-\@ifclassloaded{utreport}{\LWR@patchujtclasses}{}
-\@ifclassloaded{ltjarticle}{\LWR@patchujtclasses}{}
-\@ifclassloaded{ltjbook}{\LWR@patchujtclasses}{}
-\@ifclassloaded{ltjreport}{\LWR@patchujtclasses}{}
-\@ifclassloaded{ltjsarticle}{\LWR@patchujtclasses}{}
-\@ifclassloaded{ltjsbook}{\LWR@patchujtclasses}{}
-\@ifclassloaded{ltjsreport}{\LWR@patchujtclasses}{}
-\@ifclassloaded{ltjskiyou}{\LWR@patchujtclasses}{}
-\@ifclassloaded{ltjspf}{\LWR@patchujtclasses}{}
-\@ifclassloaded{ltjtarticle}{\LWR@patchujtclasses}{}
-\@ifclassloaded{ltjtbook}{\LWR@patchujtclasses}{}
-\@ifclassloaded{ltjtreport}{\LWR@patchujtclasses}{}
+\IfClassLoadedTF{ujarticle}{\LWR@patchujtclasses}{}
+\IfClassLoadedTF{ujbook}{\LWR@patchujtclasses}{}
+\IfClassLoadedTF{ujreport}{\LWR@patchujtclasses}{}
+\IfClassLoadedTF{utarticle}{\LWR@patchujtclasses}{}
+\IfClassLoadedTF{utbook}{\LWR@patchujtclasses}{}
+\IfClassLoadedTF{utreport}{\LWR@patchujtclasses}{}
+\IfClassLoadedTF{ltjarticle}{\LWR@patchujtclasses}{}
+\IfClassLoadedTF{ltjbook}{\LWR@patchujtclasses}{}
+\IfClassLoadedTF{ltjreport}{\LWR@patchujtclasses}{}
+\IfClassLoadedTF{ltjsarticle}{\LWR@patchujtclasses}{}
+\IfClassLoadedTF{ltjsbook}{\LWR@patchujtclasses}{}
+\IfClassLoadedTF{ltjsreport}{\LWR@patchujtclasses}{}
+\IfClassLoadedTF{ltjskiyou}{\LWR@patchujtclasses}{}
+\IfClassLoadedTF{ltjspf}{\LWR@patchujtclasses}{}
+\IfClassLoadedTF{ltjtarticle}{\LWR@patchujtclasses}{}
+\IfClassLoadedTF{ltjtbook}{\LWR@patchujtclasses}{}
+\IfClassLoadedTF{ltjtreport}{\LWR@patchujtclasses}{}
% \end{macrocode}
%
% \begin{macrocode}
@@ -42950,7 +43241,7 @@ color:\LWR@origpound\LWR@tempcolor%
%
% \begin{macrocode}
\AtBeginDocument{
- \@ifpackageloaded{ctexpatch}{%
+ \IfPackageLoadedTF{ctexpatch}{%
\def\@partcntformat#1{%
\LWR@isolate{\CTEX@partname}~%
\CTEX@part@aftername%
@@ -42993,7 +43284,7 @@ color:\LWR@origpound\LWR@tempcolor%
% it is reverted to the original.
% \begin{macrocode}
\AtBeginDocument{
-\@ifpackageloaded{kotexutf}{%
+\IfPackageLoadedTF{kotexutf}{%
\def\LWR@kotexutf@setref#1#2#3{%
\@setref@dhucs@orig{#1}{#2}{#3}%
\ifx#1\relax\else
@@ -43034,24 +43325,22 @@ color:\LWR@origpound\LWR@tempcolor%
\begin{warpHTML}
\AtBeginDocument{
-\@ifpackageloaded{polyglossia}{
- \PackageWarningNoLine{lwarp}
+\IfPackageLoadedTF{polyglossia}{
+ \PackageNoteNoLine{lwarp}
{%
Polyglossia has been loaded. Lwarp also uses cleveref.\MessageBreak
See the cleveref documentation regarding\MessageBreak
- polyglossia support. Some languages are not supported%
+ polyglossia support. Some languages are not supported.\MessageBreak
+ --- \MessageBreak
+ If the error\MessageBreak
+ \space\space Undefined control sequence ...
+ \protect\__hook begindocument\MessageBreak
+ occurs here, use the polyglossia macro:\MessageBreak
+ \space\space\protect\setmainlanguage\protect{...\protect}
}
- \typeout{---}
- \typeout{Package lwarp:}
- \typeout{If the error}
- \typeout{\space\space``! Undefined control sequence.
- \space ... \space \protect\__hook begindocument''}
- \typeout{occurs here, use the polyglossia macro:}
- \typeout{\space\space\protect\setmainlanguage\protect{...\protect}}
- \typeout{---}
}{
- \@ifpackageloaded{babel}{
- \PackageWarningNoLine{lwarp}
+ \IfPackageLoadedTF{babel}{
+ \PackageNoteNoLine{lwarp}
{%
Babel has been loaded. Lwarp also uses cleveref.\MessageBreak
See the cleveref documentation regarding\MessageBreak
@@ -43071,12 +43360,13 @@ color:\LWR@origpound\LWR@tempcolor%
%
% \begin{macro}{\LWR@mathjaxwarn} \marg{packagename} \marg{More text.}
%
+% Issue a warning that \MathJax\ is emulated.
% To be done \cs{AtBeginDocument}.
%
% \changes{v0.79}{2020/01/18}{Warn if using packages partially supported by \MathJax.}
% \begin{macrocode}
\newcommand*{\LWR@mathjaxwarn}[2]{%
- \@ifpackageloaded{lwarp-#1}{%
+ \IfPackageLoadedTF{lwarp-#1}{%
\ifblank{#2}{%
\PackageWarningNoLine{lwarp}
{%
@@ -43096,13 +43386,14 @@ color:\LWR@origpound\LWR@tempcolor%
% \begin{macro}{\LWR@nomathjaxwarn} \marg{packagename} \marg{More text.}
%
+% Issue a warning that \MathJax\ is not supported.
% To be done \cs{AtBeginDocument}.
%
% \changes{v0.894}{2020/12/22}{Warn if using packages not supported by \MathJax.}
% \changes{v0.895}{2021/01/08}{Improved \MathJax\ warning.}
% \begin{macrocode}
\newcommand*{\LWR@nomathjaxwarn}[2]{%
- \@ifpackageloaded{lwarp-#1}{%
+ \IfPackageLoadedTF{lwarp-#1}{%
\ifblank{#2}{%
\PackageWarningNoLine{lwarp}
{%
@@ -43153,8 +43444,7 @@ color:\LWR@origpound\LWR@tempcolor%
\AtBeginDocument{
\ifbool{mathjax}{
\LWR@nomathjaxwarn{aligned-overset}{}
- \LWR@nomathjaxwarn{amscdx}
- {\LWR@forceSVGmessage{amscdx}}
+ \LWR@nomathjaxwarn{amscdx}{\LWR@forceSVGmessage{amscdx}}
\LWR@mathjaxwarn{arydshln}
{In a math array, do not use the optional argument\MessageBreak
for \protect\cdashline.\space\space
@@ -43177,10 +43467,8 @@ color:\LWR@origpound\LWR@tempcolor%
{Colors are ignored in MathJax.\MessageBreak
(Text mode tabular does support colortbl.)\MessageBreak
\LWR@forceSVGmessage{colortbl}}
- \LWR@mathjaxwarn{delarray}
- {\LWR@forceSVGmessage{delarray}}
- \LWR@nomathjaxwarn{gauss}
- {\LWR@forceSVGmessage{gauss}}
+ \LWR@mathjaxwarn{delarray}{\LWR@forceSVGmessage{delarray}}
+ \LWR@nomathjaxwarn{gauss}{\LWR@forceSVGmessage{gauss}}
\LWR@mathjaxwarn{hhline}
{A simple \protect\hline\space is used}
\LWR@mathjaxwarn{isomath}
@@ -43188,8 +43476,7 @@ color:\LWR@origpound\LWR@tempcolor%
do not use a sans font because MathJax does not yet\MessageBreak
have sans Greek. Tensors may look like vectors%
}
- \LWR@nomathjaxwarn{jkmath}
- {\LWR@forceSVGmessage{jkmath}}
+ \LWR@nomathjaxwarn{jkmath}{\LWR@forceSVGmessage{jkmath}}
\LWR@mathjaxwarn{libertinust1math}
{Some of the symbol font macros such as \protect\mathsfbfit\MessageBreak
do not use a sans font because MathJax does not yet\MessageBreak
@@ -43214,12 +43501,14 @@ color:\LWR@origpound\LWR@tempcolor%
\protect\CodeBefore\space cannot be done with MathJax.\MessageBreak
\LWR@forceSVGmessage{nicematrix}%
}
- \LWR@nomathjaxwarn{pb-diagram}
- {\LWR@forceSVGmessage{pb-diagram}}
+ \LWR@nomathjaxwarn{pb-diagram}{\LWR@forceSVGmessage{pb-diagram}}
% \LWR@mathjaxwarn{physics}
% % {The third-party extension is not used.\MessageBreak
% {The MathJax v3 extension is used.\MessageBreak
% See the Lwarp manual for details}
+ \LWR@mathjaxwarn{siunitx}
+ {Place \protect\sisetup\space before \protect\begin{document}.\MessageBreak
+ Many optional arguments are ignored}
\LWR@nomathjaxwarn{tensind}{}
\LWR@mathjaxwarn{unicode-math}
{Do not use embedded Unicode characters.\MessageBreak
@@ -43495,7 +43784,7 @@ color:\LWR@origpound\LWR@tempcolor%
%
% \changes{v0.84}{2020/03/28}{\pkg{abstract}: Updated for \pkg{memoir}.}
% \begin{macrocode}
-\@ifclassloaded{memoir}
+\IfClassLoadedTF{memoir}
{
\renewenvironment{abstract}{%
% % \titlepage
@@ -43871,10 +44160,10 @@ color:\LWR@origpound\LWR@tempcolor%
% \changes{v0.76}{2019/10/07}{\pkg{acro}: Updated for v2.10.}
% \begin{macrocode}
\ExplSyntaxOn
-\@ifpackagelater{acro}{2020/04/29}%
+\IfPackageAtLeastTF{acro}{2020/04/29}%
{}% v3 or later
{% before v3
-\@ifpackagelater{acro}{2019/09/23}%
+\IfPackageAtLeastTF{acro}{2019/09/23}%
{% v2.10 or later
\cs_gset_protected:Npn \__acro_typeset:nn #1#2
{
@@ -44026,11 +44315,11 @@ color:\LWR@origpound\LWR@tempcolor%
% Fix for acronym labels in the captions of floats.
% \changes{v0.66}{2019/01/28}{\pkg{acronym}: Fix for acronym in caption.}
% \begin{macrocode}
-\renewcommand{\@starttoc}[1]{
-\LWR@htmlelementclass{nav}{#1}
-\LetLtxMacro\@verridelabel\@gobble
-\LWR@orig@starttoc{#1}
-\LWR@htmlelementclassend{nav}{#1}
+\renewcommand{\@starttoc}[1]{%
+ \LWR@htmlelementclass{nav}{#1}
+ \LetLtxMacro\@verridelabel\@gobble
+ \LWR@orig@starttoc{#1}
+ \LWR@htmlelementclassend{nav}{#1}
}
% \end{macrocode}
@@ -44257,22 +44546,22 @@ color:\LWR@origpound\LWR@tempcolor%
% Paragraph handling to allow line numbers under certain conditions:
% \begin{macrocode}
\renewcommand{\algocf@everypar}{%
-\ifbool{LWR@algocf@dopars}{%
- \ifbool{LWR@doingstartpars}{%
- \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
- {}%
- {%
+ \ifbool{LWR@algocf@dopars}{%
+ \ifbool{LWR@doingstartpars}{%
+ \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
+ {}%
+ {%
% \end{macrocode}
% \pkg{algorthm2e} uses \cs{everypar}, so the open paragraph tag
% is generated here instead of \cs{LWR@openparagraph}:
% \begin{macrocode}
- \LWR@htmltagc{\LWR@tagregularparagraph}\LWR@orignewline%
+ \LWR@htmltagc{\LWR@tagregularparagraph}\LWR@orignewline%
% \end{macrocode}
% \begin{macrocode}
- \algocf@everyparnl\algocf@everyparhanging%
- }%
+ \algocf@everyparnl\algocf@everyparhanging%
+ }%
+ }{}%
}{}%
-}{}%
}
% \end{macrocode}
%
@@ -44280,9 +44569,9 @@ color:\LWR@origpound\LWR@tempcolor%
% \pkg{lwarp} caption handling:
% \begin{macrocode}
\renewcommand{\algocf@makecaption}[2]{%
-\LWR@HTML@caption@begin{algocf}%
-\LWR@isolate{\algocf@captiontext{#1}{#2}}%
-\LWR@HTML@caption@end%
+ \LWR@HTML@caption@begin{algocf}%
+ \LWR@isolate{\algocf@captiontext{#1}{#2}}%
+ \LWR@HTML@caption@end%
}
% \end{macrocode}
%
@@ -44312,7 +44601,7 @@ color:\LWR@origpound\LWR@tempcolor%
% Turn off line numbering while making the caption:
% \begin{macrocode}
\long\def\algocf@latexcaption#1[#2]#3{% original definition of caption
-\boolfalse{LWR@algocf@dopars}% lwarp
+\boolfalse{LWR@algocf@dopars}% lwarp
\par%
\addcontentsline{\csname ext@#1\endcsname}{#1}%
{\protect\numberline{\csname the#1\endcsname}{\ignorespaces \LWR@isolate{#2}}}%
@@ -44324,7 +44613,7 @@ color:\LWR@origpound\LWR@tempcolor%
\normalsize%
\@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par%
\endgroup%
-\booltrue{LWR@algocf@dopars}% lwarp
+\booltrue{LWR@algocf@dopars}% lwarp
}
% \end{macrocode}
%
@@ -45003,7 +45292,7 @@ color:\LWR@origpound\LWR@tempcolor%
% \pkg{amsthm} must be loaded before \pkg{mdframed}:
% \changes{v0.63}{2018/12/01}{\pkg{amsthm}, \pkg{mdframed}: Fix for enforced load order.}
% \begin{macrocode}
-\@ifpackageloaded{mdframed}{
+\IfPackageLoadedTF{mdframed}{
\PackageError{lwarp}
{%
Package mdframed must be loaded after package amsthm.\MessageBreak
@@ -45111,7 +45400,7 @@ color:\LWR@origpound\LWR@tempcolor%
% \end{macrocode}
% \changes{v0.896}{2021/04/05}{\pkg{amsthm}: Improved back refs.}
% \begin{macrocode}
- \LWR@newautopagelabel{page}%
+ \LWR@newautopagelabel{page}\LWR@orignewline%
% \end{macrocode}
% \begin{macrocode}
% \deferred@thm@head{
@@ -45582,7 +45871,7 @@ color:\LWR@origpound\LWR@tempcolor%
% If \pkg{array} is not yet loaded, remove the default nullfied macros:
% \changes{v0.901}{2021/08/20}{\pkg{array}: Fixed if \pkg{array} already loaed.}
% \begin{macrocode}
-\@ifpackageloaded{array}{}{%
+\IfPackageLoadedTF{array}{}{%
\let\firsthline\relax
\let\lasthline\relax
}
@@ -46117,7 +46406,7 @@ color:\LWR@origpound\LWR@tempcolor%
%
% Require that \pkg{authblk} be loaded before \pkg{titling}:
% \begin{macrocode}
-\@ifpackageloaded{titling}{
+\IfPackageLoadedTF{titling}{
\PackageError{lwarp-authblk}
{Package authblk must be loaded before titling}
{%
@@ -46526,8 +46815,8 @@ color:\LWR@origpound\LWR@tempcolor%
% ^^A % \LWR@stoppars%
% ^^A % }
% ^^A %
-% ^^A % \@ifpackagewith{backnaur}{perp}{\renewcommand{\bnfes}{\HTMLunicode{27c2}}}{}% \perp
-% ^^A % \@ifpackagewith{backnaur}{epsilon}{\renewcommand{\bnfes}{\HTMLunicode{3f5}}}{}% \epsilon
+% ^^A % \IfPackageLoadedWithOptionsTF{backnaur}{perp}{\renewcommand{\bnfes}{\HTMLunicode{27c2}}}{}% \perp
+% ^^A % \IfPackageLoadedWithOptionsTF{backnaur}{epsilon}{\renewcommand{\bnfes}{\HTMLunicode{3f5}}}{}% \epsilon
% ^^A % \end{macrocode}
%
%
@@ -46537,23 +46826,23 @@ color:\LWR@origpound\LWR@tempcolor%
\CustomizeMathJax{\newcommand{\bnfpn}[1]{\langle \text{\textrm{#1}} \rangle}}
\CustomizeMathJax{\newcommand{\bnfor}{\; \mid \;}}
\CustomizeMathJax{\newcommand{\bnfsp}{\;}}
-\@ifpackagewith{backnaur}{perp}{
+\IfPackageLoadedWithOptionsTF{backnaur}{perp}{
\CustomizeMathJax{\newcommand{\bnfes}{\perp}}
}{
- \@ifpackagewith{backnaur}{epsilon}{
+ \IfPackageLoadedWithOptionsTF{backnaur}{epsilon}{
\CustomizeMathJax{\newcommand{\bnfes}{\epsilon}}
}{
\CustomizeMathJax{\newcommand{\bnfes}{\lambda}}
}
}
-\@ifpackagewith{backnaur}{tsrm}{
+\IfPackageLoadedWithOptionsTF{backnaur}{tsrm}{
\CustomizeMathJax{\newcommand{\bnfts}[1]{\text{#1}}}
}{
\CustomizeMathJax{\newcommand{\bnfts}[1]{\text{\texttt{#1}}}}
}
\CustomizeMathJax{\newcommand{\bnftd}[1]{\text{\textit{#1}}}}
\CustomizeMathJax{\newcommand{\bnfsk}{\dots}}
-\@ifpackagewith{backnaur}{altpo}{
+\IfPackageLoadedWithOptionsTF{backnaur}{altpo}{
\CustomizeMathJax{\newcommand{\bnfpo}{::=}}
}{
\CustomizeMathJax{\newcommand{\bnfpo}{\models}}
@@ -47202,7 +47491,7 @@ color:\LWR@origpound\LWR@tempcolor%
\xpatchcmd{\blx@addbackref@i}
{\c@page}
- {\c@LWR@previousautopagelabel}% refto the most recent object
+ {\c@LWR@previousautopagelabel}% ref to the most recent object
{}
{\LWR@patcherror{biblatex}{blx@addbackref@i B}}
% \end{macrocode}
@@ -47785,7 +48074,7 @@ color:\LWR@origpound\LWR@tempcolor%
% be removed before loading the actual \pkg{booktabs} definitions.
% \changes{v0.79}{2019/12/09}{\pkg{booktabs}: Fix for \pkg{memoir} with \env{lateximage}.}
% \begin{macrocode}
-\@ifpackageloaded{booktabs}{}{
+\IfPackageLoadedTF{booktabs}{}{
\LetLtxMacro\toprule\relax
\LetLtxMacro\midrule\relax
\LetLtxMacro\cmidrule\cline
@@ -48438,7 +48727,7 @@ color:\LWR@origpound\LWR@tempcolor%
% For \MathJax:
% \begin{macrocode}
\begin{warpMathJax}
-\PackageWarningNoLine{lwarp, cancel}{The MathJax v3 extension will be used}
+\PackageNoteNoLine{lwarp, cancel}{The MathJax v3 extension will be used}
\CustomizeMathJax{\require{cancel}}
\end{warpMathJax}
% \end{macrocode}
@@ -48613,7 +48902,7 @@ s%
% \changes{v0.88}{2020/07/15}{\pkg{caption}, \pkg{scrextend}: Fixed \cs{caption*}.}
% \begin{macrocode}
\caption@AtBeginDocument{
-\@ifpackageloaded{lwarp-scrextend}{
+\IfPackageLoadedTF{lwarp-scrextend}{
\LetLtxMacro\captionbelow\caption
\LetLtxMacro\captionabove\caption
\LetLtxMacro\captionofbelow\captionof
@@ -48656,7 +48945,7 @@ s%
% \begin{noindmacro}{\caption@@@make}
% \marg{caption label} \marg{caption text}
% \begin{macrocode}
-\@ifpackagelater{caption3}{2020/08/23}{
+\IfPackageAtLeastTF{caption3}{2020/08/23}{
\renewcommand\caption@@@make[2]{%
\LWR@traceinfo{caption@@@make}%
% \end{macrocode}
@@ -48865,7 +49154,7 @@ s%
% \codehtml
%
% \begin{macrocode}
-\LWR@ProvidesPackagePass{cases}[2002/05/02]
+\LWR@ProvidesPackagePass{cases}[2020/03/29]
% \end{macrocode}
%
% \begin{macrocode}
@@ -48891,6 +49180,36 @@ s%
\end{lateximage}\end{BlockClass}
}
% \end{macrocode}
+
+% Patch to fix bug for \pkg{cases} when used with \pkg{microtype}:
+% \changes{v0.903}{2022/01/30}{\pkg{cases}: Updated to v3.2.}
+% ^^A *88* Remove the following if microtype is fixed:
+% \begin{macrocode}
+\makeatletter
+\begin{warpHTML}
+\AtBeginDocument{
+ \@ifpackageloaded{amsmath}
+ {
+ \xpatchcmd{\tagform@}{\leftprotrusion{(}}{(}
+ {}
+ {\LWR@patcherror{cases}{tagform@ A}}%
+ \xpatchcmd{\tagform@}{\rightprotrusion{)}}{)}
+ {}
+ {\LWR@patcherror{cases}{tagform@ B}}%
+ }
+ {
+ \xpatchcmd{\@eqnnum}{\leftprotrusion{(}}{(}
+ {}
+ {\LWR@patcherror{cases}{@eqnnum A}}%
+ \xpatchcmd{\@eqnnum}{\rightprotrusion{)}}{)}
+ {}
+ {\LWR@patcherror{cases}{@eqnnum A}}%
+ }%
+}
+\end{warpHTML}
+\makeatother
+% \end{macrocode}
+
%
% \iffalse
%</cases>
@@ -49553,7 +49872,7 @@ test {\ifnumgreater{\csuse{Changes@In########1}}{0}}%
% \begin{macrocode}
\catcode`\_=11
-\@ifpackagelater{chemfig}{2020/03/05}
+\IfPackageAtLeastTF{chemfig}{2020/03/05}
{
\xpretocmd\charge{\begin{lateximage}[-chemfig-~\PackageDiagramAltText]}
{}{\LWR@patcherror{chemfig}{charge}}
@@ -49563,7 +49882,7 @@ test {\ifnumgreater{\csuse{Changes@In########1}}{0}}%
{}{\LWR@patcherror{chemfig}{charge_c}}
}{}
-\@ifpackagelater{chemfig}{2019/04/18}%
+\IfPackageAtLeastTF{chemfig}{2019/04/18}%
{% 2019/04/18 or newer
% \end{macrocode}
% \changes{v0.896}{2021/03/04}{\pkg{chemfig}: Updated to v1.6a.}
@@ -49702,11 +50021,18 @@ test {\ifnumgreater{\csuse{Changes@In########1}}{0}}%
\boolfalse{mathjax}%
% \end{macrocode}
% An inline image is used, adjusted for the baseline:
+% \changes{v0.903}{2021/12/18}{\pkg{chemformula}: Improved alt tag sanitization.}
% \begin{macrocode}
\LWR@subsingledollar*{% lwarp
- \textbackslash{}ch\{\LWR@HTMLsanitize{#2}\}% alt text
+ \textbackslash{}%
+ ch%
+ \{%
+ \LWR@HTMLsanitizedetokenized{\detokenize{#2}}%
+ \}% alt text
}{%
- \protect\LWR@HTMLsanitize{\detokenize\expandafter{#1}}% add'l hashing
+ \protect\LWR@HTMLsanitizedetokenized{%
+ \detokenize\expandafter{#1}%
+ }% add'l hashing
}%
{%
\chemformula_ch:nn {#1} {#2}% original
@@ -49720,16 +50046,21 @@ test {\ifnumgreater{\csuse{Changes@In########1}}{0}}%
% \begin{noindmacro}{\chcpd}
% Similar to \cs{ch}.
% \changes{v0.77}{2019/10/15}{\pkg{chemformula}: Updated to v4.15.}
+% \changes{v0.903}{2021/12/18}{\pkg{chemformula}: Improved alt tag sanitization.}
% \begin{macrocode}
-\@ifpackagelater{chemformula}{2019/10/13}{
+\IfPackageAtLeastTF{chemformula}{2019/10/13}{
\cs_gset_protected:Npn \chemformula_chcpd:nn #1#2
{
\begingroup%
\boolfalse{mathjax}%
\LWR@subsingledollar*{% lwarp
- \textbackslash{}chcpd\{\LWR@HTMLsanitize{#2}\}%
+ \textbackslash{}%
+ chcpd%
+ \{%
+ \LWR@HTMLsanitizedetokenized{\detokenize{#2}}%
+ \}%
}{%
- \protect\LWR@HTMLsanitize{\detokenize\expandafter{#1}}%
+ \protect\LWR@HTMLsanitizedetokenized{\detokenize\expandafter{#1}}%
}{% original
\group_begin:
\tl_if_blank:nF {#2}
@@ -49753,14 +50084,19 @@ test {\ifnumgreater{\csuse{Changes@In########1}}{0}}%
}
}% later than 2019/10/13
{% earlier than 2019/10/13
+% \changes{v0.903}{2021/12/18}{\pkg{chemformula}: Improved alt tag sanitization.}
\cs_gset_protected:Npn \chemformula_chcpd:nn #1#2
{
\begingroup%
\boolfalse{mathjax}%
\LWR@subsingledollar*{% lwarp
- \textbackslash{}chcpd\{\LWR@HTMLsanitize{#2}\}%
+ \textbackslash{}%
+ chcpd%
+ \{%
+ \LWR@HTMLsanitizedetokenized{\detokenize{#2}}%
+ \}%
}{%
- \protect\LWR@HTMLsanitize{\detokenize\expandafter{#1}}%
+ \protect\LWR@HTMLsanitizedetokenized{\detokenize\expandafter{#1}}%
}{% original
\group_begin:
\tl_if_blank:nF {#2}
@@ -49800,11 +50136,15 @@ test {\ifnumgreater{\csuse{Changes@In########1}}{0}}%
%
% \begin{noindmacro}{\chname}
% If standalone, appears in a regular \env{lateximage}, hashed according to contents.
+% \changes{v0.903}{2021/12/18}{\pkg{chemformula}: Improved alt tag sanitization.}
% \begin{macrocode}
\RenewDocumentCommand \chname { R(){}R(){} }
{
\begin{lateximage}*[%
- \textbackslash{}chname(\LWR@HTMLsanitize{#1})(\LWR@HTMLsanitize{#2})
+ \textbackslash{}%
+ chname%
+ (\LWR@HTMLsanitizedetokenized{\detokenize{#1}})%
+ (\LWR@HTMLsanitizedetokenized{\detokenize{#2}})%
]*%
\chemformula_chwritebelow:nn {#1} {#2}
\end{lateximage}
@@ -49814,6 +50154,7 @@ test {\ifnumgreater{\csuse{Changes@In########1}}{0}}%
%
% \begin{noindmacro}{\chlewis}
% Placed inline, hashed according to contents and options.
+% \changes{v0.903}{2021/12/18}{\pkg{chemformula}: Improved alt tag sanitization.}
% \begin{macrocode}
\RenewDocumentCommand \chlewis { O{}mm }
{
@@ -49821,7 +50162,7 @@ test {\ifnumgreater{\csuse{Changes@In########1}}{0}}%
\boolfalse{mathjax}%
\LWR@subsingledollar*{\textbackslash{}chlewis\{#2\}\{#3\}}%
{
- \protect\LWR@HTMLsanitize{\detokenize\expandafter{#1}}%
+ \protect\LWR@HTMLsanitizedetokenized{\detokenize\expandafter{#1}}%
}{
\chemformula_lewis:nnn {#1} {#2} {#3}
}
@@ -50150,6 +50491,7 @@ test {\ifnumgreater{\csuse{Changes@In########1}}{0}}%
%
% \subsection{Acid-base}
%
+% \changes{v0.903}{2021/12/18}{\pkg{chemmacros}: Improved alt tag sanitization.}
% \begin{macrocode}
\AtBeginDocument{
\@ifchemmacrosmoduleloaded{acid-base}{
@@ -50160,9 +50502,14 @@ test {\ifnumgreater{\csuse{Changes@In########1}}{0}}%
\begingroup
\boolfalse{mathjax}
\LWR@subsingledollar*{
- \textbackslash{}p\{\LWR@HTMLsanitize{#1}\}
+ \textbackslash{}%
+ p%
+ \{%
+ \LWR@HTMLsanitizedetokenized{\detokenize{#1}}%
+ \}
}{
- chemmacrosp\protect\LWR@HTMLsanitize{\detokenize\expandafter{#1}}%
+ chemmacrosp%
+ \protect\LWR@HTMLsanitizedetokenized{\detokenize\expandafter{#1}}%
}{
\group_begin:
\mbox
@@ -50628,6 +50975,7 @@ test {\ifnumgreater{\csuse{Changes@In########1}}{0}}%
%
% \subsection{Orbital}
%
+% \changes{v0.903}{2021/12/18}{\pkg{chemmacros}: Improved alt tag sanitization.}
% \begin{macrocode}
\AtBeginDocument{
\@ifchemmacrosmoduleloaded{orbital}{
@@ -50638,7 +50986,10 @@ test {\ifnumgreater{\csuse{Changes@In########1}}{0}}%
\IfValueTF{#1}
{
\begin{lateximage}[%
- \textbackslash{}orbital{[}\LWR@HTMLsanitize{#1}{]}\{#2\}%
+ \textbackslash{}%
+ orbital{[}%
+ \LWR@HTMLsanitizedetokenized{\detokenize{#1}}%
+ {]}\{#2\}%
]*[][margin-left: 1em ; margin-right: 1em]
}
{
@@ -50701,6 +51052,7 @@ test {\ifnumgreater{\csuse{Changes@In########1}}{0}}%
%
% \subsection{Redox}
%
+% \changes{v0.903}{2021/12/18}{\pkg{chemmacros}: Improved alt tag sanitization.}
% \begin{macrocode}
\AtBeginDocument{
\@ifchemmacrosmoduleloaded{redox}{
@@ -50720,18 +51072,26 @@ test {\ifnumgreater{\csuse{Changes@In########1}}{0}}%
\IfBooleanTF {#1}
{
\LWR@subsingledollar*{% yes hash
- \textbackslash{}ox*\{\LWR@HTMLsanitize{#3}\}% alt
+ \textbackslash{}%
+ ox*%
+ \{%
+ \LWR@HTMLsanitizedetokenized{\detokenize{#3}}%
+ \}% alt
}{%
- star \protect\LWR@HTMLsanitize{\detokenize\expandafter{#2}}%
+ star \protect\LWR@HTMLsanitizedetokenized{\detokenize\expandafter{#2}}%
}{%
\LWR@chemmacros@ox* {#2} {#3}% contents
}%
}
{
\LWR@subsingledollar*{% yes hash
- \textbackslash{}ox*\{\LWR@HTMLsanitize{#3}\}% alt
+ \textbackslash{}%
+ ox*%
+ \{%
+ \LWR@HTMLsanitizedetokenized{\detokenize{#3}}%
+ \}% alt
}{%
- \protect\LWR@HTMLsanitize{\detokenize\expandafter{#2}}%
+ \protect\LWR@HTMLsanitizedetokenized{\detokenize\expandafter{#2}}%
}{%
\LWR@chemmacros@ox {#2} {#3}% contents
}%
@@ -50999,6 +51359,7 @@ name = \chemmacros_translate:n {scheme-name}
%
% \subsection{Thermodynamics}
%
+% \changes{v0.903}{2021/12/18}{\pkg{chemmacros}: Improved alt tag sanitization.}
% \begin{macrocode}
\AtBeginDocument{
\@ifchemmacrosmoduleloaded{thermodynamics}{
@@ -51010,7 +51371,8 @@ name = \chemmacros_translate:n {scheme-name}
\boolfalse{mathjax}
\chemmacros_set_keys:nn {thermodynamics} {#1}
\LWR@subsingledollar*{% yes hashing
- \textbackslash{}state\{\LWR@HTMLsanitize{#2}\}% alt
+ \textbackslash{}state%
+ \{\LWR@HTMLsanitizedetokenized{\detokenize{#2}}\}% alt
}{%
chemmacros_state% add'l hashing
#1% options
@@ -51343,7 +51705,7 @@ name = \chemmacros_translate:n {scheme-name}
%
% \codehtml
% \begin{macrocode}
-\@ifpackageloaded{xeCJK}{}{
+\IfPackageLoadedTF{xeCJK}{}{
\LWR@loadnever{CJK}{ctex, xeCJK}
}
@@ -51372,7 +51734,7 @@ name = \chemmacros_translate:n {scheme-name}
%
% \codehtml
% \begin{macrocode}
-\@ifpackageloaded{xeCJK}{}{
+\IfPackageLoadedTF{xeCJK}{}{
\LWR@loadnever{CJKutf8}{ctex, xeCJK}
}
@@ -51629,7 +51991,7 @@ name = \chemmacros_translate:n {scheme-name}
% If \pkg{hyperref} is loaded, \pkg{cleveref} also defines starred versions
% of \pkg{varioref} macros, so they are defined here.
% \begin{macrocode}
-\@ifpackageloaded{varioref}{
+\IfPackageLoadedTF{varioref}{
\LWR@absorbstar{vref}
\LWR@absorbstar{Vref}
\LWR@absorbstar{vrefrange}
@@ -51642,7 +52004,7 @@ name = \chemmacros_translate:n {scheme-name}
%
% \changes{v0.896}{2021/04/07}{\pkg{cleveref}: Undo \pkg{memoir} changes.}
% \begin{macrocode}
-\@ifclassloaded{memoir}{
+\IfClassLoadedTF{memoir}{
\AtBeginDocument{
\def\sf@memsub@label(#1)#2{%
\protected@edef\mem@currentlabelname{#1}%
@@ -51653,7 +52015,7 @@ name = \chemmacros_translate:n {scheme-name}
%
% \changes{v0.896}{2021/04/07}{\pkg{cleveref}: Undo \pkg{subfig} changes.}
% \begin{macrocode}
-\@ifpackageloaded{subfig}{
+\IfPackageLoadedTF{subfig}{
\def\sf@sub@label(#1)#2{%
\ifhyperrefloaded
\protected@edef\@currentlabelname{%
@@ -51773,7 +52135,7 @@ name = \chemmacros_translate:n {scheme-name}
\begin{warpMathJax}
-\@ifpackagewith{cmbright}{slantedGreek}
+\IfPackageLoadedWithOptionsTF{cmbright}{slantedGreek}
{
\LWR@mathjax@addgreek@u@it*{}{}
}
@@ -51906,6 +52268,13 @@ name = \chemmacros_translate:n {scheme-name}
\RequirePackage{xcolor}
% \end{macrocode}
%
+% \cs{color@endgroup}'s \cs{endgraf} was conflicting with \pkg{lwarp}'s
+% paragraph handling.
+% \changes{v0.903}{2021/12/13}{\pkg{color}: Par handling.}
+% \begin{macrocode}
+\let\color@endgroup\endgroup
+% \end{macrocode}
+%
% \iffalse
%</color>
% \fi
@@ -52385,16 +52754,19 @@ name = \chemmacros_translate:n {scheme-name}
% \pkg{cuted} is ignored.
%
% \changes{v0.40}{2017/09/07}{\pkg{cuted}: Added.}
+% \changes{v0.903}{2021/10/12}{\pkg{cuted}: Updated to v2.0.}
%
% \codehtml
%
% \begin{macrocode}
-\LWR@ProvidesPackageDrop{cuted}[2012/10/04]
+\LWR@ProvidesPackageDrop{cuted}[2021/10/04]
% \end{macrocode}
%
% \begin{macrocode}
\newenvironment{strip}{}{}
\newskip\stripsep
+\newtoks\preCutedStrip \preCutedStrip{}
+\newtoks\postCutedStrip \postCutedStrip{}
\def\oldcolsbreak#1{}
% \end{macrocode}
%
@@ -53714,6 +54086,14 @@ name = \chemmacros_translate:n {scheme-name}
\def\makeenmark{\@makeenmark}
% \end{macrocode}
%
+% To nullify the endnotes:
+% \changes{v0.903}{2021/12/28}{\pkg{endnotes}: Nullify endnotes.}
+% \begin{macrocode}
+\apptocmd{\LWR@nullifyfootnotes}{%
+ \renewcommand{\endnote}[2][]{}%
+ \renewcommand{\endnotemark}[1]{}%
+}{}{}
+% \end{macrocode}
%
% For \MathJax:
% \changes{v0.82}{2020/03/14}{\pkg{endnotes}: Added \MathJax\ emulation.}
@@ -55335,9 +55715,9 @@ name = \chemmacros_translate:n {scheme-name}
%
% \begin{macrocode}
\renewcommand{\GenericCaption}[1]{%
-\LWR@figcaption%
-\LWR@isolate{#1}%
-\endLWR@figcaption%
+ \LWR@figcaption%
+ \LWR@isolate{#1}%
+ \endLWR@figcaption%
}
% \end{macrocode}
%
@@ -55365,7 +55745,7 @@ name = \chemmacros_translate:n {scheme-name}
%
% \begin{macrocode}
\AtBeginEnvironment{LWR@nestspan}{%
-\RenewDocumentEnvironment{Btrivlist}{m o}{}{}%
+ \RenewDocumentEnvironment{Btrivlist}{m o}{}{}%
}
% \end{macrocode}
%
@@ -55396,17 +55776,45 @@ name = \chemmacros_translate:n {scheme-name}
% \changes{v0.51}{2018/03/17}{\pkg{fancybox}: Fix: Optional tag for \cs{item} in a span.}
% \begin{macrocode}
\RenewDocumentCommand{\LWR@nestspanitem}{d()}{%
-\if@newlist\else{\LWR@htmltagc{br /}}\fi%
-\LWR@origitem%
+ \if@newlist\else{
+ \LWR@htmltagc{br /}%
+ \LWR@orignewline%
+ }\fi%
+ \LWR@origitem%
}
% \end{macrocode}
%
% The various boxed lists become regular lists:
%
+% \changes{v0.903}{2022/01/29}{\pkg{fancybox}: Par handling.}
+% \changes{v0.903}{2022/01/29}{\pkg{fancybox}: Warn if span.}
% \begin{macrocode}
-\renewenvironment{Bitemize}[1][]{\begin{itemize}}{\end{itemize}}
-\renewenvironment{Benumerate}[1][]{\begin{enumerate}}{\end{enumerate}}
-\renewenvironment{Bdescription}[1][]{\begin{description}}{\end{description}}
+\renewenvironment{Bitemize}[1][]
+ {%
+ \LWR@spanwarnformat{Bitemize}%
+ \booltrue{LWR@starting@fancybox}%
+ \begin{itemize}%
+ \boolfalse{LWR@starting@fancybox}%
+ }
+ {\end{itemize}}
+
+\renewenvironment{Benumerate}[1][]
+ {%
+ \LWR@spanwarnformat{Benumerate}%
+ \booltrue{LWR@starting@fancybox}%
+ \begin{enumerate}%
+ \boolfalse{LWR@starting@fancybox}%
+ }
+ {\end{enumerate}}
+
+\renewenvironment{Bdescription}[1][]
+ {%
+ \LWR@spanwarnformat{Bdescription}%
+ \booltrue{LWR@starting@fancybox}%
+ \begin{description}%
+ \boolfalse{LWR@starting@fancybox}%
+ }
+ {\end{description}}
% \end{macrocode}
%
% \cs{boxput} simply prints one then the other argument,
@@ -55414,7 +55822,7 @@ name = \chemmacros_translate:n {scheme-name}
%
% \begin{macrocode}
\RenewDocumentCommand{\boxput}{s d() m m}{%
-\IfBooleanTF{#1}{#3\quad#4}{#4\quad#3}%
+ \IfBooleanTF{#1}{#3\quad#4}{#4\quad#3}%
}
% \end{macrocode}
%
@@ -55438,24 +55846,24 @@ name = \chemmacros_translate:n {scheme-name}
% \begin{macrocode}
\let\LWRFB@UseVerbatim\UseVerbatim
\renewcommand*{\UseVerbatim}[1]{%
-\LWR@atbeginverbatim{Verbatim}%
-\LWRFB@UseVerbatim{#1}%
-\LWR@afterendverbatim%
+ \LWR@atbeginverbatim{Verbatim}%
+ \LWRFB@UseVerbatim{#1}%
+ \LWR@afterendverbatim%
}
\let\LWRFB@LUseVerbatim\LUseVerbatim
\renewcommand*{\LUseVerbatim}[1]{%
-\LWR@atbeginverbatim{LVerbatim}%
-\noindent%
-\LWRFB@LUseVerbatim{#1}%
-\LWR@afterendverbatim%
+ \LWR@atbeginverbatim{LVerbatim}%
+ \noindent%
+ \LWRFB@LUseVerbatim{#1}%
+ \LWR@afterendverbatim%
}
\def\@BUseVerbatim[#1]#2{%
-\LWR@atbeginverbatim{BVerbatim}%
-\LWRFB@UseVerbatim{#2}%
-\LWR@afterendverbatim%
+ \LWR@atbeginverbatim{BVerbatim}%
+ \LWRFB@UseVerbatim{#2}%
+ \LWR@afterendverbatim%
}
% \end{macrocode}
%
@@ -55653,6 +56061,7 @@ name = \chemmacros_translate:n {scheme-name}
\LWR@ProvidesPackagePass{fancyref}[1999/02/03]
% \end{macrocode}
%
+% \DescribeHook[fancyref]{\cs{fancyrefhook}}
% To remove the \optn{margin} option, if \cs{fancyrefhook} is anything
% other than the \optn{paren} option, then force it to the default instead.
% (Comparing to the \optn{margin} option was not possible since \pkg{lwarp} has
@@ -57053,7 +57462,7 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
\newbool{LWR@subcaptionloaded}
\AtBeginDocument{
-\@ifpackageloaded{subcaption}
+\IfPackageLoadedTF{subcaption}
{\booltrue{LWR@subcaptionloaded}}
{\boolfalse{LWR@subcaptionloaded}}
}
@@ -57411,12 +57820,13 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
% \DescribePackage{flushend} \pkg{flushend} is ignored.
%
% \changes{v0.34}{2017/07/27}{\pkg{flushend}: Added.}
+% \changes{v0.903}{2021/10/12}{\pkg{flushend}: Updated to v4.0.}
%
% \codehtml
%
% Discard all options for \pkg{lwarp-flushend}:
% \begin{macrocode}
-\LWR@ProvidesPackageDrop{flushend}[2017/03/27]
+\LWR@ProvidesPackageDrop{flushend}[2021/10/04]
% \end{macrocode}
%
% \begin{macrocode}
@@ -57424,8 +57834,8 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
\newcommand*{\raggedend}{}
\newcommand*{\flushcolsend}{}
\newcommand*{\raggedcolsend}{}
-\newcommand*{\atColsBreak}[1]{}
-\newcommand*{\atColsEnd}[1]{}
+\newtoks\atColsBreak \atColsBreak={}
+\newtoks\atColsEnd \atColsEnd={}
\newcommand*{\showcolsendrule}{}
% \end{macrocode}
%
@@ -58035,7 +58445,10 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
\begingroup%
\let\@makefntext\@empty%
\let\@finalstrut\@gobble%
- \LetLtxMacro\rule\@gobbletwo% *8* also the optional argument?
+% \end{macrocode}
+% ^^A *8* In the following line, also the optional argument?
+% \begin{macrocode}
+ \LetLtxMacro\rule\@gobbletwo%
\booltrue{LWR@spewingnotes}% lwarp
\@footnotetext{\unvbox\z@}%
\endgroup%
@@ -58339,13 +58752,13 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
\begin{warpMathJax}
-\@ifpackagewith{fourier}{sloped}
+\IfPackageLoadedWithOptionsTF{fourier}{sloped}
{
\LWR@mathjax@addgreek@l@up{other}{}
\LWR@mathjax@addgreek@u@it*{other}{}
}% sloped
{% not sloped
- \@ifpackagewith{fourier}{upright}
+ \IfPackageLoadedWithOptionsTF{fourier}{upright}
{% upright option
\LWR@mathjax@addgreek@l@up{}{}
\LWR@mathjax@addgreek@u@up*{}{}
@@ -58431,60 +58844,66 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
% Accept all options for \pkg{lwarp-framed}:
% \begin{macrocode}
\LWR@ProvidesPackagePass{framed}[2011/10/22]
+
\AtBeginDocument{\RequirePackage{xcolor}}% for \convertcolorspec
% \end{macrocode}
% \begin{macrocode}
-
-\renewenvironment{framed}{%
-\LWR@forcenewpage
-\BlockClass{framed}%
+\renewenvironment{framed}
+{%
+ \LWR@forcenewpage
+ \BlockClass{framed}%
}
{\endBlockClass}
-\renewenvironment{oframed}{%
-\LWR@forcenewpage
-\BlockClass{framed}%
+\renewenvironment{oframed}
+{%
+ \LWR@forcenewpage
+ \BlockClass{framed}%
}
{\endBlockClass}
-\renewenvironment{shaded}{%
-\convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor%
-\LWR@forcenewpage
-\BlockClass[background: \LWR@origpound\LWR@tempcolor]{shaded}%
+\renewenvironment{shaded}
+{%
+ \convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor%
+ \LWR@forcenewpage
+ \BlockClass[background: \LWR@origpound\LWR@tempcolor]{shaded}%
}
{\endBlockClass}
-\renewenvironment{shaded*}{%
-\convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor%
-\LWR@forcenewpage
-\BlockClass[background: \LWR@origpound\LWR@tempcolor]{shaded}%
+\renewenvironment{shaded*}
+{%
+ \convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor%
+ \LWR@forcenewpage
+ \BlockClass[background: \LWR@origpound\LWR@tempcolor]{shaded}%
}
{\endBlockClass}
\renewenvironment{leftbar}{%
-\LWR@forcenewpage
+ \LWR@forcenewpage
\BlockClass{framedleftbar}
- \def\FrameCommand{}%
- \MakeFramed {}
+ \def\FrameCommand{}%
+ \MakeFramed {}
}%
- {\endMakeFramed\endBlockClass}
+{\endMakeFramed\endBlockClass}
-\renewenvironment{snugshade}{%
-\convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor%
-\LWR@forcenewpage
-\BlockClass[background: \LWR@origpound\LWR@tempcolor]{snugframed}%
+\renewenvironment{snugshade}
+{%
+ \convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor%
+ \LWR@forcenewpage
+ \BlockClass[background: \LWR@origpound\LWR@tempcolor]{snugframed}%
}
{\endBlockClass}
-\renewenvironment{snugshade*}{%
-\convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor%
-\LWR@forcenewpage
-\BlockClass[background: \LWR@origpound\LWR@tempcolor]{snugframed}%
+\renewenvironment{snugshade*}
+{%
+ \convertcolorspec{named}{shadecolor}{HTML}\LWR@tempcolor%
+ \LWR@forcenewpage
+ \BlockClass[background: \LWR@origpound\LWR@tempcolor]{snugframed}%
}
{\endBlockClass}
@@ -58493,47 +58912,49 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
\RenewEnviron{titled-frame}[1]{%
-\CustomFBox{#1}{}{0pt}{0pt}{0pt}{0pt}{\BODY}
+ \CustomFBox{#1}{}{0pt}{0pt}{0pt}{0pt}{\BODY}
}
% \end{macrocode}
-% \cs{CustomFBox} \marg{toptitle} \marg{bottitle}
+% \begin{noindmacro}{\CustomFBox} \marg{toptitle} \marg{bottitle}
% \marg{thicknesstop} \marg{bottom} \marg{left} \marg{right}
% \marg{text contents}
% \begin{macrocode}
\renewcommand{\CustomFBox}[7]{%
-\convertcolorspec{named}{TFFrameColor}{HTML}\LWR@tempcolor%
-\LWR@forcenewpage
-\begin{BlockClass}[border: 3px solid \LWR@origpound\LWR@tempcolor]{framed}%
-\ifthenelse{\isempty{#1}}{}{% not empty
- \begin{BlockClass}[background: \LWR@origpound\LWR@tempcolor]{framedtitle}%
- \textcolor{TFTitleColor}{\textbf{#1}}%
- \end{BlockClass}
-}% not empty
+ \convertcolorspec{named}{TFFrameColor}{HTML}\LWR@tempcolor%
+ \LWR@forcenewpage
+ \begin{BlockClass}[border: 3px solid \LWR@origpound\LWR@tempcolor]{framed}%
+ \ifthenelse{\isempty{#1}}{}{% not empty
+ \begin{BlockClass}[background: \LWR@origpound\LWR@tempcolor]{framedtitle}%
+ \textcolor{TFTitleColor}{\textbf{#1}}%
+ \end{BlockClass}%
+ }% not empty
-#7
+ #7
-\ifthenelse{\isempty{#2}}{}{% not empty
- \convertcolorspec{named}{TFFrameColor}{HTML}\LWR@tempcolor%
- \begin{BlockClass}[background: \LWR@origpound\LWR@tempcolor]{framedtitle}%
- \textcolor{TFTitleColor}{\textbf{#2}}%
- \end{BlockClass}
-}% not empty
-\end{BlockClass}
+ \ifthenelse{\isempty{#2}}{}{% not empty
+ \convertcolorspec{named}{TFFrameColor}{HTML}\LWR@tempcolor%
+ \begin{BlockClass}[background: \LWR@origpound\LWR@tempcolor]{framedtitle}%
+ \textcolor{TFTitleColor}{\textbf{#2}}%
+ \end{BlockClass}%
+ }% not empty
+ \end{BlockClass}%
}
% \end{macrocode}
+% \end{noindmacro}
-% \cs{TitleBarFrame} \oarg{marker} \marg{title} \marg{contents}
+% \begin{noindmacro}{\TitleBarFrame} \oarg{marker} \marg{title} \marg{contents}
% \begin{macrocode}
-\renewcommand\TitleBarFrame[3][]{
-\CustomFBox
- {#2}{}%
- \fboxrule\fboxrule\fboxrule\fboxrule
- {#3}%
+\renewcommand\TitleBarFrame[3][]{%
+ \CustomFBox%
+ {#2}{}%
+ \fboxrule\fboxrule\fboxrule\fboxrule%
+ {#3}%
}
% \end{macrocode}
+% \end{noindmacro}
% \begin{macrocode}
@@ -58541,24 +58962,26 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
% \end{macrocode}
-% \env{MakeFramed} \marg{settings}
+% \begin{noindenvironment}{MakeFramed} \marg{settings}
% \begin{macrocode}
\let\MakeFramed\relax
\let\endMakeFramed\relax
\NewEnviron{MakeFramed}[1]{%
-\FrameCommand{\begin{minipage}{\linewidth}\BODY\end{minipage}}%
+ \FrameCommand{\begin{minipage}{\linewidth}\BODY\end{minipage}}%
}
% \end{macrocode}
+% \end{noindenvironment}
-% \cs{fb@put@frame} \marg{frame cmd no split} \marg{frame cmd split}
+% \begin{noindmacro}{\fb@put@frame} \marg{frame cmd no split} \marg{frame cmd split}
% \begin{macrocode}
\renewcommand*{\fb@put@frame}[2]{%
-\relax%
-\@tempboxa%
+ \relax%
+ \@tempboxa%
}
% \end{macrocode}
+% \end{noindmacro}
% \iffalse
%</framed>
@@ -59637,7 +60060,7 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
% \begin{macrocode}
\define@key{igraph}{scale}{%
\ifthenelse{\equal{#1}{1}}{}{% must expand #1
- \PackageWarning{lwarp}{%
+ \PackageNote{lwarp}{%
It is recommended to use ``[width=xx\protect\linewidth]''\MessageBreak
instead of ``[scale=yy]'',%
}%
@@ -59755,10 +60178,10 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
% which is enabled inside a \env{lateximage}.
% \changes{v0.42}{2017/10/24}{\pkg{graphics}: Fix: Class key.}
% \changes{v0.65}{2018/12/19}{\pkg{graphics}: Added \cs{includegraphics} \attribute{alt} key.}
+% \changes{v0.903}{2021/12/23}{\pkg{graphics}: \attribute{alt} now in \pkg{graphicx} core.}
% \begin{macrocode}
\AtBeginDocument{
\define@key{Gin}{class}{}
-\define@key{Gin}{alt}{}
}
% \end{macrocode}
@@ -59770,7 +60193,7 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
% converts \EPS\ to \PDF, and the following must NOT be done.
% \begin{macrocode}
\AtBeginDocument{
-\@ifpackageloaded{epstopdf}
+\IfPackageLoadedTF{epstopdf}
{
\newcommand*{\LWR@replaceEPSSVG}{}
}{%
@@ -60650,7 +61073,7 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
%
%
% \begin{macrocode}
-\@ifclassloaded{memoir}{
+\IfClassLoadedTF{memoir}{
\let\hangpara\relax
\let\hangparas\relax
\let\endhangparas\relax
@@ -62908,7 +63331,7 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
% \begin{macrocode}
\LWR@ProvidesPackagePass{keyfloat}[2019/09/23]
-\@ifpackagelater{keyfloat}{2019/09/23}{\relax}{
+\IfPackageAtLeastTF{keyfloat}{2019/09/23}{\relax}{
\PackageError{lwarp-keyfloat}
{%
The keyfloat package is out of date.\MessageBreak
@@ -62925,10 +63348,13 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
% \begin{macrocode}
\AtBeginDocument{
% \end{macrocode}
+
+% \DescribeHook[keyfloat]{\cs{KFLT@LWR@hook@boxouter}} Integration for \pkg{keyfloat}.
%
% \changes{v0.75}{2019/09/12}{\pkg{keyfloat}: Fix: \cs{normalcolor}.}
% \begin{macrocode}
\providecommand*{\KFLT@LWR@hook@boxouter}{}
+
\renewcommand*{\KFLT@LWR@hook@boxouter}{%
\ifbool{KFLT@keywrap}{%
}{%
@@ -62942,15 +63368,21 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
}
% \end{macrocode}
%
+% \DescribeHook[keyfloat]{\cs{KFLT@LWR@hook@keysubfloats}} Integration for \pkg{keyfloat}.
+%
% \changes{v0.75}{2019/09/12}{\pkg{keyfloat}: Fix: \cs{normalcolor}.}
% \begin{macrocode}
\LetLtxMacro\KFLT@LWR@hook@keysubfloats\KFLT@LWR@hook@boxouter
-
+% \end{macrocode}
+%
+% \DescribeHook[keyfloat]{\cs{KFLT@LWR@hook@keyfloatsminipage}} Integration for \pkg{keyfloat}.
+% \begin{macrocode}
\let\KFLT@LWR@hook@keyfloatsminipage\relax
\let\endKFLT@LWR@hook@keyfloatsminipage\relax
\newenvironment*{KFLT@LWR@hook@keyfloatsminipage}[1]{}{}
% \end{macrocode}
%
+% \DescribeHook[keyfloat]{\cs{KFLT@LWR@hook@keyfloats}} Integration for \pkg{keyfloat}.
% \changes{v0.75}{2019/09/12}{\pkg{keyfloat}: Fix: \cs{normalcolor}.}
% \begin{macrocode}
\LetLtxMacro\KFLT@LWR@hook@keyfloats\KFLT@LWR@hook@boxouter
@@ -63131,7 +63563,7 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
}% text to add
}
-\@ifpackageloaded{tocdata}
+\IfPackageLoadedTF{tocdata}
{}
{% tocdata not loaded
@@ -63518,17 +63950,49 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
\CustomizeMathJax{\let\variiiint\iiiint}
\CustomizeMathJax{\let\varidotsint\idotsint}
-\CustomizeMathJax{\newcommand{\varointctrclockwise}{\mathop{\unicode{x2939}\!\!\unicode{x0222E}}}}
-\CustomizeMathJax{\newcommand{\oiintclockwise}{\mathop{\unicode{x0222F}\!\!\unicode{x2938}}}}
-\CustomizeMathJax{\newcommand{\oiintctrclockwise}{\mathop{\unicode{x2939}\!\!\unicode{x0222F}}}}
-\CustomizeMathJax{\newcommand{\varoiintclockwise}{\mathop{\unicode{x0222F}\!\!\unicode{x2938}}}}
-\CustomizeMathJax{\newcommand{\varoiintctrclockwise}{\mathop{\unicode{x2939}\!\!\unicode{x0222F}}}}
-\CustomizeMathJax{\newcommand{\oiiintclockwise}{\mathop{\unicode{x02230}\!\!\unicode{x2938}}}}
-\CustomizeMathJax{\newcommand{\oiiintctrclockwise}{\mathop{\unicode{x2939}\!\!\unicode{x02230}}}}
-\CustomizeMathJax{\newcommand{\varoiiintclockwise}{\mathop{\unicode{x02230}\!\!\unicode{x2938}}}}
-\CustomizeMathJax{\newcommand{\varoiiintctrclockwise}{\mathop{\unicode{x2939}\!\!\unicode{x02230}}}}
-\CustomizeMathJax{\newcommand{\sqiint}{\mathop{\unicode{x2A16}\!\!\unicode{x2A16}}}}
-\CustomizeMathJax{\newcommand{\sqiiint}{\mathop{\unicode{x2A16}\!\!\unicode{x2A16}\!\!\unicode{x2A16}}}}
+\CustomizeMathJax{\newcommand{\varointctrclockwise}{%
+ \mathop{\unicode{x2939}\!\!\unicode{x0222E}}%
+}}
+
+\CustomizeMathJax{\newcommand{\oiintclockwise}{%
+ \mathop{\unicode{x0222F}\!\!\unicode{x2938}}%
+}}
+
+\CustomizeMathJax{\newcommand{\oiintctrclockwise}{%
+ \mathop{\unicode{x2939}\!\!\unicode{x0222F}}%
+}}
+
+\CustomizeMathJax{\newcommand{\varoiintclockwise}{%
+ \mathop{\unicode{x0222F}\!\!\unicode{x2938}}%
+}}
+
+\CustomizeMathJax{\newcommand{\varoiintctrclockwise}{%
+ \mathop{\unicode{x2939}\!\!\unicode{x0222F}}%
+}}
+
+\CustomizeMathJax{\newcommand{\oiiintclockwise}{%
+ \mathop{\unicode{x02230}\!\!\unicode{x2938}}%
+}}
+
+\CustomizeMathJax{\newcommand{\oiiintctrclockwise}{%
+ \mathop{\unicode{x2939}\!\!\unicode{x02230}}%
+}}
+
+\CustomizeMathJax{\newcommand{\varoiiintclockwise}{%
+ \mathop{\unicode{x02230}\!\!\unicode{x2938}}%
+}}
+
+\CustomizeMathJax{\newcommand{\varoiiintctrclockwise}{%
+ \mathop{\unicode{x2939}\!\!\unicode{x02230}}%
+}}
+
+\CustomizeMathJax{\newcommand{\sqiint}{%
+ \mathop{\unicode{x2A16}\!\!\unicode{x2A16}}%
+}}
+
+\CustomizeMathJax{\newcommand{\sqiiint}{%
+ \mathop{\unicode{x2A16}\!\!\unicode{x2A16}\!\!\unicode{x2A16}}%
+}}
\CustomizeMathJax{\let\widearc\overparen}
\CustomizeMathJax{\let\widearcarrow\overrightarrow}
@@ -64535,7 +64999,15 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
% \end{macrocode}
%
% \begin{macrocode}
-\SetLipsumParListItemEnd{\LWR@closeparagraph}
+\SetLipsumParListItemEnd{%
+ \LWR@closeparagraph%
+% \end{macrocode}
+% \changes{v0.903}{2021/12/13}{\pkg{lipsum}: Par handling.}
+% \begin{macrocode}
+ \leavevmode\LWR@orignewline%
+% \end{macrocode}
+% \begin{macrocode}
+}
% \end{macrocode}
%
% \iffalse
@@ -66572,17 +67044,26 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
% and some bold fonts may not be not supported by \MathJax.
%
% \changes{v0.89}{2020/08/31}{\pkg{mathalpha}: Added.}
+% \changes{v0.903}{2021/12/23}{\pkg{mathalpha}: Updated for v1.14+.}
%
% \codehtml
%
% \begin{macrocode}
-\LWR@ProvidesPackagePass{mathalpha}[2019/10/05]
+\LWR@ProvidesPackagePass{mathalpha}[2021/11/18]
\begin{warpMathJax}
+\CustomizeMathJax{\newcommand{\mathbfbb}[1]{\boldsymbol{\mathbb{#1}}}}% not bold
+\CustomizeMathJax{\newcommand{\mathbfcal}[1]{\boldsymbol{\mathcal{#1}}}}
+\CustomizeMathJax{\newcommand{\mathbffrak}[1]{\boldsymbol{\mathfrak{#1}}}}
+\CustomizeMathJax{\newcommand{\mathbfscr}[1]{\boldsymbol{\mathscr{#1}}}}% not bold
+
+\IfPackageLoadedWithOptionsTF{mathalpha}{oldbold}
+{
\CustomizeMathJax{\newcommand{\mathbbb}[1]{\boldsymbol{\mathbb{#1}}}}% not bold
\CustomizeMathJax{\newcommand{\mathbcal}[1]{\boldsymbol{\mathcal{#1}}}}
\CustomizeMathJax{\newcommand{\mathbfrak}[1]{\boldsymbol{\mathfrak{#1}}}}
\CustomizeMathJax{\newcommand{\mathbscr}[1]{\boldsymbol{\mathscr{#1}}}}% not bold
+}{}
\end{warpMathJax}
% \end{macrocode}
%
@@ -67009,7 +67490,7 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
\begin{warpMathJax}
\LWR@infoprocessingmathjax{mathptmx}
-\@ifpackagewith{mathptmx}{slantedGreek}
+\IfPackageLoadedWithOptionsTF{mathptmx}{slantedGreek}
{\LWR@mathjax@addgreek@u@it*{}{}}
{}
@@ -68587,26 +69068,34 @@ background:
% The new definition, called from the new \cs{ce} after math shift is set.
% The starred \env{lateximage} uses a hashed filename for the \SVG\ image.
% The \attribute{alt} tag is set to the \pkg{mhchem} expression.
+% \changes{v0.903}{2021/12/18}{\pkg{mhchem}: Improved alt tag sanitization.}
% \begin{macrocode}
\newcommand{\LWR@mhchem@HTML@ce}[1]{%
-\LWR@findcurrenttextcolor% sets \LWR@tempcolor
-\ifbool{LWR@xfakebold}%
- {\def\LWR@tempone{Y}}%
- {\def\LWR@tempone{N}}%
-\begin{lateximage}*[\textbackslash{}ce\{\LWR@HTMLsanitize{#1}\}]*%
- [%
- FM\LWR@f@family%
- SR\LWR@f@series%
- SH\LWR@f@shape%
- SHC\LWR@f@shapecaps%
- CL\LWR@tempcolor%
- FB\LWR@tempone% xfakebold
- ]%
-\LWR@setcurrentfont%
-\LWR@mhchem@origce{#1}%
-\end{lateximage}%
-\endgroup%
-\addtocounter{LWR@mhchem@cedepth}{-1}%
+ \LWR@findcurrenttextcolor% sets \LWR@tempcolor
+ \ifbool{LWR@xfakebold}%
+ {\def\LWR@tempone{Y}}%
+ {\def\LWR@tempone{N}}%
+ \begin{lateximage}%
+ *%
+ [%
+ \textbackslash{}%
+ ce%
+ \{\LWR@HTMLsanitizedetokenized{\detokenize{#1}}\}%
+ ]%
+ *%
+ [%
+ FM\LWR@f@family%
+ SR\LWR@f@series%
+ SH\LWR@f@shape%
+ SHC\LWR@f@shapecaps%
+ CL\LWR@tempcolor%
+ FB\LWR@tempone% xfakebold
+ ]%
+ \LWR@setcurrentfont%
+ \LWR@mhchem@origce{#1}%
+ \end{lateximage}%
+ \endgroup%
+ \addtocounter{LWR@mhchem@cedepth}{-1}%
}
% \end{macrocode}
@@ -68619,12 +69108,12 @@ background:
% The new \cs{ce}. Sets math shift then continues.
% \begin{macrocode}
\renewcommand{\ce}{%
-\begingroup%
-\ifnumequal{\value{LWR@mhchem@cedepth}}{0}{%
- \catcode`\$=3% math shift
-}{}%
-\addtocounter{LWR@mhchem@cedepth}{1}%
-\LWR@mhchem@HTML@ce%
+ \begingroup%
+ \ifnumequal{\value{LWR@mhchem@cedepth}}{0}{%
+ \catcode`\$=3% math shift
+ }{}%
+ \addtocounter{LWR@mhchem@cedepth}{1}%
+ \LWR@mhchem@HTML@ce%
}
% \end{macrocode}
@@ -68636,26 +69125,34 @@ background:
% The new definition, called from the new \cs{cesplit} after math shift is set.
% The starred \env{lateximage} uses a hashed filename for the \SVG\ image.
% The \attribute{alt} tag is set to the \pkg{mhchem} expression.
+% \changes{v0.903}{2021/12/18}{\pkg{chemmacros}: Improved alt tag sanitization.}
% \begin{macrocode}
\newcommand*{\LWR@mhchem@HTML@cesplit}[2]
{%
-\LWR@findcurrenttextcolor% sets \LWR@tempcolor
-\ifbool{LWR@xfakebold}%
- {\def\LWR@tempone{Y}}%
- {\def\LWR@tempone{N}}%
-\begin{lateximage}*[\textbackslash{}cesplit\{\LWR@HTMLsanitize{#2}\}]*%
- [%
- FM\LWR@f@family%
- SR\LWR@f@series%
- SH\LWR@f@shape%
- SHC\LWR@f@shapecaps%
- CL\LWR@tempcolor%
- FB\LWR@tempone% xfakebold
- ]%
-\LWR@setcurrentfont%
-\LWR@mhchem@origcesplit{#1}{#2}%
-\end{lateximage}%
-\endgroup%
+ \LWR@findcurrenttextcolor% sets \LWR@tempcolor
+ \ifbool{LWR@xfakebold}%
+ {\def\LWR@tempone{Y}}%
+ {\def\LWR@tempone{N}}%
+ \begin{lateximage}%
+ *%
+ [%
+ \textbackslash{}%
+ cesplit%
+ \{\LWR@HTMLsanitizedetokenized{\detokenize{#2}}\}%
+ ]%
+ *%
+ [%
+ FM\LWR@f@family%
+ SR\LWR@f@series%
+ SH\LWR@f@shape%
+ SHC\LWR@f@shapecaps%
+ CL\LWR@tempcolor%
+ FB\LWR@tempone% xfakebold
+ ]%
+ \LWR@setcurrentfont%
+ \LWR@mhchem@origcesplit{#1}{#2}%
+ \end{lateximage}%
+ \endgroup%
}
% \end{macrocode}
@@ -68668,12 +69165,12 @@ background:
% The new \cs{cesplit}. Sets math shift then continues.
% \begin{macrocode}
\renewcommand{\cesplit}{%
-\begingroup%
-\ifnumequal{\value{LWR@mhchem@cesplitdepth}}{0}{%
- \catcode`\$=3% math shift
-}{}%
-\addtocounter{LWR@mhchem@cesplitdepth}{1}%
-\LWR@mhchem@HTML@cesplit%
+ \begingroup%
+ \ifnumequal{\value{LWR@mhchem@cesplitdepth}}{0}{%
+ \catcode`\$=3% math shift
+ }{}%
+ \addtocounter{LWR@mhchem@cesplitdepth}{1}%
+ \LWR@mhchem@HTML@cesplit%
}
% \end{macrocode}
@@ -68740,7 +69237,7 @@ background:
\DeclareDocumentCommand{\microtypesetup}{m}{}
\DeclareDocumentCommand{\microtypecontext}{m}{}
\DeclareDocumentCommand{\textmicrotypecontext}{m m}{#2}
-\@ifpackageloaded{letterspace}{\let\MT@textls\relax}{%
+\IfPackageLoadedTF{letterspace}{\let\MT@textls\relax}{%
\DeclareDocumentCommand{\lsstyle}{}{}
\DeclareDocumentCommand{\textls}{o +m}{}
\DeclareDocumentCommand{\lslig}{m}{#1}
@@ -68946,11 +69443,12 @@ background:
% if other formatting is included.
%
% \changes{v0.892}{2020/10/07}{\pkg{minted}: Added.}
+% \changes{v0.903}{2022/01/02}{\pkg{minted}: Updated to v2.6.}
%
% \codehtml
%
% \begin{macrocode}
-\LWR@ProvidesPackagePass{minted}[2017/07/19]
+\LWR@ProvidesPackagePass{minted}[2021/12/24]
% \end{macrocode}
%
% \begin{macrocode}
@@ -68995,6 +69493,15 @@ background:
}
{}
{\LWR@patcherror{minted}{inputminted}}
+
+\renewenvironment{minted@snugshade*}[1]%
+{%
+ \colorlet{shadecolor}{#1}%
+ \begin{snugshade*}%
+}
+{%
+ \end{snugshade*}%
+}
% \end{macrocode}
%
% \iffalse
@@ -69820,7 +70327,7 @@ background:
% \end{macrocode}
%
% \begin{macrocode}
-\LWR@ProvidesPackagePass{multirow}[2021/01/29]
+\LWR@ProvidesPackagePass{multirow}[2021/03/15]
% \end{macrocode}
%
%
@@ -69837,12 +70344,15 @@ background:
%
% \begin{noindmacro}{\LWR@multirow@par} \cs{par} inside a \cs{multirow}.
% \begin{macrocode}
-\newcommand*{\LWR@multirow@par}{\LWR@htmltag{br /}\LWR@origpar}%
+\newcommand*{\LWR@multirow@par}{%
+ \LWR@htmltag{br /}%
+}%
% \end{macrocode}
% \end{noindmacro}
%
% \DescribeMacro{\multirow}
-% \oarg{vpos} \marg{numrows} \oarg{bigstruts} \marg{width} \oarg{fixup} \marg{text}
+% \oarg{1: vpos} \marg{2: numrows} \oarg{3:bigstruts}
+% \marg{4: width} \oarg{5: vmove} \marg{6: text}
% \changes{v0.19}{2015/05/28}{\pkg{multirow}: Added optional args.}
% \changes{v0.39}{2017/08/30}{\pkg{multirow}: Add: New optional \optn{vpos} argument.}
% \changes{v0.39}{2017/08/30}{\pkg{multirow}: Add: Supports left/right border for \pkg{bigdelim}.}
@@ -69854,73 +70364,80 @@ background:
% \begin{macrocode}
\NewDocumentCommand{\LWR@HTML@multirow}{O{c} m o m o +m}%
{%
-\LWR@traceinfo{*** LWR@HTML@multirow #1 #2 #4}%
+ \LWR@traceinfo{LWR@HTML@multirow #1 #2 #4}%
% \end{macrocode}
% \changes{v0.69}{2019/03/07}{\pkg{multirow}: Error if \cs{multirow} without \cs{mrowcell}.}
% \begin{macrocode}
-\booltrue{LWR@usedmultirow}%
+ \booltrue{LWR@usedmultirow}%
% \end{macrocode}
% \begin{macrocode}
-\LWR@maybenewtablerow%
-\LWR@tabularleftedge%
+ \LWR@maybenewtablerow%
+ \LWR@tabularleftedge%
% \end{macrocode}
+%
% Print the start of a new table data cell:
-% \changes{v0.895}{2021/01/14}{Improved \HTML\ quotes.}
+% \changes{v0.895}{2021/01/14}{\pkg{multirow}: Improved \HTML\ quotes.}
% \begin{macrocode}
-\LWR@htmltag{td rowspan=\textquotedbl#2\textquotedbl\ %
+ \LWR@htmltag{%
+ td rowspan=\textquotedbl#2\textquotedbl\ %
% \end{macrocode}
+%
% A class adds the column spec and the rule:
% \begin{macrocode}
-class=\textquotedbl{}td%
+ class=\textquotedbl{}td%
% \end{macrocode}
+%
% Append this column's spec:
-% \changes{v0.60}{2018/09/17}{\env{tabular}: Improved memory management: Not using \pkg{xstring}.}
+% \changes{v0.60}{2018/09/17}{\pkg{multirow}: \env{tabular}: Improved memory management: Not using \pkg{xstring}.}
% \begin{macrocode}
-\LWR@getexparray{LWR@tablecolspec}{\arabic{LWR@tableLaTeXcolindex}}%
+ \LWR@getexparray{LWR@tablecolspec}{\arabic{LWR@tableLaTeXcolindex}}%
% \end{macrocode}
+%
% If this column has a cmidrule, add ``rule'' to the end of the \HTML\ class tag.
% Also add the vertical bar class.
-% \changes{v0.41}{2017/10/07}{Added vertical rules.}
+% \changes{v0.41}{2017/10/07}{\pkg{multirow}: Added vertical rules.}
% \begin{macrocode}
-\LWR@addcmidruletrim%
-\LWR@addleftmostbartag%
-\LWR@printbartag{\arabic{LWR@tableLaTeXcolindex}}%
-\textquotedbl%
+ \LWR@addcmidruletrim%
+ \LWR@addleftmostbartag%
+ \LWR@printbartag{\arabic{LWR@tableLaTeXcolindex}}%
+ \textquotedbl%
% \end{macrocode}
% \changes{v0.42}{2017/10/26}{\pkg{multirow}: If \progcode{FormatWP} add cell alignment.}
% \begin{macrocode}
-\LWR@tdstartstyles%
+ \LWR@tdstartstyles%
% \end{macrocode}
+%
% The vertical alignment, if given:
% \changes{v0.79}{2020/01/17}{\pkg{multirow}: Fix: Centered vertical alignment.}
-% \changes{v0.84}{2020/04/16}{Fix: Multirow style.}
+% \changes{v0.84}{2020/04/16}{\pkg{multirow}: Fix: Multirow style.}
% \begin{macrocode}
-\ifstrequal{#1}{c}{\LWR@tdaddstyle\LWR@print@mbox{vertical-align:middle}}{}%
-\ifstrequal{#1}{b}{\LWR@tdaddstyle\LWR@print@mbox{vertical-align:bottom}}{}%
-\ifstrequal{#1}{t}{\LWR@tdaddstyle\LWR@print@mbox{vertical-align:top}}{}%
+ \ifstrequal{#1}{c}{\LWR@tdaddstyle\LWR@print@mbox{vertical-align:middle}}{}%
+ \ifstrequal{#1}{b}{\LWR@tdaddstyle\LWR@print@mbox{vertical-align:bottom}}{}%
+ \ifstrequal{#1}{t}{\LWR@tdaddstyle\LWR@print@mbox{vertical-align:top}}{}%
% \end{macrocode}
+%
% The left/right border, if given:
-% \changes{v0.84}{2020/04/16}{Fix: Multirow style.}
+% \changes{v0.84}{2020/04/16}{\pkg{multirow}: Fix: Multirow style.}
% \begin{macrocode}
-\ifdefvoid{\LWR@multirowborder}{}{%
- \LWR@tdaddstyle%
- \LWR@print@mbox{border-\LWR@multirowborder:} 2px dotted black ; %
- \LWR@print@mbox{padding-\LWR@multirowborder:} 2px%
-}%
+ \ifdefvoid{\LWR@multirowborder}{}{%
+ \LWR@tdaddstyle%
+ \LWR@print@mbox{border-\LWR@multirowborder:} 2px dotted black ; %
+ \LWR@print@mbox{padding-\LWR@multirowborder:} 2px%
+ }%
% \end{macrocode}
%
% Additional style elements:
% \begin{macrocode}
-\LWR@addcmidrulewidth%
-\LWR@addcdashline%
-\LWR@addtabularrulecolors%
-\LWR@tdendstyles%
-}%
+ \LWR@addcmidrulewidth%
+ \LWR@addcdashline%
+ \LWR@addtabularrulecolors%
+ \LWR@tdendstyles%
+ }%
% \end{macrocode}
-% \changes{v0.41}{2017/10/05}{Fix: \protect\textless\ spec.}
+% \changes{v0.41}{2017/10/05}{\pkg{multirow}: Fix: \protect\textless\ spec.}
% The column's |<| spec:
% \begin{macrocode}
-\LWR@getexparray{LWR@colbeforespec}{\arabic{LWR@tableLaTeXcolindex}}%
+ \LWR@getexparray{LWR@colbeforespec}{\arabic{LWR@tableLaTeXcolindex}}%
% \end{macrocode}
%
% While printing the text, redefine |\\| to generate a new line.
@@ -69931,17 +70448,18 @@ class=\textquotedbl{}td%
%
% \cs{par} is redefined to insert an \HTML\ break, and if \env{tabular}
% is nested, it is redefined at the start of \env{tabular}.
-% \changes{v0.895}{2021/01/31}{Allow \cs{par}.}
+% \changes{v0.895}{2021/01/31}{\pkg{multirow}: Allow \cs{par}.}
+% \changes{v0.903}{2021/12/17}{\pkg{multirow}: Par handling.}
% \begin{macrocode}
-\begingroup%
- \LetLtxMacro{\\}{\LWR@endofline}%
- \let\par\LWR@multirow@par%
- #6%
-\endgroup%
-\LWR@stoppars%
-\boolfalse{LWR@intabularmetadata}%
-\renewcommand{\LWR@multirowborder}{}%
-\LWR@traceinfo{*** LWR@HTML@multirow done}%
+ \begingroup%
+ \LetLtxMacro{\\}{\LWR@endofline}%
+ \booltrue{LWR@in@multirow@par}%
+ #6%
+ \endgroup%
+ \LWR@stoppars%
+ \boolfalse{LWR@intabularmetadata}%
+ \renewcommand{\LWR@multirowborder}{}%
+ \LWR@traceinfo{LWR@HTML@multirow done}%
}%
\LWR@formatted{multirow}
@@ -69956,10 +70474,10 @@ class=\textquotedbl{}td%
% \oarg{3:vpos} \marg{4:numrows} \oarg{5:bigstruts}
% \marg{6:width} \oarg{7:fixup} \marg{8:text}
%
-% \changes{v0.39}{2017/08/30}{Added.}
+% \changes{v0.39}{2017/08/30}{\pkg{multirow}: Added.}
% \changes{v0.57}{2018/05/28}{\pkg{multirow}: Improved print/\HTML\ output selection.}
%
-% |\@ifpackageloaded{multirow}| determines if v2.0 or later of
+% |\IfPackageLoadedTF{multirow}| determines if v2.0 or later of
% \pkg{multirow} was used, which included the \cs{ProvidesPackage} macro.
%
%
@@ -70313,7 +70831,8 @@ class=\textquotedbl{}td%
\LWR@ProvidesPackagePass{nameauth}[2017/03/22]
% \end{macrocode}
%
-% \pkg{lwarp} formatting is inserted in the following.
+% \DescribeHook[nameauth]{\cs{@nameauth@Hook}}
+% \pkg{lwarp} formatting is inserted.
% \begin{macrocode}
\renewcommand*\@nameauth@Hook[1]
{%
@@ -70570,6 +71089,15 @@ do not attempt to patch lwarp's version of `nameref'.)\MessageBreak
\LWR@ProvidesPackagePass{nccfoots}[2005/02/03]
% \end{macrocode}
%
+% To nullify the footnotes where necessary:
+% \changes{v0.903}{2021/12/28}{\pkg{nccfoots}: Nullify footnotes.}
+% \begin{macrocode}
+\apptocmd{\LWR@nullifyfootnotes}{%
+ \renewcommand*{\Footnote}[1]{}%
+ \renewcommand*{\Footnotemark}[1]{}%
+}{}{}
+% \end{macrocode}
+%
% For \MathJax.
% There is no way to test for an empty argument, \watchout
% so the mark is not automatically duplicated.
@@ -72092,7 +72620,7 @@ do not attempt to patch lwarp's version of `nameref'.)\MessageBreak
%
% \begin{macrocode}
\AtBeginDocument{
-\@ifpackageloaded{cleveref}{
+\IfPackageLoadedTF{cleveref}{
\gdef\@thm#1#2#3{%
\if@thmmarks
\stepcounter{end\InTheoType ctr}%
@@ -72272,7 +72800,7 @@ do not attempt to patch lwarp's version of `nameref'.)\MessageBreak
\LWR@htmltag{%
a id=\textquotedbl\LWR@print@mbox{autoid-\arabic{LWR@thisautoid}}\textquotedbl%
}%
-\LWR@htmltag{/a}%
+\LWR@htmltag{/a}\LWR@orignewline%
\LWR@startpars%
}
% \end{macrocode}
@@ -73345,31 +73873,109 @@ do not attempt to patch lwarp's version of `nameref'.)\MessageBreak
}
\def\PN@parnotes@real{%
+% \end{macrocode}
+%
+% \changes{v0.903}{2022/01/01}{\pkg{parnotes}: Par handling.}
+% \begin{macrocode}
+\ifPN@inparnotes
+\else
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \LWR@stoppars%
+% \end{macrocode}
+%
+% Avoid nested paragraphs:
+% \begin{macrocode}
+ \addtocounter{LWR@spandepth}{1}%
+% \end{macrocode}
+%
+% \begin{macrocode}
% We call \par later, so this avoids recursion with \PN@parnotes@auto
\PN@inparnotestrue
- \unless\ifvmode\par\fi
+% \unless\ifvmode\par\fi
% Avoid page breaks between a paragraph and its parnotes
- \nopagebreak\addvspace{\parnotevskip}%
- \LWR@forcenewpage% lwarp
+% \nopagebreak\addvspace{\parnotevskip}%
\begin{BlockClass}(note){footnotes}% lwarp
- {\parnotefmt{\PN@text}\par}%
+ \leavevmode\LWR@orignewline%
+% \end{macrocode}
+%
+% Typeset the parnote inside its own group to avoid global changes:
+% \begin{macrocode}
+ {%
+ \parnotefmt{\PN@text}%
+ }%
+ \leavevmode\LWR@orignewline%
\end{BlockClass}% lwarp
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \leavevmode\LWR@orignewline%
\global\def\PN@text{}%
- \addvspace{\parnotevskip}%
%
% These can be enabled or disabled by package options
%
\PN@disable@indent
\PN@reset@optional
\PN@inparnotesfalse
+% \end{macrocode}
+%
+% Reenable normal paragraph handling:
+% \begin{macrocode}
+ \addtocounter{LWR@spandepth}{-1}%
+\fi
}
+% \end{macrocode}
+% \changes{v0.903}{2022/01/01}{\pkg{parnotes}: Par handling.}
+% \begin{macrocode}
+\newbool{LWR@parnotes@doingauto}
+\boolfalse{LWR@parnotes@doingauto}
+% \end{macrocode}
+
+% \changes{v0.903}{2022/01/01}{\pkg{parnotes}: Par handling.}
+% \begin{macrocode}
+\def\PN@parnotes@auto{%
+ \ifbool{LWR@parnotes@doingauto}{
+ \ifx\@currenvir\@PN@autopn
+ \unless\ifPN@inparnotes
+ \unless\ifx\PN@text\@empty
+ \expandafter\PN@parnotes@real
+ \fi
+ \fi
+ \fi
+ }{}%
+}
+% \end{macrocode}
+%
+% Replace original logic due to the use of new \LaTeX paragraph hook handling:
+% \changes{v0.903}{2022/01/01}{\pkg{parnotes}: Par handling.}
+% \begin{macrocode}
+\renewenvironment{autopn}%
+ {\booltrue{LWR@parnotes@doingauto}}
+ {\PN@parnotes@auto}%
+% \end{macrocode}
+%
+% If \pkg{cleveref} is in use, name the new notes:
+% \changes{v0.903}{2022/01/01}{\pkg{parnotes}: Fixed if no \pkg{cleveref}.}
+% \begin{macrocode}
\AtBeginDocument{
- \crefname{parnotemark}{paragraph note}{paragraph notes}
- \Crefname{parnotemark}{Paragraph note}{Paragraph notes}
+ \ifdef{\crefname}{
+ \crefname{parnotemark}{paragraph note}{paragraph notes}
+ \Crefname{parnotemark}{Paragraph note}{Paragraph notes}
+ }{}
}
% \end{macrocode}
%
+% To nullify the footnotes where necessary:
+% \changes{v0.903}{2022/01/01}{\pkg{parnotes}: Nullify footnotes.}
+% \begin{macrocode}
+\apptocmd{\LWR@nullifyfootnotes}{%
+ \renewcommand{\parnote}[2][]{}%
+ \renewcommand\parnotemark[1]{}%
+}{}{}
+% \end{macrocode}
+%
%
% For \MathJax:
% \changes{v0.82}{2020/03/15}{\pkg{parnotes}: Added \MathJax\ emulation.}
@@ -74140,7 +74746,7 @@ do not attempt to patch lwarp's version of `nameref'.)\MessageBreak
% an error about a missing file will occur.
% Warn the user to convert the images.
% \begin{macrocode}
-\PackageWarning{lwarp-pdftricks}{
+\PackageWarning{lwarp-pdftricks}{%
When the pdftricks images change,
remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
}
@@ -74365,7 +74971,7 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
%
% \begin{macrocode}
\begin{warpMathJax}
-\PackageWarningNoLine{lwarp, physics}{The MathJax v3 extension will be used}
+\PackageNoteNoLine{lwarp, physics}{The MathJax v3 extension will be used}
\CustomizeMathJax{\require{physics}}
\end{warpMathJax}
% \end{macrocode}
@@ -77831,6 +78437,36 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
%
%
%
+% \iffalse
+%<*showlabels>
+% \fi
+%
+% \part{lwarp-showlabels.sty}
+%
+% \section{showlabels}
+%
+% \DescribePackage{showlabels}
+% \pkg{showlabels} is ignored.
+%
+% \changes{v0.903}{2021/12/18}{\pkg{showlabels}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackageDrop{showlabels}[2021/10/27]
+% \end{macrocode}
+%
+% \begin{macrocode}
+\providecommand{\showlabelfont}{}
+\providecommand{\showlabelsetlabel}[1]{}
+\newcommand*{\showlabels}[2][]{}
+\newcommand*{\showlabelrefline}{}
+\newcommand*{\showlabelsinline}{}
+% \end{macrocode}
+%
+% \iffalse
+%</showlabels>
+% \fi
%
%
%
@@ -78247,13 +78883,15 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% \end{macrocode}
%
% Patched for copy/paste with the \HTML\ \attribute{alt} tag:
+% \changes{v0.903}{2021/12/18}{\pkg{SIunits}: Improved alt tag sanitization.}
% \begin{macrocode}
\ifbool{mathjax}{
\DeclareRobustCommand{\LWR@HTML@unit}[2]{%
\LWR@subsingledollar*% lwarp
{% alt tag
- \textbackslash{}unit\{\LWR@HTMLsanitize{#1}\}%
- \{ \LWR@HTMLsanitize{#2}\}% extra space
+ \textbackslash{}unit%
+ \{\LWR@HTMLsanitizedetokenized{\detokenize{#1}}\}%
+ \{ \LWR@HTMLsanitizedetokenized{\detokenize{#2}}\}% extra space
}%
{SIunits}% add'l hashing
{%
@@ -78265,8 +78903,8 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
\@inunitcommandtrue% original
\LWR@subsingledollar*% lwarp
{% alt tag
- \textbackslash{}unit\{\LWR@HTMLsanitize{#1}\}%
- \{ \LWR@HTMLsanitize{#2}\}% extra space
+ \textbackslash{}unit\{\LWR@HTMLsanitizedetokenized{\detokenize{#1}}\}%
+ \{ \LWR@HTMLsanitizedetokenized{\detokenize{#2}}\}% extra space
}%
{SIunits}% add'l hashing
{%
@@ -78716,12 +79354,14 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% \DescribePackage{siunitx}
% \pkg{siunitx-v2} is patched for use by \pkg{lwarp},
% and is emulated for \MathJax.
+%
% Use as:
% \begin{sourceverb}
% \usepackage{siunitx}[=v2]
% \end{sourceverb}
%
% \pkg{siunitx} v3 is not yet supported.
+% \watchout
%
% ^^A \limitssiunitx
%
@@ -78833,12 +79473,7 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
{
\__siunitx_ensure_ltr:n
{
-% \end{macrocode}
-% \cs{color@endgroup} was adding a paragraph break, so use a regular group instead.
-% \changes{v0.897}{2021/05/23}{\pkg{siunitx-v2}: Regular group instead of color group.}
-% \begin{macrocode}
-% \color@begingroup
- \begingroup% lwarp
+ \color@begingroup
%
\__siunitx_print_color:
\__siunitx_font_shape:
@@ -78865,8 +79500,7 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
}% lwarp
}% lwarp
}
-% \color@endgroup
- \endgroup% lwarp
+ \color@endgroup
%
}
}
@@ -78906,19 +79540,23 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% \changes{v0.48}{2018/02/14}{\pkg{siunitx}: Improved \SVG\ math.}
% \changes{v0.50}{2018/02/24}{\pkg{siunitx}: Improved \SVG\ math \attribute{alt} tags.}
% \changes{v0.79}{2020/01/21}{\pkg{siunitx}: Improved \MathJax.}
+% \changes{v0.903}{2021/12/18}{\pkg{siunitx}: Improved alt tag sanitization.}
% \begin{macrocode}
\__siunitx_unit_output_pre_print:
- \begingroup% lwarp
- \boolfalse{mathjax}% lwarp
+ \begingroup% lwarp
+ \boolfalse{mathjax}% lwarp
% \__siunitx_print:nn { number } { \ensuremath {#1} }
- \LWR@subsingledollar{% lwarp
- \textbackslash( \LWR@HTMLsanitize{#1} \textbackslash)% lwarp
+ \LWR@subsingledollar{% lwarp
+ \textbackslash( % space
+ \LWR@HTMLsanitizedetokenized{%
+ \detokenize{#1}%
+ } \textbackslash)% lwarp
}{siunitx}{%
\__siunitx_print:nn { number } {%
\LWR@origensuredmath{#1}%
}%
- }% lwarp
- \endgroup% lwarp
+ }% lwarp
+ \endgroup% lwarp
\__siunitx_unit_output_print:
}
\group_end:% lwarp
@@ -78929,6 +79567,7 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
%
% For |parse-numbers=false|:
% \changes{v0.79}{2020/01/21}{\pkg{siunitx}: Improved \MathJax.}
+% \changes{v0.903}{2021/12/18}{\pkg{siunitx}: Improved alt tag sanitization.}
% \begin{macrocode}
\cs_set_protected:Npn \__siunitx_range_numbers_aux:n #1
{
@@ -78944,16 +79583,19 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
{
\__siunitx_unit_output_pre_print:
\begingroup% lwarp
- \boolfalse{mathjax}% lwarp
+ \boolfalse{mathjax}% lwarp
% \__siunitx_print:nn { number } {#1}
- \LWR@subsingledollar{% lwarp
- \textbackslash( \LWR@HTMLsanitize{#1} \textbackslash)% lwarp
+ \LWR@subsingledollar{% lwarp
+ \textbackslash( % space
+ \LWR@HTMLsanitizedetokenized{%
+ \detokenize{#1}%
+ } \textbackslash)% lwarp
}{siunitx}{%
\__siunitx_print:nn { number } {%
\LWR@origensuredmath{#1}%
- } % lwarp
- }% lwarp
- \endgroup% lwarp
+ } % lwarp
+ }% lwarp
+ \endgroup% lwarp
\__siunitx_unit_output_print:
}
}
@@ -78961,22 +79603,26 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
%
% For |parse-numbers=false|:
% \changes{v0.79}{2020/01/21}{\pkg{siunitx}: Improved \MathJax.}
+% \changes{v0.903}{2021/12/18}{\pkg{siunitx}: Improved alt tag sanitization.}
% \begin{macrocode}
\cs_set_protected:Npn \__siunitx_angle_print_direct_aux:nn #1#2 {
\tl_if_empty:nF {#1}
{
\tl_set:Nn \l__siunitx_unit_tl {#2}
- \begingroup% lwarp
- \boolfalse{mathjax}% lwarp
+ \begingroup% lwarp
+ \boolfalse{mathjax}% lwarp
% \__siunitx_print:nn { number } {#1}
- \LWR@subsingledollar{% lwarp
- \textbackslash( \LWR@HTMLsanitize{#1} \textbackslash)% lwarp
+ \LWR@subsingledollar{% lwarp
+ \textbackslash( % space
+ \LWR@HTMLsanitizedetokenized{%
+ \detokenize{#1}%
+ } \textbackslash)% lwarp
}{siunitx}{%
\__siunitx_print:nn { number } {
\LWR@origensuredmath{#1}%
- }% lwarp
- }% lwarp
- \endgroup% lwarp
+ }% lwarp
+ }% lwarp
+ \endgroup% lwarp
\__siunitx_unit_output_print:
}
}
@@ -79153,8 +79799,10 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% For \MathJax.
-% (The following runs much faster as separate \cs{CusomizeMathJax} calls instead
-% of one single call.)
+% \margintag{\MathJax}
+%
+% The following runs much faster as separate \cs{CusomizeMathJax} calls instead
+% of one single call.
% \begin{macrocode}
\begin{warpMathJax}
\LWR@infoprocessingmathjax{siunitx}
@@ -79183,68 +79831,91 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% \end{macrocode}
% \end{noindmacro}
%
-% Processes scientific notation.
-% Special handling for a mantissa which is either empty or only a minus sign.
-% \changes{v0.895}{2021/01/14}{\pkg{siunitx}, \MathJax: Scientific notation.}
-% \begin{macrocode}
-\CustomizeMathJax{\newcommand{\LWRsiunitxnumscientific}[2]{%
- \ifblank{#1}%
- {}%
- {%
- \ifstrequal{#1}{-}%
- {-}%
- {\LWRsiunitxprintdecimal{#1}\times}%
- }%
- 10^{\LWRsiunitxprintdecimal{#2}}
-}}
-% \end{macrocode}
+% \begin{noindmacro}{\num} \oarg{options} \marg{value}
%
% \cs{num} handles optional powers (|e|, |E|, |d|, |D|),
% multiples (|x|), plus and minus, and period or comma decimal output.
%
% To split the string, \cs{def} is used with parameter delimiters.
-% When each of the following macro is used, extra delimiters are padded to the end
+% When each of the following macros is used, extra delimiters are padded to the end
% of the arguments of each macro when used, and
% the final argument of each collects any extra unused delimiters.
%
+% The number is split by powers (|E|, |e|, |D|, |d|), then by dimensions (|x|),
+% then by plus and minus (|+|, |-|, |+-|), then into pieces before and after the decimal
+% point.
+%
% \changes{v0.895}{2021/01/14}{\pkg{siunitx}, \MathJax:
% \cs{num} sci notation, multiples, +-, decimals, comma.}
+%
+% Determine if the number is output with a decimal period or a decimal comma.
+% The enclosing braces tell \MathJax\ to not add extra space after the punctuation.
+% \changes{v0.903}{2021/12/10}{\pkg{siunitx}, \MathJax: Improved decimal commas.}
% \begin{macrocode}
\ExplSyntaxOn
\AtBeginDocument{
\ifdefstring{\l__siunitx_output_decimal_tl}{{,}}
- {% Use decimal comma
- \CustomizeMathJax{\def\LWRsiunitxprintdecimalsub#1.#2.#3\LWRsiunitxEND{%
- \mathrm{#1}%
- \ifblank{#2}
- {}%
- {,\mathrm{#2}}
- }}
-
- \CustomizeMathJax{\newcommand{\LWRsiunitxprintdecimal}[1]{%
- \LWRsiunitxprintdecimalsub#1...\LWRsiunitxEND%
- }}
- }
- {% Use decimal point
- \CustomizeMathJax{\def\LWRsiunitxprintdecimalsub#1,#2,#3\LWRsiunitxEND{%
- \mathrm{#1}%
- \ifblank{#2}
- {}%
- {.\mathrm{#2}}
- }}
-
- \CustomizeMathJax{\newcommand{\LWRsiunitxprintdecimal}[1]{%
- \LWRsiunitxprintdecimalsub#1,,,\LWRsiunitxEND%
- }}
- }
+ {\CustomizeMathJax{\def\LWRsiunitxdecimal{,}}}
+ {\CustomizeMathJax{\def\LWRsiunitxdecimal{.}}}
}
\ExplSyntaxOff
% \end{macrocode}
%
-% \begin{noindmacro}{\num} \oarg{options} \marg{value}
+% \pkg{siunitx} accepts either commas or periods as decimal points.
+% \cs{LWRsiunitxprintdecimal} splits its input by periods then commas,
+% parsing out before and after sections to print on either side of the decimal point.
+%
+% \cs{LWRsiunitxENDTWO} is used only by \cs{LWRsiunitxprintdecimalsubtwo},
+% to avoid a parsing conflict with the more widely-used \cs{LWRsiunitxEND}.
+%
+% The following splits by decimal commas:
+% \changes{v0.903}{2021/12/10}{\pkg{siunitx}, \MathJax: Improved decimal commas.}
+% \begin{macrocode}
+\CustomizeMathJax{\newcommand{\LWRsiunitxENDTWO}{}}
+
+\CustomizeMathJax{\def\LWRsiunitxprintdecimalsubtwo#1,#2,#3\LWRsiunitxENDTWO{%
+% \end{macrocode}
+%
+% If nothing is ahead of the decimal comma, add a leading zero:
+% \changes{v0.903}{2021/12/10}{\pkg{siunitx}, \MathJax: Leading zero.}
+% \begin{macrocode}
+ \ifblank{#1}{0}{\mathrm{#1}}%
+% \end{macrocode}
+%
+% If something is after the decimal comma, print the decimal comma and the fraction:
+% \begin{macrocode}
+ \ifblank{#2}%
+ {}%
+ {%
+ {\LWRsiunitxdecimal}%
+ \mathrm{#2}%
+ }%
+}}
+% \end{macrocode}
+%
+% The following splits by decimal periods:
+% \changes{v0.903}{2021/12/10}{\pkg{siunitx}, \MathJax: Improved decimal commas.}
+% \begin{macrocode}
+\CustomizeMathJax{\def\LWRsiunitxprintdecimalsub#1.#2.#3\LWRsiunitxEND{%
+ \LWRsiunitxprintdecimalsubtwo#1,,\LWRsiunitxENDTWO%
+ \ifblank{#2}%
+ {}%
+ {%
+% {.}%
+ {\LWRsiunitxdecimal}%
+ \LWRsiunitxprintdecimalsubtwo#2,,\LWRsiunitxENDTWO%
+ }%
+}}
+
+\CustomizeMathJax{\newcommand{\LWRsiunitxprintdecimal}[1]{%
+ \LWRsiunitxprintdecimalsub#1...\LWRsiunitxEND%
+}}
+% \end{macrocode}
+%
+% The following splits by |+|
% \begin{macrocode}
\CustomizeMathJax{\def\LWRsiunitxnumplus#1+#2+#3\LWRsiunitxEND{%
- \ifblank{#2}
+ \ifblank{#2}%
{\LWRsiunitxprintdecimal{#1}}% no plus
{%
\ifblank{#1}%
@@ -79256,17 +79927,23 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
}%
}%
}}
-
+% \end{macrocode}
+%
+% The following splits by |-|
+% \begin{macrocode}
\CustomizeMathJax{\def\LWRsiunitxnumminus#1-#2-#3\LWRsiunitxEND{%
- \ifblank{#2}
+ \ifblank{#2}%
{\LWRsiunitxnumplus#1+++\LWRsiunitxEND}%
{%
- \LWRsiunitxprintdecimal{#1}%
+ \ifblank{#1}{}{\LWRsiunitxprintdecimal{#1}}%
\unicode{x02212}% mathematical minus sign
\LWRsiunitxprintdecimal{#2}%
}%
}}
-
+% \end{macrocode}
+%
+% The following splits by |+-|
+% \begin{macrocode}
\CustomizeMathJax{\def\LWRsiunitxnumpm#1+-#2+-#3\LWRsiunitxEND{%
\ifblank{#2}%
{\LWRsiunitxnumminus#1---\LWRsiunitxEND}%
@@ -79276,7 +79953,10 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
\LWRsiunitxprintdecimal{#2}%
}%
}}
-
+% \end{macrocode}
+%
+% The following splits by |x|
+% \begin{macrocode}
\CustomizeMathJax{\def\LWRsiunitxnumx#1x#2x#3x#4\LWRsiunitxEND{%
\ifblank{#2}%
{\LWRsiunitxnumpm#1+-+-\LWRsiunitxEND}%
@@ -79296,41 +79976,69 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
}%
}%
}}
-
+% \end{macrocode}
+%
+%
+% Processes scientific notation.
+% Special handling for a mantissa which is either empty or only a minus sign.
+% \changes{v0.895}{2021/01/14}{\pkg{siunitx}, \MathJax: Scientific notation.}
+% \begin{macrocode}
+\CustomizeMathJax{\newcommand{\LWRsiunitxnumscientific}[2]{%
+ \ifblank{#1}%
+ {}%
+ {%
+ \ifstrequal{#1}{-}%
+ {-}%
+ {\LWRsiunitxprintdecimal{#1}\times}%
+ }%
+ 10^{\LWRsiunitxprintdecimal{#2}}
+}}
+% \end{macrocode}
+%
+%
+% The following splits by |D|
+% \begin{macrocode}
\CustomizeMathJax{\def\LWRsiunitxnumD#1D#2D#3\LWRsiunitxEND{%
\ifblank{#2}%
{\LWRsiunitxnumx#1xxxxx\LWRsiunitxEND}%
{\mathrm{\LWRsiunitxnumscientific{#1}{#2}}}%
}}
-
+% \end{macrocode}
+%
+% The following splits by |d|
+% \begin{macrocode}
\CustomizeMathJax{\def\LWRsiunitxnumd#1d#2d#3\LWRsiunitxEND{%
\ifblank{#2}%
{\LWRsiunitxnumD#1DDD\LWRsiunitxEND}%
{\mathrm{\LWRsiunitxnumscientific{#1}{#2}}}%
}}
-
+% \end{macrocode}
+%
+% The following splits by |E|
+% \begin{macrocode}
\CustomizeMathJax{\def\LWRsiunitxnumE#1E#2E#3\LWRsiunitxEND{%
\ifblank{#2}%
{\LWRsiunitxnumd#1ddd\LWRsiunitxEND}%
{\mathrm{\LWRsiunitxnumscientific{#1}{#2}}}%
}}
-
+% \end{macrocode}
+%
+% The following splits by |e|
+% \begin{macrocode}
\CustomizeMathJax{\def\LWRsiunitxnume#1e#2e#3\LWRsiunitxEND{%
\ifblank{#2}%
{\LWRsiunitxnumE#1EEE\LWRsiunitxEND}%
{\mathrm{\LWRsiunitxnumscientific{#1}{#2}}}%
}}
-
-\CustomizeMathJax{\def\LWRsiunitxnumcomma#1,#2,#3\LWRsiunitxEND{%
- \ifblank{#2}
- {\LWRsiunitxnume#1eee\LWRsiunitxEND}
- {\LWRsiunitxnume#1.#2eee\LWRsiunitxEND}
-}}
-
-\CustomizeMathJax{\newcommand{\num}[2][]{\LWRsiunitxnumcomma#2,,,\LWRsiunitxEND}}
+% \end{macrocode}
+%
+% \changes{v0.903}{2021/12/10}{\pkg{siunitx}, \MathJax: Improved decimal commas.}
+% \begin{macrocode}
+\CustomizeMathJax{\newcommand{\num}[2][]{\LWRsiunitxnume#2eee\LWRsiunitxEND}}
% \end{macrocode}
% \end{noindmacro}
%
+%
% \begin{noindmacro}{\si} \oarg{options} \marg{unit}
% \begin{macrocode}
\CustomizeMathJax{\newcommand{\si}[2][]{\mathrm{#2}}}
@@ -79363,16 +80071,17 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% \begin{noindmacro}{\numlist} \oarg{options} \marg{list}
%
% \cs{numlist} should only be used in text mode.
-% If used in \MathJax, it is merely printed as input.
+% If used in \MathJax, it is merely printed as text, so add space around the semicolons.
+% \changes{v0.903}{2021/12/10}{\pkg{siunitx}: \MathJax: Improved \cs{numlist}.}
% \begin{macrocode}
-\CustomizeMathJax{\newcommand{\numlist}[2][]{\mathrm{#2}}}
+\CustomizeMathJax{\newcommand{\numlist}[2][]{\text{#2}}}
% \end{macrocode}
% \end{noindmacro}
%
% \begin{noindmacro}{\numrange} \oarg{options} \marg{value1} \marg{value2}
%
% \cs{numrange} should only be used in text mode.
-% If used in \MathJax\ math, an en-dash is used instead of the \optn{range-phase}.
+% If used in \MathJax\ math, an en-dash is used instead of the \optn{range-phrase}.
% \changes{v0.89}{2020/08/02}{\pkg{siunitx}: Unicode for endash.}
% \begin{macrocode}
\CustomizeMathJax{\newcommand{\numrange}[3][]{\num{#2}\,\unicode{x2013}\,\num{#3}}}
@@ -79383,8 +80092,9 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
%
% \cs{SIlist} and \cs{SIrange} should only be used in text mode.
% If used in \MathJax, a simple emulation is provided.
+% \changes{v0.903}{2021/12/10}{\pkg{siunitx}: \MathJax: Improved \cs{SIlist}.}
% \begin{macrocode}
-\CustomizeMathJax{\newcommand{\SIlist}[3][]{\mathrm{#2\,#3}}}
+\CustomizeMathJax{\newcommand{\SIlist}[3][]{\text{#2}\,#3}}
% \end{macrocode}
% \end{noindmacro}
%
@@ -79495,7 +80205,12 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
\CustomizeMathJax{\newcommand{\square}[1]{\mathrm{#1}^2}}
\CustomizeMathJax{\newcommand{\cubed}{^3}}
\CustomizeMathJax{\newcommand{\cubic}[1]{\mathrm{#1}^3}}
-\CustomizeMathJax{\newcommand{\per}{/}}
+% \end{macrocode}
+% \changes{v0.903}{2021/12/09}{\pkg{siunitx}: Improved \cs{per}.}
+% \begin{macrocode}
+\CustomizeMathJax{\newcommand{\per}{\,\mathrm{/}}}
+% \end{macrocode}
+% \begin{macrocode}
\CustomizeMathJax{\newcommand{\celsius}{\unicode{x2103}}}
%
\CustomizeMathJax{\newcommand{\fg}{\femto\gram}}
@@ -84087,7 +84802,7 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
%
% Other \pkg{thm-*} package may be loaded by \pkg{thm-listof}.
% \begin{macrocode}
-\@ifpackagelater{thm-listof}{2020/08/01}{% v0.72
+\IfPackageAtLeastTF{thm-listof}{2020/08/01}{% v0.72
\def\thmtlo@newentry{%
\csdef{l@\thmt@envname}##1##2{\hypertocfloat{1}{figure}{lof}{##1}{##2}}%
}
@@ -84556,7 +85271,7 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% \begin{macrocode}
\newbool{LWR@tikzbabel}
-\@ifpackagelater{tikz}{2013/12/20}% Test for Tikz version v3.0.0
+\IfPackageAtLeastTF{tikz}{2013/12/20}% Test for Tikz version v3.0.0
{\usetikzlibrary{babel}\booltrue{LWR@tikzbabel}}
{\boolfalse{LWR@tikzbabel}}
% \end{macrocode}
@@ -85553,7 +86268,7 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
%
% Set default titlepage thanks footnote marks. See \cref{sec:titlehtml}.
% \begin{macrocode}
-\@ifclassloaded{memoir}{
+\IfClassLoadedTF{memoir}{
\thanksmarkseries{arabic}
}{% not memoir
\if@titlepage
@@ -86323,7 +87038,11 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
] \@nameuse{@done\the\c@todo}:
{\todoformat\ifx#1\todomark\else\textbf{#1} \fi}#2%
}
-
+% \end{macrocode}
+%
+% The following are not errors because the code will still compile and
+% be usable if the patch is not possible.
+% \begin{macrocode}
\xpatchcmd{\@displaytodo}
{\todoformat #1}{\todoformat \textbf{#1}}{}
{\PackageWarning{lwarp-todo}{Unable to patch @displaytodo.}}
@@ -86337,10 +87056,16 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
\patchcmd{\astodos}{\todoformat #1}{\todoformat \textbf{#1}}{}
{\PackageWarning{lwarp-todo}{Unable to patch astodos.}}
-
+% \end{macrocode}
+%
+% If \pkg{cleveref} is in use, name the new todo notes:
+% \changes{v0.903}{2021/12/23}{\pkg{todo}: Fix if no \pkg{cleveref}.}
+% \begin{macrocode}
\AtBeginDocument{
+\ifdef{\crefname}{
\crefname{todo}{todo}{todos}
\Crefname{todo}{Todo}{Todos}
+}{}
}
% \end{macrocode}
@@ -88293,8 +89018,8 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% When the environment ends:
% \begin{macrocode}
{
-\endBlockClass
-\LWR@startpars
+ \endBlockClass
+ \LWR@startpars
}
% \end{macrocode}
% \end{noindenvironment}
@@ -88578,13 +89303,14 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% \changes{v0.75}{2019/09/22}{\pkg{wrapfig}: Fix for width.}
% \changes{v0.896}{2021/03/05}{\pkg{wrapfig}: Added \ARIA\ role.}
% \changes{v0.898}{2021/05/26}{\pkg{wrapfig}: Improved integration with \pkg{keyfloat}.}
+% \changes{v0.903}{2022/01/01}{\pkg{wrapfig}: Fix: \optn{width} style.}
% \begin{macrocode}
\newcommand*{\LWR@wrapposition}{}
-\newcommand{\LWR@wrapfig@printHTMLwidth}{width:\LWR@printlength{\LWR@templengthone}}
+\newcommand{\LWR@wrapfig@printHTMLwidth}{\LWR@printlength{\LWR@templengthone}}
\AtBeginDocument{
- \@ifpackageloaded{keyfloat}{
+ \IfPackageLoadedTF{keyfloat}{
\renewcommand{\LWR@wrapfig@printHTMLwidth}{%
\ifboolexpr{
test {\ifnumgreater{\value{KFLT@keyfloatdepth}}{0}} or
@@ -88666,6 +89392,72 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
%
%
%
+%
+% \iffalse
+%<*wrapfig2>
+% \fi
+
+% \part{lwarp-wrapfig2.sty}
+
+% \section{wrapfig2}
+% \label{sec:wrapfig2}
+%
+% \credits{Donald Arseneau, Claudio Beccari}
+%
+% \changes{v0.903}{2022/01/01}{\pkg{wrapfig2}: Added.}
+%
+% \DescribePackage{wrapfig2}
+% \pkg{wrapfig2} is emulated via a modified version
+% of the \pkg{wrapfig} emulation.
+
+% \codehtml
+% \begin{macrocode}
+\LWR@ProvidesPackageDrop{wrapfig2}[2021-12-21]
+
+\LWR@origRequirePackage{lwarp-wrapfig}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\RenewDocumentEnvironment{wrapfigure}{o m o G{0pt} s}% original
+ {\wrapfloat{figure}[#1]{#2}[#3]{#4}}%
+ {\endwrapfloat}
+
+\RenewDocumentEnvironment{wraptable}{o m o G{0pt} s}% original
+ {\wrapfloat{table}[#1]{#2}[#3]{#4}}%
+ {\endwrapfloat}
+
+\RenewDocumentEnvironment{wrapfloat}{m o m o G{0pt}}% lwarp
+{%
+ \begin{LWR@setvirtualpage}*%
+ \LWR@subwrapfigure{#3}{#5}%
+ \renewcommand*{\@captype}{#1}%
+}
+{%
+ \endLWR@BlockClassWP%
+ \end{LWR@setvirtualpage}%
+}
+
+\NewDocumentEnvironment{wraptext}%
+ {O{l} D||{0.5\columnwidth} D<>{0} D(){figure}}%
+{%
+ \wrapfloat{#4}[]{#1}[]{#2}%
+ \tcolorbox%
+}
+{%
+ \endtcolorbox%
+ \endwrapfloat%
+ \ignorespaces%
+}
+% \end{macrocode}
+
+% \iffalse
+%</wrapfig2>
+% \fi
+%
+%
+%
+%
+%
% \iffalse
%<*xbmks>
% \fi
@@ -88852,6 +89644,14 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
\LWR@ProvidesPackagePass{xcolor}[2016/05/11]
% \end{macrocode}
+
+% \cs{color@endgroup}'s \cs{endgraf} was conflicting with \pkg{lwarp}'s
+% paragraph handling.
+% \changes{v0.903}{2021/12/13}{\pkg{xcolor}: Par handling.}
+% \begin{macrocode}
+\let\color@endgroup\endgroup
+% \end{macrocode}
+
%
%
% \subsection{Remembering and restoring original definitions}
@@ -88867,8 +89667,8 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% \margintag{\small\cs{LWR@restoreorigformatting}}
% \begin{macrocode}
\appto\LWR@restoreorigformatting{%
-\LetLtxMacro\pagecolor\LWR@print@pagecolor%
-\LetLtxMacro\nopagecolor\LWR@print@nopagecolor%
+ \LetLtxMacro\pagecolor\LWR@print@pagecolor%
+ \LetLtxMacro\nopagecolor\LWR@print@nopagecolor%
}
% \end{macrocode}
%
@@ -88892,11 +89692,11 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% Sets \cs{LWR@tempcolor} to the current color.
% \begin{macrocode}
\renewcommand*{\LWR@findcurrenttextcolor}{%
-\LWR@traceinfo{LWR@findcurrenttextcolor}%
-\protect\colorlet{LWR@current@color}{.}%
-\LWR@traceinfo{LWR@findcurrenttextcolor B}%
-\protect\convertcolorspec{named}{LWR@current@color}{HTML}\LWR@tempcolor%
-\LWR@traceinfo{LWR@findcurrenttextcolor: done}%
+ \LWR@traceinfo{LWR@findcurrenttextcolor}%
+ \protect\colorlet{LWR@current@color}{.}%
+ \LWR@traceinfo{LWR@findcurrenttextcolor B}%
+ \protect\convertcolorspec{named}{LWR@current@color}{HTML}\LWR@tempcolor%
+ \LWR@traceinfo{LWR@findcurrenttextcolor: done}%
}
% \end{macrocode}
% \end{noindmacro}
@@ -88906,10 +89706,10 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% \changes{v0.44}{2017/11/10}{\pkg{xcolor}: Added \cs{LWR@currenttextcolorstyle}.}
% \begin{macrocode}
\newcommand*{\LWR@currenttextcolorstyle}{%
-\LWR@findcurrenttextcolor%
-\ifdefstring{\LWR@tempcolor}{000000}%
-{}%
-{color: \LWR@origpound\LWR@tempcolor ; }%
+ \LWR@findcurrenttextcolor%
+ \ifdefstring{\LWR@tempcolor}{000000}%
+ {}%
+ {color: \LWR@origpound\LWR@tempcolor ; }%
}
% \end{macrocode}
% \end{noindmacro}
@@ -88920,14 +89720,14 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% \changes{v0.44}{2017/11/10}{\pkg{xcolor}: Added \cs{LWR@textcurrentcolor}.}
% \begin{macrocode}
\DeclareDocumentCommand{\LWR@textcurrentcolor}{m}{%
-\begingroup%
-\LWR@hook@processingtags%
-\LWR@findcurrenttextcolor%
-\InlineClass[color:\LWR@origpound\LWR@tempcolor]{textcolor}{%
- \renewcommand*{\LWR@currenttextcolor}{\LWR@origpound\LWR@tempcolor}%
- #1%
-}%
-\endgroup%
+ \begingroup%
+ \LWR@hook@processingtags%
+ \LWR@findcurrenttextcolor%
+ \InlineClass[color:\LWR@origpound\LWR@tempcolor]{textcolor}{%
+ \renewcommand*{\LWR@currenttextcolor}{\LWR@origpound\LWR@tempcolor}%
+ #1%
+ }%
+ \endgroup%
}
% \end{macrocode}
% \end{macro}
@@ -88942,17 +89742,17 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
%
% \begin{macrocode}
\NewDocumentCommand{\LWR@colorstyle}{m m}{%
-\begingroup%
-\LWR@hook@processingtags%
+ \begingroup%
+ \LWR@hook@processingtags%
% \end{macrocode}
% Use the \pkg{xcolor} package to convert to an \HTML\ color space:
% \begin{macrocode}
-\convertcolorspec{#1}{#2}{HTML}\LWR@tempcolor%
+ \convertcolorspec{#1}{#2}{HTML}\LWR@tempcolor%
% \end{macrocode}
% Print the converted color:
% \begin{macrocode}
-\LWR@origpound\LWR@tempcolor%
-\endgroup%
+ \LWR@origpound\LWR@tempcolor%
+ \endgroup%
}
% \end{macrocode}
% \end{noindmacro}
@@ -88967,12 +89767,12 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% \changes{v0.44}{2017/11/10}{\pkg{xcolor}: Added \cs{LWR@backgroundcolor}.}
% \begin{macrocode}
\NewDocumentCommand{\LWR@backgroundcolor}{O{named} m m}{%
-\begingroup%
-\LWR@hook@processingtags%
-\InlineClass[background:\LWR@colorstyle{#1}{#2}]{backgroundcolor}{%
-#3%
-}%
-\endgroup%
+ \begingroup%
+ \LWR@hook@processingtags%
+ \InlineClass[background:\LWR@colorstyle{#1}{#2}]{backgroundcolor}{%
+ #3%
+ }%
+ \endgroup%
}
% \end{macrocode}
% \end{macro}
@@ -88987,8 +89787,8 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
%
% \begin{macrocode}
\newcommand*{\LWR@borderpadding}[2]{%
-border:\LWR@printlength{\LWR@atleastonept} solid \LWR@colorstyle{#1}{#2} ; %
-padding:\LWR@printlength{\fboxsep}%
+ border:\LWR@printlength{\LWR@atleastonept} solid \LWR@colorstyle{#1}{#2} ; %
+ padding:\LWR@printlength{\fboxsep}%
}
% \end{macrocode}
% \end{noindmacro}
@@ -89008,14 +89808,14 @@ padding:\LWR@printlength{\fboxsep}%
% \changes{v0.73}{2019/06/14}{\pkg{xcolor}: Added \HTML\ support.}
% \begin{macrocode}
\NewDocumentCommand{\LWR@HTML@color}{o m}{%
-\IfValueTF{#1}{%
- \LWR@print@color[#1]{#2}%
- \convertcolorspec{#1}{#2}{HTML}\LWR@tempcolor%
-}{%
- \LWR@print@color{#2}%
- \convertcolorspec{named}{#2}{HTML}\LWR@tempcolor%
-}%
-\edef\LWR@currenttextcolor{\LWR@origpound\LWR@tempcolor}%
+ \IfValueTF{#1}{%
+ \LWR@print@color[#1]{#2}%
+ \convertcolorspec{#1}{#2}{HTML}\LWR@tempcolor%
+ }{%
+ \LWR@print@color{#2}%
+ \convertcolorspec{named}{#2}{HTML}\LWR@tempcolor%
+ }%
+ \edef\LWR@currenttextcolor{\LWR@origpound\LWR@tempcolor}%
}
\LWR@formatted{color}
@@ -89034,15 +89834,15 @@ padding:\LWR@printlength{\fboxsep}%
% \changes{v0.86}{2020/05/12}{\pkg{xcolor}: \cs{textcolor}: Fixed for \pkg{babel-french}.}
% \begin{macrocode}
\NewDocumentCommand{\LWR@HTML@textcolor}{o m m}{%
-\begingroup%
-\LWR@hook@processingtags%
-\IfValueTF{#1}{%
- \color[#1]{#2}%
-}{%
- \color{#2}%
-}%
-\InlineClass[color:\LWR@currenttextcolor]{textcolor}{#3}%
-\endgroup%
+ \begingroup%
+ \LWR@hook@processingtags%
+ \IfValueTF{#1}{%
+ \color[#1]{#2}%
+ }{%
+ \color{#2}%
+ }%
+ \InlineClass[color:\LWR@currenttextcolor]{textcolor}{#3}%
+ \endgroup%
}%
\LWR@formatted{textcolor}
@@ -89078,13 +89878,13 @@ padding:\LWR@printlength{\fboxsep}%
% \changes{v0.57}{2018/06/02}{\pkg{xcolor}: New system for switching print and \HTML\ outputs.}
% \begin{macrocode}
\NewDocumentCommand{\LWR@HTML@colorbox}{O{named} m +m}{%
-\begingroup%
-\LWR@hook@processingtags%
-\InlineClass[%
-background:\LWR@colorstyle{#1}{#2} ; %
-padding:\LWR@printlength{\fboxsep}%
-]{colorbox}{#3}%
-\endgroup%
+ \begingroup%
+ \LWR@hook@processingtags%
+ \InlineClass[%
+ background:\LWR@colorstyle{#1}{#2} ; %
+ padding:\LWR@printlength{\fboxsep}%
+ ]{colorbox}{#3}%
+ \endgroup%
}
% \end{macrocode}
% \end{macro}
@@ -89097,27 +89897,27 @@ padding:\LWR@printlength{\fboxsep}%
% \changes{v0.57}{2018/06/02}{\pkg{xcolor}: New system for switching print and \HTML\ outputs.}
% \begin{macrocode}
\NewDocumentCommand{\LWR@HTML@colorboxBlock}{O{named} m +m}{%
-\begingroup%
-\LWR@hook@processingtags%
+ \begingroup%
+ \LWR@hook@processingtags%
% \end{macrocode}
% \changes{v0.62}{2018/11/11}{\pkg{xcolor}: Fix: Horiz white space.}
% \begin{macrocode}
-\LWR@stoppars%
+ \LWR@stoppars%
% \end{macrocode}
% \begin{macrocode}
-\begin{BlockClass}[%
-background:\LWR@colorstyle{#1}{#2} ; %
-padding:\LWR@printlength{\fboxsep}%
-]{colorboxBlock}
-#3
-\end{BlockClass}%
-\endgroup%
+ \begin{BlockClass}[%
+ background:\LWR@colorstyle{#1}{#2} ; %
+ padding:\LWR@printlength{\fboxsep}%
+ ]{colorboxBlock}
+ #3
+ \end{BlockClass}%
+ \endgroup%
% \end{macrocode}
% Prevent paragraph tags around horizontal white space
% until the start of the next paragraph:
% \changes{v0.62}{2018/11/11}{\pkg{xcolor}: Fix: Horiz white space.}
% \begin{macrocode}
-\global\booltrue{LWR@minipagethispar}%
+ \global\booltrue{LWR@minipagethispar}%
}
% \end{macrocode}
% \end{macro}
@@ -89134,23 +89934,23 @@ padding:\LWR@printlength{\fboxsep}%
% \changes{v0.892}{2020/10/05}{\pkg{xcolor}: Fixed second optional arg.}
% \begin{macrocode}
\NewDocumentCommand{\LWR@HTML@fcolorbox}{O{named} m O{#1} m +m}{%
-\LWR@traceinfo{HTML fcolorbox #2 #4}%
-\begingroup%
-\LWR@hook@processingtags%
-\LWR@forceminwidth{\fboxrule}%
-\ifthenelse{\equal{#4}{none}}%
- {% no background color
- \InlineClass[%
- \LWR@borderpadding{#1}{#2}%
- ]{fcolorbox}{#5}%
- }%
- {% yes background color
- \InlineClass[%
- \LWR@borderpadding{#1}{#2} ; %
- background:\LWR@colorstyle{#3}{#4}%
- ]{fcolorbox}{#5}%
- }%
-\endgroup%
+ \LWR@traceinfo{HTML fcolorbox #2 #4}%
+ \begingroup%
+ \LWR@hook@processingtags%
+ \LWR@forceminwidth{\fboxrule}%
+ \ifthenelse{\equal{#4}{none}}%
+ {% no background color
+ \InlineClass[%
+ \LWR@borderpadding{#1}{#2}%
+ ]{fcolorbox}{#5}%
+ }%
+ {% yes background color
+ \InlineClass[%
+ \LWR@borderpadding{#1}{#2} ; %
+ background:\LWR@colorstyle{#3}{#4}%
+ ]{fcolorbox}{#5}%
+ }%
+ \endgroup%
}
% \end{macrocode}
% \end{macro}
@@ -89166,41 +89966,41 @@ padding:\LWR@printlength{\fboxsep}%
% \changes{v0.892}{2020/10/05}{\pkg{xcolor}: Fixed second optional arg.}
% \begin{macrocode}
\NewDocumentCommand{\LWR@HTML@fcolorboxBlock}{O{named} m O{#1} m +m}{%
-\LWR@traceinfo{HTML fcolorboxBlock #2 #4}%
-\begingroup%
-\LWR@hook@processingtags%
-\LWR@forceminwidth{\fboxrule}%
+ \LWR@traceinfo{HTML fcolorboxBlock #2 #4}%
+ \begingroup%
+ \LWR@hook@processingtags%
+ \LWR@forceminwidth{\fboxrule}%
% \end{macrocode}
% \changes{v0.62}{2018/11/11}{\pkg{xcolor}: Fix: Horiz white space.}
% \begin{macrocode}
-\LWR@stoppars%
+ \LWR@stoppars%
% \end{macrocode}
% \begin{macrocode}
-\ifthenelse{\equal{#4}{none}}%
- {% no background color
- \begin{BlockClass}[%
- \LWR@borderpadding{#1}{#2}%
- ]{fcolorboxBlock}
- #5
- \end{BlockClass}%
- }%
- {% yes background color
- \convertcolorspec{#3}{#4}{HTML}\LWR@tempcolortwo%
- \begin{BlockClass}[%
- background:\LWR@origpound\LWR@tempcolortwo\ ; %
- \LWR@borderpadding{#1}{#2}%
- ]{fcolorboxBlock}
- #5
- \end{BlockClass}%
- }%
-\endgroup%
+ \ifthenelse{\equal{#4}{none}}%
+ {% no background color
+ \begin{BlockClass}[%
+ \LWR@borderpadding{#1}{#2}%
+ ]{fcolorboxBlock}
+ #5
+ \end{BlockClass}%
+ }%
+ {% yes background color
+ \convertcolorspec{#3}{#4}{HTML}\LWR@tempcolortwo%
+ \begin{BlockClass}[%
+ background:\LWR@origpound\LWR@tempcolortwo\ ; %
+ \LWR@borderpadding{#1}{#2}%
+ ]{fcolorboxBlock}
+ #5
+ \end{BlockClass}%
+ }%
+ \endgroup%
% \end{macrocode}
% Prevent paragraph tags around horizontal white space
% until the start of the next paragraph:
% \changes{v0.62}{2018/11/11}{\pkg{xcolor}: Fix: Horiz white space.}
% \begin{macrocode}
-\global\booltrue{LWR@minipagethispar}%
-\LWR@traceinfo{HTML fcolorboxBlock done}%
+ \global\booltrue{LWR@minipagethispar}%
+ \LWR@traceinfo{HTML fcolorboxBlock done}%
}
% \end{macrocode}
% \end{macro}
@@ -89220,15 +90020,15 @@ padding:\LWR@printlength{\fboxsep}%
% \end{macrocode}
% \changes{v0.62}{2018/11/11}{\pkg{xcolor}: Fix: Horiz white space.}
% \begin{macrocode}
-\LWR@stoppars%
+ \LWR@stoppars%
% \end{macrocode}
% \begin{macrocode}
-\begin{BlockClass}[%
-#3%
-\LWR@borderpadding{#1}{#2} ; %
-\IfValueT{#4}{height:\LWR@printlength{\LWR@tempheight} ; }%
-width:\LWR@printlength{\LWR@tempwidth}%
-]{fcolorminipage}%
+ \begin{BlockClass}[%
+ #3%
+ \LWR@borderpadding{#1}{#2} ; %
+ \IfValueT{#4}{height:\LWR@printlength{\LWR@tempheight} ; }%
+ width:\LWR@printlength{\LWR@tempwidth}%
+ ]{fcolorminipage}%
}
% \end{macrocode}
% \end{noindmacro}
@@ -89242,19 +90042,19 @@ width:\LWR@printlength{\LWR@tempwidth}%
% \begin{macrocode}
\NewDocumentEnvironment{LWR@HTML@fcolorminipage}{O{named} m O{#1} m O{c} o o m}
{%
-\LWR@hook@processingtags%
-\setlength{\LWR@tempwidth}{#8}%
-\IfValueT{#6}{\setlength{\LWR@tempheight}{#6}}%
-\LWR@forceminwidth{\fboxrule}%
-\convertcolorspec{#1}{#2}{HTML}\LWR@tempcolor%
-\ifthenelse{\equal{#4}{none}}%
- {\LWR@subfcolorminipage{#1}{#2}{}{#6}}%
- {%
- \convertcolorspec{#3}{#4}{HTML}\LWR@tempcolortwo%
- \LWR@subfcolorminipage{#1}{#2}%
- {background:\LWR@origpound\LWR@tempcolortwo\ ; }%
- {#6}%
- }%
+ \LWR@hook@processingtags%
+ \setlength{\LWR@tempwidth}{#8}%
+ \IfValueT{#6}{\setlength{\LWR@tempheight}{#6}}%
+ \LWR@forceminwidth{\fboxrule}%
+ \convertcolorspec{#1}{#2}{HTML}\LWR@tempcolor%
+ \ifthenelse{\equal{#4}{none}}%
+ {\LWR@subfcolorminipage{#1}{#2}{}{#6}}%
+ {%
+ \convertcolorspec{#3}{#4}{HTML}\LWR@tempcolortwo%
+ \LWR@subfcolorminipage{#1}{#2}%
+ {background:\LWR@origpound\LWR@tempcolortwo\ ; }%
+ {#6}%
+ }%
}%
{%
\end{BlockClass}%
@@ -89279,19 +90079,22 @@ width:\LWR@printlength{\LWR@tempwidth}%
% \changes{v0.57}{2018/06/02}{\pkg{xcolor}: Fix: Colored \cs{boxframe}.}
% \begin{macrocode}
\newcommand*{\LWR@HTML@boxframe}[3]{%
-{%
-\setlength{\LWR@tempwidth}{#1}%
-\setlength{\LWR@tempheight}{#2}%
-\addtolength{\LWR@tempheight}{#3}%
-\LWR@forceminwidth{\fboxrule}%
-\LWR@findcurrenttextcolor%
-\InlineClass[%
-display:inline-block ; %
-border:\LWR@printlength{\LWR@atleastonept} solid \LWR@currenttextcolor{} ; %
-width:\LWR@printlength{\LWR@tempwidth} ; %
-height:\LWR@printlength{\LWR@tempheight}%
-]{boxframe}{}%
-}%
+ {%
+ \setlength{\LWR@tempwidth}{#1}%
+ \setlength{\LWR@tempheight}{#2}%
+ \addtolength{\LWR@tempheight}{#3}%
+ \LWR@forceminwidth{\fboxrule}%
+ \LWR@findcurrenttextcolor%
+ \InlineClass[%
+ display:inline-block ; %
+ border:%
+ \LWR@printlength{\LWR@atleastonept} % space
+ solid % space
+ \LWR@currenttextcolor{} ; % space
+ width:\LWR@printlength{\LWR@tempwidth} ; %
+ height:\LWR@printlength{\LWR@tempheight}%
+ ]{boxframe}{}%
+ }%
}
\LWR@formatted{boxframe}
@@ -89308,8 +90111,8 @@ height:\LWR@printlength{\LWR@tempheight}%
\newcommand*{\LWR@xcolortempcolor}{}
\def\rowc@l@rs[#1]#2#3#4%
-{
-\rownum=1%
+{%
+ \rownum=1%
\@rowcolorstrue%
\@ifxempty{#3}%
{\def\@oddrowcolor{\@norowcolor}}%
@@ -89363,7 +90166,7 @@ height:\LWR@printlength{\LWR@tempheight}%
% \begin{noindmacro}{\@norowcolor} Turns off color for this row.
% \begin{macrocode}
\def\@norowcolor{%
-\renewcommand{\LWR@xcolorrowHTMLcolor}{}%
+ \renewcommand{\LWR@xcolorrowHTMLcolor}{}%
}
% \end{macrocode}
% \end{noindmacro}
@@ -93322,7 +94125,9 @@ height:\LWR@printlength{\LWR@tempheight}%
\CustomizeMathJax{\let\overgroupra\overrightarrow}
\CustomizeMathJax{\let\undergroup\underparen}
\CustomizeMathJax{\let\undergroupla\underleftarrow}
-\CustomizeMathJax{\newcommand{\widering}[1]{\stackrel{\unicode{x2218}}{\overgroup{#1}}}}
+\CustomizeMathJax{\newcommand{\widering}[1]{%
+ \stackrel{\unicode{x2218}}{\overgroup{#1}}%
+}}
\CustomizeMathJax{\let\widearc\overparen}
\CustomizeMathJax{\let\wideOarc\overrightarrow}
\CustomizeMathJax{\newcommand{\LWRvvstar}[2]{{\overrightarrow{#1}_{#2}}}}
@@ -93335,8 +94140,12 @@ height:\LWR@printlength{\LWR@tempheight}%
\CustomizeMathJax{\newcommand{\smallointsl}{\mathop{\unicode{x222E}}\limits}}
\CustomizeMathJax{\newcommand{\smalloiintsl}{\mathop{\unicode{x222F}}\limits}}
\CustomizeMathJax{\newcommand{\smalloiiintsl}{\mathop{\unicode{x2230}}\limits}}
-\CustomizeMathJax{\newcommand{\smallvarointclockwisesl}{\mathop{\unicode{x2232}}\limits}}
-\CustomizeMathJax{\newcommand{\smallointctrclockwisesl}{\mathop{\unicode{x2233}}\limits}}
+\CustomizeMathJax{\newcommand{\smallvarointclockwisesl}{%
+ \mathop{\unicode{x2232}}\limits%
+}}
+\CustomizeMathJax{\newcommand{\smallointctrclockwisesl}{%
+ \mathop{\unicode{x2233}}\limits%
+}}
\CustomizeMathJax{\newcommand{\smallsumintsl}{\mathop{\unicode{x2A0B}}\limits}}
\CustomizeMathJax{\newcommand{\smallfintsl}{\mathop{\unicode{x2A0F}}\limits}}
\CustomizeMathJax{\newcommand{\smallsqintsl}{\mathop{\unicode{x2A16}}\limits}}
@@ -93348,8 +94157,12 @@ height:\LWR@printlength{\LWR@tempheight}%
\CustomizeMathJax{\newcommand{\smallointup}{\mathop{\unicode{x222E}}\limits}}
\CustomizeMathJax{\newcommand{\smalloiintup}{\mathop{\unicode{x222F}}\limits}}
\CustomizeMathJax{\newcommand{\smalloiiintup}{\mathop{\unicode{x2230}}\limits}}
-\CustomizeMathJax{\newcommand{\smallvarointclockwiseup}{\mathop{\unicode{x2232}}\limits}}
-\CustomizeMathJax{\newcommand{\smallointctrclockwiseup}{\mathop{\unicode{x2233}}\limits}}
+\CustomizeMathJax{\newcommand{\smallvarointclockwiseup}{%
+ \mathop{\unicode{x2232}}\limits%
+}}
+\CustomizeMathJax{\newcommand{\smallointctrclockwiseup}{%
+ \mathop{\unicode{x2233}}\limits%
+}}
\CustomizeMathJax{\newcommand{\smallsumintup}{\mathop{\unicode{x2A0B}}\limits}}
\CustomizeMathJax{\newcommand{\smallfintup}{\mathop{\unicode{x2A0F}}\limits}}
\CustomizeMathJax{\newcommand{\smallsqintup}{\mathop{\unicode{x2A16}}\limits}}
@@ -93385,8 +94198,12 @@ height:\LWR@printlength{\LWR@tempheight}%
\CustomizeMathJax{\let\ointup\oint}
\CustomizeMathJax{\newcommand{\oiintup}{\mathop{\unicode{x222F}}\limits}}
\CustomizeMathJax{\newcommand{\oiiintup}{\mathop{\unicode{x2230}}\limits}}
-\CustomizeMathJax{\newcommand{\varointclockwiseup}{\mathop{\unicode{x2232}}\limits}}
-\CustomizeMathJax{\newcommand{\ointctrclockwiseup}{\mathop{\unicode{x2233}}\limits}}
+\CustomizeMathJax{\newcommand{\varointclockwiseup}{%
+ \mathop{\unicode{x2232}}\limits%
+}}
+\CustomizeMathJax{\newcommand{\ointctrclockwiseup}{%
+ \mathop{\unicode{x2233}}\limits%
+}}
\CustomizeMathJax{\newcommand{\sumintup}{\mathop{\unicode{x2A0B}}\limits}}
\CustomizeMathJax{\newcommand{\fintup}{\mathop{\unicode{x2A0F}}\limits}}
\CustomizeMathJax{\newcommand{\sqintup}{\mathop{\unicode{x2A16}}\limits}}
@@ -93425,8 +94242,12 @@ height:\LWR@printlength{\LWR@tempheight}%
\CustomizeMathJax{\newcommand{\medbullet}{\mathbin{\unicode{x025CF}}}}
\CustomizeMathJax{\newcommand{\varparallel}{\mathrel{\unicode{x02AFD}}}}
\CustomizeMathJax{\newcommand{\varparallelinv}{\mathrel{\unicode{x244A}}}}
-\CustomizeMathJax{\newcommand{\nvarparallel}{\mathrel{\LWRoverlaysymbols{-}{\unicode{x02AFD}}}}}
-\CustomizeMathJax{\newcommand{\nvarparallelinv}{\mathrel{\LWRoverlaysymbols{-}{\unicode{x244A}}}}}
+\CustomizeMathJax{\newcommand{\nvarparallel}{%
+ \mathrel{\LWRoverlaysymbols{-}{\unicode{x02AFD}}}%
+}}
+\CustomizeMathJax{\newcommand{\nvarparallelinv}{%
+ \mathrel{\LWRoverlaysymbols{-}{\unicode{x244A}}}%
+}}
%
% \end{macrocode}
% \changes{v0.891}{2020/09/19}{\pkg{lwarp-common-mathjax-newpxtxmath}: Expanded for \pkg{kpfonts}.}
@@ -93443,8 +94264,12 @@ height:\LWR@printlength{\LWR@tempheight}%
\CustomizeMathJax{\newcommand{\succeqq}{\mathrel{\unicode{x02AB4}}}}
%
-\CustomizeMathJax{\newcommand{\nprecsim}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x0227E}}}}}
-\CustomizeMathJax{\newcommand{\nsuccsim}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x0227F}}}}}
+\CustomizeMathJax{\newcommand{\nprecsim}{%
+ \mathrel{\LWRoverlaysymbols{/}{\unicode{x0227E}}}%
+}}
+\CustomizeMathJax{\newcommand{\nsuccsim}{%
+ \mathrel{\LWRoverlaysymbols{/}{\unicode{x0227F}}}%
+}}
\CustomizeMathJax{\newcommand{\nlesssim}{\mathrel{\unicode{x02274}}}}
\CustomizeMathJax{\newcommand{\ngtrsim}{\mathrel{\unicode{x02275}}}}
%
@@ -93456,36 +94281,70 @@ height:\LWR@printlength{\LWR@tempheight}%
\CustomizeMathJax{\newcommand{\notni}{\mathrel{\unicode{x220C}}}}
\CustomizeMathJax{\let\notowns\notni}
%
-\CustomizeMathJax{\newcommand{\nlessapprox}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x02A85}}}}}
-\CustomizeMathJax{\newcommand{\ngtrapprox}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x02A86}}}}}
+\CustomizeMathJax{\newcommand{\nlessapprox}{%
+ \mathrel{\LWRoverlaysymbols{/}{\unicode{x02A85}}}%
+}}
+\CustomizeMathJax{\newcommand{\ngtrapprox}{%
+ \mathrel{\LWRoverlaysymbols{/}{\unicode{x02A86}}}%
+}}
%
-\CustomizeMathJax{\newcommand{\npreccurlyeq}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x0227C}}}}}
-\CustomizeMathJax{\newcommand{\nsucccurlyeq}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x0227D}}}}}
+\CustomizeMathJax{\newcommand{\npreccurlyeq}{%
+ \mathrel{\LWRoverlaysymbols{/}{\unicode{x0227C}}}%
+}}
+\CustomizeMathJax{\newcommand{\nsucccurlyeq}{%
+ \mathrel{\LWRoverlaysymbols{/}{\unicode{x0227D}}}%
+}}
\CustomizeMathJax{\newcommand{\ngtrless}{\mathrel{\unicode{x02279}}}}
\CustomizeMathJax{\newcommand{\nlessgtr}{\mathrel{\unicode{x2278}}}}
-\CustomizeMathJax{\newcommand{\nbumpeq}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x0224F}}}}}
-\CustomizeMathJax{\newcommand{\nBumpeq}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x0224E}}}}}
+\CustomizeMathJax{\newcommand{\nbumpeq}{%
+ \mathrel{\LWRoverlaysymbols{/}{\unicode{x0224F}}}%
+}}
+\CustomizeMathJax{\newcommand{\nBumpeq}{%
+ \mathrel{\LWRoverlaysymbols{/}{\unicode{x0224E}}}%
+}}
%
-\CustomizeMathJax{\newcommand{\nbacksim}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x0223D}}}}}
-\CustomizeMathJax{\newcommand{\nbacksimeq}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x022CD}}}}}
+\CustomizeMathJax{\newcommand{\nbacksim}{%
+ \mathrel{\LWRoverlaysymbols{/}{\unicode{x0223D}}}%
+}}
+\CustomizeMathJax{\newcommand{\nbacksimeq}{%
+ \mathrel{\LWRoverlaysymbols{/}{\unicode{x022CD}}}%
+}}
\CustomizeMathJax{\newcommand{\nasymp}{\mathrel{\unicode{x226D}}}}
\CustomizeMathJax{\newcommand{\nequiv}{\mathrel{\unicode{x2262}}}}
\CustomizeMathJax{\newcommand{\napprox}{\mathrel{\unicode{x2249}}}}
%
-\CustomizeMathJax{\newcommand{\nll}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x0226A}}}}}
-\CustomizeMathJax{\newcommand{\ngg}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x0226B}}}}}
+\CustomizeMathJax{\newcommand{\nll}{%
+ \mathrel{\LWRoverlaysymbols{/}{\unicode{x0226A}}}%
+}}
+\CustomizeMathJax{\newcommand{\ngg}{%
+ \mathrel{\LWRoverlaysymbols{/}{\unicode{x0226B}}}%
+}}
\CustomizeMathJax{\newcommand{\nthickapprox}{%
\mathrel{\LWRoverlaysymbols{/}{{\mathbf{\unicode{x02248}}}}}%
}}
-\CustomizeMathJax{\newcommand{\napproxeq}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x0224A}}}}}
-\CustomizeMathJax{\newcommand{\nprecapprox}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x02AB7}}}}}
-\CustomizeMathJax{\newcommand{\nsuccapprox}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x02AB8}}}}}
-\CustomizeMathJax{\newcommand{\npreceqq}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x02AB3}}}}}
-\CustomizeMathJax{\newcommand{\nsucceqq}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x02AB4}}}}}
+\CustomizeMathJax{\newcommand{\napproxeq}{%
+ \mathrel{\LWRoverlaysymbols{/}{\unicode{x0224A}}}%
+}}
+\CustomizeMathJax{\newcommand{\nprecapprox}{%
+ \mathrel{\LWRoverlaysymbols{/}{\unicode{x02AB7}}}%
+}}
+\CustomizeMathJax{\newcommand{\nsuccapprox}{%
+ \mathrel{\LWRoverlaysymbols{/}{\unicode{x02AB8}}}%
+}}
+\CustomizeMathJax{\newcommand{\npreceqq}{%
+ \mathrel{\LWRoverlaysymbols{/}{\unicode{x02AB3}}}%
+}}
+\CustomizeMathJax{\newcommand{\nsucceqq}{%
+ \mathrel{\LWRoverlaysymbols{/}{\unicode{x02AB4}}}%
+}}
\CustomizeMathJax{\newcommand{\nsimeq}{\mathrel{\unicode{x02244}}}}
%
-\CustomizeMathJax{\newcommand{\nSubset}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x022D0}}}}}
-\CustomizeMathJax{\newcommand{\nSupset}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x022D1}}}}}
+\CustomizeMathJax{\newcommand{\nSubset}{%
+ \mathrel{\LWRoverlaysymbols{/}{\unicode{x022D0}}}%
+}}
+\CustomizeMathJax{\newcommand{\nSupset}{%
+ \mathrel{\LWRoverlaysymbols{/}{\unicode{x022D1}}}%
+}}
\CustomizeMathJax{\newcommand{\nsqsubseteq}{\mathrel{\unicode{x022E2}}}}
\CustomizeMathJax{\newcommand{\nsqsupseteq}{\mathrel{\unicode{x022E3}}}}
%
@@ -93495,11 +94354,21 @@ height:\LWR@printlength{\LWR@tempheight}%
\CustomizeMathJax{\newcommand{\Coloneq}{\mathrel{\unicode{x2237}-}}}
\CustomizeMathJax{\newcommand{\Eqcolon}{\mathrel{-\unicode{x2237}}}}
%
-\CustomizeMathJax{\newcommand{\lvec}[1]{\mathord{\overset{\unicode{x02190}}{#1}}}}
-\CustomizeMathJax{\newcommand{\lrvec}[1]{\mathord{\overset{\unicode{x2194}}{#1}}}}
-\CustomizeMathJax{\newcommand{\harpoonacc}[1]{\mathord{\overset{\unicode{x021C0}}{#1}}}}
-\CustomizeMathJax{\newcommand{\lharpoonacc}[1]{\mathord{\overset{\unicode{x021BC}}{#1}}}}
-\CustomizeMathJax{\newcommand{\lrharpoonacc}[1]{\mathord{\overset{\unicode{x0294E}}{#1}}}}
+\CustomizeMathJax{\newcommand{\lvec}[1]{%
+ \mathord{\overset{\unicode{x02190}}{#1}}%
+}}
+\CustomizeMathJax{\newcommand{\lrvec}[1]{%
+ \mathord{\overset{\unicode{x2194}}{#1}}%
+}}
+\CustomizeMathJax{\newcommand{\harpoonacc}[1]{%
+ \mathord{\overset{\unicode{x021C0}}{#1}}%
+}}
+\CustomizeMathJax{\newcommand{\lharpoonacc}[1]{%
+ \mathord{\overset{\unicode{x021BC}}{#1}}%
+}}
+\CustomizeMathJax{\newcommand{\lrharpoonacc}[1]{%
+ \mathord{\overset{\unicode{x0294E}}{#1}}%
+}}
\CustomizeMathJax{\newcommand{\barbar}[1]{\mathord{\overset{=}{#1}}}}
\CustomizeMathJax{\newcommand{\bartilde}[1]{\mathord{\overset{\simeq}{#1}}}}
\CustomizeMathJax{\newcommand{\barhat}[1]{\mathord{\hat{\bar{#1}}}}}
@@ -93539,9 +94408,15 @@ height:\LWR@printlength{\LWR@tempheight}%
\CustomizeMathJax{\newcommand{\lrtimes}{\mathrel{\unicode{x2A1D}}}}
\CustomizeMathJax{\newcommand{\Diamondblack}{\mathord{\unicode{x025C6}}}}
-\CustomizeMathJax{\newcommand{\nplus}{\mathrel{\LWRoverlaysymbols{+}{\unicode{x02229}}}}}
-\CustomizeMathJax{\newcommand{\nsqsubset}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x0228F}}}}}
-\CustomizeMathJax{\newcommand{\nsqsupset}{\mathrel{\LWRoverlaysymbols{/}{\unicode{x02290}}}}}
+\CustomizeMathJax{\newcommand{\nplus}{%
+ \mathrel{\LWRoverlaysymbols{+}{\unicode{x02229}}}%
+}}
+\CustomizeMathJax{\newcommand{\nsqsubset}{%
+ \mathrel{\LWRoverlaysymbols{/}{\unicode{x0228F}}}%
+}}
+\CustomizeMathJax{\newcommand{\nsqsupset}{%
+ \mathrel{\LWRoverlaysymbols{/}{\unicode{x02290}}}%
+}}
\CustomizeMathJax{\newcommand{\dasharrow}{\mathrel{\unicode{x021E2}}}}
\CustomizeMathJax{\newcommand{\leftsquigarrow}{\mathrel{\unicode{x021DC}}}}
\CustomizeMathJax{\newcommand{\ntwoheadrightarrow}{\mathrel{\unicode{x02900}}}}
@@ -93565,8 +94440,12 @@ height:\LWR@printlength{\LWR@tempheight}%
\CustomizeMathJax{\newcommand{\leadstoext}{\mathrel{\unicode{xFF5E}}}}
-\CustomizeMathJax{\newcommand{\sqcupplus}{\mathbin{\LWRoverlaysymbols{+}{\unicode{x02294}}}}}
-\CustomizeMathJax{\newcommand{\sqcapplus}{\mathbin{\LWRoverlaysymbols{+}{\unicode{x02293}}}}}
+\CustomizeMathJax{\newcommand{\sqcupplus}{%
+ \mathbin{\LWRoverlaysymbols{+}{\unicode{x02294}}}%
+}}
+\CustomizeMathJax{\newcommand{\sqcapplus}{%
+ \mathbin{\LWRoverlaysymbols{+}{\unicode{x02293}}}%
+}}
\CustomizeMathJax{\newcommand{\dlb}{\mathopen{\unicode{x027E6}}}}
\CustomizeMathJax{\newcommand{\drb}{\mathopen{\unicode{x027E7}}}}
@@ -93581,7 +94460,9 @@ height:\LWR@printlength{\LWR@tempheight}%
\CustomizeMathJax{\newcommand{\forallAlt}{\mathord{\unicode{x02200}}}}
\CustomizeMathJax{\newcommand{\emptysetAlt}{\mathord{\unicode{x02205}}}}
-\CustomizeMathJax{\newcommand{\uppartial}{\mathord{\unicode{x02202}}}}% not upright
+\CustomizeMathJax{\newcommand{\uppartial}{%
+ \mathord{\unicode{x02202}}%
+}}% not upright
\CustomizeMathJax{\let\varmathbb\mathbb}
\CustomizeMathJax{\let\vmathbb\mathbb}
@@ -93664,31 +94545,71 @@ height:\LWR@printlength{\LWR@tempheight}%
\CustomizeMathJax{\let\Mmapsfrom\Mmappedfrom}% from kpfonts-otf
\CustomizeMathJax{\let\Longmmapsfrom\Longmmappedfrom}% from kpfonts-otf
%
-\CustomizeMathJax{\newcommand{\boxright}{\mathrel{\unicode{x025A1}\!\unicode{x02192}}}}
-\CustomizeMathJax{\newcommand{\boxleft}{\mathrel{\unicode{x02190}\!\unicode{x025A1}}}}
-\CustomizeMathJax{\newcommand{\boxdotright}{\mathrel{\unicode{x022A1}\!\unicode{x02192}}}}
-\CustomizeMathJax{\newcommand{\boxdotleft}{\mathrel{\unicode{x02190}\!\unicode{x022A1}}}}
-
-\CustomizeMathJax{\newcommand{\Diamondright}{\mathrel{\unicode{x025C7}\!\unicode{x02192}}}}
-\CustomizeMathJax{\newcommand{\Diamondleft}{\mathrel{\unicode{x02190}\!\unicode{x025C7}}}}
-\CustomizeMathJax{\newcommand{\Diamonddotright}{\mathrel{\unicode{x027D0}\!\unicode{x02192}}}}
-\CustomizeMathJax{\newcommand{\Diamonddotleft}{\mathrel{\unicode{x02190}\!\unicode{x027D0}}}}
-
-\CustomizeMathJax{\newcommand{\boxRight}{\mathrel{\unicode{x025A1}\!\unicode{x021D2}}}}
-\CustomizeMathJax{\newcommand{\boxLeft}{\mathrel{\unicode{x021D0}\!\unicode{x025A1}}}}
-\CustomizeMathJax{\newcommand{\boxdotRight}{\mathrel{\unicode{x022A1}\!\unicode{x021D2}}}}
-\CustomizeMathJax{\newcommand{\boxdotLeft}{\mathrel{\unicode{x021D0}\!\unicode{x022A1}}}}
-
-\CustomizeMathJax{\newcommand{\DiamondRight}{\mathrel{\unicode{x025C7}\!\unicode{x021D2}}}}
-\CustomizeMathJax{\newcommand{\DiamondLeft}{\mathrel{\unicode{x021D0}\!\unicode{x025C7}}}}
-\CustomizeMathJax{\newcommand{\DiamonddotRight}{\mathrel{\unicode{x027D0}\!\unicode{x021D2}}}}
-\CustomizeMathJax{\newcommand{\DiamonddotLeft}{\mathrel{\unicode{x021D0}\!\unicode{x027D0}}}}
+\CustomizeMathJax{\newcommand{\boxright}{%
+ \mathrel{\unicode{x025A1}\!\unicode{x02192}}%
+}}
+\CustomizeMathJax{\newcommand{\boxleft}{%
+ \mathrel{\unicode{x02190}\!\unicode{x025A1}}%
+}}
+\CustomizeMathJax{\newcommand{\boxdotright}{%
+ \mathrel{\unicode{x022A1}\!\unicode{x02192}}%
+}}
+\CustomizeMathJax{\newcommand{\boxdotleft}{%
+ \mathrel{\unicode{x02190}\!\unicode{x022A1}}%
+}}
+
+\CustomizeMathJax{\newcommand{\Diamondright}{%
+ \mathrel{\unicode{x025C7}\!\unicode{x02192}}%
+}}
+\CustomizeMathJax{\newcommand{\Diamondleft}{%
+ \mathrel{\unicode{x02190}\!\unicode{x025C7}}%
+}}
+\CustomizeMathJax{\newcommand{\Diamonddotright}{%
+ \mathrel{\unicode{x027D0}\!\unicode{x02192}}%
+}}
+\CustomizeMathJax{\newcommand{\Diamonddotleft}{%
+ \mathrel{\unicode{x02190}\!\unicode{x027D0}}%
+}}
+
+\CustomizeMathJax{\newcommand{\boxRight}{%
+ \mathrel{\unicode{x025A1}\!\unicode{x021D2}}%
+}}
+\CustomizeMathJax{\newcommand{\boxLeft}{%
+ \mathrel{\unicode{x021D0}\!\unicode{x025A1}}%
+}}
+\CustomizeMathJax{\newcommand{\boxdotRight}{%
+ \mathrel{\unicode{x022A1}\!\unicode{x021D2}}%
+}}
+\CustomizeMathJax{\newcommand{\boxdotLeft}{%
+ \mathrel{\unicode{x021D0}\!\unicode{x022A1}}%
+}}
+
+\CustomizeMathJax{\newcommand{\DiamondRight}{%
+ \mathrel{\unicode{x025C7}\!\unicode{x021D2}}%
+}}
+\CustomizeMathJax{\newcommand{\DiamondLeft}{%
+ \mathrel{\unicode{x021D0}\!\unicode{x025C7}}%
+}}
+\CustomizeMathJax{\newcommand{\DiamonddotRight}{%
+ \mathrel{\unicode{x027D0}\!\unicode{x021D2}}%
+}}
+\CustomizeMathJax{\newcommand{\DiamonddotLeft}{%
+ \mathrel{\unicode{x021D0}\!\unicode{x027D0}}%
+}}
\CustomizeMathJax{\newcommand{\Diamonddot}{\mathrel{\unicode{x027D0}}}}
-\CustomizeMathJax{\newcommand{\circleright}{\mathrel{\unicode{x025CB}\!\unicode{x02192}}}}
-\CustomizeMathJax{\newcommand{\circleleft}{\mathrel{\unicode{x02190}\!\unicode{x025CB}}}}
-\CustomizeMathJax{\newcommand{\circledotright}{\mathrel{\unicode{x02299}\!\unicode{x02192}}}}
-\CustomizeMathJax{\newcommand{\circledotleft}{\mathrel{\unicode{x02190}\!\unicode{x02299}}}}
+\CustomizeMathJax{\newcommand{\circleright}{%
+ \mathrel{\unicode{x025CB}\!\unicode{x02192}}%
+}}
+\CustomizeMathJax{\newcommand{\circleleft}{%
+ \mathrel{\unicode{x02190}\!\unicode{x025CB}}%
+}}
+\CustomizeMathJax{\newcommand{\circledotright}{%
+ \mathrel{\unicode{x02299}\!\unicode{x02192}}%
+}}
+\CustomizeMathJax{\newcommand{\circledotleft}{%
+ \mathrel{\unicode{x02190}\!\unicode{x02299}}%
+}}
\CustomizeMathJax{\let\circleddotright\circledotright}
\CustomizeMathJax{\let\circleddotleft\circledotleft}
@@ -93696,7 +94617,9 @@ height:\LWR@printlength{\LWR@tempheight}%
\CustomizeMathJax{\newcommand{\multimapboth}{\mathrel{\unicode{x029DF}}}}
\CustomizeMathJax{\newcommand{\multimapdot}{{\mathrel{-\!\bullet}}}}
\CustomizeMathJax{\newcommand{\multimapdotinv}{\mathrel{\bullet\!-}}}
-\CustomizeMathJax{\newcommand{\multimapdotboth}{\mathrel{{\bullet\!\!-\!\!\bullet}}}}
+\CustomizeMathJax{\newcommand{\multimapdotboth}{%
+ \mathrel{{\bullet\!\!-\!\!\bullet}}%
+}}
\CustomizeMathJax{\newcommand{\multimapdotbothA}{\mathrel{\unicode{x022B6}}}}
\CustomizeMathJax{\newcommand{\multimapdotbothB}{\mathrel{\unicode{x22B7}}}}
@@ -93741,11 +94664,17 @@ height:\LWR@printlength{\LWR@tempheight}%
\CustomizeMathJax{\newcommand{\colonapprox}{\mathrel{:\approx}}}
\CustomizeMathJax{\newcommand{\colonsim}{\mathrel{:\sim}}}
-\CustomizeMathJax{\newcommand{\Colonapprox}{\mathrel{\unicode{x2237}\!\approx}}}
+\CustomizeMathJax{\newcommand{\Colonapprox}{%
+ \mathrel{\unicode{x2237}\!\approx}%
+}}
\CustomizeMathJax{\newcommand{\Colonsim}{\mathrel{\unicode{x2237}\!\sim}}}
-\CustomizeMathJax{\newcommand{\strictif}{\mathrel{\unicode{x0297D}}}}% right fish tail
-\CustomizeMathJax{\newcommand{\strictfi}{\mathrel{\unicode{x0297C}}}}% left fish tail
+\CustomizeMathJax{\newcommand{\strictif}{%
+ \mathrel{\unicode{x0297D}}%
+}}% right fish tail
+\CustomizeMathJax{\newcommand{\strictfi}{%
+ \mathrel{\unicode{x0297C}}%
+}}% left fish tail
\CustomizeMathJax{\newcommand{\strictiff}{%
\mathrel{\unicode{x0297C}\!\!\unicode{x0297D}}%
}}% left/right fish tails
@@ -93758,8 +94687,12 @@ height:\LWR@printlength{\LWR@tempheight}%
}}
\CustomizeMathJax{\newcommand{\circledbar}{\mathbin{\unicode{x029B6}}}}
-\CustomizeMathJax{\newcommand{\openJoin}{\mathrel{\unicode{x2AA4}}}}% overlapping ><
-\CustomizeMathJax{\newcommand{\opentimes}{\mathrel{\unicode{x2AA4}}}}% overlapping ><
+\CustomizeMathJax{\newcommand{\openJoin}{%
+ \mathrel{\unicode{x2AA4}}%
+}}% overlapping ><
+\CustomizeMathJax{\newcommand{\opentimes}{%
+ \mathrel{\unicode{x2AA4}}%
+}}% overlapping ><
\CustomizeMathJax{\newcommand{\VvDash}{\mathrel{\unicode{x22AA}}}}
@@ -93769,7 +94702,9 @@ height:\LWR@printlength{\LWR@tempheight}%
\CustomizeMathJax{\newcommand{\lambdaslash}{\mathord{\unicode{x019B}}}}
-\CustomizeMathJax{\newcommand{\Wr}{\mathbin{\unicode{x02240}\!\unicode{x02240}}}}
+\CustomizeMathJax{\newcommand{\Wr}{%
+ \mathbin{\unicode{x02240}\!\unicode{x02240}}%
+}}
\CustomizeMathJax{\newcommand{\dashleftrightarrow}{%
\mathrel{\unicode{x021E0}\!\unicode{x021E2}}%
diff --git a/macros/latex/contrib/lwarp/lwarp.ins b/macros/latex/contrib/lwarp/lwarp.ins
index b78c0027ad..936ebf198b 100644
--- a/macros/latex/contrib/lwarp/lwarp.ins
+++ b/macros/latex/contrib/lwarp/lwarp.ins
@@ -474,6 +474,7 @@ version 2005/12/01 or later.
\file{lwarp-shapepar.sty}{\from{lwarp.dtx}{shapepar}}
\file{lwarp-showidx.sty}{\from{lwarp.dtx}{idx}}
\file{lwarp-showkeys.sty}{\from{lwarp.dtx}{showkeys}}
+\file{lwarp-showlabels.sty}{\from{lwarp.dtx}{showlabels}}
\file{lwarp-showtags.sty}{\from{lwarp.dtx}{showtags}}
\file{lwarp-shuffle.sty}{\from{lwarp.dtx}{shuffle}}
\file{lwarp-sidecap.sty}{\from{lwarp.dtx}{sidecap}}
@@ -587,6 +588,7 @@ version 2005/12/01 or later.
\file{lwarp-widows-and-orphans.sty}{\from{lwarp.dtx}{widows-and-orphans}}
\file{lwarp-witharrows.sty}{\from{lwarp.dtx}{witharrows}}
\file{lwarp-wrapfig.sty}{\from{lwarp.dtx}{wrapfig}}
+\file{lwarp-wrapfig2.sty}{\from{lwarp.dtx}{wrapfig2}}
\file{lwarp-xbmks.sty}{\from{lwarp.dtx}{xbmks}}
\file{lwarp-xcolor.sty}{\from{lwarp.dtx}{xcolor}}
\file{lwarp-xechangebar.sty}{\from{lwarp.dtx}{xechangebar}}
diff --git a/macros/latex/contrib/lwarp/lwarp.pdf b/macros/latex/contrib/lwarp/lwarp.pdf
index e6119bc4e8..a9286ae0f9 100644
--- a/macros/latex/contrib/lwarp/lwarp.pdf
+++ b/macros/latex/contrib/lwarp/lwarp.pdf
Binary files differ
diff --git a/macros/latex/contrib/lwarp/lwarpmk.lua b/macros/latex/contrib/lwarp/lwarpmk.lua
index eddb459816..b0d9a1c6f4 100755
--- a/macros/latex/contrib/lwarp/lwarpmk.lua
+++ b/macros/latex/contrib/lwarp/lwarpmk.lua
@@ -1,8 +1,8 @@
#!/usr/bin/env texlua
--- Copyright 2016-2021 Brian Dunn
+-- Copyright 2016-2022 Brian Dunn
-printversion = "v0.902"
+printversion = "v0.903"
requiredconfversion = "2" -- also at *lwarpmk.conf
function printhelp ()
@@ -383,8 +383,15 @@ function pdftohtml ()
-- Convert to text:
print ("lwarpmk: Converting " .. sourcename
.."_html.pdf to " .. sourcename .. "_html.html")
-os.execute("pdftotext -enc " .. pdftotextenc .. " -nopgbrk -layout "
+err = os.execute("pdftotext -enc " .. pdftotextenc .. " -nopgbrk -layout "
.. sourcename .. "_html.pdf " .. sourcename .. "_html.html")
+if ( err ~= 0 ) then
+ print ("lwarpmk: ===")
+ print ("lwarpmk: Ensure that the Poppler utilities are installed." )
+ print ("lwarpmk: See the Lwarp manual: `Installing additional utilities'." )
+ print ("lwarpmk: ===")
+ os.exit(1)
+end
-- Split the result into individual HTML files:
splitfile (homehtmlfilename .. ".html" , sourcename .. "_html.html")
end
diff --git a/macros/latex/contrib/mindflow/README.md b/macros/latex/contrib/mindflow/README.md
index 5b8f135fb0..16c3675a42 100644
--- a/macros/latex/contrib/mindflow/README.md
+++ b/macros/latex/contrib/mindflow/README.md
@@ -1,4 +1,4 @@
-<!-- Copyright (C) 2021 by Jinwen XU -->
+<!-- Copyright (C) 2021-2022 by Jinwen XU -->
# The mindflow package
@@ -6,6 +6,8 @@
More specifically, it provides a LaTeX environment with its own line numbers or markers, which can be well distinguished from the main text.
+For more information, please refer to its documentation.
+
# License
This work is released under the LaTeX Project Public License, v1.3c or later.
diff --git a/macros/latex/contrib/mindflow/mindflow.dtx b/macros/latex/contrib/mindflow/mindflow.dtx
index 8111c872ec..221a7e3c78 100644
--- a/macros/latex/contrib/mindflow/mindflow.dtx
+++ b/macros/latex/contrib/mindflow/mindflow.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2021 by Jinwen XU
+% Copyright (C) 2021-2022 by Jinwen XU
% -------------------------------
%
% This file may be distributed and/or modified under the conditions of the LaTeX
@@ -18,7 +18,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{mindflow}
%<*package>
- [2021/12/16 mindflow environment]
+ [2022/01/31 The mindflow environment]
%</package>
%
%<*driver>
@@ -26,18 +26,23 @@
\usepackage{doc}
\usepackage[a4paper,top=1.2in,bottom=1.2in,left=1.6in,right=1.2in]{geometry}
\usepackage{titlesec}
-\titleformat{\section}{\large\scshape\centering}{\thesection.}{.5em}{}
-\titleformat{\subsection}{\large\itshape}{\thesubsection}{.5em}{}
+\titleformat{\section}{\large\scshape\centering}{\textcolor{black!55}{$\thesection$}}{.5em}{}
+\titleformat{\subsection}{\normalsize\scshape}{\textcolor{black!55}{$\thesubsection$}}{.5em}{}
+\titlespacing{\section}{0pt}{.75pc}{.5pc}
+\titlespacing{\subsection}{0pt}{.75pc}{.5pc}
\usepackage{titling}
-\setlength{\droptitle}{-.7in}
+\setlength{\droptitle}{-.75in}
\usepackage{enumitem}
\setlist{noitemsep}
-\usepackage{mathpazo,newpxtext}
+\setlist[itemize,1]{label=\textcolor{black!55}{$\bullet$}}
+\usepackage{newpxtext}
\useosf
+\usepackage{amssymb}
+\usepackage[euler-digits]{eulervm}
+% \usepackage{ebgaramond,ebgaramond-maths}
\usepackage[symbol]{footmisc}
\usepackage{microtype}
-\PassOptionsToPackage{mathlines}{lineno}
-\usepackage[linenumber,rightmarker]{mindflow}
+\usepackage[mathlines,linenumber,rightmarker]{mindflow}
\usepackage{parskip}
\usepackage{listings}
\definecolor{maintheme}{RGB}{50,100,150}
@@ -63,7 +68,7 @@
{linenumbers,nolinenumbers,mindflowLeft,mindflowRight,mindflowTextFont,mindflowNumFont,mindflowMarkerFont,mindflowLineHeight,setlength,colorlet,color,
RequirePackage,SetupKeyvalOptions,DeclareBoolOption,ProcessKeyvalOptions,PassOptionsToPackage,
PackageWarning,MessageBreak,
- @mindflow@incolumntrue,if@mindflow@linenumber,@mindflow@leftlinenumbertrue,if@mindflow@on,if@mindflow@off,@mindflow@offfalse,if@mindflow@incolumn,if@mindflow@leftlinenumber,if@mindflow@rightlinenumber,if@mindflow@leftmarker,if@mindflow@rightmarker,if@mindflow@nonbreakable,
+ @mindflow@incolumntrue,if@mindflow@linenumber,@mindflow@leftlinenumbertrue,if@mindflow@on,if@mindflow@off,@mindflow@offfalse,if@mindflow@incolumn,if@mindflow@leftlinenumber,if@mindflow@rightlinenumber,if@mindflow@leftmarker,if@mindflow@rightmarker,if@mindflow@nonbreakable,if@mindflow@mathlines,
mindflow@parindent,mindflow@parskip,
ifLNturnsON,LNturnsONtrue,LNturnsONfalse,ifLineNumbers,
mindflowset,
@@ -82,7 +87,7 @@
\lstnewenvironment{code*}%
{\setkeys{lst}{columns=fullflexible,keepspaces=true}}{}
\lstnewenvironment{code}%
-{\setkeys{lst}{columns=fullflexible,keepspaces=true,numbers=left,numberstyle=\scriptsize, stepnumber=1, numbersep=5pt,lastline=231}}{}
+{\setkeys{lst}{columns=fullflexible,keepspaces=true,numbers=left,numberstyle=\scriptsize, stepnumber=1, numbersep=5pt,lastline=236}}{}
\EnableCrossrefs
\CodelineIndex
\RecordChanges
@@ -97,25 +102,25 @@
% \GetFileInfo{mindflow.dtx}
%
%
-% \title{{\normalfont\textsf{mindflow}} -- write your ideas in a clear way}
-% \author{\scshape Jinwen Xu}
-% \date{\filedate}
+% \title{{\huge\scshape\textsf{mindflow}}\\[.15\baselineskip]\itshape\large write your ideas in a clear way\smallskip}
+% \author{\scshape Jinwen XU}
+% \footnotetext{\hspace*{-1em}Corresponding to: \textsf{mindflow} \ttfamily\filedate}
+% \date{\normalsize January 2022, in Paris}
%
% \maketitle
%
% \section{Introduction}
%
% The \textsf{mindflow} package provides you a way to write your ideas
-% and annotations clearly. For example, with the options
-% \verb|linenumber| and \verb|rightmarker|, you will get something like:
+% and annotations clearly. For example, with the options \verb|linenumber|
+% and \verb|rightmarker|, you will get something like this:
% \begin{mindflow}
% What to write next:
% \begin{itemize}
% \item usage: the initialization, options and configuration;
-% \item an example;
+% \item an example maybe;
% \item some word on the line numbering feature;
-% \item some internal macros;
-% \item the complete code.
+% \item some internal macros and the complete code.
% \end{itemize}
% \end{mindflow}
% This example only shows the default effect. You can customize it further according to the instructions in the next section.
@@ -123,7 +128,7 @@
% \section{The usage}
%
% \subsection{How to load it\,?}
-% Simply load the package with
+% Simply load the package with
% \iffalse
%<*example>
% \fi
@@ -134,21 +139,24 @@
%</example>
% \fi
%
-% By default, the environment has no line numbers or markers. You can use the
-% following options (they can be specified directly, like \verb|off|, or as a
-% boolean optional, like \verb|off=false|):
+% By default, there are no decorations like line numbers or markers. To enable
+% them, you can use the following options (they can be specified directly, like
+% \verb|off|, or as a boolean optional, like \verb|off=false|):
%
+% \begin{center}
% \begin{tabular}{ll}
-% \verb|linenumber|\hspace{5em} & Same as \verb|leftlinenumber|\\
+% \verb|linenumber|\hspace{5em} & Enable line numbering feature, same as \verb|leftlinenumber|\\
+% \verb|mathlines| & Enable line numbers for displayed equations\\
% \verb|leftlinenumber| & Enable left line numbers\\
% \verb|rightlinenumber| & Enable right line numbers\\
-% \verb|leftmarker| & Enable left marker, by default it is a ``\verb|*|''\\
-% \verb|rightmarker| & Enable right marker, by default it is a ``\verb|*|''\\
+% \verb|leftmarker| & Enable left marker, by default it is an asterisk ``\verb|*|''\\
+% \verb|rightmarker| & Enable right marker, by default it is an asterisk ``\verb|*|''\\
% \verb|incolumn| & The separation line would fit in the column \\&(\emph{automatically applied in two-column documents})\\
% \verb|off|, \verb|on| & Turn the \verb|mindflow| environments \emph{off} or \emph{on}
% \end{tabular}
+% \end{center}
%
-% Additionally, there is an option \verb|nonbreakble|, which enables the \textsf{tcolorbox} version, permits a background color, but is not breakable and doesn't support line numbering quite well.
+% There is also an option \verb|nonbreakable|, which enables the \textsf{tcolorbox} version, permitting a background color, but is not breakable and does not support line numbering quite well.
%
% \subsection{How to use it\,?}
% \DescribeEnv{\{mindflow\}}
@@ -165,11 +173,13 @@
%</example>
% \fi
%
-% \subsection{Further configuration}
+% \subsection{Further configurations}
%
% \DescribeMacro{\mindflowset}
% You can use \lstinline|\mindflowset{|\meta{configuration}\lstinline|}| to
-% configure the \texttt{mindflow} environment. The available keys are listed at the top of the next page.
+% further configure the \texttt{mindflow} environment. The available keys are
+% listed at the top of the next page.
+% \clearpage
%
% \begin{center}
% \begin{tabular}{ll|ll}
@@ -181,10 +191,10 @@
% \verb|linecolor| & Color of the separation line & \verb|lineheight| & Height of the separation line\\
% \hline
% \end{tabular}
-%\end{center}
+% \end{center}
%
-% Additionally, all the options mentioned in the previous section (except for \verb|nonbreakble|) can be set with \lstinline|\mindflowset|.%
-% \footnote{If the package option \texttt{nonbreakble} is enabled, then there is also a key \texttt{backgroundcolor}, similar to \texttt{textcolor}, for configuring the background color of the \texttt{mindflow} environments.}
+% Additionally, most of the options mentioned in the previous section (except for \verb|nonbreakable| and \verb|mathlines|) can be set with \lstinline|\mindflowset|.%
+% \footnote{If the package option \texttt{nonbreakable} is enabled, then there is also a key \texttt{backgroundcolor}, similar to \texttt{textcolor}, for configuring the background color of the \texttt{mindflow} environments.}
%
% \section{An example}
% With the following settings:
@@ -210,7 +220,7 @@
%</example>
% \fi
% \vspace{-.5\baselineskip}
-% One will have something like this:
+% One will get something like this (a little bit exaggerated, to be honest):
% \begingroup
% \makeatletter
% \@mindflow@leftmarkertrue
@@ -249,40 +259,29 @@
%
% \nolinenumbers
%
-% The line numbering feature is provided by the package \textsf{lineno}. For
-% more details, please refer to its documentation. Notice that, by default,
-% displayed equations are not numbered. You can add the following line before
-% \lstinline|\usepackage{mindflow}|:
-% \iffalse
-%<*example>
-% \fi
-\begin{code*}
-\PassOptionsToPackage{mathlines}{lineno}
-\end{code*}
-% \iffalse
-%</example>
-% \fi
-% \vspace{-.5\baselineskip}
-% to enable the line numbers for displayed equations.
+% The line numbering feature is provided by package \textsf{lineno}. For
+% more details, please refer to its documentation. Notice that
+% displayed equations are not numbered by default. To enable the line numbers for them, you can use the option \verb|mathlines|. The result would be like:
%
% \begin{mindflow}\vspace{-\baselineskip}
% \begin{align*}
-% (a + b)^2 &= a^2 + 2ab + b^2\\
-% (a + b)^3 &= a^3 + 3a^2b + 3ab^2 + b^3
+% \sum_{i_1 < \cdots < i_n} \prod_{1 \leqslant j \leqslant n} i_j^{-2} &= \frac{\pi^{2n}}{(2n+1)!}\\
+% \implies \frac{e^{\pi}-e^{-\pi}}{2\pi} &= 1+ \sum_{n \geqslant 1} \sum_{i_1 < \cdots < i_n} \prod_{1 \leqslant j \leqslant n} i_j^{-2}
% \end{align*}
% \end{mindflow}
-% \smallskip
%
% \clearpage
+% {\color{black!55}
% \makebox[\linewidth]{\rule{4\paperwidth}{\mindflowLineHeight}}%
% \centerline{\itshape ---~~Readers who are not interested in technical details can skip the rest~~---}
%
% \vspace{-\baselineskip}
% \makebox[\linewidth]{\rule{4\paperwidth}{\mindflowLineHeight}}%
+% }
%
% \section{Some \TeX{}nical details}
%
-% \subsection{Internal macro for text elements}
+% \subsection{Internal macros for text elements}
% \DescribeMacro{\mindflowTextFont}
% \DescribeMacro{\mindflowNumFont}
% \DescribeMacro{\mindflowMarkerFont}
@@ -313,7 +312,7 @@
% The height of the separation lines is a length macro named \lstinline|\mindflowLineHeight|,
% with default value \verb|0.4pt|. You can change this with \lstinline|\setlength|.
%
-% \subsection{Internal name of the colors}
+% \subsection{Internal names of the colors}
% \DescribeMacro{mindflowLine}
% \DescribeMacro{mindflowText}
% \DescribeMacro{mindflowNum}
@@ -328,7 +327,7 @@
% \DescribeMacro{*mindflowBackground}
% If the package option \verb|nonbreakable| is enabled, then there is also the background color \verb|mindflowBackground|, which by default is white.
%
-% \section{The same example}
+% \section{The same example revisited}
% With option \verb|leftlinenumber, rightlinenumber, leftmarker, rightmarker|
% and the following settings:
% \iffalse
@@ -356,7 +355,7 @@
%
% \begin{itemize}
% \item There is no absolute guarantee that the separation lines will not fall alone at the top or bottom of the page, though great effort has been made to reduce the occurrence of such situation.
-% \item The \textsf{nonbreakable} version doesn't support line numbering quite well, especially for displayed equations. This is due to the usage of \verb|internallinenumbers|.
+% \item The \texttt{nonbreakable} version does not support line numbering quite well, especially for displayed equations. This is due to the usage of \verb|internallinenumbers|.
% \end{itemize}
%
% \StopEventually{}
@@ -380,6 +379,7 @@
\DeclareBoolOption[false]{rightlinenumber} % Right line numbers
\DeclareBoolOption[false]{incolumn} % Separation line fits in column
\DeclareBoolOption[false]{nonbreakable} % Use the tcolorbox version
+\DeclareBoolOption[false]{mathlines} % Add line numbers to equations
\ProcessKeyvalOptions*\relax
@@ -389,6 +389,9 @@
\if@mindflow@linenumber
\@mindflow@leftlinenumbertrue
\fi
+\if@mindflow@mathlines
+ \PassOptionsToPackage{mathlines}{lineno}
+\fi
%%================================
%% Initialization
@@ -594,6 +597,7 @@
\define@key{mindflow}{left}{\renewcommand{\mindflowLeft}{#1}}
\define@key{mindflow}{right}{\renewcommand{\mindflowRight}{#1}}
\define@key{mindflow}{lineheight}{\setlength{\mindflowLineHeight}{#1}}
+
\newcommand{\mindflowset}[1]{%
\setkeys{mindflow}{#1}%
}
diff --git a/macros/latex/contrib/mindflow/mindflow.pdf b/macros/latex/contrib/mindflow/mindflow.pdf
index 5771109955..b702a90053 100644
--- a/macros/latex/contrib/mindflow/mindflow.pdf
+++ b/macros/latex/contrib/mindflow/mindflow.pdf
Binary files differ
diff --git a/macros/latex/contrib/proof-at-the-end/README.md b/macros/latex/contrib/proof-at-the-end/README.md
index c111036875..5e7a2f9b95 100644
--- a/macros/latex/contrib/proof-at-the-end/README.md
+++ b/macros/latex/contrib/proof-at-the-end/README.md
@@ -48,7 +48,7 @@ If `proof-at-the-end` it's not installed in your CTAN distribution, copy the [`p
And I am a proof.
\end{proofE}
```
-The options (here `restate` and `end`) tells what should go in appendix, how to configure the links... Here the proof should go in appendix, and the `restate` options states that the theorem should be restated before the proof.
+The options (here `restate` and `end`) tells what should go in appendix, how to configure the links... Here the proof should go in appendix, and the `restate` options states that the theorem should be restated before the proof. Note that in case you don't want any title but do want to add options, make sure to insert an empty pair of brackets like in `\begin{thmE}[][end, text link=]` (the option `text link` is used to choose the text of the link to the proof, writting `text link=` is used to display no link at all).
You can find below a full example to compile which should produce this output (sorry, this is a screenshot, that way I can export it easily in the github page). Just make sure to compile twice to get references.
@@ -69,14 +69,15 @@ You can directly copy them (with a more complete demo) in the github page here h
\newcommand{\thmautorefname}{Theorem}
%% Load the library. createShortEnv automatically creates the shortcuts
-%% thmE, theoremE, lemmaE, corrolaryE, proofE. See \newEndThm for more details.
+%% thmE, theoremE, lemmaE, propositionE, corollaryE, proofE. See \newEndThm for more details.
\usepackage[createShortEnv]{proof-at-the-end}
\begin{document}
\section{Theorems}
-\begin{thmE}[My title][end]
+%% If you don't have any title, leave an empty bracket like \begin{thmE}[][end]
+\begin{thmE}[My title][end, restate]
I am a theorem
\end{thmE}
\begin{proofE}
@@ -184,7 +185,7 @@ For example:
\end{proofEnd}
```
-Since `theoremEnd` may be a bit verbose to use, we provide since the version 2022/01/28, an option: if you load the program using `\usepackage[createShortEnv]{proof-at-the-end}`, you will automatically have the shortcut environments `proofE` (to replace `proof`), `thmE` (to replace `thm`), `theoremE` (to replace... ok you got the pattern), `lemmaE` and `corollaryE`. Note that it is your role to define the initial commands `thm`..., but you don't need to define them all, only those that you use. Then, you can use them like:
+Since `theoremEnd` may be a bit verbose to use, we provide since the version 2022/01/28, an option: if you load the program using `\usepackage[createShortEnv]{proof-at-the-end}`, you will automatically have the shortcut environments `proofE` (to replace `proof`), `thmE` (to replace `thm`), `theoremE` (to replace... ok you got the pattern), `lemmaE`, `propositionE` and `corollaryE`. Note that it is your role to define the initial commands `thm`..., but you don't need to define them all, only those that you use. Then, you can use them like:
```latex
\begin{thmE}[My title][end, restate]
@@ -527,6 +528,10 @@ In anycase, there exists some workarounds, some of the are for instance give in
## Changelog
+- 2022/02/01:
+ 1. Fix a typo when defining the shortcut for lemma
+ 2. Add a shortcut for proposition
+ 3. Fix a small spacing issue in the text before the proof in Appendix
- 2022/01/28:
1. Fix the issue when using sharps in a proof https://github.com/leo-colisson/proof-at-the-end/issues/7.
2. Provide `\newEndThm`, `\newEndProof` and the option `createShortEnv` to quickly create environments.
diff --git a/macros/latex/contrib/proof-at-the-end/proof-at-the-end.dtx b/macros/latex/contrib/proof-at-the-end/proof-at-the-end.dtx
index 6bb4aa3265..d5f6ac4646 100644
--- a/macros/latex/contrib/proof-at-the-end/proof-at-the-end.dtx
+++ b/macros/latex/contrib/proof-at-the-end/proof-at-the-end.dtx
@@ -1,12 +1,12 @@
%\iffalse
% proof-at-the-end.dtx generated using makedtx version 1.2 (c) Nicola Talbot
% Command line args:
-% -dir "/home/leo/Documents/Informatique/Programmation/LaTeX/proof-at-the-end/"
-% -doc "../doc/proof-at-the-end_doc.tex"
% -author "Léo Colisson"
% -src "proof-at-the-end\.sty=>proof-at-the-end.sty"
+% -dir "/home/leo/Documents/Informatique/Programmation/LaTeX/proof-at-the-end/"
+% -doc "../doc/proof-at-the-end_doc.tex"
% proof-at-the-end
-% Created on 2022/1/28 19:43
+% Created on 2022/2/1 17:07
%\fi
%\iffalse
%<*package>
@@ -251,7 +251,12 @@
%The options (here \texttt{restate} and \texttt{end}) tells what should
%go in appendix, how to configure the links\ldots{} Here the proof should
%go in appendix, and the \texttt{restate} options states that the theorem
-%should be restated before the proof.
+%should be restated before the proof. Note that in case you don't want
+%any title but do want to add options, make sure to insert an empty pair
+%of brackets like in
+%\texttt{\textbackslash{}begin\{thmE\}{[}{]}{[}end,\ text\ link={]}} (the
+%option \texttt{text\ link} is used to choose the text of the link to the
+%proof, writting \texttt{text\ link=} is used to display no link at all).
%
%You can find below a full example to compile which should produce this
%output (sorry, this is a screenshot, that way I can export it easily in
@@ -280,14 +285,15 @@
%\FunctionTok{\textbackslash{}newcommand}\NormalTok{\{}\ExtensionTok{\textbackslash{}thmautorefname}\NormalTok{\}\{Theorem\}}
%
%\CommentTok{\%\% Load the library. createShortEnv automatically creates the shortcuts}
-%\CommentTok{\%\% thmE, theoremE, lemmaE, corrolaryE, proofE. See \textbackslash{}newEndThm for more details.}
+%\CommentTok{\%\% thmE, theoremE, lemmaE, propositionE, corollaryE, proofE. See \textbackslash{}newEndThm for more details.}
%\BuiltInTok{\textbackslash{}usepackage}\NormalTok{[createShortEnv]\{}\ExtensionTok{proof{-}at{-}the{-}end}\NormalTok{\}}
%
%\KeywordTok{\textbackslash{}begin}\NormalTok{\{}\ExtensionTok{document}\NormalTok{\}}
%
%\KeywordTok{\textbackslash{}section}\NormalTok{\{Theorems\}}
%
-%\KeywordTok{\textbackslash{}begin}\NormalTok{\{}\ExtensionTok{thmE}\NormalTok{\}[My title][end]}
+%\CommentTok{\%\% If you don\textquotesingle{}t have any title, leave an empty bracket like \textbackslash{}begin\{thmE\}[][end]}
+%\KeywordTok{\textbackslash{}begin}\NormalTok{\{}\ExtensionTok{thmE}\NormalTok{\}[My title][end, restate]}
%\NormalTok{ I am a theorem}
%\KeywordTok{\textbackslash{}end}\NormalTok{\{}\ExtensionTok{thmE}\NormalTok{\}}
%\KeywordTok{\textbackslash{}begin}\NormalTok{\{}\ExtensionTok{proofE}\NormalTok{\}}
@@ -459,9 +465,10 @@
%you will automatically have the shortcut environments \texttt{proofE}
%(to replace \texttt{proof}), \texttt{thmE} (to replace \texttt{thm}),
%\texttt{theoremE} (to replace\ldots{} ok you got the pattern),
-%\texttt{lemmaE} and \texttt{corollaryE}. Note that it is your role to
-%define the initial commands \texttt{thm}\ldots, but you don't need to
-%define them all, only those that you use. Then, you can use them like:
+%\texttt{lemmaE}, \texttt{propositionE} and \texttt{corollaryE}. Note
+%that it is your role to define the initial commands \texttt{thm}\ldots,
+%but you don't need to define them all, only those that you use. Then,
+%you can use them like:
%
%\begin{Shaded}
%\begin{Highlighting}[]
@@ -1119,6 +1126,19 @@
%\begin{itemize}
%\tightlist
%\item
+% 2022/02/01:
+%
+% \begin{enumerate}
+% \def\labelenumi{\arabic{enumi}.}
+% \tightlist
+% \item
+% Fix a typo when defining the shortcut for lemma
+% \item
+% Add a shortcut for proposition
+% \item
+% Fix a small spacing issue in the text before the proof in Appendix
+% \end{enumerate}
+%\item
% 2022/01/28:
%
% \begin{enumerate}
@@ -1188,7 +1208,7 @@
% \end{macrocode}
%\fi
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{proof-at-the-end}[2022/01/28 A package to move proofs in appendix]
+\ProvidesPackage{proof-at-the-end}[2022/02/01 A package to move proofs in appendix]
\RequirePackage{etoolbox}
\RequirePackage{thmtools}
@@ -1589,13 +1609,13 @@
\NewDocumentCommand\pratendSectionlikeCref{}{%
\pratendRef{proofsection:prAtEnd\pratendcountercurrent}%
}
-\NewDocumentCommand\pratendChangeCurrentLabel{}{
+\NewDocumentCommand\pratendChangeCurrentLabel{}{%
\ifdefined\pratend@sectionlike@stored@label%
\let\@currentlabel\pratend@sectionlike@stored@label%
\fi%
}
-\ifpratendOptdisablePatchSection
-\else
+\ifpratendOptdisablePatchSection%
+\else %
%% Add the above command to \chapter if the command exists
\ifdef{\@chapter}{
\ifpatchable*{\@chapter}{
@@ -1618,7 +1638,7 @@
%% Instead of \autoref{proof:blabla} use \pratendRef{proof:blabla}, it allows the ref command to be customized
%% as an option of the package.
\NewDocumentCommand\pratendRef{m}{%
- \csname \pratendOptcommandRef\endcsname{#1}
+ \csname \pratendOptcommandRef\endcsname{#1}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1637,7 +1657,7 @@
% }{}
\NewDocumentEnvironment{#2}{O{}O{}}{%
\begin{theoremEnd}[#1,##2]{#3}[##1]%
- }{\end{theoremEnd}}
+ }{\end{theoremEnd}}%
}
% \NewDocumentCommand{\newEndThm}{O{}mm}{%
@@ -1661,7 +1681,7 @@
\begin{proofEnd}[#1,##1]%
##2%
\end{proofEnd}%
- }{}
+ }{}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1671,9 +1691,10 @@
%%% We create automatically the environments.
\newEndProof{proofE}
\newEndThm{thmE}{thm}
- \newEndThm{lemmaE}{lemmaE}
+ \newEndThm{lemmaE}{lemma}
\newEndThm{theoremE}{theorem}
\newEndThm{corollaryE}{corollary}
+ \newEndThm{propositionE}{proposition}
\fi
\endinput
diff --git a/macros/latex/contrib/proof-at-the-end/proof-at-the-end.ins b/macros/latex/contrib/proof-at-the-end/proof-at-the-end.ins
index 35ac253c53..3ebaf4fd46 100644
--- a/macros/latex/contrib/proof-at-the-end/proof-at-the-end.ins
+++ b/macros/latex/contrib/proof-at-the-end/proof-at-the-end.ins
@@ -1,4 +1,4 @@
-% proof-at-the-end.ins generated using makedtx version 1.2 2022/1/28 19:43
+% proof-at-the-end.ins generated using makedtx version 1.2 2022/2/1 17:07
\input docstrip
\preamble
diff --git a/macros/latex/contrib/proof-at-the-end/proof-at-the-end.pdf b/macros/latex/contrib/proof-at-the-end/proof-at-the-end.pdf
index 63ce2cb59f..7672d46631 100644
--- a/macros/latex/contrib/proof-at-the-end/proof-at-the-end.pdf
+++ b/macros/latex/contrib/proof-at-the-end/proof-at-the-end.pdf
Binary files differ
diff --git a/macros/latex/contrib/proof-at-the-end/proof-at-the-end_demo.pdf b/macros/latex/contrib/proof-at-the-end/proof-at-the-end_demo.pdf
index 2186bcc823..ac5ddf1d5c 100644
--- a/macros/latex/contrib/proof-at-the-end/proof-at-the-end_demo.pdf
+++ b/macros/latex/contrib/proof-at-the-end/proof-at-the-end_demo.pdf
Binary files differ
diff --git a/macros/latex/contrib/zref-vario/CHANGELOG.md b/macros/latex/contrib/zref-vario/CHANGELOG.md
index 7702b1e815..968785ecbf 100644
--- a/macros/latex/contrib/zref-vario/CHANGELOG.md
+++ b/macros/latex/contrib/zref-vario/CHANGELOG.md
@@ -1,6 +1,11 @@
# Changelog
-## [Unreleased]
+## [Unreleased](https://github.com/gusbrs/zref-vario/compare/v0.1.1-alpha...HEAD)
+
+## [v0.1.1-alpha](https://github.com/gusbrs/zref-vario/compare/v0.1.0-alpha...v0.1.1-alpha) (2022-02-01)
+
+### Changed
+- Improved loading setup of required packages.
## [v0.1.0-alpha](https://github.com/gusbrs/zref-vario/releases/tag/v0.1.0-alpha) (2022-01-31)
diff --git a/macros/latex/contrib/zref-vario/zref-vario-code.pdf b/macros/latex/contrib/zref-vario/zref-vario-code.pdf
index 00e63f3389..88f1636636 100644
--- a/macros/latex/contrib/zref-vario/zref-vario-code.pdf
+++ b/macros/latex/contrib/zref-vario/zref-vario-code.pdf
Binary files differ
diff --git a/macros/latex/contrib/zref-vario/zref-vario.dtx b/macros/latex/contrib/zref-vario/zref-vario.dtx
index f58b39af25..9d5992f8f3 100644
--- a/macros/latex/contrib/zref-vario/zref-vario.dtx
+++ b/macros/latex/contrib/zref-vario/zref-vario.dtx
@@ -128,7 +128,7 @@
%
% Identify the package.
% \begin{macrocode}
-\ProvidesExplPackage {zref-vario} {2022-01-31} {0.1.0-alpha}
+\ProvidesExplPackage {zref-vario} {2022-02-01} {0.1.1-alpha}
{Extended LaTeX page cross-references with varioref and zref-clever}
% \end{macrocode}
%
@@ -136,8 +136,11 @@
% Required packages.
%
% \begin{macrocode}
-\RequirePackage { varioref }
-\RequirePackage { zref-clever } [ 2022-01-28 ] % v0.2.0-alpha
+\AddToHook { begindocument/before }
+ {
+ \RequirePackage { varioref }
+ \RequirePackage { zref-clever } [ 2022-01-28 ] % v0.2.0-alpha
+ }
% \end{macrocode}
%
%
@@ -314,16 +317,19 @@
\seq_new:N \g_@@_setup_languages_seq
\NewDocumentCommand \zvLanguageSetup { m m }
{
- \group_begin:
- \zrefclever_language_if_declared:nTF {#1}
+ \AddToHook { begindocument/before }
{
- \tl_set:Nn \l_@@_setup_language_tl {#1}
- \keys_set:nn { zref-vario/langsetup } {#2}
- \seq_gput_right:Nx \g_@@_setup_languages_seq
- { \@@_base_lang:n {#1} }
+ \group_begin:
+ \zrefclever_language_if_declared:nTF {#1}
+ {
+ \tl_set:Nn \l_@@_setup_language_tl {#1}
+ \keys_set:nn { zref-vario/langsetup } {#2}
+ \seq_gput_right:Nx \g_@@_setup_languages_seq
+ { \@@_base_lang:n {#1} }
+ }
+ { \msg_warning:nnn { zref-vario } { unknown-language-setup } {#1} }
+ \group_end:
}
- { \msg_warning:nnn { zref-vario } { unknown-language-setup } {#1} }
- \group_end:
}
\msg_new:nnn { zref-vario } { unknown-language-setup }
{
@@ -498,56 +504,59 @@
% \begin{macrocode}
\group_begin:
\tl_set:Nn \l_@@_setup_language_tl { zv_unknown_language }
-\keys_set:nn { zref-vario/langsetup }
+\AddToHook { begindocument/before }
{
- reftextfaceafter =
- {
- \msg_warning:nnxx { zref-vario } { missing-string }
- { reftextfaceafter } { \l_@@_ref_language_tl }
- \zref@default
- } ,
- reftextfacebefore =
- {
- \msg_warning:nnxx { zref-vario } { missing-string }
- { reftextfacebefore } { \l_@@_ref_language_tl }
- \zref@default
- } ,
- reftextafter =
- {
- \msg_warning:nnxx { zref-vario } { missing-string }
- { reftextafter } { \l_@@_ref_language_tl }
- \zref@default
- } ,
- reftextbefore =
- {
- \msg_warning:nnxx { zref-vario } { missing-string }
- { reftextbefore } { \l_@@_ref_language_tl }
- \zref@default
- } ,
- reftextcurrent =
- {
- \msg_warning:nnxx { zref-vario } { missing-string }
- { reftextcurrent } { \l_@@_ref_language_tl }
- \zref@default
- } ,
- reftextfaraway =
+ \keys_set:nn { zref-vario/langsetup }
{
- \msg_warning:nnxx { zref-vario } { missing-string }
- { reftextfaraway } { \l_@@_ref_language_tl }
- \zref@default
- } ,
- reftextpagerange =
- {
- \msg_warning:nnxx { zref-vario } { missing-string }
- { reftextpagerange } { \l_@@_ref_language_tl }
- \zref@default
- } ,
- reftextlabelrange =
- {
- \msg_warning:nnxx { zref-vario } { missing-string }
- { reftextlabelrange } { \l_@@_ref_language_tl }
- \zref@default
- } ,
+ reftextfaceafter =
+ {
+ \msg_warning:nnxx { zref-vario } { missing-string }
+ { reftextfaceafter } { \l_@@_ref_language_tl }
+ \zref@default
+ } ,
+ reftextfacebefore =
+ {
+ \msg_warning:nnxx { zref-vario } { missing-string }
+ { reftextfacebefore } { \l_@@_ref_language_tl }
+ \zref@default
+ } ,
+ reftextafter =
+ {
+ \msg_warning:nnxx { zref-vario } { missing-string }
+ { reftextafter } { \l_@@_ref_language_tl }
+ \zref@default
+ } ,
+ reftextbefore =
+ {
+ \msg_warning:nnxx { zref-vario } { missing-string }
+ { reftextbefore } { \l_@@_ref_language_tl }
+ \zref@default
+ } ,
+ reftextcurrent =
+ {
+ \msg_warning:nnxx { zref-vario } { missing-string }
+ { reftextcurrent } { \l_@@_ref_language_tl }
+ \zref@default
+ } ,
+ reftextfaraway =
+ {
+ \msg_warning:nnxx { zref-vario } { missing-string }
+ { reftextfaraway } { \l_@@_ref_language_tl }
+ \zref@default
+ } ,
+ reftextpagerange =
+ {
+ \msg_warning:nnxx { zref-vario } { missing-string }
+ { reftextpagerange } { \l_@@_ref_language_tl }
+ \zref@default
+ } ,
+ reftextlabelrange =
+ {
+ \msg_warning:nnxx { zref-vario } { missing-string }
+ { reftextlabelrange } { \l_@@_ref_language_tl }
+ \zref@default
+ } ,
+ }
}
\group_end:
\msg_new:nnn { zref-vario } { missing-string }
@@ -558,13 +567,16 @@
% A general initial warning in case the language is altogether not set up.
%
% \begin{macrocode}
-\AddToHook { begindocument }
+\AddToHook { begindocument/before }
{
- \seq_if_in:NxF \g_@@_setup_languages_seq
- { \@@_base_lang:e { \l_@@_ref_language_tl } }
+ \AddToHook { begindocument }
{
- \msg_warning:nnx { zref-vario } { language-not-setup }
- { \l_@@_ref_language_tl }
+ \seq_if_in:NxF \g_@@_setup_languages_seq
+ { \@@_base_lang:e { \l_@@_ref_language_tl } }
+ {
+ \msg_warning:nnx { zref-vario } { language-not-setup }
+ { \l_@@_ref_language_tl }
+ }
}
}
\msg_new:nnn { zref-vario } { language-not-setup }
diff --git a/macros/latex/contrib/zref-vario/zref-vario.pdf b/macros/latex/contrib/zref-vario/zref-vario.pdf
index 8ff1c89bca..8a37e41a8d 100644
--- a/macros/latex/contrib/zref-vario/zref-vario.pdf
+++ b/macros/latex/contrib/zref-vario/zref-vario.pdf
Binary files differ
diff --git a/macros/latex/contrib/zref-vario/zref-vario.tex b/macros/latex/contrib/zref-vario/zref-vario.tex
index 522e46a207..7801d52f5d 100644
--- a/macros/latex/contrib/zref-vario/zref-vario.tex
+++ b/macros/latex/contrib/zref-vario/zref-vario.tex
@@ -111,10 +111,10 @@
\begin{quotation}
\pkg{zref-vario} offers a compatibility layer for \pkg{varioref} to be used
- alongside \pkg{zref-clever}. It provides ``\texttt{\cs{z}}\dots{}''
- counterparts to \pkg{varioref}'s main reference commands, each of which
- essentially does some (scoped) setup for \pkg{varioref}, then calls the
- original one.
+ alongside \pkg{zref-clever}. It provides
+ ``\texttt{\textbackslash{}z}\dots{}'' counterparts to \pkg{varioref}'s main
+ reference commands, each of which essentially does some (scoped) setup for
+ \pkg{varioref}, then calls the original one.
\end{quotation}
\bigskip{}
@@ -135,6 +135,12 @@ As usual:
\usepackage{zref-vario}
\end{zvexample}
+\pkg{zref-vario} will load \pkg{varioref} and \pkg{zref-clever} at
+\texttt{begindocument/before}, if they have not already been loaded. However,
+considering \pkg{varioref} has known load order interaction with other
+packages, prominently with \pkg{hyperref}, you may wish to load it explicitly
+to ensure its load order requirements are met.
+
\section{Dependencies}
@@ -210,7 +216,6 @@ supports them.
\section{Customization}
-
\begin{function}{\zvLanguageSetup}
\begin{syntax}
\cs{zvLanguageSetup}\marg{language}\marg{options}
@@ -235,6 +240,14 @@ options. Language independent default values are provided for the
But, if you need to adjust them, the default values can be overridden by
setting the corresponding options in \cs{zvLanguageSetup}.
+As far as \pkg{zref-vario} is concerned, \pkg{varioref}'s options are (mostly)
+not taken into account: the language options are disregarded (settings made
+with \cs{zvLanguageSetup} are used instead), the \opt{nospace} option is
+hard-coded (locally) for the ``\texttt{\textbackslash{}z}\dots{}'' commands,
+and \opt{draft} and \opt{final} are typically given to \cs{documentclass},
+though they do affect \pkg{zref-vario}'s commands, just as they do with
+\pkg{varioref}'s.
+
% \section{Acknowledgments}
%