texlive[55122] trunk: lwarp (12may20)

commits+karl at tug.org commits+karl at tug.org
Tue May 12 23:22:49 CEST 2020


Revision: 55122
          http://tug.org/svn/texlive?view=revision&revision=55122
Author:   karl
Date:     2020-05-12 23:22:49 +0200 (Tue, 12 May 2020)
Log Message:
-----------
lwarp (12may20)

Modified Paths:
--------------
    trunk/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua
    trunk/Master/texmf-dist/doc/latex/lwarp/README.txt
    trunk/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf
    trunk/Master/texmf-dist/scripts/lwarp/lwarpmk.lua
    trunk/Master/texmf-dist/source/latex/lwarp/lwarp.dtx
    trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-accessibility.sty
    trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-amsmath.sty
    trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-attachfile.sty
    trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-attachfile2.sty
    trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-breakurl.sty
    trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-common-multimedia.sty
    trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-ed.sty
    trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-glossaries.sty
    trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty
    trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty
    trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-intopdf.sty
    trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-luatodonotes.sty
    trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-mathtools.sty
    trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-nccmath.sty
    trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-physics.sty
    trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-todonotes.sty
    trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-url.sty
    trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty
    trunk/Master/texmf-dist/tex/latex/lwarp/lwarp.sty

Modified: trunk/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua	2020-05-12 21:21:35 UTC (rev 55121)
+++ trunk/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua	2020-05-12 21:22:49 UTC (rev 55122)
@@ -2,7 +2,7 @@
 
 -- Copyright 2016-2020 Brian Dunn
 
-printversion = "v0.85"
+printversion = "v0.86"
 requiredconfversion = "2" -- also at *lwarpmk.conf
 
 function printhelp ()

Modified: trunk/Master/texmf-dist/doc/latex/lwarp/README.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/lwarp/README.txt	2020-05-12 21:21:35 UTC (rev 55121)
+++ trunk/Master/texmf-dist/doc/latex/lwarp/README.txt	2020-05-12 21:22:49 UTC (rev 55122)
@@ -1,5 +1,5 @@
 
-LaTeX lwarp package v0.85   README.txt
+LaTeX lwarp package v0.86   README.txt
 
 Files included are:
 

Modified: trunk/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/scripts/lwarp/lwarpmk.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/lwarp/lwarpmk.lua	2020-05-12 21:21:35 UTC (rev 55121)
+++ trunk/Master/texmf-dist/scripts/lwarp/lwarpmk.lua	2020-05-12 21:22:49 UTC (rev 55122)
@@ -2,7 +2,7 @@
 
 -- Copyright 2016-2020 Brian Dunn
 
-printversion = "v0.85"
+printversion = "v0.86"
 requiredconfversion = "2" -- also at *lwarpmk.conf
 
 function printhelp ()

Modified: trunk/Master/texmf-dist/source/latex/lwarp/lwarp.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/lwarp/lwarp.dtx	2020-05-12 21:21:35 UTC (rev 55121)
+++ trunk/Master/texmf-dist/source/latex/lwarp/lwarp.dtx	2020-05-12 21:22:49 UTC (rev 55122)
@@ -16,7 +16,7 @@
 % \iffalse
 %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
 %<package>\ProvidesPackage{lwarp}
-%<package>    [2020/05/01 v0.85  Allows LaTeX to directly produce HTML5 output.]
+%<package>    [2020/05/12 v0.86  Allows LaTeX to directly produce HTML5 output.]
 %
 %<*driver>
 \documentclass{ltxdoc}
@@ -24,7 +24,7 @@
 \PassOptionsToPackage{quiet}{textcomp}% Not all chars supported in TT font.
 
 \usepackage{lmodern}
-% \usepackage{libertine}
+\usepackage{libertine}
 \usepackage[space]{erewhon}
 \usepackage[varqu,varl]{inconsolata} % typewriter
 % \usepackage{roboto}% conflicts with \textsc inside a float
@@ -1313,12 +1313,6 @@
     \cs{multicolumn} only fills a single cell, resulting in a short row.
     \cs{multirow} simply prints its text on the first line.
 
-\item \brand{MathJax} does not support subequations.
-    \trouble[subequations]{mathjax=\brand{MathJax}>subequations}%
-    \trouble{math>subequations}%
-    This may be improved by parsing the \LaTeX{}
-    math expression to manually insert tags, but this has not yet been done.
-
 \item Footnotes are emulated when used inside a \brand{MathJax} expression.
     \watchout[footnotes]
     For an equation with a single footnote, the correct footnote number is used.
@@ -1361,12 +1355,6 @@
     While using \brand{MathJax}, \pkg{lwarp} provides emulation
     for footnotes, \pkg{bm}, \pkg{mathtools},
     \pkg{nicefrac}, \pkg{siunitx}, and \pkg{units}.
-
-\item Starred macros are generally not supported
-    \trouble[starred macros]{starred macros>mathjax=\brand{MathJax}}
-    \trouble{math>starred macros and mathjax=\brand{MathJax}}
-    \trouble{mathjax=\brand{MathJax}>starred macros}
-    by MathJax or the \pkg{lwarp} emulations.
 \end{itemize}
 }
 
@@ -1438,6 +1426,27 @@
 
 
 \newcommand{\limitscustomizemathjax}{%
+\pkg{lwarp} detects and adjusts \brand{MathJax} equation numbering format for
+\margintag{equation numbering}
+\gindex{equation numbering>mathjax=\brand{MathJax}}
+\gindex{math>equation numbering, mathjax=\brand{MathJax}}
+\gindex{mathjax=\brand{MathJax}>equation numbering}
+\trouble{equation numbering>mathjax=\brand{MathJax}}
+\trouble{mathjax=\brand{MathJax}>equation numbering}
+\trouble{math>equation numbering>mathjax=\brand{MathJax}}
+\pkg{article} and \pkg{book} style equations as well as
+\pkg{amsmath} \cs{numberwithin} for chapters, sections, and subsections.
+Custom equation number formats may be set as follows, for example:
+\begin{sourcedisplay}
+\cs{renewcommand*}\{\cs{theequation}\}\{\cs{Alph}\{section\}.\cs{arabic}\{equation\}\} \\
+\textred{\cs{AtBeginDocument}\{} \\
+    \fquad\cs{renewcommand*}\{\cs{theMathJaxsection}\}\{\cs{Alph}\{section\}.\} \\
+\textred{\}}
+\end{sourcedisplay}
+The \pkg{amsmath} \env{subequations} environment is supported, but only
+\watchout[\env{subequation}]
+with \cs{alpha} subequation numbering.
+
 \brand{MathJax} does not have preexisting support every possible math function.
 \margintag{global customizations}
 Additional \brand{MathJax} function definitions may be
@@ -1496,9 +1505,20 @@
 To maintain compile speed, use the \env{warpMathJax} environment,
 and use a separate math environment for each definition.
 
-Starred macros are generally not supported
-    \watchout[starred macros]
-    by MathJax or the \pkg{lwarp} emulations.
+\DescribeMacro{\DeclareIfstar}
+To define a starred macro, instead of:
+\gindex{mathjax=\brand{MathJax}>starred macros}
+\trouble{mathjax=\brand{MathJax}>starred macros}
+\trouble{math>starred macros and mathjax=\brand{MathJax}}
+\begin{sourcedisplay}
+\cs{CustomizeMathJax}\{\cs{def}\cs{myname}\{\cs{@ifstar}\cs{starredaction}\cs{unstarredaction}\}\}
+\end{sourcedisplay}
+use:
+\begin{sourcedisplay}
+\cs{CustomizeMathJax}\{\cs{DeclareIfstar}\{\cs{myname}\}\{\cs{starredaction}\}\{\cs{unstarredaction}\}\}
+\end{sourcedisplay}
+Inside a \brand{MathJax} math expression, \cs{myname} becomes a macro
+which uses \cs{starredaction} if it is starred, or \cs{unstarredaction} if not.
 }
 
 %\newcommand{\limitscustomizeKaTeX}{%
@@ -1528,10 +1548,10 @@
 \trouble{math>file name}
 instead of dollar math \texttt{\$x+y\$}.
 (Dollar math works, but appears in the filename.)
-Or, use a short name for the \TOC\ entry without the math, or use \cs{texorpdfstring}:
+Or, use a short name for the \TOC\ entry without the math, or use \cs{texorpdfstring}
+from the \pkg{hyperref} package:
 \begin{sourcedisplay}
-\cs{section}\{A name with math \\
-    \fqquad \cs{texorpdfstring}\{\$1+2=3\$\}\{text description\}\}
+\cs{section}\{Some math \cs{texorpdfstring}\{\$1+2=3\$\}\{three\}\}
 \end{sourcedisplay}
 }
 
@@ -1546,7 +1566,6 @@
     If using \brand{MathJax}:
     \trouble[\brand{MathJax}]{mathjax=\brand{MathJax}>mathtools=\pkg{mathtools}}
     \begin{itemize}
-    \item Starred macros are not available.  Starred environments do work.
     \item \pkg{mathtools} \optn{disallowspaces} does not work for \brand{MathJax}.
         Protect brackets which are not optional arguments, such as:
         \begin{sourcedisplay}
@@ -1566,7 +1585,6 @@
         \env{warpprint} to isolate a version for each mode.
     \item \cs{DeclareParedDelimiter} and related must be in the preamble
         before \linebreak \texttt{\cs{begin}\{document\}}.
-        The starred versions of each macro are not created.
     \end{itemize}
 }
 
