summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-accessibility.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-amsmath.sty5
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-attachfile.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-attachfile2.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-breakurl.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-common-multimedia.sty6
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-ed.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-glossaries.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty5
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-intopdf.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-luatodonotes.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-mathtools.sty74
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-nccmath.sty5
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-physics.sty258
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-todonotes.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-url.sty2
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty1
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp.sty499
19 files changed, 655 insertions, 220 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-accessibility.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-accessibility.sty
index 76951ad50c9..d9980ecca8c 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-accessibility.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-accessibility.sty
@@ -17,7 +17,7 @@
%% version 2005/12/01 or later.
\LWR@ProvidesPackageDrop{accessibility}[2019/10/14]
\newcommand{\alt}[1]{\ThisAltText{#1}}
-\newcommand{\newhref}[3]{\ThisAltText{#2}\href{#1}{#3}}%
+\newcommand{\newhref}[3]{\ThisAltText{#2}\LWR@href{#1}{#3}}%
\providecommand{\thead}[1]{\textbf{#1}}
\begin{warpMathJax}
\CustomizeMathJax{\newcommand{\alt}[1]{}}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-amsmath.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-amsmath.sty
index 6623857b95a..21d8f7bee09 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-amsmath.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-amsmath.sty
@@ -125,6 +125,11 @@
\BeforeBeginEnvironment{alignat*}{\LWR@amsmathenv@before*{alignat*}}
\AfterEndEnvironment{alignat*}{\LWR@amsmathenv@after*{alignat*}}
+\AtBeginEnvironment{subequations}{
+ \renewcommand*{\theMathJaxsubequations}{1}
+ \renewcommand*{\theMathJaxsection}{\theparentequation}
+ \renewcommand*{\theMathJaxequation}{\arabic{equation}}
+}
\begin{warpMathJax}
\CustomizeMathJax{\newcommand{\intertext}[1]{\text{#1}\notag \\}}
\end{warpMathJax}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-attachfile.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-attachfile.sty
index 13bcc5acda7..0bec5485f54 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-attachfile.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-attachfile.sty
@@ -47,7 +47,7 @@
\def\LWR@attachfile@appearance{#1}%
}
\DeclareRobustCommand{\atfi@insert@file@annot}[1]{%
- \href{#1}{\LWR@attachfile@appearance}%
+ \LWR@href{#1}{\LWR@attachfile@appearance}%
}
\endinput
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-attachfile2.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-attachfile2.sty
index 80e900391eb..152151dc8a5 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-attachfile2.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-attachfile2.sty
@@ -59,7 +59,7 @@
\def\LWR@attachfile@appearance{#1}%
}
\DeclareRobustCommand{\atfi@insert@file@annot}[1]{%
- \href{#1}{\LWR@attachfile@appearance}%
+ \LWR@href{#1}{\LWR@attachfile@appearance}%
}
\DeclareRobustCommand{\notextattachfile}[2][]{%
\begingroup
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-breakurl.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-breakurl.sty
index 5aa16b0d7d1..51c4d193963 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-breakurl.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-breakurl.sty
@@ -16,7 +16,7 @@
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
\LWR@ProvidesPackageDrop{breakurl}[2013/04/10]
-\LetLtxMacro\burl\url
+\LetLtxMacro\burl\LWR@url
\NewDocumentCommand{\LWR@burlaltb}{O{} +m m}{%
\LWR@ensuredoingapar%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-common-multimedia.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-common-multimedia.sty
index 60f360d3fbb..3bb50cf9c8e 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-common-multimedia.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-common-multimedia.sty
@@ -67,7 +67,7 @@
\LWR@parsedfilename\unskip\textquotedbl\ % space
type=\textquotedbl{}#4\textquotedbl}
\LWR@startpars
- \href{\LWR@parsedfilename}{#1}
+ \LWR@href{\LWR@parsedfilename}{#1}
\LWR@stoppars
\LWR@htmltag{/#3}\LWR@orignewline
\end{BlockClass}
@@ -96,7 +96,7 @@
src=\textquotedbl#2\textquotedbl\ % space
type=\textquotedbl#4\textquotedbl}
\LWR@startpars
- \href{#2}{#1}
+ \LWR@href{#2}{#1}
\LWR@stoppars
\LWR@htmltag{/#3}\LWR@orignewline
\end{BlockClass}
@@ -149,7 +149,7 @@
\IfBeginWith{#3}{HTTP}{\LWR@multimedia@embed{#2}{#3}{}}{%
\IfBeginWith{#3}{ftp}{\LWR@multimedia@embed{#2}{#3}{}}{%
\IfBeginWith{#3}{FTP}{\LWR@multimedia@embed{#2}{#3}{}}{%
- \href{#3}{#2}% unknown format
+ \LWR@href{#3}{#2}% unknown format
}}}}}}}}%
\LWR@startpars%
\endgroup%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-ed.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-ed.sty
index a8278bb0004..87379bda4c2 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-ed.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-ed.sty
@@ -26,7 +26,7 @@
\textcolor{red}{%
#1 is only a provisional stub\\\Large
the Office document
- \ifx\ed@stubURI\@empty{#2}\else\href{\ed@stubURI}{#2}\fi\
+ \ifx\ed@stubURI\@empty{#2}\else\LWR@href{\ed@stubURI}{#2}\fi\
contains more text\\which will be merged for the final document%
}%
\end{center}%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-glossaries.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-glossaries.sty
index 5e3c9e8d40e..eba517b8ac9 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-glossaries.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-glossaries.sty
@@ -24,7 +24,7 @@
\setglossarystyle{index}
\renewcommand*{\@p@glossarysection}[2]{%
\glsclearpage
- \phantomsection
+ \LWR@phantomsection
\ifdefempty\@@glossarysecstar
{%
\csname\@@glossarysec\endcsname{#2}%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty
index 7075dcd6e77..9e00d5aba91 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty
@@ -338,7 +338,7 @@
\LWR@traceinfo{LWR@parsedfilename is \LWR@parsedfilename}%
\LWR@ig@wpimagesizes{#1}{#2}{#3}{#4}%
\LWR@traceinfo{LWR@includegraphicsb: about to create href}%
- \href{\LWR@parsedfilename}%
+ \LWR@href{\LWR@parsedfilename}%
{% start of href
\LWR@traceinfo{LWR@includegraphicsb: about to LWR@htmltag}%
\LWR@htmltag{\LWR@ig@htmltag}%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty
index 9a0ba31d9bb..f27dbd173ed 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty
@@ -29,6 +29,11 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
\edef\@curroptions{}% lwarp modification to \ProcessOptions
\@process@ptions\relax% from the original \ProcessOptions
+\LetLtxMacro\href\LWR@href
+\LetLtxMacro\nolinkurl\LWR@nolinkurl
+\LetLtxMacro\url\LWR@url
+\LetLtxMacro\phantomsection\LWR@phantomsection
+
\newcommand*{\hypersetup}[1]{}
\newcommand*{\hyperbaseurl}[1]{}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-intopdf.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-intopdf.sty
index e8f834e4102..50910a5c221 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-intopdf.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-intopdf.sty
@@ -17,7 +17,7 @@
%% version 2005/12/01 or later.
\LWR@ProvidesPackageDrop{intopdf}[2019/05/28]
\NewDocumentCommand{\attachandlink}{o m o m m}{%
- \href{#2}{#5}%
+ \LWR@href{#2}{#5}%
}
\endinput
%%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-luatodonotes.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-luatodonotes.sty
index 5e873e851e9..ce23175ffc1 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-luatodonotes.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-luatodonotes.sty
@@ -26,7 +26,7 @@
\let\LWRTODONOTES@orig@todototoc\todototoc
\renewcommand*{\todototoc}{%
-\phantomsection%
+\LWR@phantomsection%
\LWRTODONOTES@orig@todototoc%
}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-mathtools.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-mathtools.sty
index 75541a2b778..520b2d5329f 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-mathtools.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-mathtools.sty
@@ -118,21 +118,52 @@
\def\LWRAboxed#1&#2&#3!|!{\fbox{\(#1\)}&\fbox{\(#2\)}}
\newcommand{\Aboxed}[1]{\LWRAboxed#1&&!|!}
}
-
\CustomizeMathJax{
- \newcommand{\ArrowBetweenLines}[1][\Updownarrow]{#1}% no starred
+ \newcommand{\LWRABLines}[1][\Updownarrow]{#1 \notag \\}% star/nostar the same
+ \DeclareIfstar{\ArrowBetweenLines}{\LWRABLines}{\LWRABLines}
}
\CustomizeMathJax{\newcommand{\shortintertext}[1]{\text{#1}\notag \\}}
\CustomizeMathJax{\newcommand{\vdotswithin}[1]{\hspace{.5em}\vdots}}
-\CustomizeMathJax{\newcommand{\shortvdotswithin}[1]{ & \hspace{.5em}\vdots \\}}
+\CustomizeMathJax{\newcommand{\LWRshortvdotswithinstar}[1]{\vdots \hspace{.5em} & \\}}
+\CustomizeMathJax{\newcommand{\LWRshortvdotswithinnostar}[1]{& \hspace{.5em}\vdots \\}}
+\CustomizeMathJax{%
+ \DeclareIfstar{\shortvdotswithin}%
+ {\LWRshortvdotswithinstar}%
+ {\LWRshortvdotswithinnostar}%
+}
+
\CustomizeMathJax{\newcommand{\MTFlushSpaceAbove}{}}
\CustomizeMathJax{\newcommand{\MTFlushSpaceBelow}{\\}}
\LetLtxMacro\LWR@mathtools@orig@DeclarePairedDelimiter\DeclarePairedDelimiter
\renewcommand{\DeclarePairedDelimiter}[3]{
\LWR@mathtools@orig@DeclarePairedDelimiter{#1}{#2}{#3}
- \CustomizeMathJax{\newcommand{#1}[2][]{{##1#2##2##1#3}}}
+ \appto\LWR@customizedMathJax{\LWRbackslash(}
+ \appto\LWR@customizedMathJax{%
+ \LWRbackslash{}newcommand\{\LWRbackslash\macrotocsname{#1}LWRsubstar\}%
+ }%
+ \appto\LWR@customizedMathJax{[2][]}%
+ \appto\LWR@customizedMathJax{\{\{}%
+ \LWR@subcustomizedmathjax{##1\left#2##2##1\right#3}%
+ \appto\LWR@customizedMathJax{\}\}}%
+ \appto\LWR@customizedMathJax{\LWRbackslash)\par}%
+ \appto\LWR@customizedMathJax{\LWRbackslash(}
+ \appto\LWR@customizedMathJax{%
+ \LWRbackslash{}newcommand\{\LWRbackslash\macrotocsname{#1}LWRsubnostar\}%
+ }%
+ \appto\LWR@customizedMathJax{[2][]}%
+ \appto\LWR@customizedMathJax{\{\{}%
+ \LWR@subcustomizedmathjax{##1#2##2##1#3}%
+ \appto\LWR@customizedMathJax{\}\}}%
+ \appto\LWR@customizedMathJax{\LWRbackslash)\par}%
+ \appto\LWR@customizedMathJax{\LWRbackslash(}
+ \appto\LWR@customizedMathJax{%
+ \LWRbackslash{}DeclareIfstar\{\LWRbackslash{}\macrotocsname{#1}\}%
+ \{\LWRbackslash{}\macrotocsname{#1}LWRsubstar\}%
+ \{\LWRbackslash{}\macrotocsname{#1}LWRsubnostar\}%
+ }%
+ \appto\LWR@customizedMathJax{\LWRbackslash)\par}%
}
\@onlypreamble\DeclareParedDelimiter
@@ -142,7 +173,29 @@
\LWR@mathtools@orig@DeclarePairedDelimiterXPP{#1}[#2]{#3}{#4}{#5}{#6}{#7}
\appto\LWR@customizedMathJax{\LWRbackslash(}%
\appto\LWR@customizedMathJax{%
- \LWRbackslash{}newcommand\{\LWRbackslash\macrotocsname{#1}LWRsub\}%
+ \LWRbackslash{}newcommand\{\LWRbackslash\macrotocsname{#1}LWRsubsubstar\}%
+ }%
+ \appto\LWR@customizedMathJax{[#2]}%
+ \appto\LWR@customizedMathJax{\{\{\LWRbackslash{}left}%
+ \LWR@subcustomizedmathjax{#3#4#7}%
+ \appto\LWR@customizedMathJax{\LWRbackslash{}right}%
+ \LWR@subcustomizedmathjax{#5#6}%
+ \appto\LWR@customizedMathJax{\}\}}%
+ \appto\LWR@customizedMathJax{\LWRbackslash)\par}%
+ \appto\LWR@customizedMathJax{\LWRbackslash(}%
+ \appto\LWR@customizedMathJax{%
+ \LWRbackslash{}newcommand\{\LWRbackslash\macrotocsname{#1}LWRsubstar\}[1][]%
+ }%
+ \appto\LWR@customizedMathJax{%
+ \{
+ \LWRbackslash{}def\LWRbackslash{}delimsize\{\#1\}
+ \LWRbackslash\macrotocsname{#1}LWRsubsubstar
+ \}%
+ }%
+ \appto\LWR@customizedMathJax{\LWRbackslash)\par}%
+ \appto\LWR@customizedMathJax{\LWRbackslash(}%
+ \appto\LWR@customizedMathJax{%
+ \LWRbackslash{}newcommand\{\LWRbackslash\macrotocsname{#1}LWRsubsubnostar\}%
}%
\appto\LWR@customizedMathJax{[#2]}%
\appto\LWR@customizedMathJax{\{\{\LWRbackslash{}delimsize}%
@@ -153,15 +206,22 @@
\appto\LWR@customizedMathJax{\LWRbackslash)\par}%
\appto\LWR@customizedMathJax{\LWRbackslash(}%
\appto\LWR@customizedMathJax{%
- \LWRbackslash{}newcommand\{\LWRbackslash\macrotocsname{#1}\}[1][]%
+ \LWRbackslash{}newcommand\{\LWRbackslash\macrotocsname{#1}LWRsubnostar\}[1][]%
}%
\appto\LWR@customizedMathJax{%
\{
\LWRbackslash{}def\LWRbackslash{}delimsize\{\#1\}
- \LWRbackslash\macrotocsname{#1}LWRsub
+ \LWRbackslash\macrotocsname{#1}LWRsubsubnostar
\}%
}%
\appto\LWR@customizedMathJax{\LWRbackslash)\par}%
+ \appto\LWR@customizedMathJax{\LWRbackslash(}
+ \appto\LWR@customizedMathJax{%
+ \LWRbackslash{}DeclareIfstar\{\LWRbackslash{}\macrotocsname{#1}\}%
+ \{\LWRbackslash{}\macrotocsname{#1}LWRsubstar\}%
+ \{\LWRbackslash{}\macrotocsname{#1}LWRsubnostar\}%
+ }%
+ \appto\LWR@customizedMathJax{\LWRbackslash)\par}%
}
\@onlypreamble\DeclareParedDelimiterXPP
\@onlypreamble\DeclareParedDelimiterX
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-nccmath.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-nccmath.sty
index 51211882db1..02769b3ecbb 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-nccmath.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-nccmath.sty
@@ -53,7 +53,9 @@
\CustomizeMathJax{\newenvironment{ceqn}{}{}}
\CustomizeMathJax{\newenvironment{darray}[2][c]{\begin{array}[#1]{#2}}{\end{array}}}
\CustomizeMathJax{\newcommand{\dmulticolumn}[3]{#3}}
-\CustomizeMathJax{\newcommand{\nr}{\\[.5ex]}}
+\CustomizeMathJax{\newcommand{\LWRnrnostar}[1][0.5ex]{\\[#1]}}
+\CustomizeMathJax{\DeclareIfstar{\nr}{\LWRnrnostar}{\LWRnrnostar}}
+
\CustomizeMathJax{\newcommand{\mrel}[1]{\begin{aligned}#1\end{aligned}}}
\CustomizeMathJax{\newcommand{\underrel}[2]{{#1}_{#2}}}
\CustomizeMathJax{\newcommand{\medmath}[1]{#1}}
@@ -63,6 +65,7 @@
\CustomizeMathJax{\newcommand{\mfrac}[2]{\frac{#1}{#2}}}
\CustomizeMathJax{\newcommand{\mbinom}[2]{\binom{#1}{#2}}}
\CustomizeMathJax{\newenvironment{mmatrix}{\begin{matrix}}{\end{matrix}}}
+\CustomizeMathJax{\newcommand{\displaybreak}[1][]{}}
\end{warpMathJax}
\endinput
%%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-physics.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-physics.sty
index 262cb356ea2..b86ac7f589c 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-physics.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-physics.sty
@@ -26,36 +26,78 @@
\CustomizeMathJax{\newcommand{\vqty}[1]{\left\vert#1\right\rvert}}
\CustomizeMathJax{\newcommand{\Bqty}[1]{\left\lbrace#1\right\rbrace}}
-\CustomizeMathJax{\newcommand{\absolutevalue}[1]{\left\lvert#1\right\rvert}}
+\CustomizeMathJax{\newcommand{\LWRabsolutevaluenostar}[1]{\left\lvert#1\right\rvert}}
+\CustomizeMathJax{\newcommand{\LWRabsolutevaluestar}[1]{\lvert#1\rvert}}
+\CustomizeMathJax{%
+ \DeclareIfstar{\absolutevalue}{\LWRabsolutevaluestar}{\LWRabsolutevaluenostar}%
+}
+
\CustomizeMathJax{\let\abs\absolutevalue}
-\CustomizeMathJax{\newcommand{\norm}[1]{%
- \left\lvert\left\lvert#1\right\rvert\right\rvert}%
+\CustomizeMathJax{%
+ \newcommand{\LWRnormnostar}[1]{\left\lvert\left\lvert#1\right\rvert\right\rvert}%
+}
+\CustomizeMathJax{\newcommand{\LWRnormstar}[1]{\lvert\lvert#1\rvert\rvert}}
+\CustomizeMathJax{%
+ \DeclareIfstar{\norm}{\LWRnormstar}{\LWRnormnostar}%
+}
+
+\CustomizeMathJax{\newcommand{\LWRevaluatednostar}[1]{\left . #1\right\vert}}
+\CustomizeMathJax{\newcommand{\LWRevaluatedstar}[1]{#1\vert}}
+\CustomizeMathJax{%
+ \DeclareIfstar{\evaluated}{\LWRevaluatedstar}{\LWRevaluatednostar}%
}
-\CustomizeMathJax{\newcommand{\evaluated}[1]{#1\vert}}
\CustomizeMathJax{\let\eval\evaluated}
-\CustomizeMathJax{\newcommand{\order}[1]{\mathcal{O}\left(#1\right)}}
+\CustomizeMathJax{\newcommand{\LWRordernostar}[1]{\mathcal{O}\left(#1\right)}}
+\CustomizeMathJax{\newcommand{\LWRorderstar}[1]{\mathcal{O}(#1)}}
+\CustomizeMathJax{%
+ \DeclareIfstar{\order}{\LWRorderstar}{\LWRordernostar}%
+}
+
+\CustomizeMathJax{\newcommand{\LWRcommutatornostar}[2]{\left\lbrack#1,#2\right\rbrack}}
+\CustomizeMathJax{\newcommand{\LWRcommutatorstar}[2]{\lbrack#1,#2\rbrack}}
+\CustomizeMathJax{%
+ \DeclareIfstar{\commutator}{\LWRcommutatorstar}{\LWRcommutatornostar}%
+}
-\CustomizeMathJax{\newcommand{\commutator}[2]{\left\lbrack#1,#2\right\rbrack}}
\CustomizeMathJax{\let\comm\commutator}
-\CustomizeMathJax{\newcommand{\anticommutator}[2]{%
+\CustomizeMathJax{\newcommand{\LWRanticommutatornostar}[2]{%
\left\lbrace#1,#2\right\rbrace}%
}
+\CustomizeMathJax{\newcommand{\LWRanticommutatorstar}[2]{%
+ \lbrace#1,#2\rbrace}%
+}
+\CustomizeMathJax{%
+ \DeclareIfstar{\anticommutator}{\LWRanticommutatorstar}{\LWRanticommutatornostar}%
+}
+
\CustomizeMathJax{\let\acomm\anticommutator}
\CustomizeMathJax{\let\poissonbracket\anticommutator}
\CustomizeMathJax{\let\pb\anticommutator}
-\CustomizeMathJax{\newcommand{\vectorbold}[1]{\mathbf{#1}}}
+\CustomizeMathJax{\newcommand{\LWRvectorboldnostar}[1]{\mathbf{#1}}}
+\CustomizeMathJax{\newcommand{\LWRvectorboldstar}[1]{\pmb{#1}}}
+\CustomizeMathJax{%
+ \DeclareIfstar{\vectorbold}{\LWRvectorboldstar}{\LWRvectorboldnostar}%
+}
\CustomizeMathJax{\let\vb\vectorbold}
-\CustomizeMathJax{\newcommand{\vectorarrow}[1]{\vec{\mathbf{#1}}}}
+\CustomizeMathJax{\newcommand{\LWRvectorarrownostar}[1]{\vec{\mathbf{#1}}}}
+\CustomizeMathJax{\newcommand{\LWRvectorarrowstar}[1]{\vec{\pmb{#1}}}}
+\CustomizeMathJax{%
+ \DeclareIfstar{\vectorarrow}{\LWRvectorarrowstar}{\LWRvectorarrownostar}%
+}
\CustomizeMathJax{\let\va\vectorarrow}
-\CustomizeMathJax{\newcommand{\vectorunit}[1]{\mathbf{\hat{#1}}}}
+\CustomizeMathJax{\newcommand{\LWRvectorunitnostar}[1]{\mathbf{\hat{#1}}}}
+\CustomizeMathJax{\newcommand{\LWRvectorunitstar}[1]{\pmb{\hat{#1}}}}
+\CustomizeMathJax{%
+ \DeclareIfstar{\vectorunit}{\LWRvectorunitstar}{\LWRvectorunitnostar}%
+}
\CustomizeMathJax{\let\va\vectorunit}
\CustomizeMathJax{\newcommand{\dotproduct}{\boldsymbol\cdot}}
@@ -153,82 +195,209 @@
\CustomizeMathJax{\newcommand{\Re}[1]{\mathrm{Re}\left\lbrace#1\right\rbrace}}
\CustomizeMathJax{\newcommand{\Im}[1]{\mathrm{Im}\left\lbrace#1\right\rbrace}}
-\CustomizeMathJax{\newcommand{\qqtext}[1]{\quad\mathrm{#1}\quad}}
+\CustomizeMathJax{\newcommand{\LWRqqtextnostar}[1]{\quad\mathrm{#1}\quad}}
+\CustomizeMathJax{\newcommand{\LWRqqtextstar}[1]{\mathrm{#1}\quad}}
+\CustomizeMathJax{\DeclareIfstar{\qqtext}{\LWRqqtextstar}{\LWRqqtextnostar}}
\CustomizeMathJax{\let\qq\qqtext}
+
\CustomizeMathJax{\newcommand{\qqcomma}{\text{,}\quad}}
\CustomizeMathJax{\let\qc\qqcomma}
-\CustomizeMathJax{\newcommand{\qcc}{\quad\text{c.c.}\quad}}
-\CustomizeMathJax{\let\qcc}
-\CustomizeMathJax{\newcommand{\qif}{\quad\text{if}\quad}}
-\CustomizeMathJax{\newcommand{\qthen}{\quad\text{then}\quad}}
-\CustomizeMathJax{\newcommand{\qelse}{\quad\text{else}\quad}}
-\CustomizeMathJax{\newcommand{\qotherwise}{\quad\text{otherwise}\quad}}
-\CustomizeMathJax{\newcommand{\qunless}{\quad\text{unless}\quad}}
-\CustomizeMathJax{\newcommand{\qgiven}{\quad\text{given}\quad}}
-\CustomizeMathJax{\newcommand{\qusing}{\quad\text{using}\quad}}
-\CustomizeMathJax{\newcommand{\qassume}{\quad\text{assume}\quad}}
-\CustomizeMathJax{\newcommand{\qsince}{\quad\text{since}\quad}}
-\CustomizeMathJax{\newcommand{\qlet}{\quad\text{let}\quad}}
-\CustomizeMathJax{\newcommand{\qfor}{\quad\text{for}\quad}}
-\CustomizeMathJax{\newcommand{\qall}{\quad\text{all}\quad}}
-\CustomizeMathJax{\newcommand{\qeven}{\quad\text{even}\quad}}
-\CustomizeMathJax{\newcommand{\qodd}{\quad\text{odd}\quad}}
-\CustomizeMathJax{\newcommand{\qinteger}{\quad\text{integer}\quad}}
-\CustomizeMathJax{\newcommand{\qand}{\quad\text{and}\quad}}
-\CustomizeMathJax{\newcommand{\qor}{\quad\text{or}\quad}}
-\CustomizeMathJax{\newcommand{\qas}{\quad\text{as}\quad}}
-\CustomizeMathJax{\newcommand{\qin}{\quad\text{in}\quad}}
+
+\newcommand*{\LWR@physics@qtext}[2]{%
+ \appto\LWR@customizedMathJax{\LWRbackslash(}
+ \appto\LWR@customizedMathJax{%
+ \LWRbackslash{}newcommand\{\LWRbackslash{}LWR\macrotocsname{#1}subnostar\}%
+ }%
+ \appto\LWR@customizedMathJax{\{}%
+ \appto\LWR@customizedMathJax{%
+ \LWRbackslash{}quad\LWRbackslash{}text\{#2\}\LWRbackslash{}quad%
+ }%
+ \appto\LWR@customizedMathJax{\}}%
+ \appto\LWR@customizedMathJax{\LWRbackslash)\par}%
+ \appto\LWR@customizedMathJax{\LWRbackslash(}
+ \appto\LWR@customizedMathJax{%
+ \LWRbackslash{}newcommand\{\LWRbackslash{}LWR\macrotocsname{#1}substar\}%
+ }%
+ \appto\LWR@customizedMathJax{\{}%
+ \appto\LWR@customizedMathJax{\LWRbackslash{}text\{#2\}\LWRbackslash{}quad}%
+ \appto\LWR@customizedMathJax{\}}%
+ \appto\LWR@customizedMathJax{\LWRbackslash)\par}%
+ \appto\LWR@customizedMathJax{\LWRbackslash(}
+ \appto\LWR@customizedMathJax{%
+ \LWRbackslash{}DeclareIfstar\{\LWRbackslash\macrotocsname{#1}\}%
+ }%
+ \appto\LWR@customizedMathJax{\{}%
+ \appto\LWR@customizedMathJax{\LWRbackslash{}LWR\macrotocsname{#1}substar\}}%
+ \appto\LWR@customizedMathJax{\LWRbackslash{}LWR\macrotocsname{#1}subnostar\}}%
+ \appto\LWR@customizedMathJax{\LWRbackslash)\par}%
+}
+
+\LWR@physics@qtext{\qcc}{c.c.}
+\LWR@physics@qtext{\qif}{if}
+\LWR@physics@qtext{\qthen}{then}
+\LWR@physics@qtext{\qelse}{else}
+\LWR@physics@qtext{\qotherwise}{otherwise}
+\LWR@physics@qtext{\qunless}{unless}
+\LWR@physics@qtext{\qgiven}{given}
+\LWR@physics@qtext{\qusing}{using}
+\LWR@physics@qtext{\qassume}{assume}
+\LWR@physics@qtext{\qsince}{since}
+\LWR@physics@qtext{\qlet}{let}
+\LWR@physics@qtext{\qfor}{for}
+\LWR@physics@qtext{\qall}{all}
+\LWR@physics@qtext{\qeven}{even}
+\LWR@physics@qtext{\qodd}{odd}
+\LWR@physics@qtext{\qinteger}{integer}
+\LWR@physics@qtext{\qand}{and}
+\LWR@physics@qtext{\qor}{or}
+\LWR@physics@qtext{\qas}{as}
+\LWR@physics@qtext{\qin}{in}
\CustomizeMathJax{\newcommand{\differential}[1][]{\text{d}^{#1}}}
\CustomizeMathJax{\let\dd\differential}
-\CustomizeMathJax{\newcommand{\derivative}[3][]{%
+\CustomizeMathJax{\newcommand{\LWRderivativenostar}[3][]{%
\frac{\text{d}^{#1}#2}{\text{d}#3^{#1}}}%
}
+\CustomizeMathJax{\newcommand{\LWRderivativestar}[3][]{%
+ {\text{d}^{#1}#2}/{\text{d}#3^{#1}}}%
+}
+\CustomizeMathJax{%
+ \DeclareIfstar{\derivative}{\LWRderivativestar}{\LWRderivativenostar}%
+}
+
\CustomizeMathJax{\let\dv\derivative}
-\CustomizeMathJax{\newcommand{\partialderivative}[3][]{%
+\CustomizeMathJax{\newcommand{\LWRpartialderivativenostar}[3][]{%
\frac{\partial^{#1}#2}{\partial#3^{#1}}}%
}
+\CustomizeMathJax{\newcommand{\LWRpartialderivativestar}[3][]{%
+ {\partial^{#1}#2}/{\partial#3^{#1}}}%
+}
+\CustomizeMathJax{%
+ \DeclareIfstar{\partialderivative}%
+ {\LWRpartialderivativestar}{\LWRpartialderivativenostar}
+}
+
\CustomizeMathJax{\let\pderivative\partialderivative}
\CustomizeMathJax{\let\pdv\partialderivative}
\CustomizeMathJax{\newcommand{\variation}{\delta}}
\CustomizeMathJax{\let\var\variation}
-\CustomizeMathJax{\newcommand{\functionalderivative}[3][]{%
+\CustomizeMathJax{\newcommand{\LWRfunctionalderivativenostar}[3][]{%
\frac{\delta^{#1}#2}{\delta#3^{#1}}}%
}
+\CustomizeMathJax{\newcommand{\LWRfunctionalderivativestar}[3][]{%
+ {\delta^{#1}#2}/{\delta#3^{#1}}}%
+}
+\CustomizeMathJax{%
+ \DeclareIfstar{\functionalderivative}
+ {\LWRfunctionalderivativestar}{\LWRfunctionalderivativenostar}
+}
\CustomizeMathJax{\let\fdv\functionalderivative}
-\CustomizeMathJax{\newcommand{\bra}[1]{\langle{#1}\rvert}}
-\CustomizeMathJax{\newcommand{\ket}[1]{\lvert{#1}\rangle}}
+\CustomizeMathJax{\newcommand{\LWRbranostar}[1]{\left\langle{#1}\right\rvert}}
+\CustomizeMathJax{\newcommand{\LWRbrastar}[1]{\langle{#1}\rvert}}
+\CustomizeMathJax{\DeclareIfstar{\bra}{\LWRbrastar}{\LWRbranostar}}
-\CustomizeMathJax{\newcommand{\innerproduct}[2]{%
+\CustomizeMathJax{\newcommand{\LWRketnostar}[1]{\left\lvert{#1}\right\rangle}}
+\CustomizeMathJax{\newcommand{\LWRketstar}[1]{\lvert{#1}\rangle}}
+\CustomizeMathJax{\DeclareIfstar{\ket}{\LWRketstar}{\LWRketnostar}}
+
+\CustomizeMathJax{\newcommand{\LWRinnerproductnostar}[2]{%
\left\langle{#1}\middle\vert{#2}\right\rangle}%
}
+\CustomizeMathJax{\newcommand{\LWRinnerproductstar}[2]{%
+ \langle{#1}\vert{#2}\rangle}%
+}
+\CustomizeMathJax{%
+ \DeclareIfstar{\innerproduct}
+ {\LWRinnerproductstar}{\LWRinnerproductnostar}
+}
+
\CustomizeMathJax{\let\braket\innerproduct}
\CustomizeMathJax{\let\ip\innerproduct}
-\CustomizeMathJax{\newcommand{\outerproduct}[2]{%
+\CustomizeMathJax{\newcommand{\LWRouterproductnostar}[2]{%
\left\lvert{#1}\middle\rangle\!\middle\langle#2\right\rvert}%
}
+\CustomizeMathJax{\newcommand{\LWRouterproductstar}[2]{%
+ \lvert{#1}\rangle\!\langle#2\rvert}%
+}
+\CustomizeMathJax{%
+ \DeclareIfstar{\outerproduct}
+ {\LWRouterproductstar}{\LWRouterproductnostar}
+}
+
\CustomizeMathJax{\let\dyad\outerproduct}
\CustomizeMathJax{\let\op\outerproduct}
-\CustomizeMathJax{\newcommand{\expectationvalue}[2]{%
- \left\langle{#2}\middle\vert{#1}\middle\vert{#2}\right\rangle}%
+\CustomizeMathJax{%
+ \newcommand{\LWRexpectationvaluenostar}[2]{%
+ \vphantom{#1}%
+ \left\langle{#2}\middle\vert\smash{#1}\middle\vert{#2}%
+ \right\rangle%
+ }%
+}
+\CustomizeMathJax{%
+ \newcommand{\LWRexpectationvaluestar}[2]{%
+ \vphantom{#1#2}%
+ \left\langle\smash{#2}%
+ \middle\vert\smash{#1}\middle\vert\smash{#2}%
+ \right\rangle%
+ }%
}
+\CustomizeMathJax{%
+ \newcommand{\LWRexpectationvaluedoublestar}[2]{%
+ \left\langle{#2}\middle\vert{#1}\middle\vert{#2}\right\rangle%
+ }%
+}
+\CustomizeMathJax{% second star
+ \DeclareIfstar{\LWRsubexpectationvalue}
+ {\LWRexpectationvaluedoublestar}{\LWRexpectationvaluestar}
+}
+\CustomizeMathJax{% first star
+ \DeclareIfstar{\expectationvalue}
+ {\LWRsubexpectationvalue}{\LWRexpectationvaluenostar}
+}
+
\CustomizeMathJax{\let\expval\expectationvalue}
\CustomizeMathJax{\let\ev\expectationvalue}
-\CustomizeMathJax{\newcommand{\matrixelement}[3]{%
- \left\langle{#1}\middle\vert{#2}\middle\vert{#3}\right\rangle}%
+\CustomizeMathJax{%
+ \newcommand{\LWRmatrixelementnostar}[3]{%
+ \vphantom{#2}\left\langle{#1}\middle\vert\smash{#2}\middle\vert{#3}\right\rangle%
+ }%
+}
+\CustomizeMathJax{%
+ \newcommand{\LWRmatrixelementstar}[3]{%
+ \vphantom{#1#2#3}%
+ \left\langle\smash{#1}%
+ \middle\vert\smash{#2}\middle\vert\smash{#3}%
+ \right\rangle%
+ }%
+}
+\CustomizeMathJax{%
+ \newcommand{\LWRmatrixelementdoublestar}[3]{%
+ \left\langle{#1}\middle\vert{#2}\middle\vert{#3}\right\rangle%
+ }%
}
+\CustomizeMathJax{% second star
+ \DeclareIfstar{\LWRsubmatrixelement}
+ {\LWRmatrixelementdoublestar}{\LWRmatrixelementstar}
+}
+
+\CustomizeMathJax{% first star
+ \DeclareIfstar{\matrixelement}
+ {\LWRsubmatrixelement}{\LWRmatrixelementnostar}
+}
+
\CustomizeMathJax{\let\mel\matrixelement}
\CustomizeMathJax{\newcommand{\matrixquantity}[1]{\begin{matrix}#1\end{matrix}}}
\CustomizeMathJax{\let\mqty\matrixquantity}
+
\CustomizeMathJax{\newcommand{\pmqty}[1]{\begin{pmatrix}#1\end{pmatrix}}}
\CustomizeMathJax{\newcommand{\Pmqty}[1]{%
\left\lgroup\begin{matrix}#1\end{matrix}\right\rgroup}%
@@ -260,7 +429,8 @@
\CustomizeMathJax{\newcommand{\identitymatrix}[1]{(\text{imat}\{#1\})}}
\CustomizeMathJax{\let\imat\identitymatrix}
-\CustomizeMathJax{\newcommand{\xmatrix}[3]{(\text{xmat}\{\}\{#2\}\{#3\})}}
+\CustomizeMathJax{\newcommand{\LWRxmatrix}[3]{(\text{xmat}\{\}\{#2\}\{#3\})}}
+\CustomizeMathJax{\DeclareIfstar{\xmatrix}{\LWRxmatrix}{\LWRxmatrix}}
\CustomizeMathJax{\let\xmat\xmatrix}
\CustomizeMathJax{\newcommand{\zeromatrix}[2]{(\text{zmat}\{#1\}\{#2\})}}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-todonotes.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-todonotes.sty
index c340abfb1d4..9e18046dde1 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-todonotes.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-todonotes.sty
@@ -25,7 +25,7 @@
\let\LWRTODONOTES@orig@todototoc\todototoc
\renewcommand*{\todototoc}{%
-\phantomsection%
+\LWR@phantomsection%
\LWRTODONOTES@orig@todototoc%
}
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-url.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-url.sty
index eb5822a4644..8279c61a0b8 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-url.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-url.sty
@@ -16,7 +16,7 @@
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
-\LetLtxMacro\LWR@url@orig@url\url
+\LetLtxMacro\LWR@url@orig@url\LWR@url
\LWR@ProvidesPackagePass{url}[2013/09/16]
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty
index 5c1cd0a1473..303ea950e6c 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty
@@ -83,6 +83,7 @@ padding:\LWR@printlength{\fboxsep}%
\LWR@formatted{color}
\NewDocumentCommand{\LWR@HTML@textcolor}{o m m}{%
\begingroup%
+\LWR@FBcancel%
\IfValueTF{#1}{%
\color[#1]{#2}%
}{%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
index fc765c159b5..a204cb86a25 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
@@ -17,7 +17,7 @@
%% version 2005/12/01 or later.
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{lwarp}
- [2020/05/01 v0.85 Allows LaTeX to directly produce HTML5 output.]
+ [2020/05/12 v0.86 Allows LaTeX to directly produce HTML5 output.]
@@ -4182,114 +4182,259 @@ page_compositor "."
\end{LWRwriteconf}
+
\begin{LWRwriteconf}
\begin{filecontents*}[overwrite]{lwarp_mathjax.txt}
-<!-- https://groups.google.com/forum/#!topic/
- mathjax-users/jUtewUcE2bY -->
-<script type="text/x-mathjax-config">
-MathJax.Hub.Register.StartupHook("TeX AMSmath Ready",function () {
- var seteqsectionDefault = {name: "", num: 0};
- var seteqsections = {}, seteqsection = seteqsectionDefault;
- var TEX = MathJax.InputJax.TeX, PARSE = TEX.Parse;
- var AMS = MathJax.Extension["TeX/AMSmath"];
- TEX.Definitions.Add({
- macros: {
- seteqsection: "mySection",
- seteqnumber: "mySetEqNumber"
- }
- });
-
- PARSE.Augment({
- mySection: function (name) {
- seteqsection.num = AMS.number;
- var n = this.GetArgument(name);
- if (n === "") {
- seteqsection = seteqsectionDefault;
- } else {
- if (!seteqsections["_"+n])
- seteqsections["_"+n] = {name:n, num:0};
- seteqsection = seteqsections["_"+n];
+<script>
+// Lwarp MathJax emulation code
+// Based on code by Davide P. Cervone.
+// Original code: https://github.com/mathjax/MathJax/issues/2313
+// Modified by Brian Dunn to adjust equation numbering, add subequations,
+// and add starred macros.
+// Equation numbering: https://github.com/mathjax/MathJax/issues/2427
+// Starred macros: https://github.com/mathjax/MathJax/issues/2428
+//
+// LaTeX can use \seteqnumber{subequations?}{section}{number} before each equation.
+// subequations? is 0 usually, 1 if inside subequations.
+// section is a string printed as-is, or empty.
+// number is auto-incremented by MathJax between equations.
+//
+MathJax = {
+ subequations: "0",
+ section: "",
+ loader: {
+ load: ['[tex]/tagFormat']
+ },
+ startup: {
+ ready() {
+ //
+ // These would be replaced by import commands if you wanted to make
+ // a proper extension.
+ //
+ const Configuration = MathJax._.input.tex.Configuration.Configuration;
+ const CommandMap = MathJax._.input.tex.SymbolMap.CommandMap;
+ const Macro = MathJax._.input.tex.Symbol.Macro;
+ const TexError = MathJax._.input.tex.TexError.default;
+ const ParseUtil = MathJax._.input.tex.ParseUtil.default;
+ const expandable = MathJax._.util.Options.expandable;
+
+ //
+ // These are the names of the command maps:
+ //
+ const SETEQNUMBERMAP = 'seteqnumberCoreMap' ;
+
+ //
+ // These functions implement the macros:
+ //
+ const seteqnumberFunction = (parser, name) => {
+ // Get the macro parameters
+ const star = parser.GetStar(); // true if there is a *
+ const optBrackets = parser.GetBrackets(name); // contents of optional brackets
+ const newsubequations = parser.GetArgument(name); // the subequations argument
+ const neweqsection = parser.GetArgument(name); // the eq section argument
+ const neweqnumber = parser.GetArgument(name); // the eq number argument
+ MathJax.config.subequations=newsubequations ; // a string with boolean meaning
+ MathJax.config.section=neweqsection ; // a string with numeric meaning
+ parser.tags.counter = parser.tags.allCounter = neweqnumber ;
+ };
+
+ //
+ // This is the configuration for the seteqnumberFunctionConfig TeX extension.
+ //
+ const seteqnumberFunctionConfig = Configuration.create('seteqnumberCore', {
+ //
+ // Initialize the extension by creating the command map,
+ // then append the command map to the given configuration as a macro handler.
+ //
+ init(config) {
+ const map = new CommandMap(SETEQNUMBERMAP,{},{});
+ config.append(
+ Configuration.create(
+ 'seteqnumberDefs',
+ {handler: {macro: [SETEQNUMBERMAP]}}
+ )
+ );
+ },
+
+ //
+ // Add options (from the
+ // seteqnumberCore configuration object in the document's
+ // option list, if any).
+ //
+ config(config, jax) {
+ const map = jax.parseOptions.handlers.retrieve(SETEQNUMBERMAP);
+ const options = jax.parseOptions.options.seteqnumberCore;
+ for (const cs of Object.keys(options)) {
+ map.add(cs, new Macro(cs, seteqnumberFunction, options[cs]));
+ }
+ },
+
+ options: {
+ seteqnumberCore: expandable({})
}
- AMS.number = seteqsection.num;
- },
- mySetEqNumber: function (name) {
- var n = this.GetArgument(name);
- if (!n || !n.match(/^ *[0-9]+ *$/))
- n = "";
- else
- n = parseInt(n)-1;
- <!-- $ syntax highlighting -->
- if (n === "" || n < 1)
- TEX.Error
- ("Argument to "+name+" should be a positive integer");
- AMS.number = n;
- }
- });
- MathJax.Hub.Config({
- TeX: {
- equationNumbers: {
- formatTag: function (n) {
- <!-- if not numeric, don't include the chapter -->
- if (!n.match(/^ *[0-9]+ *$/ ))
- <!-- $ syntax highlighting -->
- return "("+(n).replace(/^\./,"")+")" ;
- else
- return "("+(seteqsection.name+"."+n).replace(/^\./,"")+")" ;
- },
- formatID: function (n) {
- n = (seteqsection.name+'.'+n).replace
- (/[:"'<>&]/g,"").replace(/^\./,"");
- return 'mjx-eqn-' + n;
+ }
+ );
+
+ const IFSTARMAP = 'ifstarMap';
+
+ //
+ // This function implements an ifstar macro.
+ //
+ const IfstarFunction = (parser, name, resultstar, resultnostar) => {
+ //
+ // Get the macro parameters
+ //
+ const star = parser.GetStar(); // true if there is a *
+ //
+ // Construct the replacement string for the macro
+ //
+ const macro = [(star ? resultstar : resultnostar)].join('');
+ //
+ // Insert the replacement string into the TeX string, and check
+ // that there haven't been too many maxro substitutions (prevents
+ // infinite loops).
+ //
+ parser.string = ParseUtil.addArgs(parser, macro, parser.string.slice(parser.i));
+ parser.i = 0;
+ if (++parser.macroCount > parser.configuration.options.maxMacros) {
+ throw new TexError('MaxMacroSub1',
+ 'MathJax maximum macro substitution count exceeded; ' +
+ 'is there a recursive macro call?');
+ }
+ };
+
+ //
+ // This is the configuration for the IfstarConfiguration TeX extension.
+ //
+ const IfstarConfiguration = Configuration.create('Ifstar', {
+ //
+ // Initialize the extension by creating the command map for the
+ // macros defined by \DeclareIfstar, and add the
+ // \DeclareIfstar macro itself. Then append the
+ // command map to the given configuration as a macro handler
+ //
+ init(config) {
+ const map = new CommandMap(IFSTARMAP, {
+ DeclareIfstar: ['Declare_Ifstar']
+ }, {
+ //
+ // Implements \DeclareIfstar control sequence.
+ //
+ Declare_Ifstar(parser, name) {
+ //
+ // Get the control sequence to define and the starred and
+ // non-starred macros to use.
+ //
+ let cs = ParseUtil.trimSpaces(parser.GetArgument(name));
+ const resultstar = parser.GetArgument(name);
+ const resultnostar = parser.GetArgument(name);
+ //
+ // Check that the control sequence name is valid
+ //
+ if (cs.charAt(0) === '\\') cs = cs.substr(1);
+ if (!cs.match(/^(.|[a-z]+)$/i)) { //$ syntax highlighting
+ throw new TexError(
+ 'IllegalControlSequenceName',
+ 'Illegal control sequence name for %1',
+ name
+ );
+ }
+ //
+ // Look up the command map and add the new macro to it using
+ // IfstarFunction as the function and passing it the
+ // given starred and non-starred macros.
+ //
+ const map = parser.configuration.handlers.retrieve(IFSTARMAP);
+ map.add(cs, new Macro(cs, IfstarFunction, [resultstar, resultnostar]));
}
+ });
+ config.append(
+ Configuration.create('IfstarDefs', {handler: {macro: [IFSTARMAP]}})
+ );
+ },
+
+ //
+ // Add any user-defined starred/non-starred macros (from the
+ // Ifstar configuration object in the document's
+ // option list), if any.
+ //
+ config(config, jax) {
+ const map = jax.parseOptions.handlers.retrieve(IFSTARMAP);
+ const starmacros = jax.parseOptions.options.Ifstar;
+ for (const cs of Object.keys(starmacros)) {
+ map.add(cs, new Macro(cs, IfstarFunction, starmacros[cs]));
+ }
+ },
+
+ //
+ // Indicate that Ifstar is a valid option, and can have
+ // any number of definitions. The format is
+ //
+ // name: [starred, non-starred]
+ //
+ // where 'name' is the macro name, and starred and non-starred are the
+ // macros to use for the \name macro. You can include
+ // pre-defined macros here, which will be available without
+ // further configuration.
+ //
+ options: {
+ Ifstar: expandable({})
}
- }
- });
-});
-</script>
+ });
-<!-- http://docs.mathjax.org/en/latest/options/ThirdParty.html -->
-<script type="text/x-mathjax-config">
- MathJax.Ajax.config.path["Contrib"] =
- "https://cdn.mathjax.org/mathjax/contrib";
-</script>
+ MathJax.startup.defaultReady();
-<script type="text/x-mathjax-config">
-MathJax.Hub.Config({
- TeX: {
- extensions: ["autoload-all.js"] ,
- equationNumbers: {
- autoNumber: "AMS"
+ // For forward references:
+ MathJax.startup.input[0].preFilters.add(({math}) => {
+ if (math.inputData.recompile){
+ MathJax.config.subequations = math.inputData.recompile.subequations;
+ MathJax.config.section = math.inputData.recompile.section;
}
- }
-});
-</script>
-
-<!-- Alternative CDN provider: -->
-<script type="text/javascript" async
-src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js?config=TeX-AMS_HTML-full">
+ });
+ MathJax.startup.input[0].postFilters.add(({math}) => {
+ if (math.inputData.recompile){
+ math.inputData.recompile.subequations = MathJax.config.subequations;
+ math.inputData.recompile.section = MathJax.config.section;
+ }
+ });
+ } // ready
+ }, // startup
+
+ tex: {
+ packages: {'[+]': ['seteqnumberCore', 'tagFormat', 'Ifstar']},
+ seteqnumberCore: {
+ seteqnumber: [] // a user-defined macro
+ },
+ tags: "ams",
+ tagFormat: {
+ number: function (n) {
+ if(MathJax.config.subequations==0)
+ return(MathJax.config.section + n);
+ else
+ return(MathJax.config.section + String.fromCharCode(96+n));
+ },
+ },
+ }
+}
</script>
-<!-- No longer supported after April 30, 2017: -->
-<!--
<script
- src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML-full">
-</script>
--->
-
+ id="MathJax-script"
+ src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"
+></script>
\end{filecontents*}
\end{LWRwriteconf}
-
\begin{LWRcreatelwarpmk}
\begin{filecontents*}[overwrite]{lwarpmk.lua}
#!/usr/bin/env texlua
-- Copyright 2016-2020 Brian Dunn
-printversion = "v0.85"
+printversion = "v0.86"
requiredconfversion = "2" -- also at *lwarpmk.conf
function printhelp ()
@@ -6527,11 +6672,14 @@ end -- not --version
\LWR@traceinfo{LWR@filenamenoblanks edef: !\LWR@thisnewfilename!}%
\fullexpandarg%
\LWR@simplifyname*{ }
+\LWR@simplifyname*{*}
+\LWR@simplifyname*{(}
+\LWR@simplifyname*{)}
+\LWR@simplifyname*{.}
\LWR@simplifyname*{!}
\LWR@simplifyname*{,}
\LWR@simplifyname*{'}
\LWR@simplifyname*{+}
-\LWR@simplifyname*{,}
\LWR@simplifyname*{/}
\LWR@simplifyname*{:}
\LWR@simplifyname*{;}
@@ -6769,6 +6917,7 @@ end -- not --version
\LWR@customizedMathJax
\LWR@startpars
\end{BlockClass}
+\typeout{Done.}
\typeout{---}
\LWR@startpars
@@ -7340,7 +7489,17 @@ end -- not --version
\begingroup%
\LWR@restoreoriglists%
\boolfalse{LWR@verbtags}%
- \verbatiminput{\LWR@mathjaxfilename}%
+ \IfFileExists{\LWR@mathjaxfilename}%
+ {\verbatiminput{\LWR@mathjaxfilename}}%
+ {%
+ \PackageError{lwarp}%
+ {%
+ \protect\MathJaxFilename\space specified the file\MessageBreak
+ \space\space\LWR@mathjaxfilename\MessageBreak
+ which does not exist%
+ }%
+ {Specify an existing file, or remove \protect\MathJaxFilename.}%
+ }%
\booltrue{LWR@verbtags}%
\endgroup%
\LWR@stoppars%
@@ -7383,8 +7542,6 @@ end -- not --version
\setlength{\abovecaptionskip}{0ex}
\renewcommand{\ps@plain}{}
\let\LWR@origcaption\caption
-\let\LWR@origltx@label\ltx@label
-\let\ltx@label\LWR@htmlmathlabel
\global\boolfalse{LWR@doingapar}
\global\boolfalse{LWR@doingstartpars}
\mainmatter
@@ -9905,30 +10062,53 @@ end -- not --version
}
+\newcommand*{\LWR@label@subcreatetag}{%
+ \LWR@htmltag{a \LWR@print@mbox{id="\LWR@sanitized"}}%
+ \LWR@htmltag{/a}%
+}
+
+\newcommand*{\LWR@label@inmathcomment}{%
+ \ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
+ {%
+ \mbox{%
+ \ifdef{\totwidth@}{\ifbool{LWR@amsmultline}{}{\hspace*{\totwidth@}}}{}%
+ \LWR@htmlclosecomment%
+ \LWR@label@subcreatetag%
+ \LWR@htmlopencomment%
+ }% mbox
+ }% mathjax
+ {%
+ \LWR@label@subcreatetag%
+ }%
+}
+
\newcommand*{\LWR@label@createtag}[1]{%
\LWR@traceinfo{LWR@label@createtag !#1!}%
\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
{}%
{% not lateximage
\LWR@sanitize{#1}%
- \ifbool{LWR@doingstartpars}%
- {% pars allowed
- \ifbool{LWR@doingapar}%
- {% par started
- \LWR@htmltag{a \LWR@print@mbox{id="\LWR@sanitized"}}%
- \LWR@htmltag{/a}%
- }% par started
- {% par not started
- \LWR@stoppars%
- \LWR@htmltag{a \LWR@print@mbox{id="\LWR@sanitized"}}%
- \LWR@htmltag{/a}%
- \LWR@startpars%
- }% par not started
- }% pars allowed
- {% pars not allowed
- \LWR@htmltag{a \LWR@print@mbox{id="\LWR@sanitized"}}%
- \LWR@htmltag{/a}%
- }% pars not allowed
+ \ifbool{LWR@insidemathcomment}%
+ {% inside HTML math comment
+ \LWR@label@inmathcomment%
+ }% inside HTML math comment
+ {% not inside HTML math comment
+ \ifbool{LWR@doingstartpars}%
+ {% pars allowed
+ \ifbool{LWR@doingapar}%
+ {% par started
+ \LWR@label@subcreatetag%
+ }% par started
+ {% par not started
+ \LWR@stoppars%
+ \LWR@label@subcreatetag%
+ \LWR@startpars%
+ }% par not started
+ }% pars allowed
+ {% pars not allowed
+ \LWR@label@subcreatetag%
+ }% pars not allowed
+ }% not inside HTML math comment
}% not lateximage
}
\NewDocumentCommand{\LWR@new@label}{m}{%
@@ -9977,7 +10157,7 @@ end -- not --version
{%
\ifthenelse{\cnttest{\LWR@lateximagedepthref{#1}}{>}{0}}%
{%
- \LWR@ImagesName\LWR@lateximagenumberref{#1}%
+ lateximage-\BaseJobname-\LWR@lateximagenumberref{#1}%
}%
{%
\LWR@traceinfo{LWR@startref D3}%
@@ -10088,7 +10268,7 @@ end -- not --version
\LWR@subhyperreftext%
}
-\newrobustcmd*{\href}{%
+\newrobustcmd*{\LWR@href}{%
\begingroup%
\LWR@linkcatcodes%
\LWR@hrefb%
@@ -10102,7 +10282,7 @@ end -- not --version
\endgroup%
}
-\newrobustcmd*{\nolinkurl}{%
+\newrobustcmd*{\LWR@nolinkurl}{%
\begingroup%
\LWR@linkcatcodes%
\LWR@nolinkurlb%
@@ -10112,11 +10292,11 @@ end -- not --version
\LWR@ensuredoingapar%
\def\LWR@templink{#1}%
\@onelevel@sanitize\LWR@templink%
- \href{\LWR@templink}{\LWR@templink}%
+ \LWR@href{\LWR@templink}{\LWR@templink}%
\endgroup%
}
-\newrobustcmd*{\url}{%
+\newrobustcmd*{\LWR@url}{%
\begingroup%
\LWR@linkcatcodes%
\LWR@urlb%
@@ -10974,6 +11154,9 @@ end -- not --version
\newbool{LWR@indisplaymathimage}
+\newbool{LWR@insidemathcomment}
+\boolfalse{LWR@insidemathcomment}
+
\newbool{LWR@xfakebold}
\boolfalse{LWR@xfakebold}
@@ -11384,29 +11567,53 @@ end -- not --version
}
\newcounter{LWR@nextequation}
-\newcommand*{\LWR@syncmathjax}{%
- \ifcsdef{thechapter}{
- \LWR@stoppars%
- \InlineClass{hidden}{
- \textbackslash(
- \textbackslash{}seteqsection \{\thechapter\}
- \textbackslash)
+\newcommand\LWR@article@theequation{\@arabic\c@equation}
+
+\newcommand\LWR@book@theequation
+ {\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@equation}
+
+\newcommand\LWR@chapter@theequation{\thechapter.\arabic{equation}}
+\newcommand\LWR@section@thequation{\thesection.\arabic{equation}}
+\newcommand\LWR@subsection@thequation{\thesubsection.\arabic{equation}}
+
+\AtBeginDocument{
+ % default per article class:
+ \newcommand*{\theMathJaxsubequations}{0}
+ \newcommand*{\theMathJaxsection}{}
+ \newcommand*{\theMathJaxequation}{\arabic{equation}}
+
+ \ifdefstrequal{\theequation}{\LWR@article@theequation}
+ {}{
+ \ifdefstrequal{\theequation}{\LWR@book@theequation}{
+ \renewcommand*{\theMathJaxsection}{\ifnum \c@chapter>\z@ \thechapter.\fi}
+ }{
+ \ifdefstrequal{\theequation}{\LWR@subsection@thequation}{
+ \renewcommand*{\theMathJaxsection}{\thesubsection{}.}
+ }{
+ \ifdefstrequal{\theequation}{\LWR@section@thequation}{
+ \renewcommand*{\theMathJaxsection}{\thesection{}.}
+ }{
+ \ifdefstrequal{\theequation}{\LWR@chapter@theequation}{
+ \renewcommand*{\theMathJaxsection}{\thechapter{}.}
+ }{% unknown format
+ \PackageWarningNoLine{lwarp}
+ {%
+ Unknown equation tag format for \protect\theequation.\MessageBreak
+ Article-style equation numbering will be used%
}
- \LWR@startpars%
- }
- {}% not using chapters
- \ifthenelse{\cnttest{\value{equation}}>0}
- {
- \setcounter{LWR@nextequation}{\value{equation}}
- \addtocounter{LWR@nextequation}{1}
+ }}}}}
+}
+\newcommand*{\LWR@syncmathjax}{%
\LWR@stoppars%
\InlineClass{hidden}{
- \textbackslash(
- \textbackslash{}seteqnumber \{\arabic{LWR@nextequation}\}
- \textbackslash)
+ \textbackslash(%
+ \textbackslash{}seteqnumber%
+ \{\theMathJaxsubequations\}%
+ \{\theMathJaxsection\}%
+ \{\theMathJaxequation\}%
+ \textbackslash)%
}
\LWR@startpars%
- }{}% not eq > 0
}
\NewDocumentCommand{\LWR@hidelatexequation}{m +m}{%
\LWR@stoppars
@@ -11415,11 +11622,13 @@ end -- not --version
\begingroup
\@nameuse{LWR@orig#1}
\LWR@restoreorigformatting
+ \booltrue{LWR@insidemathcomment}
#2
\@nameuse{LWR@origend#1}
\endgroup
\LWR@htmlclosecomment
+ \boolfalse{LWR@insidemathcomment}
\LWR@startpars
}
@@ -11576,22 +11785,6 @@ end -- not --version
\newbool{LWR@amsmultline}
\boolfalse{LWR@amsmultline}
-\newcommand*{\LWR@htmlmathlabel}[1]{%
- \LWR@traceinfo{LWR@htmlmathlabelb #1}%
- \ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
- {%
- \text{%
- \ifbool{LWR@amsmultline}{}{\hspace*{\totwidth@}}%
- \LWR@htmlclosecomment%
- \LWR@origltx@label{#1}%
- \LWR@htmlopencomment%
- }% text
- }% mathjax
- {%
- \LWR@origltx@label{#1}%
- }%
-}
-
\newcommand*{\LWR@beginhideamsmath}{
\LWR@stoppars
\LWR@origtilde\LWR@orignewline
@@ -11599,12 +11792,14 @@ end -- not --version
\begingroup
\LWR@restoreorigformatting
+ \booltrue{LWR@insidemathcomment}
}
\newcommand*{\LWR@endhideamsmath}{
\endgroup
\LWR@htmlclosecomment
+ \boolfalse{LWR@insidemathcomment}
\LWR@orignewline
\LWR@startpars
}
@@ -13193,8 +13388,7 @@ color:\LWR@origpound\LWR@tempcolor%
\begin{warpHTML}
-\newcounter{LWR@phantomsection}
-\DeclareDocumentCommand{\phantomsection}{}{%
+\newrobustcmd*{\LWR@phantomsection}{%
\begingroup%
\boolfalse{LWR@forcinghtmltoc}%
\section*{}%
@@ -13535,9 +13729,6 @@ color:\LWR@origpound\LWR@tempcolor%
environments to force SVG output}
\LWR@mathjaxwarn{jkmath}{}
\LWR@mathjaxwarn{mathspec}{}
- \LWR@mathjaxwarn{mathtools}
- {Avoid starred macros.\MessageBreak
- See the Lwarp manual for other limitations}
\LWR@mathjaxwarn{multirow}
{Multirow works as expected in text mode, but\MessageBreak
limited emulation is provided for MathJax math.\MessageBreak
@@ -13547,8 +13738,8 @@ color:\LWR@origpound\LWR@tempcolor%
{Enclose its uses inside lateximage environments\MessageBreak
to force SVG output}
\LWR@mathjaxwarn{physics}
- {The third-party extension is not yet used.\MessageBreak
- Avoid starred macros and automatic delimiters.\MessageBreak
+ {The third-party extension is not used.\MessageBreak
+ Avoid automatic delimiters.\MessageBreak
Use all mandatory arguments, adding empty as needed.\MessageBreak
See the Lwarp manual for details}
\LWR@mathjaxwarn{unicode-math}