summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/lwarp
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-12-25 03:00:51 +0000
committerNorbert Preining <norbert@preining.info>2020-12-25 03:00:51 +0000
commit41eb4dfa0badd165fc762b85c3ba592b4e57d38a (patch)
treeeb8998679d56a322be56da3f87d418174f24c15e /macros/latex/contrib/lwarp
parent8d92194a9263ebe948f6518d273b641bc75b9692 (diff)
CTAN sync 202012250300
Diffstat (limited to 'macros/latex/contrib/lwarp')
-rw-r--r--macros/latex/contrib/lwarp/README.txt2
-rw-r--r--macros/latex/contrib/lwarp/lwarp.dtx423
-rw-r--r--macros/latex/contrib/lwarp/lwarp.ins1
-rw-r--r--macros/latex/contrib/lwarp/lwarp.pdfbin3014760 -> 3023923 bytes
-rwxr-xr-xmacros/latex/contrib/lwarp/lwarpmk.lua2
5 files changed, 376 insertions, 52 deletions
diff --git a/macros/latex/contrib/lwarp/README.txt b/macros/latex/contrib/lwarp/README.txt
index 538276fd29..eccf4ac6a9 100644
--- a/macros/latex/contrib/lwarp/README.txt
+++ b/macros/latex/contrib/lwarp/README.txt
@@ -1,5 +1,5 @@
-LaTeX lwarp package v0.893 README.txt
+LaTeX lwarp package v0.894 README.txt
Files included are:
diff --git a/macros/latex/contrib/lwarp/lwarp.dtx b/macros/latex/contrib/lwarp/lwarp.dtx
index 7d90efe942..397c835190 100644
--- a/macros/latex/contrib/lwarp/lwarp.dtx
+++ b/macros/latex/contrib/lwarp/lwarp.dtx
@@ -16,7 +16,7 @@
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{lwarp}
-%<package> [2020/11/26 v0.893 Allows LaTeX to directly produce HTML5 output.]
+%<package> [2020/12/24 v0.894 Allows LaTeX to directly produce HTML5 output.]
%
%<*driver>
\documentclass{ltxdoc}
@@ -1385,9 +1385,13 @@ change between uses.
Another problem is complicated contents
\margintag{complicated \attribute{alt} tag}
which do not expand well in an \attribute{alt} tag.
-The macro \cs{inlinemathother} may be used before a dynamic
-math expression, and \cs{inlinemathnormal} after. Doing so tells \pkg{lwarp} to
-use an unhashed \SVG\ math image, even if MathJax is in use.
+Yet another problem is math packages which are only partially emulated
+\margintag{\brand{MathJax} limitations}
+in \brand{MathJax}.
+The macro \cs{inlinemathother} may be used before a sequence of dynamic or complicated
+math expressions, and \cs{inlinemathnormal} after. Doing so tells \pkg{lwarp} to
+use unhashed \SVG\ math images for those particular expressins, even if MathJax
+is otherwise in use.
See \cref{sec:localizingdynamicmath}.
}
@@ -1395,7 +1399,7 @@ See \cref{sec:localizingdynamicmath}.
\DescribeMacro{\displaymathnormal}
By default, or when selecting \cs{displaymathnormal},
\brand{Mathjax} math display environments print their contents
-as text into \HTML,
+as text into \HTML\ for \brand{MathJax} to interpret,
and \SVG\ display math environments render their contents as \SVG\ images
and use their contents as the \attribute{alt} tag of \HTML\ output.
To do so, the contents are loaded into a macro for reuse.
@@ -3057,7 +3061,7 @@ This boolean may be tested by the user for later use.
%<*package>
% \fi
%
-% \CheckSum{51253}
+% \CheckSum{51622}
%
% \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
@@ -3192,6 +3196,7 @@ This boolean may be tested by the user for later use.
% \changes{v0.891}{2020/09/22}{\ 2020/09/22}
% \changes{v0.892}{2020/10/07}{\ 2020/10/07}
% \changes{v0.893}{2020/11/26}{\ 2020/11/26}
+% \changes{v0.894}{2020/12/24}{\ 2020/12/24}
@@ -3415,6 +3420,20 @@ This boolean may be tested by the user for later use.
%
% \begin{description}
% \needspace{2\baselineskip}
+% \item[v0.894:] \brand{MathJax} additions and improvements.
+% \begin{itemize}
+% \item Improved warning message for enabling \SVG\ graphics for
+% \margintag{\brand{MathJax}}
+% select math expressions while using \brand{MathJax}.
+% \item Accept and ignore a star for \cs{hspace}.
+% \item Ignores \cs{arabic}, \cs{number}, \cs{noalign}.
+% \item Added \brand{MathJax} emulation for \pkg{backnaur},
+% \pkg{colortbl}, \pkg{nicematrix}.
+% \margintag{packages}
+% \item \pkg{booktabs}: \brand{MathJax} emulation now absorbs and discards trim.
+% \item \pkg{menukeys}: Updated to v1.6.1.
+% \end{itemize}
+% \needspace{2\baselineskip}
% \item[v0.893:] Minor fixes, more packages.
% \begin{itemize}
% \item Added \brand{MathJax} emulation for \cs{mathnormal}.
@@ -5433,6 +5452,7 @@ This boolean may be tested by the user for later use.
% \item[\sjax:] Supported as-is for \brand{MathJax}, subject to limitations.
% \item[\ejax:] Emulated for \brand{MathJax} using custom macros, subject to limitations.
% \item[\ijax:] Ignored by \brand{MathJax}, but may be used in the document source.
+% May be converted to \SVG\ images.
% \end{description}
%
% \renewcommand{\arraystretch}{1.5}
@@ -5600,9 +5620,9 @@ This boolean may be tested by the user for later use.
% \mpkg{theorem}, \mpkg{thmbox}, \mpkg{thmtools}. \\
%
% Additional math: & Math fonts via \SVG\ images,
-% \spkg{accents}\ejax, \spkg{amscd}, \spkg{autobreak}\ejax, \ipkg{autonum},
-% \mpkg{backnaur}, \mpkg{bm}\ejax, \spkg{braket}\ejax,
-% \mpkg{breqn}, \mpkg{bussproofs}\ejax, \mpkg{cases},
+% \spkg{accents}\ejax, \spkg{amscd}\sjax, \spkg{autobreak}\ejax, \ipkg{autonum},
+% \mpkg{backnaur}\ejax, \mpkg{bm}\ejax, \spkg{braket}\sjax,
+% \mpkg{breqn}\ijax, \mpkg{bussproofs}\sjax, \mpkg{cases}\ijax,
% \spkg{centernot}\ejax, \spkg{cmbright}\ejax,
% \spkg{colonequals}\ejax, \spkg{decimal}\ejax,
% \spkg{delarray}, \mpkg{DotArrow}\ejax, \spkg{dotlessi}\ejax, \spkg{dotlessj}\sjax,
@@ -5619,11 +5639,11 @@ This boolean may be tested by the user for later use.
% \spkg{mathspec}\ejax, \mpkg{mathtools}\ejax,
% \mpkg{mismath}\ejax, \spkg{mleftright}\ejax,
% \spkg{multiobjective}\ejax, \mpkg{nccmath}\ejax,
-% \spkg{nicematrix}, \spkg{noitcrul}\ejax,
+% \spkg{nicematrix}\ejax, \spkg{noitcrul}\ejax,
% \spkg{newpxmath}\ejax, \spkg{newtxmath}\ejax, \spkg{newtxsf}\ejax,
% \spkg{pb-diagram},
% \spkg{pxfonts}\ejax,
-% \ipkg{resizegather}, \spkg{rmathbr}\ejax, \spkg{scalerel}\ejax,
+% \ipkg{resizegather}\ijax, \spkg{rmathbr}\ejax, \spkg{scalerel}\ejax,
% \epkg{shuffle}\ejax, \spkg{stackrel}\ejax,
% \mpkg{statex2}\ejax, \mpkg{statistics}, \spkg{statmath}\ejax,
% \spkg{subsupscripts}\ejax, \spkg{textualicomma}\ijax,
@@ -5660,7 +5680,7 @@ This boolean may be tested by the user for later use.
% Tabular: &
% \env{tabular} environment, \mpkg{array}\ejax, \epkg{arydshln}\ejax,
% \mpkg{bigdelim}\ejax, \mpkg{bigstrut}\ejax, \mpkg{booktabs}\ejax,
-% \mpkg{colortbl}, \mpkg{ctable}, \mpkg{diagbox}, \mpkg{hhline}\ejax, \epkg{longtable},
+% \mpkg{colortbl}\ijax, \mpkg{ctable}, \mpkg{diagbox}, \mpkg{hhline}\ejax, \epkg{longtable},
% \epkg{ltablex}, \epkg{ltxtable},
% \mpkg{multirow}\ejax, \epkg{supertabular}, \epkg{tabularx}, \epkg{tabulary},
% \epkg{threeparttable}, \mpkg{threeparttablex},
@@ -13113,6 +13133,7 @@ This boolean may be tested by the user for later use.
\LWR@notmemoirloadafter{nextpage}
\LWR@loadafter{nicefrac}
\LWR@loadafter{niceframe}
+\LWR@loadafter{nicematrix}
\LWR@loadafter{noitcrul}
\LWR@loadafter{nolbreaks}
\LWR@loadafter{nomencl}
@@ -13601,7 +13622,7 @@ This boolean may be tested by the user for later use.
{%
Unable to patch package #1,\MessageBreak
macro \LWRbackslash #2.\MessageBreak
- Lwarp may need to be updated%
+ Lwarp or #1 may need to be updated%
}%
{Please contact the maintainer of the Lwarp package.}%
}
@@ -17292,6 +17313,7 @@ This boolean may be tested by the user for later use.
% \changes{v0.88}{2020/07/04}{\filenm{lwarp.css}: Added \pkg{tcolorbox}, \pkg{thmbox}.}
% \changes{v0.88}{2020/07/14}{\filenm{lwarp.css}: Added \optn{indexheading} for \pkg{gindex}.}
% \changes{v0.893}{2020/10/18}{\filenm{lwarp.css}: Added \pkg{keystroke}.}
+% \changes{v0.894}{2020/12/15}{\filenm{lwarp.css}: \TeX\ logos no longer below baseline.}
%
% ^^A *lwarp.css
%
@@ -18187,7 +18209,10 @@ dl dd:after { content: "" ; display: block ; clear: both }
dl dd p { margin-top: 0em; }
-dd ul, dd ol, dd dl { clear: both ; padding-top: 1ex }
+dd ul, dd ol, dd dl {
+ clear: both ;
+/* padding-top: 1ex ; */
+}
nav {
@@ -18898,6 +18923,9 @@ span.nolbreaks { white-space: nowrap ; }
/*
For CSS LaTeX and related logos:
Based on spacing demonstrated by the metafont package.
+
+The subscripts are shrunk instead of lowered below the baseline,
+to avoid browser rendering errors with the line height in lists, etc.
*/
.latexlogofont {
@@ -18909,7 +18937,6 @@ Based on spacing demonstrated by the metafont package.
.latexlogo {
font-family: "Linux Libertine O", "Nimbus Roman No 9 L",
"FreeSerif", "Hoefler Text", Times, "Times New Roman", serif;
- font-size: 1.1em;
}
.latexlogosup {
@@ -18923,10 +18950,11 @@ Based on spacing demonstrated by the metafont package.
.latexlogosub {
text-transform: uppercase;
- vertical-align: -0.27ex;
+/* vertical-align: -0.27ex; */
margin-left: -0.08em;
margin-right: -0.07em;
- font-size: 1em;
+/* font-size: 1em; */
+ font-size: .7em ;
}
.latexlogotwoe {
@@ -18936,24 +18964,25 @@ Based on spacing demonstrated by the metafont package.
.latexlogotwoesub {
font-style:italic ;
- vertical-align: -0.27ex;
+/* vertical-align: -0.27ex; */
margin-left: -0.11em;
margin-right: -0.1em;
- font-size: 1em;
+/* font-size: 1em; */
+ font-size: .7em ;
}
.xelatexlogo {
font-family: "Linux Libertine O", "Nimbus Roman No 9 L",
"FreeSerif", "Hoefler Text", Times, "Times New Roman", serif;
letter-spacing: .03em ;
- font-size: 1.1em;
}
.xelatexlogosub {
- vertical-align: -0.27ex;
+/* vertical-align: -0.27ex; */
margin-left: -0.0667em;
margin-right: -.05em;
- font-size: 1em;
+/* font-size: 1em; */
+ font-size: .7em ;
letter-spacing: .03em ;
}
@@ -20065,7 +20094,7 @@ MathJax = {
-- Copyright 2016-2020 Brian Dunn
-printversion = "v0.893"
+printversion = "v0.894"
requiredconfversion = "2" -- also at *lwarpmk.conf
function printhelp ()
@@ -24707,7 +24736,7 @@ end -- not --version
% \end{macrocode}
% \end{macro}
-%
+% ^^A *mathjax customizations
% Default customizations:
% \margintag{defaults}
%
@@ -24722,6 +24751,7 @@ end -- not --version
% \changes{v0.57}{2018/05/24}{\brand{MathJax}: Supports \cs{footnote}, \cs{footnotemark}.}
% \changes{v0.79}{2020/01/24}{\brand{MathJax}: Additional macros.}
% \changes{v0.893}{2020/10/14}{\brand{MathJax}: Added \cs{mathnormal}.}
+% \changes{v0.894}{2020/12/22}{\brand{MathJax}: Added \cs{arabic}, \cs{number}, \cs{noalign}.}
%
% For footnotes, \cs{footnotename} is used in most cases, however
% for \env{equation} the footnote is picked up from \LaTeX in \cs{LWR@doendequation}.
@@ -24753,7 +24783,14 @@ end -- not --version
\CustomizeMathJax{\newcommand{\footnote}[2][\LWRfootnote]{{}^{\mathrm{#1}}}}
\CustomizeMathJax{\newcommand{\footnotemark}[1][\LWRfootnote]{{}^{\mathrm{#1}}}}
% \end{macrocode}
-
+%
+% \cs{hspace} is modified to accept and ignore a star:
+% \changes{v0.894}{2020/12/21}{\brand{MathJax}: Accept starred \cs{hspace}.}
+% \begin{macrocode}
+\CustomizeMathJax{\let\LWRorighspace\hspace}
+\CustomizeMathJax{\renewcommand{\hspace}{\ifstar\LWRorighspace\LWRorighspace}}
+% \end{macrocode}
+%
% Various other customizations:
% \begin{macrocode}
\CustomizeMathJax{\newcommand{\mathnormal}[1]{{#1}}}
@@ -24766,6 +24803,9 @@ end -- not --version
\CustomizeMathJax{\newcommand{\addtolength}[2]{}}
\CustomizeMathJax{\newcommand{\setcounter}[2]{}}
\CustomizeMathJax{\newcommand{\addtocounter}[2]{}}
+\CustomizeMathJax{\newcommand{\arabic}[1]{}}
+\CustomizeMathJax{\newcommand{\number}[1]{}}
+\CustomizeMathJax{\newcommand{\noalign}[1]{\text{#1}\notag \\}}
\CustomizeMathJax{\newcommand{\cline}[1]{}}
\CustomizeMathJax{\newcommand{\directlua}[1]{\text{(directlua)}}}
\CustomizeMathJax{\newcommand{\luatexdirectlua}[1]{\text{(directlua)}}}
@@ -24779,6 +24819,8 @@ end -- not --version
\CustomizeMathJax{\newcommand{\protect}{}}
\CustomizeMathJax{\def\LWRabsorbnumber#1 {}}
\CustomizeMathJax{\def\LWRabsorbquotenumber"#1 {}}
+\CustomizeMathJax{\newcommand{\LWRabsorboption}[1][]{}}
+\CustomizeMathJax{\newcommand{\LWRabsorbtwooptions}[1][]{\LWRabsorboption}}
\CustomizeMathJax{\def\mathchar{\ifnextchar"\LWRabsorbquotenumber\LWRabsorbnumber}}
\CustomizeMathJax{\def\mathcode#1={\mathchar}}
\CustomizeMathJax{\let\delcode\mathcode}
@@ -41413,13 +41455,12 @@ color:\LWR@origpound\LWR@tempcolor%
%
%
% \section{\brand{MathJax} warnings}
-% ^^A *mathjax
%
% \begin{macro}{\LWR@mathjaxwarn} \marg{packagename} \marg{More text.}
%
% To be done \cs{AtBeginDocument}.
%
-% \changes{v0.79}{2020/01/18}{Warn if using packages not supported by \brand{MathJax}.}
+% \changes{v0.79}{2020/01/18}{Warn if using packages partially supported by \brand{MathJax}.}
% \begin{macrocode}
\newcommand*{\LWR@mathjaxwarn}[2]{%
\@ifpackageloaded{lwarp-#1}{%
@@ -41440,6 +41481,52 @@ color:\LWR@origpound\LWR@tempcolor%
}{}%
}
+% \begin{macro}{\LWR@nomathjaxwarn} \marg{packagename} \marg{More text.}
+%
+% To be done \cs{AtBeginDocument}.
+%
+% \changes{v0.894}{2020/12/22}{Warn if using packages not supported by \brand{MathJax}.}
+% \begin{macrocode}
+\newcommand*{\LWR@nomathjaxwarn}[2]{%
+ \@ifpackageloaded{lwarp-#1}{%
+ \ifblank{#2}{%
+ \PackageWarningNoLine{lwarp}
+ {%
+ Lwarp does not provide MathJax support for #1%
+ }
+ }{%
+ \PackageWarningNoLine{lwarp}
+ {%
+ Lwarp does not provide MathJax support for #1.\MessageBreak
+ #2%
+ }
+ }%
+ }{}%
+}
+% \end{macrocode}
+%
+% \begin{macro}{\LWR@forceSVGmessage} \marg{packagename}
+% \changes{v0.894}{2020/12/22}{Improved MathJax warnings.}
+% \begin{macrocode}
+\newcommand*{\LWR@forceSVGmessage}[1]{%
+ SVG math output may be enabled for select math\MessageBreak
+ expressions to preserve #1 visual\MessageBreak
+ features for those particular expressions.\MessageBreak
+ Before the chosen inline math, use \protect\inlinemathother\MessageBreak
+ to begin using SVG math, and \protect\inlinemathnormal\MessageBreak
+ afterward to resume using MathJax math.\MessageBreak
+ Before display math, use \protect\displaymathother\MessageBreak
+ to begin using SVG math, and use \protect\displaymathnormal\MessageBreak
+ after to resume using MathJax for the following math%
+}
+% \end{macrocode}
+% \end{macro}
+%
+% ^^A *mathjax warnings
+%
+% If \brand{MathJax} is being used, issue a warning for certain packages.
+% \changes{v0.894}{2020/12/22}{Improved MathJax warnings.}
+% \begin{macrocode}
\AtBeginDocument{
\ifbool{mathjax}{
\LWR@mathjaxwarn{arydshln}
@@ -41452,20 +41539,24 @@ color:\LWR@origpound\LWR@tempcolor%
You may use the warpprint and warpHTML\MessageBreak
environments to isolate the package load\MessageBreak
and the equation+ environments}
- \LWR@mathjaxwarn{backnaur}
- {You may enclose its uses inside\MessageBreak
- lateximage environments to force SVG output,\MessageBreak
- but this also changes the print output}
\LWR@mathjaxwarn{bigdelim}
{Delimiters appear only of the first line}
\LWR@mathjaxwarn{booktabs}
- {In a math array, do not use (trim) for \protect\cmidrule}
+ {\protect\cmidrule\space is not displayed}
\LWR@mathjaxwarn{breqn}
{Each environment becomes an SVG image}
+ \LWR@mathjaxwarn{colortbl}
+ {Colors are ignored in MathJax.\MessageBreak
+ (Text mode tabular does support colortbl.)\MessageBreak
+ \LWR@forceSVGmessage{colortbl}}
\LWR@mathjaxwarn{delarray}
- {Enclose its uses inside lateximage\MessageBreak
- environments to force SVG output}
- \LWR@mathjaxwarn{jkmath}{}
+ {\LWR@forceSVGmessage{delarray}}
+ \LWR@nomathjaxwarn{gauss}
+ {\LWR@forceSVGmessage{gauss}}
+ \LWR@mathjaxwarn{hhline}
+ {A simple \protect\hline\space is used}
+ \LWR@nomathjaxwarn{jkmath}
+ {\LWR@forceSVGmessage{jkmath}}
\LWR@mathjaxwarn{mathtools}
{See the Lwarp manual regarding the disallowspaces\MessageBreak
and showonlyrefs options, the alignat environment,\MessageBreak
@@ -41478,9 +41569,14 @@ color:\LWR@origpound\LWR@tempcolor%
limited emulation is provided for MathJax math.\MessageBreak
\protect\multirow\space ignores all arguments except\MessageBreak
the text}
- \LWR@mathjaxwarn{pb-diagram}
- {Enclose its uses inside lateximage environments\MessageBreak
- to force SVG output}
+ \LWR@mathjaxwarn{nicematrix}
+ {Keys/values are ignored in MathJax.\MessageBreak
+ \protect\Cdots, etc. do not span multiple cells.\MessageBreak
+ AutoNiceMatrix, etc. are not supported for MathJax.\MessageBreak
+ \LWR@forceSVGmessage{nicematrix}%
+ }
+ \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
@@ -41492,13 +41588,13 @@ color:\LWR@origpound\LWR@tempcolor%
Some symbol fonts are not supported by MathJax,\MessageBreak
and are only approximated.\MessageBreak
Latin characters may not be correct}
+ \LWR@nomathjaxwarn{unitsdef}{}
\LWR@mathjaxwarn{witharrows}
{Arrows can only point to the next line.\MessageBreak
Text is only placed on a single line}
- \LWR@mathjaxwarn{xy}
- {xy works in text, but in math you must\MessageBreak
- enclose its uses inside lateximage\MessageBreak
- environments to force SVG output}
+ \LWR@nomathjaxwarn{xy}
+ {In text, xy works as-is. SVG images will be generated.\MessageBreak
+ \LWR@forceSVGmessage{xy}}
}{}
}
% \end{macrocode}
@@ -44568,7 +44664,8 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"%
% \credits{Adrian P. Robson}
%
% \DescribePackage{backnaur}
-% \pkg{backnaur} is patched for use by \pkg{lwarp}.
+% \pkg{backnaur} is patched for use by \pkg{lwarp},
+% and emulated for \brand{MathJax}.
%
% \changes{v0.72}{2019/05/20}{\pkg{backnaur}: Added.}
%
@@ -44629,6 +44726,43 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"%
% ^^A % \@ifpackagewith{backnaur}{epsilon}{\renewcommand{\bnfes}{\HTMLunicode{3f5}}}{}% \epsilon
% ^^A % \end{macrocode}
%
+%
+% For \brand{MathJax}:
+% \begin{macrocode}
+\begin{warpMathJax}
+\CustomizeMathJax{\newcommand{\bnfpn}[1]{\langle \text{\textrm{#1}} \rangle}}
+\CustomizeMathJax{\newcommand{\bnfor}{\; \mid \;}}
+\CustomizeMathJax{\newcommand{\bnfsp}{\;}}
+\@ifpackagewith{backnaur}{perp}{
+ \CustomizeMathJax{\newcommand{\bnfes}{\perp}}
+}{
+ \@ifpackagewith{backnaur}{epsilon}{
+ \CustomizeMathJax{\newcommand{\bnfes}{\epsilon}}
+ }{
+ \CustomizeMathJax{\newcommand{\bnfes}{\lambda}}
+ }
+}
+\@ifpackagewith{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}{
+ \CustomizeMathJax{\newcommand{\bnfpo}{::=}}
+}{
+ \CustomizeMathJax{\newcommand{\bnfpo}{\models}}
+}
+\CustomizeMathJax{\newcommand{\bnfprod}{\ifstar{\LWRbnfprodnn}{\LWRbnfprodyn}}}
+\CustomizeMathJax{\newcommand{\LWRbnfprodyn}[2]{\bnfpn{#1} & \bnfpo & #2}}
+\CustomizeMathJax{\newcommand{\LWRbnfprodnn}[2]{\nonumber \bnfpn{#1} & \bnfpo & #2}}
+\CustomizeMathJax{\newcommand{\bnfmore}{\ifstar{\LWRbnfmorenn}{\LWRbnfmoreyn}}}
+\CustomizeMathJax{\newcommand{\LWRbnfmoreyn}[1]{ & & #1}}
+\CustomizeMathJax{\newcommand{\LWRbnfmorenn}[1]{\nonumber & & #1}}
+\end{warpMathJax}
+% \end{macrocode}
+%
% \iffalse
%</backnaur>
% \fi
@@ -45765,12 +45899,17 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"%
%
% For \brand{MathJax}:
% \changes{v0.79}{2020/01/30}{\pkg{booktabs}: Added \brand{MathJax} emulation.}
+% \changes{v0.894}{2020/12/22}{\pkg{booktabs}: \brand{MathJax}: Absorb \cs{cmidrule} trim arg.}
% \begin{macrocode}
\begin{warpMathJax}
\CustomizeMathJax{\newcommand{\toprule}[1][]{\hline}}
\CustomizeMathJax{\let\midrule\toprule}
\CustomizeMathJax{\let\bottomrule\toprule}
-\CustomizeMathJax{\newcommand{\cmidrule}[2][]{}}% avoid (trim)
+\CustomizeMathJax{\def\LWRbooktabscmidruleparen(#1)#2{}}
+\CustomizeMathJax{\newcommand{\LWRbooktabscmidrulenoparen}[1]{}}
+\CustomizeMathJax{\newcommand{\cmidrule}[1][]{%
+ \ifnextchar(\LWRbooktabscmidruleparen\LWRbooktabscmidrulenoparen%
+}}
\CustomizeMathJax{\newcommand{\morecmidrules}{}}
\CustomizeMathJax{\newcommand{\specialrule}[3]{\hline}}
\CustomizeMathJax{\newcommand{\addlinespace}[1][]{}}
@@ -49624,6 +49763,17 @@ name = \chemmacros_translate:n {scheme-name}
% \end{macrocode}
% \end{noindmacro}
+% For \brand{MathJax}, colors are discarded.
+% \changes{v0.894}{2020/12/22}{\pkg{colortbl}: Added \brand{MathJax} emulation.}
+% \begin{macrocode}
+\begin{warpMathJax}
+\CustomizeMathJax{\newcommand{\columncolor}[2][]{\LWRabsorbtwooptions}}
+\CustomizeMathJax{\let\rowcolor\columncolor}
+\CustomizeMathJax{\let\cellcolor\columncolor}
+\end{warpMathJax}
+% \end{macrocode}
+
+
% \iffalse
%</colortbl>
% \fi
@@ -64697,31 +64847,32 @@ background:
% \codehtml
%
% \begin{macrocode}
-\LWR@ProvidesPackagePass{menukeys}[2020/10/31]
+\LWR@ProvidesPackagePass{menukeys}[2020/12/19]
% \end{macrocode}
%
% Patch to use a \env{lateximage} whose \attribute{alt} text
% is the contents of this use of the macro.
% A hash on these contents allows the reuse of the image for
% each instance of the same contents.
+% \changes{v0.893}{2020/12/24}{\pkg{menukeys}: Updated to v1.6.1.}
% \begin{macrocode}
-\xpatchcmd{\tw@define@menu@macro}
+\xpatchcmd{\tw@define@menu@macro@}
{\@nameuse{tw@style@#4@pre}}
{%
\begin{lateximage}*[\detokenize{##2}]%
\@nameuse{tw@style@#4@pre}%
}
{}
- {\LWR@patcherror{menukeys}{tw@define@menu@macro}}
+ {\LWR@patcherror{menukeys}{tw@define@menu@macro@}}
-\xpatchcmd{\tw@define@menu@macro}
+\xpatchcmd{\tw@define@menu@macro@}
{\@nameuse{tw@style@#4@post}}
{%
\@nameuse{tw@style@#4@post}%
\end{lateximage}%
}
{}
- {\LWR@patcherror{menukeys}{tw@define@menu@macro B}}
+ {\LWR@patcherror{menukeys}{tw@define@menu@macro@ B}}
% \end{macrocode}
%
% Patch the existing macros:
@@ -67708,6 +67859,177 @@ do not attempt to patch lwarp's version of `nameref'.)\MessageBreak
%
%
%
+% \iffalse
+%<*nicematrix>
+% \fi
+%
+% \part{lwarp-nicematrix.sty}
+%
+% \section{nicematrix}
+%
+% \credits{F. Pantigny}
+%
+% \DescribePackage{nicematrix}
+% \pkg{nicematrix} is used as-is for \SVG\ math, and
+% is emulated for \brand{MathJax}.
+%
+% Keys/values are ignored in \brand{MathJax}.
+% \trouble[\brand{MathJax}]{nicematrix=\pkg{nicematrix}}
+% \cs{Cdots}, etc. do not span multiple cells.
+% \env{AutoNiceMatrix}, etc. are not supported for \brand{MathJax}.
+% SVG math output preserves all nicematrix features.
+% To force SVG output for one or more consecutive
+% math expressions, for inline math use
+% \cs{inlinemathother} and \cs{inlinemathnormal}, or
+% for display math use \cs{displaymathother} and \cs{displaymathnormal}.
+%
+% \changes{v0.894}{2020/12/21}{\pkg{nicematrix}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackagePass{nicematrix}[2020/11/23]
+% \end{macrocode}
+%
+% \env{NiceTabular} must be converted to \SVG\ to support the
+% various \pkg{nicematrix} options:
+% \begin{macrocode}
+\begin{warpHTML}
+\BeforeBeginEnvironment{NiceTabular}{%
+ \begin{lateximage}[-nicematrix-~\PackageDiagramAltText]%
+}
+\AfterEndEnvironment{NiceTabular}{\end{lateximage}}
+\BeforeBeginEnvironment{NiceTabular*}{%
+ \begin{lateximage}[-nicematrix-~\PackageDiagramAltText]%
+}
+\AfterEndEnvironment{NiceTabular*}{\end{lateximage}}
+\end{warpHTML}
+% \end{macrocode}
+%
+% Special handling for the optional arguments, and the lack of a delimiter:
+% \begin{macrocode}
+\begin{warpMathJax}
+\CustomizeMathJax{\newcommand{\LWRnicearrayarray}[1]{\begin{array}{#1}}}
+\CustomizeMathJax{\def\LWRnicearrayarrayopt#1[#2] {\begin{array}{#1}}}
+
+\CustomizeMathJax{%
+ \newenvironment{NiceArray}[2][]%
+ {\ifnextchar[{\LWRnicearrayarrayopt{#2}}{\LWRnicearrayarray{#2}}}%
+ {\end{array}}%
+}
+
+\CustomizeMathJax{%
+ \newcommand{\LWRnicearraywithdelimtwo}[2][]{%
+ \ifnextchar[{\LWRnicearrayarrayopt{#2}}{\LWRnicearrayarray{#2}}%
+ }%
+}
+% \end{macrocode}
+%
+% General case with left \Slash right delimiters:
+% \begin{macrocode}
+\CustomizeMathJax{%
+ \newenvironment{NiceArrayWithDelims}[2]%
+ {%
+ \def\LWRnicearrayrightdelim{\right#2}%
+ \left#1%
+ \LWRnicearraywithdelimtwo%
+ }%
+ {\end{array}\LWRnicearrayrightdelim}%
+}
+% \end{macrocode}
+%
+% Instances of specific delimiters:
+% \begin{macrocode}
+\CustomizeMathJax{%
+ \newenvironment{pNiceArray}
+ {\begin{NiceArrayWithDelims}{(}{)}}
+ {\end{NiceArrayWithDelims}}
+}
+
+\CustomizeMathJax{%
+ \newenvironment{bNiceArray}
+ {\begin{NiceArrayWithDelims}{[}{]}}
+ {\end{NiceArrayWithDelims}}
+}
+
+\CustomizeMathJax{%
+ \newenvironment{BNiceArray}
+ {\begin{NiceArrayWithDelims}{\{}{\}}}
+ {\end{NiceArrayWithDelims}}
+}
+
+\CustomizeMathJax{%
+ \newenvironment{vNiceArray}
+ {\begin{NiceArrayWithDelims}{\vert}{\vert}}
+ {\end{NiceArrayWithDelims}}
+}
+
+\CustomizeMathJax{%
+ \newenvironment{VNiceArray}
+ {\begin{NiceArrayWithDelims}{\Vert}{\Vert}}
+ {\end{NiceArrayWithDelims}}
+}
+% \end{macrocode}
+%
+% Ignore optional arg and use standard environments:
+% \begin{macrocode}
+\CustomizeMathJax{\newenvironment{NiceMatrix}[1][]{\begin{matrix}}{\end{matrix}}}
+\CustomizeMathJax{\newenvironment{pNiceMatrix}[1][]{\begin{pmatrix}}{\end{pmatrix}}}
+\CustomizeMathJax{\newenvironment{bNiceMatrix}[1][]{\begin{bmatrix}}{\end{bmatrix}}}
+\CustomizeMathJax{\newenvironment{BNiceMatrix}[1][]{\begin{Bmatrix}}{\end{Bmatrix}}}
+\CustomizeMathJax{\newenvironment{vNiceMatrix}[1][]{\begin{vmatrix}}{\end{vmatrix}}}
+\CustomizeMathJax{\newenvironment{VNiceMatrix}[1][]{\begin{Vmatrix}}{\end{Vmatrix}}}
+% \end{macrocode}
+%
+% Ignore optional argument and size. Print contents.
+% \begin{macrocode}
+\CustomizeMathJax{\newcommand{\LWRnicematrixBlock}[1]{#1}}
+\CustomizeMathJax{\def\LWRnicematrixBlockopt<#1>#2{#2}}
+
+\CustomizeMathJax{%
+ \newcommand{\Block}[2][]{\ifnextchar<\LWRnicematrixBlockopt\LWRnicematrixBlock}%
+}
+% \end{macrocode}
+%
+% Form an approximation:
+% \begin{macrocode}
+\CustomizeMathJax{%
+ \newcommand{\diagbox}[2]{%
+ \begin{array}{l}\hfill\quad#2\\\hline#1\quad\hfill\end{array}%
+ }%
+}
+% \end{macrocode}
+%
+% More approximations:
+% \begin{macrocode}
+\CustomizeMathJax{\let\hdottedline\hdashline}
+
+\CustomizeMathJax{\newcommand{\ldots}[1][]{\dots}}
+\CustomizeMathJax{\newcommand{\Cdots}[1][]{\cdots}}
+\CustomizeMathJax{\newcommand{\Vdots}[1][]{\vdots}}
+\CustomizeMathJax{\newcommand{\Ddots}[1][]{\ddots}}
+\CustomizeMathJax{\newcommand{\Iddots}[1][]{\mathinner{\unicode{x22F0}}}}
+
+\CustomizeMathJax{\newcommand{\Hdotsfor}[1]{\ldots}}
+\CustomizeMathJax{\newcommand{\Vdotsfor}[1]{\vdots}}
+% \end{macrocode}
+%
+% There is no way to emulate \env{AutoNiceMatrix} in \brand{MathJax}.
+% \begin{macrocode}
+\CustomizeMathJax{\newcommand{\AutoNiceMatrix}[2]{\text{(AutoNiceMatrix #1)}}}
+\CustomizeMathJax{\let\pAutoNiceMatrix\AutoNiceMatrix}
+\CustomizeMathJax{\let\bAutoNiceMatrix\AutoNiceMatrix}
+\CustomizeMathJax{\let\BAutoNiceMatrix\AutoNiceMatrix}
+\CustomizeMathJax{\let\vAutoNiceMatrix\AutoNiceMatrix}
+\CustomizeMathJax{\let\VAutoNiceMatrix\AutoNiceMatrix}
+\end{warpMathJax}
+% \end{macrocode}
+%
+% \iffalse
+%</nicematrix>
+% \fi
+%
+%
%
% \iffalse
%<*noitcrul>
@@ -72071,11 +72393,12 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% emulated for \brand{MathJax}.
%
% \changes{v0.80}{2020/02/17}{\pkg{rmathbr}: Added.}
+% \changes{v0.894}{2020/12/16}{\pkg{rmathbr}: Updated to v1.1.}
%
% \codehtml
%
% \begin{macrocode}
-\LWR@ProvidesPackagePass{rmathbr}[2016/04/10]
+\LWR@ProvidesPackagePass{rmathbr}[2020/12/11]
% \end{macrocode}
%
% \begin{macrocode}
diff --git a/macros/latex/contrib/lwarp/lwarp.ins b/macros/latex/contrib/lwarp/lwarp.ins
index fe88e1a170..22bd7d3004 100644
--- a/macros/latex/contrib/lwarp/lwarp.ins
+++ b/macros/latex/contrib/lwarp/lwarp.ins
@@ -347,6 +347,7 @@ version 2005/12/01 or later.
\file{lwarp-nfssext-cfr.sty}{\from{lwarp.dtx}{nfssext-cfr}}
\file{lwarp-nicefrac.sty}{\from{lwarp.dtx}{nicefrac}}
\file{lwarp-niceframe.sty}{\from{lwarp.dtx}{niceframe}}
+\file{lwarp-nicematrix.sty}{\from{lwarp.dtx}{nicematrix}}
\file{lwarp-noitcrul.sty}{\from{lwarp.dtx}{noitcrul}}
\file{lwarp-nolbreaks.sty}{\from{lwarp.dtx}{nolbreaks}}
\file{lwarp-nomencl.sty}{\from{lwarp.dtx}{nomencl}}
diff --git a/macros/latex/contrib/lwarp/lwarp.pdf b/macros/latex/contrib/lwarp/lwarp.pdf
index 9a42a92b6a..5f5cf08adf 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 74e6a91dc4..ce441dfd01 100755
--- a/macros/latex/contrib/lwarp/lwarpmk.lua
+++ b/macros/latex/contrib/lwarp/lwarpmk.lua
@@ -2,7 +2,7 @@
-- Copyright 2016-2020 Brian Dunn
-printversion = "v0.893"
+printversion = "v0.894"
requiredconfversion = "2" -- also at *lwarpmk.conf
function printhelp ()