@@ -2784,12 +2802,11 @@
 \newcommand{\limitsphysics}{%
 \pkg{physics} works as-is for \HTML\ with \SVG\ math.
 
-For \brand{MathJax}, emulation is provided via \brand{MathJax} macros.
+For \brand{MathJax}, emulation is provided via \pkg{lwarp}'s \brand{MathJax} macros.
 These are not the same as the third-party \brand{MathJax} extension.
 
 \begin{itemize}
 \item The \optn{notrig} option is honored.
-\item Starred macros are not yet detected.\watchout
 \item Most macros don't work with \cs{big}, etc.\watchout
 \item Macros do not auto-detect variable numbers of mandatory arguments. \watchout
     Provide empty \texttt{\{\}} arguments for those which are not used.
@@ -3005,7 +3022,7 @@
 %<*package>
 % \fi
 %
-% \CheckSum{44178}
+% \CheckSum{44713}
 %
 % \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
@@ -3133,6 +3150,7 @@
 % \changes{v0.83}{2020/03/27}{\ 2020/03/27}
 % \changes{v0.84}{2020/04/24}{\ 2020/04/24}
 % \changes{v0.85}{2020/05/01}{\ 2020/05/01}
+% \changes{v0.86}{2020/05/12}{\ 2020/05/12}
 
 
 
@@ -3355,6 +3373,28 @@
 %
 % \begin{description}
 % \needspace{2\baselineskip}
+% \item[v0.86:] \brand{MathJax} major updates.
+%   \begin{itemize}
+%   \item Fixed: Filename if named files with \filenm{*}, parens, period in section name.
+%       \margintag{core}
+%   \item Fixed: Labels in \env{eqnarray}, \env{lateximage}.
+%   \item Updated to \brand{MathJax} v3.  New repository.
+%       \margintag{\brand{MathJax}}
+%   \item Fixed forward references for \brand{MathJax}.
+%   \item Improved \brand{MathJax} equation number formatting, now compatible with
+%       \pkg{amsmath} \cs{numberwithin} for chapters, sections, subsections,
+%       as well as \pkg{amsmath} \env{subequation}s.
+%       See \cref{sec:limitscustomizemathjax}.
+%   \item Added \cs{DeclareIfstar} to define starred \TeX\ macros in \brand{MathJax}.
+%       See \cref{sec:limitscustomizemathjax}.
+%   \item Generates an error if \cs{MathJaxFilename} file does not exist.
+%   \item \pkg{mathtools}, \pkg{nccmath}, \pkg{physics}:
+%       \margintag{packages}
+%       Added starred macros for \brand{MathJax}.
+%   \item \pkg{nccmath}: Fixed \cs{nr}, \cs{displaybreak} for \brand{MathJax}.
+%   \item \pkg{xcolor}: Fixed \cs{textcolor} with \pkg{babel-french}.
+%   \end{itemize}
+% \needspace{2\baselineskip}
 % \item[v0.85:] \pkg{fontspec}
 %   \begin{itemize}
 %   \item \pkg{fontspec}: Fixed core font change macros for world languages.
@@ -6350,7 +6390,7 @@
 %
 % \item [|lwarp\_mathjax.txt|:] Inserted into the \HTML\ files when
 %	\brand{MathJax} is used to display math.
-%	This file should not be modified by the user.
+%	Do not modify, see \cs{MathJaxFilename} instead.
 %
 % \item [|comment\_*.cut|:] Temporary files used by \pkg{lwarp} to
 %	conditionally process blocks of text.  These files may be ignored.
@@ -13087,6 +13127,7 @@
 % \end{macro}
 %
 %
+%
 % \section{Operating-System portability}
 % \label{sec:OSportability}
 % \changes{v0.11}{2016/03/11}{Added section: Operating-System portability.}
@@ -18758,10 +18799,13 @@
 
 % \subsection{\filenm{lwarp_mathjax.txt}}
 
+% \credits{Davide P. Cervone}
+
 % \DescribeFile{lwarp_mathjax.txt}
 % The default MathJax script used by \pkg{lwarp} when using \brand{MathJax}.
 % A recent version of MathJax is used, as served by the recommended repository.
-% Adjustments are made to allow \LaTeX\ to control the equation tags.
+% Adjustments are made to allow \LaTeX\ to control the equation tags
+% and provide for starred macros.
 %
 % \cs{MathJaxFilename} determines which script file is copied into the \HTML\ pages,
 % and defaults to \filenm{lwarp_mathjax.txt}.
@@ -18774,8 +18818,8 @@
 % To generate a custom script, such as to use a local repository,
 % \margintag{custom script}
 % copy \filenm{lwarp_mathjax.txt} to a new file,
-% make changes while keeping \pkg{lwarp}'s adjustments for equation numbering,
-% and use \cs{MathJaxFilename} to select new filename.
+% make changes while keeping \pkg{lwarp}'s adjustments for equation numbering
+% and starred macros, and use \cs{MathJaxFilename} to select the new filename.
 %
 % \changes{v0.28}{2017/04/11}{File: \filenm{lwarp_mathjax.txt}: Updated \protect\acro{CDN} repository.}
 % \changes{v0.30}{2017/04/26}{Fix: \filenm{lwarp_mathjax.txt}: Only written in print mode.}
@@ -18783,12 +18827,15 @@
 % \changes{v0.42}{2017/10/16}{File: \filenm{lwarp_mathjax.txt}: Updated \pkg{siunitx} script.}
 % \changes{v0.45}{2017/12/21}{File: \filenm{lwarp_mathjax.txt}: Allow \brand{MathJax} inside \env{tabbing}.}
 % \changes{v0.45}{2018/01/23}{File: \filenm{lwarp_mathjax.txt}: Allow \brand{MathJax} inside \env{verse}.}
-% \changes{v0.59}{2018/07/13}{File: \filenm{lwarp_mathjax.txt}: Updated to MathJax v2.7.4.}
-% \changes{v0.59}{2018/07/16}{File: \filenm{lwarp_mathjax.txt}: Fix: Removed chapter number from tagged non-numeric MathJax equations.}
+% \changes{v0.59}{2018/07/13}{File: \filenm{lwarp_mathjax.txt}: Updated to \brand{MathJax} v2.7.4.}
+% \changes{v0.59}{2018/07/16}{File: \filenm{lwarp_mathjax.txt}: Fix: Removed chapter number from tagged non-numeric \brand{MathJax} equations.}
 % \changes{v0.62}{2018/11/05}{File: \filenm{lwarp_mathjax.txt}: Removed inoperable \pkg{siunitx} extension.}
-% \changes{v0.70}{2019/03/24}{File: \filenm{lwarp_mathjax.txt}: Updated to MathJax v2.7.5.}
+% \changes{v0.70}{2019/03/24}{File: \filenm{lwarp_mathjax.txt}: Updated to \brand{MathJax} v2.7.5.}
 % \changes{v0.70}{2019/03/24}{File: \filenm{lwarp_mathjax.txt}: Loads \filenm{autoload-all.js} extension.}
-% \changes{v0.76}{2019/10/05}{File: \filenm{lwarp_mathjax.txt}: Updated to MathJax v2.7.6.}
+% \changes{v0.76}{2019/10/05}{File: \filenm{lwarp_mathjax.txt}: Updated to \brand{MathJax} v2.7.6.}
+% \changes{v0.86}{2020/05/03}{File: \filenm{lwarp_mathjax.txt}: Updated to \brand{MathJax} v3 current.}
+% \changes{v0.86}{2020/05/03}{File: \filenm{lwarp_mathjax.txt}: Improved equation numbering.}
+% \changes{v0.86}{2020/05/03}{File: \filenm{lwarp_mathjax.txt}: Added support for starred macros.}
 %
 % ^^A *lwarp_mathjax.txt
 %
@@ -18796,121 +18843,251 @@
 %    \begin{macrocode}
 \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"
-    }
-    });
+<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;
 
-    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];
+      //
+      //  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>
 
-<script type="text/x-mathjax-config">
-MathJax.Hub.Config({
-    TeX: {
-        extensions: ["autoload-all.js"] ,
-        equationNumbers: {
-            autoNumber: "AMS"
+      MathJax.startup.defaultReady();
+
+      // 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>
+      });
+      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
 
-<!-- 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">
+  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{Verbatim}% for syntax highlighting
 \end{LWRwriteconf}
 %    \end{macrocode}
 
-% ^^A A possible addition for siuntix:
-% ^^A <!-- https://github.com/burnpanck/MathJax-siunitx -->
-% ^^A 
-% ^^A <script type="text/x-mathjax-config">
-% ^^A  MathJax.Hub.Config({
-% ^^A    extensions: ["tex2jax.js","[siunitx]/siunitx.js"],
-% ^^A    jax: ["input/TeX","output/HTML-CSS"],
-% ^^A    tex2jax: {
-% ^^A         inlineMath: [["$","$"],["\\(","\\)"]] ,
-% ^^A         processClass: "tabbing|verse"
-% ^^A     },
-% ^^A    TeX: {extensions: ["AMSmath.js","AMSsymbols.js", "sinuitx.js"]}
-% ^^A  });
-% ^^A  MathJax.Ajax.config.path['siunitx']  = 'http://rawgit.com/burnpanck/MathJax-siunitx/master/';
-% ^^A  </script>
- 
- 
 
+
 % ^^A \subsection{\filenm{lwarp_KaTeX.txt}}
 
 % ^^A \DescribeFile{lwarp_KaTeX.txt}
@@ -19036,7 +19213,7 @@
 -- Copyright 2016-2020 Brian Dunn
 
 
-printversion = "v0.85"
+printversion = "v0.86"
 requiredconfversion = "2" -- also at *lwarpmk.conf
 
 function printhelp ()
@@ -23242,12 +23419,16 @@
 \LWR at simplifyname*{ }
 %    \end{macrocode}
 % Convert punctutation into hyphens:
+% \changes{v0.86}{2020/05/04}{Fix: \filenm{*}, \filenm{(}, \filenm{)}, \filenm{.} in filename.}
 %    \begin{macrocode}
+\LWR at simplifyname*{*}
+\LWR at simplifyname*{(}
+\LWR at simplifyname*{)}
+\LWR at simplifyname*{.}
 \LWR at simplifyname*{!}
 \LWR at simplifyname*{,}
 \LWR at simplifyname*{'}
 \LWR at simplifyname*{+}
-\LWR at simplifyname*{,}
 \LWR at simplifyname*{/}
 \LWR at simplifyname*{:}
 \LWR at simplifyname*{;}
@@ -23701,6 +23882,7 @@
 \LWR at customizedMathJax
 \LWR at startpars
 \end{BlockClass}
+\typeout{Done.}
 \typeout{---}
 
 \LWR at startpars
@@ -25188,8 +25370,19 @@
 % ^^A     \ifbool{mathKaTeX}{%
 % ^^A         \verbatiminput{lwarp_KaTeX.txt}%
 % ^^A     }{%
+% \changes{v0.86}{2020/05/03}{Error if missing file.}
 %    \begin{macrocode}
-        \verbatiminput{\LWR at mathjaxfilename}%
+        \IfFileExists{\LWR at mathjaxfilename}%
+            {\verbatiminput{\LWR at mathjaxfilename}}%
+            {%
+                \PackageError{lwarp}%
+                    {%
+                        \protect\MathJaxFilename\space specified the file\MessageBreak
+                        \space\space\LWR at mathjaxfilename\MessageBreak
+                        which does not exist%
+                    }%
+                    {Specify an existing file, or remove \protect\MathJaxFilename.}%
+            }%
 %    \end{macrocode}
 % ^^A     }%
 %    \begin{macrocode}
@@ -25318,16 +25511,6 @@
 \let\LWR at origcaption\caption
 %    \end{macrocode}
 %
-% Labels:
-% \cs{ltx at label} is used in \pkg{amsmath} environments and is also
-% patched by \pkg{cleveref}.
-% \gindex{label>in HTML}
-% \margintag{Label in \HTML}
-% \changes{v0.20}{2017/01/30}{Fix: math cross references.}
-%    \begin{macrocode}
-\let\LWR at origltx@label\ltx at label
-\let\ltx at label\LWR at htmlmathlabel
-%    \end{macrocode}
 % Not yet started any paragraph handling:
 %    \begin{macrocode}
 \global\boolfalse{LWR at doingapar}
@@ -31470,6 +31653,52 @@
 % \label{sec:labels}
 
 
+% \begin{macro}{\LWR at label@subcreatetag} Creates the tag from \cs{LWR at sanitized}.
+%    \begin{macrocode}
+\newcommand*{\LWR at label@subcreatetag}{%
+    \LWR at htmltag{a \LWR at print@mbox{id="\LWR at sanitized"}}%
+    \LWR at htmltag{/a}%
+}
+%    \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\LWR at label@inmathcomment}
+% \changes{v0.86}{2020/05/11}{Fix: Labels in \env{eqnarray}.}
+%    \begin{macrocode}
+\newcommand*{\LWR at label@inmathcomment}{%
+    \ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
+    {%
+%    \end{macrocode}
+% The combined \LaTeX\ \& \HTML\ label is printed in a \cs{mbox} field:%
+%    \begin{macrocode}
+        \mbox{%
+%    \end{macrocode}
+% Shift the label over to the right side of the environment to avoid
+% over-printing the math:
+%    \begin{macrocode}
+            \ifdef{\totwidth@}{\ifbool{LWR at amsmultline}{}{\hspace*{\totwidth@}}}{}%
+%    \end{macrocode}
+% Temporarily end the \HTML\ comment,
+% insert the \LaTeX{} \& \HTML\ label, then
+% resume the \HTML\ comment.
+% \cs{@firstofone} is required to remove extra braces
+%   introduced by the \pkg{amsmath} package.)
+%    \begin{macrocode}
+            \LWR at htmlclosecomment%
+            \LWR at label@subcreatetag%
+            \LWR at htmlopencomment%
+        }% mbox
+    }% mathjax
+    {%
+        \LWR at label@subcreatetag%
+    }%
+}
+%    \end{macrocode}
+% \end{macro}
+
+
+
 % \begin{macro}{\LWR at label@createtag} \marg{label} \quad
 % Creates an \HTML\ id tag.
 %
@@ -31488,29 +31717,33 @@
     {}%
     {% not lateximage
 %    \end{macrocode}
-% If not doing a lateximage, create an \HTML\ ID tag:
+% If not doing a lateximage, create an \HTML\ ID tag.
+%
 % \changes{v0.47}{2018/01/26}{Fix: Line wrap at \HTML\ hyphen.}
-% (To be factored\dots)
+% \changes{v0.86}{2020/05/11}{Fix: Labels in \env{eqnarray}.}
 %    \begin{macrocode}
         \LWR at sanitize{#1}%
-        \ifbool{LWR at doingstartpars}%
-        {% pars allowed
-            \ifbool{LWR at doingapar}%
-            {% par started
-                \LWR at htmltag{a \LWR at print@mbox{id="\LWR at sanitized"}}%
-                \LWR at htmltag{/a}%
-            }% par started
-            {% par not started
-                \LWR at stoppars%
-                \LWR at htmltag{a \LWR at print@mbox{id="\LWR at sanitized"}}%
-                \LWR at htmltag{/a}%
-                \LWR at startpars%
-            }% par not started
-        }% pars allowed
-        {% pars not allowed
-            \LWR at htmltag{a \LWR at print@mbox{id="\LWR at sanitized"}}%
-            \LWR at htmltag{/a}%
-        }% pars not allowed
+        \ifbool{LWR at insidemathcomment}%
+        {% inside HTML math comment
+            \LWR at label@inmathcomment%
+        }% inside HTML math comment
+        {% not inside HTML math comment
+            \ifbool{LWR at doingstartpars}%
+            {% pars allowed
+                \ifbool{LWR at doingapar}%
+                {% par started
+                    \LWR at label@subcreatetag%
+                }% par started
+                {% par not started
+                    \LWR at stoppars%
+                    \LWR at label@subcreatetag%
+                    \LWR at startpars%
+                }% par not started
+            }% pars allowed
+            {% pars not allowed
+                    \LWR at label@subcreatetag%
+            }% pars not allowed
+        }% not inside HTML math comment
     }% not lateximage
 }
 %    \end{macrocode}
@@ -31627,7 +31860,10 @@
     {%
         \ifthenelse{\cnttest{\LWR at lateximagedepthref{#1}}{>}{0}}%
             {%
-                \LWR at ImagesName\LWR at lateximagenumberref{#1}%
+%    \end{macrocode}
+% \changes{v0.86}{2020/05/11}{Fixed: \cs{label} inside \env{lateximage}.}
+%    \begin{macrocode}
+                lateximage-\BaseJobname-\LWR at lateximagenumberref{#1}%
             }%
             {%
                 \LWR at traceinfo{LWR at startref D3}%
@@ -31892,7 +32128,7 @@
 
 
 
-% \begin{macro}{\href} \oarg{options} \marg{URL}
+% \begin{macro}{\LWR at href} \oarg{options} \marg{URL}
 %
 % Create a link with accompanying text:
 %
@@ -31900,6 +32136,7 @@
 % \changes{v0.49}{2018/02/18}{Fix: Adapt to classes.}
 % \changes{v0.52}{2018/03/26}{Fix: \progcode{\#}, \progcode{\%}, \progcode{\&}, \progcode{\~}, \progcode{\_} in \URL.}
 % \changes{v0.57}{2018/06/05}{Fix: Text catcodes.}
+% \changes{v0.86}{2020/05/07}{\pkg{hyperref}: Adjusted emulation.}
 %    \begin{macrocode}
 \DeclareDocumentCommand{\LWR at hrefb}{O{} m}{%
     \LWR at ensuredoingapar%
@@ -31908,7 +32145,7 @@
     \LWR at subhyperreftext%
 }
 
-\newrobustcmd*{\href}{%
+\newrobustcmd*{\LWR at href}{%
     \begingroup%
     \LWR at linkcatcodes%
     \LWR at hrefb%
@@ -31916,12 +32153,13 @@
 %    \end{macrocode}
 % \end{macro}
 
-% \begin{macro}{\nolinkurl} \marg{URL}
+% \begin{macro}{\LWR at nolinkurl} \marg{URL}
 %
 % Print the name of the link without creating the link:
 % \changes{v0.43}{2017/10/31}{Made robust.}
 % \changes{v0.45}{2017/12/29}{Fix: Underscore in \URL.}
 % \changes{v0.52}{2018/03/26}{Fix: \progcode{\#}, \progcode{\%}, \progcode{\&}, \progcode{\~}, \progcode{\_} in \URL.}
+% \changes{v0.86}{2020/05/07}{\pkg{hyperref}: Adjusted emulation.}
 %    \begin{macrocode}
 \newcommand*{\LWR at nolinkurlb}[1]{%
     \LWR at ensuredoingapar%
@@ -31931,7 +32169,7 @@
     \endgroup%
 }
 
-\newrobustcmd*{\nolinkurl}{%
+\newrobustcmd*{\LWR at nolinkurl}{%
     \begingroup%
     \LWR at linkcatcodes%
     \LWR at nolinkurlb%
@@ -31940,7 +32178,7 @@
 % \end{macro}
 
 
-% \begin{macro}{\url} \marg{URL}
+% \begin{macro}{\LWR at url} \marg{URL}
 %
 % Create a link whose text name is the address of the link.
 %
@@ -31951,16 +32189,17 @@
 % \changes{v0.45}{2017/12/29}{Improved URLs with underscores.}
 % \changes{v0.49}{2018/02/18}{Fix: Adapt to classes.}
 % \changes{v0.52}{2018/03/26}{Fix: \progcode{\#}, \progcode{\%}, \progcode{\&}, \progcode{\~}, \progcode{\_} in \URL.}
+% \changes{v0.86}{2020/05/07}{\pkg{hyperref}: Adjusted emulation.}
 %    \begin{macrocode}
 \DeclareDocumentCommand{\LWR at urlb}{m}{%
     \LWR at ensuredoingapar%
     \def\LWR at templink{#1}%
     \@onelevel at sanitize\LWR at templink%
-    \href{\LWR at templink}{\LWR at templink}%
+    \LWR at href{\LWR at templink}{\LWR at templink}%
     \endgroup%
 }
 
-\newrobustcmd*{\url}{%
+\newrobustcmd*{\LWR at url}{%
     \begingroup%
     \LWR at linkcatcodes%
     \LWR at urlb%
@@ -34006,6 +34245,18 @@
 %    \end{macrocode}
 
 
+% \DescribeBoolean{LWR at insidemathcomment}
+% True while inside an \HTML\ comment which is displaying a math
+% environment.
+% Used to undo the comment for a moment while creating a \cs{label},
+% so that the label's \HTML\ tags will be seen by \HTML.
+% \changes{v0.86}{2020/05/11}{\bool{LWR at insidemathcomment}: Added.}
+%    \begin{macrocode}
+\newbool{LWR at insidemathcomment}
+\boolfalse{LWR at insidemathcomment}
+%    \end{macrocode}
+
+
 % \DescribeBoolean{LWR at xfakebold}
 % True if \pkg{xfakebold} \cs{setBold} is in use.
 % \changes{v0.67}{2019/02/17}{\pkg{xfakebold}: Added support.}
@@ -34884,7 +35135,52 @@
 %    \end{macrocode}
 %
 %
+% Determing how to set \brand{MathJax} section and equation numbers.
+% Adjusts for various kinds of \cs{theequation} to determine
+% \cs{theMathJaxsection} and \cs{theMathJaxequation}.
 %
+%    \begin{macrocode}
+\newcommand\LWR at article@theequation{\@arabic\c at equation}
+
+\newcommand\LWR at book@theequation
+  {\ifnum \c at chapter>\z@ \thechapter.\fi \@arabic\c at equation}
+
+
+\newcommand\LWR at chapter@theequation{\thechapter.\arabic{equation}}
+\newcommand\LWR at section@thequation{\thesection.\arabic{equation}}
+\newcommand\LWR at subsection@thequation{\thesubsection.\arabic{equation}}
+
+\AtBeginDocument{
+    % default per article class:
+    \newcommand*{\theMathJaxsubequations}{0}
+    \newcommand*{\theMathJaxsection}{}
+    \newcommand*{\theMathJaxequation}{\arabic{equation}}
+
+    \ifdefstrequal{\theequation}{\LWR at article@theequation}
+    {}{
+    \ifdefstrequal{\theequation}{\LWR at book@theequation}{
+        \renewcommand*{\theMathJaxsection}{\ifnum \c at chapter>\z@ \thechapter.\fi}
+    }{
+    \ifdefstrequal{\theequation}{\LWR at subsection@thequation}{
+        \renewcommand*{\theMathJaxsection}{\thesubsection{}.}
+    }{
+    \ifdefstrequal{\theequation}{\LWR at section@thequation}{
+        \renewcommand*{\theMathJaxsection}{\thesection{}.}
+    }{
+    \ifdefstrequal{\theequation}{\LWR at chapter@theequation}{
+        \renewcommand*{\theMathJaxsection}{\thechapter{}.}
+    }{% unknown format
+        \PackageWarningNoLine{lwarp}
+        {%
+            Unknown equation tag format for \protect\theequation.\MessageBreak
+            Article-style equation numbering will be used%
+        }
+    }}}}}
+}
+%    \end{macrocode}
+%
+%
+%
 % \begin{macro}{\LWR at syncmathjax} Sets the \brand{MathJax} equation format
 % and number for the following equations.
 %
@@ -34893,44 +35189,35 @@
 %    \begin{macrocode}
 \newcommand*{\LWR at syncmathjax}{%
 %    \end{macrocode}
-% If using chapters, place the chapter number in front of the equation.
-% Otherwise, use the simple equation number.
-% \changes{v0.82}{2020/03/09}{Removed \element{par} tags.}
-%    \begin{macrocode}
-    \ifcsdef{thechapter}{
-        \LWR at stoppars%
-        \InlineClass{hidden}{
-            \textbackslash(
-            \textbackslash{}seteqsection \{\thechapter\}
-            \textbackslash)
-        }
-        \LWR at startpars%
-    }
-    {}% not using chapters
-%    \end{macrocode}
-% \brand{MathJax} doesn't allow setting the equation number to 1:
-%    \begin{macrocode}
-    \ifthenelse{\cnttest{\value{equation}}>0}
-    {
-%    \end{macrocode}
-% Tell \brand{MathJax} that the next set of equations begins with the current \LaTeX{} equation
-% number, plus one.
-%    \begin{macrocode}
-        \setcounter{LWR at nextequation}{\value{equation}}
-        \addtocounter{LWR at nextequation}{1}
-%    \end{macrocode}
+%
+% Tell \brand{MathJax} that the next equation number is
+% the current \LaTeX{} equation number.
+%
+% Before each equation, \pkg{lwarp} inserts into the \HTML\ code:
+% \begin{sourceverb}
+% \seteqnumber{subequations?}{section}{number}
+% \end{sourceverb}
+% \begin{description}
+% \item [|subequations?|] is |0| usually, |1| if inside \pkg{amsmath} \env{subequations}.
+% \item [|section|] is a string printed as-is, or empty.
+% \item [|number|] is auto-incremented by \brand{MathJax} between equations.
+% \end{description}
+%
 % Place the \brand{MathJax} command inside ``\cs{(}'' and ``\cs{)}'' characters,
 % to be printed to \HTML, not interpreted by \LaTeX.
 % \changes{v0.82}{2020/03/09}{Removed \element{par} tags.}
+% \changes{v0.86}{2020/05/08}{Improved \brand{MathJax} equation numbers.}
 %    \begin{macrocode}
         \LWR at stoppars%
         \InlineClass{hidden}{
-            \textbackslash(
-            \textbackslash{}seteqnumber \{\arabic{LWR at nextequation}\}
-            \textbackslash)
+            \textbackslash(%
+            \textbackslash{}seteqnumber%
+            \{\theMathJaxsubequations\}%
+            \{\theMathJaxsection\}%
+            \{\theMathJaxequation\}%
+            \textbackslash)%
         }
         \LWR at startpars%
-    }{}% not eq > 0
 }
 %    \end{macrocode}
 % \end{macro}
@@ -34958,6 +35245,7 @@
 % restore various commands to their \LaTeX\ meanings.
 %    \begin{macrocode}
     \LWR at restoreorigformatting
+    \booltrue{LWR at insidemathcomment}
 %    \end{macrocode}
 % ^^A When a label is encountered, the \HTML\ comment is closed,
 % ^^A the label is generated in an \HTML-output context,
@@ -34977,6 +35265,7 @@
 % Close the \HTML\ comment and resume \HTML\ paragraph handling:
 %    \begin{macrocode}
     \LWR at htmlclosecomment
+    \boolfalse{LWR at insidemathcomment}
     \LWR at startpars
 }
 %    \end{macrocode}
@@ -35336,55 +35625,6 @@
 %    \end{macrocode}
 
 
-% \begin{macro}{\LWR at htmlmathlabel} \marg{label}
-% \gindex{label>math environment}
-%
-% \pkg{lwarp} points \cs{ltx at label} here.
-% This is used by \cs{label} when inside a
-% \LaTeX\ AMS math environment's math display environment.
-%
-% \cs{LWR at origltx@label} points to the \LaTeX\ original,
-% modified by \pkg{lwarp}, then by \pkg{amsmath},
-% then by \pkg{cleveref}.
-%    \begin{macrocode}
-\newcommand*{\LWR at htmlmathlabel}[1]{%
-    \LWR at traceinfo{LWR at htmlmathlabelb #1}%
-%    \end{macrocode}
-% If |mathjax| or |FormatWP|, print the \LaTeX\ expression:
-% \changes{v0.42}{2017/10/26}{If \progcode{FormatWP} print LaTeX expression.}
-%    \begin{macrocode}
-    \ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
-    {%
-%    \end{macrocode}
-% The combined \LaTeX\ \& \HTML\ label is printed in a \cs{text} field:
-%    \begin{macrocode}
-        \text{%
-%    \end{macrocode}
-% Shift the label over to the right side of the environment to avoid
-% over-printing the math:
-%    \begin{macrocode}
-        \ifbool{LWR at amsmultline}{}{\hspace*{\totwidth@}}%
-%    \end{macrocode}
-% Temporarily end the \HTML\ comment,
-% insert the \LaTeX{} \& \HTML\ label, then
-% resume the \HTML\ comment.
-% \cs{@firstofone} is required to remove extra braces
-%	introduced by the \pkg{amsmath} package.)
-%    \begin{macrocode}
-        \LWR at htmlclosecomment%
-        \LWR at origltx@label{#1}%
-        \LWR at htmlopencomment%
-        }% text
-    }% mathjax
-    {%
-        \LWR at origltx@label{#1}%
-    }%
-}
-%    \end{macrocode}
-% \end{macro}
-
-
-
 % \begin{macro}{\LWR at beginhideamsmath}
 % Starts hiding \LaTeX\ math inside an \HTML\ comment.
 %    \begin{macrocode}
@@ -35395,6 +35635,7 @@
 
     \begingroup
     \LWR at restoreorigformatting
+    \booltrue{LWR at insidemathcomment}
 }
 %    \end{macrocode}
 % \end{macro}
@@ -35406,6 +35647,7 @@
     \endgroup
 
     \LWR at htmlclosecomment
+    \boolfalse{LWR at insidemathcomment}
     \LWR at orignewline
     \LWR at startpars
 }
@@ -35422,8 +35664,8 @@
 % \changes{v0.34}{2017/07/29}{Fix: Added the \env{eqnarray} environments.}
 %
 % The \pkg{amsmath} environments already collect their contents
-% in \cs{@envbody} for further processing.  \env{eqnarray} is not an \AmS\ package,
-% and thus requires special handling.
+% in \cs{@envbody} for further processing.
+% \env{eqnarray} is not an \AmS\ package, and thus requires special handling.
 %
 % For \SVG\ math: Each envrionment is encapsulated inside a \env{lateximage} environment,
 % along with a special optional argument of \cs{LWR at amsmathbody}
@@ -39121,14 +39363,14 @@
 \begin{warpHTML}
 %    \end{macrocode}
 
-% \begin{macro}{\phantomsection}
+% \begin{macro}{\LWR at phantomsection}
 % Emulate the \pkg{hyperref} \cs{phantomsection} command,
 % often used to insert the bibliography into the table of contents.
 % Ignores \cs{ForceHTMLTOC}.
 % \changes{v0.55}{2018/04/26}{Fix: \cs{ForceHTMLTOC} with \cs{phantomsection}.}
+% \changes{v0.86}{2020/05/07}{\pkg{hyperref}: Adjusted emulation.}
 %    \begin{macrocode}
-\newcounter{LWR at phantomsection}
-\DeclareDocumentCommand{\phantomsection}{}{%
+\newrobustcmd*{\LWR at phantomsection}{%
     \begingroup%
     \boolfalse{LWR at forcinghtmltoc}%
     \section*{}%
@@ -39758,9 +40000,6 @@
             environments to force SVG output}
         \LWR at mathjaxwarn{jkmath}{}
         \LWR at mathjaxwarn{mathspec}{}
-        \LWR at mathjaxwarn{mathtools}
-            {Avoid starred macros.\MessageBreak
-            See the Lwarp manual for other limitations}
         \LWR at mathjaxwarn{multirow}
             {Multirow works as expected in text mode, but\MessageBreak
             limited emulation is provided for MathJax math.\MessageBreak
@@ -39770,8 +40009,8 @@
             {Enclose its uses inside lateximage environments\MessageBreak
             to force SVG output}
         \LWR at 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 at mathjaxwarn{unicode-math}
@@ -40246,7 +40485,7 @@
 %
 %    \begin{macrocode}
 \newcommand{\alt}[1]{\ThisAltText{#1}}
-\newcommand{\newhref}[3]{\ThisAltText{#2}\href{#1}{#3}}%
+\newcommand{\newhref}[3]{\ThisAltText{#2}\LWR at href{#1}{#3}}%
 \providecommand{\thead}[1]{\textbf{#1}}
 %    \end{macrocode}
 %
@@ -41223,7 +41462,7 @@
         {\LWR at amsmathenv@@after}
 %    \end{macrocode}
 % Clear the single-use \attribute{alt} text:
-% \changes{v0.74}{2019/08/20}{Add \cs{ThisAltText}.}
+% \changes{v0.74}{2019/08/20}{\pkg{amsmath}: Add \cs{ThisAltText}.}
 %    \begin{macrocode}
         \gdef\LWR at ThisAltText{}%
     }{}
@@ -41306,7 +41545,7 @@
 
 
 % \begin{environment}{alignat}
-% \changes{v0.51}{2018/03/11}{Fix: Added.}
+% \changes{v0.51}{2018/03/11}{\pkg{amsmath}: Fix: Added.}
 %    \begin{macrocode}
 \BeforeBeginEnvironment{alignat}{\LWR at amsmathenv@before{alignat}}
 
@@ -41324,6 +41563,16 @@
 % \end{environment}
 %
 %
+% \changes{v0.86}{2020/05/08}{\pkg{amsmath}: Added support for \brand{MathJax}.}
+%    \begin{macrocode}
+\AtBeginEnvironment{subequations}{
+    \renewcommand*{\theMathJaxsubequations}{1}
+    \renewcommand*{\theMathJaxsection}{\theparentequation}
+    \renewcommand*{\theMathJaxequation}{\arabic{equation}}
+}
+%    \end{macrocode}
+%
+%
 % For \brand{MathJax}:
 % \changes{v0.79}{2020/01/27}{\pkg{amsmath}: Added \brand{MathJax} emulation.}
 % \changes{v0.82}{2020/03/14}{\pkg{amsmath}: Fixed: \cs{intertext} for \brand{MathJax}.}
@@ -42239,7 +42488,7 @@
 % A file annotation becomes a reference:
 %    \begin{macrocode}
 \DeclareRobustCommand{\atfi at insert@file at annot}[1]{%
-    \href{#1}{\LWR at attachfile@appearance}%
+    \LWR at href{#1}{\LWR at attachfile@appearance}%
 }
 %    \end{macrocode}
 
@@ -42337,7 +42586,7 @@
 % A file annotation becomes a reference:
 %    \begin{macrocode}
 \DeclareRobustCommand{\atfi at insert@file at annot}[1]{%
-    \href{#1}{\LWR at attachfile@appearance}%
+    \LWR at href{#1}{\LWR at attachfile@appearance}%
 }
 %    \end{macrocode}
 %
@@ -44043,7 +44292,7 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-\LetLtxMacro\burl\url
+\LetLtxMacro\burl\LWR at url
 
 \NewDocumentCommand{\LWR at burlaltb}{O{} +m m}{%
     \LWR at ensuredoingapar%
@@ -48449,7 +48698,7 @@
         \textcolor{red}{%
             #1 is only a provisional stub\\\Large
             the Office document
-            \ifx\ed at stubURI\@empty{#2}\else\href{\ed at stubURI}{#2}\fi\
+            \ifx\ed at stubURI\@empty{#2}\else\LWR at href{\ed at stubURI}{#2}\fi\
             contains more text\\which will be merged for the final document%
         }%
     \end{center}%
@@ -48509,7 +48758,7 @@
 % \credits{Clemens Niederberger}
 %
 % \DescribePackage{embrac}
-% \pkg{embrac} is nullfied for \HTML\, and used as-is for print.
+% \pkg{embrac} is patched for \HTML\, and used as-is for print.
 %
 % \changes{v0.65}{2018/12/10}{\pkg{embrac}: Added.}
 %
@@ -53246,7 +53495,7 @@
 %    \begin{macrocode}
 \renewcommand*{\@p at glossarysection}[2]{%
   \glsclearpage
-  \phantomsection
+  \LWR at phantomsection
   \ifdefempty\@@glossarysecstar
   {%
     \csname\@@glossarysec\endcsname{#2}%
@@ -53945,7 +54194,7 @@
 % alt tag, style, and class:
 %    \begin{macrocode}
     \LWR at traceinfo{LWR at includegraphicsb: about to create href}%
-    \href{\LWR at parsedfilename}%
+    \LWR at href{\LWR at parsedfilename}%
     {% start of href
         \LWR at traceinfo{LWR at includegraphicsb: about to LWR at htmltag}%
         \LWR at htmltag{\LWR at ig@htmltag}%
@@ -54722,7 +54971,7 @@
 
 % \section{hyperref}
 %
-% \credits{Sebastian Rahtz, Heiko Oberdiek}
+% \credits{Sebastian Rahtz, Heiko Oberdiek, The \LaTeX3 Project}
 %
 % \DescribePackage{hyperref}
 % \pkg{hyperref} is emulated.
@@ -54741,6 +54990,7 @@
 
 \DeclareOption*{}
 %    \end{macrocode}
+%
 % \changes{v0.68}{2019/02/28}{\pkg{hyperref}: Fix for options with braces.}
 %    \begin{macrocode}
 % \ProcessOptions\relax
@@ -54749,7 +54999,16 @@
 \@process at ptions\relax%  from the original \ProcessOptions
 %    \end{macrocode}
 
+% \changes{v0.86}{2020/05/07}{\pkg{hyperref}: Adjusted emulation.}
 %    \begin{macrocode}
+\LetLtxMacro\href\LWR at href
+\LetLtxMacro\nolinkurl\LWR at nolinkurl
+\LetLtxMacro\url\LWR at url
+\LetLtxMacro\phantomsection\LWR at phantomsection
+%    \end{macrocode}
+
+
+%    \begin{macrocode}
 \newcommand*{\hypersetup}[1]{}
 \newcommand*{\hyperbaseurl}[1]{}
 %    \end{macrocode}
@@ -55786,7 +56045,7 @@
 %
 %    \begin{macrocode}
 \NewDocumentCommand{\attachandlink}{o m o m m}{%
-    \href{#2}{#5}%
+    \LWR at href{#2}{#5}%
 }
 %    \end{macrocode}
 %
@@ -55819,8 +56078,10 @@
 \LWR at ProvidesPackagePass{karnaugh-map}[2017/02/20]
 %    \end{macrocode}
 %
-% (It is hard to patch this macro, so the entire thing is redefined here,
-%   with the \pkg{lwarp} modifications identified in comments.)
+% This patch is needed only because \pkg{lwarp} changes the definition of \cs{\&},
+% and the original uses \cs{ifnum} to compare |0| with \cs{\&}.
+% It is hard to patch this environment, so the entire thing is redefined here,
+%   with the \pkg{lwarp} modifications identified in comments.
 %
 %    \begin{macrocode}
 \RenewDocumentEnvironment{karnaugh-map}{s O{4} O{4} O{1} O{$X_1X_0$} O{$X_3X_2$} O{$X_5X_4$}} {%
@@ -58000,7 +58261,7 @@
 \let\LWRTODONOTES at orig@todototoc\todototoc
 
 \renewcommand*{\todototoc}{%
-\phantomsection%
+\LWR at phantomsection%
 \LWRTODONOTES at orig@todototoc%
 }
 
@@ -58926,40 +59187,106 @@
     \def\LWRAboxed#1&#2&#3!|!{\fbox{\(#1\)}&\fbox{\(#2\)}}
     \newcommand{\Aboxed}[1]{\LWRAboxed#1&&!|!}
 }
-
+%    \end{macrocode}
+%
+% \changes{v0.86}{2020/05/09}{\pkg{mathtools}: Added \cs{ArrowBetweenLines*}.}
+%    \begin{macrocode}
 \CustomizeMathJax{
-    \newcommand{\ArrowBetweenLines}[1][\Updownarrow]{#1}%   no starred
+    \newcommand{\LWRABLines}[1][\Updownarrow]{#1 \notag \\}% star/nostar the same
+    \DeclareIfstar{\ArrowBetweenLines}{\LWRABLines}{\LWRABLines}
 }
 %    \end{macrocode}
 %
 % \changes{v0.85}{2020/05/01}{\pkg{mathtools}: Fixed: \cs{shortintertext}.}
+% \changes{v0.86}{2020/05/09}{\pkg{mathtools}: Added starred delimited macros.}
 %    \begin{macrocode}
 \CustomizeMathJax{\newcommand{\shortintertext}[1]{\text{#1}\notag \\}}
 
 \CustomizeMathJax{\newcommand{\vdotswithin}[1]{\hspace{.5em}\vdots}}
-\CustomizeMathJax{\newcommand{\shortvdotswithin}[1]{ & \hspace{.5em}\vdots \\}}
+%    \end{macrocode}
+%
+% \changes{v0.86}{2020/05/09}{\pkg{mathtools}: Added \cs{shortvdotswithin*}.}
+%    \begin{macrocode}
+\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}{\\}}
 
-% The following does not create a starred version of the macro:
 \LetLtxMacro\LWR at mathtools@orig at DeclarePairedDelimiter\DeclarePairedDelimiter
 \renewcommand{\DeclarePairedDelimiter}[3]{
     \LWR at mathtools@orig at DeclarePairedDelimiter{#1}{#2}{#3}
-    \CustomizeMathJax{\newcommand{#1}[2][]{{##1#2##2##1#3}}}
+% starred:
+    \appto\LWR at customizedMathJax{\LWRbackslash(}
+    \appto\LWR at customizedMathJax{%
+        \LWRbackslash{}newcommand\{\LWRbackslash\macrotocsname{#1}LWRsubstar\}%
+    }%
+    \appto\LWR at customizedMathJax{[2][]}%
+    \appto\LWR at customizedMathJax{\{\{}%
+    \LWR at subcustomizedmathjax{##1\left#2##2##1\right#3}%
+    \appto\LWR at customizedMathJax{\}\}}%
+    \appto\LWR at customizedMathJax{\LWRbackslash)\par}%
+% not starred:
+    \appto\LWR at customizedMathJax{\LWRbackslash(}
+    \appto\LWR at customizedMathJax{%
+        \LWRbackslash{}newcommand\{\LWRbackslash\macrotocsname{#1}LWRsubnostar\}%
+    }%
+    \appto\LWR at customizedMathJax{[2][]}%
+    \appto\LWR at customizedMathJax{\{\{}%
+    \LWR at subcustomizedmathjax{##1#2##2##1#3}%
+    \appto\LWR at customizedMathJax{\}\}}%
+    \appto\LWR at customizedMathJax{\LWRbackslash)\par}%
+% user macro:
+    \appto\LWR at customizedMathJax{\LWRbackslash(}
+    \appto\LWR at customizedMathJax{%
+        \LWRbackslash{}DeclareIfstar\{\LWRbackslash{}\macrotocsname{#1}\}%
+        \{\LWRbackslash{}\macrotocsname{#1}LWRsubstar\}%
+        \{\LWRbackslash{}\macrotocsname{#1}LWRsubnostar\}%
+    }%
+    \appto\LWR at customizedMathJax{\LWRbackslash)\par}%
 }
 \@onlypreamble\DeclareParedDelimiter
 
 % (DeclarePairedDelimiterX is already defined to use \DeclarePairedDelimiterXPP.)
 
-% The following does not create a starred version of the macro.
 \LetLtxMacro\LWR at mathtools@orig at DeclarePairedDelimiterXPP\DeclarePairedDelimiterXPP
 \DeclareDocumentCommand{\DeclarePairedDelimiterXPP}{m O{1} m m m m m}{
     \LWR at mathtools@orig at DeclarePairedDelimiterXPP{#1}[#2]{#3}{#4}{#5}{#6}{#7}
+% subsubstar, second opt arg
     \appto\LWR at customizedMathJax{\LWRbackslash(}%
     \appto\LWR at customizedMathJax{%
-        \LWRbackslash{}newcommand\{\LWRbackslash\macrotocsname{#1}LWRsub\}%
+        \LWRbackslash{}newcommand\{\LWRbackslash\macrotocsname{#1}LWRsubsubstar\}%
     }%
     \appto\LWR at customizedMathJax{[#2]}%
+    \appto\LWR at customizedMathJax{\{\{\LWRbackslash{}left}%
+    \LWR at subcustomizedmathjax{#3#4#7}%
+    \appto\LWR at customizedMathJax{\LWRbackslash{}right}%
+    \LWR at subcustomizedmathjax{#5#6}%
+    \appto\LWR at customizedMathJax{\}\}}%
+    \appto\LWR at customizedMathJax{\LWRbackslash)\par}%
+% substar, first opt arg
+    \appto\LWR at customizedMathJax{\LWRbackslash(}%
+    \appto\LWR at customizedMathJax{%
+        \LWRbackslash{}newcommand\{\LWRbackslash\macrotocsname{#1}LWRsubstar\}[1][]%
+    }%
+    \appto\LWR at customizedMathJax{%
+        \{
+        \LWRbackslash{}def\LWRbackslash{}delimsize\{\#1\}
+        \LWRbackslash\macrotocsname{#1}LWRsubsubstar
+        \}%
+    }%
+    \appto\LWR at customizedMathJax{\LWRbackslash)\par}%
+% subsubnostar, second opt arg
+    \appto\LWR at customizedMathJax{\LWRbackslash(}%
+    \appto\LWR at customizedMathJax{%
+        \LWRbackslash{}newcommand\{\LWRbackslash\macrotocsname{#1}LWRsubsubnostar\}%
+    }%
+    \appto\LWR at customizedMathJax{[#2]}%
     \appto\LWR at customizedMathJax{\{\{\LWRbackslash{}delimsize}%
     \LWR at subcustomizedmathjax{#3#4#7}%
     \appto\LWR at customizedMathJax{\LWRbackslash{}delimsize}%
@@ -58966,17 +59293,26 @@
     \LWR at subcustomizedmathjax{#5#6}%
     \appto\LWR at customizedMathJax{\}\}}%
     \appto\LWR at customizedMathJax{\LWRbackslash)\par}%
+% subnostar, first opt arg
     \appto\LWR at customizedMathJax{\LWRbackslash(}%
     \appto\LWR at customizedMathJax{%
-        \LWRbackslash{}newcommand\{\LWRbackslash\macrotocsname{#1}\}[1][]%
+        \LWRbackslash{}newcommand\{\LWRbackslash\macrotocsname{#1}LWRsubnostar\}[1][]%
     }%
     \appto\LWR at customizedMathJax{%
         \{
         \LWRbackslash{}def\LWRbackslash{}delimsize\{\#1\}
-        \LWRbackslash\macrotocsname{#1}LWRsub
+        \LWRbackslash\macrotocsname{#1}LWRsubsubnostar
         \}%
     }%
     \appto\LWR at customizedMathJax{\LWRbackslash)\par}%
+% user macro:
+    \appto\LWR at customizedMathJax{\LWRbackslash(}
+    \appto\LWR at customizedMathJax{%
+        \LWRbackslash{}DeclareIfstar\{\LWRbackslash{}\macrotocsname{#1}\}%
+        \{\LWRbackslash{}\macrotocsname{#1}LWRsubstar\}%
+        \{\LWRbackslash{}\macrotocsname{#1}LWRsubnostar\}%
+    }%
+    \appto\LWR at customizedMathJax{\LWRbackslash)\par}%
 }
 \@onlypreamble\DeclareParedDelimiterXPP
 \@onlypreamble\DeclareParedDelimiterX
@@ -61832,16 +62168,21 @@
 \begin{warpMathJax}
 %    \end{macrocode}
 %
-% \changes{v0.85}{2020/05/01}{\pkg{mathtools}: Fixed: \cs{shortintertext}.}
 %    \begin{macrocode}
 \CustomizeMathJax{\renewcommand{\intertext}[2][]{\text{#2}\notag \\}}
-%    \end{macrocode}
-%    \begin{macrocode}
 \CustomizeMathJax{\newenvironment{fleqn}[1][]{}{}}
 \CustomizeMathJax{\newenvironment{ceqn}{}{}}
 \CustomizeMathJax{\newenvironment{darray}[2][c]{\begin{array}[#1]{#2}}{\end{array}}}
 \CustomizeMathJax{\newcommand{\dmulticolumn}[3]{#3}}
-\CustomizeMathJax{\newcommand{\nr}{\\[.5ex]}}
+%    \end{macrocode}
+%
+% As of v0.86, \brand{MathJax} v3 does not offer \cs{\textbackslash*}, so
+% the unstarred version is used here.
+% \changes{v0.86}{2020/05/10}{\pkg{nccmath}: Fixed \cs{nr}, added starred.}
+%    \begin{macrocode}
+\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}}
@@ -61851,6 +62192,16 @@
 \CustomizeMathJax{\newcommand{\mfrac}[2]{\frac{#1}{#2}}}
 \CustomizeMathJax{\newcommand{\mbinom}[2]{\binom{#1}{#2}}}
 \CustomizeMathJax{\newenvironment{mmatrix}{\begin{matrix}}{\end{matrix}}}
+%    \end{macrocode}
+%
+% \changes{v0.86}{2020/05/10}{\pkg{nccmath}: Added \cs{displaybreak}.}
+%    \begin{macrocode}
+\CustomizeMathJax{\newcommand{\displaybreak}[1][]{}}
+%    \end{macrocode}
+%
+% \cs{eq}, \cs{eqs}, \cs{eqalign} are created by \LaTeX, not \brand{MathJax}.
+%
+%    \begin{macrocode}
 \end{warpMathJax}
 %    \end{macrocode}
 %
@@ -64089,8 +64440,6 @@
 \end{warpMathJax}
 %    \end{macrocode}
 %
-%
-%
 % \iffalse
 %</parnotes>
 % \fi
@@ -65013,6 +65362,7 @@
 % \limitsphysics
 %
 % \changes{v0.79}{2020/01/29}{\pkg{physics}: Added.}
+% \changes{v0.86}{2020/05/09}{\pkg{physics}: Added starred macros.}
 %
 % \codehtml
 %
@@ -65032,46 +65382,86 @@
 \CustomizeMathJax{\newcommand{\vqty}[1]{\left\vert#1\right\rvert}}
 \CustomizeMathJax{\newcommand{\Bqty}[1]{\left\lbrace#1\right\rbrace}}
 
-% doesn't work with \big, etc., no star
-\CustomizeMathJax{\newcommand{\absolutevalue}[1]{\left\lvert#1\right\rvert}}
+% doesn't work with \big, etc.
+\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}
 
-% doesn't work with \big, etc., no star
-\CustomizeMathJax{\newcommand{\norm}[1]{%
-    \left\lvert\left\lvert#1\right\rvert\right\rvert}%
+% doesn't work with \big, etc.
+\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}%
+}
 
-% doesn't work with \big, etc., no star, no paren or bracket
-\CustomizeMathJax{\newcommand{\evaluated}[1]{#1\vert}}
+% doesn't work with \big, etc., no paren or bracket
+\CustomizeMathJax{\newcommand{\LWRevaluatednostar}[1]{\left . #1\right\vert}}
+\CustomizeMathJax{\newcommand{\LWRevaluatedstar}[1]{#1\vert}}
+\CustomizeMathJax{%
+    \DeclareIfstar{\evaluated}{\LWRevaluatedstar}{\LWRevaluatednostar}%
+}
+
 \CustomizeMathJax{\let\eval\evaluated}
 
-% no \Big, star
-\CustomizeMathJax{\newcommand{\order}[1]{\mathcal{O}\left(#1\right)}}
+% no \Big
+\CustomizeMathJax{\newcommand{\LWRordernostar}[1]{\mathcal{O}\left(#1\right)}}
+\CustomizeMathJax{\newcommand{\LWRorderstar}[1]{\mathcal{O}(#1)}}
+\CustomizeMathJax{%
+    \DeclareIfstar{\order}{\LWRorderstar}{\LWRordernostar}%
+}
 
-% no \Big, star
-\CustomizeMathJax{\newcommand{\commutator}[2]{\left\lbrack#1,#2\right\rbrack}}
+% no \Big
+\CustomizeMathJax{\newcommand{\LWRcommutatornostar}[2]{\left\lbrack#1,#2\right\rbrack}}
+\CustomizeMathJax{\newcommand{\LWRcommutatorstar}[2]{\lbrack#1,#2\rbrack}}
+\CustomizeMathJax{%
+    \DeclareIfstar{\commutator}{\LWRcommutatorstar}{\LWRcommutatornostar}%
+}
+
 \CustomizeMathJax{\let\comm\commutator}
 
-% no \Big, star
-\CustomizeMathJax{\newcommand{\anticommutator}[2]{%
+% no \Big
+\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}
 
-% no \Big, star
+% no \Big
 \CustomizeMathJax{\let\poissonbracket\anticommutator}
 \CustomizeMathJax{\let\pb\anticommutator}
 
-% no star
-\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}
 
-% no star
-\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}
 
 % no star
-\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}}
@@ -65171,89 +65561,229 @@
 \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}}
 
+% \LWR at physics@qtext{\name}{text}
+\newcommand*{\LWR at physics@qtext}[2]{%
+% nostar:
+    \appto\LWR at customizedMathJax{\LWRbackslash(}
+    \appto\LWR at customizedMathJax{%
+        \LWRbackslash{}newcommand\{\LWRbackslash{}LWR\macrotocsname{#1}subnostar\}%
+    }%
+    \appto\LWR at customizedMathJax{\{}%
+    \appto\LWR at customizedMathJax{%
+        \LWRbackslash{}quad\LWRbackslash{}text\{#2\}\LWRbackslash{}quad%
+    }%
+    \appto\LWR at customizedMathJax{\}}%
+    \appto\LWR at customizedMathJax{\LWRbackslash)\par}%
+% star:
+    \appto\LWR at customizedMathJax{\LWRbackslash(}
+    \appto\LWR at customizedMathJax{%
+        \LWRbackslash{}newcommand\{\LWRbackslash{}LWR\macrotocsname{#1}substar\}%
+    }%
+    \appto\LWR at customizedMathJax{\{}%
+    \appto\LWR at customizedMathJax{\LWRbackslash{}text\{#2\}\LWRbackslash{}quad}%
+    \appto\LWR at customizedMathJax{\}}%
+    \appto\LWR at customizedMathJax{\LWRbackslash)\par}%
+% user macro:
+    \appto\LWR at customizedMathJax{\LWRbackslash(}
+    \appto\LWR at customizedMathJax{%
+        \LWRbackslash{}DeclareIfstar\{\LWRbackslash\macrotocsname{#1}\}%
+    }%
+    \appto\LWR at customizedMathJax{\{}%
+    \appto\LWR at customizedMathJax{\LWRbackslash{}LWR\macrotocsname{#1}substar\}}%
+    \appto\LWR at customizedMathJax{\LWRbackslash{}LWR\macrotocsname{#1}subnostar\}}%
+    \appto\LWR at customizedMathJax{\LWRbackslash)\par}%
+}
+
+\LWR at physics@qtext{\qcc}{c.c.}
+\LWR at physics@qtext{\qif}{if}
+\LWR at physics@qtext{\qthen}{then}
+\LWR at physics@qtext{\qelse}{else}
+\LWR at physics@qtext{\qotherwise}{otherwise}
+\LWR at physics@qtext{\qunless}{unless}
+\LWR at physics@qtext{\qgiven}{given}
+\LWR at physics@qtext{\qusing}{using}
+\LWR at physics@qtext{\qassume}{assume}
+\LWR at physics@qtext{\qsince}{since}
+\LWR at physics@qtext{\qlet}{let}
+\LWR at physics@qtext{\qfor}{for}
+\LWR at physics@qtext{\qall}{all}
+\LWR at physics@qtext{\qeven}{even}
+\LWR at physics@qtext{\qodd}{odd}
+\LWR at physics@qtext{\qinteger}{integer}
+\LWR at physics@qtext{\qand}{and}
+\LWR at physics@qtext{\qor}{or}
+\LWR at physics@qtext{\qas}{as}
+\LWR at 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}
 
 % Must provide two mandatory args.
 % For the example in the manual with (E-TS), enclose the parens in braces
-\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}
 
 
 % use \braket to contract
-\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{\LWRketnostar}[1]{\left\lvert{#1}\right\rangle}}
+\CustomizeMathJax{\newcommand{\LWRketstar}[1]{\lvert{#1}\rangle}}
+\CustomizeMathJax{\DeclareIfstar{\ket}{\LWRketstar}{\LWRketnostar}}
+
 % must have two args
-\CustomizeMathJax{\newcommand{\innerproduct}[2]{%
+\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}
 
+
 % must have two args
-\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}
 
+
 % must have two args, unlike the MathJax version
-\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}%
@@ -65285,7 +65815,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\})}}
@@ -74471,7 +75002,7 @@
 \let\LWRTODONOTES at orig@todototoc\todototoc
 
 \renewcommand*{\todototoc}{%
-\phantomsection%
+\LWR at phantomsection%
 \LWRTODONOTES at orig@todototoc%
 }
 
@@ -75505,7 +76036,7 @@
 % \codehtml
 %
 %    \begin{macrocode}
-\LetLtxMacro\LWR at url@orig at url\url
+\LetLtxMacro\LWR at url@orig at url\LWR at url
 
 \LWR at ProvidesPackagePass{url}[2013/09/16]
 %    \end{macrocode}
@@ -76718,9 +77249,11 @@
 %
 % \changes{v0.57}{2018/06/02}{\pkg{xcolor}: New system for switching print and \HTML\ outputs.}
 % \changes{v0.81}{2020/02/28}{\pkg{xcolor}: \cs{textcolor}: Spurrious space.}
+% \changes{v0.86}{2020/05/12}{\pkg{xcolor}: \cs{textcolor}: Fixed for \pkg{babel-french}.}
 %    \begin{macrocode}
 \NewDocumentCommand{\LWR at HTML@textcolor}{o m m}{%
 \begingroup%
+\LWR at FBcancel%
 \IfValueTF{#1}{%
     \color[#1]{#2}%
 }{%
@@ -80231,7 +80764,7 @@
 % \changes{v0.78}{2019/11/07}{\pkg{lwarp-common-multimedia}: Fix links with new LaTeX kernel.}
 %    \begin{macrocode}
     \LWR at startpars
-    \href{\LWR at parsedfilename}{#1}
+    \LWR at href{\LWR at parsedfilename}{#1}
     \LWR at stoppars
 %    \end{macrocode}
 % Finish.
@@ -80289,7 +80822,7 @@
 % The poster text inside paragraph tags, along with a reference to the \URL.
 %    \begin{macrocode}
     \LWR at startpars
-    \href{#2}{#1}
+    \LWR at href{#2}{#1}
     \LWR at stoppars
 %    \end{macrocode}
 % Finish.
@@ -80404,7 +80937,7 @@
 %    \end{macrocode}
 % If unknown, create a link to it.
 %    \begin{macrocode}
-        \href{#3}{#2}% unknown format
+        \LWR at href{#3}{#2}% unknown format
     }}}}}}}}%
 %    \end{macrocode}
 % Paragraph handling:

Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-accessibility.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-accessibility.sty	2020-05-12 21:21:35 UTC (rev 55121)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-accessibility.sty	2020-05-12 21:22:49 UTC (rev 55122)
@@ -17,7 +17,7 @@
 %% version 2005/12/01 or later.
 \LWR at ProvidesPackageDrop{accessibility}[2019/10/14]
 \newcommand{\alt}[1]{\ThisAltText{#1}}
-\newcommand{\newhref}[3]{\ThisAltText{#2}\href{#1}{#3}}%
+\newcommand{\newhref}[3]{\ThisAltText{#2}\LWR at href{#1}{#3}}%
 \providecommand{\thead}[1]{\textbf{#1}}
 \begin{warpMathJax}
 \CustomizeMathJax{\newcommand{\alt}[1]{}}

Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-amsmath.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-amsmath.sty	2020-05-12 21:21:35 UTC (rev 55121)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-amsmath.sty	2020-05-12 21:22:49 UTC (rev 55122)
@@ -125,6 +125,11 @@
 \BeforeBeginEnvironment{alignat*}{\LWR at amsmathenv@before*{alignat*}}
 
 \AfterEndEnvironment{alignat*}{\LWR at 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}

Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-attachfile.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-attachfile.sty	2020-05-12 21:21:35 UTC (rev 55121)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-attachfile.sty	2020-05-12 21:22:49 UTC (rev 55122)
@@ -47,7 +47,7 @@
     \def\LWR at attachfile@appearance{#1}%
 }
 \DeclareRobustCommand{\atfi at insert@file at annot}[1]{%
-    \href{#1}{\LWR at attachfile@appearance}%
+    \LWR at href{#1}{\LWR at attachfile@appearance}%
 }
 
 \endinput

Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-attachfile2.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-attachfile2.sty	2020-05-12 21:21:35 UTC (rev 55121)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-attachfile2.sty	2020-05-12 21:22:49 UTC (rev 55122)
@@ -59,7 +59,7 @@
     \def\LWR at attachfile@appearance{#1}%
 }
 \DeclareRobustCommand{\atfi at insert@file at annot}[1]{%
-    \href{#1}{\LWR at attachfile@appearance}%
+    \LWR at href{#1}{\LWR at attachfile@appearance}%
 }
 \DeclareRobustCommand{\notextattachfile}[2][]{%
   \begingroup

Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-breakurl.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-breakurl.sty	2020-05-12 21:21:35 UTC (rev 55121)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-breakurl.sty	2020-05-12 21:22:49 UTC (rev 55122)
@@ -16,7 +16,7 @@
 %% and version 1.3 or later is part of all distributions of LaTeX
 %% version 2005/12/01 or later.
 \LWR at ProvidesPackageDrop{breakurl}[2013/04/10]
-\LetLtxMacro\burl\url
+\LetLtxMacro\burl\LWR at url
 
 \NewDocumentCommand{\LWR at burlaltb}{O{} +m m}{%
     \LWR at ensuredoingapar%

Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-common-multimedia.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-common-multimedia.sty	2020-05-12 21:21:35 UTC (rev 55121)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-common-multimedia.sty	2020-05-12 21:22:49 UTC (rev 55122)
@@ -67,7 +67,7 @@
         \LWR at parsedfilename\unskip\textquotedbl\ % space
         type=\textquotedbl{}#4\textquotedbl}
     \LWR at startpars
-    \href{\LWR at parsedfilename}{#1}
+    \LWR at href{\LWR at parsedfilename}{#1}
     \LWR at stoppars
     \LWR at htmltag{/#3}\LWR at orignewline
     \end{BlockClass}
@@ -96,7 +96,7 @@
         src=\textquotedbl#2\textquotedbl\ % space
         type=\textquotedbl#4\textquotedbl}
     \LWR at startpars
-    \href{#2}{#1}
+    \LWR at href{#2}{#1}
     \LWR at stoppars
     \LWR at htmltag{/#3}\LWR at orignewline
     \end{BlockClass}
@@ -149,7 +149,7 @@
     \IfBeginWith{#3}{HTTP}{\LWR at multimedia@embed{#2}{#3}{}}{%
     \IfBeginWith{#3}{ftp}{\LWR at multimedia@embed{#2}{#3}{}}{%
     \IfBeginWith{#3}{FTP}{\LWR at multimedia@embed{#2}{#3}{}}{%
-        \href{#3}{#2}% unknown format
+        \LWR at href{#3}{#2}% unknown format
     }}}}}}}}%
     \LWR at startpars%
     \endgroup%

Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-ed.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-ed.sty	2020-05-12 21:21:35 UTC (rev 55121)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-ed.sty	2020-05-12 21:22:49 UTC (rev 55122)
@@ -26,7 +26,7 @@
         \textcolor{red}{%
             #1 is only a provisional stub\\\Large
             the Office document
-            \ifx\ed at stubURI\@empty{#2}\else\href{\ed at stubURI}{#2}\fi\
+            \ifx\ed at stubURI\@empty{#2}\else\LWR at href{\ed at stubURI}{#2}\fi\
             contains more text\\which will be merged for the final document%
         }%
     \end{center}%

Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-glossaries.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-glossaries.sty	2020-05-12 21:21:35 UTC (rev 55121)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-glossaries.sty	2020-05-12 21:22:49 UTC (rev 55122)
@@ -24,7 +24,7 @@
 \setglossarystyle{index}
 \renewcommand*{\@p at glossarysection}[2]{%
   \glsclearpage
-  \phantomsection
+  \LWR at phantomsection
   \ifdefempty\@@glossarysecstar
   {%
     \csname\@@glossarysec\endcsname{#2}%

Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty	2020-05-12 21:21:35 UTC (rev 55121)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty	2020-05-12 21:22:49 UTC (rev 55122)
@@ -338,7 +338,7 @@
     \LWR at traceinfo{LWR at parsedfilename is \LWR at parsedfilename}%
     \LWR at ig@wpimagesizes{#1}{#2}{#3}{#4}%
     \LWR at traceinfo{LWR at includegraphicsb: about to create href}%
-    \href{\LWR at parsedfilename}%
+    \LWR at href{\LWR at parsedfilename}%
     {% start of href
         \LWR at traceinfo{LWR at includegraphicsb: about to LWR at htmltag}%
         \LWR at htmltag{\LWR at ig@htmltag}%

Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty	2020-05-12 21:21:35 UTC (rev 55121)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-hyperref.sty	2020-05-12 21:22:49 UTC (rev 55122)
@@ -29,6 +29,11 @@
 \edef\@curroptions{}%    lwarp modification to \ProcessOptions
 \@process at ptions\relax%  from the original \ProcessOptions
 
+\LetLtxMacro\href\LWR at href
+\LetLtxMacro\nolinkurl\LWR at nolinkurl
+\LetLtxMacro\url\LWR at url
+\LetLtxMacro\phantomsection\LWR at phantomsection
+
 \newcommand*{\hypersetup}[1]{}
 \newcommand*{\hyperbaseurl}[1]{}
 

Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-intopdf.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-intopdf.sty	2020-05-12 21:21:35 UTC (rev 55121)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-intopdf.sty	2020-05-12 21:22:49 UTC (rev 55122)
@@ -17,7 +17,7 @@
 %% version 2005/12/01 or later.
 \LWR at ProvidesPackageDrop{intopdf}[2019/05/28]
 \NewDocumentCommand{\attachandlink}{o m o m m}{%
-    \href{#2}{#5}%
+    \LWR at href{#2}{#5}%
 }
 \endinput
 %%

Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-luatodonotes.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-luatodonotes.sty	2020-05-12 21:21:35 UTC (rev 55121)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-luatodonotes.sty	2020-05-12 21:22:49 UTC (rev 55122)
@@ -26,7 +26,7 @@
 \let\LWRTODONOTES at orig@todototoc\todototoc
 
 \renewcommand*{\todototoc}{%
-\phantomsection%
+\LWR at phantomsection%
 \LWRTODONOTES at orig@todototoc%
 }
 

Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-mathtools.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-mathtools.sty	2020-05-12 21:21:35 UTC (rev 55121)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-mathtools.sty	2020-05-12 21:22:49 UTC (rev 55122)
@@ -118,14 +118,21 @@
     \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}{\\}}
 
@@ -132,7 +139,31 @@
 \LetLtxMacro\LWR at mathtools@orig at DeclarePairedDelimiter\DeclarePairedDelimiter
 \renewcommand{\DeclarePairedDelimiter}[3]{
     \LWR at mathtools@orig at DeclarePairedDelimiter{#1}{#2}{#3}
-    \CustomizeMathJax{\newcommand{#1}[2][]{{##1#2##2##1#3}}}
+    \appto\LWR at customizedMathJax{\LWRbackslash(}
+    \appto\LWR at customizedMathJax{%
+        \LWRbackslash{}newcommand\{\LWRbackslash\macrotocsname{#1}LWRsubstar\}%
+    }%
+    \appto\LWR at customizedMathJax{[2][]}%
+    \appto\LWR at customizedMathJax{\{\{}%
+    \LWR at subcustomizedmathjax{##1\left#2##2##1\right#3}%
+    \appto\LWR at customizedMathJax{\}\}}%
+    \appto\LWR at customizedMathJax{\LWRbackslash)\par}%
+    \appto\LWR at customizedMathJax{\LWRbackslash(}
+    \appto\LWR at customizedMathJax{%
+        \LWRbackslash{}newcommand\{\LWRbackslash\macrotocsname{#1}LWRsubnostar\}%
+    }%
+    \appto\LWR at customizedMathJax{[2][]}%
+    \appto\LWR at customizedMathJax{\{\{}%
+    \LWR at subcustomizedmathjax{##1#2##2##1#3}%
+    \appto\LWR at customizedMathJax{\}\}}%
+    \appto\LWR at customizedMathJax{\LWRbackslash)\par}%
+    \appto\LWR at customizedMathJax{\LWRbackslash(}
+    \appto\LWR at customizedMathJax{%
+        \LWRbackslash{}DeclareIfstar\{\LWRbackslash{}\macrotocsname{#1}\}%
+        \{\LWRbackslash{}\macrotocsname{#1}LWRsubstar\}%
+        \{\LWRbackslash{}\macrotocsname{#1}LWRsubnostar\}%
+    }%
+    \appto\LWR at customizedMathJax{\LWRbackslash)\par}%
 }
 \@onlypreamble\DeclareParedDelimiter
 
@@ -142,9 +173,31 @@
     \LWR at mathtools@orig at DeclarePairedDelimiterXPP{#1}[#2]{#3}{#4}{#5}{#6}{#7}
     \appto\LWR at customizedMathJax{\LWRbackslash(}%
     \appto\LWR at customizedMathJax{%
-        \LWRbackslash{}newcommand\{\LWRbackslash\macrotocsname{#1}LWRsub\}%
+        \LWRbackslash{}newcommand\{\LWRbackslash\macrotocsname{#1}LWRsubsubstar\}%
     }%
     \appto\LWR at customizedMathJax{[#2]}%
+    \appto\LWR at customizedMathJax{\{\{\LWRbackslash{}left}%
+    \LWR at subcustomizedmathjax{#3#4#7}%
+    \appto\LWR at customizedMathJax{\LWRbackslash{}right}%
+    \LWR at subcustomizedmathjax{#5#6}%
+    \appto\LWR at customizedMathJax{\}\}}%
+    \appto\LWR at customizedMathJax{\LWRbackslash)\par}%
+    \appto\LWR at customizedMathJax{\LWRbackslash(}%
+    \appto\LWR at customizedMathJax{%
+        \LWRbackslash{}newcommand\{\LWRbackslash\macrotocsname{#1}LWRsubstar\}[1][]%
+    }%
+    \appto\LWR at customizedMathJax{%
+        \{
+        \LWRbackslash{}def\LWRbackslash{}delimsize\{\#1\}
+        \LWRbackslash\macrotocsname{#1}LWRsubsubstar
+        \}%
+    }%
+    \appto\LWR at customizedMathJax{\LWRbackslash)\par}%
+    \appto\LWR at customizedMathJax{\LWRbackslash(}%
+    \appto\LWR at customizedMathJax{%
+        \LWRbackslash{}newcommand\{\LWRbackslash\macrotocsname{#1}LWRsubsubnostar\}%
+    }%
+    \appto\LWR at customizedMathJax{[#2]}%
     \appto\LWR at customizedMathJax{\{\{\LWRbackslash{}delimsize}%
     \LWR at subcustomizedmathjax{#3#4#7}%
     \appto\LWR at customizedMathJax{\LWRbackslash{}delimsize}%
@@ -153,15 +206,22 @@
     \appto\LWR at customizedMathJax{\LWRbackslash)\par}%
     \appto\LWR at customizedMathJax{\LWRbackslash(}%
     \appto\LWR at customizedMathJax{%
-        \LWRbackslash{}newcommand\{\LWRbackslash\macrotocsname{#1}\}[1][]%
+        \LWRbackslash{}newcommand\{\LWRbackslash\macrotocsname{#1}LWRsubnostar\}[1][]%
     }%
     \appto\LWR at customizedMathJax{%
         \{
         \LWRbackslash{}def\LWRbackslash{}delimsize\{\#1\}
-        \LWRbackslash\macrotocsname{#1}LWRsub
+        \LWRbackslash\macrotocsname{#1}LWRsubsubnostar
         \}%
     }%
     \appto\LWR at customizedMathJax{\LWRbackslash)\par}%
+    \appto\LWR at customizedMathJax{\LWRbackslash(}
+    \appto\LWR at customizedMathJax{%
+        \LWRbackslash{}DeclareIfstar\{\LWRbackslash{}\macrotocsname{#1}\}%
+        \{\LWRbackslash{}\macrotocsname{#1}LWRsubstar\}%
+        \{\LWRbackslash{}\macrotocsname{#1}LWRsubnostar\}%
+    }%
+    \appto\LWR at customizedMathJax{\LWRbackslash)\par}%
 }
 \@onlypreamble\DeclareParedDelimiterXPP
 \@onlypreamble\DeclareParedDelimiterX

Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-nccmath.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-nccmath.sty	2020-05-12 21:21:35 UTC (rev 55121)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-nccmath.sty	2020-05-12 21:22:49 UTC (rev 55122)
@@ -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
 %%

Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-physics.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-physics.sty	2020-05-12 21:21:35 UTC (rev 55121)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-physics.sty	2020-05-12 21:22:49 UTC (rev 55122)
@@ -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{\evaluated}[1]{#1\vert}}
+\CustomizeMathJax{\newcommand{\LWRevaluatednostar}[1]{\left . #1\right\vert}}
+\CustomizeMathJax{\newcommand{\LWRevaluatedstar}[1]{#1\vert}}
+\CustomizeMathJax{%
+    \DeclareIfstar{\evaluated}{\LWRevaluatedstar}{\LWRevaluatednostar}%
+}
+
 \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{\commutator}[2]{\left\lbrack#1,#2\right\rbrack}}
+\CustomizeMathJax{\newcommand{\LWRcommutatornostar}[2]{\left\lbrack#1,#2\right\rbrack}}
+\CustomizeMathJax{\newcommand{\LWRcommutatorstar}[2]{\lbrack#1,#2\rbrack}}
+\CustomizeMathJax{%
+    \DeclareIfstar{\commutator}{\LWRcommutatorstar}{\LWRcommutatornostar}%
+}
+
 \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,43 +195,90 @@
 \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 at physics@qtext}[2]{%
+    \appto\LWR at customizedMathJax{\LWRbackslash(}
+    \appto\LWR at customizedMathJax{%
+        \LWRbackslash{}newcommand\{\LWRbackslash{}LWR\macrotocsname{#1}subnostar\}%
+    }%
+    \appto\LWR at customizedMathJax{\{}%
+    \appto\LWR at customizedMathJax{%
+        \LWRbackslash{}quad\LWRbackslash{}text\{#2\}\LWRbackslash{}quad%
+    }%
+    \appto\LWR at customizedMathJax{\}}%
+    \appto\LWR at customizedMathJax{\LWRbackslash)\par}%
+    \appto\LWR at customizedMathJax{\LWRbackslash(}
+    \appto\LWR at customizedMathJax{%
+        \LWRbackslash{}newcommand\{\LWRbackslash{}LWR\macrotocsname{#1}substar\}%
+    }%
+    \appto\LWR at customizedMathJax{\{}%
+    \appto\LWR at customizedMathJax{\LWRbackslash{}text\{#2\}\LWRbackslash{}quad}%
+    \appto\LWR at customizedMathJax{\}}%
+    \appto\LWR at customizedMathJax{\LWRbackslash)\par}%
+    \appto\LWR at customizedMathJax{\LWRbackslash(}
+    \appto\LWR at customizedMathJax{%
+        \LWRbackslash{}DeclareIfstar\{\LWRbackslash\macrotocsname{#1}\}%
+    }%
+    \appto\LWR at customizedMathJax{\{}%
+    \appto\LWR at customizedMathJax{\LWRbackslash{}LWR\macrotocsname{#1}substar\}}%
+    \appto\LWR at customizedMathJax{\LWRbackslash{}LWR\macrotocsname{#1}subnostar\}}%
+    \appto\LWR at customizedMathJax{\LWRbackslash)\par}%
+}
+
+\LWR at physics@qtext{\qcc}{c.c.}
+\LWR at physics@qtext{\qif}{if}
+\LWR at physics@qtext{\qthen}{then}
+\LWR at physics@qtext{\qelse}{else}
+\LWR at physics@qtext{\qotherwise}{otherwise}
+\LWR at physics@qtext{\qunless}{unless}
+\LWR at physics@qtext{\qgiven}{given}
+\LWR at physics@qtext{\qusing}{using}
+\LWR at physics@qtext{\qassume}{assume}
+\LWR at physics@qtext{\qsince}{since}
+\LWR at physics@qtext{\qlet}{let}
+\LWR at physics@qtext{\qfor}{for}
+\LWR at physics@qtext{\qall}{all}
+\LWR at physics@qtext{\qeven}{even}
+\LWR at physics@qtext{\qodd}{odd}
+\LWR at physics@qtext{\qinteger}{integer}
+\LWR at physics@qtext{\qand}{and}
+\LWR at physics@qtext{\qor}{or}
+\LWR at physics@qtext{\qas}{as}
+\LWR at 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}
 
@@ -196,39 +285,119 @@
 \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\})}}

Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-todonotes.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-todonotes.sty	2020-05-12 21:21:35 UTC (rev 55121)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-todonotes.sty	2020-05-12 21:22:49 UTC (rev 55122)
@@ -25,7 +25,7 @@
 \let\LWRTODONOTES at orig@todototoc\todototoc
 
 \renewcommand*{\todototoc}{%
-\phantomsection%
+\LWR at phantomsection%
 \LWRTODONOTES at orig@todototoc%
 }
 

Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-url.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-url.sty	2020-05-12 21:21:35 UTC (rev 55121)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-url.sty	2020-05-12 21:22:49 UTC (rev 55122)
@@ -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 at url@orig at url\url
+\LetLtxMacro\LWR at url@orig at url\LWR at url
 
 \LWR at ProvidesPackagePass{url}[2013/09/16]
 

Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty	2020-05-12 21:21:35 UTC (rev 55121)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty	2020-05-12 21:22:49 UTC (rev 55122)
@@ -83,6 +83,7 @@
 \LWR at formatted{color}
 \NewDocumentCommand{\LWR at HTML@textcolor}{o m m}{%
 \begingroup%
+\LWR at FBcancel%
 \IfValueTF{#1}{%
     \color[#1]{#2}%
 }{%

Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp.sty	2020-05-12 21:21:35 UTC (rev 55121)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp.sty	2020-05-12 21:22:49 UTC (rev 55122)
@@ -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,100 +4182,246 @@
 \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"
-    }
-    });
+<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;
 
-    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];
+      //
+      //  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>
+      });
+      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
 
-<!-- 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">
+  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}
 
@@ -4282,7 +4428,6 @@
 
 
 
-
 \begin{LWRcreatelwarpmk}
 \begin{filecontents*}[overwrite]{lwarpmk.lua}
 #!/usr/bin/env texlua
@@ -4289,7 +4434,7 @@
 
 -- Copyright 2016-2020 Brian Dunn
 
-printversion = "v0.85"
+printversion = "v0.86"
 requiredconfversion = "2" -- also at *lwarpmk.conf
 
 function printhelp ()
@@ -6527,11 +6672,14 @@
 \LWR at traceinfo{LWR at filenamenoblanks edef: !\LWR at thisnewfilename!}%
 \fullexpandarg%
 \LWR at simplifyname*{ }
+\LWR at simplifyname*{*}
+\LWR at simplifyname*{(}
+\LWR at simplifyname*{)}
+\LWR at simplifyname*{.}
 \LWR at simplifyname*{!}
 \LWR at simplifyname*{,}
 \LWR at simplifyname*{'}
 \LWR at simplifyname*{+}
-\LWR at simplifyname*{,}
 \LWR at simplifyname*{/}
 \LWR at simplifyname*{:}
 \LWR at simplifyname*{;}
@@ -6769,6 +6917,7 @@
 \LWR at customizedMathJax
 \LWR at startpars
 \end{BlockClass}
+\typeout{Done.}
 \typeout{---}
 
 \LWR at startpars
@@ -7340,7 +7489,17 @@
     \begingroup%
     \LWR at restoreoriglists%
     \boolfalse{LWR at verbtags}%
-        \verbatiminput{\LWR at mathjaxfilename}%
+        \IfFileExists{\LWR at mathjaxfilename}%
+            {\verbatiminput{\LWR at mathjaxfilename}}%
+            {%
+                \PackageError{lwarp}%
+                    {%
+                        \protect\MathJaxFilename\space specified the file\MessageBreak
+                        \space\space\LWR at mathjaxfilename\MessageBreak
+                        which does not exist%
+                    }%
+                    {Specify an existing file, or remove \protect\MathJaxFilename.}%
+            }%
     \booltrue{LWR at verbtags}%
     \endgroup%
     \LWR at stoppars%
@@ -7383,8 +7542,6 @@
 \setlength{\abovecaptionskip}{0ex}
 \renewcommand{\ps at plain}{}
 \let\LWR at origcaption\caption
-\let\LWR at origltx@label\ltx at label
-\let\ltx at label\LWR at htmlmathlabel
 \global\boolfalse{LWR at doingapar}
 \global\boolfalse{LWR at doingstartpars}
 \mainmatter
@@ -9905,6 +10062,26 @@
 }
 
 
+\newcommand*{\LWR at label@subcreatetag}{%
+    \LWR at htmltag{a \LWR at print@mbox{id="\LWR at sanitized"}}%
+    \LWR at htmltag{/a}%
+}
+
+\newcommand*{\LWR at label@inmathcomment}{%
+    \ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
+    {%
+        \mbox{%
+            \ifdef{\totwidth@}{\ifbool{LWR at amsmultline}{}{\hspace*{\totwidth@}}}{}%
+            \LWR at htmlclosecomment%
+            \LWR at label@subcreatetag%
+            \LWR at htmlopencomment%
+        }% mbox
+    }% mathjax
+    {%
+        \LWR at label@subcreatetag%
+    }%
+}
+
 \newcommand*{\LWR at label@createtag}[1]{%
     \LWR at traceinfo{LWR at label@createtag !#1!}%
     \ifnumcomp{\value{LWR at lateximagedepth}}{>}{0}%
@@ -9911,24 +10088,27 @@
     {}%
     {% not lateximage
         \LWR at sanitize{#1}%
-        \ifbool{LWR at doingstartpars}%
-        {% pars allowed
-            \ifbool{LWR at doingapar}%
-            {% par started
-                \LWR at htmltag{a \LWR at print@mbox{id="\LWR at sanitized"}}%
-                \LWR at htmltag{/a}%
-            }% par started
-            {% par not started
-                \LWR at stoppars%
-                \LWR at htmltag{a \LWR at print@mbox{id="\LWR at sanitized"}}%
-                \LWR at htmltag{/a}%
-                \LWR at startpars%
-            }% par not started
-        }% pars allowed
-        {% pars not allowed
-            \LWR at htmltag{a \LWR at print@mbox{id="\LWR at sanitized"}}%
-            \LWR at htmltag{/a}%
-        }% pars not allowed
+        \ifbool{LWR at insidemathcomment}%
+        {% inside HTML math comment
+            \LWR at label@inmathcomment%
+        }% inside HTML math comment
+        {% not inside HTML math comment
+            \ifbool{LWR at doingstartpars}%
+            {% pars allowed
+                \ifbool{LWR at doingapar}%
+                {% par started
+                    \LWR at label@subcreatetag%
+                }% par started
+                {% par not started
+                    \LWR at stoppars%
+                    \LWR at label@subcreatetag%
+                    \LWR at startpars%
+                }% par not started
+            }% pars allowed
+            {% pars not allowed
+                    \LWR at label@subcreatetag%
+            }% pars not allowed
+        }% not inside HTML math comment
     }% not lateximage
 }
 \NewDocumentCommand{\LWR at new@label}{m}{%
@@ -9977,7 +10157,7 @@
     {%
         \ifthenelse{\cnttest{\LWR at lateximagedepthref{#1}}{>}{0}}%
             {%
-                \LWR at ImagesName\LWR at lateximagenumberref{#1}%
+                lateximage-\BaseJobname-\LWR at lateximagenumberref{#1}%
             }%
             {%
                 \LWR at traceinfo{LWR at startref D3}%
@@ -10088,7 +10268,7 @@
     \LWR at subhyperreftext%
 }
 
-\newrobustcmd*{\href}{%
+\newrobustcmd*{\LWR at href}{%
     \begingroup%
     \LWR at linkcatcodes%
     \LWR at hrefb%
@@ -10102,7 +10282,7 @@
     \endgroup%
 }
 
-\newrobustcmd*{\nolinkurl}{%
+\newrobustcmd*{\LWR at nolinkurl}{%
     \begingroup%
     \LWR at linkcatcodes%
     \LWR at nolinkurlb%
@@ -10112,11 +10292,11 @@
     \LWR at ensuredoingapar%
     \def\LWR at templink{#1}%
     \@onelevel at sanitize\LWR at templink%
-    \href{\LWR at templink}{\LWR at templink}%
+    \LWR at href{\LWR at templink}{\LWR at templink}%
     \endgroup%
 }
 
-\newrobustcmd*{\url}{%
+\newrobustcmd*{\LWR at url}{%
     \begingroup%
     \LWR at linkcatcodes%
     \LWR at urlb%
@@ -10974,6 +11154,9 @@
 
 \newbool{LWR at indisplaymathimage}
 
+\newbool{LWR at insidemathcomment}
+\boolfalse{LWR at insidemathcomment}
+
 \newbool{LWR at xfakebold}
 \boolfalse{LWR at xfakebold}
 
@@ -11384,29 +11567,53 @@
 }
 
 \newcounter{LWR at nextequation}
+\newcommand\LWR at article@theequation{\@arabic\c at equation}
+
+\newcommand\LWR at book@theequation
+  {\ifnum \c at chapter>\z@ \thechapter.\fi \@arabic\c at equation}
+
+\newcommand\LWR at chapter@theequation{\thechapter.\arabic{equation}}
+\newcommand\LWR at section@thequation{\thesection.\arabic{equation}}
+\newcommand\LWR at subsection@thequation{\thesubsection.\arabic{equation}}
+
+\AtBeginDocument{
+    % default per article class:
+    \newcommand*{\theMathJaxsubequations}{0}
+    \newcommand*{\theMathJaxsection}{}
+    \newcommand*{\theMathJaxequation}{\arabic{equation}}
+
+    \ifdefstrequal{\theequation}{\LWR at article@theequation}
+    {}{
+    \ifdefstrequal{\theequation}{\LWR at book@theequation}{
+        \renewcommand*{\theMathJaxsection}{\ifnum \c at chapter>\z@ \thechapter.\fi}
+    }{
+    \ifdefstrequal{\theequation}{\LWR at subsection@thequation}{
+        \renewcommand*{\theMathJaxsection}{\thesubsection{}.}
+    }{
+    \ifdefstrequal{\theequation}{\LWR at section@thequation}{
+        \renewcommand*{\theMathJaxsection}{\thesection{}.}
+    }{
+    \ifdefstrequal{\theequation}{\LWR at chapter@theequation}{
+        \renewcommand*{\theMathJaxsection}{\thechapter{}.}
+    }{% unknown format
+        \PackageWarningNoLine{lwarp}
+        {%
+            Unknown equation tag format for \protect\theequation.\MessageBreak
+            Article-style equation numbering will be used%
+        }
+    }}}}}
+}
 \newcommand*{\LWR at syncmathjax}{%
-    \ifcsdef{thechapter}{
         \LWR at stoppars%
         \InlineClass{hidden}{
-            \textbackslash(
-            \textbackslash{}seteqsection \{\thechapter\}
-            \textbackslash)
+            \textbackslash(%
+            \textbackslash{}seteqnumber%
+            \{\theMathJaxsubequations\}%
+            \{\theMathJaxsection\}%
+            \{\theMathJaxequation\}%
+            \textbackslash)%
         }
         \LWR at startpars%
-    }
-    {}% not using chapters
-    \ifthenelse{\cnttest{\value{equation}}>0}
-    {
-        \setcounter{LWR at nextequation}{\value{equation}}
-        \addtocounter{LWR at nextequation}{1}
-        \LWR at stoppars%
-        \InlineClass{hidden}{
-            \textbackslash(
-            \textbackslash{}seteqnumber \{\arabic{LWR at nextequation}\}
-            \textbackslash)
-        }
-        \LWR at startpars%
-    }{}% not eq > 0
 }
 \NewDocumentCommand{\LWR at hidelatexequation}{m +m}{%
     \LWR at stoppars
@@ -11415,11 +11622,13 @@
     \begingroup
     \@nameuse{LWR at orig#1}
     \LWR at restoreorigformatting
+    \booltrue{LWR at insidemathcomment}
     #2
     \@nameuse{LWR at origend#1}
     \endgroup
 
     \LWR at htmlclosecomment
+    \boolfalse{LWR at insidemathcomment}
     \LWR at startpars
 }
 
@@ -11576,22 +11785,6 @@
 \newbool{LWR at amsmultline}
 \boolfalse{LWR at amsmultline}
 
-\newcommand*{\LWR at htmlmathlabel}[1]{%
-    \LWR at traceinfo{LWR at htmlmathlabelb #1}%
-    \ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
-    {%
-        \text{%
-        \ifbool{LWR at amsmultline}{}{\hspace*{\totwidth@}}%
-        \LWR at htmlclosecomment%
-        \LWR at origltx@label{#1}%
-        \LWR at htmlopencomment%
-        }% text
-    }% mathjax
-    {%
-        \LWR at origltx@label{#1}%
-    }%
-}
-
 \newcommand*{\LWR at beginhideamsmath}{
     \LWR at stoppars
     \LWR at origtilde\LWR at orignewline
@@ -11599,6 +11792,7 @@
 
     \begingroup
     \LWR at restoreorigformatting
+    \booltrue{LWR at insidemathcomment}
 }
 
 \newcommand*{\LWR at endhideamsmath}{
@@ -11605,6 +11799,7 @@
     \endgroup
 
     \LWR at htmlclosecomment
+    \boolfalse{LWR at insidemathcomment}
     \LWR at orignewline
     \LWR at startpars
 }
@@ -13193,8 +13388,7 @@
 
 \begin{warpHTML}
 
-\newcounter{LWR at phantomsection}
-\DeclareDocumentCommand{\phantomsection}{}{%
+\newrobustcmd*{\LWR at phantomsection}{%
     \begingroup%
     \boolfalse{LWR at forcinghtmltoc}%
     \section*{}%
@@ -13535,9 +13729,6 @@
             environments to force SVG output}
         \LWR at mathjaxwarn{jkmath}{}
         \LWR at mathjaxwarn{mathspec}{}
-        \LWR at mathjaxwarn{mathtools}
-            {Avoid starred macros.\MessageBreak
-            See the Lwarp manual for other limitations}
         \LWR at mathjaxwarn{multirow}
             {Multirow works as expected in text mode, but\MessageBreak
             limited emulation is provided for MathJax math.\MessageBreak
@@ -13547,8 +13738,8 @@
             {Enclose its uses inside lateximage environments\MessageBreak
             to force SVG output}
         \LWR at 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 at mathjaxwarn{unicode-math}



More information about the tex-live-commits mailing list.