summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/lwarp
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-02-02 03:02:06 +0000
committerNorbert Preining <norbert@preining.info>2020-02-02 03:02:06 +0000
commite05dc0bb38b16bfb9ba35591285e40af0adaadc4 (patch)
tree564fc3b7389c845780f5685d16fe13ae29372fb4 /macros/latex/contrib/lwarp
parent5bcf334281674db82263ea71485108bd44a05a5d (diff)
CTAN sync 202002020302
Diffstat (limited to 'macros/latex/contrib/lwarp')
-rw-r--r--macros/latex/contrib/lwarp/README.txt4
-rw-r--r--macros/latex/contrib/lwarp/lwarp.dtx8410
-rw-r--r--macros/latex/contrib/lwarp/lwarp.ins19
-rw-r--r--macros/latex/contrib/lwarp/lwarp.pdfbin2493809 -> 2569325 bytes
-rwxr-xr-xmacros/latex/contrib/lwarp/lwarpmk.lua6
5 files changed, 5559 insertions, 2880 deletions
diff --git a/macros/latex/contrib/lwarp/README.txt b/macros/latex/contrib/lwarp/README.txt
index 195a61cffb..f91cc09657 100644
--- a/macros/latex/contrib/lwarp/README.txt
+++ b/macros/latex/contrib/lwarp/README.txt
@@ -1,5 +1,5 @@
-LaTeX lwarp package v0.78 README.txt
+LaTeX lwarp package v0.79 README.txt
Files included are:
@@ -41,7 +41,7 @@ and version 1.3 or later is part of all distributions of LaTeX
version 2005/12/01 or later.
-Copyright 2016-2019 Brian Dunn
+Copyright 2016-2020 Brian Dunn
Homepage: http://BDTechConcepts.com
Email: bd@BDTechConcepts.com
diff --git a/macros/latex/contrib/lwarp/lwarp.dtx b/macros/latex/contrib/lwarp/lwarp.dtx
index e52d6bfdb3..0de08ba438 100644
--- a/macros/latex/contrib/lwarp/lwarp.dtx
+++ b/macros/latex/contrib/lwarp/lwarp.dtx
@@ -1,7 +1,7 @@
%
% \iffalse meta-comment
%
-% Copyright 2016-2019 Brian Dunn
+% Copyright 2016-2020 Brian Dunn
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
@@ -16,7 +16,7 @@
% \iffalse
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{lwarp}
-%<package> [2019/11/07 v0.78 Allows LaTeX to directly produce HTML5 output.]
+%<package> [2020/02/01 v0.79 Allows LaTeX to directly produce HTML5 output.]
%
%<*driver>
\documentclass{ltxdoc}
@@ -233,7 +233,7 @@ pageanchor=true,hyperindex=true,hyperfootnotes=false%
\hypersetup{%
pdfinfo={%
-Title={LaTeX lwarp package},%
+Title={LaTeX Lwarp package},%
Author={Brian Dunn},%
Subject={LaTeX to HTML conversion},%
Keywords={LaTeX, HTML, conversion}%
@@ -303,6 +303,7 @@ Keywords={LaTeX, HTML, conversion}%
\newcommand{\epkg}[1]{\textcolor[Hsb]{300,1,.5}{\pkg{#1}}}% package emulated for HTML
\newcommand{\ipkg}[1]{\textcolor[Hsb]{0,0,.5}{\pkg{#1}}}% package ignored
\newcommand{\wpkg}[1]{\textcolor[Hsb]{0,1,.5}{\pkg{#1}}}% package warning special case
+\newcommand{\sjax}{\textsuperscript{\textcolor{orange!70!black}{MJ}}}
% green/cyan/blue/magenta
% \newcommand{\spkg}[1]{\textcolor[Hsb]{120,1,.4}{\pkg{#1}}}% package supported as-is
@@ -1174,6 +1175,7 @@ SVG math does not work inside \TeX\ boxes, since a \cs{newpage} is required
before and after each image.
\subsubsection{\brand{MathJax} option}
+\label{sec:limitsmathjax}
The popular \brand{MathJax} alternative (\url{mathjax.org}) may be used to display math.
\margintag{\brand{MathJax} math option}
@@ -1202,41 +1204,63 @@ Limitations when using \brand{MathJax} include:
\margintag{\brand{MathJax} limitations}
\DescribeProgram{MathJax}
\begin{itemize}
-\item \brand{MathJax} itself does not support subequations.
- \margintag{subequations}
-\trouble{MathJax=\brand{MathJax}>subequations}%
-\trouble{math>subequations}%
+\item \brand{MathJax} does not support \cs{multicolumn} or \pkg{multirow}.
+ \trouble[\cs{multicolumn}, \pkg{multirow}]%
+ {multicolumn=\cs{multicolumn}>MathJax=\brand{MathJax}}
+ \trouble{multirow=\pkg{multirow}>MathJax=\brand{MathJax}}
+ \trouble{array=\env{array}>MathJax=\brand{MathJax}}
+ \trouble{MathJax=\brand{MathJax}>multicolumn=\cs{multicolumn}}
+ \trouble{MathJax=\brand{MathJax}>multirow=\cs{multirow}}
+ These may be used in text \env{tabular}s or \SVG\ math,
+ but in \brand{MathJax} math \env{array}s they are emulated.
+ \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 inside equations are not yet supported while using \brand{MathJax}.
- \margintag{footnotes in math}
+ \watchout[footnotes in math]
+ \pkg{lwarp} provides a basic emulation for \brand{MathJax}.
+
+\item Inside a \brand{MathJax} expression,
+ \trouble[references in math]{MathJax=\brand{MathJax}>references}
+ \trouble{cross reference>MathJax=\brand{MathJax}}
+ \trouble{reference>MathJax=\brand{MathJax}}
+ references to equations work within the same \HTML\ web page, but do not
+ work when referring to an equation in a different \HTML\ web page.
+ Outside of a \brand{MathJax} expression, in the text body, references work
+ as expected.
+
\item Math appearing inside a lateximage,
\margintag{lateximage}
and therefore also inside a \tikz\ or \env{picture}
- environment, is rendered as SVG math even if \brand{MathJax} is used in the rest of the document.
-\item Usage of \pkg{siunitx} inside a math equation
- \margintag{siunitx}
- is supported via a third-party \brand{MathJax} extension.
- While inside a math expression, do not use \cs{SI} or \cs{si} inside \cs{text},
- where it will be rendered as normal text.
- \trouble[siunitx inside an equation]{siunitx=\pkg{siunitx}>MathJax=\brand{MathJax}}
- \trouble{MathJax=\brand{MathJax}>siunitx=\pkg{siunitx}}
+ environment, is rendered as SVG math even if \brand{MathJax}
+ is used in the rest of the document.
- \href{https://github.com/burnpanck/MathJax-siunitx}
- {\texttt{https://github.com/burnpanck/MathJax-siunitx}}
+\item For \pkg{siunitx},
+ \margintag{\pkg{siunitx}}
+ see \nameref{sec:limitssiunitx}, \cref{sec:limitssiunitx}.
- Also see \cref{sec:limitssiunitx}.
+\item For \pkg{physics},
+ \margintag{\pkg{physics}}
+ see \nameref{sec:limitsphysics}, \cref{sec:limitsphysics}.
\item A \env{tabbing} environment is emulated
- using an \HTML\ \element{pre}.\margintag{tabbing}
+ using an \HTML\ \element{pre}.\margintag{tabbing}\
While \brand{MathJax} is enabled inside \env{tabbing}, the browser may not correctly
render the horizontal alignment of the math and text following after on the same line.
-\item Other math-related macros and packages are not supported by \brand{MathJax},
+\item Other math-related macros and packages are not directly supported by \brand{MathJax},
\trouble[other macros and packages]{MathJax=\brand{MathJax}>unsupported packages}
including \cs{ensuremath} and \pkg{bigdelim},
- along with occasionally-used macros such as \cs{relax}.
- \pkg{lwarp} emulates footnotes, \pkg{units}, and \pkg{nicefrac} for MathJax.
+ and occasionally-used macros such as \cs{relax}.
+ While using \brand{MathJax}, \pkg{lwarp} provides emulation
+ for footnotes, \pkg{bm}, \pkg{mathtools},
+ \pkg{nicefrac}, \pkg{siunitx}, and \pkg{units}.
\end{itemize}
}
@@ -1315,13 +1339,26 @@ and thus will have a global effect.
Examples:
\begin{sourcedisplay}
+\cs{begin}\{warpMathJax\} \\
\cs{CustomizeMathJax}\{ \\
\fqquad\cs{newcommand}\{\cs{expval}\}[1]\{\cs{langle}\#1\cs{rangle}\} \\
\fqquad\cs{newcommand}\{\cs{abs}\}[1]\{\cs{lvert}\#1\cs{rvert}\} \\
\} \\
-\cs{CustomizeMathJax}\{\cs{newcommand}\{\cs{arsinh}\}\{\cs{text}\{arsinh\}\}\} \\
-\cs{CustomizeMathJax}\{\cs{newcommand}\{\cs{arcosh}\}\{\cs{text}\{arcosh\}\}\}
-\cs{CustomizeMathJax}\{\cs{newcommand}\{\cs{NN}\}\{\cs{mathbb}\{N\}\}\}
+\cs{CustomizeMathJax}\{\cs{newcommand}\{\cs{arcsinh}\}\{\cs{text}\{arcsinh\}\}\} \\
+\cs{CustomizeMathJax}\{\cs{newcommand}\{\cs{arccosh}\}\{\cs{text}\{arccosh\}\}\} \\
+\cs{CustomizeMathJax}\{\cs{newcommand}\{\cs{NN}\}\{\cs{mathbb}\{N\}\}\} \\
+\cs{end}\{warpMathJax\}
+\end{sourcedisplay}
+
+\pkg{lwarp} already provides \brand{MathJax} customizations for some packages.
+
+When using \pkg{siunitx}, a similar process may be used to add custom units:
+\margintag{\pkg{siunitx}}
+\begin{sourcedisplay}
+\cs{begin}\{warpMathJax\} \\
+\cs{CustomizeMathJax}\{\cs{newcommand}\{\cs{myunit}\}\{\cs{mathrm}\{WXYZ\}\}\} \\
+\cs{CustomizeMathJax}\{\cs{newcommand}\{\cs{umyunit}\}\{\cs{mathrm}\{\cs{micro}\cs{myunit}\}\}\} \\
+\cs{end}\{warpMathJax\}
\end{sourcedisplay}
}
@@ -1359,6 +1396,41 @@ Or, use a short name for the \TOC\ entry without the math, or use \cs{texorpdfst
\end{sourcedisplay}
}
+\newcommand{\limitsmathtools}{%
+ \trouble[equation numbering]{mathtools=\pkg{mathtools}}
+ \optn{showonlyrefs} is disabled, as it conflicts with \pkg{cleveref}, which is
+ used by \pkg{lwarp}. Equation numbers may not match the print version.
+
+ \optn{mathic} is not emulated for \HTML.
+ \watchout[italic correction]
+
+ 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}
+ \cs{begin}\{gathered\}\textred{\{\}} \\
+ {[}p{]}=1 \dots \\
+ \cs{end}\{gathered\}
+ \end{sourcedisplay}
+ \item \optn{showonlyrefs} does not work in \brand{MathJax}, and will result
+ in a difference in equation numbering compared to the print version.
+ \item Due to \brand{MathJax} limitations, the following do not render well:
+ \cs{overbracket}, \cs{underbracket}, \cs{overbrace}, \cs{underbrace},
+ \env{rcases}, \env{drcases}, \cs{Aboxed}, and \linebreak \cs{ArrowBetweenLines}.
+ \item For the new \env{cases}-like environments,
+ \cs{text} must be used to set the normal roman font if desired.
+ \item \env{alignat} in \brand{MathJax} requires math mode, but
+ in \LaTeX it doesn't. It may be required to use \env{warpHTML} and
+ \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}
+}
+
\newcommand{\limitschemfig}{%
If using \cs{polymerdelim} to add delimiters to a \cs{chemfig},
wrap both inside a single \env{lateximage}:
@@ -1849,10 +1921,7 @@ or the packages \pkg{multirow}, \pkg{longtable}, \pkg{supertabular}, or \pkg{xta
rounded top corners.
Trim corners are not rounded with \texttt{@} or \texttt{!} columns,
and full-width rules ignore trim.
-
- \item \cs{toprule}, \cs{midrule}, \cs{bottomrule}, and \cs{hline}
- \margintag{full-width rules}
- ignore trim. When given an optional width, each cell is styled
+ When given an optional width, each cell is styled
to create the custom border. Without an optional width, the entire
row is given a class to assign the standard border.
@@ -1970,6 +2039,11 @@ or the packages \pkg{multirow}, \pkg{longtable}, \pkg{supertabular}, or \pkg{xta
\dots\ \& & \textred{\cs{mcolrowcell}} \hfill \& \hfill \textred{\cs{mcolrowcell}} & \&\ \dots \\
\end{tabular}
\end{sourcedisplay}
+ \item \brand{MathJax} does not support \pkg{multirow}, so it is emulated
+ \trouble[MathJax]{MathJax=\brand{MathJax}>multirow=\cs{multirow}}
+ \trouble{multirow=\pkg{multirow}>MathJax=\brand{MathJax}}
+ to only print its text on the first row.
+ \cs{multirow} works as expected in text \env{tabular}s or \SVG\ math.
\end{itemize}
}
@@ -2108,6 +2182,9 @@ are above or below the delimiter:
\end{tabular}
\hrule
\end{sourcedisplay}
+
+For \brand{MathJax}, limited emulation is provided which merely prints the
+delimter and optional text in the first row.
}
\newcommand{\limitscolortbl}{%
@@ -2198,11 +2275,11 @@ have limited \HTML\ tags, resulting in an ``inline'' format, without markup
except for \HTML\ breaks.
Use \cs{newline} or \cs{par} for an \HTML\ break.
-When using \cs{linewidth}, \cs{textwidth}, and \cs{textheight},
+When using \env{minipage}, \cs{parbox}, and \env{fminipage},
\trouble[minipage size]{minipage>size}
-widths and heights in \HTML\ are scaled proportionally to a 6\texttimes{}9 inch text area,
-and inside a \env{multicols} \cs{linewidth} is divided by the specified number
-of columns.
+a virtual $6 \times 9$ inch text area is used for
+\cs{linewidth}, \cs{textwidth}, and \cs{textheight}, both for sizing the minipage,
+and also for its contents.
If a \env{minipage} or \cs{parbox} is assigned a width of exactly \cs{linewidth},
\margintag{if width is \cs{linewidth}}
@@ -2229,6 +2306,10 @@ widths of all following \env{minipage}s and \cs{parboxes} until the end
of the local scope, and \cs{IgnoreMinipageWidths} may be used to tell \pkg{lwarp} to
ignore the specified widths.
+Inside a \env{multicols}, \cs{linewidth} is divided by the specified number
+\trouble[\pkg{multicol}]{multicol=\pkg{multicol}>\cs{linewidth}}
+of columns.
+
Nested \env{minipage}s adopt their parent's text alignment in \HTML,
\trouble[text alignment]{minipage>alignment}
whereas in regular \LaTeX{} \PDF\ output they do not.
@@ -2377,6 +2458,7 @@ If selecting options with braces in \cs{usepackage} does not work:
To ensure proper float numbering, set caption positions
such as:
\trouble[numbering]{caption=\pkg{caption}>numbering}
+\trouble{float>numbering}
\trouble{subcaption=\pkg{subcaption}>numbering}
\begin{sourcedisplay}
\cs{captionsetup}[figure]\{position=bottom\} \\
@@ -2474,19 +2556,52 @@ output for \optn{per-mode} and \optn{quotient-mode}.
Some units will require that the expression be placed inside math mode.
\trouble[math mode required]{siunitx=\pkg{siunitx}}
-\trouble{siunitx>MathJax=\brand{MathJax}}
-\trouble{MathJax=\brand{MathJax}>siunitx=\pkg{siunitx}}
-\textred{NOTE: As of this writing, the \pkg{siunitx} extension
-for \brand{MathJax} is not currently hosted at any public CDN,
-thus \pkg{siunitx} is not usable with \brand{MathJax} unless a local copy
-of this extension is created first.
-See \cs{MathJaxFilename} to select a custom MathJax script.}
-
Tabular \texttt{S} columns are rendered as simple \texttt{c} columns,
\trouble[\env{tabular}]{siunitx=\pkg{siunitx}>tabular S and s columns}
and tabular \texttt{s} columns are not supported.
These may be replaced by \texttt{c} columns with each cell contained in
\cs{num} or \cs{si}.
+
+For math mode with \SVG\ display, the original \pkg{siunitx} code is used while
+generating the \SVG\ image.
+For text mode, \pkg{lwarp} uses an emulation which provides a very effective
+\HTML\ interpretation of \pkg{siunitx}.
+For math expressions while using \brand{MathJax},
+\trouble{siunitx=\pkg{siunitx}>MathJax=\brand{MathJax}}
+\trouble[MathJax]{MathJax=\brand{MathJax}>siunitx=\pkg{siunitx}}
+a limited emulation is used.
+Most functions work reasonably well, but many options cannot be emulated.
+\pkg{siunitx} macros with more than one optional value cannot absorb the second optional
+value, and complicated parsing such as for \cs{ang} is not supported.
+The result usually looks fine, and otherwise is enough to get the meaning across.
+
+\pkg{lwarp}'s \brand{MathJax} emulation for \pkg{siunitx} is meant to be a
+stop-gap measure until an extension is included in \brand{MathJax}.
+As of this writing, the third-party \pkg{siunitx} extension
+for \brand{MathJax} is not currently hosted at any public CDN,
+thus \pkg{siunitx} is not usable with this extension unless a local copy
+of this extension is created first.
+See \cs{MathJaxFilename} to select a custom MathJax script, but \pkg{lwarp}'s
+emulation would have to be diabled as well.
+
+Document modifications required for \brand{MathJax}:
+\begin{itemize}
+\item Custom units may be added with \cs{CustomizeMathJax}.
+ \margintag{custom units}
+ See the \pkg{lwarp-siunitx} code for examples.
+\item Units work better using \texttt{\textasciitilde} between units
+ \watchout[unit spacing]
+ instead of using periods.
+\item To square or cube compound units,
+ \watchout[\cs{square}, \cs{cubic}]
+ enclose the following compound units in braces:
+ \begin{sourcedisplay}
+ \cs{cubic}\textred{\{}\cs{centi}\cs{meter}\textred{\}}
+ \end{sourcedisplay}
+ Single units do not require braces.
+\end{itemize}
+
+Also see \nameref{sec:limitsmathjax}, \cref{sec:limitsmathjax}.
}
\newcommand{\limitsnicefrac}{%
@@ -2497,6 +2612,34 @@ These may be replaced by \texttt{c} columns with each cell contained in
These packages do work with \pkg{lwarp}'s option \optn{svgmath}.
}
+\newcommand{\limitsphysics}{%
+\pkg{physics} works as-is for \HTML\ with \SVG\ math.
+
+For \brand{MathJax}, emulation is provided via \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.
+\item Many of the macros do not work with auto-detected delimiters. \watchout
+ Use the delimiter-specific versions instead.
+ Some macros do not even consider the following arguments,
+ so they may work as expected.
+\item For \cs{Re} and \cs{Im}, the arguments must be in braces.\watchout
+\item For \cs{functionalderivative}, for the example in the manual with $(E-TS)$,
+ enclose the parens in braces.
+\item \cs{expectationvalue} requires and uses two mandatory arguments, \watchout
+ unlike the third-party \brand{MathJax} \pkg{physics} extension.
+\item Each of \cs{matrixquantity}, \cs{smallmatrixquantity},
+ and \cs{matrixdeterminant} work,
+ while \cs{identitymatrix} and the following simply print a place-holder,
+ and must be replaced by hand.
+\end{itemize}
+}
+
% \newcommand{\limitsbabelone}{%
% If using \pkg{babel} with French, use
@@ -2692,7 +2835,7 @@ This boolean may be tested by the user for later use.
%<*package>
% \fi
%
-% \CheckSum{33374}
+% \CheckSum{36513}
%
% \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
@@ -2813,6 +2956,7 @@ This boolean may be tested by the user for later use.
% \changes{v0.76}{2019/10/08}{\ 2019/10/08}
% \changes{v0.77}{2019/10/15}{\ 2019/10/15}
% \changes{v0.78}{2019/11/07}{\ 2019/11/07}
+% \changes{v0.79}{2020/02/01}{\ 2020/02/01}
@@ -2836,7 +2980,7 @@ This boolean may be tested by the user for later use.
%
% \fileversion{} \Dash \filedate
%
-% {\small\textcopyright{} 2016--2019} Brian Dunn\\ \small \texttt{bd@BDTechConcepts.com}
+% {\small\textcopyright{} 2016--2020} Brian Dunn\\ \small \texttt{bd@BDTechConcepts.com}
%
% \end{center}
%
@@ -2878,8 +3022,9 @@ This boolean may be tested by the user for later use.
% Supported classes and packages include \pkg{memoir} and \pkg{koma-script},
% \pkg{cleveref}, \pkg{caption}, \pkg{mdframed}, \pkg{siunitx},
% and many popular packages for tabulars, floats, graphics, theorems, the title page,
-% bibliography, indexing, footnotes, and editorial work.
-%
+% bibliography, indexing, footnotes, and editorial work, as well as a number of CJK-related
+% classes and packages.
+%
% \TeX\ is a self-modifying tokenized macro-expansion language.
% Since \pkg{lwarp} is written directly in \LaTeX, it is able to interpret the document's
% meaning at a deeper level than external conversions which merely approximate \TeX.
@@ -3033,6 +3178,42 @@ This boolean may be tested by the user for later use.
%
% \begin{description}
% \needspace{2\baselineskip}
+% \item[v0.79:] \brand{MathJax}, nested \env{tabular}.
+% \begin{itemize}
+% \item Added or improved \brand{MathJax} emulation for
+% \margintag{\brand{MathJax}}
+% \pkg{amsmath}, \pkg{ar}, \pkg{arydshln}, \pkg{bm},
+% \pkg{bigdelim}, \pkg{bigstrut}, \pkg{booktabs}, \pkg{braket},
+% \pkg{mathtools}, \pkg{multirow}, \pkg{physics}, \pkg{siunitx}, \pkg{slashed},
+% \pkg{unicode-math}, \pkg{xfakebold}.
+% \item Warn if using certain packages not supported by \brand{MathJax}.
+% \item \env{tabular}: Now may be nested.
+% \margintag{core}
+% \item \env{minipage}, \cs{parbox}, \env{fminipage},
+% \cs{makebox}, \cs{framebox}: Fix: Adjust for virtual page size.
+% \item Uses new \pkg{iftex}.
+% \item \pkg{graphicx}: Fix: Negative angles.
+% \margintag{packages}
+% \item \pkg{caption}: Fix: \cs{captionlistentry} with \pkg{longtable}.
+% \item \pkg{multirow}: Fix: Centered vertical alignment.
+% \item \pkg{siunitx}: Fix: \cs{square}, \cs{cubed}.
+% \item \pkg{booktabs}: Fix: \pkg{memoir} with \env{lateximage}.
+% \item \pkg{babel} and \pkg{polyglossia}: Added troubleshooting warnings.
+% \item \pkg{fontawesome}, \pkg{fontawesome5}: Supports text color and size.
+% \item \pkg{transparent}: Fix: \env{lateximage}s.
+% \item \pkg{epigraph}: Updated to v1.5e.
+% \item \pkg{xurl}: Updated to v0.08.
+% \item \pkg{subcaption}: Fixed with \pkg{memoir}.
+% \item \pkg{floatrow}: Fix: \cs{linewidth}. No longer require \pkg{float}, \pkg{graphics}.
+% \item \pkg{floatflt}, \pkg{wrapfig}, \pkg{niceframe}: Fix: Adjust for virtual page size.
+% \item Added \pkg{widetable}, \pkg{witharrows}, \pkg{steinmetz}.
+% \item Added \pkg{awesomebox}, \pkg{catoptions}.
+% \item Added \pkg{svg}, supports \pkg{svg-extract}.
+% \item Added \pkg{parcolumns}, \pkg{pdfcolparcolumns},
+% \item Added \pkg{parallel}, \pkg{pdfcolparallel}.
+% \item Added \pkg{pdfcol}, \pkg{pdfcolfoot}, \pkg{pdfcolmk}.
+% \end{itemize}
+% \needspace{2\baselineskip}
% \item[v0.78:] Fixes for support files, \attribute{alt} tags, hyperlinks, and the 2019/10 \LaTeX\ release.
% \begin{itemize}
% \item Docs: Improved documentation regarding package options.
@@ -4722,6 +4903,7 @@ This boolean may be tested by the user for later use.
% \Cref{tab:supported} lists some of the various \LaTeX{} features and packages
% which may be used.
%
+%
% Package names are colored according to their support level:
% \begin{description}
% \item[\spkg{name}:] Supported as-is.
@@ -4729,6 +4911,7 @@ This boolean may be tested by the user for later use.
% as print output in \SVG\ math or \env{lateximage} environments.
% \item[\epkg{name}:] Emulated for \HTML\ output.
% \item[\ipkg{name}:] Ignored for \HTML\ output, but provides source-level compatibility.
+% \item[\sjax:] Emulated for \brand{MathJax}, subject to limitations.
% \end{description}
%
% \renewcommand{\arraystretch}{1.5}
@@ -4804,7 +4987,8 @@ This boolean may be tested by the user for later use.
% \ipkg{grid}, \mpkg{grid-system}, \ipkg{gridset},
% \ipkg{layaureo}, \ipkg{layout}, \ipkg{layouts}, \ipkg{leading},
% \ipkg{ltxgrid}, \ipkg{nccfancyhdr}, \ipkg{notespages}, \ipkg{nowidow},
-% \ipkg{pagegrid}, \ipkg{pagesel}, \ipkg{pdfcrypt}, \ipkg{pdfprivacy},
+% \ipkg{pagegrid}, \ipkg{pagesel}, \epkg{parallel}, \epkg{parcolumns},
+% \ipkg{pdfcolparallel}, \ipkg{pdfcolparcolumns}, \ipkg{pdfcrypt}, \ipkg{pdfprivacy},
% \ipkg{preview}, \epkg{ragged2e}, \ipkg{rmpage},
% \epkg{scrlayer-scrpage}, \epkg{scrpage2}, \epkg{setspace},
% \ipkg{textarea}, \ipkg{threadcol},
@@ -4867,7 +5051,7 @@ This boolean may be tested by the user for later use.
% \epkg{footmisc}, \mpkg{footnote}, \ipkg{footnotebackref},
% \mpkg{footnoterange}, \ipkg{footnpag}, \epkg{manyfoot},
% \epkg{marginnote}, \spkg{nccfoots}, \spkg{pagenote},
-% \mpkg{parnotes}, \ipkg{pfnote}, \spkg{sepfootnotes},
+% \mpkg{parnotes}, \ipkg{pdfcolfoot}, \ipkg{pfnote}, \spkg{sepfootnotes},
% \mpkg{sidenotes}, \ipkg{tablefootnote}.
% \\
%
@@ -4876,7 +5060,7 @@ This boolean may be tested by the user for later use.
% Math: & Converted to \SVG\ images with \HTML\ \element{alt} tags containing the
% \LaTeX\ source for the math expression.
% \brand{MathJax} supported as an alternative.
-% \mpkg{amsmath}: \AmS\ environments are supported.
+% \mpkg{amsmath}\sjax: \AmS\ environments are supported.
% User-defined macros are available during converson,
% due to native \LaTeX\ processing.\\
%
@@ -4884,10 +5068,11 @@ This boolean may be tested by the user for later use.
% \mpkg{amsthm}, \mpkg{ntheorem}, \mpkg{theorem}. \\
%
% Additional math: & Math fonts via \SVG\ images,
-% \spkg{amscd}, \ipkg{autonum}, \mpkg{backnaur}, \spkg{bm}, \spkg{braket},
+% \spkg{amscd}, \ipkg{autonum}, \mpkg{backnaur}, \mpkg{bm}\sjax, \spkg{braket}\sjax,
% \mpkg{breqn}, \mpkg{cases}, \spkg{delarray}, \spkg{guass}, \spkg{jkmath},
-% \spkg{mathspec}, \mpkg{mathtools}, \spkg{nicematrix}, \spkg{pb-diagram},
-% \ipkg{resizegather}, \spkg{unicode-math}, \mpkg{xfakebold}, \mpkg{xy}.
+% \spkg{mathspec}, \mpkg{mathtools}\sjax, \spkg{nicematrix}, \spkg{pb-diagram},
+% \ipkg{resizegather}, \spkg{unicode-math}\sjax, \mpkg{witharrows}\sjax,
+% \mpkg{xfakebold}\sjax, \mpkg{xy}.
% Many others work as-is. \\
%
% Display math with \cs{displaymathother}: & %
@@ -4896,8 +5081,8 @@ This boolean may be tested by the user for later use.
% \midrule
%
% Units and fractions: &
-% \mpkg{nicefrac}, \mpkg{SIunits}, \mpkg{siunitx},
-% \mpkg{units}, \mpkg{unitsdef}, \mpkg{xfrac}. \\
+% \mpkg{nicefrac}\sjax, \mpkg{SIunits}, \mpkg{siunitx}\sjax,
+% \mpkg{units}\sjax, \mpkg{unitsdef}, \mpkg{xfrac}. \\
%
% \midrule
%
@@ -4913,12 +5098,13 @@ This boolean may be tested by the user for later use.
% \midrule
%
% Tabular: &
-% \env{tabular} environment, \mpkg{array}, \epkg{arydshln},
-% \mpkg{bigdelim}, \mpkg{booktabs},
+% \env{tabular} environment, \mpkg{array}\sjax, \epkg{arydshln}\sjax,
+% \mpkg{bigdelim}\sjax, \mpkg{bigstrut}\sjax, \mpkg{booktabs}\sjax,
% \mpkg{colortbl}, \mpkg{ctable}, \mpkg{diagbox}, \epkg{longtable},
% \epkg{ltablex}, \epkg{ltxtable},
-% \mpkg{multirow}, \epkg{supertabular}, \epkg{tabularx}, \epkg{tabulary},
-% \epkg{threeparttable}, \mpkg{threeparttablex}, \epkg{xltabular}, \epkg{xtab}. \\
+% \mpkg{multirow}\sjax, \epkg{supertabular}, \epkg{tabularx}, \epkg{tabulary},
+% \epkg{threeparttable}, \mpkg{threeparttablex},
+% \epkg{widetable}, \epkg{xltabular}, \epkg{xtab}. \\
%
% \midrule
%
@@ -4936,7 +5122,7 @@ This boolean may be tested by the user for later use.
% \epkg{figsize}, \ipkg{fitbox},
% \spkg{grffile}, \epkg{media9}, \epkg{movie15}, \epkg{multimedia}, \mpkg{overpic},
% \mpkg{psfrag}, \mpkg{psfragx}, \mpkg{pst-eps}, \mpkg{pstool}, \mpkg{pstricks},
-% \spkg{rviewport}, \spkg{tikz-3dplot}. \\
+% \spkg{rviewport}, \mpkg{svg}, \spkg{svg-extract}, \spkg{tikz-3dplot}. \\
%
% \midrule
%
@@ -4984,8 +5170,9 @@ This boolean may be tested by the user for later use.
% \cs{bfseries}, etc.\ are only supported in some cases.
% \mpkg{cancel}, \epkg{ellipsis}, \mpkg{embrac}, \spkg{enparen},
% \ipkg{hyphenat}, \epkg{lettrine}, \epkg{lips},
-% \ipkg{lua-check-hyphen}, \ipkg{luacolor},
-% \epkg{magaz}, \ipkg{pdfrender}, \epkg{realscripts}, \mpkg{relsize},
+% \ipkg{lua-check-hyphen}, \ipkg{luacolor}, \epkg{magaz}, \ipkg{normalcolor},
+% \ipkg{pdfcol}, \ipkg{pdfcolmk},
+% \ipkg{pdfrender}, \epkg{realscripts}, \mpkg{relsize},
% \ipkg{scalefnt}, \epkg{soul}, \epkg{soulpos}, \epkg{soulutf8}, \mpkg{stackengine},
% \epkg{textfit}, \epkg{thinsp}, \ipkg{trimclip}, \ipkg{truncate},
% \mpkg{ulem}, \mpkg{umoline}, \ipkg{underscore}, \ipkg{uspace},
@@ -5036,16 +5223,17 @@ This boolean may be tested by the user for later use.
% \midrule
%
% Science and engineering: &
-% \mpkg{algorithm2e}, \mpkg{algorithmicx}, \mpkg{ar}, \spkg{askmaps},
+% \mpkg{algorithm2e}, \mpkg{algorithmicx}, \mpkg{ar}\sjax, \spkg{askmaps},
% \mpkg{axodraw2}, \mpkg{bitpattern}, \spkg{blochsphere}, \spkg{bodegraph},
% \spkg{bohr}, \mpkg{bytefield},
% \mpkg{chemfig}, \mpkg{chemformula}, \mpkg{chemgreek},
% \mpkg{chemmacros}, \mpkg{chemnum},
% \spkg{circuitikz}, \spkg{elements}, \spkg{engtlc}, \spkg{fast-diagram},
% \spkg{hepnicenames}, \spkg{heppennames}, \spkg{karnaughmap}, \mpkg{karnaugh-map},
-% \mpkg{listings}, \spkg{linop}, \mpkg{mhchem}, \spkg{pgfgantt},
-% \mpkg{phfqit}, \spkg{physics}, \spkg{qcircuit}, \mpkg{register}, \spkg{simpler-wick},
-% \spkg{slashed}, \spkg{structmech}, \mpkg{struktex}.
+% \mpkg{listings}, \spkg{linop}, \mpkg{mhchem}\sjax, \spkg{pgfgantt},
+% \mpkg{phfqit}, \spkg{physics}\sjax, \spkg{qcircuit},
+% \mpkg{register}, \spkg{simpler-wick},
+% \spkg{slashed}\sjax, \mpkg{steinmetz}\sjax, \spkg{structmech}, \mpkg{struktex}.
% \spkg{tikz-karnaugh}, \spkg{tikzcodeblocks} \\
%
% \midrule
@@ -5058,7 +5246,7 @@ This boolean may be tested by the user for later use.
%
% \midrule
%
-% Admonitions: & \epkg{notes}. \\
+% Admonitions: & \epkg{awesomebox}, \epkg{notes}. \\
%
% Editorial: & \ipkg{changebar}, \spkg{changelog}, \mpkg{changes},
% \mpkg{easy-todo}, \spkg{easyReview}, \mpkg{ed}, \mpkg{errata}, \mpkg{fixme},
@@ -5073,6 +5261,8 @@ This boolean may be tested by the user for later use.
%
% \midrule
%
+% Package handling: & \spkg{catoptions}. \\
+%
% Debug: & \ipkg{chkfloat}, \ipkg{cmdtrack}, \ipkg{dprogress},
% \ipkg{lua-visual-debug}, \ipkg{refcheck},
% \ipkg{srcltx}, \ipkg{srctex}, \ipkg{vpe}, \ipkg{xbmks}. \\
@@ -7631,14 +7821,14 @@ This boolean may be tested by the user for later use.
% \osportabilityusage
%
%
-% \subsection{Selecting actions for print or \HTML\ output}
+% \subsection{Selecting actions for print, \HTML, or \brand{MathJax} output}
% \label{sec:selectingoutput}
% \gindex{settings>selecting output}
% \changes{v0.15}{2016/04/05}{Docs: Clarify print/\HTML\ output.}
%
% The following environments and macros are used to select actions which only apply
% to either traditional \LaTeX{} print-formatted \PDF\ generation,
-% or to \HTML\ generation.
+% or to \HTML\ generation, or to \HTML\ with \brand{MathJax}.
%
% For most of built-in \LaTeX\ and many additional packages
% there is user-level source code support or emulation,
@@ -7651,8 +7841,8 @@ This boolean may be tested by the user for later use.
% the titlepage for print and another for \HTML.
% \DescribeEnv{warpHTML}
-% Anything which is to be done only for \HTMLfive{} output
-% is surrounded by a |warpHTML| environment:
+% Anything which is to be done only for \HTMLfive\ output
+% is surrounded by a \env{warpHTML} environment:
% \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4]
% \begin{warpHTML}
% ... something to be done only during \HTML\ generation
@@ -7664,7 +7854,7 @@ This boolean may be tested by the user for later use.
%
% \DescribeEnv{warpprint}
% Anything which is to be done only for print output
-% is surrounded by a |warpprint| environment:
+% is surrounded by a \env{warpprint} environment:
% \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4]
% \begin{warpprint}
% ... something to be done only during traditional \PDF\ generation
@@ -7675,7 +7865,7 @@ This boolean may be tested by the user for later use.
%
% \DescribeEnv{warpall}
% Anything which is to be done for any output
-% may be surrounded by a |warpall| environment. Doing so is optional.
+% may be surrounded by a \env{warpall} environment. Doing so is optional.
% \begin{Verbatim}[gobble=2,frame=lines,obeytabs,tabsize=4]
% \begin{warpall}
% ... something to be done during print \PDF\ or \HTML\ output
@@ -7694,6 +7884,10 @@ This boolean may be tested by the user for later use.
%
% Performs the given actions only when \HTML\ output is being generated.
%
+% \DescribeEnv{warpMathJax}
+% Anything which is to be done only while using \HTML\ output with \brand{MathJax}
+% is surrounded by a \env{warpMathJax} environment.
+% Usually, this is \cs{CustomizeMathJax}, used to add emulation macros.
%
%
% \subsection{Commands to be placed into the \env{warpprint} environment}
@@ -9089,12 +9283,19 @@ This boolean may be tested by the user for later use.
%
% \limitsmathdisplay
%
+%
% \subsubsection{\pkg{ntheorem} package}
%
% \DescribePackage{ntheorem}
% \limitsntheorem
%
%
+% \subsubsection{\pkg{mathtools} package}
+%
+% \DescribePackage{mathtools}
+% \limitsmathtools
+%
+%
% \subsubsection{\pkg{siunitx} package}
% \label{sec:limitssiunitx}
%
@@ -9107,7 +9308,18 @@ This boolean may be tested by the user for later use.
% \DescribePackage{units}
% \DescribePackage{nicefrac}
% \limitsnicefrac
-%
+%
+%
+% \subsubsection{\pkg{physics} package}
+% \label{sec:limitsphysics}
+%
+% \trouble{MathJax=\brand{MathJax}>physics=\pkg{physics}}
+% \trouble{physics=\pkg{physics}>MathJax=\brand{MathJax}}
+%
+% \DescribePackage{physics}
+% \limitsphysics
+%
+%
%
% \subsubsection{\pkg{newtxmath} package}
%
@@ -9408,7 +9620,7 @@ This boolean may be tested by the user for later use.
%
% \subsubsection{\pkg{chemformula} package}
% \limitschemformula
-% \trouble{array>chemformula=\pkg{chemformula}}
+% \trouble{array=\env{array}>chemformula=\pkg{chemformula}}
% \trouble{math>chemformula=\pkg{chemformula}}
%
%
@@ -9978,7 +10190,7 @@ This boolean may be tested by the user for later use.
%
% \begin{docsidebar}[\bool{WPMarkMath}]
% \trouble{TeXMaths}
-% \trouble{siunitx>with TeXMaths}
+% \trouble{siunitx=\pkg{siunitx}>with \prog{TeXMaths}}
% \margintag{siunitx}
% \DescribeBoolean{WPMarkMath} \DescribeDefault{false}
% \DescribeProgram{TeXMaths}
@@ -10490,6 +10702,10 @@ This boolean may be tested by the user for later use.
% of the package until \pkg{lwarp} is updated.
% \item[\pkg{longtable}:] \pkg{lwarp}'s \pkg{longtable} package issues
% detailed error messages regarding the use of the table headers and footers.
+% \item[\pkg{polyglossia}:] If used, an informative message is printed to
+% instruct the user to be sure to set a language, without which an error will occur.
+% \item[\pkg{babel} or \pkg{polyglossia}:] An informative message is printed to
+% note that not all langauges are supported by \pkg{cleveref}.
% \end{description}
%
% \subsubsection{Compiling}
@@ -10574,7 +10790,7 @@ This boolean may be tested by the user for later use.
%
% \item [``No room for a new \cs{write}.'':] Before |\usepackage{lwarp}|, add:
% \trouble{No room for a new \cs{write}}
-% \trouble{morewrites}
+% \trouble{morewrites=\pkg{morewrites}}
% \begin{sourcedisplay}
% \cs{usepackage}\{morewrites\} \\
% \cs{morewritessetup}\{allocate=10\}
@@ -10595,9 +10811,10 @@ This boolean may be tested by the user for later use.
% \end{sourcedisplay}
% \trouble{Label(s) may have changed}
%
-% \item [``Leaders not followed by proper glue'':] This can be caused by
-% a missing |l@<floattype>| or |l@<sectiontype>| definition.
-% See \pkg{lwarp}'s definitions for examples.
+% \item [``Leaders not followed by proper glue'':] ~ \\
+% This can be caused by
+% a missing |l@<floattype>| or |l@<sectiontype>| definition.
+% See \pkg{lwarp}'s definitions for examples.
% \trouble{Leaders not followed by proper glue}
%
% \item [``Improper \cs{prevdepth}'':]
@@ -10627,7 +10844,7 @@ This boolean may be tested by the user for later use.
% If using BibTeX, see \cref{sec:limitsbibtex}.\watchout[BibTeX]
%
% \item[``\texttt{!~Undefined control sequence. \dots\ \cs{@begindocumenthook}''}:] ~
-% \watchout[\pkg{polyglossia}]
+% \watchout[\pkg{polyglossia}] \\
% See \cref{sec:limitspolyglossia}
% if using \pkg{polyglossia}.
%
@@ -11085,9 +11302,14 @@ This boolean may be tested by the user for later use.
% Detects \XeTeX{} and \LuaLaTeX:
% \gindex{Xe\LaTeX>detection}\gindex{Lua\LaTeX>detection}
%
+% \changes{v0.63}{2018/11/25}{Added p\TeX support.}
+% \changes{v0.79}{2020/01/05}{\pkg{luatex85}: Removed.}
+% \changes{v0.79}{2020/01/05}{\pkg{ifpdf}, \pkg{ifptex}: Provided by \pkg{iftex}.}
% \begin{macrocode}
-\RequirePackage{iftex}
+\RequirePackage{iftex}[2019/11/07]
+
\newif\ifxetexorluatex
+
\ifXeTeX
\xetexorluatextrue
\else
@@ -11097,18 +11319,6 @@ This boolean may be tested by the user for later use.
\xetexorluatexfalse
\fi
\fi
-
-\ifLuaTeX
-\RequirePackage{luatex85}% until the geometry package is updated
-\fi
-
-\RequirePackage{ifpdf}
-% \end{macrocode}
-%
-% \changes{v0.63}{2018/11/25}{Added p\TeX support.}
-%
-% \begin{macrocode}
-\RequirePackage{ifptex}
% \end{macrocode}
%
%
@@ -11281,7 +11491,7 @@ This boolean may be tested by the user for later use.
{%
Package #1 is not supported\MessageBreak
by lwarp's HTML conversion.\MessageBreak
- Package(s) #2 may be useful instead
+ Package(s) #2 may be useful instead%
}
{%
Package #1 might conflict with lwarp in some way,\MessageBreak
@@ -11317,22 +11527,13 @@ This boolean may be tested by the user for later use.
% This version checks immediately for packages which may have been loaded before \pkg{lwarp}.
%
% \changes{v0.54}{2018/04/06}{Added.}
+% \changes{v0.79}{2020/01/09}{Factored.}
%
% \begin{macrocode}
\newcommand*{\LWR@earlyloadnever}[2]{%
-\@ifpackageloaded{#1}{%
-\PackageError{lwarp}
-{%
- Package #1 is not supported\MessageBreak
- by lwarp's HTML conversion.\MessageBreak
- Package(s) #2 may be useful instead
-}
-{%
- Package #1 might conflict with lwarp in some way,\MessageBreak
- or is superceded by another package.\MessageBreak
- For a possible alternative, see package(s) #2.
-}
-}{}%
+ \@ifpackageloaded{#1}{%
+ \LWR@loadnever{#1}{#2}%
+ }{}%
}
% \end{macrocode}
% \end{macro}
@@ -11386,9 +11587,27 @@ This boolean may be tested by the user for later use.
\LWR@earlyloadnever{aecc}{cm-super, lmodern}
\LWR@earlyloadnever{alg}{algorithm2e, algorithmicx}
\LWR@earlyloadnever{algorithmic}{algorithm2e, algorithmicx}
+\LWR@earlyloadnever{bitfield}{bytefield}
\LWR@earlyloadnever{boxedminipage}{boxedminipage2e}
\LWR@earlyloadnever{caption2}{caption}
% \LWR@earlyloadnever{ccaption}{caption}% might be preloaded by memoir
+\LWR@earlyloadnever{colortab}{colortbl}
+\LWR@earlyloadnever{doublespace}{setspace}
+\LWR@earlyloadnever{epsf}{graphicx}
+\LWR@earlyloadnever{fancyheadings}{fancyhdr}
+\LWR@earlyloadnever{fncylab}{cleveref}
+\LWR@earlyloadnever{glossary}{glossaries}
+\LWR@earlyloadnever{hyper}{hyperref}
+\LWR@earlyloadnever{newthm}{ntheorem}
+\LWR@earlyloadnever{pdfcprot}{microtype}
+\LWR@earlyloadnever{picinpar}{floatflt, wrapfig}
+\LWR@earlyloadnever{picins}{floatflt, wrapfig}
+\LWR@earlyloadnever{rplain}{fancyhdr}
+\LWR@earlyloadnever{si}{siunitx}
+\LWR@earlyloadnever{sistyle}{siunitx}
+\LWR@earlyloadnever{t1enc}{fontenc, inputenc, inputenx}
+\LWR@earlyloadnever{ucs}{inputenc, inputencx}
+\LWR@earlyloadnever{wasysym}{textcomp, amssymb, amsfonts, mnsymbol, fdsymbol}
% \end{macrocode}
% The older \pkg{CJK} and \pkg{CJKutf8} only work with \pkg{xeCJK}:
% \begin{macrocode}
@@ -11405,22 +11624,6 @@ This boolean may be tested by the user for later use.
% \begin{macrocode}
\LWR@earlyloadnever{hangul}{kotex, xetexko, luatexko}
% \end{macrocode}
-% Others:
-% \begin{macrocode}
-\LWR@earlyloadnever{colortab}{colortbl}
-\LWR@earlyloadnever{epsf}{graphicx}
-\LWR@earlyloadnever{fancyheadings}{fancyhdr}
-\LWR@earlyloadnever{fncylab}{cleveref}
-\LWR@earlyloadnever{glossary}{glossaries}
-\LWR@earlyloadnever{hyper}{hyperref}
-\LWR@earlyloadnever{pdfcprot}{microtype}
-\LWR@earlyloadnever{picinpar}{floatflt, wrapfig}
-\LWR@earlyloadnever{picins}{floatflt, wrapfig}
-\LWR@earlyloadnever{sistyle}{siunitx}
-\LWR@earlyloadnever{t1enc}{fontenc, inputenc, inputenx}
-\LWR@earlyloadnever{ucs}{inputenc, inputencx}
-\LWR@earlyloadnever{wasysym}{textcomp, amssymb, amsfonts, mnsymbol, fdsymbol}
-% \end{macrocode}
%
%
% \subsection{Enforcing package loading after \pkg{lwarp}}
@@ -11449,8 +11652,6 @@ This boolean may be tested by the user for later use.
\LWR@loadafter{acronym}
\LWR@loadafter{adjmulticol}
\LWR@loadafter{addlines}
-\LWR@loadafter{ae}
-\LWR@loadafter{aecc}
\LWR@loadafter{afterpage}
\LWR@loadafter{algorithm2e}
\LWR@loadafter{algorithmicx}
@@ -11470,6 +11671,7 @@ This boolean may be tested by the user for later use.
\LWR@loadafter{attachfile2}
\LWR@loadafter{authblk}
\LWR@loadafter{autonum}
+\LWR@loadafter{awesomebox}
\LWR@loadafter{axessibility}
\LWR@loadafter{axodraw2}
\LWR@loadafter{backnaur}
@@ -11481,13 +11683,14 @@ This boolean may be tested by the user for later use.
\LWR@loadafter{bigstrut}
\LWR@loadafter{bitpattern}
\LWR@loadafter{blowup}
+\LWR@loadafter{bm}
\LWR@loadafter{booklet}
\LWR@loadafter{bookmark}
\LWR@notmemoirloadafter{booktabs}
\LWR@loadafter{bophook}
\LWR@loadafter{bounddvi}
-\LWR@loadafter{boxedminipage}
\LWR@loadafter{boxedminipage2e}
+\LWR@loadafter{braket}
\LWR@loadafter{breakurl}
\LWR@loadafter{breqn}
\LWR@loadafter{bsheaders}
@@ -11557,7 +11760,6 @@ This boolean may be tested by the user for later use.
\LWR@loadafter{extramarks}
\LWR@loadafter{fancybox}
\LWR@loadafter{fancyhdr}
-\LWR@loadafter{fancyheadings}
\LWR@loadafter{fancyref}
\LWR@loadafter{fancytabs}
\LWR@loadafter{fancyvrb}
@@ -11708,9 +11910,16 @@ This boolean may be tested by the user for later use.
\LWR@notmemoirloadafter{pagenote}
\LWR@loadafter{pagesel}
\LWR@loadafter{paralist}
+\LWR@loadafter{parallel}
+\LWR@loadafter{parcolumns}
\LWR@loadafter{parnotes}
\LWR@notmemoirloadafter{parskip}
\LWR@loadafter{pbox}
+\LWR@loadafter{pdfcol}
+\LWR@loadafter{pdfcolfoot}
+\LWR@loadafter{pdfcolmk}
+\LWR@loadafter{pdfcolparallel}
+\LWR@loadafter{pdfcolparcolumns}
\LWR@loadafter{pdfcomment}
\LWR@loadafter{pdfcrypt}
\LWR@loadafter{pdflscape}
@@ -11724,6 +11933,7 @@ This boolean may be tested by the user for later use.
\LWR@loadafter{perpage}
\LWR@loadafter{pfnote}
\LWR@loadafter{phfqit}
+\LWR@loadafter{physics}
\LWR@loadafter{pifont}
\LWR@loadafter{placeins}
\LWR@loadafter{plarray}
@@ -11783,6 +11993,7 @@ This boolean may be tested by the user for later use.
\LWR@loadafter{SIunits}
\LWR@loadafter{siunitx}
\LWR@loadafter{slantsc}
+\LWR@loadafter{slashed}
\LWR@loadafter{soul}
\LWR@loadafter{soulpos}
\LWR@loadafter{soulutf8}
@@ -11791,12 +12002,14 @@ This boolean may be tested by the user for later use.
\LWR@loadafter{srctex}
\LWR@loadafter{stabular}
\LWR@loadafter{stackengine}
+\LWR@loadafter{steinmetz}
\LWR@notltjloadafter{stfloats}
\LWR@loadafter{struktex}
\LWR@loadafter{subcaption}
\LWR@loadafter{subfig}
\LWR@loadafter{subfigure}
\LWR@loadafter{supertabular}
+\LWR@loadafter{svg}
\LWR@loadafter{t1inc}
\LWR@loadafter{tabfigures}
\LWR@loadafter{tabls}
@@ -11844,6 +12057,7 @@ This boolean may be tested by the user for later use.
% \LWR@loadafter{ulem}% preloaded by ctexart and related classes
\LWR@loadafter{umoline}
\LWR@loadafter{underscore}
+\LWR@loadafter{unicode-math}
\LWR@loadafter{units}
\LWR@loadafter{unitsdef}
\LWR@loadafter{upref}
@@ -11859,7 +12073,9 @@ This boolean may be tested by the user for later use.
\LWR@loadafter{vwcol}
\LWR@loadafter{wallpaper}
\LWR@loadafter{watermark}
+\LWR@loadafter{widetable}
\LWR@loadafter{widows-and-orphans}
+\LWR@loadafter{witharrows}
\LWR@loadafter{wrapfig}
\LWR@loadafter{xbmks}
\LWR@loadafter{xcolor}
@@ -11885,7 +12101,6 @@ This boolean may be tested by the user for later use.
%
%
%
-%
% \section{MD5 hashing}
%
% The MD5 hash is used for \env{lateximage} filenames for \SVG\ math.
@@ -11925,7 +12140,8 @@ This boolean may be tested by the user for later use.
%
% \section{pdf\LaTeX\ T1 and \UTF-8 encoding}
%
-% When using pdf\LaTeX, \pkg{lwarp} requires T1 encoding, and recommends \UTF-8 encoding.
+% When using pdf\LaTeX, \pkg{lwarp} requires T1 font encoding,
+% and recommends \UTF-8 input encoding.
%
% If some other input encoding is already defined, \pkg{lwarp} will
% try to use it instead, and hope for the best.
@@ -11987,7 +12203,7 @@ This boolean may be tested by the user for later use.
\newunicodechar{⨯}{\texttimes}
\ifPDFTeX% pdflatex or dvi latex
-\newunicodechar{ff}{ff}% the first arguments are ligatures
+\newunicodechar{ff}{ff}% Here, the first arguments are ligatures.
\newunicodechar{fi}{fi}
\newunicodechar{fl}{fl}
\newunicodechar{ffi}{ffi}
@@ -12055,8 +12271,11 @@ This boolean may be tested by the user for later use.
%
%
%
+%
+%
% \section{Miscellaneous tools}
%
+%
% \subsection{Lengths and units}
%
% \begin{macro}{\LWR@providelength} \marg{\cs{lengthname}}
@@ -12095,6 +12314,19 @@ This boolean may be tested by the user for later use.
% \end{macro}
+% \subsection{Counters}
+
+% \begin{macro}{\defaddtocounter} \marg{name} \marg{value}
+%
+% Locally add to a counter.
+% \begin{macrocode}
+\providecommand*{\defaddtocounter}[2]{%
+ \defcounter{#1}{\value{#1}+#2}%
+}
+% \end{macrocode}
+% \end{macro}
+
+
% \subsection{Patching}
% \begin{macro}{\LWR@patcherror} \marg{packagename} \marg{macroname}
@@ -12104,7 +12336,7 @@ This boolean may be tested by the user for later use.
\newcommand*{\LWR@patcherror}[2]{%
\PackageError{lwarp}
{Unable to patch package #1, macro #2}
-{Please contact the author of the lwarp package.}
+{Please contact the author of the Lwarp package.}
}
% \end{macrocode}
% \end{macro}
@@ -12218,6 +12450,26 @@ This boolean may be tested by the user for later use.
% \end{environment}
%
%
+% \subsection{Converting a macro name to a cs name}
+%
+% \begin{macro}{\macrotocsname} \marg{macro name with backslash}
+%
+% Results in the macro name without the leading backslash.
+%
+% Ref: \href{https://tex.stackexchange.com/questions/42318/removing-a-backslash-from-a-character-sequence}
+% {\texttt{https://tex.stackexchange.com/questions/42318/removing-a-backslash-from-a-character-sequence}}
+%
+% \changes{v0.79}{2020/01/18}{Added.}
+% \begin{macrocode}
+\newcommand*{\macrotocsname}[1]{%
+ \ifcat\relax\noexpand#1%
+ \expandafter\expandafter\expandafter\@gobble\expandafter\string
+ \fi
+ #1%
+}
+% \end{macrocode}
+% \end{macro}
+%
%
% \section{Operating-System portability}
% \label{sec:OSportability}
@@ -12977,34 +13229,53 @@ This boolean may be tested by the user for later use.
% \end{environment}
-% \begin{environment}{warpprint}
% \begin{environment}{warpHTML}
-% Anything in the |warpprint| environment will be generated for print output only.
%
% For \HTML\ output:
% \begin{macrocode}
\ifbool{warpingHTML}
-{\includecomment{warpHTML}}
-{\excludecomment{warpHTML}}%
+ {\includecomment{warpHTML}}
+ {\excludecomment{warpHTML}}%
% \end{macrocode}
+% \end{environment}
+% \begin{environment}{warpprint}
+%
+% Anything in the |warpprint| environment will be generated for print output only.
% \begin{macrocode}
\ifbool{warpingprint}
-{\includecomment{warpprint}}
-{\excludecomment{warpprint}}
+ {\includecomment{warpprint}}
+ {\excludecomment{warpprint}}
% \end{macrocode}
-
% \end{environment}
+
+
+% \begin{environment}{warpMathJax}
+% Only if \brand{MathJax} is being used along with \HTML.
+% \changes{v0.79}{2020/01/26}{Added.}
+% \begin{macrocode}
+\begin{warpprint}
+\excludecomment{warpMathJax}
+\end{warpprint}
+
+\begin{warpHTML}
+\ifbool{mathjax}
+ {\includecomment{warpMathJax}}
+ {\excludecomment{warpMathJax}}
+\end{warpHTML}
+% \end{macrocode}
% \end{environment}
+% \begin{environment}{LWR@creatinglwarpmk}
% Optionally generate a local copy of \prog{lwarpmk}.
% Default to no.
% \begin{macrocode}
\ifbool{LWR@creatinglwarpmk}
-{\includecomment{LWR@createlwarpmk}}
-{\excludecomment{LWR@createlwarpmk}}
+ {\includecomment{LWR@createlwarpmk}}
+ {\excludecomment{LWR@createlwarpmk}}
% \end{macrocode}
+% \end{environment}
%
%
%
@@ -13283,8 +13554,9 @@ This boolean may be tested by the user for later use.
% \end{macrocode}
%
% The user's paper size is saved for later reuse,
-% such as by the \pkg{pdfpages} package.
-% \begin{macrocode}
+% such as by the \pkg{pdfpages} or \pkg{parallel} packages.
+% \changes{v0.79}{2019/12/29}{\pkg{geometry}: Also save \cs{textwidth}, \cs{textheight}.}
+%% \begin{macrocode}
\newlength{\LWR@userspaperwidth}
\setlength{\LWR@userspaperwidth}{\paperwidth}
@@ -13293,6 +13565,12 @@ This boolean may be tested by the user for later use.
\newlength{\LWR@usersmarginparwidth}
\setlength{\LWR@usersmarginparwidth}{\marginparwidth}
+
+\newlength{\LWR@userstextwidth}
+\setlength{\LWR@userstextwidth}{\textwidth}
+
+\newlength{\LWR@userstextheight}
+\setlength{\LWR@userstextwidth}{\textheight}
% \end{macrocode}
%
% For \pkg{lwarp}, use a very large page and margins
@@ -13585,15 +13863,15 @@ This boolean may be tested by the user for later use.
% \changes{v0.49}{2018/02/19}{Fix: Group \pkg{printlen} changes.}
% \begin{macrocode}
\newrobustcmd*{\LWR@printlength}[1]{%
-\begingroup%
-\uselengthunit{PT}%
-\renewcommand*{\unitspace}{}%
-\ifdimless{#1}{10pt}{%
- \printlength{#1}%
-}{%
- \rndprintlength{#1}%
-}%
-\endgroup%
+ \begingroup%
+ \uselengthunit{PT}%
+ \renewcommand*{\unitspace}{}%
+ \ifdimless{#1}{10pt}{%
+ \printlength{#1}%
+ }{%
+ \rndprintlength{#1}%
+ }%
+ \endgroup%
}
% \end{macrocode}
% \end{macro}
@@ -13692,18 +13970,20 @@ This boolean may be tested by the user for later use.
% \changes{v0.66}{2019/01/04}{Prevented \pkg{colortab}, \pkg{epsf}, \pkg{hyper}, \pkg{picinpar},
% \pkg{picins}, \pkg{sistyle}, \pkg{ucs}.}
% \changes{v0.68}{2019/02/26}{Prevented \pkg{alg}, \pkg{algorithmic}, \pkg{fncylab}, \pkg{pdfcprot}.}
+% \changes{v0.79}{2020/01/09}{Prevented \pkg{bxcjkjatype}, \pkg{hangul}.}
%
% The following should never be loaded:
% \begin{macrocode}
\newcommand*{\LWR@checkloadfilename}[1]{%
-\LWR@checkloadnever{#1}{ae}{latinmodern}
-\LWR@checkloadnever{#1}{aecc}{latinmodern}
+\LWR@checkloadnever{#1}{ae}{cm-super, lmodern}
+\LWR@checkloadnever{#1}{aecc}{cm-super, lmodern}
+\LWR@checkloadnever{#1}{aecompl}{cm-super, lmodern}
\LWR@checkloadnever{#1}{alg}{algorithm2e, algorithmicx}
\LWR@checkloadnever{#1}{algorithmic}{algorithm2e, algorithmicx}
\LWR@checkloadnever{#1}{bitfield}{bytefield}
\LWR@checkloadnever{#1}{boxedminipage}{boxedminipage2e}
\LWR@checkloadnever{#1}{caption2}{caption}
-\LWR@checkloadnever{#1}{ccaption}{caption}
+\LWR@checkloadnever{#1}{ccaption}{caption}% might be preloaded by memoir
\LWR@checkloadnever{#1}{colortab}{colortbl}
\LWR@checkloadnever{#1}{doublespace}{setspace}
\LWR@checkloadnever{#1}{epsf}{graphicx}
@@ -13721,6 +14001,8 @@ This boolean may be tested by the user for later use.
\LWR@checkloadnever{#1}{t1enc}{fontenc, inputenc, inputenx}
\LWR@checkloadnever{#1}{ucs}{inputenc, inputencx}
\LWR@checkloadnever{#1}{wasysym}{textcomp, amssymb, amsfonts, mnsymbol, fdsymbol}
+\LWR@checkloadnever{#1}{bxcjkjatype}{upLaTeX, bxjsarticle, ujarticle, utarticle}
+\LWR@checkloadnever{#1}{hangul}{kotex, xetexko, luatexko}
% \end{macrocode}
%
% ^^A *loadbefore
@@ -13895,27 +14177,48 @@ This boolean may be tested by the user for later use.
% Uses the original package, including options.
% \begin{macrocode}
\NewDocumentCommand{\LWR@ProvidesPackagePass}{m o}{
-\PackageInfo{lwarp}{%
- Using package `#1' and adding lwarp modifications,\MessageBreak
- including options,}%
-\IfValueTF{#2}
- {\ProvidesPackage{lwarp-#1}[#2]}
- {\ProvidesPackage{lwarp-#1}}
-\DeclareOption*{%
- \PassOptionsToPackage{\CurrentOption}{#1}%
-}
-\ProcessOptions\relax%
-\IfValueTF{#2}%
- {\LWR@origRequirePackage{#1}[#2]}%
- {\LWR@origRequirePackage{#1}}%
+ \PackageInfo{lwarp}{%
+ Using package `#1' and adding lwarp modifications,\MessageBreak
+ including options,}%
+ \IfValueTF{#2}%
+ {\ProvidesPackage{lwarp-#1}[#2]}%
+ {\ProvidesPackage{lwarp-#1}}%
+ \DeclareOption*{%
+ \PassOptionsToPackage{\CurrentOption}{#1}%
+ }%
+ \ProcessOptions\relax%
+% \end{macrocode}
+%
+% If using \pkg{catoptions}, an error occurs if a package is loaded with an option
+% then loaded again with no options. \pkg{lwarp} does this if a package is preloaded
+% then later patched. To avoid an error while using \pkg{catoptions},
+% if a package has already been loaded, it is loaded again with its original options.
+% \changes{v0.79}{2019/12/31}{Fix: \pkg{catoptions}.}
+% \begin{macrocode}
+ \@ifpackageloaded{#1}{%
+ \edef\LWR@tempone{\csuse{opt@#1.sty}}%
+ \IfValueTF{#2}%
+ {%
+ \expandafter\LWR@origRequirePackage%
+ \expandafter[\LWR@tempone]{#1}[#2]%
+ }%
+ {%
+ \expandafter\LWR@origRequirePackage%
+ \expandafter[\LWR@tempone]{#1}%
+ }%
+ }{%
+ \IfValueTF{#2}%
+ {\LWR@origRequirePackage{#1}[#2]}%
+ {\LWR@origRequirePackage{#1}}%
+ }%
% \end{macrocode}
% In some cases, the following seems to be required
% to avoid an ``unknown option'' error, such
% as when loading \pkg{xcolor} with options.
% \changes{v0.62}{2018/11/11}{Fix: Unknown option error.}
% \begin{macrocode}
-\DeclareOption*{}%
-\ProcessOptions\relax%
+ \DeclareOption*{}%
+ \ProcessOptions\relax%
}
% \end{macrocode}
% \end{macro}
@@ -15457,6 +15760,7 @@ This boolean may be tested by the user for later use.
% \changes{v0.74}{2019/08/04}{\filenm{lwarp.css}: Added \pkg{lyluatex}.}
% \changes{v0.75}{2019/09/22}{\filenm{lwarp.css}: Improved marginblock.}
% \changes{v0.76}{2019/10/02}{\filenm{lwarp.css}: Fix for small caps.}
+% \changes{v0.79}{2020/01/17}{\filenm{lwarp.css}: Fix: Nested \env{tabular}s.}
%
% ^^A *lwarp.css
%
@@ -15465,8 +15769,8 @@ This boolean may be tested by the user for later use.
\begin{LWRwriteconf}
\begin{filecontents*}[overwrite]{lwarp.css}
/*
- CSS stylesheet for the LaTeX lwarp package
- Copyright 2016-2019 Brian Dunn — BD Tech Concepts LLC
+ CSS stylesheet for the LaTeX Lwarp package
+ Copyright 2016-2020 Brian Dunn — BD Tech Concepts LLC
*/
@@ -16453,7 +16757,7 @@ table {
line-height: 1.3 ;
}
-tr.hline td {border-top: 1px solid #808080 ; margin-top: 0ex ;
+table > tbody > tr.hline > td {border-top: 1px solid #808080 ; margin-top: 0ex ;
margin-bottom: 0ex ; } /* for \hline */
tr.tbrule td {border-top: 1px solid black ; margin-top: 0ex ;
@@ -18022,10 +18326,10 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js?config=TeX-
\begin{filecontents*}[overwrite]{lwarpmk.lua}
#!/usr/bin/env texlua
--- Copyright 2016-2019 Brian Dunn
+-- Copyright 2016-2020 Brian Dunn
-printversion = "v0.78"
+printversion = "v0.79"
requiredconfversion = "2" -- also at *lwarpmk.conf
function printhelp ()
@@ -18752,7 +19056,7 @@ else -- not --version
-- print intro:
-print ("lwarpmk: " .. printversion .. " Automated make for the LaTeX lwarp package.")
+print ("lwarpmk: " .. printversion .. " Automated make for the LaTeX Lwarp package.")
-- lwarpmk print:
@@ -19198,15 +19502,16 @@ end -- not --version
%
% \begin{macro}{\LWR@setexparray} \marg{name} \marg{index} \marg{contents}
% \changes{v0.66}{2018/12/31}{Fix with \cs{par}.}
+% \changes{v0.79}{2020/01/18}{Fix: Nested \env{tabular}s.}
% \begin{macrocode}
\NewDocumentCommand{\LWR@setexparray}{m m m}{%
- \begingroup%
+ \let\LWR@temp@par\par%
\let\par\relax%
- \xdef\LWR@thisexparrayname{#1#2}%
+ \edef\LWR@thisexparrayname{#1#2}%
\ifstrempty{#3}%
- {\csgdef{\LWR@thisexparrayname}{}}%
- {\csxdef{\LWR@thisexparrayname}{#3}}%
- \endgroup%
+ {\csdef{\LWR@thisexparrayname}{}}%
+ {\csedef{\LWR@thisexparrayname}{#3}}%
+ \let\par\LWR@temp@par%
}
% \end{macrocode}
% \end{macro}
@@ -19249,8 +19554,8 @@ end -- not --version
% \changes{v0.33}{2017/06/20}{Add: Avoids error: \protect\texttt{Misplaced alignment tab character \&}.}
% \begin{macrocode}
\newcommand{\StartDefiningTabulars}{%
-\LWR@traceinfo{StartDefiningTabulars}%
-\warpHTMLonly{\catcode`\&=\active}%
+ \LWR@traceinfo{StartDefiningTabulars}%
+ \warpHTMLonly{\catcode`\&=\active}%
}
% \end{macrocode}
% \end{macro}
@@ -19258,8 +19563,8 @@ end -- not --version
% \begin{macro}{\StopDefiningTabulars} Place after defining something with |&| in it.
% \begin{macrocode}
\newcommand{\StopDefiningTabulars}{%
-\LWR@traceinfo{StopDefiningTabulars}%
-\warpHTMLonly{\catcode`\&=4}%
+ \LWR@traceinfo{StopDefiningTabulars}%
+ \warpHTMLonly{\catcode`\&=4}%
}
% \end{macrocode}
% \end{macro}
@@ -19280,8 +19585,8 @@ end -- not --version
% \changes{v0.57}{2018/05/23}{Added.}
% \begin{macrocode}
\newcommand{\StartDefiningMath}{%
-\LWR@traceinfo{StartDefiningMath}%
-\warpHTMLonly{\catcode`\$=\active}%
+ \LWR@traceinfo{StartDefiningMath}%
+ \warpHTMLonly{\catcode`\$=\active}%
}
% \end{macrocode}
% \end{macro}
@@ -19289,8 +19594,8 @@ end -- not --version
% \begin{macro}{\StopDefiningMath} Place after defining something with |$| in it.
% \begin{macrocode}
\newcommand{\StopDefiningMath}{%
-\LWR@traceinfo{StopDefiningMath}%
-\warpHTMLonly{\catcode`\$=3}% math shift
+ \LWR@traceinfo{StopDefiningMath}%
+ \warpHTMLonly{\catcode`\$=3}% math shift
}
% \end{macrocode}
% \end{macro}
@@ -21607,7 +21912,7 @@ end -- not --version
\expandafter\ifvoid\csname LWR@#1box\endcsname\else
\LWR@forcenewpage
\begin{BlockClass}{footnotes}
- \LWR@origmedskip
+ \null
\unvbox\csuse{LWR@#1box}
\setbox\csuse{LWR@#1box}=\vbox{}
\end{BlockClass}
@@ -21658,7 +21963,7 @@ end -- not --version
\ifvoid\LWR@mpfootnotes\else
\LWR@forcenewpage
\begin{BlockClass}{footnotes}
- \LWR@print@vspace*{\baselineskip}
+ \null
\unvbox\LWR@mpfootnotes
\setbox\LWR@mpfootnotes=\vbox{}
\end{BlockClass}
@@ -22105,6 +22410,110 @@ end -- not --version
% \end{macro}
+
+% \subsection{Sanitizing expressions for \HTML}
+
+% Math expressions are converted to |lateximage|s,
+% and some math environments may contain
+% |&|, |<|, or |>|, which should not be allowed
+% inside an \HTML\ \element{alt} tag, so must convert them to \HTML\ entities.
+%
+%
+% \begin{macro}{\LWR@subHTMLsanitize}
+%
+% \cs{LWR@strresult} must first be set by \cs{LWR@HTMLsanitize},
+% \cs{LWR@HTMLsanitizeexpand}, or \cs{CustomizeMathJax}.
+%
+% \changes{v0.36}{2017/08/16}{Fix for \pkg{babel-french}.}
+% \changes{v0.51}{2018/03/07}{Fix: Escapes double quotes.}
+% \changes{v0.79}{2020/01/27}{Fix: \cs{\&}. Factored.}
+% \begin{macrocode}
+\newcommand{\LWR@subHTMLsanitize}{%
+% \end{macrocode}
+% The |&|, |<|, and |>| may be interpreted by the browser:
+% \begin{macrocode}
+ \protect\StrSubstitute{\detokenize\expandafter{\LWR@strresult}}%
+ {\detokenize{&}}{\detokenize{&amp;}}[\LWR@strresult]%
+% \end{macrocode}
+% \begin{macrocode}
+ \protect\StrSubstitute{\detokenize\expandafter{\LWR@strresult}}%
+ {\detokenize{<}}{\detokenize{&lt;}}[\LWR@strresult]%
+% \end{macrocode}
+% \begin{macrocode}
+ \protect\StrSubstitute{\detokenize\expandafter{\LWR@strresult}}%
+ {\detokenize{>}}{\detokenize{&gt;}}[\LWR@strresult]%
+% \end{macrocode}
+% The double quote occasionally causes problems.
+% \begin{macrocode}
+ \protect\StrSubstitute{\detokenize\expandafter{\LWR@strresult}}%
+ {\detokenize{"}}{\detokenize{&quot;}}[\LWR@strresult]%
+% \end{macrocode}
+% MathJax allows expressions to be defined with \cs{newcommand}.
+% These expressions would appear with |##| for each argument,
+% and each must be changed to a single |#|.
+% This must be done after all the above changes.
+% Attempting another conversion after this causes an error upon further expansion.
+% \begin{macrocode}
+ \protect\StrSubstitute{\detokenize\expandafter{\LWR@strresult}}%
+ {\detokenize{##}}{\LWR@origpound}[\LWR@strresult]%
+% \end{macrocode}
+% \begin{macrocode}
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\LWR@HTMLsanitize} \marg{text}
+%
+% \begin{macrocode}
+\newrobustcmd{\LWR@HTMLsanitize}[1]{%
+% \end{macrocode}
+% Cancel French \pkg{babel} character handling,
+% and fully expand the strings:
+% \begin{macrocode}
+ \begingroup%
+ \LWR@FBcancel%
+ \fullexpandarg%
+ \protect\StrSubstitute{\detokenize{#1}}%
+ {\detokenize{\&}}{\detokenize{&}}[\LWR@strresult]%
+ \LWR@subHTMLsanitize%
+ \LWR@strresult%
+ \endgroup%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\LWR@HTMLsanitizeexpand} \marg{text}
+%
+% This version expands the argument before sanitizing it.
+%
+% \changes{v0.36}{2017/08/16}{Fix for \pkg{babel-french}.}
+% \changes{v0.51}{2018/03/07}{Fix: Escapes double quotes.}
+% \changes{v0.79}{2020/01/27}{Fix: \cs{\&}.}
+% \begin{macrocode}
+\newrobustcmd{\LWR@HTMLsanitizeexpand}[1]{%
+% \end{macrocode}
+% Cancel French \pkg{babel} character handling,
+% and fully expand the strings:
+% \begin{macrocode}
+ \begingroup%
+ \LWR@FBcancel%
+ \fullexpandarg%
+% \end{macrocode}
+% The difference between this and \cs{LWR@HTMLsanitize} (without ``expand'')
+% is the following \cs{expandafter}:
+% \begin{macrocode}
+ \protect\StrSubstitute{\detokenize\expandafter{#1}}%
+ {\detokenize{\&}}{\detokenize{&}}[\LWR@strresult]%
+ \LWR@subHTMLsanitize%
+ \LWR@strresult%
+ \endgroup%
+}
+% \end{macrocode}
+% \end{macro}
+
+
% \subsection{Customizing \brand{MathJax}}
% \begin{macro}{\LWR@customizedMathJax}
@@ -22119,22 +22528,62 @@ end -- not --version
%
% \limitscustomizemathjax
%
+%
% \changes{v0.52}{2018/03/31}{Added.}
+% \changes{v0.79}{2020/01/22}{Fix: Sanitize for \HTML.}
% \begin{macrocode}
-\newcommand*{\CustomizeMathJax}[1]{%
- \appto{\LWR@customizedMathJax}{%
- \(#1\)\par
+\newcommand*{\LWR@subcustomizedmathjax}[1]{%
+ \begingroup%
+ \LWR@FBcancel%
+ \fullexpandarg%
+ \protect\StrSubstitute{\detokenize{#1}}%
+ {\detokenize{\&}}{\detokenize{&}}[\LWR@strresult]%
+ \LWR@subHTMLsanitize%
+ \xdef\LWR@customizedMathJax{%
+ \LWR@customizedMathJax%
+ \LWR@strresult%
}%
+ \endgroup%
+}
+
+\newcommand*{\CustomizeMathJax}[1]{%
+ \appto\LWR@customizedMathJax{\LWRbackslash(}%
+ \LWR@subcustomizedmathjax{#1}%
+ \appto\LWR@customizedMathJax{\LWRbackslash)\par}%
}
% \end{macrocode}
% \end{macro}
+%
+%
+% Default customizations:
+%
+% \changes{v0.51}{2018/03/18}{MathJax: Nullifies \cs{ensuremath}.}
+% \changes{v0.57}{2018/05/24}{MathJax: Supports \cs{footnote}, \cs{footnotemark}.}
+% \changes{v0.79}{2020/01/24}{\brand{MathJax}: Additional macros.}
+% \begin{macrocode}
+\begin{warpMathJax}
+\CustomizeMathJax{\newcommand\ensuremath[1]{#1}}
+\CustomizeMathJax{\newcommand\footnote[2][]{\text{( Footnote #1 )}}}
+\CustomizeMathJax{\newcommand\footnotemark[1][]{\text{( Footnote #1 )}}}
+\CustomizeMathJax{% absorb two optional arguments
+ \newcommand{\LWRframebox}[2][]{\fbox{#2}}
+ \newcommand{\framebox}[1][]{\LWRframebox}
+}
+\CustomizeMathJax{\newcommand{\setlength}[2]{}}
+\CustomizeMathJax{\newcommand{\addtolength}[2]{}}
+\CustomizeMathJax{\newcommand{\setcounter}[2]{}}
+\CustomizeMathJax{\newcommand{\addtocounter}[2]{}}
+\CustomizeMathJax{\newcommand{\cline}[1]{}}
+\CustomizeMathJax{\newcommand{\directlua}[1]{\text{(directlua)}}}
+\CustomizeMathJax{\newcommand{\luatexdirectlua}[1]{\text{(directlua)}}}
+\end{warpMathJax}
+% \end{macrocode}
% \begin{macro}{\LWR@customizeMathJax}
% Prints MathJax commands to the \HTML\ output.
%
-% \changes{v0.51}{2018/03/18}{MathJax: Nullifies \cs{ensuremath}.}
-% \changes{v0.57}{2018/05/24}{MathJax: Supports \cs{footnote}, \cs{footnotemark}.}
+% \changes{v0.79}{2020/01/28}{MathJax: Hide definitions.}
% \begin{macrocode}
\newcommand{\LWR@customizeMathJax}{%
\ifbool{mathjax}{
@@ -22142,17 +22591,13 @@ end -- not --version
% ^^A \ifboolexpr{bool{mathjax} and not bool{mathKaTeX}}{
% \begin{macrocode}
\LWR@stoppars
-\LWR@htmlcomment{Nullify \textbackslash{}ensuremath, footnotes for MathJax:}
-
-\(\newcommand\ensuremath[1]{##1}\)
-
-\(\newcommand\footnote[2][]{\text{( Footnote ##1 )}}\)
-
-\(\newcommand\footnotemark[1][]{\text{( Footnote ##1 )}}\)
-
-\LWR@htmlcomment{Additional customizations for MathJax:}
+\LWR@htmlcomment{MathJax customizations:}
+\begin{BlockClass}{hidden}
+\LWR@stoppars
\LWR@customizedMathJax
+\LWR@startpars
+\end{BlockClass}
\LWR@startpars
}{}
@@ -22490,10 +22935,7 @@ end -- not --version
% \end{macrocode}
%
-% If using \brand{MathJax},
-% disable \cs{ensuremath} by printing a nullified
-% definition at the start of each file, and add further customizations:
-% \changes{v0.51}{2018/03/18}{MathJax: Nullifies \cs{ensuremath}.}
+% If using \brand{MathJax}, print the customizations here.
% \begin{macrocode}
\LWR@customizeMathJax
% \end{macrocode}
@@ -23478,7 +23920,7 @@ end -- not --version
\LWR@htmltag{%
meta % space
name=\LWR@orig@textquotedbl{}generator\LWR@orig@textquotedbl\ % space
- content=\LWR@orig@textquotedbl{}LaTeX lwarp package\LWR@orig@textquotedbl\ /%
+ content=\LWR@orig@textquotedbl{}LaTeX Lwarp package\LWR@orig@textquotedbl\ /%
}\LWR@orignewline%
% \end{macrocode}
% If there is a description, add it now:
@@ -25540,7 +25982,7 @@ end -- not --version
% \end{macrocode}
% \end{macro}
-% \cs{futurelet} copies the next token then executes a function to analyze
+% \cs{futurelet} copies the next token then executes a function to analyze it.
% \cs{LWR@futurenonspacelet} does the same, but ignores intervening white space
@@ -25550,10 +25992,13 @@ end -- not --version
% \begin{macrocode}
\def\LWR@futurenonspacelet#1{\def\LWR@cs{#1}%
\afterassignment\LWR@fnslone\let\nexttoken= }
+
\def\LWR@fnslone{\expandafter\futurelet\LWR@cs\LWR@fnsltwo}
+
\def\LWR@fnsltwo{%
\expandafter\ifx\LWR@cs\@sptoken\let\next=\LWR@fnslthree%
\else\let\next=\nexttoken\fi\next}
+
\def\LWR@fnslthree{\afterassignment\LWR@fnslone\let\next= }
% \end{macrocode}
% \end{macro}
@@ -25562,15 +26007,19 @@ end -- not --version
% Looks ahead and copies the next token into \cs{LWR@mynexttoken}.
% \begin{macrocode}
\newcommand*{\LWR@getmynexttoken}{%
-\LWR@traceinfo{LWR@getmynexttoken}%
+ \LWR@traceinfo{LWR@getmynexttoken}%
% nothing must follow this next line
-\LWR@futurenonspacelet\LWR@mynexttoken\LWR@tabledatacolumntag
+ \LWR@futurenonspacelet\LWR@mynexttoken\LWR@tabledatacolumntag
}
% \end{macrocode}
% \end{macro}
% \subsection{Tabular variables}
+%
+% In order to support nested \env{tabular}s, each of these is used locally.
+% For local counters, \pkg{etoolbox}'s \cs{defcounter} and
+% \pkg{lwarp}'s new \cs{defaddtocounter} are used.
% \DescribeBoolean{LWR@startedrow}
% True if should print a row tag before this column.
@@ -25677,6 +26126,40 @@ end -- not --version
% \end{macrocode}
+% \DescribeBoolean{LWR@exitingtabular}
+% When \cs{end} is found, turns off the next opening data tag.
+% \begin{macrocode}
+\newbool{LWR@exitingtabular}
+% \end{macrocode}
+
+
+% \DescribeBoolean{LWR@tabularmutemods}
+% Mutes \HTML\ output for |@|, |!|, |<| and |>|.
+%
+% This is used while printing the final row to generate \cs{bottomrule}s.
+% \begin{macrocode}
+\newbool{LWR@tabularmutemods}
+% \end{macrocode}
+
+
+% \DescribeBoolean{LWR@validtablecol} True if found a valid table column type.
+% \begin{macrocode}
+\newbool{LWR@validtablecol}
+% \end{macrocode}
+%
+%
+% \DescribeBoolean{LWR@opttablecol} True if found a table column optional argument.
+% \begin{macrocode}
+\newbool{LWR@opttablecol}
+% \end{macrocode}
+
+% Used to add a style to a table data cell:
+% \begin{macrocode}
+\newbool{LWR@tdhavecellstyle}
+% \end{macrocode}
+
+
+
% \DescribeCounter{LWR@tabularDepth}
% Tracks whether |&| is being used inside a \env{tabular}.
% \begin{macrocode}
@@ -25788,6 +26271,57 @@ end -- not --version
% \DescribeObject{LWR@colbarspec} A data array of specifications for vertical rules.
+
+% \DescribeCounter{LWR@cellcolordepth}
+% Counts how many cell color \element{div}s were added to the current tabular data cell.
+% \begin{macrocode}
+\newcounter{LWR@cellcolordepth}
+% \end{macrocode}
+
+
+
+% \subsubsection{Multicolumn variables}
+
+% \begin{macrocode}
+\newcounter{LWR@tablemulticolswidth}
+% \end{macrocode}
+%
+% Indexes into the multicolumn specification:
+% \begin{macrocode}
+\newcounter{LWR@tablemulticolspos}
+% \end{macrocode}
+
+% Remembers multicolumn vertical rules if found in the column spec.
+% \begin{macrocode}
+\newcounter{LWR@mcolvertbarsl}
+\newcounter{LWR@mcolvertbarsr}
+\newcounter{LWR@mcolvertbarsldash}
+\newcounter{LWR@mcolvertbarsrdash}
+\newbool{LWR@mcolvertbaronleft}
+% \end{macrocode}
+
+
+% \subsubsection{Longtable variables}
+% \DescribeBoolean{LWR@starredlongtable}
+% Per the \pkg{caption} pacakge, step the counter if |longtable*|.
+%
+% \begin{macrocode}
+\newbool{LWR@starredlongtable}
+\boolfalse{LWR@starredlongtable}
+% \end{macrocode}
+%
+
+% \subsubsection{Midrule variables}
+
+% \DescribeCounter{LWR@midrulecounter}
+% Indexes across the |LWR@midrules| and |LWR@trim<l/r>rules| data arrays.
+% \begin{macrocode}
+\newcounter{LWR@midrulecounter}
+% \end{macrocode}
+
+
+
+
% \subsection{Handling \&, @, !, and bar}
%
% \begin{minipage}{\linewidth}
@@ -25800,12 +26334,12 @@ end -- not --version
% \begin{macro}{\LWR@instertatbangcols}
% \begin{macrocode}
\newcommand*{\LWR@insertatbangcols}{%
-\ifbool{LWR@skipatbang}%
-{}%
-{%
- \LWR@printatbang{at}{\arabic{LWR@tableLaTeXcolindex}}%
- \LWR@printatbang{bang}{\arabic{LWR@tableLaTeXcolindex}}%
-}%
+ \ifbool{LWR@skipatbang}%
+ {}%
+ {%
+ \LWR@printatbang{at}{\arabic{LWR@tableLaTeXcolindex}}%
+ \LWR@printatbang{bang}{\arabic{LWR@tableLaTeXcolindex}}%
+ }%
}
% \end{macrocode}
% \end{macro}
@@ -25821,50 +26355,53 @@ end -- not --version
%
% \begin{macrocode}
\newcommand*{\LWR@closetabledatacell}{%
-\global\booltrue{LWR@intabularmetadata}%
-\ifbool{LWR@exitingtabular}%
-{%
+ \booltrue{LWR@intabularmetadata}%
+ \ifbool{LWR@exitingtabular}%
+ {%
% \end{macrocode}
% \changes{v0.71}{2019/04/27}{Fix: Tabular par tags.}
% \begin{macrocode}
- \LWR@stoppars%
-}%
-{% not exiting tabular
- \ifboolexpr{bool{LWR@skippingmrowcell} or bool{LWR@skippingmcolrowcell}}%
- {%
+ \LWR@stoppars%
+ }%
+ {% not exiting tabular
+ \ifboolexpr{bool{LWR@skippingmrowcell} or bool{LWR@skippingmcolrowcell}}%
+ {%
% \end{macrocode}
% \changes{v0.71}{2019/04/27}{Fix: Tabular par tags.}
% \begin{macrocode}
- \LWR@stoppars%
+ \LWR@stoppars%
% \end{macrocode}
% If not skipping a \cs{multicolumnrow} cell,
% insert the |@| and |!| columns after this non-existant column.
% \changes{v0.41}{2017/10/03}{Fix: At/bang column with \cs{multirow}.}
% \begin{macrocode}
- \ifbool{LWR@skippingmcolrowcell}%
- {}%
- {\LWR@insertatbangcols}%
- }%
- {% not skippingmrowcell
+ \ifbool{LWR@skippingmcolrowcell}%
+ {}%
+ {\LWR@insertatbangcols}%
+ }%
+ {% not skippingmrowcell
% \end{macrocode}
% Insert any |<| then any |@| and |!| column contents, unless muted
% for the \cs{bottomrule} or a \cs{multicolumn}:
% \changes{v0.41}{2017/10/02}{Fix: Cancel \progcode{\protect\textless} for \cs{multicolumn}.}
% \begin{macrocode}
- \unskip%
- \ifboolexpr{%
- bool{LWR@tabularmutemods} or
- bool{LWR@skipatbang} or
- bool{LWR@emptyatbang}
- }%
- {}%
- {\LWR@getexparray{LWR@colafterspec}{\arabic{LWR@tableLaTeXcolindex}}}%
+ \unskip%
+ \ifboolexpr{%
+ bool{LWR@tabularmutemods} or
+ bool{LWR@skipatbang} or
+ bool{LWR@emptyatbang}
+ }%
+ {}%
+ {%
+ \LWR@getexparray{LWR@colafterspec}%
+ {\arabic{LWR@tableLaTeXcolindex}}%
+ }%
% \end{macrocode}
% Close paragraphs:
% \changes{v0.71}{2019/04/27}{Fix: Tabular par tags.}
% \begin{macrocode}
- \LWR@stoppars%
- \global\boolfalse{LWR@tableparcell}%
+ \LWR@stoppars%
+ \boolfalse{LWR@tableparcell}%
% \end{macrocode}
%
% Close the table data cell.
@@ -25872,28 +26409,29 @@ end -- not --version
% Close any color \element{div}s.
% \changes{v0.48}{2018/02/06}{\pkg{colortbl}: Added.}
% \begin{macrocode}
- \whileboolexpr{test {\ifnumcomp{\value{LWR@cellcolordepth}}{>}{0}}}{%
- \LWR@htmltag{/div}\LWR@orignewline%
- \addtocounter{LWR@cellcolordepth}{-1}%
- }%
+ \whileboolexpr{test {\ifnumcomp{\value{LWR@cellcolordepth}}{>}{0}}}{%
+ \LWR@htmltag{/div}\LWR@orignewline%
+ \defaddtocounter{LWR@cellcolordepth}{-1}%
+ }%
% \end{macrocode}
% Skip the |@| and |!| cells if are closing a multicolumn cell.
% \begin{macrocode}
- \leavevmode\unskip\LWR@htmltag{/td}\LWR@orignewline%
- \global\booltrue{LWR@tabularcelladded}%
- \LWR@insertatbangcols%
- }% not skipping mrowcell
-}% not exiting tabular
-\global\boolfalse{LWR@skippingmrowcell}%
-\global\boolfalse{LWR@skippingmcolrowcell}%
-\global\boolfalse{LWR@skipatbang}%
+ \leavevmode\unskip\LWR@htmltag{/td}\LWR@orignewline%
+ \global\booltrue{LWR@tabularcelladded}%
+ \LWR@insertatbangcols%
+ }% not skipping mrowcell
+ }% not exiting tabular
+ \boolfalse{LWR@skippingmrowcell}%
+ \boolfalse{LWR@skippingmcolrowcell}%
+ \boolfalse{LWR@skipatbang}%
% \end{macrocode}
% Color control. Column is set by |>{}| for each cell, so it must be cleared here.
% \changes{v0.48}{2018/02/06}{\pkg{colortbl}: Added.}
+% \changes{v0.79}{2020/01/18}{Fix: Nested \env{tabular}s.}
% \begin{macrocode}
-\gdef\LWR@cellHTMLcolor{}
-\gdef\LWR@columnHTMLcolor{}
-\setcounter{LWR@cellcolordepth}{0}
+ \def\LWR@cellHTMLcolor{}%
+ \def\LWR@columnHTMLcolor{}%
+ \defcounter{LWR@cellcolordepth}{0}%
}
% \end{macrocode}
% \end{macro}
@@ -25928,31 +26466,33 @@ end -- not --version
%
% \begin{macrocode}
\newcommand*{\LWR@tabularampersand}{%
-\LWR@traceinfo{LWR@tabularampersand}%
-\ifnumcomp{\value{LWR@tabulardepth}}{>}{0}%
-{%
+ \LWR@traceinfo{LWR@tabularampersand}%
+ \ifnumcomp{\value{LWR@tabulardepth}}{>}{0}%
+ {%
% \end{macrocode}
% If not skipping a multirow cell, close the current data cell.
% \begin{macrocode}
- \unskip%
- \LWR@closetabledatacell%
+ \unskip%
+ \LWR@closetabledatacell%
% \end{macrocode}
% Move to the next column.
% \begin{macrocode}
- \addtocounter{LWR@tableLaTeXcolindex}{1}%
+ \defaddtocounter{LWR@tableLaTeXcolindex}{1}%
% \end{macrocode}
% Have not yet added data in this column:
% \begin{macrocode}
- \global\boolfalse{LWR@tabularcelladded}%
+ \global\boolfalse{LWR@tabularcelladded}%
% \end{macrocode}
% Look at the next token to decide multi or single column data tag.
% \begin{macrocode}
- \LWR@getmynexttoken%
-}%
+ \LWR@getmynexttoken%
+ }%
% \end{macrocode}
% If not inside a tabular, performs the original action:
% \begin{macrocode}
-{\LWR@origampmacro}%
+ {%
+ \LWR@origampmacro%
+ }%
}
% \end{macrocode}
% |&| is left with its original catcode for now.
@@ -25984,14 +26524,14 @@ end -- not --version
% If not exiting the tabular, or doing a rule, or have already started a row,
% finish this row:
% \begin{macrocode}
-\ifboolexpr{%
- not bool {LWR@exitingtabular} or%
- bool{LWR@doingtbrule} or%
- bool{LWR@doingcmidrule} or%
- test{\ifnumcomp{\value{LWR@hlines}}{>}{0}} or%
- test{\ifnumcomp{\value{LWR@hdashedlines}}{>}{0}} or%
- bool{LWR@startedrow}%
-}{%
+ \ifboolexpr{%
+ not bool {LWR@exitingtabular} or%
+ bool{LWR@doingtbrule} or%
+ bool{LWR@doingcmidrule} or%
+ test{\ifnumcomp{\value{LWR@hlines}}{>}{0}} or%
+ test{\ifnumcomp{\value{LWR@hdashedlines}}{>}{0}} or%
+ bool{LWR@startedrow}%
+ }{%
% \end{macrocode}
% To temporarily turn off |LWR@exitingtabular| so that
% table data tags will still be generated:
@@ -25999,60 +26539,63 @@ end -- not --version
% If generating a final row for the \cs{bottomrule} borders,
% turn off the |@|, |!|, |<|, and |>| column output:
% \begin{macrocode}
-\ifbool{LWR@exitingtabular}{%
- \global\booltrue{LWR@tabularmutemods}%
-}{%
- \global\boolfalse{LWR@tabularmutemods}%
-}%
+ \ifbool{LWR@exitingtabular}{%
+ \booltrue{LWR@tabularmutemods}%
+ }{%
+ \boolfalse{LWR@tabularmutemods}%
+ }%
% \end{macrocode}
% Locally reenable the table data tags until finished with the final row:
% \begin{macrocode}
-\global\boolfalse{LWR@exitingtabular}%
+ \boolfalse{LWR@exitingtabular}%
% \end{macrocode}
% Generate table data tags and ampersands until the right edge:
% \begin{macrocode}
-\whileboolexpr{%
- test {
- \ifnumcomp{\value{LWR@tableLaTeXcolindex}}{<}{\value{LWR@tabletotalLaTeXcols}}
- } or %
- (%
- bool{LWR@intabularmetadata} and%
- not bool{LWR@tabularcelladded} and%
+ \whileboolexpr{%
test {
- \ifnumcomp{\value{LWR@tableLaTeXcolindex}}{=}{\value{LWR@tabletotalLaTeXcols}}
- }%
- )%
-}%
-{%
- \LWR@tabledatasinglecolumntag%
+ \ifnumcomp{\value{LWR@tableLaTeXcolindex}}{<}
+ {\value{LWR@tabletotalLaTeXcols}}
+ } or %
+ (%
+ bool{LWR@intabularmetadata} and%
+ not bool{LWR@tabularcelladded} and%
+ test {
+ \ifnumcomp{\value{LWR@tableLaTeXcolindex}}{=}
+ {\value{LWR@tabletotalLaTeXcols}}
+ }%
+ )%
+ }%
+ {%
+ \LWR@tabledatasinglecolumntag%
% \end{macrocode}
% The following is essentially \cs{LWR@tabularampersand} with
% |LWR@emptyatbang| added to empty the following cells:
% \begin{macrocode}
- \LWR@closetabledatacell%
- \addtocounter{LWR@tableLaTeXcolindex}{1}%
- \global\boolfalse{LWR@tabularcelladded}%
- \global\booltrue{LWR@emptyatbang}%
+ \LWR@closetabledatacell%
+ \defaddtocounter{LWR@tableLaTeXcolindex}{1}%
+ \global\boolfalse{LWR@tabularcelladded}%
+ \booltrue{LWR@emptyatbang}%
% \end{macrocode}
% Starts the next cell:
% \begin{macrocode}
- \ifnumcomp{\value{LWR@tableLaTeXcolindex}}{<}{\value{LWR@tabletotalLaTeXcols}}%
- {\LWR@getmynexttoken}%
- {}%
-}%
+ \ifnumcomp{\value{LWR@tableLaTeXcolindex}}{<}
+ {\value{LWR@tabletotalLaTeXcols}}%
+ {\LWR@getmynexttoken}%
+ {}%
+ }%
% \end{macrocode}
% Reenable the original |LWR@exitingtabular| to close the entire table:
% \begin{macrocode}
-\ifbool{LWR@tabularmutemods}{%
- \global\booltrue{LWR@exitingtabular}%
-}{%
- \global\boolfalse{LWR@exitingtabular}%
-}%
-\global\boolfalse{LWR@tabularmutemods}%
+ \ifbool{LWR@tabularmutemods}{%
+ \booltrue{LWR@exitingtabular}%
+ }{%
+ \boolfalse{LWR@exitingtabular}%
+ }%
+ \boolfalse{LWR@tabularmutemods}%
% \end{macrocode}
% \begin{macrocode}
-\global\boolfalse{LWR@emptyatbang}%
-}{}% ifboolexpr
+ \boolfalse{LWR@emptyatbang}%
+ }{}% ifboolexpr
}
% \end{macrocode}
% \end{macro}
@@ -26072,51 +26615,55 @@ end -- not --version
% \end{macrocode}
% Finish the row:
% \begin{macrocode}
-\ifnumcomp{\value{LWR@tableLaTeXcolindex}}{<}{\value{LWR@tabletotalLaTeXcols}}%
- {\LWR@tabularfinishrow}%
- {\LWR@closetabledatacell}%
-\LWR@htmltag{/tr}\LWR@orignewline%
+ \ifnumcomp{\value{LWR@tableLaTeXcolindex}}{<}
+ {\value{LWR@tabletotalLaTeXcols}}%
+ {\LWR@tabularfinishrow}%
+ {\LWR@closetabledatacell}%
+ \LWR@htmltag{/tr}\LWR@orignewline%
% \end{macrocode}
% \pkg{xcolor} row color support:
% \begin{macrocode}
-\@rowc@lors%
+ \@rowc@lors%
% \end{macrocode}
% No longer inside a data cell:
% \begin{macrocode}
-\global\booltrue{LWR@intabularmetadata}%
+ \booltrue{LWR@intabularmetadata}%
% \end{macrocode}
% Not yet started a table row:
% \begin{macrocode}
-\global\boolfalse{LWR@startedrow}%
+ \boolfalse{LWR@startedrow}%
% \end{macrocode}
% Additional setup:
% \begin{macrocode}
-\setcounter{LWR@hlines}{0}%
-\setcounter{LWR@hdashedlines}{0}%
-\global\boolfalse{LWR@doingtbrule}%
-\global\boolfalse{LWR@doingcmidrule}%
-\LWR@clearmidrules%
-\gdef\LWR@rowHTMLcolor{}%
+ \defcounter{LWR@hlines}{0}%
+ \defcounter{LWR@hdashedlines}{0}%
+ \boolfalse{LWR@doingtbrule}%
+ \boolfalse{LWR@doingcmidrule}%
+ \LWR@clearmidrules%
+% \end{macrocode}
+% \changes{v0.79}{2020/01/18}{Fix: Nested \env{tabular}s.}
+% \begin{macrocode}
+ \def\LWR@rowHTMLcolor{}%
% \end{macrocode}
% Start at first column:
% \begin{macrocode}
-\setcounter{LWR@tableLaTeXcolindex}{1}%
+ \defcounter{LWR@tableLaTeXcolindex}{1}%
% \end{macrocode}
% Have not yet added data in this column:
% \begin{macrocode}
-\global\boolfalse{LWR@tabularcelladded}%
+ \global\boolfalse{LWR@tabularcelladded}%
% \end{macrocode}
% Allow \TeX\ to flush the pending paragraph.
% Not doing so causes a slowdown for very large tables.
% \changes{v0.60}{2018/09/17}{Fix: Slowdown for long tables.}
% \begin{macrocode}
-\LWR@stoppars
-\LWR@origpar
+ \LWR@stoppars%
+ \LWR@origpar%
% \end{macrocode}
% Look at the next token to decide between single column data tag
% or a special case:
% \begin{macrocode}
-\LWR@getmynexttoken%
+ \LWR@getmynexttoken%
}
% \end{macrocode}
% \end{macro}
@@ -26132,16 +26679,16 @@ end -- not --version
% The |w| column alignment will be seen as a single unit such as |{c}|.
% \begin{macrocode}
\newcommand*{\LWR@columnspeclookahead}[1]{%
-\setcounter{LWR@tempcountone}{\value{LWR@tablecolspecindex}}%
-\addtocounter{LWR@tempcountone}{#1}%
-\fullexpandarg%
-\StrChar{\LWR@origcolspec}{\arabic{LWR@tempcountone}}[\LWR@strresulttwo]%
+ \setcounter{LWR@tempcountone}{\value{LWR@tablecolspecindex}}%
+ \addtocounter{LWR@tempcountone}{#1}%
+ \fullexpandarg%
+ \StrChar{\LWR@origcolspec}{\arabic{LWR@tempcountone}}[\LWR@strresulttwo]%
% \end{macrocode}
% Get the contents of the first group in \cs{LWR@strresulttwo}:
% \begin{macrocode}
-\exploregroups%
-\StrChar{\LWR@strresulttwo}{1}[\LWR@strresulttwo]%
-\noexploregroups%
+ \exploregroups%
+ \StrChar{\LWR@strresulttwo}{1}[\LWR@strresulttwo]%
+ \noexploregroups%
}
% \end{macrocode}
% \end{macro}
@@ -26155,6 +26702,7 @@ end -- not --version
\newcommand*{\LWR@colparameter}{}
% \end{macrocode}
%
+%
% \begin{macro}{\LWR@parseatcolumn}
%
% Handles |@{text}| columns.
@@ -26166,36 +26714,40 @@ end -- not --version
% \end{macrocode}
% Move to the next token after the '@':
% \begin{macrocode}
-\LWR@traceinfo{at column}%
-\addtocounter{LWR@tablecolspecindex}{1}%
+ \LWR@traceinfo{at column}%
+ \defaddtocounter{LWR@tablecolspecindex}{1}%
% \end{macrocode}
% Read the next token into \cs{LWR@colparameter}, expanding once:
% \begin{macrocode}
-\LWR@traceinfo{about to read the next token:}%
-\expandarg%
-\StrChar{\LWR@origcolspec}%
- {\arabic{LWR@tablecolspecindex}}[\LWR@colparameter]
-\fullexpandarg%
+ \LWR@traceinfo{about to read the next token:}%
+ \expandarg%
+ \StrChar{\LWR@origcolspec}%
+ {\arabic{LWR@tablecolspecindex}}[\LWR@colparameter]%
+ \fullexpandarg%
% \end{macrocode}
% Store the result into a data array, expanding once out of \cs{LWR@colparameter}:
-% \begin{macrocode}
-\LWR@traceinfo{have now read the next token}%
-\ifnumcomp{\value{LWR@tabletotalLaTeXcols}}{=}{0}%
-{% left edge of the table:
- \LWR@traceinfo{at the left edge}%
- \LWR@setexparray{LWR@colatspec}{leftedge}{\LWR@colparameter}%
- \LWR@traceinfo{at the left edge: %
- \LWR@getexparray{LWR@colatspec}{leftedge}}%
-}%
-{% not at the left edge:
- \LWR@traceinfo{not at the left edge}%
- \LWR@setexparray{LWR@colatspec}%
- {\arabic{LWR@tabletotalLaTeXcols}}{\LWR@colparameter}%
- \LWR@traceinfo{at \arabic{LWR@tabletotalLaTeXcols}: %
- \LWR@getexparray{LWR@colatspec}{\arabic{LWR@tabletotalLaTeXcols}}}%
-}%
-\let\LWR@colparameter\relax%
-\global\booltrue{LWR@validtablecol}%
+% \changes{v0.79}{2020/01/16}{Remove outermost braces.}
+% \begin{macrocode}
+ \LWR@traceinfo{have now read the next token}%
+ \ifnumcomp{\value{LWR@tabletotalLaTeXcols}}{=}{0}%
+ {% left edge of the table:
+ \LWR@traceinfo{at the left edge}%
+ \LWR@setexparray{LWR@colatspec}%
+ {leftedge}%
+ {\expandafter\@firstofone\LWR@colparameter}%
+ \LWR@traceinfo{at the left edge: %
+ \LWR@getexparray{LWR@colatspec}{leftedge}}%
+ }%
+ {% not at the left edge:
+ \LWR@traceinfo{not at the left edge}%
+ \LWR@setexparray{LWR@colatspec}%
+ {\arabic{LWR@tabletotalLaTeXcols}}%
+ {\expandafter\@firstofone\LWR@colparameter}%
+ \LWR@traceinfo{at \arabic{LWR@tabletotalLaTeXcols}: %
+ \LWR@getexparray{LWR@colatspec}{\arabic{LWR@tabletotalLaTeXcols}}}%
+ }%
+ \let\LWR@colparameter\relax%
+ \booltrue{LWR@validtablecol}%
}
% \end{macrocode}
% \end{macro}
@@ -26211,34 +26763,38 @@ end -- not --version
% \end{macrocode}
% Move to the next token after the '!':
% \begin{macrocode}
-\LWR@traceinfo{bang column}%
-\addtocounter{LWR@tablecolspecindex}{1}%
+ \LWR@traceinfo{bang column}%
+ \defaddtocounter{LWR@tablecolspecindex}{1}%
% \end{macrocode}
% Read the next token into \cs{LWR@colparameter}, expanding once:
% \begin{macrocode}
-\LWR@traceinfo{about to read the next token:}%
-\expandarg%
-\StrChar{\LWR@origcolspec}%
- {\arabic{LWR@tablecolspecindex}}[\LWR@colparameter]
-\fullexpandarg%
+ \LWR@traceinfo{about to read the next token:}%
+ \expandarg%
+ \StrChar{\LWR@origcolspec}%
+ {\arabic{LWR@tablecolspecindex}}[\LWR@colparameter]%
+ \fullexpandarg%
% \end{macrocode}
% Store the result into a data array,
% expanding once out of \cs{LWR@colparameter}:
-% \begin{macrocode}
-\LWR@traceinfo{have now read the next token}%
-\ifnumcomp{\value{LWR@tabletotalLaTeXcols}}{=}{0}%
-{% left edge of the table:
- \LWR@traceinfo{at the left edge}%
- \LWR@setexparray{LWR@colbangspec}{leftedge}{\LWR@colparameter}%
-}%
-{% not at the left edge:
- \LWR@traceinfo{not at the left edge}%
- \LWR@setexparray{LWR@colbangspec}%
- {\arabic{LWR@tabletotalLaTeXcols}}{\LWR@colparameter}%
- \LWR@traceinfo{bang \arabic{LWR@tabletotalLaTeXcols}: \LWR@colparameter!}%
-}%
-\let\LWR@colparameter\relax%
-\global\booltrue{LWR@validtablecol}%
+% \changes{v0.79}{2020/01/16}{Remove outermost braces.}
+% \begin{macrocode}
+ \LWR@traceinfo{have now read the next token}%
+ \ifnumcomp{\value{LWR@tabletotalLaTeXcols}}{=}{0}%
+ {% left edge of the table:
+ \LWR@traceinfo{at the left edge}%
+ \LWR@setexparray{LWR@colbangspec}%
+ {leftedge}%
+ {\expandafter\@firstofone\LWR@colparameter}%
+ }%
+ {% not at the left edge:
+ \LWR@traceinfo{not at the left edge}%
+ \LWR@setexparray{LWR@colbangspec}%
+ {\arabic{LWR@tabletotalLaTeXcols}}%
+ {\expandafter\@firstofone\LWR@colparameter}%
+ \LWR@traceinfo{bang \arabic{LWR@tabletotalLaTeXcols}: \LWR@colparameter!}%
+ }%
+ \let\LWR@colparameter\relax%
+ \booltrue{LWR@validtablecol}%
}
% \end{macrocode}
% \end{macro}
@@ -26254,21 +26810,23 @@ end -- not --version
% \end{macrocode}
% Move to the next token after the '>':
% \begin{macrocode}
-\addtocounter{LWR@tablecolspecindex}{1}%
+ \defaddtocounter{LWR@tablecolspecindex}{1}%
% \end{macrocode}
% Read the next token, expanding once into \cs{LWR@colparameter}:
% \begin{macrocode}
-\expandarg%
-\StrChar{\LWR@origcolspec}%
- {\arabic{LWR@tablecolspecindex}}[\LWR@colparameter]%
-\fullexpandarg%
+ \expandarg%
+ \StrChar{\LWR@origcolspec}%
+ {\arabic{LWR@tablecolspecindex}}[\LWR@colparameter]%
+ \fullexpandarg%
% \end{macrocode}
% Store the result into a data array, expanding once out of \cs{LWR@colparameter}:
+% \changes{v0.79}{2020/01/16}{Remove outermost braces.}
% \begin{macrocode}
-\LWR@setexparray{LWR@colbeforespec}%
- {\arabic{LWR@tabletotalLaTeXcolsnext}}{\LWR@colparameter}%
-\let\LWR@colparameter\relax%
-\global\booltrue{LWR@validtablecol}%
+ \LWR@setexparray{LWR@colbeforespec}%
+ {\arabic{LWR@tabletotalLaTeXcolsnext}}%
+ {\expandafter\@firstofone\LWR@colparameter}%
+ \let\LWR@colparameter\relax%
+ \booltrue{LWR@validtablecol}%
}
% \end{macrocode}
% \end{macro}
@@ -26282,21 +26840,23 @@ end -- not --version
% \end{macrocode}
% Move to the next token after the '<':
% \begin{macrocode}
-\addtocounter{LWR@tablecolspecindex}{1}%
+ \defaddtocounter{LWR@tablecolspecindex}{1}%
% \end{macrocode}
% Read the next token, expanding once into \cs{LWR@colparameter}:
% \begin{macrocode}
-\expandarg%
-\StrChar{\LWR@origcolspec}%
- {\arabic{LWR@tablecolspecindex}}[\LWR@colparameter]%
-\fullexpandarg%
+ \expandarg%
+ \StrChar{\LWR@origcolspec}%
+ {\arabic{LWR@tablecolspecindex}}[\LWR@colparameter]%
+ \fullexpandarg%
% \end{macrocode}
% Store the result into a data array, expanding once out of \cs{LWR@colparameter}:
+% \changes{v0.79}{2020/01/16}{Remove outermost braces.}
% \begin{macrocode}
-\LWR@setexparray{LWR@colafterspec}%
- {\arabic{LWR@tabletotalLaTeXcols}}{\LWR@colparameter}%
-\let\LWR@colparameter\relax%
-\global\booltrue{LWR@validtablecol}%
+ \LWR@setexparray{LWR@colafterspec}%
+ {\arabic{LWR@tabletotalLaTeXcols}}%
+ {\expandafter\@firstofone\LWR@colparameter}%
+ \let\LWR@colparameter\relax%
+ \booltrue{LWR@validtablecol}%
}
% \end{macrocode}
% \end{macro}
@@ -26309,32 +26869,32 @@ end -- not --version
%
% \begin{macrocode}
\newcommand*{\LWR@parsebarcolumn}{%
-\LWR@traceinfo{LWR@parsebarcolumn}%
+ \LWR@traceinfo{LWR@parsebarcolumn}%
% \end{macrocode}
% Remember the bar at this position:
% \begin{macrocode}
-\ifnumcomp{\value{LWR@tabletotalLaTeXcols}}{=}{0}%
-{% left edge of the table:
- \edef\LWR@tempone{\LWR@getexparray{LWR@colbarspec}{leftedge}}%
- \ifdefstring{\LWR@tempone}{tvertbarl}%
- {\LWR@setexparray{LWR@colbarspec}{leftedge}{tvertbarldouble}}%
- {\LWR@setexparray{LWR@colbarspec}{leftedge}{tvertbarl}}%
-}%
-{% not at the left edge:
- \edef\LWR@tempone{%
- \LWR@getexparray{LWR@colbarspec}{\arabic{LWR@tabletotalLaTeXcols}}%
- }%
- \ifdefstring{\LWR@tempone}{tvertbarr}%
- {%
- \LWR@setexparray{LWR@colbarspec}%
- {\arabic{LWR@tabletotalLaTeXcols}}{tvertbarrdouble}%
+ \ifnumcomp{\value{LWR@tabletotalLaTeXcols}}{=}{0}%
+ {% left edge of the table:
+ \edef\LWR@tempone{\LWR@getexparray{LWR@colbarspec}{leftedge}}%
+ \ifdefstring{\LWR@tempone}{tvertbarl}%
+ {\LWR@setexparray{LWR@colbarspec}{leftedge}{tvertbarldouble}}%
+ {\LWR@setexparray{LWR@colbarspec}{leftedge}{tvertbarl}}%
}%
- {%
- \LWR@setexparray{LWR@colbarspec}%
- {\arabic{LWR@tabletotalLaTeXcols}}{tvertbarr}%
+ {% not at the left edge:
+ \edef\LWR@tempone{%
+ \LWR@getexparray{LWR@colbarspec}{\arabic{LWR@tabletotalLaTeXcols}}%
+ }%
+ \ifdefstring{\LWR@tempone}{tvertbarr}%
+ {%
+ \LWR@setexparray{LWR@colbarspec}%
+ {\arabic{LWR@tabletotalLaTeXcols}}{tvertbarrdouble}%
+ }%
+ {%
+ \LWR@setexparray{LWR@colbarspec}%
+ {\arabic{LWR@tabletotalLaTeXcols}}{tvertbarr}%
+ }%
}%
-}%
-\global\booltrue{LWR@validtablecol}%
+ \booltrue{LWR@validtablecol}%
}
% \end{macrocode}
% \end{macro}
@@ -26345,28 +26905,28 @@ end -- not --version
% \changes{v0.56}{2018/05/04}{\pkg{arydshln}: Added.}
% \begin{macrocode}
\newcommand*{\LWR@parsecoloncolumn}{%
-\LWR@traceinfo{LWR@parsecoloncolumn}%
+ \LWR@traceinfo{LWR@parsecoloncolumn}%
% \end{macrocode}
% Remember the bar at this position:
% \begin{macrocode}
-\ifnumcomp{\value{LWR@tabletotalLaTeXcols}}{=}{0}%
-{% left edge of the table:
- \edef\LWR@tempone{\LWR@getexparray{LWR@colbarspec}{leftedge}}%
- \ifdefstring{\LWR@tempone}{tvertbarldash}%
- {\LWR@setexparray{LWR@colbarspec}{leftedge}{tvertbarldoubledash}}%
- {\LWR@setexparray{LWR@colbarspec}{leftedge}{tvertbarldash}}%
-}%
-{% not at the left edge:
- \edef\LWR@tempone{%
- \LWR@getexparray{LWR@colbarspec}{\arabic{LWR@tabletotalLaTeXcols}}%
+ \ifnumcomp{\value{LWR@tabletotalLaTeXcols}}{=}{0}%
+ {% left edge of the table:
+ \edef\LWR@tempone{\LWR@getexparray{LWR@colbarspec}{leftedge}}%
+ \ifdefstring{\LWR@tempone}{tvertbarldash}%
+ {\LWR@setexparray{LWR@colbarspec}{leftedge}{tvertbarldoubledash}}%
+ {\LWR@setexparray{LWR@colbarspec}{leftedge}{tvertbarldash}}%
}%
- \ifdefstring{\LWR@tempone}{tvertbarrdash}%
- {\LWR@setexparray{LWR@colbarspec}%
- {\arabic{LWR@tabletotalLaTeXcols}}{tvertbarrdoubledash}}%
- {\LWR@setexparray{LWR@colbarspec}%
- {\arabic{LWR@tabletotalLaTeXcols}}{tvertbarrdash}}%
-}%
-\global\booltrue{LWR@validtablecol}%
+ {% not at the left edge:
+ \edef\LWR@tempone{%
+ \LWR@getexparray{LWR@colbarspec}{\arabic{LWR@tabletotalLaTeXcols}}%
+ }%
+ \ifdefstring{\LWR@tempone}{tvertbarrdash}%
+ {\LWR@setexparray{LWR@colbarspec}%
+ {\arabic{LWR@tabletotalLaTeXcols}}{tvertbarrdoubledash}}%
+ {\LWR@setexparray{LWR@colbarspec}%
+ {\arabic{LWR@tabletotalLaTeXcols}}{tvertbarrdash}}%
+ }%
+ \booltrue{LWR@validtablecol}%
}
% \end{macrocode}
% \end{macro}
@@ -26380,11 +26940,11 @@ end -- not --version
% \end{macrocode}
% Treat |;| as a |:| column:
% \begin{macrocode}
-\LWR@parsecoloncolumn%
+ \LWR@parsecoloncolumn%
% \end{macrocode}
% Skip the following width token:
% \begin{macrocode}
-\addtocounter{LWR@tablecolspecindex}{1}%
+ \defaddtocounter{LWR@tablecolspecindex}{1}%
}
% \end{macrocode}
% \end{macro}
@@ -26398,21 +26958,21 @@ end -- not --version
% and pre-clear another column of at, before, and after specs.
% \begin{macrocode}
\newcommand*{\LWR@parsenormalcolumn}[1]{%
-\addtocounter{LWR@tabletotalLaTeXcols}{1}%
-\addtocounter{LWR@tabletotalLaTeXcolsnext}{1}%
+ \defaddtocounter{LWR@tabletotalLaTeXcols}{1}%
+ \defaddtocounter{LWR@tabletotalLaTeXcolsnext}{1}%
% \end{macrocode}
% \changes{v0.60}{2018/09/17}{\env{tabular}: Improved memory management: Not using \pkg{xstring}.}
% \begin{macrocode}
-\LWR@setexparray{LWR@tablecolspec}{\arabic{LWR@tabletotalLaTeXcols}}{#1}%
+ \LWR@setexparray{LWR@tablecolspec}{\arabic{LWR@tabletotalLaTeXcols}}{#1}%
% \end{macrocode}
% \begin{macrocode}
-\LWR@traceinfo{normal column \arabic{LWR@tabletotalLaTeXcols}: #1}%
-\LWR@setexparray{LWR@colatspec}{\arabic{LWR@tabletotalLaTeXcolsnext}}{}%
-\LWR@setexparray{LWR@colbangspec}{\arabic{LWR@tabletotalLaTeXcolsnext}}{}%
-\LWR@setexparray{LWR@colbeforespec}{\arabic{LWR@tabletotalLaTeXcolsnext}}{}%
-\LWR@setexparray{LWR@colafterspec}{\arabic{LWR@tabletotalLaTeXcolsnext}}{}%
-\LWR@setexparray{LWR@colbarspec}{\arabic{LWR@tabletotalLaTeXcolsnext}}{}%
-\global\booltrue{LWR@validtablecol}%
+ \LWR@traceinfo{normal column \arabic{LWR@tabletotalLaTeXcols}: #1}%
+ \LWR@setexparray{LWR@colatspec}{\arabic{LWR@tabletotalLaTeXcolsnext}}{}%
+ \LWR@setexparray{LWR@colbangspec}{\arabic{LWR@tabletotalLaTeXcolsnext}}{}%
+ \LWR@setexparray{LWR@colbeforespec}{\arabic{LWR@tabletotalLaTeXcolsnext}}{}%
+ \LWR@setexparray{LWR@colafterspec}{\arabic{LWR@tabletotalLaTeXcolsnext}}{}%
+ \LWR@setexparray{LWR@colbarspec}{\arabic{LWR@tabletotalLaTeXcolsnext}}{}%
+ \booltrue{LWR@validtablecol}%
}
% \end{macrocode}
% \end{macro}
@@ -26427,11 +26987,11 @@ end -- not --version
% \end{macrocode}
% Converts to the given column type:
% \begin{macrocode}
-\LWR@parsenormalcolumn{#1}%
+ \LWR@parsenormalcolumn{#1}%
% \end{macrocode}
% Skips the following width token:
% \begin{macrocode}
-\addtocounter{LWR@tablecolspecindex}{1}%
+ \defaddtocounter{LWR@tablecolspecindex}{1}%
}
% \end{macrocode}
% \end{macro}
@@ -26445,12 +27005,12 @@ end -- not --version
\newcommand*{\LWR@parsewcolumn}{%
% \end{macrocode}
% \begin{macrocode}
-\LWR@columnspeclookahead{1}%
-\expandafter\LWR@parsenormalcolumn\expandafter{\LWR@strresulttwo}%
+ \LWR@columnspeclookahead{1}%
+ \expandafter\LWR@parsenormalcolumn\expandafter{\LWR@strresulttwo}%
% \end{macrocode}
% Skips the following width and alignment tokens:
% \begin{macrocode}
-\addtocounter{LWR@tablecolspecindex}{2}%
+ \defaddtocounter{LWR@tablecolspecindex}{2}%
}
% \end{macrocode}
% \end{macro}
@@ -26462,7 +27022,7 @@ end -- not --version
% Star columns should already have been expanded, so this should never be used.
% \begin{macrocode}
\newcommand*{\LWR@parsestarcolumn}{%
- \addtocounter{LWR@tablecolspecindex}{2}%
+ \defaddtocounter{LWR@tablecolspecindex}{2}%
}
% \end{macrocode}
% \end{macro}
@@ -26482,17 +27042,17 @@ end -- not --version
% \end{macrocode}
% Converts to the given column type.
% \begin{macrocode}
-\LWR@parsenormalcolumn{#1}%
+ \LWR@parsenormalcolumn{#1}%
% \end{macrocode}
% Skips the following three parameters.
% \begin{macrocode}
-\addtocounter{LWR@tablecolspecindex}{3}%
+ \defaddtocounter{LWR@tablecolspecindex}{3}%
}
% \end{macrocode}
% \end{macro}
-% \subsection{Expanding the star column specifiations}
+% \subsection{Expanding the star column specifications}
% \DescribeCounter{LWR@starcount}
% Internal count for duplicating star columns.
@@ -26670,17 +27230,6 @@ end -- not --version
% \end{table}
%
%
-% \DescribeBoolean{LWR@validtablecol} True if found a valid table column type.
-% \begin{macrocode}
-\newbool{LWR@validtablecol}
-% \end{macrocode}
-%
-%
-% \DescribeBoolean{LWR@opttablecol} True if found a table column optional argument.
-% \begin{macrocode}
-\newbool{LWR@opttablecol}
-% \end{macrocode}
-%
%
% \begin{macro}{\LWR@parsetablecols} \marg{colspecs}
%
@@ -26700,22 +27249,22 @@ end -- not --version
%
% \begin{macrocode}
\newcommand*{\LWR@parsetablecols}[1]{%
-\LWR@traceinfo{LWR@parsetablecols}%
+ \LWR@traceinfo{LWR@parsetablecols}%
% \end{macrocode}
% Remember the original supplied column spec:
% \begin{macrocode}
-\renewcommand*{\LWR@origcolspec}{#1}%
+ \renewcommand*{\LWR@origcolspec}{#1}%
% \end{macrocode}
% Remove spaces:
% \changes{v0.43}{2017/11/01}{Ignore spaces in col spec.}
% \begin{macrocode}
-\expandarg%
-\StrSubstitute{\LWR@origcolspec}{ }{}[\LWR@origcolspec]%
+ \expandarg%
+ \StrSubstitute{\LWR@origcolspec}{ }{}[\LWR@origcolspec]%
% \end{macrocode}
%
% Expand any star columns:
% \begin{macrocode}
-\expandcolspec%
+ \expandcolspec%
% \end{macrocode}
%
% The parsed column spec data array, |LWR@tablecolspec|,
@@ -26724,123 +27273,123 @@ end -- not --version
% Total number of columns found so far.
% Also pre-initialize the first several columns of specs:
% \begin{macrocode}
-\setcounter{LWR@tabletotalLaTeXcols}{0}%
-\setcounter{LWR@tabletotalLaTeXcolsnext}{1}%
-\LWR@setexparray{LWR@colatspec}{leftedge}{}%
-\LWR@setexparray{LWR@colatspec}{1}{}%
-\LWR@setexparray{LWR@colatspec}{2}{}%
-\LWR@setexparray{LWR@colatspec}{3}{}%
-\LWR@setexparray{LWR@colbangspec}{leftedge}{}%
-\LWR@setexparray{LWR@colbangspec}{1}{}%
-\LWR@setexparray{LWR@colbangspec}{2}{}%
-\LWR@setexparray{LWR@colbangspec}{3}{}%
-\LWR@setexparray{LWR@colbeforespec}{1}{}%
-\LWR@setexparray{LWR@colbeforespec}{2}{}%
-\LWR@setexparray{LWR@colbeforespec}{3}{}%
-\LWR@setexparray{LWR@colafterspec}{1}{}%
-\LWR@setexparray{LWR@colafterspec}{2}{}%
-\LWR@setexparray{LWR@colafterspec}{3}{}%
-\LWR@setexparray{LWR@colbarspec}{leftedge}{}%
-\LWR@setexparray{LWR@colbarspec}{1}{}%
-\LWR@setexparray{LWR@colbarspec}{2}{}%
-\LWR@setexparray{LWR@colbarspec}{3}{}%
+ \defcounter{LWR@tabletotalLaTeXcols}{0}%
+ \defcounter{LWR@tabletotalLaTeXcolsnext}{1}%
+ \LWR@setexparray{LWR@colatspec}{leftedge}{}%
+ \LWR@setexparray{LWR@colatspec}{1}{}%
+ \LWR@setexparray{LWR@colatspec}{2}{}%
+ \LWR@setexparray{LWR@colatspec}{3}{}%
+ \LWR@setexparray{LWR@colbangspec}{leftedge}{}%
+ \LWR@setexparray{LWR@colbangspec}{1}{}%
+ \LWR@setexparray{LWR@colbangspec}{2}{}%
+ \LWR@setexparray{LWR@colbangspec}{3}{}%
+ \LWR@setexparray{LWR@colbeforespec}{1}{}%
+ \LWR@setexparray{LWR@colbeforespec}{2}{}%
+ \LWR@setexparray{LWR@colbeforespec}{3}{}%
+ \LWR@setexparray{LWR@colafterspec}{1}{}%
+ \LWR@setexparray{LWR@colafterspec}{2}{}%
+ \LWR@setexparray{LWR@colafterspec}{3}{}%
+ \LWR@setexparray{LWR@colbarspec}{leftedge}{}%
+ \LWR@setexparray{LWR@colbarspec}{1}{}%
+ \LWR@setexparray{LWR@colbarspec}{2}{}%
+ \LWR@setexparray{LWR@colbarspec}{3}{}%
% \end{macrocode}
% Starting at the first column specification:
% \begin{macrocode}
-\setcounter{LWR@tablecolspecindex}{1}%
+ \defcounter{LWR@tablecolspecindex}{1}%
% \end{macrocode}
% Place the colspecs string length into \cs{LWR@strresult},
% and remember the number of characters in the column specification:
% \begin{macrocode}
-\expandarg%
-\StrLen{\LWR@origcolspec}[\LWR@strresult]%
-\fullexpandarg%
-\LWR@traceinfo{original column spec length: \LWR@strresult}%
-\setcounter{LWR@tablecolspecwidth}{\LWR@strresult}%
+ \expandarg%
+ \StrLen{\LWR@origcolspec}[\LWR@strresult]%
+ \fullexpandarg%
+ \LWR@traceinfo{original column spec length: \LWR@strresult}%
+ \defcounter{LWR@tablecolspecwidth}{\LWR@strresult}%
% \end{macrocode}
% Haven't seen any optional arguments so far
% \begin{macrocode}
-\global\boolfalse{LWR@opttablecol}%
+ \boolfalse{LWR@opttablecol}%
% \end{macrocode}
% Scan through the column specifications:
% \begin{macrocode}
-\whileboolexpr{%
- not test{%
- \ifnumcomp{\value{LWR@tablecolspecindex}}{>}%
- {\value{LWR@tablecolspecwidth}}%
+ \whileboolexpr{%
+ not test{%
+ \ifnumcomp{\value{LWR@tablecolspecindex}}{>}%
+ {\value{LWR@tablecolspecwidth}}%
+ }%
}%
-}%
-{%
+ {%
% \end{macrocode}
% Place the next single-character column type into \cs{LWR@strresult}:
% \begin{macrocode}
-\expandarg%
-\StrChar{\LWR@origcolspec}{\arabic{LWR@tablecolspecindex}}[\LWR@strresult]%
-\LWR@traceinfo{position \arabic{LWR@tablecolspecindex}: \LWR@strresult}%
-\fullexpandarg%
+ \expandarg%
+ \StrChar{\LWR@origcolspec}{\arabic{LWR@tablecolspecindex}}[\LWR@strresult]%
+ \LWR@traceinfo{position \arabic{LWR@tablecolspecindex}: \LWR@strresult}%
+ \fullexpandarg%
% \end{macrocode}
% Not yet found a valid column type:
% \begin{macrocode}
-\global\boolfalse{LWR@validtablecol}%
+ \boolfalse{LWR@validtablecol}%
% \end{macrocode}
%
% Skip over any optional arguments, such as \pkg{siunitx} |S| column:
% \changes{v0.48}{2018/02/04}{Fix: Ignore optional tabular column arguments.}
% \begin{macrocode}
-\IfStrEq{\LWR@strresult}{[}{\global\booltrue{LWR@opttablecol}}{}%
+ \IfStrEq{\LWR@strresult}{[}{\booltrue{LWR@opttablecol}}{}%
% \end{macrocode}
%
% Throw away anything found inside the optional argument:
% \begin{macrocode}
-\ifbool{LWR@opttablecol}%
-{}% inside an optional argument
-{% not an optional tabular argument
+ \ifbool{LWR@opttablecol}%
+ {}% inside an optional argument
+ {% not an optional tabular argument
% \end{macrocode}
% Not inside an optional argument, so consider the column type:
% \begin{macrocode}
-\IfStrEq{\LWR@strresult}{l}{\LWR@parsenormalcolumn{l}}{}%
-\IfStrEq{\LWR@strresult}{c}{\LWR@parsenormalcolumn{c}}{}%
-\IfStrEq{\LWR@strresult}{r}{\LWR@parsenormalcolumn{r}}{}%
-\IfStrEq{\LWR@strresult}{L}{\LWR@parsenormalcolumn{l}}{}%
-\IfStrEq{\LWR@strresult}{C}{\LWR@parsenormalcolumn{c}}{}%
-\IfStrEq{\LWR@strresult}{R}{\LWR@parsenormalcolumn{r}}{}%
-\IfStrEq{\LWR@strresult}{J}{\LWR@parsenormalcolumn{l}}{}%
+ \IfStrEq{\LWR@strresult}{l}{\LWR@parsenormalcolumn{l}}{}%
+ \IfStrEq{\LWR@strresult}{c}{\LWR@parsenormalcolumn{c}}{}%
+ \IfStrEq{\LWR@strresult}{r}{\LWR@parsenormalcolumn{r}}{}%
+ \IfStrEq{\LWR@strresult}{L}{\LWR@parsenormalcolumn{l}}{}%
+ \IfStrEq{\LWR@strresult}{C}{\LWR@parsenormalcolumn{c}}{}%
+ \IfStrEq{\LWR@strresult}{R}{\LWR@parsenormalcolumn{r}}{}%
+ \IfStrEq{\LWR@strresult}{J}{\LWR@parsenormalcolumn{l}}{}%
% \end{macrocode}
% \begin{macrocode}
-\IfStrEq{\LWR@strresult}{S}{\LWR@parsenormalcolumn{c}}{}%
-\IfStrEq{\LWR@strresult}{s}{\LWR@parsenormalcolumn{c}}{}%
+ \IfStrEq{\LWR@strresult}{S}{\LWR@parsenormalcolumn{c}}{}%
+ \IfStrEq{\LWR@strresult}{s}{\LWR@parsenormalcolumn{c}}{}%
% \end{macrocode}
% \begin{macrocode}
-\IfStrEq{\LWR@strresult}{\detokenize{@}}{\LWR@parseatcolumn}{}%
-\IfStrEq{\LWR@strresult}{!}{\LWR@parsebangcolumn}{}%
-\IfStrEq{\LWR@strresult}{>}{\LWR@parsebeforecolumn}{}%
-\IfStrEq{\LWR@strresult}{<}{\LWR@parseaftercolumn}{}%
-\IfStrEq{\LWR@strresult}{|}{\LWR@parsebarcolumn}{}%
-\IfStrEq{\LWR@strresult}{:}{\LWR@parsecoloncolumn}{}%
-\IfStrEq{\LWR@strresult}{;}{\LWR@parsesemicoloncolumn}{}%
+ \IfStrEq{\LWR@strresult}{\detokenize{@}}{\LWR@parseatcolumn}{}%
+ \IfStrEq{\LWR@strresult}{!}{\LWR@parsebangcolumn}{}%
+ \IfStrEq{\LWR@strresult}{>}{\LWR@parsebeforecolumn}{}%
+ \IfStrEq{\LWR@strresult}{<}{\LWR@parseaftercolumn}{}%
+ \IfStrEq{\LWR@strresult}{|}{\LWR@parsebarcolumn}{}%
+ \IfStrEq{\LWR@strresult}{:}{\LWR@parsecoloncolumn}{}%
+ \IfStrEq{\LWR@strresult}{;}{\LWR@parsesemicoloncolumn}{}%
% \end{macrocode}
% \begin{macrocode}
-\IfStrEq{\LWR@strresult}{p}{\LWR@parsepcolumn{p}}{}%
-\IfStrEq{\LWR@strresult}{m}{\LWR@parsepcolumn{m}}{}%
-\IfStrEq{\LWR@strresult}{b}{\LWR@parsepcolumn{b}}{}%
+ \IfStrEq{\LWR@strresult}{p}{\LWR@parsepcolumn{p}}{}%
+ \IfStrEq{\LWR@strresult}{m}{\LWR@parsepcolumn{m}}{}%
+ \IfStrEq{\LWR@strresult}{b}{\LWR@parsepcolumn{b}}{}%
% \end{macrocode}
% \changes{v0.56}{2018/05/10}{Added \pkg{array} \texttt{W} column.}
% \begin{macrocode}
-\IfStrEq{\LWR@strresult}{w}{\LWR@parsewcolumn}{}%
-\IfStrEq{\LWR@strresult}{W}{\LWR@parsewcolumn}{}%
+ \IfStrEq{\LWR@strresult}{w}{\LWR@parsewcolumn}{}%
+ \IfStrEq{\LWR@strresult}{W}{\LWR@parsewcolumn}{}%
% \end{macrocode}
% A star column:
% \begin{macrocode}
-\IfStrEq{\LWR@strresult}{*}{\LWR@parsestarcolumn}{}%
+ \IfStrEq{\LWR@strresult}{*}{\LWR@parsestarcolumn}{}%
% \end{macrocode}
% From the \pkg{dcolumn} package:
% \begin{macrocode}
-\IfStrEq{\LWR@strresult}{D}{\LWR@parseDcolumn{c}}{}%
+ \IfStrEq{\LWR@strresult}{D}{\LWR@parseDcolumn{c}}{}%
% \end{macrocode}
% From the \pkg{tabularx} package.
% X column has no parameter, but will be given paragraph tags.
% \begin{macrocode}
-\IfStrEq{\LWR@strresult}{X}{\LWR@parsenormalcolumn{X}}{}%
+ \IfStrEq{\LWR@strresult}{X}{\LWR@parsenormalcolumn{X}}{}%
% \end{macrocode}
% \begin{docsidebar}
% \raggedright
@@ -26851,26 +27400,26 @@ end -- not --version
% \vspace{-\baselineskip}
% \end{docsidebar}
% \begin{macrocode}
-\IfStrEq{\LWR@strresult}{P}{\LWR@parsepcolumn{P}}{}%
-\IfStrEq{\LWR@strresult}{M}{\LWR@parsepcolumn{M}}{}%
-\IfStrEq{\LWR@strresult}{B}{\LWR@parsepcolumn{B}}{}%
+ \IfStrEq{\LWR@strresult}{P}{\LWR@parsepcolumn{P}}{}%
+ \IfStrEq{\LWR@strresult}{M}{\LWR@parsepcolumn{M}}{}%
+ \IfStrEq{\LWR@strresult}{B}{\LWR@parsepcolumn{B}}{}%
% \end{macrocode}
% If this column was an invalid column type, convert it to an |l| column:
% \begin{macrocode}
-\ifbool{LWR@validtablecol}{}{%
- \LWR@traceinfo{invalid column type: \LWR@strresult}%
- \LWR@parsenormalcolumn{l}%
-}%
-}% not an optional column argument
+ \ifbool{LWR@validtablecol}{}{%
+ \LWR@traceinfo{invalid column type: \LWR@strresult}%
+ \LWR@parsenormalcolumn{l}%
+ }%
+ }% not an optional column argument
% \end{macrocode}
% If read the closing bracket, no longer inside the optional argument:
% \begin{macrocode}
-\IfStrEq{\LWR@strresult}{]}{\global\boolfalse{LWR@opttablecol}}{}%
+ \IfStrEq{\LWR@strresult}{]}{\boolfalse{LWR@opttablecol}}{}%
% \end{macrocode}
% Move to the next character:
% \begin{macrocode}
-\addtocounter{LWR@tablecolspecindex}{1}%
-}% whiledo
+ \defaddtocounter{LWR@tablecolspecindex}{1}%
+ }% whiledo
}%
% \end{macrocode}
% \end{macro}
@@ -26979,42 +27528,42 @@ end -- not --version
% \begin{macrocode}
\newcommand*{\LWR@maybenewtablerow}
{%
-\ifbool{LWR@startedrow}%
-{}% started the row
-{% not started the row
+ \ifbool{LWR@startedrow}%
+ {}% started the row
+ {% not started the row
% \end{macrocode}
% Remember that now have started the row:
% \begin{macrocode}
- \global\booltrue{LWR@startedrow}%
+ \booltrue{LWR@startedrow}%
% \end{macrocode}
% Create the row tag, with a class if necessary.
% \begin{macrocode}
- \global\booltrue{LWR@intabularmetadata}%
- \ifboolexpr{%
- test{\ifnumcomp{\value{LWR@hlines}}{>}{0}} or%
- test{\ifnumcomp{\value{LWR@hdashedlines}}{>}{0}}%
- }%
- {%
- \LWR@htmltag{tr class="hline" }%
- \LWR@orignewline%
- }%
- {% not doing hline
- \ifbool{LWR@doingtbrule}%
+ \booltrue{LWR@intabularmetadata}%
+ \ifboolexpr{%
+ test{\ifnumcomp{\value{LWR@hlines}}{>}{0}} or%
+ test{\ifnumcomp{\value{LWR@hdashedlines}}{>}{0}}%
+ }%
{%
- \ifdefvoid{\LWR@ruleHTMLcolor}{%
- \LWR@htmltag{tr class="tbrule"}%
- }{%
- \LWR@htmltag{%
- tr class="tbrule" % space
- style="border-top: 1px solid % space
- \LWR@origpound\LWR@ruleHTMLcolor "%
- }%
- }%
+ \LWR@htmltag{tr class="hline" }%
\LWR@orignewline%
}%
- {\LWR@htmltag{tr}\LWR@orignewline}%
- }% end of not doing hline
-}% end of not started the row
+ {% not doing hline
+ \ifbool{LWR@doingtbrule}%
+ {%
+ \ifdefvoid{\LWR@ruleHTMLcolor}{%
+ \LWR@htmltag{tr class="tbrule"}%
+ }{%
+ \LWR@htmltag{%
+ tr class="tbrule" % space
+ style="border-top: 1px solid % space
+ \LWR@origpound\LWR@ruleHTMLcolor "%
+ }%
+ }%
+ \LWR@orignewline%
+ }%
+ {\LWR@htmltag{tr}\LWR@orignewline}%
+ }% end of not doing hline
+ }% end of not started the row
}
% \end{macrocode}
% \end{macro}
@@ -27030,20 +27579,20 @@ end -- not --version
%
% \begin{macrocode}
\newcommand*{\LWR@printbartag}[1]{%
-\LWR@traceinfo{LWR@printbartag !#1!}%
-\ifboolexpr{bool{LWR@tabularmutemods} or bool{LWR@emptyatbang}}%
-{}% muting or empty
-{% not muting
- \edef\LWR@tempone{\LWR@getexparray{LWR@colbarspec}{#1}}%
- \ifdefempty{\LWR@tempone}{}{ \LWR@tempone}%
-}% not muting
-\LWR@traceinfo{LWR@printbartag done}%
+ \LWR@traceinfo{LWR@printbartag !#1!}%
+ \ifboolexpr{bool{LWR@tabularmutemods} or bool{LWR@emptyatbang}}%
+ {}% muting or empty
+ {% not muting
+ \edef\LWR@tempone{\LWR@getexparray{LWR@colbarspec}{#1}}%
+ \ifdefempty{\LWR@tempone}{}{ \LWR@tempone}%
+ }% not muting
+ \LWR@traceinfo{LWR@printbartag done}%
}
% \end{macrocode}
% \end{macro}
-% \subsection{Printing at or bang tags}
+% \subsection{Printing @ or ! tags}
% \begin{macro}{\LWR@printatbang} \marg{at -or- bang} \marg{index}
%
@@ -27054,35 +27603,35 @@ end -- not --version
% \end{macrocode}
% Fetch the column at or bang spec:
% \begin{macrocode}
-\xdef\LWR@atbangspec{\LWR@getexparray{LWR@col#1spec}{#2}}%
-\LWR@traceinfo{atbang: #2 !\LWR@atbangspec!}%
+ \xdef\LWR@atbangspec{\LWR@getexparray{LWR@col#1spec}{#2}}%
+ \LWR@traceinfo{atbang: #2 !\LWR@atbangspec!}%
% \end{macrocode}
% Only generate if is not empty;
% \begin{macrocode}
-\ifdefempty{\LWR@atbangspec}%
-{}%
-{% not empty
- \LWR@htmltag{%
- td class="td#1%
- \LWR@subaddcmidruletrim{}{}%
- \LWR@printbartag{#2}%
- "%
- \LWR@tdstartstyles%
- \LWR@addcmidrulewidth%
- \LWR@addcdashline%
- \LWR@addtabularrulecolors%
- \LWR@tdendstyles%
- }%
+ \ifdefempty{\LWR@atbangspec}%
+ {}%
+ {% not empty
+ \LWR@htmltag{%
+ td class="td#1%
+ \LWR@subaddcmidruletrim{}{}%
+ \LWR@printbartag{#2}%
+ "%
+ \LWR@tdstartstyles%
+ \LWR@addcmidrulewidth%
+ \LWR@addcdashline%
+ \LWR@addtabularrulecolors%
+ \LWR@tdendstyles%
+ }%
% \end{macrocode}
% Create an empty cell if muting for the \cs{bottomrule}:
% \begin{macrocode}
- \ifboolexpr{bool{LWR@tabularmutemods} or bool{LWR@emptyatbang}}%
- {}%
- {\LWR@atbangspec}%
+ \ifboolexpr{bool{LWR@tabularmutemods} or bool{LWR@emptyatbang}}%
+ {}%
+ {\LWR@atbangspec}%
%
- \LWR@htmltag{/td}\LWR@orignewline%
- \global\booltrue{LWR@tabularcelladded}%
-}% not empty
+ \LWR@htmltag{/td}\LWR@orignewline%
+ \global\booltrue{LWR@tabularcelladded}%
+ }% not empty
}%
% \end{macrocode}
% \end{macro}
@@ -27091,9 +27640,9 @@ end -- not --version
% \begin{macro}{\LWR@addleftmostbartag}
% \begin{macrocode}
\newcommand*{\LWR@addleftmostbartag}{%
-\ifnumcomp{\value{LWR@tableLaTeXcolindex}}{=}{1}{%
- \LWR@printbartag{leftedge}%
-}{}%
+ \ifnumcomp{\value{LWR@tableLaTeXcolindex}}{=}{1}{%
+ \LWR@printbartag{leftedge}%
+ }{}%
}
% \end{macrocode}
% \end{macro}
@@ -27102,12 +27651,12 @@ end -- not --version
% \begin{macro}{\LWR@tabularleftedge}
% \begin{macrocode}
\newcommand*{\LWR@tabularleftedge}{%
-\ifnumcomp{\value{LWR@tableLaTeXcolindex}}{=}{1}%
-{%
- \LWR@printatbang{at}{leftedge}%
- \LWR@printatbang{bang}{leftedge}%
-}% left edge
-{}% not left edge
+ \ifnumcomp{\value{LWR@tableLaTeXcolindex}}{=}{1}%
+ {%
+ \LWR@printatbang{at}{leftedge}%
+ \LWR@printatbang{bang}{leftedge}%
+ }% left edge
+ {}% not left edge
}
% \end{macrocode}
% \end{macro}
@@ -27134,102 +27683,104 @@ end -- not --version
% \begin{macrocode}
\newcommand*{\LWR@tabledatasinglecolumntag}%
{%
-\LWR@traceinfo{LWR@tabledatasinglecolumntag}%
-\LWR@maybenewtablerow%
+ \LWR@traceinfo{LWR@tabledatasinglecolumntag}%
+ \LWR@maybenewtablerow%
% \end{macrocode}
% Don't start a new paragraph tag if have already started one:
% \begin{macrocode}
-\ifbool{LWR@intabularmetadata}%
-{%
+ \ifbool{LWR@intabularmetadata}%
+ {%
% \end{macrocode}
% If have found the end of tabular command, do not create the next data cell:
% \begin{macrocode}
- \ifbool{LWR@exitingtabular}{}%
- {% not exiting tabular
+ \ifbool{LWR@exitingtabular}{}%
+ {% not exiting tabular
% \end{macrocode}
% Print the |@| and |!| contents before first column:
% \begin{macrocode}
- \LWR@tabularleftedge%
+ \LWR@tabularleftedge%
% \end{macrocode}
% Fetch the current column's alignment character into \cs{LWR@strresult}:
% \changes{v0.60}{2018/09/17}{\env{tabular}: Improved memory management: Not using \pkg{xstring}.}
% \begin{macrocode}
- \xdef\LWR@strresult{%
- \LWR@getexparray{LWR@tablecolspec}{\arabic{LWR@tableLaTeXcolindex}}%
- }%
+ \xdef\LWR@strresult{%
+ \LWR@getexparray{LWR@tablecolspec}{\arabic{LWR@tableLaTeXcolindex}}%
+ }%
% \end{macrocode}
% print the start of a new table data cell:
% \begin{macrocode}
-\LWR@traceinfo{LWR@tabledatasinglecolumntag: about to print td tag}%
- \LWR@htmltag{td class="td%
+ \LWR@traceinfo{LWR@tabledatasinglecolumntag: about to print td tag}%
+ \LWR@htmltag{%
+ td class="td%
% \end{macrocode}
% append this column's spec:
% \begin{macrocode}
- \LWR@strresult%
+ \LWR@strresult%
% \end{macrocode}
% If this column has a cmidrule, add ``rule'' to the end of the \HTML\ class tag.
% Also add vertical bar tags.
% \begin{macrocode}
- \LWR@addcmidruletrim%
- \LWR@addleftmostbartag%
- \LWR@printbartag{\arabic{LWR@tableLaTeXcolindex}}%
- "%
+ \LWR@addcmidruletrim%
+ \LWR@addleftmostbartag%
+ \LWR@printbartag{\arabic{LWR@tableLaTeXcolindex}}%
+ "%
% \end{macrocode}
% Add styles for rules, alignment:
% \changes{v0.42}{2017/10/26}{If \progcode{FormatWP} add cell alignment.}
% \begin{macrocode}
- \LWR@tdstartstyles%
- \LWR@addcmidrulewidth%
- \LWR@addcdashline%
+ \LWR@tdstartstyles%
+ \LWR@addcmidrulewidth%
+ \LWR@addcdashline%
% \end{macrocode}
% \changes{v0.60}{2018/09/17}{\env{tabular}: Improved memory management: Not using \pkg{xstring}.}
% \begin{macrocode}
- \xdef\LWR@thiscolspec{%
- \LWR@getexparray{LWR@tablecolspec}{\arabic{LWR@tableLaTeXcolindex}}%
- }%
- \LWR@addformatwpalignment{\LWR@thiscolspec}%
+ \xdef\LWR@thiscolspec{%
+ \LWR@getexparray{LWR@tablecolspec}%
+ {\arabic{LWR@tableLaTeXcolindex}}%
+ }%
+ \LWR@addformatwpalignment{\LWR@thiscolspec}%
% \end{macrocode}
% Add styles for cell and rule colors:
% \changes{v0.48}{2018/02/08}{\pkg{colortbl}: Added.}
% \begin{macrocode}
- \LWR@addtabularrowcolor%
- \LWR@addtabularrulecolors%
+ \LWR@addtabularrowcolor%
+ \LWR@addtabularrulecolors%
% \end{macrocode}
% \begin{macrocode}
- \LWR@tdendstyles%
- }% HTML td
- \LWR@traceinfo{LWR@tabledatasinglecolumntag: done printing td tag}%
+ \LWR@tdendstyles%
+ }% HTML td
+ \LWR@traceinfo{LWR@tabledatasinglecolumntag: done printing td tag}%
% \end{macrocode}
% If this is a |p|, |m|, |b|, or X column, allow paragraphs:
% \begin{macrocode}
- \ifboolexpr{%
- test{ \ifdefstring{\LWR@strresult}{p} } or
- test{ \ifdefstring{\LWR@strresult}{m} } or
- test{ \ifdefstring{\LWR@strresult}{b} } or
- test{ \ifdefstring{\LWR@strresult}{P} } or
- test{ \ifdefstring{\LWR@strresult}{M} } or
- test{ \ifdefstring{\LWR@strresult}{B} } or
- test{ \ifdefstring{\LWR@strresult}{X} }
- }%
- {% allow pars
- \LWR@traceinfo{LWR@tabledatasinglecolumntag: about to LWR@startpars}%
- \global\booltrue{LWR@tableparcell}%
- \LWR@startpars%
- \LWR@traceinfo{LWR@tabledatasinglecolumntag: done with LWR@startpars}%
- }% allow pars
- {}% no pars
+ \ifboolexpr{%
+ test{ \ifdefstring{\LWR@strresult}{p} } or
+ test{ \ifdefstring{\LWR@strresult}{m} } or
+ test{ \ifdefstring{\LWR@strresult}{b} } or
+ test{ \ifdefstring{\LWR@strresult}{P} } or
+ test{ \ifdefstring{\LWR@strresult}{M} } or
+ test{ \ifdefstring{\LWR@strresult}{B} } or
+ test{ \ifdefstring{\LWR@strresult}{X} }
+ }%
+ {% allow pars
+ \LWR@traceinfo{LWR@tabledatasinglecolumntag: about to LWR@startpars}%
+ \booltrue{LWR@tableparcell}%
+ \LWR@startpars%
+ \LWR@traceinfo{LWR@tabledatasinglecolumntag: done with LWR@startpars}%
+ }% allow pars
+ {}% no pars
% \end{macrocode}
% Print the |>| contents unless muted for the \cs{bottomrule}:
% \begin{macrocode}
- \ifboolexpr{bool{LWR@tabularmutemods} or bool{LWR@emptyatbang}}%
- {}%
- {%
- \LWR@getexparray{LWR@colbeforespec}{\arabic{LWR@tableLaTeXcolindex}}%
- }%
- \global\boolfalse{LWR@intabularmetadata}%
- }% not exiting tabular
-}{}% in tabular metadata
-\LWR@traceinfo{LWR@tabledatasinglecolumntag: done}%
+ \ifboolexpr{bool{LWR@tabularmutemods} or bool{LWR@emptyatbang}}%
+ {}%
+ {%
+ \LWR@getexparray{LWR@colbeforespec}{\arabic{LWR@tableLaTeXcolindex}}%
+ }%
+ \boolfalse{LWR@intabularmetadata}%
+ }% not exiting tabular
+ }{}% in tabular metadata
+ \LWR@traceinfo{LWR@tabledatasinglecolumntag: done}%
}%
% \end{macrocode}
% \end{macro}
@@ -27256,13 +27807,6 @@ end -- not --version
-% \DescribeCounter{LWR@midrulecounter}
-% Indexes across the |LWR@midrules| and |LWR@trim<l/r>rules| data arrays.
-% \begin{macrocode}
-\newcounter{LWR@midrulecounter}
-% \end{macrocode}
-
-
% \DescribeLength{\LWR@heavyrulewidth}
% The default width of the rule.
@@ -27311,21 +27855,21 @@ end -- not --version
% \begin{macrocode}
\newcommand*{\LWR@clearmidrules}
{%
-\setcounter{LWR@midrulecounter}{1}%
-\whileboolexpr{%
- not test{%
- \ifnumcomp{\value{LWR@midrulecounter}}{>}%
- {\value{LWR@tabletotalLaTeXcols}}%
+ \defcounter{LWR@midrulecounter}{1}%
+ \whileboolexpr{%
+ not test{%
+ \ifnumcomp{\value{LWR@midrulecounter}}{>}%
+ {\value{LWR@tabletotalLaTeXcols}}%
+ }%
+ }%
+ {%
+ \LWR@setexparray{LWR@midrules}{\arabic{LWR@midrulecounter}}{0pt}%
+ \setlength{\LWR@thiscmidrulewidth}{\LWR@cmidrulewidth}%
+ \LWR@setexparray{LWR@trimlrules}{\arabic{LWR@midrulecounter}}{}%
+ \LWR@setexparray{LWR@trimrrules}{\arabic{LWR@midrulecounter}}{}%
+ \LWR@setexparray{LWR@cdashlines}{\arabic{LWR@midrulecounter}}{N}%
+ \defaddtocounter{LWR@midrulecounter}{1}%
}%
-}%
-{%
- \LWR@setexparray{LWR@midrules}{\arabic{LWR@midrulecounter}}{0pt}%
- \setlength{\LWR@thiscmidrulewidth}{\LWR@cmidrulewidth}%
- \LWR@setexparray{LWR@trimlrules}{\arabic{LWR@midrulecounter}}{}%
- \LWR@setexparray{LWR@trimrrules}{\arabic{LWR@midrulecounter}}{}%
- \LWR@setexparray{LWR@cdashlines}{\arabic{LWR@midrulecounter}}{N}%
- \addtocounter{LWR@midrulecounter}{1}%
-}%
}
% \end{macrocode}
% \end{macro}
@@ -27344,19 +27888,19 @@ end -- not --version
%
% \begin{macrocode}
\newcommand*{\LWR@subcmidrule}[4]{%
-\setcounter{LWR@midrulecounter}{#3}%
-\whileboolexpr{%
- not test {%
- \ifnumcomp{\value{LWR@midrulecounter}}{>}{#4}%
+ \defcounter{LWR@midrulecounter}{#3}%
+ \whileboolexpr{%
+ not test {%
+ \ifnumcomp{\value{LWR@midrulecounter}}{>}{#4}%
+ }%
}%
-}%
-{%
- \LWR@setexparray{LWR@midrules}{\arabic{LWR@midrulecounter}}{#1}%
- \addtocounter{LWR@midrulecounter}{1}%
-}% whiledo
-\IfSubStr{#2}{l}{\LWR@setexparray{LWR@trimlrules}{#3}{l}}{}%
-\IfSubStr{#2}{r}{\LWR@setexparray{LWR@trimrrules}{#4}{r}}{}%
-\global\booltrue{LWR@doingcmidrule}%
+ {%
+ \LWR@setexparray{LWR@midrules}{\arabic{LWR@midrulecounter}}{#1}%
+ \defaddtocounter{LWR@midrulecounter}{1}%
+ }% whiledo
+ \IfSubStr{#2}{l}{\LWR@setexparray{LWR@trimlrules}{#3}{l}}{}%
+ \IfSubStr{#2}{r}{\LWR@setexparray{LWR@trimrrules}{#4}{r}}{}%
+ \booltrue{LWR@doingcmidrule}%
}
% \end{macrocode}
% \end{macro}
@@ -27386,17 +27930,17 @@ end -- not --version
%
% \begin{macrocode}
\newcommand*{\LWR@subcdashline}[2]{%
-\setcounter{LWR@midrulecounter}{#1}%
-\whileboolexpr{%
- not test {%
- \ifnumcomp{\value{LWR@midrulecounter}}{>}{#2}%
+ \defcounter{LWR@midrulecounter}{#1}%
+ \whileboolexpr{%
+ not test {%
+ \ifnumcomp{\value{LWR@midrulecounter}}{>}{#2}%
+ }%
}%
-}%
-{%
- \LWR@setexparray{LWR@cdashlines}{\arabic{LWR@midrulecounter}}{Y}%
- \addtocounter{LWR@midrulecounter}{1}%
-}% whiledo
-\global\booltrue{LWR@doingcmidrule}%
+ {%
+ \LWR@setexparray{LWR@cdashlines}{\arabic{LWR@midrulecounter}}{Y}%
+ \defaddtocounter{LWR@midrulecounter}{1}%
+ }% whiledo
+ \booltrue{LWR@doingcmidrule}%
}
% \end{macrocode}
% \end{macro}
@@ -27427,15 +27971,10 @@ end -- not --version
% \end{macrocode}
-% Used to add a style to a table data cell:
-% \begin{macrocode}
-\newbool{LWR@tdhavecellstyle}
-% \end{macrocode}
-
% \begin{macro}{\LWR@tdstartstyles}
% Begins possibly adding a table data cell style.
% \begin{macrocode}
-\newcommand*{\LWR@tdstartstyles}{\global\boolfalse{LWR@tdhavecellstyle}}
+\newcommand*{\LWR@tdstartstyles}{\boolfalse{LWR@tdhavecellstyle}}
% \end{macrocode}
% \end{macro}
@@ -27443,10 +27982,10 @@ end -- not --version
% Starts adding a table data cell style.
% \begin{macrocode}
\newcommand*{\LWR@tdaddstyle}{%
-\ifbool{LWR@tdhavecellstyle}%
-{; }%
-{ style="}%
-\booltrue{LWR@tdhavecellstyle}%
+ \ifbool{LWR@tdhavecellstyle}%
+ {; }%
+ { style="}%
+ \booltrue{LWR@tdhavecellstyle}%
}
% \end{macrocode}
% \end{macro}
@@ -27456,10 +27995,11 @@ end -- not --version
% Prints the closing quote.
% \begin{macrocode}
\newcommand*{\LWR@tdendstyles}{%
-\ifbool{LWR@tdhavecellstyle}{%
- "%
- \global\boolfalse{LWR@tdhavecellstyle}%
-}{}%
+ \ifbool{LWR@tdhavecellstyle}%
+ {%
+ "%
+ \boolfalse{LWR@tdhavecellstyle}%
+ }{}%
}
% \end{macrocode}
% \end{macro}
@@ -27473,23 +28013,23 @@ end -- not --version
%
% \begin{macrocode}
\newcommand*{\LWR@subaddcmidruletrim}[2]{%
-\setlength{\LWR@templengthone}{%
- \LWR@getexparray{LWR@midrules}{\arabic{LWR@tableLaTeXcolindex}}%
-}%
-\ifdimcomp{\LWR@templengthone}{>}{0pt}%
-{%
+ \setlength{\LWR@templengthone}{%
+ \LWR@getexparray{LWR@midrules}{\arabic{LWR@tableLaTeXcolindex}}%
+ }%
+ \ifdimcomp{\LWR@templengthone}{>}{0pt}%
+ {%
% \end{macrocode}
% Print the class with left and right trim letters appended:
% \begin{macrocode}
- \LWR@origtilde tdrule#1#2%
+ \LWR@origtilde tdrule#1#2%
% \end{macrocode}
% Remember the width of the rule:
% \begin{macrocode}
- \setlength{\LWR@thiscmidrulewidth}{\LWR@templengthone}%
-}%
-{%
- \setlength{\LWR@thiscmidrulewidth}{0pt}%
-}%
+ \setlength{\LWR@thiscmidrulewidth}{\LWR@templengthone}%
+ }%
+ {%
+ \setlength{\LWR@thiscmidrulewidth}{0pt}%
+ }%
}
% \end{macrocode}
% \end{macro}
@@ -27502,9 +28042,9 @@ end -- not --version
%
% \begin{macrocode}
\newcommand*{\LWR@addcmidruletrim}{%
-\LWR@subaddcmidruletrim%
-{\LWR@getexparray{LWR@trimlrules}{\arabic{LWR@tableLaTeXcolindex}}}%
-{\LWR@getexparray{LWR@trimrrules}{\arabic{LWR@tableLaTeXcolindex}}}%
+ \LWR@subaddcmidruletrim%
+ {\LWR@getexparray{LWR@trimlrules}{\arabic{LWR@tableLaTeXcolindex}}}%
+ {\LWR@getexparray{LWR@trimrrules}{\arabic{LWR@tableLaTeXcolindex}}}%
}
% \end{macrocode}
% \end{macro}
@@ -27525,42 +28065,42 @@ end -- not --version
% Only add a custom width if |thiswidth| is different than the |defaultwidth|,
% or if a color is being used:
% \begin{macrocode}
-\ifboolexpr{%
- test{\ifdimcomp{#1}{=}{0pt}} or
- (
- ( test{\ifdimcomp{#1}{=}{#2}} and not bool{FormatWP} )
- and ( test {\ifdefvoid{\LWR@ruleHTMLcolor}} )
- )
-}%
-{}% default width and color
-{% custom width and/or color
+ \ifboolexpr{%
+ test{\ifdimcomp{#1}{=}{0pt}} or
+ (
+ ( test{\ifdimcomp{#1}{=}{#2}} and not bool{FormatWP} )
+ and ( test {\ifdefvoid{\LWR@ruleHTMLcolor}} )
+ )
+ }%
+ {}% default width and color
+ {% custom width and/or color
% \end{macrocode}
% Ensure that the width is wide enough to display in the browser:
% \begin{macrocode}
- \LWR@forceminwidth{#1}%
+ \LWR@forceminwidth{#1}%
% \end{macrocode}
% Begin adding another style:
% \begin{macrocode}
- \LWR@tdaddstyle%
+ \LWR@tdaddstyle%
% \end{macrocode}
% The style itself:
% \begin{macrocode}
- border-top:\LWR@printlength{\LWR@atleastonept} solid %
+ border-top:\LWR@printlength{\LWR@atleastonept} solid % space
% \end{macrocode}
% If default gray, the darkness of the color depends on the thickness of the rule:
% \begin{macrocode}
- \ifdefvoid{\LWR@ruleHTMLcolor}{%
- \ifdimcomp{#1}{<}{\LWR@lightrulewidth}%
- {\LWR@origpound{}A0A0A0}%
- {% lightrule or heaver
- \ifdimcomp{#1}{<}{\LWR@heavyrulewidth}%
- {\LWR@origpound{}808080}%
- {black}%
- }% lightrule or heavier
- }{%
- \LWR@origpound\LWR@ruleHTMLcolor%
- }
-}% custom width and/or color
+ \ifdefvoid{\LWR@ruleHTMLcolor}{%
+ \ifdimcomp{#1}{<}{\LWR@lightrulewidth}%
+ {\LWR@origpound{}A0A0A0}%
+ {% lightrule or heaver
+ \ifdimcomp{#1}{<}{\LWR@heavyrulewidth}%
+ {\LWR@origpound{}808080}%
+ {black}%
+ }% lightrule or heavier
+ }{%
+ \LWR@origpound\LWR@ruleHTMLcolor%
+ }%
+ }% custom width and/or color
}
% \end{macrocode}
% \end{macro}
@@ -27572,7 +28112,7 @@ end -- not --version
% Must be placed between \cs{LWR@tdstartstyles} and \cs{LWR@tdendstyles}.
% \begin{macrocode}
\newcommand{\LWR@addcmidrulewidth}{%
-\LWR@addrulewidth{\LWR@thiscmidrulewidth}{\LWR@cmidrulewidth}%
+ \LWR@addrulewidth{\LWR@thiscmidrulewidth}{\LWR@cmidrulewidth}%
}
% \end{macrocode}
% \end{macro}
@@ -27585,16 +28125,16 @@ end -- not --version
% \changes{v0.56}{2018/05/04}{\pkg{arydshln}: Added.}
% \begin{macrocode}
\newcommand{\LWR@addcdashline}{%
-\edef\LWR@tempone{%
- \LWR@getexparray{LWR@cdashlines}{\arabic{LWR@tableLaTeXcolindex}}%
-}%
-\ifdefstring{\LWR@tempone}{Y}{%
- \LWR@tdaddstyle%
- border-top: 1pt dashed %
- \ifdefvoid{\LWR@ruleHTMLcolor}%
- {black}%
- {\LWR@origpound\LWR@ruleHTMLcolor}%
-}{}%
+ \edef\LWR@tempone{%
+ \LWR@getexparray{LWR@cdashlines}{\arabic{LWR@tableLaTeXcolindex}}%
+ }%
+ \ifdefstring{\LWR@tempone}{Y}{%
+ \LWR@tdaddstyle%
+ border-top: 1pt dashed %
+ \ifdefvoid{\LWR@ruleHTMLcolor}%
+ {black}%
+ {\LWR@origpound\LWR@ruleHTMLcolor}%
+ }{}%
}
% \end{macrocode}
% \end{macro}
@@ -27604,8 +28144,8 @@ end -- not --version
% \changes{v0.47}{2018/01/26}{Fix: Line wrap at \HTML\ hyphen.}
% \begin{macrocode}
\newcommand*{\LWR@WPcell}[2]{%
-\LWR@tdaddstyle%
-\LWR@print@mbox{text-align:#1}; \LWR@print@mbox{vertical-align:#2}%
+ \LWR@tdaddstyle%
+ \LWR@print@mbox{text-align:#1}; \LWR@print@mbox{vertical-align:#2}%
}
% \end{macrocode}
% \end{macro}
@@ -27620,17 +28160,17 @@ end -- not --version
% \changes{v0.44}{2017/11/08}{Fix for multicolumn alignment if \progcode{FormatWP}.}
% \begin{macrocode}
\newcommand*{\LWR@addformatwpalignment}[1]{%
-\ifbool{FormatWP}{%
-\IfSubStr{#1}{l}{\LWR@WPcell{left}{middle}}{}%
-\IfSubStr{#1}{c}{\LWR@WPcell{center}{middle}}{}%
-\IfSubStr{#1}{r}{\LWR@WPcell{right}{middle}}{}%
-\IfSubStr{#1}{p}{\LWR@WPcell{left}{bottom}}{}%
-\IfSubStr{#1}{m}{\LWR@WPcell{left}{middle}}{}%
-\IfSubStr{#1}{b}{\LWR@WPcell{left}{top}}{}%
-\IfSubStr{#1}{P}{\LWR@WPcell{center}{bottom}}{}%
-\IfSubStr{#1}{M}{\LWR@WPcell{center}{middle}}{}%
-\IfSubStr{#1}{B}{\LWR@WPcell{center}{top}}{}%
-}{}%
+ \ifbool{FormatWP}{%
+ \IfSubStr{#1}{l}{\LWR@WPcell{left}{middle}}{}%
+ \IfSubStr{#1}{c}{\LWR@WPcell{center}{middle}}{}%
+ \IfSubStr{#1}{r}{\LWR@WPcell{right}{middle}}{}%
+ \IfSubStr{#1}{p}{\LWR@WPcell{left}{bottom}}{}%
+ \IfSubStr{#1}{m}{\LWR@WPcell{left}{middle}}{}%
+ \IfSubStr{#1}{b}{\LWR@WPcell{left}{top}}{}%
+ \IfSubStr{#1}{P}{\LWR@WPcell{center}{bottom}}{}%
+ \IfSubStr{#1}{M}{\LWR@WPcell{center}{middle}}{}%
+ \IfSubStr{#1}{B}{\LWR@WPcell{center}{top}}{}%
+ }{}%
}
% \end{macrocode}
% \end{macro}
@@ -27646,19 +28186,19 @@ end -- not --version
%
% \begin{macrocode}
\newcommand*{\LWR@addtabularrowcolor}{%
-\ifbool{LWR@tabularmutemods}{}{%
- \ifdefvoid{\LWR@rowHTMLcolor}{%
- \ifdefvoid{\LWR@xcolorrowHTMLcolor}{}%
- {% xcolor row color
+ \ifbool{LWR@tabularmutemods}{}{%
+ \ifdefvoid{\LWR@rowHTMLcolor}{%
+ \ifdefvoid{\LWR@xcolorrowHTMLcolor}{}%
+ {% xcolor row color
+ \LWR@tdaddstyle%
+ background:\LWR@origpound\LWR@xcolorrowHTMLcolor%
+ }%
+ }%
+ {% explicit row color
\LWR@tdaddstyle%
- background:\LWR@origpound\LWR@xcolorrowHTMLcolor%
+ background:\LWR@origpound\LWR@rowHTMLcolor%
}%
}%
- {% explicit row color
- \LWR@tdaddstyle%
- background:\LWR@origpound\LWR@rowHTMLcolor%
- }%
-}%
}
% \end{macrocode}
% \end{macro}
@@ -27674,60 +28214,60 @@ end -- not --version
% \end{macrocode}
% If either form of horizontal rule is requested:
% \begin{macrocode}
-\ifboolexpr{%
- test{\ifnumcomp{\value{LWR@hlines}}{>}{0}} or%
- test{\ifnumcomp{\value{LWR@hdashedlines}}{>}{0}} or%
- bool{LWR@doingtbrule}%
-}{%
+ \ifboolexpr{%
+ test{\ifnumcomp{\value{LWR@hlines}}{>}{0}} or%
+ test{\ifnumcomp{\value{LWR@hdashedlines}}{>}{0}} or%
+ bool{LWR@doingtbrule}%
+ }{%
% \end{macrocode}
% If there is a no custom color:
% \begin{macrocode}
- \ifdefvoid{\LWR@ruleHTMLcolor}%
- {%
- \ifnumcomp{\value{LWR@hlines}}{>}{1}%
- {%
- \LWR@tdaddstyle%
- border-top: 4px double%
- }{% else
- \ifnumcomp{\value{LWR@hdashedlines}}{>}{1}%
+ \ifdefvoid{\LWR@ruleHTMLcolor}%
{%
- \LWR@tdaddstyle%
- border-top: 2px dashed%
- }{% else
- \ifnumcomp{\value{LWR@hdashedlines}}{=}{1}%
- {%
- \LWR@tdaddstyle%
- border-top: 1px dashed%
- }{}}}%
+ \ifnumcomp{\value{LWR@hlines}}{>}{1}%
+ {%
+ \LWR@tdaddstyle%
+ border-top: 4px double%
+ }{% else
+ \ifnumcomp{\value{LWR@hdashedlines}}{>}{1}%
+ {%
+ \LWR@tdaddstyle%
+ border-top: 2px dashed%
+ }{% else
+ \ifnumcomp{\value{LWR@hdashedlines}}{=}{1}%
+ {%
+ \LWR@tdaddstyle%
+ border-top: 1px dashed%
+ }{}}}%
% \end{macrocode}
% If no color and not doubled or dashed, then add nothing, since
% a simpler rule is the default.
% \begin{macrocode}
- }%
+ }%
% \end{macrocode}
% If there is a custom color:
% \begin{macrocode}
- {%
- \ifnumcomp{\value{LWR@hlines}}{>}{1}%
- {%
- \LWR@tdaddstyle%
- border-top: 4px double \LWR@origpound\LWR@ruleHTMLcolor%
- }{% else
- \ifnumcomp{\value{LWR@hdashedlines}}{>}{1}%
{%
- \LWR@tdaddstyle%
- border-top: 2px dashed \LWR@origpound\LWR@ruleHTMLcolor%
- }{% else
- \ifnumcomp{\value{LWR@hdashedlines}}{=}{1}%
- {%
- \LWR@tdaddstyle%
- border-top: 1px dashed \LWR@origpound\LWR@ruleHTMLcolor%
- }{% else
- \LWR@tdaddstyle%
- border-top: 1px solid \LWR@origpound\LWR@ruleHTMLcolor%
- }}}%
- }%
-}{}%
+ \ifnumcomp{\value{LWR@hlines}}{>}{1}%
+ {%
+ \LWR@tdaddstyle%
+ border-top: 4px double \LWR@origpound\LWR@ruleHTMLcolor%
+ }{% else
+ \ifnumcomp{\value{LWR@hdashedlines}}{>}{1}%
+ {%
+ \LWR@tdaddstyle%
+ border-top: 2px dashed \LWR@origpound\LWR@ruleHTMLcolor%
+ }{% else
+ \ifnumcomp{\value{LWR@hdashedlines}}{=}{1}%
+ {%
+ \LWR@tdaddstyle%
+ border-top: 1px dashed \LWR@origpound\LWR@ruleHTMLcolor%
+ }{% else
+ \LWR@tdaddstyle%
+ border-top: 1px solid \LWR@origpound\LWR@ruleHTMLcolor%
+ }}}%
+ }%
+ }{}%
}
% \end{macrocode}
% \end{macro}
@@ -27746,88 +28286,81 @@ end -- not --version
% \end{macrocode}
% Custom horizonal rule color:
% \begin{macrocode}
-\LWR@addtabularhrulecolor%
+ \LWR@addtabularhrulecolor%
% \end{macrocode}
% No vertical rules if finishing the \env{tabular} with a row of empty cells:
% \begin{macrocode}
-\ifbool{LWR@tabularmutemods}{}{%
+ \ifbool{LWR@tabularmutemods}{}{%
% \end{macrocode}
% If at the leftmost cell, possibly add a leftmost vertical rule:
% \begin{macrocode}
- \ifnumequal{\value{LWR@tableLaTeXcolindex}}{1}{%
+ \ifnumequal{\value{LWR@tableLaTeXcolindex}}{1}{%
% \end{macrocode}
% Fetch the left edge's vertical bar specification:
% \begin{macrocode}
- \edef\LWR@tempone{\LWR@getexparray{LWR@colbarspec}{leftedge}}%
+ \edef\LWR@tempone{\LWR@getexparray{LWR@colbarspec}{leftedge}}%
+% \end{macrocode}
+% Add a custom style if a vertical bar was requested:
+% \begin{macrocode}
+ \ifdefstring{\LWR@tempone}{tvertbarl}{%
+ \LWR@tdaddstyle%
+ border-left: 1px solid % space
+ \LWR@vertruleHTMLcolor%
+ }{}%
+ \ifdefstring{\LWR@tempone}{tvertbarldouble}{%
+ \LWR@tdaddstyle%
+ border-left: 4px double % space
+ \LWR@vertruleHTMLcolor%
+ }{}%
+ \ifdefstring{\LWR@tempone}{tvertbarldash}{%
+ \LWR@tdaddstyle%
+ border-left: 1px dashed % space
+ \LWR@vertruleHTMLcolor%
+ }{}%
+ \ifdefstring{\LWR@tempone}{tvertbarldoubledash}{%
+ \LWR@tdaddstyle%
+ border-left: 2px dashed % space
+ \LWR@vertruleHTMLcolor%
+ }{}%
+ }{}%
+% \end{macrocode}
+% Possibly add a right vertical rule for this cell:
+% \begin{macrocode}
+ \edef\LWR@tempone{%
+ \LWR@getexparray{LWR@colbarspec}{\arabic{LWR@tableLaTeXcolindex}}%
+ }%
+ \ifdefstring{\LWR@tempone}{tvertbarr}{%
% \end{macrocode}
% Add a custom style if a vertical bar was requested:
% \begin{macrocode}
- \ifdefstring{\LWR@tempone}{tvertbarl}{%
\LWR@tdaddstyle%
- border-left: 1px solid % space
- \LWR@vertruleHTMLcolor%
+ border-right: 1px solid \LWR@vertruleHTMLcolor%
}{}%
- \ifdefstring{\LWR@tempone}{tvertbarldouble}{%
+ \ifdefstring{\LWR@tempone}{tvertbarrdouble}{%
\LWR@tdaddstyle%
- border-left: 4px double % space
- \LWR@vertruleHTMLcolor%
+ border-right: 4px double \LWR@vertruleHTMLcolor%
}{}%
- \ifdefstring{\LWR@tempone}{tvertbarldash}{%
+ \ifdefstring{\LWR@tempone}{tvertbarrdash}{%
\LWR@tdaddstyle%
- border-left: 1px dashed % space
- \LWR@vertruleHTMLcolor%
+ border-right: 1px dashed \LWR@vertruleHTMLcolor%
}{}%
- \ifdefstring{\LWR@tempone}{tvertbarldoubledash}{%
+ \ifdefstring{\LWR@tempone}{tvertbarrdoubledash}{%
\LWR@tdaddstyle%
- border-left: 2px dashed % space
- \LWR@vertruleHTMLcolor%
+ border-right: 2px dashed \LWR@vertruleHTMLcolor%
}{}%
- }{}%
-% \end{macrocode}
-% Possibly add a right vertical rule for this cell:
-% \begin{macrocode}
- \edef\LWR@tempone{%
- \LWR@getexparray{LWR@colbarspec}{\arabic{LWR@tableLaTeXcolindex}}%
}%
- \ifdefstring{\LWR@tempone}{tvertbarr}{%
-% \end{macrocode}
-% Add a custom style if a vertical bar was requested:
-% \begin{macrocode}
- \LWR@tdaddstyle%
- border-right: 1px solid \LWR@vertruleHTMLcolor%
- }{}%
- \ifdefstring{\LWR@tempone}{tvertbarrdouble}{%
- \LWR@tdaddstyle%
- border-right: 4px double \LWR@vertruleHTMLcolor%
- }{}%
- \ifdefstring{\LWR@tempone}{tvertbarrdash}{%
- \LWR@tdaddstyle%
- border-right: 1px dashed \LWR@vertruleHTMLcolor%
- }{}%
- \ifdefstring{\LWR@tempone}{tvertbarrdoubledash}{%
- \LWR@tdaddstyle%
- border-right: 2px dashed \LWR@vertruleHTMLcolor%
- }{}%
-}%
}
% \end{macrocode}
% \end{macro}
-% \DescribeCounter{LWR@cellcolordepth}
-% Counts how many cell color \element{div}s were added to the current tabular data cell.
-% \begin{macrocode}
-\newcounter{LWR@cellcolordepth}
-% \end{macrocode}
-
-
% \begin{macro}{\LWR@subaddtabularcellcolor} \marg{\HTML\ color}
% \begin{macrocode}
\newcommand*{\LWR@subaddtabularcellcolor}[1]{%
-\LWR@htmltag{div class="cellcolor" style="%
- background:\LWR@origpound{}{}#1 %
-" }%
-\addtocounter{LWR@cellcolordepth}{1}%
+ \LWR@htmltag{div class="cellcolor" style="%
+ background:\LWR@origpound{}{}#1 %
+ " }%
+ \defaddtocounter{LWR@cellcolordepth}{1}%
}
% \end{macrocode}
% \end{macro}
@@ -27837,21 +28370,21 @@ end -- not --version
% \changes{v0.49}{2018/02/18}{\pkg{xcolor}: Added tabular row colors.}
% \begin{macrocode}
\newcommand*{\LWR@addtabularcellcolor}{%
-\ifdefvoid{\LWR@cellHTMLcolor}%
-{%
- \ifdefvoid{\LWR@rowHTMLcolor}%
+ \ifdefvoid{\LWR@cellHTMLcolor}%
{%
- \ifdefvoid{\LWR@xcolorrowHTMLcolor}%
+ \ifdefvoid{\LWR@rowHTMLcolor}%
{%
- \ifdefvoid{\LWR@columnHTMLcolor}%
- {}%
- {\LWR@subaddtabularcellcolor{\LWR@columnHTMLcolor}}%
+ \ifdefvoid{\LWR@xcolorrowHTMLcolor}%
+ {%
+ \ifdefvoid{\LWR@columnHTMLcolor}%
+ {}%
+ {\LWR@subaddtabularcellcolor{\LWR@columnHTMLcolor}}%
+ }%
+ {\LWR@subaddtabularcellcolor{\LWR@xcolorrowHTMLcolor}}%
}%
- {\LWR@subaddtabularcellcolor{\LWR@xcolorrowHTMLcolor}}%
+ {\LWR@subaddtabularcellcolor{\LWR@rowHTMLcolor}}%
}%
- {\LWR@subaddtabularcellcolor{\LWR@rowHTMLcolor}}%
-}%
-{\LWR@subaddtabularcellcolor{\LWR@cellHTMLcolor}}%
+ {\LWR@subaddtabularcellcolor{\LWR@cellHTMLcolor}}%
}
% \end{macrocode}
% \end{macro}
@@ -27861,24 +28394,6 @@ end -- not --version
% \subsubsection{Parsing multicolumns}
-% \begin{macrocode}
-\newcounter{LWR@tablemulticolswidth}
-% \end{macrocode}
-%
-% Indexes into the multicolumn specification:
-% \begin{macrocode}
-\newcounter{LWR@tablemulticolspos}
-% \end{macrocode}
-
-% Remembers multicolumn vertical rules if found in the column spec.
-% \begin{macrocode}
-\newcounter{LWR@mcolvertbarsl}
-\newcounter{LWR@mcolvertbarsr}
-\newcounter{LWR@mcolvertbarsldash}
-\newcounter{LWR@mcolvertbarsrdash}
-\newbool{LWR@mcolvertbaronleft}%
-% \end{macrocode}
-
% \begin{macro}{\LWR@printmccoltype} \marg{colspec}
% Print any valid column type found. Does not print |@|, |!|, |>|, or |<| columns
% or their associated tokens.
@@ -27886,64 +28401,64 @@ end -- not --version
% This is printed as part of the table data tag's |class|.
% \begin{macrocode}
\newcommand*{\LWR@printmccoltype}[1]{%
-\LWR@traceinfo{lwr@printmccoltype -#1-}%
+ \LWR@traceinfo{lwr@printmccoltype -#1-}%
% \end{macrocode}
% Get one token of the column spec:
% \begin{macrocode}
-\StrChar{#1}{\arabic{LWR@tablemulticolspos}}[\LWR@strresult]%
+ \StrChar{#1}{\arabic{LWR@tablemulticolspos}}[\LWR@strresult]%
% \end{macrocode}
% Add to the \HTML\ tag depending on which column type is found:
% \begin{macrocode}
-\IfStrEq{\LWR@strresult}{l}{l}{}%
-\IfStrEq{\LWR@strresult}{c}{c}{}%
-\IfStrEq{\LWR@strresult}{r}{r}{}%
-\IfStrEq{\LWR@strresult}{p}{p}{}%
-\IfStrEq{\LWR@strresult}{m}{m}{}%
-\IfStrEq{\LWR@strresult}{b}{b}{}%
-\IfStrEq{\LWR@strresult}{P}{P}{}%
-\IfStrEq{\LWR@strresult}{M}{M}{}%
-\IfStrEq{\LWR@strresult}{B}{B}{}%
+ \IfStrEq{\LWR@strresult}{l}{l}{}%
+ \IfStrEq{\LWR@strresult}{c}{c}{}%
+ \IfStrEq{\LWR@strresult}{r}{r}{}%
+ \IfStrEq{\LWR@strresult}{p}{p}{}%
+ \IfStrEq{\LWR@strresult}{m}{m}{}%
+ \IfStrEq{\LWR@strresult}{b}{b}{}%
+ \IfStrEq{\LWR@strresult}{P}{P}{}%
+ \IfStrEq{\LWR@strresult}{M}{M}{}%
+ \IfStrEq{\LWR@strresult}{B}{B}{}%
% \end{macrocode}
% \changes{v0.56}{2018/05/10}{Added \pkg{array} \texttt{W} column.}
% \begin{macrocode}
-\IfStrEq{\LWR@strresult}{w}{w}{}%
-\IfStrEq{\LWR@strresult}{W}{W}{}%
+ \IfStrEq{\LWR@strresult}{w}{w}{}%
+ \IfStrEq{\LWR@strresult}{W}{W}{}%
% \end{macrocode}
% \begin{macrocode}
-\IfStrEq{\LWR@strresult}{S}{c}{}%
-\IfStrEq{\LWR@strresult}{s}{c}{}%
+ \IfStrEq{\LWR@strresult}{S}{c}{}%
+ \IfStrEq{\LWR@strresult}{s}{c}{}%
% \end{macrocode}
% \begin{macrocode}
-\IfStrEq{\LWR@strresult}{X}{p}{}%
+ \IfStrEq{\LWR@strresult}{X}{p}{}%
% \end{macrocode}
% \changes{v0.43}{2017/11/07}{Added vertical rules.}
% \changes{v0.56}{2018/04/30}{Adds support for double vertical rules.}
% \changes{v0.56}{2018/05/05}{Adds support for dashed vertical rules.}
% \begin{macrocode}
-\IfStrEq{\LWR@strresult}{|}%
-{%
- \ifbool{LWR@mcolvertbaronleft}%
- {\addtocounter{LWR@mcolvertbarsl}{1}}% left edge
- {\addtocounter{LWR@mcolvertbarsr}{1}}% not left edge
-}%
-{%
- \IfStrEq{\LWR@strresult}{:}%
+ \IfStrEq{\LWR@strresult}{|}%
{%
\ifbool{LWR@mcolvertbaronleft}%
- {\addtocounter{LWR@mcolvertbarsldash}{1}}% left edge
- {\addtocounter{LWR@mcolvertbarsrdash}{1}}% not left edge
+ {\defaddtocounter{LWR@mcolvertbarsl}{1}}% left edge
+ {\defaddtocounter{LWR@mcolvertbarsr}{1}}% not left edge
}%
{%
- \IfStrEq{\LWR@strresult}{;}%
+ \IfStrEq{\LWR@strresult}{:}%
{%
\ifbool{LWR@mcolvertbaronleft}%
- {\addtocounter{LWR@mcolvertbarsldash}{1}}% left edge
- {\addtocounter{LWR@mcolvertbarsrdash}{1}}% not left edge
+ {\defaddtocounter{LWR@mcolvertbarsldash}{1}}% left edge
+ {\defaddtocounter{LWR@mcolvertbarsrdash}{1}}% not left edge
+ }%
+ {%
+ \IfStrEq{\LWR@strresult}{;}%
+ {%
+ \ifbool{LWR@mcolvertbaronleft}%
+ {\defaddtocounter{LWR@mcolvertbarsldash}{1}}% left edge
+ {\defaddtocounter{LWR@mcolvertbarsrdash}{1}}% not left edge
+ }%
+ {\boolfalse{LWR@mcolvertbaronleft}}%
}%
- {\boolfalse{LWR@mcolvertbaronleft}}%
}%
-}%
-\LWR@traceinfo{lwr@printmccoltype done}%
+ \LWR@traceinfo{lwr@printmccoltype done}%
}
% \end{macrocode}
% \end{macro}
@@ -27953,10 +28468,10 @@ end -- not --version
% \changes{v0.56}{2018/05/12}{Fix: \cs{multicolumn} parameters.}
% \begin{macrocode}
\newcommand*{\LWR@multicolpartext}[1]{%
-\LWR@startpars%
-\LWR@multicoltext%
-\addtocounter{LWR@tablemulticolspos}{#1}%
-\LWR@stoppars%
+ \LWR@startpars%
+ \LWR@multicoltext%
+ \defaddtocounter{LWR@tablemulticolspos}{#1}%
+ \LWR@stoppars%
}
% \end{macrocode}
% \end{macro}
@@ -27965,13 +28480,13 @@ end -- not --version
% For |@|, |!|, |>|, |<|, print the next token without paragraph tags:
% \begin{macrocode}
\newcommand*{\LWR@multicolother}[1]{%
-\addtocounter{LWR@tablemulticolspos}{1}%
-\StrChar{#1}{\arabic{LWR@tablemulticolspos}}[\LWR@strresult]%
-\LWR@strresult%
+ \defaddtocounter{LWR@tablemulticolspos}{1}%
+ \StrChar{#1}{\arabic{LWR@tablemulticolspos}}[\LWR@strresult]%
+ \LWR@strresult%
% \end{macrocode}
% A valid column data type was found:
% \begin{macrocode}
-\global\booltrue{LWR@validtablecol}%
+ \booltrue{LWR@validtablecol}%
}
% \end{macrocode}
% \end{macro}
@@ -27983,7 +28498,7 @@ end -- not --version
% \end{macrocode}
% A valid column data type was found:
% \begin{macrocode}
-\global\booltrue{LWR@validtablecol}%
+ \booltrue{LWR@validtablecol}%
}
% \end{macrocode}
% \end{macro}
@@ -27998,66 +28513,67 @@ end -- not --version
%
% \begin{macrocode}
\newcommand*{\LWR@printmccoldata}[1]{%
-\LWR@traceinfo{lwr@printmccoldata -#1}%
+ \LWR@traceinfo{lwr@printmccoldata -#1}%
% \end{macrocode}
% Not yet found a valid column type:
% \begin{macrocode}
-\global\boolfalse{LWR@validtablecol}%
+ \boolfalse{LWR@validtablecol}%
% \end{macrocode}
-% Get one token of the column spec:
+% Get one token of the column spec, into a local copy in case nested.
% \begin{macrocode}
-\StrChar{#1}{\arabic{LWR@tablemulticolspos}}[\LWR@strresult]%
+ \StrChar{#1}{\arabic{LWR@tablemulticolspos}}[\LWR@strresult]%
+ \edef\LWR@printmccoldatatoken{\LWR@strresult}%
% \end{macrocode}
% Print the text depending on which column type is found.
% Also handles |@|, |>|, |<| as it comes to them.
% \begin{macrocode}
-\IfStrEq{\LWR@strresult}{l}{\LWR@multicoltext}{}%
-\IfStrEq{\LWR@strresult}{c}{\LWR@multicoltext}{}%
-\IfStrEq{\LWR@strresult}{r}{\LWR@multicoltext}{}%
-\IfStrEq{\LWR@strresult}{D}{%
-\addtocounter{LWR@tablemulticolspos}{3}% skip parameters
-\LWR@multicoltext%
-}{}%
+ \IfStrEq{\LWR@printmccoldatatoken}{l}{\LWR@multicoltext}{}%
+ \IfStrEq{\LWR@printmccoldatatoken}{c}{\LWR@multicoltext}{}%
+ \IfStrEq{\LWR@printmccoldatatoken}{r}{\LWR@multicoltext}{}%
+ \IfStrEq{\LWR@printmccoldatatoken}{D}{%
+ \defaddtocounter{LWR@tablemulticolspos}{3}% skip parameters
+ \LWR@multicoltext%
+ }{}%
% \end{macrocode}
% \changes{v0.56}{2018/05/12}{Fix: \cs{multicolumn} parameters.}
% \changes{v0.72}{2019/06/07}{Fix: \cs{multicolumn} parameters.}
% \begin{macrocode}
-\IfStrEq{\LWR@strresult}{p}{\LWR@multicolpartext{2}}{}%
-\IfStrEq{\LWR@strresult}{m}{\LWR@multicolpartext{2}}{}%
-\IfStrEq{\LWR@strresult}{b}{\LWR@multicolpartext{2}}{}%
-\IfStrEq{\LWR@strresult}{P}{\LWR@multicolpartext{2}}{}%
-\IfStrEq{\LWR@strresult}{M}{\LWR@multicolpartext{2}}{}%
-\IfStrEq{\LWR@strresult}{B}{\LWR@multicolpartext{2}}{}%
+ \IfStrEq{\LWR@printmccoldatatoken}{p}{\LWR@multicolpartext{2}}{}%
+ \IfStrEq{\LWR@printmccoldatatoken}{m}{\LWR@multicolpartext{2}}{}%
+ \IfStrEq{\LWR@printmccoldatatoken}{b}{\LWR@multicolpartext{2}}{}%
+ \IfStrEq{\LWR@printmccoldatatoken}{P}{\LWR@multicolpartext{2}}{}%
+ \IfStrEq{\LWR@printmccoldatatoken}{M}{\LWR@multicolpartext{2}}{}%
+ \IfStrEq{\LWR@printmccoldatatoken}{B}{\LWR@multicolpartext{2}}{}%
% \end{macrocode}
% \changes{v0.56}{2018/05/10}{Added \pkg{array} \texttt{W} column.}
% \begin{macrocode}
-\IfStrEq{\LWR@strresult}{w}{\LWR@multicolpartext{3}}{}%
-\IfStrEq{\LWR@strresult}{W}{\LWR@multicolpartext{3}}{}%
+ \IfStrEq{\LWR@printmccoldatatoken}{w}{\LWR@multicolpartext{3}}{}%
+ \IfStrEq{\LWR@printmccoldatatoken}{W}{\LWR@multicolpartext{3}}{}%
% \end{macrocode}
% \begin{macrocode}
-\IfStrEq{\LWR@strresult}{S}{\LWR@multicoltext}{}%
-\IfStrEq{\LWR@strresult}{s}{\LWR@multicoltext}{}%
+ \IfStrEq{\LWR@printmccoldatatoken}{S}{\LWR@multicoltext}{}%
+ \IfStrEq{\LWR@printmccoldatatoken}{s}{\LWR@multicoltext}{}%
% \end{macrocode}
% \begin{macrocode}
-\IfStrEq{\LWR@strresult}{X}{\LWR@multicolpartext{1}}{}%
-\IfStrEq{\LWR@strresult}{|}{\LWR@multicolskip}{}%
-\IfStrEq{\LWR@strresult}{:}{\LWR@multicolskip}{}%
-\IfStrEq{\LWR@strresult}{;}{%
- \LWR@multicolskip%
- \addtocounter{LWR@tablemulticolspos}{1}% skip parameter
-}{}%
-\IfStrEq{\LWR@strresult}{\detokenize{@}}{\LWR@multicolother{#1}}{}%
-\IfStrEq{\LWR@strresult}{\detokenize{!}}{\LWR@multicolother{#1}}{}%
-\IfStrEq{\LWR@strresult}{\detokenize{>}}{\LWR@multicolother{#1}}{}%
-\IfStrEq{\LWR@strresult}{\detokenize{<}}{\LWR@multicolother{#1}}{}%
+ \IfStrEq{\LWR@printmccoldatatoken}{X}{\LWR@multicolpartext{1}}{}%
+ \IfStrEq{\LWR@printmccoldatatoken}{|}{\LWR@multicolskip}{}%
+ \IfStrEq{\LWR@printmccoldatatoken}{:}{\LWR@multicolskip}{}%
+ \IfStrEq{\LWR@printmccoldatatoken}{;}{%
+ \LWR@multicolskip%
+ \defaddtocounter{LWR@tablemulticolspos}{1}% skip parameter
+ }{}%
+ \IfStrEq{\LWR@printmccoldatatoken}{\detokenize{@}}{\LWR@multicolother{#1}}{}%
+ \IfStrEq{\LWR@printmccoldatatoken}{\detokenize{!}}{\LWR@multicolother{#1}}{}%
+ \IfStrEq{\LWR@printmccoldatatoken}{\detokenize{>}}{\LWR@multicolother{#1}}{}%
+ \IfStrEq{\LWR@printmccoldatatoken}{\detokenize{<}}{\LWR@multicolother{#1}}{}%
% \end{macrocode}
% If an invalid column type:
% \begin{macrocode}
-\ifbool{LWR@validtablecol}{}{\LWR@multicoltext}%
+ \ifbool{LWR@validtablecol}{}{\LWR@multicoltext{}}%
% \end{macrocode}
% Tracing:
% \begin{macrocode}
-\LWR@traceinfo{lwr@printmccoldata done}%
+ \LWR@traceinfo{lwr@printmccoldata done}%
}
% \end{macrocode}
% \end{macro}
@@ -28075,28 +28591,28 @@ end -- not --version
% which will NOT match |l|, |c|, |r|, or |p|.
% \begin{macrocode}
\newcommand*{\LWR@parsemulticolumnalignment}[2]{%
-\setcounter{LWR@tablemulticolspos}{1}%
-\StrLen{#1}[\LWR@strresult]%
-\setcounter{LWR@tablemulticolswidth}{\LWR@strresult}%
+ \defcounter{LWR@tablemulticolspos}{1}%
+ \StrLen{#1}[\LWR@strresult]%
+ \defcounter{LWR@tablemulticolswidth}{\LWR@strresult}%
% \end{macrocode}
% Scan across the tokens in the column spec:
% \begin{macrocode}
-\whileboolexpr{%
- not test {%
- \ifnumcomp{\value{LWR@tablemulticolspos}}{>}%
- {\value{LWR@tablemulticolswidth}}%
+ \whileboolexpr{%
+ not test {%
+ \ifnumcomp{\value{LWR@tablemulticolspos}}{>}%
+ {\value{LWR@tablemulticolswidth}}%
+ }%
}%
-}%
-{%
+ {%
% \end{macrocode}
% Execute the assigned print function for each token in the column spec:
% \begin{macrocode}
-#2{#1}%
+ #2{#1}%
% \end{macrocode}
% Move to the next token in the column spec:
% \begin{macrocode}
-\addtocounter{LWR@tablemulticolspos}{1}%
-}%
+ \defaddtocounter{LWR@tablemulticolspos}{1}%
+ }%
}
% \end{macrocode}
% \end{macro}
@@ -28113,46 +28629,46 @@ end -- not --version
% \end{macrocode}
% No vertical rules if finishing the \env{tabular} with a row of empty cells:
% \begin{macrocode}
-\ifbool{LWR@tabularmutemods}{}{%
+ \ifbool{LWR@tabularmutemods}{}{%
% \end{macrocode}
% Left side:
% \begin{macrocode}
- \ifnumcomp{\value{LWR@mcolvertbarsl}}{=}{1}{%
- \LWR@tdaddstyle%
- border-left: 1px solid \LWR@vertruleHTMLcolor%
- }{}%
- \ifnumcomp{\value{LWR@mcolvertbarsl}}{>}{1}{%
- \LWR@tdaddstyle%
- border-left: 4px double \LWR@vertruleHTMLcolor%
- }{}%
- \ifnumcomp{\value{LWR@mcolvertbarsldash}}{=}{1}{%
- \LWR@tdaddstyle%
- border-left: 1px dashed \LWR@vertruleHTMLcolor%
- }{}%
- \ifnumcomp{\value{LWR@mcolvertbarsldash}}{>}{1}{%
- \LWR@tdaddstyle%
- border-left: 2px dashed \LWR@vertruleHTMLcolor%
- }{}%
+ \ifnumcomp{\value{LWR@mcolvertbarsl}}{=}{1}{%
+ \LWR@tdaddstyle%
+ border-left: 1px solid \LWR@vertruleHTMLcolor%
+ }{}%
+ \ifnumcomp{\value{LWR@mcolvertbarsl}}{>}{1}{%
+ \LWR@tdaddstyle%
+ border-left: 4px double \LWR@vertruleHTMLcolor%
+ }{}%
+ \ifnumcomp{\value{LWR@mcolvertbarsldash}}{=}{1}{%
+ \LWR@tdaddstyle%
+ border-left: 1px dashed \LWR@vertruleHTMLcolor%
+ }{}%
+ \ifnumcomp{\value{LWR@mcolvertbarsldash}}{>}{1}{%
+ \LWR@tdaddstyle%
+ border-left: 2px dashed \LWR@vertruleHTMLcolor%
+ }{}%
% \end{macrocode}
% Right side:
% \begin{macrocode}
- \ifnumcomp{\value{LWR@mcolvertbarsr}}{=}{1}{%
- \LWR@tdaddstyle%
- border-right: 1px solid \LWR@vertruleHTMLcolor%
- }{}%
- \ifnumcomp{\value{LWR@mcolvertbarsr}}{>}{1}{%
- \LWR@tdaddstyle%
- border-right: 4px double \LWR@vertruleHTMLcolor%
- }{}%
- \ifnumcomp{\value{LWR@mcolvertbarsrdash}}{=}{1}{%
- \LWR@tdaddstyle%
- border-right: 1px dashed \LWR@vertruleHTMLcolor%
- }{}%
- \ifnumcomp{\value{LWR@mcolvertbarsrdash}}{>}{1}{%
- \LWR@tdaddstyle%
- border-right: 2px dashed \LWR@vertruleHTMLcolor%
- }{}%
-}%
+ \ifnumcomp{\value{LWR@mcolvertbarsr}}{=}{1}{%
+ \LWR@tdaddstyle%
+ border-right: 1px solid \LWR@vertruleHTMLcolor%
+ }{}%
+ \ifnumcomp{\value{LWR@mcolvertbarsr}}{>}{1}{%
+ \LWR@tdaddstyle%
+ border-right: 4px double \LWR@vertruleHTMLcolor%
+ }{}%
+ \ifnumcomp{\value{LWR@mcolvertbarsrdash}}{=}{1}{%
+ \LWR@tdaddstyle%
+ border-right: 1px dashed \LWR@vertruleHTMLcolor%
+ }{}%
+ \ifnumcomp{\value{LWR@mcolvertbarsrdash}}{>}{1}{%
+ \LWR@tdaddstyle%
+ border-right: 2px dashed \LWR@vertruleHTMLcolor%
+ }{}%
+ }%
}
% \end{macrocode}
% \end{macro}
@@ -28178,67 +28694,76 @@ end -- not --version
%
% \begin{macrocode}
\NewDocumentCommand{\LWR@domulticolumn}{o o m m m +m}{%
-\LWR@traceinfo{LWR@domulticolumn -#1- -#2- -#4- -#5-}%
+ \LWR@traceinfo{LWR@domulticolumn -#1- -#2- -#4- -#5-}%
% \end{macrocode}
% Remember the text to be inserted, and
% remember that a valid column type was found:
% \begin{macrocode}
-\renewcommand{\LWR@multicoltext}{%
-#6%
-\global\booltrue{LWR@validtablecol}%
-}%
+ \renewcommand{\LWR@multicoltext}{%
+ #6%
+ \booltrue{LWR@validtablecol}%
+ }%
% \end{macrocode}
% Compute the rightmost column to be included.
% This is used to create the right trim.
% \changes{v0.43}{2017/11/07}{Fix: Multicolumn trim.}
% \begin{macrocode}
-\setcounter{LWR@lastmulticolumn}{\value{LWR@tableLaTeXcolindex}}%
-\addtocounter{LWR@lastmulticolumn}{#3}%
-\addtocounter{LWR@lastmulticolumn}{-1}%
+ \defcounter{LWR@lastmulticolumn}{\value{LWR@tableLaTeXcolindex}}%
+ \defaddtocounter{LWR@lastmulticolumn}{#3}%
+ \defaddtocounter{LWR@lastmulticolumn}{-1}%
% \end{macrocode}
% Row processing:
% \begin{macrocode}
-\LWR@maybenewtablerow%
+ \LWR@maybenewtablerow%
% \end{macrocode}
% Begin the opening table data tag:
% \begin{macrocode}
-\LWR@htmltag{td colspan="#4" %
+ \LWR@htmltag{%
+ td colspan="#4" %
% \end{macrocode}
%
% \begin{macrocode}
-\IfValueT{#2}{ % rows?
-rowspan="#2" %
+ \IfValueT{#2}{ % rows?
+ rowspan="#2" %
% \end{macrocode}
%
% \changes{v0.47}{2018/01/26}{Fix: Line wrap at \HTML\ hyphen.}
% \begin{macrocode}
-\IfValueT{#1}{% vpos?
-\ifstrequal{#1}{b}{style="\LWR@print@mbox{vertical-align:bottom}" }{}%
-\ifstrequal{#1}{t}{style="\LWR@print@mbox{vertical-align:top}" }{}%
-}% vpos?
-}% rows?
+ \IfValueT{#1}{% vpos?
+ \ifstrequal{#1}{b}%
+ {style="\LWR@print@mbox{vertical-align:bottom}" }{}%
+ \ifstrequal{#1}{t}%
+ {style="\LWR@print@mbox{vertical-align:top}" }{}%
+ }% vpos?
+ }% rows?
% \end{macrocode}
%
% \begin{macrocode}
- class="td%
+ class="td%
% \end{macrocode}
% Print the column type and vertical bars:
% \begin{macrocode}
-\setcounter{LWR@mcolvertbarsl}{0}%
-\setcounter{LWR@mcolvertbarsr}{0}%
-\setcounter{LWR@mcolvertbarsldash}{0}%
-\setcounter{LWR@mcolvertbarsrdash}{0}%
-\booltrue{LWR@mcolvertbaronleft}%
-\LWR@parsemulticolumnalignment{#5}{\LWR@printmccoltype}%
+ \defcounter{LWR@mcolvertbarsl}{0}%
+ \defcounter{LWR@mcolvertbarsr}{0}%
+ \defcounter{LWR@mcolvertbarsldash}{0}%
+ \defcounter{LWR@mcolvertbarsrdash}{0}%
+ \booltrue{LWR@mcolvertbaronleft}%
+ \LWR@parsemulticolumnalignment{#5}{\LWR@printmccoltype}%
% \end{macrocode}
% If this column has a cmidrule, add ``rule'' to the end of the \HTML\ class tag.
%
% If this position had a ``Y'' then add ``rule'' for a horizontal rule:
% \changes{v0.43}{2017/11/07}{Fix: Multicolumn trim.}
% \begin{macrocode}
-\LWR@subaddcmidruletrim%
-{\LWR@getexparray{LWR@trimlrules}{\arabic{LWR@tableLaTeXcolindex}}}%
-{\LWR@getexparray{LWR@trimrrules}{\arabic{LWR@lastmulticolumn}}}%
+ \LWR@subaddcmidruletrim%
+ {%
+ \LWR@getexparray{LWR@trimlrules}%
+ {\arabic{LWR@tableLaTeXcolindex}}%
+ }%
+ {%
+ \LWR@getexparray{LWR@trimrrules}%
+ {\arabic{LWR@lastmulticolumn}}%
+ }%
% \end{macrocode}
% Also add vertical bar class.
% \changes{v0.41}{2017/10/07}{Added vertical rules.}
@@ -28246,38 +28771,39 @@ rowspan="#2" %
% \changes{v0.56}{2018/04/30}{Adds support for double vertical rules.}
% \changes{v0.56}{2018/05/05}{Adds support for dashed vertical rules.}
% \begin{macrocode}
-\ifnumcomp{\value{LWR@mcolvertbarsl}}{=}{1}{ tvertbarl}{}%
-\ifnumcomp{\value{LWR@mcolvertbarsl}}{>}{1}{ tvertbarldouble}{}%
-\ifnumcomp{\value{LWR@mcolvertbarsr}}{=}{1}{ tvertbarr}{}%
-\ifnumcomp{\value{LWR@mcolvertbarsr}}{>}{1}{ tvertbarrdouble}{}%
-\ifnumcomp{\value{LWR@mcolvertbarsldash}}{=}{1}{ tvertbarldash}{}%
-\ifnumcomp{\value{LWR@mcolvertbarsldash}}{>}{1}{ tvertbarldoubledash}{}%
-\ifnumcomp{\value{LWR@mcolvertbarsrdash}}{=}{1}{ tvertbarrdash}{}%
-\ifnumcomp{\value{LWR@mcolvertbarsrdash}}{>}{1}{ tvertbarrdoubledash}{}%
+ \ifnumcomp{\value{LWR@mcolvertbarsl}}{=}{1}{ tvertbarl}{}%
+ \ifnumcomp{\value{LWR@mcolvertbarsl}}{>}{1}{ tvertbarldouble}{}%
+ \ifnumcomp{\value{LWR@mcolvertbarsr}}{=}{1}{ tvertbarr}{}%
+ \ifnumcomp{\value{LWR@mcolvertbarsr}}{>}{1}{ tvertbarrdouble}{}%
+ \ifnumcomp{\value{LWR@mcolvertbarsldash}}{=}{1}{ tvertbarldash}{}%
+ \ifnumcomp{\value{LWR@mcolvertbarsldash}}{>}{1}%
+ { tvertbarldoubledash}{}%
+ \ifnumcomp{\value{LWR@mcolvertbarsrdash}}{=}{1}{ tvertbarrdash}{}%
+ \ifnumcomp{\value{LWR@mcolvertbarsrdash}}{>}{1}%
+ { tvertbarrdoubledash}{}%
% \end{macrocode}
% Close the class tag's opening quote:
-"% NOT A TYPO
% \begin{macrocode}
-%
+ "%
% \end{macrocode}
% \changes{v0.42}{2017/10/26}{If \progcode{FormatWP} add cell alignment.}
% \begin{macrocode}
-\LWR@tdstartstyles%
+ \LWR@tdstartstyles%
% \end{macrocode}
% \changes{v0.49}{2018/02/18}{\pkg{xcolor}: Added tabular row colors.}
% \begin{macrocode}
-\LWR@addtabularrowcolor%
+ \LWR@addtabularrowcolor%
% \end{macrocode}
% \begin{macrocode}
-\LWR@addcmidrulewidth%
-\LWR@addcdashline%
-\LWR@addtabularhrulecolor%
-\LWR@addmulticolvertrulecolor%
-\LWR@addformatwpalignment{#5}%
-\LWR@tdendstyles%
-}% end of the opening table data tag
-\global\boolfalse{LWR@intabularmetadata}%
-\LWR@parsemulticolumnalignment{#5}{\LWR@printmccoldata}%
+ \LWR@addcmidrulewidth%
+ \LWR@addcdashline%
+ \LWR@addtabularhrulecolor%
+ \LWR@addmulticolvertrulecolor%
+ \LWR@addformatwpalignment{#5}%
+ \LWR@tdendstyles%
+ }% end of the opening table data tag
+ \boolfalse{LWR@intabularmetadata}%
+ \LWR@parsemulticolumnalignment{#5}{\LWR@printmccoldata}%
}
% \end{macrocode}
% \end{macro}
@@ -28292,20 +28818,20 @@ rowspan="#2" %
% \end{macrocode}
% Figure out how many extra \HTML\ columns to add for |@| and |!| columns:
% \begin{macrocode}
-\LWR@tabularhtmlcolumns{\arabic{LWR@tableLaTeXcolindex}}{#1}
+ \LWR@tabularhtmlcolumns{\arabic{LWR@tableLaTeXcolindex}}{#1}%
% \end{macrocode}
% Create the multicolumn tag:
% \begin{macrocode}
-\LWR@domulticolumn{#1}{\arabic{LWR@tabhtmlcoltotal}}{#2}{#3}%
+ \LWR@domulticolumn{#1}{\arabic{LWR@tabhtmlcoltotal}}{#2}{#3}%
% \end{macrocode}
% Move to the next \LaTeX\ column:
% \begin{macrocode}
-\addtocounter{LWR@tableLaTeXcolindex}{#1}%
-\addtocounter{LWR@tableLaTeXcolindex}{-1}%
+ \defaddtocounter{LWR@tableLaTeXcolindex}{#1}%
+ \defaddtocounter{LWR@tableLaTeXcolindex}{-1}%
% \end{macrocode}
% Skip any trailing |@| or |!| columns for this cell:
% \begin{macrocode}
-\global\booltrue{LWR@skipatbang}%
+ \booltrue{LWR@skipatbang}%
}
% \end{macrocode}
% \end{macro}
@@ -28317,14 +28843,6 @@ rowspan="#2" %
%
% \pkg{longtable} captions use \cs{multicolumn}.
-% \DescribeBoolean{LWR@starredlongtable}
-% Per the \pkg{caption} pacakge, step the counter if |longtable*|.
-%
-% \begin{macrocode}
-\newbool{LWR@starredlongtable}
-\boolfalse{LWR@starredlongtable}
-% \end{macrocode}
-%
%
% Per the \pkg{caption} package. User-redefinable float type.
% \begin{macrocode}
@@ -28342,109 +28860,108 @@ rowspan="#2" %
% \end{macrocode}
% Remember the latest name for \cs{nameref}:
% \begin{macrocode}
-\IfValueTF{#2}{% optional given?
- \ifblank{#2}% optional empty?
- {\LWR@setlatestname{#3}}% empty
- {\LWR@setlatestname{#2}}% given and non-empty
-}% optional given
-{\LWR@setlatestname{#3}}% no optional
+ \IfValueTF{#2}{% optional given?
+ \ifblank{#2}% optional empty?
+ {\LWR@setlatestname{#3}}% empty
+ {\LWR@setlatestname{#2}}% given and non-empty
+ }% optional given
+ {\LWR@setlatestname{#3}}% no optional
% \end{macrocode}
% Create a multicolumn across all the columns:
%
% Figure out how many extra \HTML\ columns to add for |@| and |!| columns
% found between the first and the last column:
% \begin{macrocode}
-\LWR@tabularhtmlcolumns{1}{\arabic{LWR@tabletotalLaTeXcols}}
+ \LWR@tabularhtmlcolumns{1}{\arabic{LWR@tabletotalLaTeXcols}}%
% \end{macrocode}
% Create the multicolumn tag:
% \begin{macrocode}
-\LWR@domulticolumn{\arabic{LWR@tabletotalLaTeXcols}}%
- {\arabic{LWR@tabhtmlcoltotal}}%
- {P}%
-{% \LWR@domulticolumn
-\IfBooleanTF{#1}% star?
+ \LWR@domulticolumn{\arabic{LWR@tabletotalLaTeXcols}}%
+ {\arabic{LWR@tabhtmlcoltotal}}%
+ {P}%
+ {% \LWR@domulticolumn
+ \IfBooleanTF{#1}% star?
% \end{macrocode}
% Star version, show a caption but do not make a LOT entry:
% \begin{macrocode}
-{% yes star
- \LWR@figcaption%
- \LWR@isolate{#3}%
- \endLWR@figcaption%
-}%
-{% No star:
+ {% yes star
+ \LWR@figcaption%
+ \LWR@isolate{#3}%
+ \endLWR@figcaption%
+ }%
+ {% No star:
% \end{macrocode}
% Not the star version:
%
% Don't step the counter if |\caption[]{A caption.}|
% \begin{macrocode}
- \ifbool{LWR@starredlongtable}%
- {%
- \ifblank{#2}% TOC entry
- {}%
+ \ifbool{LWR@starredlongtable}%
{%
- \refstepcounter{\LTcaptype}%
- \protected@edef\@currentlabel{%
- \@nameuse{p@\LTcaptype}\@nameuse{the\LTcaptype}%
+ \ifblank{#2}% TOC entry
+ {}%
+ {%
+ \refstepcounter{\LTcaptype}%
+ \protected@edef\@currentlabel{%
+ \@nameuse{p@\LTcaptype}\@nameuse{the\LTcaptype}%
+ }%
}%
- }%
- }{}%
+ }{}%
% \end{macrocode}
% Create an \HTML\ caption. Afterwards, maybe make a LOT entry.
% \begin{macrocode}
- \LWR@figcaption%
- \LWR@isolate{\@nameuse{fnum@\LTcaptype}}%
- \CaptionSeparator%
- \LWR@isolate{#3}%
- \endLWR@figcaption%
+ \LWR@figcaption%
+ \LWR@isolate{\@nameuse{fnum@\LTcaptype}}%
+ \CaptionSeparator%
+ \LWR@isolate{#3}%
+ \endLWR@figcaption%
% \end{macrocode}
% See if an optional caption was given:
% \begin{macrocode}
- \ifblank{#2}% TOC entry empty
+ \ifblank{#2}% TOC entry empty
% \end{macrocode}
% if the optional caption was given, but empty, do not form a \TOC\ entry
% \begin{macrocode}
- {}%
+ {}%
% \end{macrocode}
% If the optional caption was given, but might only be |[]|:
% \begin{macrocode}
- {% TOC entry not empty
- \IfNoValueTF{#2}% No TOC entry?
+ {% TOC entry not empty
+ \IfNoValueTF{#2}% No TOC entry?
% \end{macrocode}
% The optional caption is |[]|:
% \begin{macrocode}
- {% No TOC entry
- \addcontentsline%
- {\@nameuse{ext@\LTcaptype}}%
- {\LTcaptype}%
- {%
- \protect\numberline%
- {\LWR@isolate{\@nameuse{p@\LTcaptype}}\@nameuse{the\LTcaptype}}%
- {\ignorespaces \LWR@isolate{#3}\protect\relax}%
- }%
- }% end of No TOC entry
+ {% No TOC entry
+ \addcontentsline%
+ {\@nameuse{ext@\LTcaptype}}%
+ {\LTcaptype}%
+ {%
+ \protect\numberline%
+ {\LWR@isolate{\@nameuse{p@\LTcaptype}}\@nameuse{the\LTcaptype}}%
+ {\ignorespaces \LWR@isolate{#3}\protect\relax}%
+ }%
+ }% end of No TOC entry
% \end{macrocode}
% The optional caption has text enclosed:
% \begin{macrocode}
- {% yes TOC entry
- \addcontentsline%
- {\@nameuse{ext@\LTcaptype}}%
- {\LTcaptype}%
- {%
- \protect\numberline%
- {\LWR@isolate{\@nameuse{p@\LTcaptype}}\@nameuse{the\LTcaptype}}%
- {\ignorespaces \LWR@isolate{#2}\protect\relax}%
- }%
- }% end of yes TOC entry
- }% end of TOC entry not empty
-}% end of no star
+ {% yes TOC entry
+ \addcontentsline%
+ {\@nameuse{ext@\LTcaptype}}%
+ {\LTcaptype}%
+ {%
+ \protect\numberline%
+ {\LWR@isolate{\@nameuse{p@\LTcaptype}}\@nameuse{the\LTcaptype}}%
+ {\ignorespaces \LWR@isolate{#2}\protect\relax}%
+ }%
+ }% end of yes TOC entry
+ }% end of TOC entry not empty
+ }% end of no star
% \end{macrocode}
% Skip any trailing |@| or |!| columns for this cell:
% \begin{macrocode}
-\global\booltrue{LWR@skipatbang}%
-}% end of \LWR@domulticolumn
-
-\addtocounter{LWR@tableLaTeXcolindex}{\arabic{LWR@tabletotalLaTeXcols}}
-\addtocounter{LWR@tableLaTeXcolindex}{-1}
+ \booltrue{LWR@skipatbang}%
+ }% end of \LWR@domulticolumn
+ \defaddtocounter{LWR@tableLaTeXcolindex}{\value{LWR@tabletotalLaTeXcols}}%
+ \defaddtocounter{LWR@tableLaTeXcolindex}{-1}
}
% \end{macrocode}
@@ -28486,14 +29003,14 @@ rowspan="#2" %
% \begin{macrocode}
\ifdefempty{\LWR@atbangspec}%
{}%
- {\addtocounter{LWR@tabhtmlcoltotal}{1}}%
+ {\defaddtocounter{LWR@tabhtmlcoltotal}{1}}%
% \end{macrocode}
% Likewise for the |!| columns:
% \begin{macrocode}
\edef\LWR@atbangspec{\LWR@getexparray{LWR@colbangspec}{#1}}%
\ifdefempty{\LWR@atbangspec}%
{}%
- {\addtocounter{LWR@tabhtmlcoltotal}{1}}%
+ {\defaddtocounter{LWR@tabhtmlcoltotal}{1}}%
}
% \end{macrocode}
% \end{macro}
@@ -28512,28 +29029,28 @@ rowspan="#2" %
% and begin with the count being the \LaTeX\ span, to which additional |@| and |!|
% columns may be added:
% \begin{macrocode}
-\setcounter{LWR@tabhtmlcolindex}{#1}%
-\setcounter{LWR@tabhtmlcoltotal}{#2}%
-\setcounter{LWR@tabhtmlcolend}{#1}%
-\addtocounter{LWR@tabhtmlcolend}{#2}%
+ \defcounter{LWR@tabhtmlcolindex}{#1}%
+ \defcounter{LWR@tabhtmlcoltotal}{#2}%
+ \defcounter{LWR@tabhtmlcolend}{#1}%
+ \defaddtocounter{LWR@tabhtmlcolend}{#2}%
% \end{macrocode}
% If at the left edge, add the at/bang columns for the left edge:
% \begin{macrocode}
-\ifnumcomp{\value{LWR@tabhtmlcolindex}}{=}{1}{%
- \LWR@subtabularhtmlcolumns{leftedge}%
-}{}%
+ \ifnumcomp{\value{LWR@tabhtmlcolindex}}{=}{1}{%
+ \LWR@subtabularhtmlcolumns{leftedge}%
+ }{}%
% \end{macrocode}
% Walk across the \LaTeX\ columns looking for |@| and |!| columns:
% \begin{macrocode}
-\whileboolexpr{%
- test {%
- \ifnumcomp{\value{LWR@tabhtmlcolindex}}{<}{\value{LWR@tabhtmlcolend}}%
+ \whileboolexpr{%
+ test {%
+ \ifnumcomp{\value{LWR@tabhtmlcolindex}}{<}{\value{LWR@tabhtmlcolend}}%
+ }%
}%
-}%
-{%
- \LWR@subtabularhtmlcolumns{\arabic{LWR@tabhtmlcolindex}}%
- \addtocounter{LWR@tabhtmlcolindex}{1}%
-}% whiledo
+ {%
+ \LWR@subtabularhtmlcolumns{\arabic{LWR@tabhtmlcolindex}}%
+ \defaddtocounter{LWR@tabhtmlcolindex}{1}%
+ }% whiledo
}
% \end{macrocode}
% \end{macro}
@@ -28721,9 +29238,9 @@ rowspan="#2" %
% \begin{macrocode}
\newcommand*{\ResumeTabular}{%
-\global\boolfalse{LWR@exitingtabular}%
-\global\boolfalse{LWR@tabularmutemods}%
-\LWR@getmynexttoken%
+ \boolfalse{LWR@exitingtabular}%
+ \boolfalse{LWR@tabularmutemods}%
+ \LWR@getmynexttoken%
}
% \end{macrocode}
% \end{macro}
@@ -28758,20 +29275,6 @@ rowspan="#2" %
% \end{macrocode}
-% \DescribeBoolean{LWR@exitingtabular}
-% When \cs{end} is found, turns off the next opening data tag.
-% \begin{macrocode}
-\newbool{LWR@exitingtabular}
-% \end{macrocode}
-
-
-% \DescribeBoolean{LWR@tabularmutemods}
-% Mutes \HTML\ output for |@|, |!|, |<| and |>|.
-%
-% This is used while printing the final row to generate \cs{bottomrule}s.
-% \begin{macrocode}
-\newbool{LWR@tabularmutemods}
-% \end{macrocode}
@@ -28786,141 +29289,141 @@ rowspan="#2" %
% \begin{macrocode}
\newcommand*{\LWR@tabledatacolumntag}%
{%
-\LWR@traceinfo{LWR@tabledatacolumntag}%
+ \LWR@traceinfo{LWR@tabledatacolumntag}%
% \end{macrocode}
% \hspace*{.5in} |\show\LWR@mynexttoken| to see what tokens to look for
% \begin{macrocode}
% \end{macrocode}
% If not any of the below, start a new table cell:
% \begin{macrocode}
-\global\let\LWR@mynextaction\LWR@tabledatasinglecolumntag%
+ \global\let\LWR@mynextaction\LWR@tabledatasinglecolumntag%
% \end{macrocode}
% If exiting the tabular:
% \begin{macrocode}
-\ifdefequal{\LWR@mynexttoken}{\end}%
- {\global\booltrue{LWR@exitingtabular}}{}%
+ \ifdefequal{\LWR@mynexttoken}{\end}%
+ {\booltrue{LWR@exitingtabular}}{}%
% \end{macrocode}
% \env{longtable} can have a caption in a cell
% \begin{macrocode}
-\ifdefequal{\LWR@mynexttoken}{\caption}%
- {\global\let\LWR@mynextaction\LWR@donothing}{}%
+ \ifdefequal{\LWR@mynexttoken}{\caption}%
+ {\global\let\LWR@mynextaction\LWR@donothing}{}%
% \end{macrocode}
% Look for other things which would not start a table cell:
% \begin{macrocode}
-\ifdefequal{\LWR@mynexttoken}{\multicolumn}%
- {\global\let\LWR@mynextaction\LWR@donothing}{}%
-\ifdefequal{\LWR@mynexttoken}{\multirow}%
- {\global\let\LWR@mynextaction\LWR@donothing}{}%
-\ifdefequal{\LWR@mynexttoken}{\multicolumnrow}%
- {\global\let\LWR@mynextaction\LWR@donothing}{}%
-\ifdefequal{\LWR@mynexttoken}{\noalign}%
- {\global\let\LWR@mynextaction\LWR@donothing}{}%
+ \ifdefequal{\LWR@mynexttoken}{\multicolumn}%
+ {\global\let\LWR@mynextaction\LWR@donothing}{}%
+ \ifdefequal{\LWR@mynexttoken}{\multirow}%
+ {\global\let\LWR@mynextaction\LWR@donothing}{}%
+ \ifdefequal{\LWR@mynexttoken}{\multicolumnrow}%
+ {\global\let\LWR@mynextaction\LWR@donothing}{}%
+ \ifdefequal{\LWR@mynexttoken}{\noalign}%
+ {\global\let\LWR@mynextaction\LWR@donothing}{}%
% \end{macrocode}
% If an \cs{mrowcell}, this is a cell to be skipped over:
% \begin{macrocode}
-\ifdefequal{\LWR@mynexttoken}{\mrowcell}%
- {\global\let\LWR@mynextaction\LWR@donothing}{}%
+ \ifdefequal{\LWR@mynexttoken}{\mrowcell}%
+ {\global\let\LWR@mynextaction\LWR@donothing}{}%
% \end{macrocode}
% If an \cs{mcolrowcell}, this is a cell to be skipped over:
% \begin{macrocode}
-\ifdefequal{\LWR@mynexttoken}{\mcolrowcell}%
- {\global\let\LWR@mynextaction\LWR@donothing}{}%
+ \ifdefequal{\LWR@mynexttoken}{\mcolrowcell}%
+ {\global\let\LWR@mynextaction\LWR@donothing}{}%
% \end{macrocode}
% \begin{macrocode}
-\ifdefequal{\LWR@mynexttoken}{\TabularMacro}%
- {\global\let\LWR@mynextaction\LWR@donothing}{}%
+ \ifdefequal{\LWR@mynexttoken}{\TabularMacro}%
+ {\global\let\LWR@mynextaction\LWR@donothing}{}%
% \end{macrocode}
% \begin{macrocode}
-\ifdefequal{\LWR@mynexttoken}{\hline}%
- {\global\let\LWR@mynextaction\LWR@donothing}{}%
+ \ifdefequal{\LWR@mynexttoken}{\hline}%
+ {\global\let\LWR@mynextaction\LWR@donothing}{}%
% \end{macrocode}
% \begin{macrocode}
-\ifdefequal{\LWR@mynexttoken}{\firsthline}%
- {\global\let\LWR@mynextaction\LWR@donothing}{}%
+ \ifdefequal{\LWR@mynexttoken}{\firsthline}%
+ {\global\let\LWR@mynextaction\LWR@donothing}{}%
% \end{macrocode}
% \begin{macrocode}
-\ifdefequal{\LWR@mynexttoken}{\lasthline}%
- {\global\let\LWR@mynextaction\LWR@donothing}{}%
+ \ifdefequal{\LWR@mynexttoken}{\lasthline}%
+ {\global\let\LWR@mynextaction\LWR@donothing}{}%
% \end{macrocode}
% \begin{macrocode}
-\ifdefequal{\LWR@mynexttoken}{\toprule}%
- {\global\let\LWR@mynextaction\LWR@donothing}{}%
+ \ifdefequal{\LWR@mynexttoken}{\toprule}%
+ {\global\let\LWR@mynextaction\LWR@donothing}{}%
% \end{macrocode}
% \begin{macrocode}
-\ifdefequal{\LWR@mynexttoken}{\midrule}%
- {\global\let\LWR@mynextaction\LWR@donothing}{}%
+ \ifdefequal{\LWR@mynexttoken}{\midrule}%
+ {\global\let\LWR@mynextaction\LWR@donothing}{}%
% \end{macrocode}
% \begin{macrocode}
-\ifdefequal{\LWR@mynexttoken}{\cmidrule}%
- {\global\let\LWR@mynextaction\LWR@donothing}{}%
+ \ifdefequal{\LWR@mynexttoken}{\cmidrule}%
+ {\global\let\LWR@mynextaction\LWR@donothing}{}%
% \end{macrocode}
% \changes{v0.56}{2018/05/02}{Fix: \cs{morecmidrules}}
% \begin{macrocode}
-\ifdefequal{\LWR@mynexttoken}{\morecmidrules}%
- {\global\let\LWR@mynextaction\LWR@donothing}{}%
+ \ifdefequal{\LWR@mynexttoken}{\morecmidrules}%
+ {\global\let\LWR@mynextaction\LWR@donothing}{}%
% \end{macrocode}
% \begin{macrocode}
-\ifdefequal{\LWR@mynexttoken}{\specialrule}%
- {\global\let\LWR@mynextaction\LWR@donothing}{}%
+ \ifdefequal{\LWR@mynexttoken}{\specialrule}%
+ {\global\let\LWR@mynextaction\LWR@donothing}{}%
% \end{macrocode}
% \begin{macrocode}
-\ifdefequal{\LWR@mynexttoken}{\cline}%
- {\global\let\LWR@mynextaction\LWR@donothing}{}%
+ \ifdefequal{\LWR@mynexttoken}{\cline}%
+ {\global\let\LWR@mynextaction\LWR@donothing}{}%
% \end{macrocode}
% \begin{macrocode}
-\ifdefequal{\LWR@mynexttoken}{\bottomrule}%
- {\global\let\LWR@mynextaction\LWR@donothing}{}%
+ \ifdefequal{\LWR@mynexttoken}{\bottomrule}%
+ {\global\let\LWR@mynextaction\LWR@donothing}{}%
% \end{macrocode}
% \begin{macrocode}
-\ifdefequal{\LWR@mynexttoken}{\rowcolor}%
- {\global\let\LWR@mynextaction\LWR@donothing}{}%
+ \ifdefequal{\LWR@mynexttoken}{\rowcolor}%
+ {\global\let\LWR@mynextaction\LWR@donothing}{}%
% \end{macrocode}
% \begin{macrocode}
-\ifdefequal{\LWR@mynexttoken}{\arrayrulecolor}%
- {\global\let\LWR@mynextaction\LWR@donothing}{}%
+ \ifdefequal{\LWR@mynexttoken}{\arrayrulecolor}%
+ {\global\let\LWR@mynextaction\LWR@donothing}{}%
% \end{macrocode}
% \begin{macrocode}
-\ifdefequal{\LWR@mynexttoken}{\doublerulesepcolor}%
- {\global\let\LWR@mynextaction\LWR@donothing}{}%
+ \ifdefequal{\LWR@mynexttoken}{\doublerulesepcolor}%
+ {\global\let\LWR@mynextaction\LWR@donothing}{}%
% \end{macrocode}
% \begin{macrocode}
-\ifdefequal{\LWR@mynexttoken}{\warpprintonly}%
- {\global\let\LWR@mynextaction\LWR@donothing}{}%
+ \ifdefequal{\LWR@mynexttoken}{\warpprintonly}%
+ {\global\let\LWR@mynextaction\LWR@donothing}{}%
% \end{macrocode}
% \begin{macrocode}
-\ifdefequal{\LWR@mynexttoken}{\warpHTMLonly}%
- {\global\let\LWR@mynextaction\LWR@donothing}{}%
+ \ifdefequal{\LWR@mynexttoken}{\warpHTMLonly}%
+ {\global\let\LWR@mynextaction\LWR@donothing}{}%
% \end{macrocode}
% \begin{macrocode}
-\ifdefequal{\LWR@mynexttoken}{\ldelim}%
- {\global\let\LWR@mynextaction\LWR@donothing}{}%
+ \ifdefequal{\LWR@mynexttoken}{\ldelim}%
+ {\global\let\LWR@mynextaction\LWR@donothing}{}%
% \end{macrocode}
% \begin{macrocode}
-\ifdefequal{\LWR@mynexttoken}{\rdelim}%
- {\global\let\LWR@mynextaction\LWR@donothing}{}%
+ \ifdefequal{\LWR@mynexttoken}{\rdelim}%
+ {\global\let\LWR@mynextaction\LWR@donothing}{}%
% \end{macrocode}
% For \pkg{arydshln}:
% \begin{macrocode}
-\ifdefequal{\LWR@mynexttoken}{\hdashline}%
- {\global\let\LWR@mynextaction\LWR@donothing}{}%
+ \ifdefequal{\LWR@mynexttoken}{\hdashline}%
+ {\global\let\LWR@mynextaction\LWR@donothing}{}%
% \end{macrocode}
% \begin{macrocode}
-\ifdefequal{\LWR@mynexttoken}{\cdashline}%
- {\global\let\LWR@mynextaction\LWR@donothing}{}%
+ \ifdefequal{\LWR@mynexttoken}{\cdashline}%
+ {\global\let\LWR@mynextaction\LWR@donothing}{}%
% \end{macrocode}
% \begin{macrocode}
-\ifdefequal{\LWR@mynexttoken}{\firsthdashline}%
- {\global\let\LWR@mynextaction\LWR@donothing}{}%
+ \ifdefequal{\LWR@mynexttoken}{\firsthdashline}%
+ {\global\let\LWR@mynextaction\LWR@donothing}{}%
% \end{macrocode}
% \begin{macrocode}
-\ifdefequal{\LWR@mynexttoken}{\lasthdashline}%
- {\global\let\LWR@mynextaction\LWR@donothing}{}%
+ \ifdefequal{\LWR@mynexttoken}{\lasthdashline}%
+ {\global\let\LWR@mynextaction\LWR@donothing}{}%
% \end{macrocode}
% Ignore an empty line between rows:
% \changes{v0.45}{2017/12/06}{Fix: Empty line between rows.}
% \begin{macrocode}
-\ifdefequal{\LWR@mynexttoken}{\par}%
- {\global\let\LWR@mynextaction\LWR@donothing}{}%
+ \ifdefequal{\LWR@mynexttoken}{\par}%
+ {\global\let\LWR@mynextaction\LWR@donothing}{}%
% \end{macrocode}
%
% No action for an \cs{end} token.
@@ -28930,9 +29433,9 @@ rowspan="#2" %
%
% Start the new table cell if was not any of the above:
% \begin{macrocode}
-\LWR@traceinfo{LWR@tabledatacolumntag: about to do mynext}%
-\LWR@mynextaction%
-\LWR@traceinfo{LWR@tabledatacolumntag: done}%
+ \LWR@traceinfo{LWR@tabledatacolumntag: about to do mynext}%
+ \LWR@mynextaction%
+ \LWR@traceinfo{LWR@tabledatacolumntag: done}%
}
% \end{macrocode}
% \end{macro}
@@ -28996,43 +29499,37 @@ rowspan="#2" %
%
% These are default defininitions in case \pkg{booktabs} is not loaded,
% and are not expected to used, but must exist as placeholders.
-% They are pre-deleted in case \pkg{memoir} has already loaded \pkg{booktabs}.
+% \pkg{memoir} may have already loaded \pkg{booktabs}.
%
% \changes{v0.34}{2017/08/08}{\pkg{booktabs}: Works inside \env{lateximage}.}
% \changes{v0.58}{2018/06/21}{\pkg{memoir}: Fix for \pkg{booktabs}.}
+% \changes{v0.79}{2019/12/09}{\pkg{booktabs}: Fix for \pkg{memoir} with \env{lateximage}.}
% \begin{macrocode}
-\LetLtxMacro\toprule\relax
-\LetLtxMacro\midrule\relax
-\LetLtxMacro\cmidrule\cline
-\LetLtxMacro\bottomrule\relax
-\LetLtxMacro\addlinespace\relax
-\LetLtxMacro\morecmidrules\relax
-\LetLtxMacro\specialrule\relax
-
-\newcommand*{\toprule}[1][]{\hline}
-\newcommand*{\midrule}[1][]{\hline}
-\LetLtxMacro\cmidrule\cline
-\newcommand*{\bottomrule}[1][]{\hline}
-\newcommand*{\addlinespace}[1][]{}
-\newcommand*{\morecmidrules}{}
-\newcommand*{\specialrule}[3]{\hline}
+\providecommand*{\toprule}[1][]{\hline}
+\providecommand*{\midrule}[1][]{\hline}
+\providecommand*{\cmidrule}{\cline}
+\providecommand*{\bottomrule}[1][]{\hline}
+\providecommand*{\addlinespace}[1][]{}
+\providecommand*{\morecmidrules}{}
+\providecommand*{\specialrule}[3]{\hline}
% \end{macrocode}
%
%
% \begin{macro}{\noalign} \marg{text}
% Redefined for use inside \env{tabular}.
% \changes{v0.49}{2018/02/18}{Fix: \cs{noalign} inside \env{tabular}.}
+% \changes{v0.79}{2020/01/18}{Fix: Nested \env{tabular}s.}
% \begin{macrocode}
\LetLtxMacro\LWR@orignoalign\noalign
\newcommand{\LWR@tabularnoalign}[1]{%
-\begingroup%
-\global\advance\rownum\m@ne%
-\renewcommand*{\LWR@xcolorrowHTMLcolor}{}%
-\multicolumn{\value{LWR@tabletotalLaTeXcols}}{l}{#1} \\
-\endgroup%
-% \@rowc@lors%
-\LWR@getmynexttoken%
+ \advance\rownum\m@ne%
+ \LetLtxMacro\LWR@save@xcolorrowHTMLcolor\LWR@xcolorrowHTMLcolor%
+ \renewcommand*{\LWR@xcolorrowHTMLcolor}{}%
+ \multicolumn{\value{LWR@tabletotalLaTeXcols}}{l}{#1} \\
+ \LetLtxMacro\LWR@xcolorrowHTMLcolor\LWR@save@xcolorrowHTMLcolor%
+ % \@rowc@lors%
+ \LWR@getmynexttoken%
}
% \end{macrocode}
% \end{macro}
@@ -29046,21 +29543,23 @@ rowspan="#2" %
%
% \begin{macrocode}
\AtBeginDocument{
+
\@ifpackageloaded{lwarp-tabls}
{
-\newcommand*{\LWR@HTMLhline}[1][]{%
- \ifbool{FormatWP}%
- {\LWR@docmidrule{1-\arabic{LWR@tabletotalLaTeXcols}}}%
- {\addtocounter{LWR@hlines}{1}}%
- \LWR@getmynexttoken}%
+ \newcommand*{\LWR@HTMLhline}[1][]{%
+ \ifbool{FormatWP}%
+ {\LWR@docmidrule{1-\arabic{LWR@tabletotalLaTeXcols}}}%
+ {\defaddtocounter{LWR@hlines}{1}}%
+ \LWR@getmynexttoken}%
}
{
-\newcommand*{\LWR@HTMLhline}{%
- \ifbool{FormatWP}%
- {\LWR@docmidrule{1-\arabic{LWR@tabletotalLaTeXcols}}}%
- {\addtocounter{LWR@hlines}{1}}%
- \LWR@getmynexttoken}%
+ \newcommand*{\LWR@HTMLhline}{%
+ \ifbool{FormatWP}%
+ {\LWR@docmidrule{1-\arabic{LWR@tabletotalLaTeXcols}}}%
+ {\defaddtocounter{LWR@hlines}{1}}%
+ \LWR@getmynexttoken}%
}
+
}% AtBeginDocument
% \end{macrocode}
% \end{macro}
@@ -29069,7 +29568,7 @@ rowspan="#2" %
% \begin{macro}{\LWR@HTMLcline} \marg{columns}
% \begin{macrocode}
\NewDocumentCommand{\LWR@HTMLcline}{m}%
-{\LWR@docmidrule{#1}\LWR@getmynexttoken}%
+ {\LWR@docmidrule{#1}\LWR@getmynexttoken}%
% \end{macrocode}
% \end{macro}
@@ -29129,8 +29628,9 @@ rowspan="#2" %
\NewDocumentCommand{\LWR@HTML@@tabular}{d<> o m}
{%
-\LWR@traceinfo{LWR@HTML@@tabular started}%
+ \LWR@traceinfo{LWR@HTML@@tabular started}%
% \end{macrocode}
+%
% In \LaTeX, a \env{tabular} may be placed inside a \env{minipage},
% \watchout[\element{table} inside \element{span}]
% but in \HTML\ a \element{table} may not be inside a \element{span}.
@@ -29146,28 +29646,28 @@ rowspan="#2" %
% a warning is issued here instructing the user to please isolate the \element{span}
% to print-only.
% \begin{macrocode}
-\ifnumcomp{\value{LWR@spandepth}}{>}{0}{%
- \PackageWarning{lwarp}{%
- A tabular is being used inside a span such as\MessageBreak
- a minipage. Some formatting may not be correct\MessageBreak
- in the tabular.\MessageBreak
- It is recommended to use \protect\warpprintonly\space or the\MessageBreak
- warpprint environment to isolate the span to\MessageBreak
- print-only,%
- }
-}{}%
-\addtocounter{LWR@tabulardepth}{1}%
+ \ifnumcomp{\value{LWR@spandepth}}{>}{0}{%
+ \PackageWarning{lwarp}{%
+ A tabular is being used inside a span such as\MessageBreak
+ a minipage. Some formatting may not be correct\MessageBreak
+ in the tabular.\MessageBreak
+ It is recommended to use \protect\warpprintonly\space or the\MessageBreak
+ warpprint environment to isolate the span to\MessageBreak
+ print-only,%
+ }
+ }{}%
+ \addtocounter{LWR@tabulardepth}{1}%
% \end{macrocode}
% Not yet started a table row:
% \begin{macrocode}
-\global\boolfalse{LWR@startedrow}%
+ \boolfalse{LWR@startedrow}%
% \end{macrocode}
% Not yet doing any rules:
% \begin{macrocode}
-\setcounter{LWR@hlines}{0}%
-\setcounter{LWR@hdashedlines}{0}%
-\global\boolfalse{LWR@doingtbrule}%
-\global\boolfalse{LWR@doingcmidrule}%
+ \defcounter{LWR@hlines}{0}%
+ \defcounter{LWR@hdashedlines}{0}%
+ \boolfalse{LWR@doingtbrule}%
+ \boolfalse{LWR@doingcmidrule}%
% \end{macrocode}
%
% For \pkg{babel-french}, turn off auto spacing one time, then nullify
@@ -29176,73 +29676,79 @@ rowspan="#2" %
% \changes{v0.41}{2017/10/06}{Fix: \cs{NoAutoSpacing} in a tabular
% with \pkg{babel-french}.}
% \begin{macrocode}
-\LWR@nullifyNoAutoSpacing%
+ \LWR@nullifyNoAutoSpacing%
% \end{macrocode}
%
% Have not yet found the end of tabular command.
% Unmute the |@| and |!| columns.
% \begin{macrocode}
-\global\boolfalse{LWR@exitingtabular}%
-\global\boolfalse{LWR@tabularmutemods}%
+ \boolfalse{LWR@exitingtabular}%
+ \boolfalse{LWR@tabularmutemods}%
% \end{macrocode}
%
% Error if failed to use \cs{mrowcell} or \cs{mcolrowcell} when needed.
% \changes{v0.69}{2019/03/07}{Error if \cs{multirow} without \cs{mrowcell}.}
% \begin{macrocode}
-\boolfalse{LWR@usedmultirow}
-\boolfalse{LWR@foundmrowcell}
+ \boolfalse{LWR@usedmultirow}%
+ \boolfalse{LWR@foundmrowcell}%
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+ \renewcommand*{\LWR@multicoltext}{}%
% \end{macrocode}
%
% Create the |table| tag:
% \begin{macrocode}
-\global\booltrue{LWR@intabularmetadata}%
-\LWR@traceinfo{LWR@@tabular: About to LWR@forecenewpage.}%
-\LWR@forcenewpage
-\LWR@htmlblocktag{table}%
+ \booltrue{LWR@intabularmetadata}%
+ \LWR@traceinfo{LWR@@tabular: About to LWR@forecenewpage.}%
+ \LWR@forcenewpage
+ \LWR@htmlblocktag{table}%
% \end{macrocode}
% Parse the table columns:
% \begin{macrocode}
-\LWR@parsetablecols{#3}%
+ \LWR@parsetablecols{#3}%
% \end{macrocode}
%
% Table col spec is: \cs{LWR@tablecolspec} which is a string of |llccrr|, etc.
%
% Do not place the table inside a paragraph:
% \begin{macrocode}
-\LWR@stoppars%
+ \LWR@stoppars%
% \end{macrocode}
% Track column \#:
% \begin{macrocode}
-\setcounter{LWR@tableLaTeXcolindex}{1}%
+ \defcounter{LWR@tableLaTeXcolindex}{1}%
% \end{macrocode}
% Have not yet added data in this column:
% \begin{macrocode}
-\global\boolfalse{LWR@tabularcelladded}%
+ \global\boolfalse{LWR@tabularcelladded}%
% \end{macrocode}
% Start looking for midrules:
% \begin{macrocode}
-\LWR@clearmidrules%
+ \LWR@clearmidrules%
% \end{macrocode}
% |\\| becomes a macro to end the table row:
% \begin{macrocode}
-\LetLtxMacro{\\}{\LWR@tabularendofline}%
+ \LetLtxMacro{\\}{\LWR@tabularendofline}%
% \end{macrocode}
%
% \cs{warpprintonly} inside a \env{tabular} must grab the next token.
% \changes{v0.68}{2019/03/01}{Fix: \cs{warpprintonly} inside \env{tabular}.}
% \begin{macrocode}
-\LetLtxMacro\warpprintonly\LWR@tabular@warpprintonly%
+ \LetLtxMacro\warpprintonly\LWR@tabular@warpprintonly%
% \end{macrocode}
%
% The following adjust for \pkg{colortbl}.
% \changes{v0.48}{2018/02/06}{\pkg{colortbl}: Added.}
+% \changes{v0.79}{2020/01/18}{\pkg{colortbl}: Fix: Nested \env{tabular}s.}
% \begin{macrocode}
-\LetLtxMacro\arrayrulecolor\arrayrulecolornexttoken%
-\LetLtxMacro\doublerulesepcolor\doublerulesepcolornexttoken%
-\gdef\LWR@columnHTMLcolor{}%
-\gdef\LWR@rowHTMLcolor{}%
-\gdef\LWR@cellHTMLcolor{}%
-\@rowcolors%
+ \LetLtxMacro\arrayrulecolor\arrayrulecolornexttoken%
+ \LetLtxMacro\doublerulesepcolor\doublerulesepcolornexttoken%
+ \def\LWR@columnHTMLcolor{}%
+ \def\LWR@rowHTMLcolor{}%
+ \def\LWR@cellHTMLcolor{}%
+ \@rowcolors%
% \end{macrocode}
%
% The vertical rules are set to the color active at the start of the tabular.
@@ -29250,14 +29756,14 @@ rowspan="#2" %
% but not the vertical rules.
% \changes{v0.65}{2018/12/19}{Fix: Rule color.}
% \begin{macrocode}
-\ifdefvoid{\LWR@ruleHTMLcolor}%
- {\edef\LWR@vertruleHTMLcolor{black}}%
- {\edef\LWR@vertruleHTMLcolor{\LWR@origpound\LWR@ruleHTMLcolor}}%
+ \ifdefvoid{\LWR@ruleHTMLcolor}%
+ {\edef\LWR@vertruleHTMLcolor{black}}%
+ {\edef\LWR@vertruleHTMLcolor{\LWR@origpound\LWR@ruleHTMLcolor}}%
% \end{macrocode}
%
% Tracking the depth of cell color \element{div}s:
% \begin{macrocode}
-\setcounter{LWR@cellcolordepth}{0}%
+ \defcounter{LWR@cellcolordepth}{0}%
% \end{macrocode}
%
% The following may appear before a data cell is created,
@@ -29266,86 +29772,86 @@ rowspan="#2" %
%
% The optional parameter for \cs{hline} supports the \pkg{tabls} package.
% \begin{macrocode}
-\LWR@traceinfo{LWR@@HTML@tabular: redefining macros}%
-\LetLtxMacro\noalign\LWR@tabularnoalign%
-\LetLtxMacro\hline\LWR@HTMLhline%
-\LetLtxMacro\cline\LWR@HTMLcline%
+ \LWR@traceinfo{LWR@@HTML@tabular: redefining macros}%
+ \LetLtxMacro\noalign\LWR@tabularnoalign%
+ \LetLtxMacro\hline\LWR@HTMLhline%
+ \LetLtxMacro\cline\LWR@HTMLcline%
% \end{macrocode}
% \begin{macrocode}
-\DeclareDocumentCommand{\hdashline}{o}{%
- \ifbool{FormatWP}%
- {\LWR@docdashline{1-\arabic{LWR@tabletotalLaTeXcols}}}%
- {\addtocounter{LWR@hdashedlines}{1}}%
- \LWR@getmynexttoken%
-}%
+ \DeclareDocumentCommand{\hdashline}{o}{%
+ \ifbool{FormatWP}%
+ {\LWR@docdashline{1-\arabic{LWR@tabletotalLaTeXcols}}}%
+ {\defaddtocounter{LWR@hdashedlines}{1}}%
+ \LWR@getmynexttoken%
+ }%
% \end{macrocode}
% \begin{macrocode}
-\DeclareDocumentCommand{\cdashline}{m}{%
- \LWR@docdashline{##1}\LWR@getmynexttoken%
-}%
+ \DeclareDocumentCommand{\cdashline}{m}{%
+ \LWR@docdashline{##1}\LWR@getmynexttoken%
+ }%
% \end{macrocode}
% \begin{macrocode}
-\DeclareDocumentCommand{\firsthdashline}{o}{%
- \ifbool{FormatWP}%
- {\LWR@docdashline{1-\arabic{LWR@tabletotalLaTeXcols}}}%
- {\addtocounter{LWR@hdashedlines}{1}}%
- \LWR@getmynexttoken%
-}%
+ \DeclareDocumentCommand{\firsthdashline}{o}{%
+ \ifbool{FormatWP}%
+ {\LWR@docdashline{1-\arabic{LWR@tabletotalLaTeXcols}}}%
+ {\defaddtocounter{LWR@hdashedlines}{1}}%
+ \LWR@getmynexttoken%
+ }%
% \end{macrocode}
% \begin{macrocode}
-\DeclareDocumentCommand{\lasthdashline}{o}{%
- \ifbool{FormatWP}%
- {\LWR@docdashline{1-\arabic{LWR@tabletotalLaTeXcols}}}%
- {\addtocounter{LWR@hdashedlines}{1}}%
- \LWR@getmynexttoken%
-}%
+ \DeclareDocumentCommand{\lasthdashline}{o}{%
+ \ifbool{FormatWP}%
+ {\LWR@docdashline{1-\arabic{LWR@tabletotalLaTeXcols}}}%
+ {\defaddtocounter{LWR@hdashedlines}{1}}%
+ \LWR@getmynexttoken%
+ }%
% \end{macrocode}
% The following create data cells and will have no more data in this cell,
% so we do not want to look ahead for a possible data cell,
% so do not want to use \cs{LWR@getmynexttoken}.
% \changes{v0.69}{2019/03/07}{Error if \cs{multirow} without \cs{mrowcell}.}
% \begin{macrocode}
-\renewcommand{\multicolumn}{\LWR@htmlmulticolumn}%
-\renewcommand*{\mrowcell}{%
- \LWR@maybenewtablerow%
- \LWR@tabularleftedge%
- \global\booltrue{LWR@skippingmrowcell}%
- \booltrue{LWR@foundmrowcell}%
-}%
-\renewcommand*{\mcolrowcell}{%
- \LWR@maybenewtablerow%
- \global\booltrue{LWR@skippingmcolrowcell}%
- \booltrue{LWR@foundmrowcell}%
-}%
-\LetLtxMacro\caption\LWR@longtabledatacaptiontag%
+ \renewcommand{\multicolumn}{\LWR@htmlmulticolumn}%
+ \renewcommand*{\mrowcell}{%
+ \LWR@maybenewtablerow%
+ \LWR@tabularleftedge%
+ \booltrue{LWR@skippingmrowcell}%
+ \booltrue{LWR@foundmrowcell}%
+ }%
+ \renewcommand*{\mcolrowcell}{%
+ \LWR@maybenewtablerow%
+ \booltrue{LWR@skippingmcolrowcell}%
+ \booltrue{LWR@foundmrowcell}%
+ }%
+ \LetLtxMacro\caption\LWR@longtabledatacaptiontag%
% \end{macrocode}
% Reset for new processing:
% \begin{macrocode}
-\global\boolfalse{LWR@tableparcell}%
-\global\boolfalse{LWR@skippingmrowcell}%
-\global\boolfalse{LWR@skippingmcolrowcell}%
-\global\boolfalse{LWR@skipatbang}%
-\global\boolfalse{LWR@emptyatbang}%
+ \boolfalse{LWR@tableparcell}%
+ \boolfalse{LWR@skippingmrowcell}%
+ \boolfalse{LWR@skippingmcolrowcell}%
+ \boolfalse{LWR@skipatbang}%
+ \boolfalse{LWR@emptyatbang}%
% \end{macrocode}
% Set |&| for its special meaning inside the tabular:
% \begin{macrocode}
-\StartDefiningTabulars%
-\protected\gdef&{\LWR@tabularampersand}%
+ \StartDefiningTabulars%
+ \protected\gdef&{\LWR@tabularampersand}%
% \end{macrocode}
% Locally force any minipages to be fullwidth, until the end of the \env{tabular}:
% \changes{v0.66}{2018/12/31}{Fix: Minipages inside \env{tabular}.}
% \begin{macrocode}
-\booltrue{LWR@forceminipagefullwidth}
+ \booltrue{LWR@forceminipagefullwidth}%
% \end{macrocode}
% Nest one level deeper of tabular paragraph handling:
% \changes{v0.46}{2018/01/18}{Fix: Tabular empty lines.}
% \begin{macrocode}
-\addtocounter{LWR@tabularpardepth}{1}%
+ \addtocounter{LWR@tabularpardepth}{1}%
% \end{macrocode}
% Look ahead for a possible table data cell:
% \begin{macrocode}
-\LWR@traceinfo{LWR@@HTML@tabular: about to LWR@getmynexttoken}%
-\LWR@getmynexttoken%
+ \LWR@traceinfo{LWR@@HTML@tabular: about to LWR@getmynexttoken}%
+ \LWR@getmynexttoken%
}%
% \end{macrocode}
%
@@ -29355,78 +29861,83 @@ rowspan="#2" %
% \begin{macrocode}
\newcommand*{\LWR@HTML@endtabular}
{%
-\LWR@traceinfo{LWR@HTML@endtabular}%
+ \LWR@traceinfo{LWR@HTML@endtabular}%
% \end{macrocode}
% Unnest one level of tabular paragraph handling:
% \changes{v0.46}{2018/01/18}{Fix: Tabular empty lines.}
% \begin{macrocode}
-\addtocounter{LWR@tabularpardepth}{-1}%
-\ifboolexpr{%
- test {%
- \ifnumcomp{\value{LWR@tableLaTeXcolindex}}{<}{\value{LWR@tabletotalLaTeXcols}}
- } or %
- (%
- bool{LWR@intabularmetadata} and%
- not bool{LWR@tabularcelladded} and%
+ \addtocounter{LWR@tabularpardepth}{-1}%
+ \ifboolexpr{%
test {%
- \ifnumcomp{\value{LWR@tableLaTeXcolindex}}{=}{\value{LWR@tabletotalLaTeXcols}}%
- }%
- )%
-}%
-{%
- \LWR@tabularfinishrow%
-}%
-{%
- \LWR@closetabledatacell%
-}%
-\LWR@htmlblocktag{/tr}%
+ \ifnumcomp{\value{LWR@tableLaTeXcolindex}}{<}%
+ {\value{LWR@tabletotalLaTeXcols}}
+ } or %
+ (%
+ bool{LWR@intabularmetadata} and%
+ not bool{LWR@tabularcelladded} and%
+ test {%
+ \ifnumcomp{\value{LWR@tableLaTeXcolindex}}{=}%
+ {\value{LWR@tabletotalLaTeXcols}}%
+ }%
+ )%
+ }%
+ {%
+ \LWR@tabularfinishrow%
+ }%
+ {%
+ \LWR@closetabledatacell%
+ }%
+ \LWR@htmlblocktag{/tr}%
% \end{macrocode}
% \pkg{xcolor} row color support:
% \begin{macrocode}
-\@rowc@lors%
+ \@rowc@lors%
% \end{macrocode}
% \begin{macrocode}
-\LWR@htmlblocktag{/table}%
-\global\boolfalse{LWR@intabularmetadata}%
+ \LWR@htmlblocktag{/table}%
+ \boolfalse{LWR@intabularmetadata}%
% \end{macrocode}
%
% Unnest one level of tabular:
% \begin{macrocode}
-\addtocounter{LWR@tabulardepth}{-1}%
+ \addtocounter{LWR@tabulardepth}{-1}%
% \end{macrocode}
%
% Restore |&| to its usual meaning:
+% \changes{v0.79}{2020/01/18}{Fix: Nested \env{tabular}s.}
% \begin{macrocode}
-\protected\gdef&{\LWR@origampmacro}%
-\StopDefiningTabulars%
+ \ifnumequal{\value{LWR@tabulardepth}}{0}{%
+ \protected\gdef&{\LWR@origampmacro}%
+ \StopDefiningTabulars%
+ }{}%
% \end{macrocode}
%
% Error if used \cs{multirow} or \cs{multicolumnrow} without
% using \cs{mrowcell} or \cs{mcolrowcell}.
% \changes{v0.69}{2019/03/07}{Error if \cs{multirow} without \cs{mrowcell}.}
% \begin{macrocode}
-\ifbool{LWR@usedmultirow}{%
- \ifbool{LWR@foundmrowcell}%
- {}%
- {%
- \PackageError{lwarp}%
- {%
- When using \protect\multirow, \protect\multicolumnrow,\MessageBreak
- or the bigdelim package,\MessageBreak
- place \protect\mrowcell\space or \protect\mcolrowcell\MessageBreak
- in empty cells which are to be skipped.\MessageBreak
- See the lwarp package documentation:\MessageBreak
- "Special cases and limitations" -> "Tabular"
- }%
+ \ifbool{LWR@usedmultirow}{%
+ \ifbool{LWR@foundmrowcell}%
+ {}%
{%
- See the lwarp package documentation:\MessageBreak
- "Special cases and limitations" -> "Tabular".
+ \PackageError{lwarp}%
+ {%
+ When using \protect\multirow, \protect\multicolumnrow,\MessageBreak
+ or the bigdelim package,\MessageBreak
+ place \protect\mrowcell\space or \protect\mcolrowcell\MessageBreak
+ in empty cells which are to be skipped.\MessageBreak
+ See the Lwarp package documentation:\MessageBreak
+ "Special cases and limitations" -> "Tabular"
+ }%
+ {%
+ See the Lwarp package documentation:\MessageBreak
+ "Special cases and limitations" -> "Tabular".
+ }%
}%
- }%
-}{}%
+ }{}%
% \end{macrocode}
% \begin{macrocode}
-\LWR@traceinfo{LWR@HTML@endtabular finished}%
+ \LWR@traceinfo{LWR@HTML@endtabular finished}%
}
\csletcs{LWR@HTML@endtabular*}{LWR@HTML@endtabular}
@@ -29582,12 +30093,12 @@ rowspan="#2" %
% Remove \cs{label} and other commands from the name, the strip any final period.
% See \pkg{gettitlestring}.
% \begin{macrocode}
-\GetTitleStringExpand{#1}%
-\edef\@currentlabelname{\detokenize\expandafter{\GetTitleStringResult}}%
-\edef\@currentlabelname{%
- \expandafter\LWR@stripperiod\@currentlabelname%
- \ltx@empty.\ltx@empty\@nil%
-}%
+ \GetTitleStringExpand{#1}%
+ \edef\@currentlabelname{\detokenize\expandafter{\GetTitleStringResult}}%
+ \edef\@currentlabelname{%
+ \expandafter\LWR@stripperiod\@currentlabelname%
+ \ltx@empty.\ltx@empty\@nil%
+ }%
}
% \end{macrocode}
% \end{macro}
@@ -29681,17 +30192,23 @@ rowspan="#2" %
% \changes{v0.66}{2019/01/27}{No longer use \pkg{zref}.}
% \begin{macrocode}
\newcommand*{\LWR@lwarplabel}[1]{%
-\LWR@traceinfo{LWR@lwarplabel !#1!}%
-\LWR@setlatestname{\@currentlabelname}%
- \@bsphack%
- \protected@write\@auxout{}%
- {\string\newlabel{#1@lwarp}{%
- {\@currentlabelname}%
- {\ifbool{FileSectionNames}{\LWR@thisfilename}{\arabic{LWR@htmlfilenumber}}}%
- {\arabic{LWR@lateximagedepth}}%
- {\arabic{LWR@lateximagenumber}}%
- }}%
- \@esphack%
+ \LWR@traceinfo{LWR@lwarplabel !#1!}%
+ \LWR@setlatestname{\@currentlabelname}%
+ \@bsphack%
+ \protected@write\@auxout{}%
+ {%
+ \string\newlabel{#1@lwarp}{%
+ {\@currentlabelname}%
+ {%
+ \ifbool{FileSectionNames}%
+ {\LWR@thisfilename}%
+ {\arabic{LWR@htmlfilenumber}}%
+ }%
+ {\arabic{LWR@lateximagedepth}}%
+ {\arabic{LWR@lateximagenumber}}%
+ }%
+ }%
+ \@esphack%
}
% \end{macrocode}
% \end{macro}
@@ -29710,36 +30227,39 @@ rowspan="#2" %
% \changes{v0.45}{2017/12/29}{Fix: Labels with underscores.}
% \begin{macrocode}
\newcommand*{\LWR@sublabel}[1]{%
-\LWR@traceinfo{LWR@sublabel !#1!}%
+ \LWR@traceinfo{LWR@sublabel !#1!}%
% \end{macrocode}
% Create an \HTML\ id tag unless are inside a lateximage,
% since it would appear in the image:
% \begin{macrocode}
-\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
-{}%
-{% not lateximage
+ \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
+ {}%
+ {% not lateximage
% \end{macrocode}
% 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)
% \begin{macrocode}
- \LWR@sanitize{#1}%
- \ifbool{LWR@doingstartpars}%
- {% pars allowed
- \ifbool{LWR@doingapar}%
- {% par started
- \LWR@htmltag{a \LWR@print@mbox{id="\LWR@sanitized"}}\LWR@htmltag{/a}%
- }% par started
- {% par not started
- \LWR@stoppars%
- \LWR@htmltag{a \LWR@print@mbox{id="\LWR@sanitized"}}\LWR@htmltag{/a}%
- \LWR@startpars%
- }% par not started
- }% pars allowed
- {% pars not allowed
- \LWR@htmltag{a \LWR@print@mbox{id="\LWR@sanitized"}}\LWR@htmltag{/a}%
- }% pars not allowed
-}% not lateximage
+ \LWR@sanitize{#1}%
+ \ifbool{LWR@doingstartpars}%
+ {% pars allowed
+ \ifbool{LWR@doingapar}%
+ {% par started
+ \LWR@htmltag{a \LWR@print@mbox{id="\LWR@sanitized"}}%
+ \LWR@htmltag{/a}%
+ }% par started
+ {% par not started
+ \LWR@stoppars%
+ \LWR@htmltag{a \LWR@print@mbox{id="\LWR@sanitized"}}%
+ \LWR@htmltag{/a}%
+ \LWR@startpars%
+ }% par not started
+ }% pars allowed
+ {% pars not allowed
+ \LWR@htmltag{a \LWR@print@mbox{id="\LWR@sanitized"}}%
+ \LWR@htmltag{/a}%
+ }% pars not allowed
+ }% not lateximage
}
% \end{macrocode}
% \end{macro}
@@ -29762,24 +30282,31 @@ rowspan="#2" %
%
% \begin{macrocode}
\NewDocumentCommand{\LWR@new@label}{d() m o}{%
-\LWR@traceinfo{LWR@new@label: starting}%
-\LWR@traceinfo{LWR@new@label: !#2!}%
+ \LWR@traceinfo{LWR@new@label: starting}%
+ \LWR@traceinfo{LWR@new@label: !#2!}%
% \@bsphack%
% \end{macrocode}
% Create a traditional \LaTeX\ label, as modified by \pkg{cleveref}:
% \begin{macrocode}
-\LWR@orig@label{#2}%
+ \LWR@orig@label{#2}%
% \end{macrocode}
% Create a special label which holds the section number,
% |LWR@htmlfilenumber|, |LWR@lateximagedepth|, and |LWR@lateximagenumber|:
% \begin{macrocode}
-\LWR@traceinfo{LWR@new@label: filesectionnames is \ifbool{FileSectionNames}{true}{false}}%
-\LWR@traceinfo{LWR@new@label: LWR@thisfilename is !\LWR@thisfilename!}%
-\LWR@traceinfo{LWR@new@label: LWR@htmlfilenumber is \arabic{LWR@htmlfilenumber}}%
-\LWR@lwarplabel{#2}%
-\LWR@sublabel{#2}%
-% \@esphack%
-\LWR@traceinfo{LWR@new@label: done}%
+ \LWR@traceinfo{%
+ LWR@new@label: filesectionnames is %
+ \ifbool{FileSectionNames}{true}{false}%
+ }%
+ \LWR@traceinfo{%
+ LWR@new@label: LWR@thisfilename is !\LWR@thisfilename!%
+ }%
+ \LWR@traceinfo{%
+ LWR@new@label: LWR@htmlfilenumber is \arabic{LWR@htmlfilenumber}%
+ }%
+ \LWR@lwarplabel{#2}%
+ \LWR@sublabel{#2}%
+ % \@esphack%
+ \LWR@traceinfo{LWR@new@label: done}%
}
% \end{macrocode}
% \end{macro}
@@ -29815,61 +30342,61 @@ rowspan="#2" %
% \begin{macrocode}
\newcommand*{\LWR@startref}[1]
{%
-\LWR@sanitize{#1}%
-\LWR@traceinfo{LWR@startref A: !#1!}%
+ \LWR@sanitize{#1}%
+ \LWR@traceinfo{LWR@startref A: !#1!}%
% \end{macrocode}
% Create the filename part of the link:
% \begin{macrocode}
-\LWR@htmltag{a href="%
-\LWR@traceinfo{LWR@startref B}%
-\LWR@print@mbox{\LWR@htmlrefsectionfilename{#1}}%
-\LWR@traceinfo{LWR@startref C}%
-\LWR@origpound%
+ \LWR@htmltag{a href="%
+ \LWR@traceinfo{LWR@startref B}%
+ \LWR@print@mbox{\LWR@htmlrefsectionfilename{#1}}%
+ \LWR@traceinfo{LWR@startref C}%
+ \LWR@origpound%
% \end{macrocode}
% Create the destination id:
%
% See if |LWR@lateximagedepth| is unknown:
% \begin{macrocode}
-\LWR@traceinfo{LWR@startref D: !#1!}%
-\ifcsundef{r@#1@lwarp}%
+ \LWR@traceinfo{LWR@startref D: !#1!}%
+ \ifcsundef{r@#1@lwarp}%
% \end{macrocode}
% ``|??|'' if |LWR@lateximagedepth| is unknown,
% so create a link with an unknown destination:
% \begin{macrocode}
-{%
- \LWR@traceinfo{LWR@startref D0: ??}%
- ??%
-}%
+ {%
+ \LWR@traceinfo{LWR@startref D0: ??}%
+ ??%
+ }%
% \end{macrocode}
% If |LWR@lateximagedepth| is known.
% Use a lateximage if the depth is greater than zero,
% or a regular link otherwise:
% \begin{macrocode}
-{%
- \ifthenelse{\cnttest{\LWR@lateximagedepthref{#1}}{>}{0}}%
- {%
- \LWR@ImagesName\LWR@lateximagenumberref{#1}%
- }%
- {%
- \LWR@traceinfo{LWR@startref D3}%
+ {%
+ \ifthenelse{\cnttest{\LWR@lateximagedepthref{#1}}{>}{0}}%
+ {%
+ \LWR@ImagesName\LWR@lateximagenumberref{#1}%
+ }%
+ {%
+ \LWR@traceinfo{LWR@startref D3}%
% \end{macrocode}
% \cs{detokenize} is used to allow underscores in the labels:
% \changes{v0.45}{2017/12/01}{Fix: Labels with underscores.}
% \begin{macrocode}
- \LWR@print@mbox{\LWR@sanitized}%
- }%
-}%
-\LWR@traceinfo{LWR@startref E}%
+ \LWR@print@mbox{\LWR@sanitized}%
+ }%
+ }%
+ \LWR@traceinfo{LWR@startref E}%
% \end{macrocode}
% Closing quote:
% \begin{macrocode}
-"%
+ "%
% \end{macrocode}
% Maybe add a title:
% \begin{macrocode}
-\LWR@addlinktitle%
-}%
-\LWR@traceinfo{LWR@startref F}%
+ \LWR@addlinktitle%
+ }%
+ \LWR@traceinfo{LWR@startref F}%
}
% \end{macrocode}
% \end{macro}
@@ -29882,10 +30409,10 @@ rowspan="#2" %
% but prints its own text, such as ``|1(b)|''.
% \begin{macrocode}
\NewDocumentCommand{\LWR@subnewref}{m m}{%
-\LWR@traceinfo{LWR@subnewref #1 #2}%
-\LWR@startref{#1}%
-\LWR@print@ref{#2}%
-\LWR@htmltag{/a}%
+ \LWR@traceinfo{LWR@subnewref #1 #2}%
+ \LWR@startref{#1}%
+ \LWR@print@ref{#2}%
+ \LWR@htmltag{/a}%
}
% \end{macrocode}
% \end{macro}
@@ -29901,10 +30428,10 @@ rowspan="#2" %
% \changes{v0.58}{2018/06/07}{Improved print/\HTML\ output selection.}
% \begin{macrocode}
\NewDocumentCommand{\LWR@HTML@ref}{s m}{%
-\LWR@traceinfo{LWR@HTML@ref !#2!}%
-\IfBooleanTF{#1}%
-{\LWR@print@ref{#2}}%
-{\LWR@subnewref{#2}{#2}}%
+ \LWR@traceinfo{LWR@HTML@ref !#2!}%
+ \IfBooleanTF{#1}%
+ {\LWR@print@ref{#2}}%
+ {\LWR@subnewref{#2}{#2}}%
}
\LWR@formatted{ref}
@@ -29942,9 +30469,9 @@ rowspan="#2" %
%
% \begin{macrocode}
\NewDocumentCommand{\LWR@new@pageref}{s m}{%
-\IfBooleanTF{#1}%
-{(\pagerefPageFor\LWR@print@ref{#2})}%
-{(\cpageref{#2})}%
+ \IfBooleanTF{#1}%
+ {(\pagerefPageFor\LWR@print@ref{#2})}%
+ {(\cpageref{#2})}%
}
% \end{macrocode}
% \end{macro}
@@ -29955,13 +30482,13 @@ rowspan="#2" %
% \changes{v0.43}{2017/10/31}{Made robust.}
% \begin{macrocode}
\newrobustcmd*{\nameref}[1]{%
-\LWR@traceinfo{nameref}%
-\LWR@startref{#1}%
-\LWR@traceinfo{nameref B}%
-\LWR@nameref{#1}%
-\LWR@traceinfo{nameref C}%
-\LWR@htmltag{/a}%
-\LWR@traceinfo{nameref: done}%
+ \LWR@traceinfo{nameref}%
+ \LWR@startref{#1}%
+ \LWR@traceinfo{nameref B}%
+ \LWR@nameref{#1}%
+ \LWR@traceinfo{nameref C}%
+ \LWR@htmltag{/a}%
+ \LWR@traceinfo{nameref: done}%
}
% \end{macrocode}
% \end{macro}
@@ -30005,9 +30532,11 @@ rowspan="#2" %
% \changes{v0.45}{2018/01/14}{Added.}
% \begin{macrocode}
\AtBeginDocument{
+
\def\@currentHref{%
-autopage-\theLWR@currentautosec%
+ autopage-\theLWR@currentautosec%
}
+
}
% \end{macrocode}
% \end{macro}
@@ -30288,21 +30817,21 @@ autopage-\theLWR@currentautosec%
%
% \begin{macrocode}
\NewDocumentCommand{\LWR@floatbegin}{m o}{%
-\ifbool{FormatWP}{\newline}{}%
-\LWR@stoppars
+ \ifbool{FormatWP}{\newline}{}%
+ \LWR@stoppars%
% \end{macrocode}
% There is a new float, so increment the unique float counter:
% \begin{macrocode}
-\addtocounter{LWR@thisautoid}{1}%
-\booltrue{LWR@freezethisautoid}%
+ \addtocounter{LWR@thisautoid}{1}%
+ \booltrue{LWR@freezethisautoid}%
% \end{macrocode}
%
% \begin{macrocode}
-\begingroup%
+ \begingroup%
% \end{macrocode}
% Settings while inside the environment:
% \begin{macrocode}
-\LWR@print@raggedright%
+ \LWR@print@raggedright%
% \end{macrocode}
% Open an \HTML\ |figure| tag.
% The figure is assigned a \attribute{class} equal to its type,
@@ -30313,34 +30842,34 @@ autopage-\theLWR@currentautosec%
% \changes{v0.47}{2018/01/26}{Fix: Line wrap at \HTML\ hyphen.}
% \changes{v0.56}{2018/05/14}{Adds a \element{class} per \pkg{float} package style.}
% \begin{macrocode}
-\LWR@htmltag{%
- figure id="\LWR@print@mbox{autoid-\arabic{LWR@thisautoid}}" % space
- class="#1 \@nameuse{LWR@floatstyle@#1}"%
-}%
-\ifbool{FormatWP}{%
- \LWR@orignewline%
- \LWR@BlockClassWP{}{}{wp#1}%
-}{}%
+ \LWR@htmltag{%
+ figure id="\LWR@print@mbox{autoid-\arabic{LWR@thisautoid}}" % space
+ class="#1 \@nameuse{LWR@floatstyle@#1}"%
+ }%
+ \ifbool{FormatWP}{%
+ \LWR@orignewline%
+ \LWR@BlockClassWP{}{}{wp#1}%
+ }{}%
% \end{macrocode}
% Update the caption type:
% \begin{macrocode}
-\renewcommand*{\@captype}{#1}%
-\caption@settype{#1}%
+ \renewcommand*{\@captype}{#1}%
+ \caption@settype{#1}%
% \end{macrocode}
% Mark the float for a word processor conversion:
% \begin{macrocode}
-\LWR@startpars%
-\ifboolexpr{bool{FormatWP} and bool{WPMarkFloats}}{%
+ \LWR@startpars%
+ \ifboolexpr{bool{FormatWP} and bool{WPMarkFloats}}{%
-=== begin #1 ===
+ === begin #1 ===
-}{}%
+ }{}%
% \end{macrocode}
% Look for \cs{centering}, etc:
% \changes{v0.54}{2018/04/19}{Honor \cs{centering}, etc. in floats.}
% \changes{v0.55}{2018/04/24}{Fix: Float optional args.}
% \begin{macrocode}
-\LWR@futurenonspacelet\LWR@mynexttoken\LWR@floatalignment%
+ \LWR@futurenonspacelet\LWR@mynexttoken\LWR@floatalignment%
}
% \end{macrocode}
% \end{macro}
@@ -30349,12 +30878,16 @@ autopage-\theLWR@currentautosec%
% \changes{v0.55}{2018/04/25}{Fix: \cs{centering}, etc. for \pkg{koma-script}.}
% \begin{macrocode}
\AtBeginDocument{
+
\@ifpackageloaded{tocbasic}{
+
\appto\figure@atbegin{%
-\LWR@futurenonspacelet\LWR@mynexttoken\LWR@floatalignment%
-}
-}{}
+ \LWR@futurenonspacelet\LWR@mynexttoken\LWR@floatalignment%
}
+
+}{}% tocbasic
+
+}% AtBeginDocument
% \end{macrocode}
%
%
@@ -30378,26 +30911,26 @@ autopage-\theLWR@currentautosec%
% If saw a \cs{centering}, finish the \env{center} environment:
% \changes{v0.54}{2018/04/19}{Honor \cs{centering}, etc. in floats.}
% \begin{macrocode}
-\LWR@endfloatalignment%
+ \LWR@endfloatalignment%
% \end{macrocode}
% Mark the float end for a word processor conversion:
% \begin{macrocode}
-\ifboolexpr{bool{FormatWP} and bool{WPMarkFloats}}{%
+ \ifboolexpr{bool{FormatWP} and bool{WPMarkFloats}}{%
-=== end ===
+ === end ===
-}{}%
-\LWR@stoppars%
+ }{}%
+ \LWR@stoppars%
% \end{macrocode}
% Close an \HTML\ |figure| tag:
% \changes{v0.42}{2017/10/26}{If \progcode{FormatWP} add a text frame.}
% \begin{macrocode}
-\ifbool{FormatWP}{\endLWR@BlockClassWP}{}%
-\LWR@htmlelementend{figure}%
-\endgroup%
-\boolfalse{LWR@freezethisautoid}%
-\LWR@startpars%
-\ifbool{FormatWP}{\newline}{}%
+ \ifbool{FormatWP}{\endLWR@BlockClassWP}{}%
+ \LWR@htmlelementend{figure}%
+ \endgroup%
+ \boolfalse{LWR@freezethisautoid}%
+ \LWR@startpars%
+ \ifbool{FormatWP}{\newline}{}%
}
% \end{macrocode}
% \end{macro}
@@ -30439,22 +30972,28 @@ autopage-\theLWR@currentautosec%
\boolfalse{LWR@freezethisautoid}
% \end{macrocode}
-% \begin{macro}{\LWR@newautoidanchor}
+% \begin{macro}{\LWR@forcenewautoidanchor}
% Adds a new \element{autoid} anchor.
+% \changes{v0.79}{2019/12/09}{Factored.}
+% \begin{macrocode}
+\newcommand*{\LWR@forcenewautoidanchor}{%
+ \addtocounter{LWR@thisautoid}{1}%
+ \LWR@htmltag{a id="\LWR@print@mbox{autoid-\arabic{LWR@thisautoid}}"}%
+ \LWR@htmltag{/a}%
+}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\LWR@newautoidanchor}
+% Sometimes adds a new \element{autoid} anchor.
% \changes{v0.45}{2017/12/07}{Fix: No anchor if frozen autoid.}
% \changes{v0.47}{2018/01/26}{Fix: Line wrap at \HTML\ hyphen.}
% \changes{v0.51}{2018/03/16}{Fix: No autoid is inside a \env{lateximage}.}
% \begin{macrocode}
\newcommand*{\LWR@newautoidanchor}{%
-\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
-{}%
-{%
- \ifbool{LWR@freezethisautoid}{}{%
- \addtocounter{LWR@thisautoid}{1}%
- \LWR@htmltag{a id="\LWR@print@mbox{autoid-\arabic{LWR@thisautoid}}"}%
- \LWR@htmltag{/a}%
- }%
-}%
+ \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
+ {}%
+ {\ifbool{LWR@freezethisautoid}{}{\LWR@forcenewautoidanchor}}%
}
% \end{macrocode}
% \end{macro}
@@ -30481,18 +31020,18 @@ autopage-\theLWR@currentautosec%
% \changes{v0.54}{2018/04/19}{Honor \cs{centering}, etc. in floats.}
% \begin{macrocode}
\newcommand*{\LWR@floatalignment}{%
-\ifdefstrequal{\LWR@mynexttoken}{\centering}{%
- \center%
- \renewcommand*{\LWR@floatalignmentname}{center}%
-}{}%
-\ifdefstrequal{\LWR@mynexttoken}{\raggedright}{%
- \flushleft%
- \renewcommand*{\LWR@floatalignmentname}{flushleft}%
-}{}%
-\ifdefstrequal{\LWR@mynexttoken}{\raggedleft}{%
- \flushright%
- \renewcommand*{\LWR@floatalignmentname}{flushright}%
-}{}%
+ \ifdefstrequal{\LWR@mynexttoken}{\centering}{%
+ \center%
+ \renewcommand*{\LWR@floatalignmentname}{center}%
+ }{}%
+ \ifdefstrequal{\LWR@mynexttoken}{\raggedright}{%
+ \flushleft%
+ \renewcommand*{\LWR@floatalignmentname}{flushleft}%
+ }{}%
+ \ifdefstrequal{\LWR@mynexttoken}{\raggedleft}{%
+ \flushright%
+ \renewcommand*{\LWR@floatalignmentname}{flushright}%
+ }{}%
}
% \end{macrocode}
% \end{macro}
@@ -30502,8 +31041,10 @@ autopage-\theLWR@currentautosec%
% \changes{v0.54}{2018/04/19}{Honor \cs{centering}, etc. in floats.}
% \begin{macrocode}
\newcommand*{\LWR@endfloatalignment}{%
-\ifdefvoid{\LWR@floatalignmentname}{}{\@nameuse{end\LWR@floatalignmentname}}%
-\renewcommand*{\LWR@floatalignmentname}{}%
+ \ifdefvoid{\LWR@floatalignmentname}%
+ {}%
+ {\@nameuse{end\LWR@floatalignmentname}}%
+ \renewcommand*{\LWR@floatalignmentname}{}%
}
% \end{macrocode}
% \end{macro}
@@ -30594,14 +31135,14 @@ autopage-\theLWR@currentautosec%
% \changes{v0.65}{2018/12/21}{Uses \element{figurecaption} instead of \element{figcaption}.}
% \begin{macrocode}
\newenvironment*{LWR@figcaption}
- {
+ {%
\ifbool{FormatWP}{%
- \BlockClass[font-style:italic]{figurecaption}
+ \BlockClass[font-style:italic]{figurecaption}%
% \LWR@print@vspace*{\baselineskip}
- }{
- \BlockClass{figurecaption}
+ }{%
+ \BlockClass{figurecaption}%
}%
- }
+ }%
{\endBlockClass}
% \end{macrocode}
% \end{environment}
@@ -30618,23 +31159,23 @@ autopage-\theLWR@currentautosec%
% \begin{macrocode}
\newcommand*{\LWR@HTML@caption@begin}[1]
{%
-\LWR@traceinfo{LWR@HTML@caption@begin}%
+ \LWR@traceinfo{LWR@HTML@caption@begin}%
% \end{macrocode}
% Keep par and minipage changes local:
% \begin{macrocode}
-\begingroup%
+ \begingroup%
% \end{macrocode}
% No need for a |minipage| or \cs{parbox} inside the caption:
% \begin{macrocode}
-\RenewDocumentEnvironment{minipage}{O{t} o O{t} m}{}{}%
-\RenewDocumentCommand{\parbox}{O{t} O{} O{t} m +m}{##5}%
+ \RenewDocumentEnvironment{minipage}{O{t} o O{t} m}{}{}%
+ \RenewDocumentCommand{\parbox}{O{t} O{} O{t} m +m}{##5}%
% \end{macrocode}
% Enclose the original caption code inside an \HTML\ tag:
% \begin{macrocode}
-\LWR@figcaption%
-\LWR@traceinfo{LWR@HTML@caption@begin: about to LWR@origcaption@begin}%
-\LWR@print@caption@begin{#1}%
-\LWR@traceinfo{LWR@HTML@caption@begin: done}%
+ \LWR@figcaption%
+ \LWR@traceinfo{LWR@HTML@caption@begin: about to LWR@origcaption@begin}%
+ \LWR@print@caption@begin{#1}%
+ \LWR@traceinfo{LWR@HTML@caption@begin: done}%
}
% \end{macrocode}
% \end{macro}
@@ -30645,15 +31186,15 @@ autopage-\theLWR@currentautosec%
% \begin{macrocode}
\newcommand*{\LWR@HTML@caption@end}
{%
-\LWR@traceinfo{LWR@HTML@caption@end}%
-\LWR@print@caption@end%
+ \LWR@traceinfo{LWR@HTML@caption@end}%
+ \LWR@print@caption@end%
% \end{macrocode}
% Closing tag:
% \begin{macrocode}
-\endLWR@figcaption%
-\endgroup%
-% \leavevmode% avoid bad space factor (0) error
-\LWR@traceinfo{LWR@HTML@caption@end: done}%
+ \endLWR@figcaption%
+ \endgroup%
+ % \leavevmode% avoid bad space factor (0) error
+ \LWR@traceinfo{LWR@HTML@caption@end: done}%
}
% \end{macrocode}
% \end{macro}
@@ -30682,18 +31223,24 @@ autopage-\theLWR@currentautosec%
\let\LWR@origcaptionlistentry\captionlistentry
\renewcommand*{\captionlistentry}{%
-\LWR@ensuredoingapar%
-\LWR@origcaptionlistentry%
+ \LWR@ensuredoingapar%
+ \LWR@origcaptionlistentry%
}
-
+% \end{macrocode}
+%
+% \changes{v0.79}{2019/12/09}{Fix: Duplicate \attribute{auto-id}.}
+% \begin{macrocode}
\def\LWR@LTcaptionlistentry{%
-\LWR@ensuredoingapar%
-\LWR@htmltag{a id="\LWR@print@mbox{autoid-\arabic{LWR@thisautoid}}"}\LWR@htmltag{/a}%
- \bgroup
- \@ifstar{\egroup\LWR@LT@captionlistentry}% gobble *
- {\egroup\LWR@LT@captionlistentry}}%
+ \LWR@ensuredoingapar%
+ \LWR@forcenewautoidanchor%
+ \bgroup
+ \@ifstar{\egroup\LWR@LT@captionlistentry}% gobble *
+ {\egroup\LWR@LT@captionlistentry}%
+}%
+
\def\LWR@LT@captionlistentry#1{%
- \caption@listentry\@firstoftwo[\LTcaptype]{#1}}%
+ \caption@listentry\@firstoftwo[\LTcaptype]{#1}%
+}%
% \end{macrocode}
% \end{macro}
@@ -30710,26 +31257,26 @@ autopage-\theLWR@currentautosec%
\let\LWR@origaddcontentsline\addcontentsline
\renewcommand*{\addcontentsline}[3]{%
-\ifstrequal{#1}{toc}{}{% not TOC
+ \ifstrequal{#1}{toc}{}{% not TOC
% \end{macrocode}
% \changes{v0.51}{2018/03/11}{No anchor ID if inside \SVG\ image.}
% \begin{macrocode}
-\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
- {}%
- {\LWR@newautoidanchor}%
+ \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
+ {}%
+ {\LWR@newautoidanchor}%
% \end{macrocode}
% \changes{v0.51}{2018/03/11}{Add missing support for float mechanism if necessary.}
% \begin{macrocode}
- \ifcsvoid{ext@#2}{\csdef{ext@#2}{#1}}{}%
+ \ifcsvoid{ext@#2}{\csdef{ext@#2}{#1}}{}%
% \end{macrocode}
% \begin{macrocode}
- \addtocontents{\@nameuse{ext@#2}}{%
- \protect\LWRsetnextfloat%
- {\arabic{LWR@latestautopage}}%
- {\arabic{LWR@thisautoid}}%
- }%
-}% not TOC
-\LWR@origaddcontentsline{#1}{#2}{#3}%
+ \addtocontents{\@nameuse{ext@#2}}{%
+ \protect\LWRsetnextfloat%
+ {\arabic{LWR@latestautopage}}%
+ {\arabic{LWR@thisautoid}}%
+ }%
+ }% not TOC
+ \LWR@origaddcontentsline{#1}{#2}{#3}%
}
% \end{macrocode}
% \end{macro}
@@ -30743,13 +31290,15 @@ autopage-\theLWR@currentautosec%
% Patched to handle paragraph tags.
% \begin{macrocode}
\AtBeginDocument{
+
\let\LWR@origcaptionof\captionof
\renewcommand*{\captionof}{%
-\LWR@stoppars%
-\LWR@origcaptionof%
-}
+ \LWR@stoppars%
+ \LWR@origcaptionof%
}
+
+}% AtBeginDocument
% \end{macrocode}
% \end{macro}
@@ -30795,29 +31344,29 @@ autopage-\theLWR@currentautosec%
% the side\TOC\ may be referred to again in each \HTML\ page.
% \begin{macrocode}
\newcommand*{\LWR@myshorttoc}[1]{%
-\LWR@traceinfo{LWR@myshorttoc: #1}%
-\LWR@ensuredoingapar%
+ \LWR@traceinfo{LWR@myshorttoc: #1}%
+ \LWR@ensuredoingapar%
% \end{macrocode}
% Only if the file exists:
% \begin{macrocode}
-\IfFileExists{\jobname.#1}{%
-\LWR@traceinfo{LWR@myshorttoc: loading}%
+ \IfFileExists{\jobname.#1}{%
+ \LWR@traceinfo{LWR@myshorttoc: loading}%
% \end{macrocode}
%
% Many of the commands in the file will have |@| characters in them, so |@|
% \watchout
% must be made a regular letter.
% \begin{macrocode}
-\begingroup%
-\makeatletter%
+ \begingroup%
+ \makeatletter%
% \end{macrocode}
% Read in the \TOC\ file:
% \begin{macrocode}
-\@input{\jobname.#1}%
-\endgroup%
-}%
-{}%
-\LWR@traceinfo{LWR@myshorttoc: done}%
+ \@input{\jobname.#1}%
+ \endgroup%
+ }%
+ {}%
+ \LWR@traceinfo{LWR@myshorttoc: done}%
}
% \end{macrocode}
% \end{macro}
@@ -30831,30 +31380,30 @@ autopage-\theLWR@currentautosec%
% \end{macrocode}
% Closes previous levels:
% \begin{macrocode}
-\@ifundefined{chapter}
-{\LWR@closeprevious{section}}
-{\LWR@closeprevious{chapter}}
+ \@ifundefined{chapter}%
+ {\LWR@closeprevious{section}}%
+ {\LWR@closeprevious{chapter}}%
% \end{macrocode}
% Prints any pending footnotes so that they appear above the potentially
% large \TOC:
% \begin{macrocode}
-\LWR@printpendingfootnotes
+ \LWR@printpendingfootnotes%
% \end{macrocode}
% Place the list into its own chapter (if defined) or section:
% \begin{macrocode}
-\@ifundefined{chapter}{\section*{#2}}{\chapter*{#2}}
+ \@ifundefined{chapter}{\section*{#2}}{\chapter*{#2}}%
% \end{macrocode}
% Create a new \HTML\ |nav| containing the \TOC/\LOF/\LOT:
% \begin{macrocode}
-\LWR@htmlelementclass{nav}{#1}
+ \LWR@htmlelementclass{nav}{#1}%
% \end{macrocode}
% Create the actual list:
% \begin{macrocode}
-\LWR@myshorttoc{#1}
+ \LWR@myshorttoc{#1}%
% \end{macrocode}
% Close the |nav|:
% \begin{macrocode}
-\LWR@htmlelementclassend{nav}{#1}
+ \LWR@htmlelementclassend{nav}{#1}%
}
% \end{macrocode}
% \end{macro}
@@ -30866,9 +31415,9 @@ autopage-\theLWR@currentautosec%
\let\LWR@orig@starttoc\@starttoc
\renewcommand{\@starttoc}[1]{
-\LWR@htmlelementclass{nav}{#1}
-\LWR@orig@starttoc{#1}
-\LWR@htmlelementclassend{nav}{#1}
+ \LWR@htmlelementclass{nav}{#1}%
+ \LWR@orig@starttoc{#1}%
+ \LWR@htmlelementclassend{nav}{#1}%
}
% \end{macrocode}
% \end{macro}
@@ -30895,6 +31444,7 @@ autopage-\theLWR@currentautosec%
% \changes{v0.45}{2017/12/09}{Fix: Empty sidetoc.}
% \begin{macrocode}
\AtBeginDocument{
+
\let\LWR@origtableofcontents\tableofcontents
\renewcommand*{\tableofcontents}{%
@@ -30903,24 +31453,25 @@ autopage-\theLWR@currentautosec%
% which will presumably auto-generate its own updated table of contents:
% \changes{v0.42}{2017/10/18}{Added boolean \progcode{WPMarkTOC}.}
% \begin{macrocode}
-\ifboolexpr{bool{FormatWP} and bool{WPMarkTOC}}{
+ \ifboolexpr{bool{FormatWP} and bool{WPMarkTOC}}{
-=== table of contents ===
+ === table of contents ===
-}
-{
+ }
+ {
% \end{macrocode}
% Copy the |.toc| file to |.sidetoc| for printing the side\TOC.
% The original |.toc| file is renewed when \cs{tableofcontents} is finished.
% \begin{macrocode}
- \ifbool{LWR@copiedsidetoc}{}{%
- \LWR@copyfile{\jobname.toc}{\jobname.sidetoc}%
- \booltrue{LWR@copiedsidetoc}%
- }%
- \LWR@printpendingfootnotes
- \LWR@origtableofcontents
-}
+ \ifbool{LWR@copiedsidetoc}{}{%
+ \LWR@copyfile{\jobname.toc}{\jobname.sidetoc}%
+ \booltrue{LWR@copiedsidetoc}%
+ }%
+ \LWR@printpendingfootnotes
+ \LWR@origtableofcontents
+ }
}% \tableofcontents
+
}% AtBeginDocument
% \end{macrocode}
% \end{macro}
@@ -30931,15 +31482,15 @@ autopage-\theLWR@currentautosec%
\let\LWR@origlistoffigures\listoffigures
\renewcommand*{\listoffigures}{
-\ifboolexpr{bool{FormatWP} and bool{WPMarkLOFT}}{
+ \ifboolexpr{bool{FormatWP} and bool{WPMarkLOFT}}{
-=== list of figures ===
+ === list of figures ===
-}
-{
- \LWR@printpendingfootnotes
- \LWR@origlistoffigures
-}
+ }
+ {
+ \LWR@printpendingfootnotes
+ \LWR@origlistoffigures
+ }
}
% \end{macrocode}
% \end{macro}
@@ -30950,15 +31501,15 @@ autopage-\theLWR@currentautosec%
\let\LWR@origlistoftables\listoftables
\renewcommand*{\listoftables}{
-\ifboolexpr{bool{FormatWP} and bool{WPMarkLOFT}}{
+ \ifboolexpr{bool{FormatWP} and bool{WPMarkLOFT}}{
-=== list of tables ===
+ === list of tables ===
-}
-{
- \LWR@printpendingfootnotes
- \LWR@origlistoftables
-}
+ }
+ {
+ \LWR@printpendingfootnotes
+ \LWR@origlistoftables
+ }
}
% \end{macrocode}
% \end{macro}
@@ -30977,13 +31528,13 @@ autopage-\theLWR@currentautosec%
% \changes{v0.61}{2018/09/26}{Fix: \pkg{newfloat} lists.}
% \begin{macrocode}
\NewDocumentCommand{\listof}{m +m}{%
-\@ifundefined{l@#1}{%
- \csdef{l@#1}##1##2{\hypertocfloat{1}{#1}{\@nameuse{ext@#1}}{##1}{##2}}%
-}{}%
-\LWR@subtableofcontents{\@nameuse{ext@#1}}{#2}
-\expandafter\newwrite\csname tf@\csname ext@#1\endcsname\endcsname
-\immediate\openout \csname tf@\csname ext@#1\endcsname\endcsname
- \jobname.\@nameuse{ext@#1}\relax
+ \@ifundefined{l@#1}{%
+ \csdef{l@#1}##1##2{\hypertocfloat{1}{#1}{\@nameuse{ext@#1}}{##1}{##2}}%
+ }{}%
+ \LWR@subtableofcontents{\@nameuse{ext@#1}}{#2}%
+ \expandafter\newwrite\csname tf@\csname ext@#1\endcsname\endcsname%
+ \immediate\openout \csname tf@\csname ext@#1\endcsname\endcsname%
+ \jobname.\@nameuse{ext@#1}\relax%
}
% \end{macrocode}
% \end{macro}
@@ -31058,36 +31609,36 @@ autopage-\theLWR@currentautosec%
% \begin{macro}{\LWR@sidetoc}
% Creates the actual side-TOC.
% \begin{macrocode}
-\newcommand*{\LWR@sidetoc}{
-\LWR@forcenewpage
-\LWR@stoppars
+\newcommand*{\LWR@sidetoc}{%
+ \LWR@forcenewpage
+ \LWR@stoppars
% \end{macrocode}
% The entire side\TOC\ is placed into a |nav| of class |sidetoc|.
% \begin{macrocode}
-\LWR@htmlelementclass{div}{sidetoccontainer}
-\LWR@htmlelementclass{nav}{sidetoc}
+ \LWR@htmlelementclass{div}{sidetoccontainer}
+ \LWR@htmlelementclass{nav}{sidetoc}
-\setcounter{tocdepth}{\value{SideTOCDepth}}
+ \setcounter{tocdepth}{\value{SideTOCDepth}}
% \end{macrocode}
% The title is placed into a \element{div} of class \attribute{sidetoctitle}, and may
% contain paragraphs.
% \begin{macrocode}
-\begin{BlockClass}{sidetoctitle}
-\ifcsvoid{thetitle}{}{\InlineClass{sidetocthetitle}{\thetitle}\par}
-\sidetocname
-\end{BlockClass}
+ \begin{BlockClass}{sidetoctitle}
+ \ifcsvoid{thetitle}{}{\InlineClass{sidetocthetitle}{\thetitle}\par}
+ \sidetocname
+ \end{BlockClass}
% \end{macrocode}
% The table of contents is placed into a \element{div} of class \attribute{sidetoccontents}.
% \begin{macrocode}
-\begin{BlockClass}{sidetoccontents}
-\LinkHome
+ \begin{BlockClass}{sidetoccontents}
+ \LinkHome
-\LWR@myshorttoc{sidetoc}
-\end{BlockClass}
-\LWR@htmlelementclassend{nav}{sidetoc}
-\LWR@htmlelementclassend{div}{sidetoccontainer}
+ \LWR@myshorttoc{sidetoc}
+ \end{BlockClass}
+ \LWR@htmlelementclassend{nav}{sidetoc}
+ \LWR@htmlelementclassend{div}{sidetoccontainer}
}
% \end{macrocode}
% \end{macro}
@@ -31107,7 +31658,7 @@ autopage-\theLWR@currentautosec%
%
% \begin{macrocode}
\newcommand*{\LWR@numberline}[1]{%
-\LWR@sectionnumber{#1}\quad%
+ \LWR@sectionnumber{#1}\quad%
}
\LetLtxMacro\numberline\LWR@numberline
@@ -31135,13 +31686,13 @@ autopage-\theLWR@currentautosec%
% \end{description}
% \begin{macrocode}
\NewDocumentCommand{\hypertoc}{m m +m m}{%
-\LWR@traceinfo{hypertoc !#1!#2!#3!#4!}%
+ \LWR@traceinfo{hypertoc !#1!#2!#3!#4!}%
% \end{macrocode}
% Respond to |tocdepth|:
% \begin{macrocode}
-\ifthenelse{\cnttest{#1}{<=}{\value{tocdepth}}}%
- {%
- \LWR@startpars%
+ \ifthenelse{\cnttest{#1}{<=}{\value{tocdepth}}}%
+ {%
+ \LWR@startpars%
% \end{macrocode}
%
% Create an \HTML\ link to |<filename>#autosec-(page)|, with the name,
@@ -31152,20 +31703,20 @@ autopage-\theLWR@currentautosec%
% \changes{v0.47}{2018/01/26}{Fix: Line wrap at \HTML\ hyphen.}
% \changes{v0.72}{2019/06/05}{Fix: References for \pkg{xr}, \pkg{xr-hyper}.}
% \begin{macrocode}
- \LWR@subhyperrefclass{%
- \LWR@htmlrefsectionfilename{\BaseJobname-autopage-#4}%
- \LWR@origpound\LWR@print@mbox{autosec-#4}%
- }{#3}{toc#2}%
+ \LWR@subhyperrefclass{%
+ \LWR@htmlrefsectionfilename{\BaseJobname-autopage-#4}%
+ \LWR@origpound\LWR@print@mbox{autosec-#4}%
+ }{#3}{toc#2}%
% \end{macrocode}
% \changes{v0.69}{2019/03/21}{Added support for \pkg{tocdata}.}
% \begin{macrocode}
- \LWR@maybetocdata%
+ \LWR@maybetocdata%
% \end{macrocode}
% \begin{macrocode}
- \LWR@stoppars%
- }%
- {}%
-\LWR@traceinfo{hypertoc done}%
+ \LWR@stoppars%
+ }%
+ {}%
+ \LWR@traceinfo{hypertoc done}%
}
% \end{macrocode}
% \end{macro}
@@ -31173,16 +31724,16 @@ autopage-\theLWR@currentautosec%
% \DescribeCounter{lofdepth} \TOC\ depth for figures.
% \begin{macrocode}
\@ifclassloaded{memoir}{}{
-\newcounter{lofdepth}
-\setcounter{lofdepth}{1}
+ \newcounter{lofdepth}
+ \setcounter{lofdepth}{1}
}
% \end{macrocode}
% \DescribeCounter{lotdepth} \TOC\ depth for tables.
% \begin{macrocode}
\@ifclassloaded{memoir}{}{
-\newcounter{lotdepth}
-\setcounter{lotdepth}{1}
+ \newcounter{lotdepth}
+ \setcounter{lotdepth}{1}
}
% \end{macrocode}
@@ -31202,22 +31753,22 @@ autopage-\theLWR@currentautosec%
%
% \begin{macrocode}
\newcommand{\hypertocfloat}[5]{%
-\LWR@startpars
+ \LWR@startpars%
% \end{macrocode}
% If some float-creation package has not yet defined
% the float type's |lofdepth| counter, etc, define it here:
% \begin{macrocode}
-\@ifundefined{c@#3depth}{%
-\newcounter{#3depth}%
-\setcounter{#3depth}{1}%
-}{}%
+ \@ifundefined{c@#3depth}{%
+ \newcounter{#3depth}%
+ \setcounter{#3depth}{1}%
+ }{}%
% \end{macrocode}
% Respond to |lofdepth|, etc.:
% \begin{macrocode}
-\LWR@traceinfo{hypertocfloat depth is #1 #3depth is \arabic{#3depth}}%
-\ifthenelse{\cnttest{#1}{<=}{\arabic{#3depth}}}%
- {%
- \LWR@startpars%
+ \LWR@traceinfo{hypertocfloat depth is #1 #3depth is \arabic{#3depth}}%
+ \ifthenelse{\cnttest{#1}{<=}{\arabic{#3depth}}}%
+ {%
+ \LWR@startpars%
% \end{macrocode}
%
% Create an \HTML\ link to
@@ -31229,21 +31780,21 @@ autopage-\theLWR@currentautosec%
% \changes{v0.47}{2018/01/26}{Fix: Line wrap at \HTML\ hyphen.}
% \changes{v0.72}{2019/06/05}{Fix: References for \pkg{xr}, \pkg{xr-hyper}.}
% \begin{macrocode}
- \LWR@subhyperrefclass{%
- \LWR@htmlrefsectionfilename{%
- \BaseJobname-autopage-\arabic{LWR@nextautopage}%
- }%
- \LWR@origpound\LWR@print@mbox{autoid-\arabic{LWR@nextautoid}}}%
- {#4}{toc#2}%
+ \LWR@subhyperrefclass{%
+ \LWR@htmlrefsectionfilename{%
+ \BaseJobname-autopage-\arabic{LWR@nextautopage}%
+ }%
+ \LWR@origpound\LWR@print@mbox{autoid-\arabic{LWR@nextautoid}}}%
+ {#4}{toc#2}%
% \end{macrocode}
% \changes{v0.69}{2019/03/21}{Added support for \pkg{tocdata}.}
% \begin{macrocode}
- \LWR@maybetocdata%
+ \LWR@maybetocdata%
% \end{macrocode}
% \begin{macrocode}
- \LWR@stoppars%
- }%
- {}%
+ \LWR@stoppars%
+ }%
+ {}%
}
% \end{macrocode}
% \end{macro}
@@ -31363,16 +31914,19 @@ autopage-\theLWR@currentautosec%
% \begin{environment}{theindex}
% \begin{macrocode}
\@ifundefined{chapter}
-{\newcommand*{\LWR@indexsection}[1]{\section*{#1}}}
-{\newcommand*{\LWR@indexsection}[1]{\chapter*{#1}}}
+ {\newcommand*{\LWR@indexsection}[1]{\section*{#1}}}
+ {\newcommand*{\LWR@indexsection}[1]{\chapter*{#1}}}
+
\AtBeginDocument{
+
\renewenvironment*{theindex}{%
\LWR@indexsection{\indexname}%
\let\item\LWR@indexitem%
\let\subitem\LWR@indexsubitem%
\let\subsubitem\LWR@indexsubsubitem%
}{}
+
}% AtBeginDocument
% \end{macrocode}
% \end{environment}
@@ -31386,7 +31940,7 @@ autopage-\theLWR@currentautosec%
% \begin{macrocode}
\newcommand{\LWR@indexitem}[1][\@empty]{
-\InlineClass{indexitem}{\LWR@htmlcomment{}}#1%
+ \InlineClass{indexitem}{\LWR@htmlcomment{}}#1%
}
% \end{macrocode}
% \end{macro}
@@ -31396,7 +31950,7 @@ autopage-\theLWR@currentautosec%
% \begin{macrocode}
\newcommand{\LWR@indexsubitem}{
-\InlineClass{indexsubitem}{\LWR@htmlcomment{}}
+ \InlineClass{indexsubitem}{\LWR@htmlcomment{}}%
}
% \end{macrocode}
% \end{macro}
@@ -31406,7 +31960,7 @@ autopage-\theLWR@currentautosec%
% \begin{macrocode}
\newcommand{\LWR@indexsubsubitem}{
-\InlineClass{indexsubsubitem}{\LWR@htmlcomment{}}
+ \InlineClass{indexsubsubitem}{\LWR@htmlcomment{}}%
}
% \end{macrocode}
% \end{macro}
@@ -31417,12 +31971,13 @@ autopage-\theLWR@currentautosec%
% \changes{v0.28}{2017/04/13}{Improved indexing.}
% \begin{macrocode}
\def\LWR@wrindex#1{%
-\addtocounter{LWR@autoindex}{1}%
-\LWR@new@label{LWRindex-\arabic{LWR@autoindex}}%
-\protected@write\@indexfile{}%
-{\string\indexentry{#1}{\arabic{LWR@autoindex}}}%
-\endgroup
-\@esphack}
+ \addtocounter{LWR@autoindex}{1}%
+ \LWR@new@label{LWRindex-\arabic{LWR@autoindex}}%
+ \protected@write\@indexfile{}%
+ {\string\indexentry{#1}{\arabic{LWR@autoindex}}}%
+ \endgroup%
+ \@esphack%
+}
\AtBeginDocument{
\let\@wrindex\LWR@wrindex
@@ -31435,12 +31990,13 @@ autopage-\theLWR@currentautosec%
% Redefined to write the |LWR@latestautopage| counter instead of |page|.
% \begin{macrocode}
\def\@wrglossary#1{%
-\addtocounter{LWR@autoglossary}{1}%
-\LWR@new@label{LWRglossary-\theLWR@autoglossary}%
-\protected@write\@glossaryfile{}%
-{\string\glossaryentry{#1}{\theLWR@autoglossary}}%
-\endgroup
-\@esphack}
+ \addtocounter{LWR@autoglossary}{1}%
+ \LWR@new@label{LWRglossary-\theLWR@autoglossary}%
+ \protected@write\@glossaryfile{}%
+ {\string\glossaryentry{#1}{\theLWR@autoglossary}}%
+ \endgroup%
+ \@esphack%
+}
% \end{macrocode}
% \end{macro}
@@ -31460,9 +32016,9 @@ autopage-\theLWR@currentautosec%
% \changes{v0.58}{2018/06/17}{Adds support for \cs{see}, \cs{seealso}, \cs{emph}, \cs{textbf}, etc.}
% \begin{macrocode}
\newrobustcmd{\LWR@doindexentry}[1]{%
-\IfInteger{#1}%
- {\LWR@indexnameref{#1}}%
- {#1}%
+ \IfInteger{#1}%
+ {\LWR@indexnameref{#1}}%
+ {#1}%
}
% \end{macrocode}
% \end{macro}
@@ -31484,19 +32040,19 @@ autopage-\theLWR@currentautosec%
% \changes{v0.65}{2018/12/09}{Added \cs{textsi}.}
% \begin{macrocode}
\newcommand{\LWR@hyperindexrefnullified}{%
-\renewrobustcmd{\emph}[1]{\LWR@HTML@emph{\LWR@doindexentry{##1}}}%
-\renewrobustcmd{\textbf}[1]{\LWR@HTML@textbf{\LWR@doindexentry{##1}}}%
-\renewrobustcmd{\texteb}[1]{\LWR@HTML@texteb{\LWR@doindexentry{##1}}}%
-\renewrobustcmd{\textlg}[1]{\LWR@HTML@textlg{\LWR@doindexentry{##1}}}%
-\renewrobustcmd{\textrm}[1]{\LWR@HTML@textrm{\LWR@doindexentry{##1}}}%
-\renewrobustcmd{\textsf}[1]{\LWR@HTML@textsf{\LWR@doindexentry{##1}}}%
-\renewrobustcmd{\texttt}[1]{\LWR@HTML@texttt{\LWR@doindexentry{##1}}}%
-\renewrobustcmd{\textup}[1]{\LWR@HTML@textup{\LWR@doindexentry{##1}}}%
-\renewrobustcmd{\textsc}[1]{\LWR@HTML@textsc{\LWR@doindexentry{##1}}}%
-\renewrobustcmd{\textulc}[1]{\LWR@HTML@textulc{\LWR@doindexentry{##1}}}%
-\renewrobustcmd{\textsi}[1]{\LWR@HTML@textsi{\LWR@doindexentry{##1}}}%
-\renewrobustcmd{\textit}[1]{\LWR@HTML@textit{\LWR@doindexentry{##1}}}%
-\renewrobustcmd{\textsl}[1]{\LWR@HTML@textsl{\LWR@doindexentry{##1}}}%
+ \renewrobustcmd{\emph}[1]{\LWR@HTML@emph{\LWR@doindexentry{##1}}}%
+ \renewrobustcmd{\textbf}[1]{\LWR@HTML@textbf{\LWR@doindexentry{##1}}}%
+ \renewrobustcmd{\texteb}[1]{\LWR@HTML@texteb{\LWR@doindexentry{##1}}}%
+ \renewrobustcmd{\textlg}[1]{\LWR@HTML@textlg{\LWR@doindexentry{##1}}}%
+ \renewrobustcmd{\textrm}[1]{\LWR@HTML@textrm{\LWR@doindexentry{##1}}}%
+ \renewrobustcmd{\textsf}[1]{\LWR@HTML@textsf{\LWR@doindexentry{##1}}}%
+ \renewrobustcmd{\texttt}[1]{\LWR@HTML@texttt{\LWR@doindexentry{##1}}}%
+ \renewrobustcmd{\textup}[1]{\LWR@HTML@textup{\LWR@doindexentry{##1}}}%
+ \renewrobustcmd{\textsc}[1]{\LWR@HTML@textsc{\LWR@doindexentry{##1}}}%
+ \renewrobustcmd{\textulc}[1]{\LWR@HTML@textulc{\LWR@doindexentry{##1}}}%
+ \renewrobustcmd{\textsi}[1]{\LWR@HTML@textsi{\LWR@doindexentry{##1}}}%
+ \renewrobustcmd{\textit}[1]{\LWR@HTML@textit{\LWR@doindexentry{##1}}}%
+ \renewrobustcmd{\textsl}[1]{\LWR@HTML@textsl{\LWR@doindexentry{##1}}}%
}
% \end{macrocode}
% \end{macro}
@@ -31521,24 +32077,24 @@ autopage-\theLWR@currentautosec%
% If the first character is a space, remove it first.
% ^^A Or use the trimspaces package.
% \begin{macrocode}
-\def\LWR@tempone{#1}%
-\IfBeginWith{\LWR@tempone}{ }{%
- \StrGobbleLeft{\LWR@tempone}{1}[\LWR@tempone]%
-}{}%
+ \def\LWR@tempone{#1}%
+ \IfBeginWith{\LWR@tempone}{ }{%
+ \StrGobbleLeft{\LWR@tempone}{1}[\LWR@tempone]%
+ }{}%
% \end{macrocode}
% If a numeric entry, create a link.
% If not numeric, such as \cs{see}, use the entry as-is.
% \cs{emph}, \cs{textit}, etc. have been redefined above to create and
% format the entry.
% \begin{macrocode}
-\IfInteger{\LWR@tempone}%
- {\LWR@indexnameref{\LWR@tempone}}%
- {%
- \begingroup%
- \LWR@hyperindexrefnullified
- #1%
- \endgroup%
- }%
+ \IfInteger{\LWR@tempone}%
+ {\LWR@indexnameref{\LWR@tempone}}%
+ {%
+ \begingroup%
+ \LWR@hyperindexrefnullified%
+ #1%
+ \endgroup%
+ }%
}
% \end{macrocode}
% \end{macro}
@@ -31625,7 +32181,9 @@ autopage-\theLWR@currentautosec%
% \changes{v0.45}{2018/01/13}{Patched to emphasize titles.}
% \begin{macrocode}
\AtBeginDocument{
+
\AtBeginEnvironment{thebibliography}{
+
\providecommand*{\LWR@newem}[1]{\textit{#1}}
\renewrobustcmd{\em}{%
@@ -31640,7 +32198,9 @@ autopage-\theLWR@currentautosec%
\endgroup
\LWR@em@after\egroup
}
+
}% \AtBeginEnvironment{thebibliography}
+
}% \AtBeginDocument
% \end{macrocode}
% \end{environment}
@@ -31683,82 +32243,82 @@ autopage-\theLWR@currentautosec%
% \begin{macrocode}
\newcommand*{\LWR@restoreorigformatting}{%
-\LWR@traceinfo{LWR@restoreorigformatting}%
+ \LWR@traceinfo{LWR@restoreorigformatting}%
% \end{macrocode}
% Numerous macros change their print/\HTML\ meaning depending on \cs{LWR@formatting}:
% \begin{macrocode}
-\renewcommand*{\LWR@formatting}{print}%
-\linespread{1}%
+ \renewcommand*{\LWR@formatting}{print}%
+ \linespread{1}%
% \end{macrocode}
%
% \begin{macrocode}
-\let\par\LWR@origpar%
+ \let\par\LWR@origpar%
% \end{macrocode}
%
% \begin{macrocode}
-\LWR@select@print@hspace%
+ \LWR@select@print@hspace%
% \end{macrocode}
%
% \changes{v0.48}{2018/02/04}{Fix: Spacing in \SVG\ math, \env{lateximage}, \tikz.}
% \begin{macrocode}
-\LetLtxMacro\hfil\LWR@orighfil%
-\let\hss\LWR@orighss%
-\let\llap\LWR@origllap%
-\let\rlap\LWR@origrlap%
-\let\hfilneg\LWR@orighfilneg%
+ \LetLtxMacro\hfil\LWR@orighfil%
+ \let\hss\LWR@orighss%
+ \let\llap\LWR@origllap%
+ \let\rlap\LWR@origrlap%
+ \let\hfilneg\LWR@orighfilneg%
% \end{macrocode}
% \begin{macrocode}
-\let\,\LWR@origcomma% disable HTML short unbreakable space
-\let\thinspace\LWR@origthinspace% disable HTML short unbreakable space
-\let\negthinspace\LWR@orignegthinspace% disable HTML negative short unbreakable space
-\let\textellipsis\LWR@origtextellipsis%
-\let\textless\LWR@origtextless%
-\let\textgreater\LWR@origtextgreater%
+ \let\,\LWR@origcomma% disable HTML short unbreakable space
+ \let\thinspace\LWR@origthinspace% disable HTML short unbreakable space
+ \let\negthinspace\LWR@orignegthinspace% disable HTML negative short unbreakable space
+ \let\textellipsis\LWR@origtextellipsis%
+ \let\textless\LWR@origtextless%
+ \let\textgreater\LWR@origtextgreater%
% \end{macrocode}
% \changes{v0.70}{2019/03/28}{Fix: \cs{\&} in a lateximage.}
% \begin{macrocode}
-\let\&\LWR@origampersand%
+ \let\&\LWR@origampersand%
% \end{macrocode}
% \changes{v0.72}{2019/05/24}{Use \cs{LWR@formatted} for \cs{bfseries}, etc.}
% \begin{macrocode}
-\LetLtxMacro\em\LWR@origem%
-\LetLtxMacro\normalfont\LWR@orignormalfont%
-\let\sp\LWR@origsp%
-\let\sb\LWR@origsb%
-\LetLtxMacro\textsuperscript\LWR@origtextsuperscript%
-\LetLtxMacro\@textsuperscript\LWR@orig@textsuperscript%
-\LetLtxMacro\textsubscript\LWR@origtextsubscript%
-\LetLtxMacro\@textsubscript\LWR@orig@textsubscript%
-\LetLtxMacro\underline\LWR@origunderline%
-\let~\LWR@origtilde%
-\let\enskip\LWR@origenskip%
-\let\quad\LWR@origquad%
-\let\qquad\LWR@origqquad%
+ \LetLtxMacro\em\LWR@origem%
+ \LetLtxMacro\normalfont\LWR@orignormalfont%
+ \let\sp\LWR@origsp%
+ \let\sb\LWR@origsb%
+ \LetLtxMacro\textsuperscript\LWR@origtextsuperscript%
+ \LetLtxMacro\@textsuperscript\LWR@orig@textsuperscript%
+ \LetLtxMacro\textsubscript\LWR@origtextsubscript%
+ \LetLtxMacro\@textsubscript\LWR@orig@textsubscript%
+ \LetLtxMacro\underline\LWR@origunderline%
+ \let~\LWR@origtilde%
+ \let\enskip\LWR@origenskip%
+ \let\quad\LWR@origquad%
+ \let\qquad\LWR@origqquad%
% \end{macrocode}
%
% \cs{endtabular} must be restored to its original,
% instead of relying on \pkg{lwarp}'s \cs{LWR@formatted} mechanism:
% \changes{v0.65}{2018/12/16}{Fix: \env{tabular*}.}
% \begin{macrocode}
-\LetLtxMacro\endtabular\LWR@origendtabular%
-\csletcs{endtabular*}{LWR@origendtabular*}%
+ \LetLtxMacro\endtabular\LWR@origendtabular%
+ \csletcs{endtabular*}{LWR@origendtabular*}%
% \end{macrocode}
% \begin{macrocode}
-\LetLtxMacro\noalign\LWR@orignoalign%
-\LetLtxMacro\hline\LWR@orighline%
+ \LetLtxMacro\noalign\LWR@orignoalign%
+ \LetLtxMacro\hline\LWR@orighline%
% \end{macrocode}
% \begin{macrocode}
-\let\newline\LWR@orignewline%
-\LetLtxMacro\includegraphics\LWR@origincludegraphics%
+ \let\newline\LWR@orignewline%
+ \LetLtxMacro\includegraphics\LWR@origincludegraphics%
% \end{macrocode}
% \changes{v0.42}{2017/10/16}{Improved \cs{ensuremath}.}
% \begin{macrocode}
-\LetLtxMacro\@ensuredmath\LWR@origensuredmath%
+ \LetLtxMacro\@ensuredmath\LWR@origensuredmath%
%
-\LWR@restoreorigaccents%
-\LWR@restoreoriglists%
+ \LWR@restoreorigaccents%
+ \LWR@restoreoriglists%
%
-\LWR@FBcancel%
+ \LWR@FBcancel%
}
% \end{macrocode}
% \end{macro}
@@ -31776,19 +32336,10 @@ autopage-\theLWR@currentautosec%
%
% \subsection{Limitations}
%
-% \limitsmath
+% See \nameref{sec:limitsmath}, \cref{sec:limitsmath}.
%
-% \subsubsection{Catcode changes}
-% \limitsmathcatcode
%
-% \subsubsection{Complicated inline math objects}
-% \limitsmathinline
-%
-% \subsubsection{Complicated display math objects}
%
-% \limitsmathdisplay
-
-
% \subsection{\HTML\ \attribute{alt} tag names}
%
% Redefinable names for the \HTML\ \attribute{alt} tags,
@@ -31801,7 +32352,7 @@ autopage-\theLWR@currentautosec%
% \begin{macro}{\AltTextOpen} The opening part of \HTML\ \attribute{alt} tag for
-% an image. The default is a left parenthesis.
+% an image. The default is a left parenthesis. \\
% \DescribeDefault{(}
% \changes{v0.74}{2019/08/20}{Added.}
% \begin{macrocode}
@@ -31811,7 +32362,7 @@ autopage-\theLWR@currentautosec%
% \begin{macro}{\AltTextClose} The closing part of \HTML\ \attribute{alt} tag for
-% an image. The default is a right parenthesis.
+% an image. The default is a right parenthesis. \\
% \DescribeDefault{(}
% \changes{v0.74}{2019/08/20}{Added.}
% \begin{macrocode}
@@ -31976,9 +32527,9 @@ autopage-\theLWR@currentautosec%
\let\LWR@origtextdollar\$
\renewcommand*{\$}{%
-\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
-{\LWR@origtextdollar}%
-{\HTMLunicode{00024}}%
+ \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
+ {\LWR@origtextdollar}%
+ {\HTMLunicode{00024}}%
}
% \end{macrocode}
@@ -32058,86 +32609,39 @@ autopage-\theLWR@currentautosec%
% \end{macro}
-% \begin{macro}{\LWR@subsingledollar} * \marg{2: alt text} \marg{3: add'l hashing}
-% \marg{4: math expression}
-%
-% For inline math.
-% Uses MathJax, or for \SVG\ math the image is measured and ajusted to the baseline
-% of the \HTML\ output, and placed inside a \env{lateximage}.
-%
-% \describehashing
-%
-% \changes{v0.19}{2016/05/25}{\brand{MathJax} support.}
-% \changes{v0.42}{2017/10/26}{If \progcode{FormatWP} print LaTeX expression.}
-% \changes{v0.47}{2018/01/24}{Added \SVG\ math image baseline adjust and em sizing.}
-% \changes{v0.50}{2018/02/23}{Fix: Use \env{lateximage} even if MathJax.}
-% \changes{v0.50}{2018/02/24}{Improved \SVG\ math \attribute{alt} tags.}
+% \DescribeBoolean{LWR@unknownmathsize}
+% If \tikz\ or other objects are used inside math mode, the resulting
+% image may exceed the \TeX\ box, resulting in an incorrect measurement of
+% the size of the resulting image. If this is so, the \HTML\ styles for
+% image size and depth will be neutralized.
% \begin{macrocode}
-\newlength{\LWR@singledollarwidth}
-\newlength{\LWR@singledollarheight}
-\newlength{\LWR@singledollardepth}
+\newbool{LWR@unknownmathsize}
+% \end{macrocode}
-\newsavebox{\LWR@singledollarbox}
-\NewDocumentCommand{\LWR@subsingledollar}{s m m m}{%
-\LWR@traceinfo{LWR@subsingledollar}%
-% \end{macrocode}
-% \begin{macrocode}
-\ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
-{%
-\LWR@traceinfo{LWR@subsingledollar: already in a lateximage}%
- #4% contents
-}%
-{% not in a lateximage
-\begingroup%
-% \end{macrocode}
-% Support for \pkg{xfakebold}:
-% \changes{v0.67}{2019/02/17}{\pkg{xfakebold}: Added support.}
-% \begin{macrocode}
-\LWR@applyxfakebold%
-% \end{macrocode}
-% MathJax cannot parse the often complicated \TeX\ expressions which
-% appear in the various uses of \cs{ensuredmath}.
-% \cs{ensuremath} forces the \attribute{alt} tag to ``|(math image)|'', as
-% translated according to \cs{MathImageAltText}.
-% If this is the case, force the use of a \env{lateximage} even if MathJax.
-% Likewise for \pkg{siunitx} if |parse-numbers=false|.
+% \begin{macro}{\LWR@singledollarmeasure} \marg{math expression}
%
-% If MathJax, or if formatting math for a word processor, and not \cs{ensuredmath},
-% and not a dynamic math expression, print the math expression:
-% \changes{v0.51}{2018/03/11}{Fix: \cs{ensuredmath} inside \SVG\ image.}
-% \changes{v0.57}{2018/05/23}{Fix: Dynamic inline math expressions.}
-% \begin{macrocode}
-\ifboolexpr{%
- (
- bool{mathjax} or
- ( bool{FormatWP} and bool{WPMarkMath} )
- ) and
- ( not test {
- \ifstrequal {#2}
- {\AltTextOpen\MathImageAltText\AltTextClose} % from \ensuredmath
- }
- ) and
- ( not bool{LWR@dynamicmath} )
-}%
-% \end{macrocode}
-% For \brand{MathJax}, print the math between |\(| and |\)|:
-% \begin{macrocode}
-{%
- \LWR@traceinfo{LWR@subsingledollar: Mathjax}%
- {\textbackslash(\LWR@HTMLsanitize{#4}\textbackslash)}%
-}% mathjax
-% \end{macrocode}
-% For SVG, print the math inside a \env{lateximage},
-% with an \element{alt} tag of the \LaTeX\ code,
-% and a \CSS\ style to control the baseline adjustment.
-% \begin{macrocode}
-{% not mathjax
-\LWR@traceinfo{LWR@subsingledollar: NOT mathjax, or is ensuremath, or is dynamic}%
-% \end{macrocode}
-% Measure the depth, width, and height of the math image:
-% \changes{v0.51}{2018/03/04}{Fix: SVG math with enclosed \env{lateximage}.}
+% Measures the size of the image of the math expression.
+%
+% (In some circumstances \SVG\ math is used even if \brand{MathJax} is
+% preferred.)
+%
+% \begin{description}
+% \item [SVG math:] \cs{LWR@origensuredmath} is part of argument \#4.
+% \item [SVG math \cs{ensuremath}:] \cs{LWR@origensuredmath} is part of argument \#4.
+% \item [SVG dynamic math:] \cs{LWR@origensuredmath} is part of argument \#4.
+% \item [Mathjax:] Argument \#4 is the contents of the math expression
+% without \cs{LWR@origensuredmath}. This case is handled above.
+% \item [Mathjax \cs{ensuremath}:] \cs{LWR@origensuredmath} is part of argument \#4.
+% \item [Mathjax dynamic math:] Argument \#4 is the contents of the math expression
+% without \cs{LWR@origensuredmath}, so \cs{LWR@origensuredmath} is added below.\
+% \item [\cs{ifmmode}:] Included ``just in case''.
+% \end{description}
+%
+% Factored from \cs{LWR@subsingledollarsvg}.
+% \changes{v0.79}{2019/12/14}{Factored.}
% \begin{macrocode}
+\newcommand*{\LWR@singledollarmeasure}[1]{%
\begingroup%
% \end{macrocode}
% Temporarily disable formatting while measuring the image parameters:
@@ -32158,34 +32662,28 @@ autopage-\theLWR@currentautosec%
% \begin{macrocode}
\global\advance\c@LWR@lateximagedepth 1\relax%
% \end{macrocode}
-% Typeset and save the contents, depending on how they were generated:
-% \begin{description}
-% \item [SVG math:] \cs{LWR@origensuredmath} is part of argument \#4.
-% \item [SVG math \cs{ensuremath}:] \cs{LWR@origensuredmath} is part of argument \#4.
-% \item [SVG dynamic math:] \cs{LWR@origensuredmath} is part of argument \#4.
-% \item [Mathjax:] Argument \#4 is the contents of the math expression
-% without \cs{LWR@origensuredmath}. This case is handled above.
-% \item [Mathjax \cs{ensuremath}:] \cs{LWR@origensuredmath} is part of argument \#4.
-% \item [Mathjax dynamic math:] Argument \#4 is the contents of the math expression
-% without \cs{LWR@origensuredmath}, so \cs{LWR@origensuredmath} is added below.\
-% \item [\cs{ifmmode}:] Included ``just in case''.
-% \end{description}
+%
+% Typeset the math in a box.
+% While doing so, some macros or environments may set \bool{LWR@unknownmathsize},
+% in which case this will be used to cancel the \HTML\ styles being generated here.
%
% \changes{v0.51}{2018/03/07}{Fix: \env{lateximage} inside \AmS\ \cs{text}.}
% \changes{v0.51}{2018/03/12}{Typeset \SVG\ math only once during measurement.}
% \changes{v0.57}{2018/05/23}{Fix: Dynamic inline math expressions.}
% \begin{macrocode}
+ \boolfalse{LWR@unknownmathsize}%
\ifmmode%
- \global\sbox{\LWR@singledollarbox}{#4}%
+ \global\sbox{\LWR@singledollarbox}{#1}%
\else%
\ifbool{LWR@dynamicmath}{%
\ifbool{mathjax}{%
- \global\sbox{\LWR@singledollarbox}{\LWR@origensuredmath{#4}}%
+ \global\sbox{\LWR@singledollarbox}%
+ {\LWR@origensuredmath{#1}}%
}{%
- \global\sbox{\LWR@singledollarbox}{#4}%
+ \global\sbox{\LWR@singledollarbox}{#1}%
}%
}{%
- \global\sbox{\LWR@singledollarbox}{#4}%
+ \global\sbox{\LWR@singledollarbox}{#1}%
}%
\fi%
% \end{macrocode}
@@ -32238,6 +32736,30 @@ autopage-\theLWR@currentautosec%
% \end{macrocode}
% \begin{macrocode}
\endgroup%
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\LWR@subsingledollarsvg} * \marg{2: alt text} \marg{3: add'l hashing}
+% \marg{4: math expression}
+%
+% For inline math.
+% Uses \SVG\ math. The image is measured and ajusted to the baseline
+% of the \HTML\ output, and placed inside a \env{lateximage}.
+%
+% (In some circumstances \SVG\ math is used even if \brand{MathJax} is
+% preferred.)
+%
+% Factored from \cs{LWR@subsingledollar}.
+% \changes{v0.79}{2019/12/14}{Factored.}
+% \begin{macrocode}
+\newcommand*{\LWR@subsingledollarsvg}[4]{%
+% \end{macrocode}
+% Measure the depth, width, and height of the math image:
+% \changes{v0.51}{2018/03/04}{Fix: SVG math with enclosed \env{lateximage}.}
+% \begin{macrocode}
+ \LWR@singledollarmeasure{#4}%
% \end{macrocode}
%
% Set a style for the the height or width.
@@ -32290,6 +32812,18 @@ autopage-\theLWR@currentautosec%
\def\LWR@singledollardepthstyle{}%
}%
% \end{macrocode}
+%
+% If using certain \tikz\ actions inside math, the resulting image may exceed the
+% \TeX\ boundaries, so the \HTML\ size styles may be incorrect, and must
+% be neutralized.
+% \changes{v0.79}{2020/01/31}{Adjust for unknown size.}
+% \begin{macrocode}
+ \ifbool{LWR@unknownmathsize}{%
+ \def\LWR@singledollarstyle{}%
+ \def\LWR@singledollardepthstyle{}%
+ }{}%
+% \end{macrocode}
+%
% Create the \env{lateximage} using the alternate tag and the computed
% size and depth.
% The star causes \env{lateximage} to use an MD5 hash as the filename.
@@ -32304,9 +32838,9 @@ autopage-\theLWR@currentautosec%
[\MathImageAltText]% alt tag
[]% no add'l hashing
[\LWR@singledollarstyle \LWR@singledollardepthstyle]% CSS
- }{%
+ }{% not dynamic math
\LWR@traceinfo{subsingledollar: static}%
- \IfValueTF{#1}{%
+ \IfValueTF{#1}{% #1 True
\LWR@findcurrenttextcolor% sets \LWR@tempcolor
% \end{macrocode}
% Support for \pkg{xfakebold}:
@@ -32330,13 +32864,13 @@ autopage-\theLWR@currentautosec%
FB\LWR@tempone% xfakebold
]%
[\LWR@singledollarstyle \LWR@singledollardepthstyle]% CSS
- }{%
+ }{% #1 False
\begin{lateximage}% no hashing
[#2]% alt
[]% no add'l hashing
[\LWR@singledollarstyle \LWR@singledollardepthstyle]% CSS
}%
- }%
+ }% not dynamic math
% \end{macrocode}
% Place small and almost transparent markers on the baseline
% at the left and right edges of the image.
@@ -32366,15 +32900,110 @@ autopage-\theLWR@currentautosec%
% \begin{macrocode}
\end{lateximage}%
%
-}% not mathjax
-\endgroup%
-}% not in a lateximage
+}
+% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\LWR@subsingledollar} * \marg{2: alt text} \marg{3: add'l hashing}
+% \marg{4: math expression}
+%
+% For inline math.
+% Uses MathJax, or for \SVG\ math the image is measured and ajusted to the baseline
+% of the \HTML\ output, and placed inside a \env{lateximage}.
+%
+% \begin{description}
+% \item [SVG math:] \cs{LWR@origensuredmath} is part of argument \#4.
+% \item [SVG math \cs{ensuremath}:] \cs{LWR@origensuredmath} is part of argument \#4.
+% \item [SVG dynamic math:] \cs{LWR@origensuredmath} is part of argument \#4.
+% \item [Mathjax:] Argument \#4 is the contents of the math expression
+% without \cs{LWR@origensuredmath}. This case is handled above.
+% \item [Mathjax \cs{ensuremath}:] \cs{LWR@origensuredmath} is part of argument \#4.
+% \item [Mathjax dynamic math:] Argument \#4 is the contents of the math expression
+% without \cs{LWR@origensuredmath}, so \cs{LWR@origensuredmath} is added below.\
+% \end{description}
+%
+% \describehashing
+%
+% \changes{v0.19}{2016/05/25}{\brand{MathJax} support.}
+% \changes{v0.42}{2017/10/26}{If \progcode{FormatWP} print LaTeX expression.}
+% \changes{v0.47}{2018/01/24}{Added \SVG\ math image baseline adjust and em sizing.}
+% \changes{v0.50}{2018/02/23}{Fix: Use \env{lateximage} even if MathJax.}
+% \changes{v0.50}{2018/02/24}{Improved \SVG\ math \attribute{alt} tags.}
+% \begin{macrocode}
+\newlength{\LWR@singledollarwidth}
+\newlength{\LWR@singledollarheight}
+\newlength{\LWR@singledollardepth}
+
+\newsavebox{\LWR@singledollarbox}
+
+\NewDocumentCommand{\LWR@subsingledollar}{s m m m}{%
+ \LWR@traceinfo{LWR@subsingledollar}%
+% \end{macrocode}
+% \begin{macrocode}
+ \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
+ {%
+ \LWR@traceinfo{LWR@subsingledollar: already in a lateximage}%
+ #4% contents
+ }%
+ {% not in a lateximage
+ \begingroup%
+% \end{macrocode}
+% Support for \pkg{xfakebold}:
+% \changes{v0.67}{2019/02/17}{\pkg{xfakebold}: Added support.}
+% \begin{macrocode}
+ \LWR@applyxfakebold%
+% \end{macrocode}
+% MathJax cannot parse the often complicated \TeX\ expressions which
+% appear in the various uses of \cs{ensuredmath}.
+% \cs{ensuremath} forces the \attribute{alt} tag to ``|(math image)|'', as
+% translated according to \cs{MathImageAltText}.
+% If this is the case, force the use of a \env{lateximage} even if MathJax.
+% Likewise for \pkg{siunitx} if |parse-numbers=false|.
+%
+% If MathJax, or if formatting math for a word processor, and not \cs{ensuredmath},
+% and not a dynamic math expression, print the math expression:
+% \changes{v0.51}{2018/03/11}{Fix: \cs{ensuredmath} inside \SVG\ image.}
+% \changes{v0.57}{2018/05/23}{Fix: Dynamic inline math expressions.}
+% \begin{macrocode}
+ \ifboolexpr{%
+ (
+ bool{mathjax} or
+ ( bool{FormatWP} and bool{WPMarkMath} )
+ ) and
+ ( not test {
+ \ifstrequal {#2}% from \ensuredmath
+ {\AltTextOpen\MathImageAltText\AltTextClose}
+ }
+ ) and
+ ( not bool{LWR@dynamicmath} )
+ }%
+% \end{macrocode}
+% For \brand{MathJax}, print the math between |\(| and |\)|:
+% \begin{macrocode}
+ {%
+ \LWR@traceinfo{LWR@subsingledollar: Mathjax}%
+ {\textbackslash(\LWR@HTMLsanitize{#4}\textbackslash)}%
+ }% mathjax
+% \end{macrocode}
+% For SVG, print the math inside a \env{lateximage},
+% with an \element{alt} tag of the \LaTeX\ code,
+% and a \CSS\ style to control the baseline adjustment.
+% \begin{macrocode}
+ {% not mathjax
+ \LWR@traceinfo{%
+ LWR@subsingledollar: NOT mathjax, or is ensuremath, or is dynamic%
+ }%
+ \LWR@subsingledollarsvg{#1}{#2}{#3}{#4}%
+ }% not mathjax
+ \endgroup%
+ }% not in a lateximage
% \end{macrocode}
% Clear the single-use \attribute{alt} text:
% \changes{v0.74}{2019/08/20}{Add \cs{ThisAltText}.}
% \begin{macrocode}
-\gdef\LWR@ThisAltText{}%
-\LWR@traceinfo{LWR@subsingledollar: done}%
+ \gdef\LWR@ThisAltText{}%
+ \LWR@traceinfo{LWR@subsingledollar: done}%
}
% \end{macrocode}
% \end{macro}
@@ -32542,39 +33171,38 @@ autopage-\theLWR@currentautosec%
\LetLtxMacro\LWR@origensuredmath\@ensuredmath
\renewcommand{\@ensuredmath}[1]{%
-\ifbool{mathjax}{%
- \LWR@subsingledollar*{\AltTextOpen\MathImageAltText\AltTextClose}{%
- \protect\LWR@HTMLsanitize{\detokenize\expandafter{#1}}%
- }{\relax%
- \LWR@origensuredmath{#1}%
- }%
-}{% SVG math
+ \ifbool{mathjax}{%
+ \LWR@subsingledollar*{\AltTextOpen\MathImageAltText\AltTextClose}{%
+ \protect\LWR@HTMLsanitize{\detokenize\expandafter{#1}}%
+ }{\relax%
+ \LWR@origensuredmath{#1}%
+ }%
+ }{% SVG math
% \end{macrocode}
% If already inside a \env{lateximage} in math mode, continue as-is.
% \begin{macrocode}
-\ifmmode%
- \LWR@origensuredmath{#1}%
-\else%
+ \ifmmode%
+ \LWR@origensuredmath{#1}%
+ \else%
% \end{macrocode}
% Create an inline math \env{lateximage} with a simple \attribute{alt} tag
% and additional hashing according to the contents.
% \begin{macrocode}
- \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
- {\LWR@origensuredmath{#1}}%
- {%
- \LWR@subsingledollar*{\AltTextOpen\MathImageAltText\AltTextClose}{%
- \protect\LWR@HTMLsanitize{\detokenize\expandafter{#1}}%
- }{%
- \LWR@origensuredmath{#1}%
- }%
+ \ifnumcomp{\value{LWR@lateximagedepth}}{>}{0}%
+ {\LWR@origensuredmath{#1}}%
+ {%
+ \LWR@subsingledollar*%
+ {\AltTextOpen\MathImageAltText\AltTextClose}%
+ {\protect\LWR@HTMLsanitize{\detokenize\expandafter{#1}}}%
+ {\LWR@origensuredmath{#1}}%
+ }%
+ \fi%
}%
-\fi%
-}%
% \end{macrocode}
% Clear the single-use \attribute{alt} text:
% \changes{v0.74}{2019/08/20}{Add \cs{ThisAltText}.}
% \begin{macrocode}
-\gdef\LWR@ThisAltText{}%
+ \gdef\LWR@ThisAltText{}%
}
% \end{macrocode}
% \end{macro}
@@ -32682,35 +33310,35 @@ autopage-\theLWR@currentautosec%
% If using chapters, place the chapter number in front of the equation.
% Otherwise, use the simple equation number.
% \begin{macrocode}
-\ifcsdef{thechapter}{
- \InlineClass{hidden}{
- \textbackslash(
- \textbackslash{}seteqsection \{\thechapter\}
- \textbackslash)
+ \ifcsdef{thechapter}{
+ \InlineClass{hidden}{
+ \textbackslash(
+ \textbackslash{}seteqsection \{\thechapter\}
+ \textbackslash)
+ }
}
-}
-{}% not using chapters
+ {}% not using chapters
% \end{macrocode}
% \brand{MathJax} doesn't allow setting the equation number to 1:
% \begin{macrocode}
-\ifthenelse{\cnttest{\value{equation}}>0}
-{
+ \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@nextequation}{\value{equation}}
- \addtocounter{LWR@nextequation}{1}
+ \setcounter{LWR@nextequation}{\value{equation}}
+ \addtocounter{LWR@nextequation}{1}
% \end{macrocode}
% Place the \brand{MathJax} command inside ``\cs{(}'' and ``\cs{)}'' characters,
% to be printed to \HTML, not interpreted by \LaTeX.
% \begin{macrocode}
- \InlineClass{hidden}{
- \textbackslash(
- \textbackslash{}seteqnumber \{\arabic{LWR@nextequation}\}
- \textbackslash)
- }
-}{}% not eq > 0
+ \InlineClass{hidden}{
+ \textbackslash(
+ \textbackslash{}seteqnumber \{\arabic{LWR@nextequation}\}
+ \textbackslash)
+ }
+ }{}% not eq > 0
}
% \end{macrocode}
% \end{macro}
@@ -32725,19 +33353,19 @@ autopage-\theLWR@currentautosec%
% \end{macrocode}
% Stop \HTML\ paragraph handling and open an \HTML\ comment:
% \begin{macrocode}
-\LWR@stoppars
-\LWR@htmlopencomment
+ \LWR@stoppars
+ \LWR@htmlopencomment
% \end{macrocode}
% Start the \LaTeX\ math environment inside the \HTML\ comment:
% \begin{macrocode}
-\begingroup
-\@nameuse{LWR@orig#1}
+ \begingroup
+ \@nameuse{LWR@orig#1}
% \end{macrocode}
% While in the math environment,
% restore various commands to their \LaTeX\ meanings.
% \begin{macrocode}
-\LWR@restoreorigformatting
+ \LWR@restoreorigformatting
% \end{macrocode}
% ^^A When a label is encountered, the \HTML\ comment is closed,
% ^^A the label is generated in an \HTML-output context,
@@ -32746,18 +33374,18 @@ autopage-\theLWR@currentautosec%
%
% Print the contents of the equation:
% \begin{macrocode}
-#2
+ #2
% \end{macrocode}
% End the \LaTeX{} math environment inside the \HTML\ comment:
% \begin{macrocode}
-\@nameuse{LWR@origend#1}
-\endgroup
+ \@nameuse{LWR@origend#1}
+ \endgroup
% \end{macrocode}
% Close the \HTML\ comment and resume \HTML\ paragraph handling:
% \begin{macrocode}
-\LWR@htmlclosecomment
-\LWR@startpars
+ \LWR@htmlclosecomment
+ \LWR@startpars
}
% \end{macrocode}
% \end{macro}
@@ -32773,17 +33401,17 @@ autopage-\theLWR@currentautosec%
% \end{macrocode}
% Enclose the \brand{MathJax} environment inside printed ``\cs{(}'' and ``\cs{)}'' characters.
% \begin{macrocode}
-\LWR@origtilde\LWR@orignewline
-\textbackslash{}begin\{#1\}
+ \LWR@origtilde\LWR@orignewline
+ \textbackslash{}begin\{#1\}
% \end{macrocode}
% Print the contents, sanitizing for \HTML\ special characters.
% \begin{macrocode}
-\LWR@HTMLsanitizeexpand{\detokenize\expandafter{#2}}
+ \LWR@HTMLsanitizeexpand{\detokenize\expandafter{#2}}
% \end{macrocode}
% Close the \brand{MathJax} environment:
% \begin{macrocode}
-\textbackslash{}end\{#1\}
-\LWR@orignewline
+ \textbackslash{}end\{#1\}
+ \LWR@orignewline
}
% \end{macrocode}
% \end{macro}
@@ -32826,75 +33454,75 @@ autopage-\theLWR@currentautosec%
% 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} ) }%
+ \ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
% \end{macrocode}
% \brand{MathJax} output:
% \begin{macrocode}
-{
+ {
% \end{macrocode}
% Print commands to syncronize \brand{MathJax}'s equation number and format
% to the current \LaTeX\ chapter/section and equation number:
% \begin{macrocode}
- \LWR@syncmathjax
+ \LWR@syncmathjax
% \end{macrocode}
% Print the \LaTeX\ math inside an \HTML\ comment:
% \begin{macrocode}
- \LWR@hidelatexequation{#2}{#1}
-}
+ \LWR@hidelatexequation{#2}{#1}
+ }
% \end{macrocode}
% SVG output:
% Create the |lateximage| along with an \HTML\ \element{alt} tag
% having an equation number, the \LaTeX{} equation environment
% commmands, and the contents of the environment's \cs{BODY}.
% \begin{macrocode}
-{% not mathjax
+ {% not mathjax
% \end{macrocode}
% Begin the \env{lateximage} with an \element{alt} tag containing the math source:
% \changes{v0.50}{2018/03/02}{Improved \SVG\ math display.}
% \changes{v0.51}{2018/03/11}{Fix: \cs{addcontentsline} inside \SVG\ math. Provides an autoid anchor.}
% \changes{v0.52}{2018/03/31}{Fix: \env{equation*} now based on \env{equation} instead of \env{displaymath}.}
% \begin{macrocode}
- \ifstrequal{#2}{equation*}{%
- \begin{BlockClass}{displaymath}%
- }{%
- \begin{BlockClass}{displaymathnumbered}%
- }%
- \LWR@newautoidanchor%
- \booltrue{LWR@indisplaymathimage}%
- \begin{lateximage}[%
\ifstrequal{#2}{equation*}{%
- \ifdefequal{\LWR@equationtag}{\theequation}{%
-% no tag was given
- }{%
- (\LWR@equationtag) % tag was given
- }%
+ \begin{BlockClass}{displaymath}%
}{%
- (\LWR@equationtag) % automatic numbering
+ \begin{BlockClass}{displaymathnumbered}%
}%
- \textbackslash{begin\{#2\}} % extra space
- \LWR@HTMLsanitizeexpand{\detokenize\expandafter{#1}} % extra space
- \textbackslash{end\{#2\}}%
- ]*% alt tag
+ \LWR@newautoidanchor%
+ \booltrue{LWR@indisplaymathimage}%
+ \begin{lateximage}[%
+ \ifstrequal{#2}{equation*}{%
+ \ifdefequal{\LWR@equationtag}{\theequation}{%
+ % no tag was given
+ }{%
+ (\LWR@equationtag) % tag was given
+ }%
+ }{%
+ (\LWR@equationtag) % automatic numbering
+ }%
+ \textbackslash{begin\{#2\}} % extra space
+ \LWR@HTMLsanitizeexpand{\detokenize\expandafter{#1}} % extra space
+ \textbackslash{end\{#2\}}%
+ ]*% alt tag
% \end{macrocode}
% Support for \pkg{xfakebold}:
% \changes{v0.67}{2019/02/17}{\pkg{xfakebold}: Added support.}
% \begin{macrocode}
- \LWR@applyxfakebold%
+ \LWR@applyxfakebold%
% \end{macrocode}
% Create the actual \LaTeX-formatted equation inside
% the |lateximage| using the contents of the environment.
% \begin{macrocode}
- \@nameuse{LWR@orig#2}%
- #1% contents collected by \collect@body
- \@nameuse{LWR@origend#2}%
- \end{lateximage}%
- \end{BlockClass}%
-}% not mathjax
+ \@nameuse{LWR@orig#2}%
+ #1% contents collected by \collect@body
+ \@nameuse{LWR@origend#2}%
+ \end{lateximage}%
+ \end{BlockClass}%
+ }% not mathjax
% \end{macrocode}
% Clear the single-use \attribute{alt} text:
% \changes{v0.74}{2019/08/20}{Add \cs{ThisAltText}.}
% \begin{macrocode}
-\gdef\LWR@ThisAltText{}%
+ \gdef\LWR@ThisAltText{}%
}
% \end{macrocode}
%
@@ -32912,7 +33540,7 @@ autopage-\theLWR@currentautosec%
% Clear the single-use \attribute{alt} text:
% \changes{v0.74}{2019/08/20}{Add \cs{ThisAltText}.}
% \begin{macrocode}
-\gdef\LWR@ThisAltText{}%
+ \gdef\LWR@ThisAltText{}%
}
% \end{macrocode}
% \end{macro}
@@ -32936,13 +33564,15 @@ autopage-\theLWR@currentautosec%
% macro called \cs{BODY}.
% \begin{macrocode}
\AtBeginDocument{
+
\NewEnviron{equation}%
-{\LWR@doequation{\BODY}{equation}}%
-[\LWR@doendequation{equation}]
+ {\LWR@doequation{\BODY}{equation}}%
+ [\LWR@doendequation{equation}]
\LetLtxMacro\LWR@equationnormal\equation
\LetLtxMacro\endLWR@equationnormal\endequation
-}
+
+}% AtBeginDocument
% \end{macrocode}
% \end{environment}
@@ -32950,13 +33580,15 @@ autopage-\theLWR@currentautosec%
% \begin{environment}{equation*}
% \begin{macrocode}
\AtBeginDocument{
+
\NewEnviron{equation*}%
-{\LWR@doequation{\BODY}{equation*}}%
-[\LWR@doendequation{equation*}]
+ {\LWR@doequation{\BODY}{equation*}}%
+ [\LWR@doendequation{equation*}]
\csletcs{LWR@equationnormalstar}{equation*}
\csletcs{LWR@endequationnormalstar}{endequation*}
-}
+
+}% AtBeginDocument
% \end{macrocode}
% \end{environment}
@@ -32984,15 +33616,15 @@ autopage-\theLWR@currentautosec%
% \changes{v0.51}{2018/03/21}{Processing for complicated display math.}
% \begin{macrocode}
\newcommand*{\displaymathnormal}{%
-\ifbool{LWR@origmathjax}{\booltrue{mathjax}}{\boolfalse{mathjax}}%
-\LetLtxMacro\[\LWR@openbracketnormal%
-\LetLtxMacro\]\LWR@closebracketnormal%
-\LetLtxMacro\displaymath\LWR@displaymathnormal%
-\LetLtxMacro\enddisplaymath\endLWR@displaymathnormal%
-\LetLtxMacro\equation\LWR@equationnormal%
-\LetLtxMacro\endequation\endLWR@equationnormal%
-\csletcs{equation*}{LWR@equationnormalstar}%
-\csletcs{endequation*}{LWR@endequationnormalstar}%
+ \ifbool{LWR@origmathjax}{\booltrue{mathjax}}{\boolfalse{mathjax}}%
+ \LetLtxMacro\[\LWR@openbracketnormal%
+ \LetLtxMacro\]\LWR@closebracketnormal%
+ \LetLtxMacro\displaymath\LWR@displaymathnormal%
+ \LetLtxMacro\enddisplaymath\endLWR@displaymathnormal%
+ \LetLtxMacro\equation\LWR@equationnormal%
+ \LetLtxMacro\endequation\endLWR@equationnormal%
+ \csletcs{equation*}{LWR@equationnormalstar}%
+ \csletcs{endequation*}{LWR@endequationnormalstar}%
}
% \end{macrocode}
% \end{macro}
@@ -33005,15 +33637,15 @@ autopage-\theLWR@currentautosec%
% \changes{v0.51}{2018/03/21}{Processing for complicated display math.}
% \begin{macrocode}
\newcommand*{\displaymathother}{%
-\boolfalse{mathjax}%
-\LetLtxMacro\displaymath\LWR@displaymathother%
-\LetLtxMacro\enddisplaymath\endLWR@displaymathother%
-\LetLtxMacro\[\LWR@displaymathother%
-\LetLtxMacro\]\endLWR@displaymathother%
-\LetLtxMacro\equation\LWR@equationother%
-\LetLtxMacro\endequation\endLWR@equationother%
-\csletcs{equation*}{displaymath}%
-\csletcs{endequation*}{enddisplaymath}%
+ \boolfalse{mathjax}%
+ \LetLtxMacro\displaymath\LWR@displaymathother%
+ \LetLtxMacro\enddisplaymath\endLWR@displaymathother%
+ \LetLtxMacro\[\LWR@displaymathother%
+ \LetLtxMacro\]\endLWR@displaymathother%
+ \LetLtxMacro\equation\LWR@equationother%
+ \LetLtxMacro\endequation\endLWR@equationother%
+ \csletcs{equation*}{displaymath}%
+ \csletcs{endequation*}{enddisplaymath}%
}
% \end{macrocode}
% \end{macro}
@@ -33075,22 +33707,22 @@ autopage-\theLWR@currentautosec%
% then by \pkg{cleveref}.
% \begin{macrocode}
\newcommand*{\LWR@htmlmathlabel}[1]{%
-\LWR@traceinfo{LWR@htmlmathlabelb #1}%
+ \LWR@traceinfo{LWR@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} ) }%
-{%
+ \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{%
+ \text{%
% \end{macrocode}
% Shift the label over to the right side of the environment to avoid
% over-printing the math:
% \begin{macrocode}
- \ifbool{LWR@amsmultline}{}{\hspace*{\totwidth@}}%
+ \ifbool{LWR@amsmultline}{}{\hspace*{\totwidth@}}%
% \end{macrocode}
% Temporarily end the \HTML\ comment,
% insert the \LaTeX{} \& \HTML\ label, then
@@ -33098,14 +33730,14 @@ autopage-\theLWR@currentautosec%
% \cs{@firstofone} is required to remove extra braces
% introduced by the \pkg{amsmath} package.)
% \begin{macrocode}
- \LWR@htmlclosecomment%
- \LWR@origltx@label{#1}%
- \LWR@htmlopencomment%
- }% text
-}% mathjax
-{%
- \LWR@origltx@label{#1}%
-}%
+ \LWR@htmlclosecomment%
+ \LWR@origltx@label{#1}%
+ \LWR@htmlopencomment%
+ }% text
+ }% mathjax
+ {%
+ \LWR@origltx@label{#1}%
+ }%
}
% \end{macrocode}
% \end{macro}
@@ -33116,12 +33748,12 @@ autopage-\theLWR@currentautosec%
% Starts hiding \LaTeX\ math inside an \HTML\ comment.
% \begin{macrocode}
\newcommand*{\LWR@beginhideamsmath}{
-\LWR@stoppars
-\LWR@origtilde\LWR@orignewline
-\LWR@htmlopencomment
+ \LWR@stoppars
+ \LWR@origtilde\LWR@orignewline
+ \LWR@htmlopencomment
-\begingroup
-\LWR@restoreorigformatting
+ \begingroup
+ \LWR@restoreorigformatting
}
% \end{macrocode}
% \end{macro}
@@ -33130,11 +33762,11 @@ autopage-\theLWR@currentautosec%
% Ends hiding \LaTeX\ math inside an \HTML\ comment.
% \begin{macrocode}
\newcommand*{\LWR@endhideamsmath}{
-\endgroup
+ \endgroup
-\LWR@htmlclosecomment
-\LWR@orignewline
-\LWR@startpars
+ \LWR@htmlclosecomment
+ \LWR@orignewline
+ \LWR@startpars
}
% \end{macrocode}
% \end{macro}
@@ -33190,44 +33822,44 @@ autopage-\theLWR@currentautosec%
% 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} ) }%
-{%
+ \ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
+ {%
% \end{macrocode}
%
% If \brand{MathJax}, the environment contents (the \cs{BODY}) are executed in a
% \HTML\ comment to trigger the correct equation number increment (if not starred),
% then are included verbatim in the output for \brand{MathJax} to interpret:
% \begin{macrocode}
- \LWR@syncmathjax
- \boolfalse{LWR@amsmultline}
- \ifbool{LWR@numbereqnarray}
- {
+ \LWR@syncmathjax%
+ \boolfalse{LWR@amsmultline}%
+ \ifbool{LWR@numbereqnarray}%
+ {%
% \end{macrocode}
%
% If numbering the equations, execute a copy inside an \HTML\ comment block:
% \begin{macrocode}
- \LWR@beginhideamsmath
- \LWR@origeqnarray
- \BODY
- \LWR@origendeqnarray
- \LWR@endhideamsmath
+ \LWR@beginhideamsmath%
+ \LWR@origeqnarray%
+ \BODY%
+ \LWR@origendeqnarray%
+ \LWR@endhideamsmath%
% \end{macrocode}
%
% Then print the (sanitized) contents to the output for \brand{MathJax} to interpret:
% \begin{macrocode}
- \LWR@addmathjax{eqnarray}{\BODY}
- }%
- {% not LWR@numbereqnarray
+ \LWR@addmathjax{eqnarray}{\BODY}%
+ }%
+ {% not LWR@numbereqnarray
% \end{macrocode}
%
% If not numbering equations, just create the contents for \brand{MathJax}:
% \begin{macrocode}
- \LWR@addmathjax{eqnarray*}{\BODY}
- }% LWR@numbereqnarray
-}% mathjax
-{% not mathjax
- \ifbool{LWR@numbereqnarray}
- {
+ \LWR@addmathjax{eqnarray*}{\BODY}%
+ }% LWR@numbereqnarray
+ }% mathjax
+ {% not mathjax
+ \ifbool{LWR@numbereqnarray}%
+ {%
% \end{macrocode}
%
% For numbered \SVG\ equations, first create a \env{lateximage} with
@@ -33236,60 +33868,60 @@ autopage-\theLWR@currentautosec%
% \changes{v0.50}{2018/03/02}{Improved \SVG\ math display.}
% \changes{v0.51}{2018/03/11}{Fix: \cs{addcontentsline} inside \SVG\ math. Provides an autoid anchor.}
% \begin{macrocode}
- \begin{BlockClass}{displaymathnumbered}%
- \LWR@newautoidanchor%
- \booltrue{LWR@indisplaymathimage}%
- \begin{lateximage}[(\LWR@startingequationtag--\LWR@equationtag)
- \LWR@addmathjax{eqnarray}{\BODY}]*
+ \begin{BlockClass}{displaymathnumbered}%
+ \LWR@newautoidanchor%
+ \booltrue{LWR@indisplaymathimage}%
+ \begin{lateximage}[(\LWR@startingequationtag--\LWR@equationtag)%
+ \LWR@addmathjax{eqnarray}{\BODY}]*%
% \end{macrocode}
% Support for \pkg{xfakebold}:
% \changes{v0.67}{2019/02/17}{\pkg{xfakebold}: Added support.}
% \begin{macrocode}
- \LWR@applyxfakebold%
+ \LWR@applyxfakebold%
% \end{macrocode}
% Create the image contents using an actual \env{eqnarray}:
% \begin{macrocode}
- \LWR@origeqnarray
- \BODY
- \LWR@origendeqnarray
- \end{lateximage}
- \end{BlockClass}
- }%
- {% not LWR@numbereqnarray
+ \LWR@origeqnarray%
+ \BODY%
+ \LWR@origendeqnarray%
+ \end{lateximage}%
+ \end{BlockClass}%
+ }%
+ {% not LWR@numbereqnarray
% \end{macrocode}
% If not numbered, do the same, but an extra \cs{nonumber} seems to be required:
% \changes{v0.50}{2018/03/02}{Improved \SVG\ math display.}
% \changes{v0.51}{2018/03/11}{Fix: \cs{addcontentsline} inside \SVG\ math. Provides an autoid anchor.}
% \begin{macrocode}
- \begin{BlockClass}{displaymath}
- \LWR@newautoidanchor%
- \booltrue{LWR@indisplaymathimage}%
- \begin{lateximage}[\LWR@addmathjax{eqnarray*}{\BODY}]*
+ \begin{BlockClass}{displaymath}%
+ \LWR@newautoidanchor%
+ \booltrue{LWR@indisplaymathimage}%
+ \begin{lateximage}[\LWR@addmathjax{eqnarray*}{\BODY}]*%
% \end{macrocode}
% Support for \pkg{xfakebold}:
% \changes{v0.67}{2019/02/17}{\pkg{xfakebold}: Added support.}
% \begin{macrocode}
- \LWR@applyxfakebold%
+ \LWR@applyxfakebold%
% \end{macrocode}
% \begin{macrocode}
- \LWR@origeqnarray
- \BODY
- \nonumber
- \LWR@origendeqnarray
- \end{lateximage}
- \end{BlockClass}
- }% LWR@numbereqnarray
-}% not mathjax
+ \LWR@origeqnarray%
+ \BODY%
+ \nonumber%
+ \LWR@origendeqnarray%
+ \end{lateximage}%
+ \end{BlockClass}%
+ }% LWR@numbereqnarray
+ }% not mathjax
% \end{macrocode}
%
% Default to number equations in the future:
% \begin{macrocode}
-\booltrue{LWR@numbereqnarray}
+ \booltrue{LWR@numbereqnarray}%
% \end{macrocode}
% Clear the single-use \attribute{alt} text:
% \changes{v0.74}{2019/08/20}{Add \cs{ThisAltText}.}
% \begin{macrocode}
-\gdef\LWR@ThisAltText{}%
+ \gdef\LWR@ThisAltText{}%
}
% \end{macrocode}
%
@@ -33443,115 +34075,14 @@ autopage-\theLWR@currentautosec%
% \end{macrocode}
-% \subsection{Sanitizing math expressions for \HTML}
+
+% \subsection{Equation numbers}
% \codehtml
% \begin{macrocode}
\begin{warpHTML}
% \end{macrocode}
-% \begin{macro}{\LWR@HTMLsanitize} \marg{text}
-%
-% Math expressions are converted to |lateximage|s,
-% and some math environments may contain
-% |&|, |<|, or |>|, which should not be allowed
-% inside an \HTML\ \element{alt} tag, so must convert them to \HTML\ entities.
-%
-% Two versions follow, depending on expansion needs.
-% There may be a better way\dots
-%
-% \changes{v0.36}{2017/08/16}{Fix for \pkg{babel-french}.}
-% \changes{v0.51}{2018/03/07}{Fix: Escapes double quotes.}
-% \begin{macrocode}
-\newrobustcmd{\LWR@HTMLsanitize}[1]{%
-% \end{macrocode}
-% Cancel French \pkg{babel} character handling,
-% and fully expand the strings:
-% \begin{macrocode}
-\begingroup%
-\LWR@FBcancel%
-\fullexpandarg%
-% \end{macrocode}
-% The |&|, |<|, and |>| may be interpreted by the browser:
-% \begin{macrocode}
-\protect\StrSubstitute{\detokenize{#1}}%
-{\detokenize{&}}{\detokenize{&amp;}}[\LWR@strresult]%
-% \end{macrocode}
-% \begin{macrocode}
-\protect\StrSubstitute{\detokenize\expandafter{\LWR@strresult}}%
-{\detokenize{<}}{\detokenize{&lt;}}[\LWR@strresult]%
-% \end{macrocode}
-% \begin{macrocode}
-\protect\StrSubstitute{\detokenize\expandafter{\LWR@strresult}}%
-{\detokenize{>}}{\detokenize{&gt;}}[\LWR@strresult]%
-% \end{macrocode}
-% The double quote occasionally causes problems.
-% \begin{macrocode}
-\protect\StrSubstitute{\detokenize\expandafter{\LWR@strresult}}%
-{\detokenize{"}}{\detokenize{&quot;}}[\LWR@strresult]%
-% \end{macrocode}
-% MathJax allows expressions to be defined with \cs{newcommand}.
-% These expressions would appear with |##| for each argument,
-% and each must be changed to a single |#|.
-% This must be done after all the above changes.
-% Attempting another conversion after this causes an error upon further expansion.
-% \begin{macrocode}
-\protect\StrSubstitute{\detokenize\expandafter{\LWR@strresult}}%
-{\detokenize{##}}{\LWR@origpound}[\LWR@strresult]%
-% \end{macrocode}
-% \begin{macrocode}
-\LWR@strresult%
-\endgroup%
-}
-% \end{macrocode}
-% \end{macro}
-
-
-% \begin{macro}{\LWR@HTMLsanitizeexpand} \marg{text}
-%
-% This version expands the argument before sanitizing it.
-%
-% \changes{v0.36}{2017/08/16}{Fix for \pkg{babel-french}.}
-% \changes{v0.51}{2018/03/07}{Fix: Escapes double quotes.}
-% \begin{macrocode}
-\newrobustcmd{\LWR@HTMLsanitizeexpand}[1]{%
-% \end{macrocode}
-% Cancel French \pkg{babel} character handling,
-% and fully expand the strings:
-% \begin{macrocode}
-\begingroup%
-\LWR@FBcancel%
-\fullexpandarg%
-% \end{macrocode}
-% The difference between this and \cs{LWR@HTMLsanitize} (without ``expand'')
-% is the following \cs{expandafter}:
-% \begin{macrocode}
-\protect\StrSubstitute{\detokenize\expandafter{#1}}%
-{\detokenize{&}}{\detokenize{&amp;}}[\LWR@strresult]%
-% \end{macrocode}
-% \begin{macrocode}
-\protect\StrSubstitute{\detokenize\expandafter{\LWR@strresult}}%
-{\detokenize{<}}{\detokenize{&lt;}}[\LWR@strresult]%
-% \end{macrocode}
-% \begin{macrocode}
-\protect\StrSubstitute{\detokenize\expandafter{\LWR@strresult}}%
-{\detokenize{>}}{\detokenize{&gt;}}[\LWR@strresult]%
-% \end{macrocode}
-% \begin{macrocode}
-\protect\StrSubstitute{\detokenize\expandafter{\LWR@strresult}}%
-{\detokenize{"}}{\detokenize{&quot;}}[\LWR@strresult]%
-% \end{macrocode}
-% \cs{LWR@HTMLsanitizeexpand} is not used for defining new MathJax macros,
-% so the |##| conversion is not needed here.
-% \begin{macrocode}
-\LWR@strresult%
-\endgroup%
-}
-% \end{macrocode}
-% \end{macro}
-
-
-% \subsection{Equation numbers}
% \DescribeCounter{LWR@startingequation}
% For use with |lateximage| and multi-line numbered equations.
@@ -33566,13 +34097,13 @@ autopage-\theLWR@currentautosec%
\@ifundefined{chapter}
{
\renewcommand{\theLWR@startingequation}{%
-\arabic{LWR@startingequation}%
+ \arabic{LWR@startingequation}%
}
}
{% chapter defined
\renewcommand{\theLWR@startingequation}{%
-\ifnumcomp{\value{chapter}}{>}{0}{\arabic{chapter}.}{}%
-\arabic{LWR@startingequation}%
+ \ifnumcomp{\value{chapter}}{>}{0}{\arabic{chapter}.}{}%
+ \arabic{LWR@startingequation}%
}
}
% \end{macrocode}
@@ -33620,12 +34151,12 @@ autopage-\theLWR@currentautosec%
%
% \begin{macrocode}
\NewDocumentCommand{\LWR@remembertag}{m}{%
-\ifbool{LWR@isstartingequation}%
-{%
- \global\boolfalse{LWR@isstartingequation}%
- \xdef\LWR@startingequationtag{#1}%
-}{}%
-\xdef\LWR@equationtag{#1}%
+ \ifbool{LWR@isstartingequation}%
+ {%
+ \global\boolfalse{LWR@isstartingequation}%
+ \xdef\LWR@startingequationtag{#1}%
+ }{}%
+ \xdef\LWR@equationtag{#1}%
}%
% \end{macrocode}
% \end{macro}
@@ -33647,9 +34178,9 @@ autopage-\theLWR@currentautosec%
% \begin{macrocode}
\newcommand*{\LWR@amsmathbody}[1]
{%
-\textbackslash\{begin\}\{#1\} % extra space
-\LWR@HTMLsanitizeexpand{\detokenize\expandafter{\the\@envbody}}%
-\textbackslash\{end\}\{#1\}%
+ \textbackslash\{begin\}\{#1\} % extra space
+ \LWR@HTMLsanitizeexpand{\detokenize\expandafter{\the\@envbody}}%
+ \textbackslash\{end\}\{#1\}%
}
% \end{macrocode}
% \end{macro}
@@ -33664,10 +34195,10 @@ autopage-\theLWR@currentautosec%
% \begin{macrocode}
\newcommand*{\LWR@amsmathbodynumbered}[1]
{%
-\ifnumcomp{\value{LWR@startingequation}}{=}{\value{equation}}%
-{(\LWR@equationtag)}%
-{(\LWR@startingequationtag--\LWR@equationtag)} % extra space
-\LWR@amsmathbody{#1} % extra space
+ \ifnumcomp{\value{LWR@startingequation}}{=}{\value{equation}}%
+ {(\LWR@equationtag)}%
+ {(\LWR@startingequationtag--\LWR@equationtag)} % extra space
+ \LWR@amsmathbody{#1} % extra space
}
% \end{macrocode}
% \end{macro}
@@ -33796,7 +34327,7 @@ autopage-\theLWR@currentautosec%
% printed in a multi-equation environment:
% \changes{v0.42}{2017/10/12}{Fix: Numbering and naming AMS math environments.}
% \begin{macrocode}
-\LWR@traceinfo{lateximage: starting outer-most lateximage}%
+ \LWR@traceinfo{lateximage: starting outer-most lateximage}%
\setcounter{LWR@startingequation}{\value{equation}}%
\addtocounter{LWR@startingequation}{1}%
\booltrue{LWR@isstartingequation}%
@@ -33904,10 +34435,16 @@ autopage-\theLWR@currentautosec%
\LWR@traceinfo{lateximage: about to create a new page}%
\LWR@orignewpage%
% \end{macrocode}
-% Typeset the image in a ``standard'' width page and font size:
+% If the current page is larger,
+% typeset the image in a ``standard'' width page and font size:
+% \changes{v0.79}{2020/01/05}{Improved \cs{linewidth}.}
% \begin{macrocode}
\LWR@traceinfo{lateximage: about to create minipage}%
- \LWR@print@minipage{6in}%
+ \ifdimless{\linewidth}{6in}{%
+ \LWR@print@minipage{\linewidth}%
+ }{%
+ \LWR@print@minipage{6in}%
+ }%
\@nameuse{LWR@print@\LateximageFontSizeName}%
% \end{macrocode}
% Temporarily restore formatting to its \PDF\ definitions:
@@ -34079,10 +34616,10 @@ autopage-\theLWR@currentautosec%
% \begin{macrocode}
\renewenvironment*{center}
{
-\LWR@forcenewpage
-\ifbool{FormatWP}
-{\BlockClass[\LWR@print@mbox{text-align:center}]{center}}
-{\BlockClass{center}}
+ \LWR@forcenewpage
+ \ifbool{FormatWP}
+ {\BlockClass[\LWR@print@mbox{text-align:center}]{center}}
+ {\BlockClass{center}}
}
{\endBlockClass}
% \end{macrocode}
@@ -34094,10 +34631,10 @@ autopage-\theLWR@currentautosec%
% \begin{macrocode}
\renewenvironment*{flushright}
{
-\LWR@forcenewpage
-\ifbool{FormatWP}
-{\BlockClass[\LWR@print@mbox{text-align:right}]{flushright}}
-{\BlockClass{flushright}}
+ \LWR@forcenewpage
+ \ifbool{FormatWP}
+ {\BlockClass[\LWR@print@mbox{text-align:right}]{flushright}}
+ {\BlockClass{flushright}}
}
{\endBlockClass}
% \end{macrocode}
@@ -34108,10 +34645,10 @@ autopage-\theLWR@currentautosec%
% \begin{macrocode}
\renewenvironment*{flushleft}
{
-\LWR@forcenewpage
-\ifbool{FormatWP}
-{\BlockClass[\LWR@print@mbox{text-align:left}]{flushleft}}
-{\BlockClass{flushleft}}
+ \LWR@forcenewpage
+ \ifbool{FormatWP}
+ {\BlockClass[\LWR@print@mbox{text-align:left}]{flushleft}}
+ {\BlockClass{flushleft}}
}
{\endBlockClass}
% \end{macrocode}
@@ -34126,9 +34663,9 @@ autopage-\theLWR@currentautosec%
% \changes{v0.54}{2018/04/19}{Added debug comment.}
% \begin{macrocode}
\newcommand*{\LWR@HTML@centering}{%
-\ifbool{HTMLDebugComments}{%
- \LWR@htmlcomment{centering}%
-}{}%
+ \ifbool{HTMLDebugComments}{%
+ \LWR@htmlcomment{centering}%
+ }{}%
}
\LWR@formatted{centering}
% \end{macrocode}
@@ -34138,9 +34675,9 @@ autopage-\theLWR@currentautosec%
% \changes{v0.54}{2018/04/19}{Added debug comment.}
% \begin{macrocode}
\newcommand*{\LWR@HTML@raggedleft}{%
-\ifbool{HTMLDebugComments}{%
- \LWR@htmlcomment{raggedleft}%
-}{}%
+ \ifbool{HTMLDebugComments}{%
+ \LWR@htmlcomment{raggedleft}%
+ }{}%
}
\LWR@formatted{raggedleft}
% \end{macrocode}
@@ -34150,9 +34687,9 @@ autopage-\theLWR@currentautosec%
% \changes{v0.54}{2018/04/19}{Added debug comment.}
% \begin{macrocode}
\newcommand*{\LWR@HTML@raggedright}{%
-\ifbool{HTMLDebugComments}{%
- \LWR@htmlcomment{raggedright}%
-}{}%
+ \ifbool{HTMLDebugComments}{%
+ \LWR@htmlcomment{raggedright}%
+ }{}%
}
\LWR@formatted{raggedright}
% \end{macrocode}
@@ -34291,9 +34828,6 @@ autopage-\theLWR@currentautosec%
-
-
-
% \section{\pkg{siunitx}}
% \label{sec:siunitx}
@@ -34889,22 +35423,15 @@ autopage-\theLWR@currentautosec%
\begin{warpHTML}
% \end{macrocode}
-% \subsection{Counters and lengths}
-
-% \DescribeCounter{LWR@minipagedepth}
-% Used to only reset the line width at the outermost minipage.
-% \begin{macrocode}
-\newcounter{LWR@minipagedepth}
-\setcounter{LWR@minipagedepth}{0}
-% \end{macrocode}
-
+% \subsection{Computed lengths}
%
% \DescribeLength{\LWR@minipagewidth}
% Used to convert the width into printable units.
% \begin{macrocode}
\newlength{\LWR@minipagewidth}
% \end{macrocode}
+%
% \DescribeLength{\LWR@minipageheight}
% Used to convert the height into printable units.
% \begin{macrocode}
@@ -34912,6 +35439,42 @@ autopage-\theLWR@currentautosec%
% \end{macrocode}
%
%
+% \subsection{Virtual page size}
+%
+% \DescribeCounter{LWR@virtualpagedepth}
+% Used to only reset the line width at the outermost minipage.
+% \begin{macrocode}
+\newcounter{LWR@virtualpagedepth}
+\setcounter{LWR@virtualpagedepth}{0}
+% \end{macrocode}
+%
+% \begin{environment}{LWR@setvirtualpage} * \oarg{columns}
+%
+% If not nesting a minipage, adjust \cs{linewidth}, \cs{textwidth},
+% and \cs{textheight} for a virtual $6 \times 9$ page, and start on a new
+% \PDF\ page to help prevent page overflows.
+%
+% If starred, force a new page in the \PDF\ before generating more \HTML.
+% This may be done to reduce the chance of page overflow when starting a
+% new minipage.
+%
+% The optional number of columns defaults to 1.
+%
+% \changes{v0.79}{2020/01/08}{Factored.}
+% \begin{macrocode}
+\NewDocumentEnvironment{LWR@setvirtualpage}{s O{1}}{%
+ \ifnumequal{\value{LWR@virtualpagedepth}}{0}{%
+ \IfBooleanT{#1}{\LWR@orignewpage}%
+ \setlength{\linewidth}{6in/#2}%
+ \setlength{\textwidth}{6in}%
+ \setlength{\textheight}{9in}%
+ }{}%
+ \addtocounter{LWR@virtualpagedepth}{1}%
+}
+{\addtocounter{LWR@virtualpagedepth}{-1}}
+% \end{macrocode}
+% \end{environment}
+%
%
% \subsection{Footnote handling}
%
@@ -35019,42 +35582,31 @@ autopage-\theLWR@currentautosec%
\LWR@traceinfo{minipage}%
% \end{macrocode}
%
-% Temporarily open a group, in which width and height is
+% Start an environment, in which width and height is
% computed based on a virtual page size instead of
% the extra-large \PDF\ page used during \HTML\ tag generation.
%
-% The following used to be an actual \LaTeX\ minipage.
-% \changes{v0.45}{2017/12/01}{Fix: Improper \cs{prevdepth}.}
+% \changes{v0.79}{2020/01/07}{Fix: Adjust for virtual page size.}
% \begin{macrocode}
-\begingroup%
+\begin{LWR@setvirtualpage}*%
% \end{macrocode}
-% Compute width, adjusted for frames:
+%
+% Save the requested width now that \cs{linewidth}, etc. are adjusted to virtual size.
+% \changes{v0.79}{2020/01/07}{Fix: Adjust for virtual page size.}
% \begin{macrocode}
\setlength{\LWR@minipagewidth}{#4}%
-\ifthenelse{\cnttest{\value{LWR@minipagedepth}}{=}{0}}{%
-% \end{macrocode}
-% Only create a new page if not yet nested:
-% \begin{macrocode}
- \LWR@orignewpage%
-% \end{macrocode}
-% Adjust virtual page size:
-% \begin{macrocode}
+\ifnumequal{\value{LWR@virtualpagedepth}}{1}{%
\addtolength{\LWR@minipagewidth}{3em}% room for frames
- \setlength{\linewidth}{6in}%
- \setlength{\textwidth}{6in}%
- \setlength{\textheight}{9in}%
}{}%
\LWR@traceinfo{computed width is \LWR@printlength{\LWR@minipagewidth}}%
% \end{macrocode}
+%
% Compute height:
% \begin{macrocode}
\setlength{\LWR@minipageheight}{\textheight}% default unless specified
\ifblank{#2}{}{\setlength{\LWR@minipageheight}{#2}}%
% \end{macrocode}
-% Track nesting depth:
-% \begin{macrocode}
-\addtocounter{LWR@minipagedepth}{1}%
-% \end{macrocode}
+%
% \LaTeX{} wants to start a paragraph for the virtual minipage,
% then start a paragraph again for the contents of the minipage,
% so cancel the paragraph tag handling until the minipage has begun.
@@ -35062,6 +35614,7 @@ autopage-\theLWR@currentautosec%
\ifbool{FormatWP}{\newline}{}%
\LWR@stoppars%
% \end{macrocode}
+%
% If |FormatWP|, add a text frame:
% \changes{v0.42}{2017/10/26}{If \progcode{FormatWP} add a text frame.}
% \changes{v0.47}{2018/01/26}{Fix: Line wrap at \HTML\ hyphen.}
@@ -35076,6 +35629,7 @@ autopage-\theLWR@currentautosec%
}{}%
% \end{macrocode}
+%
% Create the \element{div} tag with optional alignment style:
% \changes{v0.47}{2018/01/26}{Fix: Line wrap at \HTML\ hyphen.}
% \begin{macrocode}
@@ -35089,6 +35643,7 @@ autopage-\theLWR@currentautosec%
\ifthenelse{\equal{#3}{b}}{\LWR@print@mbox{justify-content:flex-end} ; }{}%
\ifthenelse{\equal{#3}{s}}{\LWR@print@mbox{justify-content:space-between} ; }{}%
% \end{macrocode}
+%
% Print the width and optional height styles:
% \changes{v0.66}{2018/12/31}{Honor \cs{LWR@forceminipagefullwidth}.}
% \begin{macrocode}
@@ -35108,11 +35663,13 @@ autopage-\theLWR@currentautosec%
\ifblank{#2}{}{height:\LWR@printlength{\LWR@minipageheight} ; }%
"}%
% \end{macrocode}
+%
% Finish with an empty line to start the contents on a new line.
% \begin{macrocode}
% The preceding empty line is required.
% \end{macrocode}
+%
% Set the user-accessible line and text width and height values
% inside the virtual minipage.
% These do not affect the actual size of the \PDF\ output,
@@ -35122,22 +35679,26 @@ autopage-\theLWR@currentautosec%
% which is restored here. This is done instead of settings back to \#4,
% in case \#4 was \cs{linewidth}, which was changed to 6in above.
% \changes{v0.75}{2019/09/17}{Fix: \cs{linewidth}.}
+% \changes{v0.79}{2019/09/17}{Fix: \cs{linewidth} frame padding.}
% \begin{macrocode}
-\setlength{\linewidth}{\LWR@minipagewidth}% the padded width
-\addtolength{\linewidth}{-3em}% the original width
-\setlength{\textwidth}{6in}%
-\setlength{\textheight}{9in}%
+\ifnumequal{\value{LWR@virtualpagedepth}}{1}{%
+ \addtolength{\LWR@minipagewidth}{-3em}% undo frame padding
+}{}%
+\setlength{\linewidth}{\LWR@minipagewidth}%
% \end{macrocode}
+%
% \cs{raggedright} cancels hyphenation, which will be done by \HTML\ instead.
% \begin{macrocode}
\LWR@print@raggedright%
% \end{macrocode}
+%
% Set minipage footnotes:
% \begin{macrocode}
\def\@mpfn{mpfootnote}%
\def\thempfn{\thempfootnote}\c@mpfootnote\z@%
\let\@footnotetext\@mpfootnotetext%
% \end{macrocode}
+%
% Resume paragraph tag handling for the contents of the minipage:
% \changes{v0.42}{2017/10/18}{Added boolean \progcode{WPMarkMinipages}.}
% \begin{macrocode}
@@ -35151,11 +35712,13 @@ autopage-\theLWR@currentautosec%
}% finished \minipage
{% \endminipage
% \end{macrocode}
+%
% Print pending minipage footnotes:
% \changes{v0.45}{2017/12/01}{Fix: Improper \cs{prevdepth}.}
% \begin{macrocode}
\LWR@printpendingmpfootnotes%
% \end{macrocode}
+%
% End the environment with closing tag:
% \changes{v0.42}{2017/10/18}{Added boolean \progcode{WPMarkMinipages}.}
% \begin{macrocode}
@@ -35165,11 +35728,6 @@ autopage-\theLWR@currentautosec%
}{}%
\LWR@stoppars%
-% \end{macrocode}
-% The following used to be an actual \LaTeX\ minipage.
-% \changes{v0.45}{2017/12/01}{Fix: Improper \cs{prevdepth}.}
-% \begin{macrocode}
-\endgroup%
\ifbool{FormatWP}{%
@@ -35178,10 +35736,11 @@ autopage-\theLWR@currentautosec%
}{}%
\LWR@htmldivclassend{minipage}%
-\addtocounter{LWR@minipagedepth}{-1}%
+\end{LWR@setvirtualpage}%
\LWR@startpars%
\ifbool{FormatWP}{\newline}{}%
% \end{macrocode}
+%
% Prevent paragraph tags around horizontal white space
% until the start of the next paragraph:
% \begin{macrocode}
@@ -35284,44 +35843,45 @@ autopage-\theLWR@currentautosec%
% \changes{v0.70}{2019/04/02}{Fix: Accept long arg.}
% \changes{v0.70}{2019/04/02}{Fix: No width given.}
% \changes{v0.70}{2019/04/02}{Fix: Ignore width of 0pt.}
+% \changes{v0.79}{2020/01/07}{Fix: Adjust for virtual page size.}
% \begin{macrocode}
\NewDocumentCommand{\LWR@HTML@makebox}{>{\SplitArgument{1}{,}}d() o o +m}{%
% \end{macrocode}
%
% Build the style depending on arguments:
% \begin{macrocode}
-{% scope
- \def\LWR@temptwo{}%
- \IfValueTF{#1}%
- {% (width,height) ..
- \LWR@@makebox@paren #1%
- \IfValueT{#2}%
- {% (width,height) [posn]
- \LWR@@makebox@align{#2}%
+ \begin{LWR@setvirtualpage}%
+ \def\LWR@temptwo{}%
+ \IfValueTF{#1}%
+ {% (width,height) ..
+ \LWR@@makebox@paren #1%
+ \IfValueT{#2}%
+ {% (width,height) [posn]
+ \LWR@@makebox@align{#2}%
+ }%
}%
- }%
- {% [width]
- \IfValueT{#2}% [width]
- {%
- \setlength{\LWR@tempwidth}{#2}%
- \ifdimgreater{\LWR@tempwidth}{0pt}{%
- \appto{\LWR@temptwo}{%
- width:\LWR@printlength{\LWR@tempwidth} ; % space
- }%
- }{}%
+ {% [width]
+ \IfValueT{#2}% [width]
+ {%
+ \setlength{\LWR@tempwidth}{#2}%
+ \ifdimgreater{\LWR@tempwidth}{0pt}{%
+ \appto{\LWR@temptwo}{%
+ width:\LWR@printlength{\LWR@tempwidth} ; % space
+ }%
+ }{}%
+ }%
}%
- }%
- \IfValueT{#3}%
- {% [width] [posn]
- \LWR@@makebox@align{#3}%
- }%
- \InlineClass[%
- \LWR@print@mbox{display:inline-block} ; %
- \LWR@temptwo%
- ]%
- {makebox}%
- {#4}%
-}% scope
+ \IfValueT{#3}%
+ {% [width] [posn]
+ \LWR@@makebox@align{#3}%
+ }%
+ \InlineClass[%
+ \LWR@print@mbox{display:inline-block} ; %
+ \LWR@temptwo%
+ ]%
+ {makebox}%
+ {#4}%
+ \end{LWR@setvirtualpage}%
}
\LWR@formatted{makebox}
% \end{macrocode}
@@ -35529,10 +36089,19 @@ color:\LWR@origpound\LWR@tempcolor%
\NewDocumentEnvironment{LWR@HTML@fminipage}{O{t} o O{t} m}
{%
\LWR@traceinfo{fminipage #1 #2 #3 #4}%
-\LWR@forceminwidth{\fboxrule}%
+% \end{macrocode}
+%
+% Locally change to the virtual page size before processing the requested sizes:
+% \changes{v0.79}{2020/01/07}{Fix: Adjust for virtual page size.}
+% \begin{macrocode}
+\begin{LWR@setvirtualpage}*%
\setlength{\LWR@tempwidth}{#4}%
\IfValueT{#2}{\setlength{\LWR@tempheight}{#2}}%
% \end{macrocode}
+% Use a rule of at least one pixel in width:
+% \begin{macrocode}
+\LWR@forceminwidth{\fboxrule}%
+% \end{macrocode}
% \changes{v0.62}{2018/11/11}{Fix: Horiz white space.}
% \begin{macrocode}
\LWR@stoppars%
@@ -35556,7 +36125,9 @@ color:\LWR@origpound\LWR@tempcolor%
}
{%
\end{BlockClass}%
+\end{LWR@setvirtualpage}%
% \end{macrocode}
+%
% Prevent paragraph tags around horizontal white space
% until the start of the next paragraph:
% \changes{v0.62}{2018/11/11}{Fix: Horiz white space.}
@@ -36485,38 +37056,41 @@ color:\LWR@origpound\LWR@tempcolor%
}
% \end{macrocode}
%
-% Direct-formatting font sizes are ignored:
+% Direct-formatting font sizes are remembered for future use:
%
% \changes{v0.58}{2018/06/07}{Improved print/\HTML\ output selection.}
+% \changes{v0.79}{2020/01/01}{Remember \HTML\ font size.}
% \begin{macrocode}
-\newrobustcmd*{\LWR@HTML@normalsize}{}
+\newcommand*{\LWR@font@size}{normalsize}
+
+\newrobustcmd*{\LWR@HTML@normalsize}{\renewcommand*{\LWR@font@size}{normalsize}}
\LWR@formatted{normalsize}
-\newrobustcmd*{\LWR@HTML@small}{}
+\newrobustcmd*{\LWR@HTML@small}{\renewcommand*{\LWR@font@size}{small}}
\LWR@formatted{small}
-\newrobustcmd*{\LWR@HTML@footnotesize}{}
+\newrobustcmd*{\LWR@HTML@footnotesize}{\renewcommand*{\LWR@font@size}{footnotesize}}
\LWR@formatted{footnotesize}
-\newrobustcmd*{\LWR@HTML@scriptsize}{}
+\newrobustcmd*{\LWR@HTML@scriptsize}{\renewcommand*{\LWR@font@size}{scriptsize}}
\LWR@formatted{scriptsize}
-\newrobustcmd*{\LWR@HTML@tiny}{}
+\newrobustcmd*{\LWR@HTML@tiny}{\renewcommand*{\LWR@font@size}{tiny}}
\LWR@formatted{tiny}
-\newrobustcmd*{\LWR@HTML@large}{}
+\newrobustcmd*{\LWR@HTML@large}{\renewcommand*{\LWR@font@size}{large}}
\LWR@formatted{large}
-\newrobustcmd*{\LWR@HTML@Large}{}
+\newrobustcmd*{\LWR@HTML@Large}{\renewcommand*{\LWR@font@size}{Large}}
\LWR@formatted{Large}
-\newrobustcmd*{\LWR@HTML@LARGE}{}
+\newrobustcmd*{\LWR@HTML@LARGE}{\renewcommand*{\LWR@font@size}{LARGE}}
\LWR@formatted{LARGE}
-\newrobustcmd*{\LWR@HTML@huge}{}
+\newrobustcmd*{\LWR@HTML@huge}{\renewcommand*{\LWR@font@size}{huge}}
\LWR@formatted{huge}
-\newrobustcmd*{\LWR@HTML@Huge}{}
+\newrobustcmd*{\LWR@HTML@Huge}{\renewcommand*{\LWR@font@size}{Huge}}
\LWR@formatted{Huge}
% \end{macrocode}
%
@@ -37523,6 +38097,143 @@ color:\LWR@origpound\LWR@tempcolor%
% \begin{macrocode}
\end{warpHTML}
% \end{macrocode}
+
+
+
+
+% \section{\pkg{babel} and \pkg{polyglossia} warnings}
+% \label{sec:languages}
+%
+% \changes{v0.79}{2019/12/15}{\pkg{babel} and \pkg{polyglossia}: Added info messages.}
+%
+% \pkg{lwarp} prints a message instructing the user how to avoid the following error.
+%
+% (These are not \cs{PackageWarning}s because there may not be a problem.)
+%
+% \limitspolyglossia
+%
+% \codehtml
+% \begin{macrocode}
+\begin{warpHTML}
+\AtBeginDocument{
+
+\@ifpackageloaded{polyglossia}{
+ \PackageWarningNoLine{lwarp}
+ {%
+ Polyglossia has been loaded. Lwarp also uses cleveref.\MessageBreak
+ See the cleveref documentation regarding\MessageBreak
+ polyglossia support%
+ }
+ \typeout{If the error}
+ \typeout{\space\space``! Undefined control sequence.
+ \space ... \space \protect\@begindocumenthook''}
+ \typeout{occurs here, use the polyglossia macro:}
+ \typeout{\space\space\protect\setmainlanguage\protect{...\protect}}
+ \typeout{---}
+}{
+ \@ifpackageloaded{babel}{
+ \PackageWarningNoLine{lwarp}
+ {%
+ Babel has been loaded. Lwarp also uses cleveref.\MessageBreak
+ See the cleveref documentation regarding\MessageBreak
+ babel support%
+ }
+ }{}
+}
+
+}
+\end{warpHTML}
+% \end{macrocode}
+%
+%
+%
+%
+% \section{\brand{MathJax} warnings}
+% ^^A *mathjax
+%
+% \begin{macro}{\LWR@mathjaxwarn} \marg{packagename} \marg{More text.}
+%
+% To be done \cs{AtBeginDocument}.
+%
+% \changes{v0.79}{2020/01/18}{Warn if using packages not supported by \brand{MathJax}.}
+% \begin{macrocode}
+\newcommand*{\LWR@mathjaxwarn}[2]{%
+ \@ifpackageloaded{lwarp-#1}{%
+ \ifblank{#2}{%
+ \PackageWarningNoLine{lwarp}
+ {%
+ Lwarp provides emulation for MathJax when used\MessageBreak
+ with the #1 package%
+ }
+ }{%
+ \PackageWarningNoLine{lwarp}
+ {%
+ Lwarp provides emulation for MathJax when used\MessageBreak
+ with the #1 package.\MessageBreak
+ #2%
+ }
+ }%
+ }{}%
+}
+
+\AtBeginDocument{
+ \ifbool{mathjax}{
+ \LWR@mathjaxwarn{arydshln}
+ {In a math array, do not use the optional argument\MessageBreak
+ for \protect\cdashline.\space\space
+ Furthermore, \protect\cline\space is not\MessageBreak
+ supported by MathJax}
+ \LWR@mathjaxwarn{autonum}
+ {MathJax does not support equation+.\MessageBreak
+ You may use the warpprint and warpHTML\MessageBreak
+ environments to isolate the package load\MessageBreak
+ and the equation+ environments}
+ \LWR@mathjaxwarn{backnaur}
+ {You may enclose its uses inside\MessageBreak
+ lateximage environments to force SVG output,\MessageBreak
+ but this also changes the print output}
+ \LWR@mathjaxwarn{bigdelim}
+ {Delimiters appear only of the first line}
+ \LWR@mathjaxwarn{booktabs}
+ {In a math array, do not use (trim) for \protect\cmidrule}
+ \LWR@mathjaxwarn{breqn}
+ {Each environment becomes an SVG image}
+ \LWR@mathjaxwarn{delarray}
+ {Enclose its uses inside lateximage\MessageBreak
+ environments to force SVG output}
+ \LWR@mathjaxwarn{jkmath}{}
+ \LWR@mathjaxwarn{mathspec}{}
+ \LWR@mathjaxwarn{mathtools}
+ {Avoid starred macros.\MessageBreak
+ See the Lwarp manual for other limitations}
+ \LWR@mathjaxwarn{multirow}
+ {Multirow works as expected in text mode, but\MessageBreak
+ limited emulation is provided for MathJax math.\MessageBreak
+ \protect\multirow\space ignores all arguments except\MessageBreak
+ the text}
+ \LWR@mathjaxwarn{pb-diagram}
+ {Enclose its uses inside lateximage environments\MessageBreak
+ to force SVG output}
+ \LWR@mathjaxwarn{physics}
+ {The third-party extension is not yet used.\MessageBreak
+ Avoid starred macros and automatic delimiters.\MessageBreak
+ Use all mandatory arguments, adding empty as needed.\MessageBreak
+ See the Lwarp manual for details}
+ \LWR@mathjaxwarn{unicode-math}
+ {Not all characters are encoded correctly.\MessageBreak
+ Some symbol fonts are not supported by MathJax,\MessageBreak
+ and are only approximated}
+ \LWR@mathjaxwarn{witharrows}
+ {Arrows can only point to the next line.\MessageBreak
+ Text is only placed on a single line}
+ \LWR@mathjaxwarn{xy}
+ {xy works in text, but in math you must\MessageBreak
+ enclose its uses inside lateximage\MessageBreak
+ environments to force SVG output}
+ }{}
+}
+% \end{macrocode}
+% \end{macro}
%
%
% \iffalse
@@ -38807,6 +39518,14 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"%
}% not mathjax
% \end{macrocode}
%
+%
+% For nesting \AmS\ environments:
+% \begin{macrocode}
+\newcounter{LWR@amsmathdepth}
+\setcounter{LWR@amsmathdepth}{0}
+% \end{macrocode}
+%
+%
% The following \AmS\ environments are patched in-place:
%
% \changes{v0.44}{2017/11/16}{AMS environments: Fix: Groups for \env{lateximage}s.}
@@ -38835,24 +39554,28 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"%
% \begin{noindmacro}{\LWR@amsmathenv@before} \marg{environment name}
%
% Embeds the environment with \brand{MathJax} or a \env{lateximage}.
+% \changes{v0.79}{2020/01/31}{AMS environments: Fix: Nested.}
% \begin{macrocode}
\newcommand*{\LWR@amsmathenv@before}[1]{%
- \LWR@stoppars%
- \ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
- {
- \LWR@syncmathjax
- \boolfalse{LWR@amsmultline}
- \ifstrequal{#1}{multline}{\booltrue{LWR@amsmultline}}{}
- \ifstrequal{#1}{multline*}{\booltrue{LWR@amsmultline}}{}
+ \ifnumequal{\value{LWR@amsmathdepth}}{0}{%
+ \LWR@stoppars%
+ \ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
+ {
+ \LWR@syncmathjax
+ \boolfalse{LWR@amsmultline}
+ \ifstrequal{#1}{multline}{\booltrue{LWR@amsmultline}}{}
+ \ifstrequal{#1}{multline*}{\booltrue{LWR@amsmultline}}{}
% \end{macrocode}
% \pkg{autonum}'s ``+'' environments are not supported by \brand{MathJax}.
% \watchout
% \begin{macrocode}
- \LWR@beginhideamsmath
- }
- {
- \LWR@amsmathenv@@before{#1}
- }
+ \LWR@beginhideamsmath
+ }
+ {
+ \LWR@amsmathenv@@before{#1}
+ }
+ }{}
+ \addtocounter{LWR@amsmathdepth}{1}
}
% \end{macrocode}
% \end{noindmacro}
@@ -38862,6 +39585,7 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"%
%
% Embeds the environment inside a \env{lateximage}.
% \changes{v0.73}{2019/06/25}{AMS environments: Fix: Paragraph tags.}
+% \changes{v0.79}{2020/01/31}{AMS environments: Fix: Nested.}
% \begin{macrocode}
\newcommand*{\LWR@amsmathenv@@after}{%
\end{lateximage}\end{BlockClass}\LWR@startpars%
@@ -38875,18 +39599,21 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"%
% Embeds the environment with \brand{MathJax} or a \env{lateximage}.
% \begin{macrocode}
\newcommand*{\LWR@amsmathenv@after}[1]{%
- \ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
- {
- \LWR@endhideamsmath
- \boolfalse{LWR@amsmultline}
- \LWR@addmathjax{#1}{\the\@envbody}
- }
- {\LWR@amsmathenv@@after}
+ \ifnumequal{\value{LWR@amsmathdepth}}{1}{%
+ \ifboolexpr{bool{mathjax} or ( bool{FormatWP} and bool{WPMarkMath} ) }%
+ {
+ \LWR@endhideamsmath
+ \boolfalse{LWR@amsmultline}
+ \LWR@addmathjax{#1}{\the\@envbody}
+ }
+ {\LWR@amsmathenv@@after}
% \end{macrocode}
% Clear the single-use \attribute{alt} text:
% \changes{v0.74}{2019/08/20}{Add \cs{ThisAltText}.}
% \begin{macrocode}
-\gdef\LWR@ThisAltText{}%
+ \gdef\LWR@ThisAltText{}%
+ }{}
+ \addtocounter{LWR@amsmathdepth}{-1}
}
% \end{macrocode}
% \end{noindmacro}
@@ -38982,6 +39709,15 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"%
% \end{macrocode}
% \end{environment}
%
+%
+% For \brand{MathJax}:
+% \changes{v0.79}{2020/01/27}{\pkg{amsmath}: Added \brand{MathJax} emulation.}
+% \begin{macrocode}
+\begin{warpMathJax}
+\CustomizeMathJax{\newcommand{\intertext}[1]{\\ \text{#1}\notag \\}}
+\end{warpMathJax}
+% \end{macrocode}
+%
% \iffalse
%</amsmath>
% \fi
@@ -39459,6 +40195,17 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"%
\LWR@formatted{ARtt}
% \end{macrocode}
%
+%
+% For \brand{MathJax}:
+% \changes{v0.79}{2020/01/30}{\pkg{ar}: Added \brand{MathJax} emulation.}
+% \begin{macrocode}
+\begin{warpMathJax}
+\CustomizeMathJax{\newcommand{\AR}{\mathit{A\!\!R}}}
+\CustomizeMathJax{\newcommand{\ARb}{\boldsymbol{A\!\!R}}}
+\end{warpMathJax}
+% \end{macrocode}
+%
+%
% \iffalse
%</ar>
% \fi
@@ -39535,6 +40282,13 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"%
\LWR@formatted{tabularnewline}
% \end{macrocode}
%
+% For \brand{MathJax}:
+% \begin{macrocode}
+\CustomizeMathJax{
+\newcommand{\multicolumn}[3]{#3}% only uses one cell
+}
+% \end{macrocode}
+%
% \iffalse
%</array>
% \fi
@@ -39565,6 +40319,10 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"%
% a single-dashed rule is displayed as a single-dashed border, and
% a double-dashed rule is displayed as a thicker single-dashed border.
%
+% For \brand{MathJax}, limited emulation is provided for math mode.
+% \trouble{arydshln=\pkg{arydshln}}
+% \trouble{Mathjax=\brand{MathJax}>arydshln=\pkg{arydshln}}
+%
% \changes{v0.56}{2018/05/02}{\pkg{arydshln}: Added.}
%
% \codehtml
@@ -39661,6 +40419,16 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"%
\def\adl@inactivecdl[#1-#2][#3]{\ifnum0=`{\fi}\cline{#1-#2}}
% \end{macrocode}
+
+% \changes{v0.79}{2020/01/30}{\pkg{arydshln}: Added \brand{MathJax} emulation.}
+% \begin{macrocode}
+\begin{warpMathJax}
+\CustomizeMathJax{\newcommand{\firsthdashline}[1][]{\hdashline}}
+\CustomizeMathJax{\let\lasthdashline\firsthdashline}
+\CustomizeMathJax{\let\cdashline\cline}
+\end{warpMathJax}
+% \end{macrocode}
+
% \iffalse
%</arydshln>
% \fi
@@ -40116,6 +40884,86 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"%
%
%
%
+% \iffalse
+%<*awesomebox>
+% \fi
+%
+% \part{lwarp-awesomebox.sty}
+%
+% \section{awesomebox}
+%
+% \credits{\'{E}tienne Deparis}
+%
+% \DescribePackage{awesomebox}
+% \pkg{awesomebox} is patched for use by \pkg{lwarp}.
+%
+% \changes{v0.79}{2020/01/01}{\pkg{awesomebox}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackagePass{awesomebox}[2019/07/27]
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcommand*{\LWR@awesomebox@boxborders}{}%
+\newcommand*{\LWR@awesomebox@contentsborders}{}%
+
+\newcommand*{\LWR@awesomebox@ruleborders}{%
+ border-top: 1px solid black ;
+ border-bottom: 1px solid black%
+}
+
+% \awesomebox[1:vrulecolor][2:hrule][3:title]{4:vrulewidth}{5:icon}{6:iconcolor}{7:content}
+\RenewDocumentCommand \awesomebox { O{abvrulecolor} O{} o m m m +m }{%
+ \begin{awesomeblock}[#1][#2][#3]{#4}{#5}{#6}
+ #7
+ \end{awesomeblock}
+}
+
+% \begin{awesomeblock}[1:vrulecolor][2:hrule][3:title]{4:vrulewidth}{5:icon}{6:iconcolor}
+% <contents>
+% \end{awesomeblock}
+\RenewDocumentEnvironment{awesomeblock}{ O{abvrulecolor} O{} o m m m }
+{%
+ \LWR@forceminwidth{#4}%
+ \convertcolorspec{named}{#1}{HTML}\LWR@tempcolor%
+ \renewcommand*{\LWR@awesomebox@boxborders}{}%
+ \renewcommand*{\LWR@awesomebox@contentsborders}{}%
+ \ifdefstrequal{\abShortLine}{#2}{%
+ \renewcommand*{\LWR@awesomebox@contentsborders}{\LWR@awesomebox@ruleborders}%
+ }{}%
+ \ifdefstrequal{\abLongLine}{#2}{%
+ \renewcommand*{\LWR@awesomebox@boxborders}{\LWR@awesomebox@ruleborders}%
+ }{}%
+ \begin{BlockClass}[\LWR@awesomebox@boxborders]{awesomebox}
+ \begin{BlockClass}[%
+ margin-left: 2\% ;
+ vertical-align: top
+ ]{minipage}
+ \color{#6}\Huge #5
+ \end{BlockClass}
+ \begin{BlockClass}[%
+ width:75\% ;
+ vertical-align: top ;
+ padding-left: 1em ;
+ \LWR@awesomebox@contentsborders ;
+ border-left: \LWR@printlength{\LWR@atleastonept} %
+ solid \LWR@origpound\LWR@tempcolor%
+ ]{minipage}
+ \IfValueTF{#3}{#3\newline}{}
+}
+{%
+ \end{BlockClass}
+ \end{BlockClass}
+}
+% \end{macrocode}
+%
+% \iffalse
+%</awesomebox>
+% \fi
+%
+%
%
% \iffalse
%<*axessibility>
@@ -40756,6 +41604,22 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"%
\LWR@formatted{rdelim}
% \end{macrocode}
+
+% Limited emulation for \brand{MathJax}.
+% The delimiter is printed on the first row, along with any optional text.
+% \changes{v0.79}{2020/01/20}{\pkg{bigdelim}: Added \brand{MathJax} emulation.}
+% \begin{macrocode}
+\begin{warpMathJax}
+\CustomizeMathJax{
+% \ldelim ( [n]{width}[text]
+ \newcommand{\LWRldelim}[1][]{\text{#1}~\LWRbigdelim}
+ \def\ldelim#1#2#3{\def\LWRbigdelim{#1}\LWRldelim}
+% \rdelim ) [n]{width}[text]
+ \newcommand{\LWRrdelim}[1][]{\LWRbigdelim~\text{#1}}
+ \def\rdelim#1#2#3{\def\LWRbigdelim{#1}\LWRrdelim}
+}
+\end{warpMathJax}
+% \end{macrocode}
%
% \iffalse
%</bigdelim>
@@ -40838,6 +41702,14 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"%
\appto\LWR@restoreorigformatting{%
\LetLtxMacro\bigstrut\LWR@origbigstrut%
}
+
+% \end{macrocode}
+%
+% \changes{v0.79}{2020/01/20}{\pkg{bigstrut}: Added \brand{MathJax} emulation.}
+% \begin{macrocode}
+\CustomizeMathJax{
+ \newcommand{\bigstrut}[1][]{}
+}
% \end{macrocode}
%
%
@@ -40921,6 +41793,51 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"%
%
%
%
+% \iffalse
+%<*bm>
+% \fi
+%
+% \part{lwarp-bm.sty}
+%
+% \section{bm}
+%
+% \credits{David Carlisle, Frank Mittelbach}
+%
+% \DescribePackage{bm}
+% \pkg{bm} is patched for use by \pkg{lwarp}.
+%
+% \changes{v0.79}{2020/02/18}{\pkg{bm}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackagePass{bm}[2019/07/24]
+% \end{macrocode}
+%
+% \cs{DeclareBoldMathCommand} must only be used in the preamble, since it
+% adds to the \brand{MathJax} setup code.
+%
+% \begin{macrocode}
+\begin{warpMathJax}
+\LetLtxMacro\LWR@orig@DeclareBoldMathCommand\DeclareBoldMathCommand
+
+\renewcommand\DeclareBoldMathCommand[3][bold]{%
+ \LWR@orig@DeclareBoldMathCommand[#1]{#2}{#3}%
+ \CustomizeMathJax{\newcommand{#2}{\boldsymbol{#3}}}%
+}
+
+\@onlypreamble\DeclareBoldMathCommand
+
+\CustomizeMathJax{\newcommand{\bm}[1]{\boldsymbol{#1}}}
+\end{warpMathJax}
+% \end{macrocode}
+%
+% \iffalse
+%</bm>
+% \fi
+%
+%
+%
%
% \iffalse
%<*booklet>
@@ -41022,20 +41939,34 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"%
% \pkg{booktabs} is emulated during \HTML\ output, and
% used as-is during print output and inside an \HTML\ \env{lateximage}.
%
+% For \brand{MathJax}, emulation is provided in math mode, but \watchout[\cs{cmidrule}]
+% \trouble{booktabs=\pkg{booktabs}}
+% \trouble{Mathjax=\brand{MathJax}>booktabs=\pkg{booktabs}}
+% \cs{cmidrule} trim must not be used.
+%
% \changes{v0.34}{2017/08/08}{\pkg{booktabs}: Works inside \env{lateximage}.}
%
% \codehtml
%
-% First, forget the placeholder macros:
+% If \pkg{booktabs} has already been loaded before \pkg{lwarp},
+% such as by \pkg{memoir}, use it as-is.
+% If not, the \pkg{lwarp} core will have placed some dummy macros which should
+% be removed before loading the actual \pkg{booktabs} definitions.
+% \changes{v0.79}{2019/12/09}{\pkg{booktabs}: Fix for \pkg{memoir} with \env{lateximage}.}
+% \begin{macrocode}
+\@ifpackageloaded{booktabs}{}{
+ \LetLtxMacro\toprule\relax
+ \LetLtxMacro\midrule\relax
+ \LetLtxMacro\cmidrule\cline
+ \LetLtxMacro\bottomrule\relax
+ \LetLtxMacro\addlinespace\relax
+ \LetLtxMacro\morecmidrules\relax
+ \LetLtxMacro\specialrule\relax
+}
+% \end{macrocode}
+%
+% Next, load the \pkg{booktabs} package:
% \begin{macrocode}
-\LetLtxMacro\toprule\relax
-\LetLtxMacro\midrule\relax
-\LetLtxMacro\cmidrule\cline
-\LetLtxMacro\bottomrule\relax
-\LetLtxMacro\addlinespace\relax
-\LetLtxMacro\morecmidrules\relax
-\LetLtxMacro\specialrule\relax
-
\LWR@ProvidesPackagePass{booktabs}[2019/10/08]
% \end{macrocode}
%
@@ -41058,7 +41989,7 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"%
{%
\ifbool{FormatWP}%
{\LWR@docmidrule[#1](){1-\arabic{LWR@tabletotalLaTeXcols}}}%
- {\global\booltrue{LWR@doingtbrule}}%
+ {\booltrue{LWR@doingtbrule}}%
}%
\LWR@getmynexttoken}
@@ -41071,7 +42002,7 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"%
{%
\ifbool{FormatWP}%
{\LWR@docmidrule[#1](){1-\arabic{LWR@tabletotalLaTeXcols}}}%
- {\addtocounter{LWR@hlines}{1}}%
+ {\defaddtocounter{LWR@hlines}{1}}%
}%
\LWR@getmynexttoken}
@@ -41090,7 +42021,7 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"%
{%
\ifbool{FormatWP}%
{\LWR@docmidrule[#1](){1-\arabic{LWR@tabletotalLaTeXcols}}}%
- {\global\booltrue{LWR@doingtbrule}}%
+ {\booltrue{LWR@doingtbrule}}%
}%
\LWR@getmynexttoken%
}%
@@ -41111,6 +42042,22 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"%
\LWR@expandableformatted{specialrule}
% \end{macrocode}
%
+%
+% For \brand{MathJax}:
+% \changes{v0.79}{2020/01/30}{\pkg{booktabs}: Added \brand{MathJax} emulation.}
+% \begin{macrocode}
+\begin{warpMathJax}
+\CustomizeMathJax{\newcommand{\toprule}[1][]{\hline}}
+\CustomizeMathJax{\let\midrule\toprule}
+\CustomizeMathJax{\let\bottomrule\toprule}
+\CustomizeMathJax{\newcommand{\cmidrule}[2][]{}}% avoid (trim)
+\CustomizeMathJax{\newcommand{\morecmidrules}{}}
+\CustomizeMathJax{\newcommand{\specialrule}[3]{\hline}}
+\CustomizeMathJax{\newcommand{\addlinespace}[1][]{}}
+\end{warpMathJax}
+% \end{macrocode}
+%
+%
% \iffalse
%</booktabs>
% \fi
@@ -41220,6 +42167,49 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"%
%
%
%
+%
+% \iffalse
+%<*braket>
+% \fi
+%
+% \part{lwarp-braket.sty}
+%
+% \section{braket}
+%
+% \credits{Donald Arseneau}
+%
+% \DescribePackage{braket}
+% \pkg{braket} works as-is for \HTML\ with \SVG\ math.
+% For \brand{MathJax}, emulation is provided by \brand{MathJax} macros.
+%
+% \changes{v0.79}{2020/01/29}{\pkg{braket}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackagePass{braket}% No date is provided by the file.
+% \end{macrocode}
+%
+% \begin{macrocode}
+\begin{warpMathJax}
+\CustomizeMathJax{\newcommand{\bra}[1]{\langle#1\vert}}
+\CustomizeMathJax{\newcommand{\Bra}[1]{\left\langle#1\right\vert}}
+\CustomizeMathJax{\newcommand{\ket}[1]{\vert#1\rangle}}
+\CustomizeMathJax{\newcommand{\Ket}[1]{\left\vert#1\right\rangle}}
+\CustomizeMathJax{\newcommand{\braket}[1]{\langle#1\rangle}}
+\CustomizeMathJax{\newcommand{\Braket}[1]{\left\langle#1\right\rangle}}
+\CustomizeMathJax{\newcommand{\set}[1]{\{#1\}}}
+\CustomizeMathJax{\newcommand{\Set}[1]{\left\{#1\right\}}}
+\end{warpMathJax}
+% \end{macrocode}
+%
+% \iffalse
+%</braket>
+% \fi
+%
+%
+%
+%
% \iffalse
%<*breakurl>
% \fi
@@ -41283,12 +42273,12 @@ span style="width:\LWR@printlength{\ALG@thistlm}; display:inline-block;"%
% \DescribePackage{breqn}
% \pkg{breqn} is patched for use by \pkg{lwarp}.
%
-% \env{darray} is not supported.
+% \env{darray} is not supported, and in fact does not work in
+% the print version either.
% \trouble[\env{darray}]{breqn=\pkg{breqn}>darray}
%
-% MathJax does not support \pkg{breqn}.
-% \trouble[\brand{MathJax}]{breqn=\pkg{breqn}>MathJax=\brand{MathJax}}
-% \trouble{MathJax=\brand{MathJax}>breqn=\pkg{breqn}}
+% While using \brand{MathJax}, \pkg{breqn} objects are
+% converted to \SVG\ images.
%
% \changes{v0.59}{2018/07/25}{\pkg{breqn}: Added.}
%
@@ -41597,8 +42587,8 @@ s%
\typeout{---}
\typeout{Packages lwarp and caption:}
\typeout{If a ``Missing \protect\begin\protect{document\protect}'' error occurs here,}
-\typeout{try using \space \protect\usepackage\protect{caption\protect}\space\protect\captionsetup{options}}
-\typeout{instead of \protect\usepackage[options]\protect{caption\protect}.}
+\typeout{try using: \space \protect\usepackage\protect{caption\protect}\space\protect\captionsetup{options}}
+\typeout{instead of: \protect\usepackage[options]\protect{caption\protect}.}
\typeout{---}
\LWR@ProvidesPackagePass{caption}[2019/09/01]
@@ -41813,10 +42803,7 @@ s%
% \pkg{cases} is patched for use by \pkg{lwarp}.
%
%
-%
-% MathJax does not support \pkg{cases}.
-% \trouble[\brand{MathJax}]{cases=\pkg{cases}>MathJax=\brand{MathJax}}
-% \trouble{MathJax=\brand{MathJax}>cases=\pkg{cases}}
+% While using \brand{MathJax}, \pkg{cases} objects are converted to \SVG\ math images.
%
% \changes{v0.58}{2018/06/08}{\pkg{cases}: Added.}
%
@@ -44133,8 +45120,8 @@ name = \chemmacros_translate:n {scheme-name}
% \changes{v0.57}{2018/06/02}{\pkg{colortbl}: New system for switching print and \HTML\ outputs.}
% \begin{macrocode}
\NewDocumentCommand{\LWR@HTML@columncolor}{O{named} m o o}{%
-\convertcolorspec{#1}{#2}{HTML}\LWR@columnHTMLcolor%
-\LWR@addtabularcellcolor%
+ \convertcolorspec{#1}{#2}{HTML}\LWR@columnHTMLcolor%
+ \LWR@addtabularcellcolor%
}
\AtBeginDocument{\LWR@formatted{columncolor}}
@@ -44151,8 +45138,8 @@ name = \chemmacros_translate:n {scheme-name}
% \changes{v0.57}{2018/06/02}{\pkg{colortbl}: New system for switching print and \HTML\ outputs.}
% \begin{macrocode}
\NewDocumentCommand{\LWR@HTML@rowcolor}{O{named} m o o}{%
-\convertcolorspec{#1}{#2}{HTML}\LWR@rowHTMLcolor%
-\LWR@getmynexttoken%
+ \convertcolorspec{#1}{#2}{HTML}\LWR@rowHTMLcolor%
+ \LWR@getmynexttoken%
}
\AtBeginDocument{\LWR@expandableformatted{rowcolor}}
@@ -44165,8 +45152,8 @@ name = \chemmacros_translate:n {scheme-name}
% \changes{v0.57}{2018/06/02}{\pkg{colortbl}: New system for switching print and \HTML\ outputs.}
% \begin{macrocode}
\NewDocumentCommand{\LWR@HTML@cellcolor}{O{named} m o o}{%
-\convertcolorspec{#1}{#2}{HTML}\LWR@cellHTMLcolor%
-\LWR@addtabularcellcolor%
+ \convertcolorspec{#1}{#2}{HTML}\LWR@cellHTMLcolor%
+ \LWR@addtabularcellcolor%
}
\AtBeginDocument{\LWR@formatted{cellcolor}}
@@ -44181,7 +45168,7 @@ name = \chemmacros_translate:n {scheme-name}
% \changes{v0.57}{2018/06/02}{\pkg{colortbl}: New system for switching print and \HTML\ outputs.}
% \begin{macrocode}
\newcommand{\LWR@HTML@arrayrulecolor}[2][named]{%
-\convertcolorspec{#1}{#2}{HTML}\LWR@ruleHTMLcolor%
+ \convertcolorspec{#1}{#2}{HTML}\LWR@ruleHTMLcolor%
}
\AtBeginDocument{\LWR@expandableformatted{arrayrulecolor}}
@@ -44195,8 +45182,8 @@ name = \chemmacros_translate:n {scheme-name}
% \changes{v0.57}{2018/06/02}{\pkg{colortbl}: New system for switching print and \HTML\ outputs.}
% \begin{macrocode}
\newcommand{\LWR@HTML@arrayrulecolornexttoken}[2][named]{%
-\convertcolorspec{#1}{#2}{HTML}\LWR@ruleHTMLcolor%
-\LWR@getmynexttoken%
+ \convertcolorspec{#1}{#2}{HTML}\LWR@ruleHTMLcolor%
+ \LWR@getmynexttoken%
}
\AtBeginDocument{\LWR@expandableformatted{arrayrulecolornexttoken}}
@@ -45661,6 +46648,12 @@ name = \chemmacros_translate:n {scheme-name}
\newcommand{\cleartoevenpage}[1][]{}
% \end{macrocode}
%
+% \changes{v0.79}{2020/01/06}{\pkg{epigraph}: Updated to v1.5e.}
+% \begin{macrocode}
+\newif\ifepigraphnoindent
+\newcommand\epigraphnoindent{\epigraphnoindenttrue}
+% \end{macrocode}
+%
% \iffalse
%</epigraph>
% \fi
@@ -47560,22 +48553,34 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
% \begin{noindenvironment} \oarg{offset} \marg{type} \marg{width}
% Borrowed from the \pkg{lwarp} version of \pkg{keyfloat}:
% \changes{v0.42}{2017/10/26}{\pkg{floatflt}: Added width.}
+% \changes{v0.79}{2020/01/08}{\pkg{floatflt}: Improved width control.}
% \begin{macrocode}
\NewDocumentEnvironment{KFLTfloatflt@marginfloat}{O{-1.2ex} m m}
{%
-\setlength{\LWR@templengthone}{#3}%
-\LWR@BlockClassWP{%
- float:right; %
- width:\LWR@printlength{\LWR@templengthone}; % extra space
- margin:10pt%
-}{%
- width:\LWR@printlength{\LWR@templengthone}%
-}%
-{marginblock}%
-\captionsetup{type=#2}%
+ \begin{LWR@setvirtualpage}*%
+ \ifblank{#3}{%
+ \LWR@BlockClassWP{%
+ float:right; %
+ width: 1.5in; % reasonable dummy width for word processor
+ margin:10pt%
+ }{}%
+ {marginblock}%
+ }{%
+ \setlength{\LWR@templengthone}{#3}%
+ \LWR@BlockClassWP{%
+ float:right; %
+ width:\LWR@printlength{\LWR@templengthone}; % extra space
+ margin:10pt%
+ }{%
+ width:\LWR@printlength{\LWR@templengthone}%
+ }%
+ {marginblock}%
+ }%
+ \captionsetup{type=#2}%
}
{%
-\endLWR@BlockClassWP%
+ \endLWR@BlockClassWP%
+ \end{LWR@setvirtualpage}%
}
% \end{macrocode}
% \end{noindenvironment}
@@ -47591,7 +48596,7 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
% \begin{noindenvironment}{floatingtable} \oarg{placement}
% \begin{macrocode}
\DeclareDocumentEnvironment{floatingtable}{o}
- {\begin{KFLTfloatflt@marginfloat}{table}{1.5in}}
+ {\begin{KFLTfloatflt@marginfloat}{table}{}}
{\end{KFLTfloatflt@marginfloat}}
% \end{macrocode}
% \end{noindenvironment}
@@ -47821,22 +48826,19 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
% \begin{noindenvironment}{floatrow} \oarg{numfloats}
% \changes{v0.20}{2016/08/20}{Fix: \cs{linewidth} in a floatrow.}
+% \changes{v0.79}{2020/01/10}{Factored to \cs{LWR@setvirtualpage}.}
+% \changes{v0.79}{2020/01/10}{Fix: Use full \cs{linewidth}.}
%
% The row of floats is placed into a \element{div} of class |floatrow|.
% \begin{macrocode}
\newenvironment*{floatrow}[1][2]
-{
-\LWR@forcenewpage
-\BlockClass{floatrow}
-% \end{macrocode}
-% While inside the floatrow, divide the \cs{linewidth} by the number of floats.
-% \begin{macrocode}
-\booltrue{LWR@infloatrow}
-\setlength{\linewidth}{6in/#1}
+{%
+ \begin{LWR@setvirtualpage}*%
+ \BlockClass{floatrow}%
}
{
-\boolfalse{LWR@infloatrow}
-\endBlockClass
+ \endBlockClass%
+ \end{LWR@setvirtualpage}%
}
% \end{macrocode}
% \end{noindenvironment}
@@ -47877,26 +48879,31 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
\LWR@traceinfo{finished setkeys frowkeys}%
% \end{macrocode}
% Create a new float with optional [within]:
+% \changes{v0.79}{2020/01/10}{Fix: Use \pkg{newfloat} instead of \pkg{float}.}
% \begin{macrocode}
\ifthenelse{\equal{\LWR@frowkeywithin}{}}%
{%
- \LWR@traceinfo{about to newfloat #1 \LWR@frowkeyplacement\ %
- \LWR@frowkeyfileext}%
- \newfloat{#1}{\LWR@frowkeyplacement}{\LWR@frowkeyfileext}%
+ \DeclareFloatingEnvironment[
+ placement=\LWR@frowkeyplacement,
+ fileext=\LWR@frowkeyfileext
+ ]{#1}%
}%
{%
- \LWR@traceinfo{about to newfloat #1\ \LWR@frowkeyplacement\ %
- \LWR@frowkeyfileext\ \LWR@frowkeywithin}%
- \newfloat{#1}{\LWR@frowkeyplacement}%
- {\LWR@frowkeyfileext}[\LWR@frowkeywithin]%
- \LWR@traceinfo{finished newfloat #1}%
+ \DeclareFloatingEnvironment[
+ placement=\LWR@frowkeyplacement,
+ fileext=\LWR@frowkeyfileext,
+ within=\LWR@frowkeywithin
+ ]{#1}%
+% \LWR@traceinfo{finished newfloat #1}%
}%
% \end{macrocode}
% Rename the float if a name was given:
% \begin{macrocode}
\ifthenelse{\equal{\LWR@frowkeyname}{}}%
{}%
- {\floatname{#1}{\LWR@frowkeyname}}%
+ {%
+ \SetupFloatingEnvironment{#1}{name={\LWR@frowkeyname}}%
+ }%
}
% \end{macrocode}
% \end{noindmacro}
@@ -48258,6 +49265,8 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
% For \XeLaTeX\ and \LuaLaTeX, the \attribute{alt} tag is generic.
%
% \changes{v0.67}{2019/02/22}{\pkg{fontawesome}: Added.}
+% \changes{v0.79}{2020/01/01}{\pkg{fontawesome}: Supports font size, color.}
+% \changes{v0.79}{2020/01/01}{\pkg{fontawesome}: Refactored with fix for \cs{FAthree}.}
%
% \codehtml
%
@@ -48273,12 +49282,12 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
\newfontfamily{\LWR@orig@FA}{FontAwesome}
\newcommand*{\LWR@fontawesome@xelatex@symbol}[1]{%
-\begin{lateximage}*[icon][fontawesomexetex#1]%
-\begingroup%
-\LWR@orig@FA%
-\LWR@orig@symbol{#1}%
-\endgroup%
-\end{lateximage}%
+ \LWR@findcurrenttextcolor%
+ \begin{lateximage}*[icon][fontawesomexetex#1SZ\LWR@font@size{}CL\LWR@tempcolor]%
+ \csuse{\LWR@font@size}%
+ \LWR@orig@FA%
+ \LWR@orig@symbol{#1}%
+ \end{lateximage}%
}
\RenewDocumentCommand{\FA}{}{%
@@ -48287,31 +49296,25 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
\else
+\newcommand*{\LWR@fontawesome@symbolX}[2]{%
+ \LWR@findcurrenttextcolor%
+ \begin{lateximage}*[icon #1][fontawesome#2#1SZ\LWR@font@size{}CL\LWR@tempcolor]%
+ \csuse{\LWR@font@size}%
+ \fontencoding{U}\fontfamily{fontawesome#2}\selectfont%
+ \LWR@orig@symbol{#1}%
+ \end{lateximage}%
+}
+
\newcommand*{\LWR@fontawesome@symbolone}[1]{%
-\begin{lateximage}*[icon #1][fontawesomeone#1]%
-\begingroup%
-\fontencoding{U}\fontfamily{fontawesomeone}\selectfont%
-\LWR@orig@symbol{#1}%
-\endgroup%
-\end{lateximage}%
+ \LWR@fontawesome@symbolX{#1}{one}%
}
\newcommand*{\LWR@fontawesome@symboltwo}[1]{%
-\begin{lateximage}*[icon #1][fontawesometwo#1]%
-\begingroup%
-\fontencoding{U}\fontfamily{fontawesometwo}\selectfont%
-\LWR@orig@symbol{#1}%
-\endgroup%
-\end{lateximage}%
+ \LWR@fontawesome@symbolX{#1}{two}%
}
\newcommand*{\LWR@fontawesome@symbolthree}[1]{%
-\begin{lateximage}*[icon #1][fontawesomethree#1]%
-\begingroup%
-\fontencoding{U}\fontfamily{fontawesomeonethree}\selectfont%
-\LWR@orig@symbol{#1}%
-\endgroup%
-\end{lateximage}%
+ \LWR@fontawesome@symbolX{#1}{three}%
}
\renewrobustcmd\FAone{%
@@ -48354,6 +49357,7 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
% The \attribute{alt} tag has the name of the icon.
%
% \changes{v0.67}{2019/02/22}{\pkg{fontawesome5}: Added.}
+% \changes{v0.79}{2020/01/01}{\pkg{fontawesome5}: Supports font size, color.}
%
% \codehtml
%
@@ -48364,8 +49368,10 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
% \begin{macrocode}
\ExplSyntaxOn
\cs_set:Nn\fontawesome_use_icon:nn{
+ \LWR@findcurrenttextcolor
\cs_if_exist:cTF{c__fontawesome_slot_#2_tl}{
- \begin{lateximage}*[#2][#1]
+ \begin{lateximage}*[#2][fontawesome5#1SZ\LWR@font@size{}CL\LWR@tempcolor]
+ \csuse{\LWR@font@size}
\exp_last_unbraced:Nv
\__fontawesome_icon_at:nnnn
{c__fontawesome_slot_#2_tl}
@@ -49584,7 +50590,7 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
%
%
% Handle \optn{origin} key:
-% \changes{v0.52}{2018/03/27}{pkg{graphics}: Added defaults.}
+% \changes{v0.52}{2018/03/27}{\pkg{graphics}: Added defaults.}
% \begin{macrocode}
\define@key{igraph}{origin}[c]{%
\renewcommand*{\LWR@igorigin}{#1}%
@@ -49605,7 +50611,7 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
%
% Handle \optn{alt} key:
% \changes{v0.65}{2018/12/19}{\pkg{graphics}: Added \cs{includegraphics} \attribute{alt} key.}
-% \changes{v0.74}{2019/08/20}{Add \cs{ThisAltText}.}
+% \changes{v0.74}{2019/08/20}{\pkg{graphics}: Add \cs{ThisAltText}.}
% \begin{macrocode}
\define@key{igraph}{alt}{\renewcommand*{\LWR@igalt}{#1}}
% \end{macrocode}
@@ -49630,7 +50636,7 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
% \end{macrocode}
%
% Numerous ignored keys:
-% \changes{v0.52}{2018/03/27}{pkg{graphics}: Added defaults.}
+% \changes{v0.52}{2018/03/27}{\pkg{graphics}: Added defaults.}
% \begin{macrocode}
\define@key{igraph}{bb}{}
\define@key{igraph}{bbllx}{}
@@ -49652,7 +50658,7 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
\define@key{igraph}{command}{}
% \end{macrocode}
% New in v1.1a:
-% \changes{v0.52}{2018/03/27}{pkg{graphicx}: Updated for v1.1a.}
+% \changes{v0.52}{2018/03/27}{\pkg{graphics}: Updated for v1.1a.}
% \begin{macrocode}
\define@key{igraph}{quite}{}
\define@key{igraph}{page}{}
@@ -49660,7 +50666,7 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
\define@key{igraph}{interpolate}[true]{}
% \end{macrocode}
% New in v1.1b:
-% \changes{v0.52}{2018/03/27}{pkg{graphicx}: Updated for v1.1b.}
+% \changes{v0.52}{2018/03/27}{\pkg{graphics}: Updated for v1.1b.}
% \begin{macrocode}
\define@key{igraph}{decodearray}{}
% \end{macrocode}
@@ -49668,21 +50674,24 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
% \subsection{Printing \HTML\ styles}
-% \begin{macro}{\LWR@rotstyle} \marg{prefix} \marg{degrees}
+% \begin{noindmacro}{\LWR@rotstyle} \marg{prefix} \marg{degrees}
%
% Prints the rotate style with the given prefix.
%
% |prefix| is |-ms-| or |-webkit-| or nothing, and is used to generate
% three versions of the |transform:rotate| style.
+% \changes{v0.79}{2019/12/05}{\pkg{graphics}: Fix for negative angles.}
% \begin{macrocode}
\newcommand*{\LWR@rotstyle}[2]{%
- #1transform:rotate(-#2deg);
+ \edef\LWR@tempone{#2}%
+ \setcounter{LWR@tempcountone}{-1*\real{\LWR@tempone}} % space
+ #1transform:rotate(\arabic{LWR@tempcountone}deg); % space
}
% \end{macrocode}
-% \end{macro}
+% \end{noindmacro}
-% \begin{macro}{\LWR@scalestyle} \marg{prefix} \marg{xscale} \marg{yscale}
+% \begin{noindmacro}{\LWR@scalestyle} \marg{prefix} \marg{xscale} \marg{yscale}
%
% Prints the scale style with the given prefix.
%
@@ -49690,56 +50699,50 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
% three versions of the |transform:scale| style.
% \begin{macrocode}
\newcommand*{\LWR@scalestyle}[3]{%
- #1transform:scale(#2,#3);
+ #1transform:scale(#2,#3);
}
% \end{macrocode}
-% \end{macro}
+% \end{noindmacro}
% \subsection{\cs{includegraphics}}
-% \DescribeBoolean{LWR@infloatrow}
-% Used to compute \cs{linewidth}.
-% \begin{macrocode}
-\newbool{LWR@infloatrow}
-\boolfalse{LWR@infloatrow}
-% \end{macrocode}
-% \begin{macro}{\LWR@opacity} For \HTML, used only for \cs{includegraphics}.
+% \begin{noindmacro}{\LWR@opacity} For \HTML, used only for \cs{includegraphics}.
%
% \cs{LWR@opacity} may be set by the \pkg{transparent} package.
% \begin{macrocode}
\def\LWR@opacity{1}
% \end{macrocode}
-% \end{macro}
+% \end{noindmacro}
-% \begin{macro}{\LWR@imagesizebox}
+% \begin{noindmacro}{\LWR@imagesizebox}
% Used to determine the actual image size if needed.
% \begin{macrocode}
\newsavebox{\LWR@imagesizebox}
% \end{macrocode}
-% \end{macro}
+% \end{noindmacro}
-% \begin{macro}{\LWR@HTML@Gin@setfile} \marg{w} \marg{h} \marg{filename}
+% \begin{noindmacro}{\LWR@HTML@Gin@setfile} \marg{w} \marg{h} \marg{filename}
% Sets the parsed filename for \HTML\ output.
% \begin{macrocode}
\newcommand*{\LWR@HTML@Gin@setfile}[3]{%
\xdef\LWR@parsedfilename{#3}%
}
% \end{macrocode}
-% \end{macro}
+% \end{noindmacro}
% \DescribeKey[Gin]{class} \CSS\ class for the image.
%
% Define the new class key for the print-mode version of \cs{includegraphics},
% which is enabled inside a \env{lateximage}.
-% \changes{v0.42}{2017/10/24}{\pkg{includegraphics}: Fix: Class key.}
+% \changes{v0.42}{2017/10/24}{\pkg{graphics}: Fix: Class key.}
% \changes{v0.65}{2018/12/19}{\pkg{graphics}: Added \cs{includegraphics} \attribute{alt} key.}
% \begin{macrocode}
\AtBeginDocument{
@@ -49749,7 +50752,7 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
% \end{macrocode}
-% \begin{macro}{\LWR@replaceEPSSVG}
+% \begin{noindmacro}{\LWR@replaceEPSSVG}
%
% Usually, references to \EPS\ files become \SVG\ files,
% but if the \pkg{epstopdf} package is being used, it automatically
@@ -49767,10 +50770,173 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
}%
}
% \end{macrocode}
-% \end{macro}
+% \end{noindmacro}
+
+
+% \begin{noindmacro}{\LWR@ig@wpimagesizes} * \oarg{2: options} \oarg{3: options} \marg{4: filename}
+%
+% If formatting for a word processor, find and set the actual image size,
+% without rotation, using \PDF\ instead of \SVG\ to find the original bounding box:
+% \changes{v0.42}{2017/10/24}{\pkg{graphics}: If \progcode{FormatWP}, use explicit size.}
+% \changes{v0.61}{2018/10/06}{\pkg{graphics}: Fix: \EPS\ for \DVI\ \LaTeX.}
+% \changes{v0.62}{2018/10/27}{\pkg{graphics}: Fix: \bool{FormatWP}.}
+% \changes{v0.79}{2019/12/09}{\pkg{graphics}: Factored from \cs{LWR@includegraphicsb}.}
+% \begin{macrocode}
+\newcommand*{\LWR@ig@wpimagesizes}[4]{%
+ \ifbool{FormatWP}{%
+ \begingroup%
+ \LWR@restoreorigformatting%
+ \ifpdf%
+ \appto\LWR@restoreorigformatting{%
+ \DeclareGraphicsExtensions{%
+ .pdf,.PDF,.gif,.GIF,.png,.PNG,.jpg,.JPG,.jpeg,.JPEG%
+ }%
+ }%
+ \else% \ifpdf
+ \ifXeTeX%
+ \appto\LWR@restoreorigformatting{%
+ \DeclareGraphicsExtensions{%
+ .pdf,.PDF,.gif,.GIF,.png,.PNG,.jpg,.JPG,.jpeg,.JPEG%
+ }%
+ }%
+ \else%
+ \appto\LWR@restoreorigformatting{%
+ \DeclareGraphicsExtensions{%
+ .eps,.EPS,.gif,.GIF,.png,.PNG,.jpg,.JPG,.jpeg,.JPEG%
+ }%
+ }%
+ \fi%
+ \fi% \ifpdf
+ \define@key{Gin}{angle}{}%
+ \IfBooleanTF{#1}%
+ {% starred
+ \IfValueTF{#3}%
+ {%
+ \global\sbox{\LWR@imagesizebox}{%
+ \LWR@origincludegraphics*[#2][#3]{#4}%
+ }%
+ }%
+ {%
+ \IfValueTF{#2}%
+ {%
+ \global\sbox{\LWR@imagesizebox}{%
+ \LWR@origincludegraphics*[#2]{#4}%
+ }%
+ }{%
+ \global\sbox{\LWR@imagesizebox}{%
+ \LWR@origincludegraphics*{#4}%
+ }%
+ }%
+ }%
+ }% starred
+ {% not starred
+ \IfValueTF{#3}%
+ {%
+ \global\sbox{\LWR@imagesizebox}{%
+ \LWR@origincludegraphics[#2][#3]{#4}%
+ }%
+ }%
+ {%
+ \IfValueTF{#2}%
+ {%
+ \global\sbox{\LWR@imagesizebox}{%
+ \LWR@origincludegraphics[#2]{#4}%
+ }%
+ }{%
+ \global\sbox{\LWR@imagesizebox}{%
+ \LWR@origincludegraphics{#4}%
+ }%
+ }%
+ }%
+ }% not starred
+ \endgroup%
+ \settowidth{\LWR@igwidth}{\usebox{\LWR@imagesizebox}}%
+ \global\renewcommand*{\LWR@igwidthstyle}{%
+ width:\LWR@printlength{\LWR@igwidth}%
+ }%
+ \settoheight{\LWR@igheight}{\usebox{\LWR@imagesizebox}}%
+ \global\renewcommand*{\LWR@igheightstyle}{%
+ height:\LWR@printlength{\LWR@igheight}%
+ }%
+ }{}% FormatWP
+}
+% \end{macrocode}
+% \end{noindmacro}
+
+
+% \begin{noindmacro}{\LWR@ig@htmltag}
+% For the \HTML\ reference, add the graphicspath, filename, extension,
+% alt tag, style, and class.
+% \changes{v0.79}{2019/12/09}{\pkg{graphics}: Factored from \cs{LWR@includegraphicsb}.}
+% \begin{macrocode}
+\newcommand*{\LWR@ig@htmltag}{%
+ img\LWR@indentHTML%
+ src="%
+% \end{macrocode}
+% \changes{v0.62}{2018/10/27}{\pkg{graphics}: Fix: Filename expansion.}
+% \begin{macrocode}
+ \detokenize\expandafter{\LWR@parsedfilename}%
+% \end{macrocode}
+% \begin{macrocode}
+ "\LWR@indentHTML%
+% \end{macrocode}
+% Only include a style tag if a width, height, angle, or scale was given:
+% \begin{macrocode}
+ \ifthenelse{
+ \NOT\equal{\LWR@igwidthstyle}{} \OR
+ \NOT\equal{\LWR@igheightstyle}{} \OR
+ \NOT\equal{\LWR@igorigin}{} \OR
+ \NOT\equal{\LWR@igangle}{} \OR
+ \NOT\equal{\LWR@igxscale}{1} \OR
+ \NOT\equal{\LWR@igyscale}{1}
+ }%
+ {%
+ style="\LWR@indentHTML
+ \ifthenelse{\NOT\equal{\LWR@igwidthstyle}{}}%
+ {\LWR@igwidthstyle;\LWR@indentHTML}{}%
+ \ifthenelse{\NOT\equal{\LWR@igheightstyle}{}}%
+ {\LWR@igheightstyle;\LWR@indentHTML}{}%
+ \ifthenelse{\NOT\equal{\LWR@igorigin}{}}%
+ {%
+ transform-origin: \LWR@originnames{\LWR@igorigin};%
+ \LWR@indentHTML%
+ }{}%
+ \ifthenelse{\NOT\equal{\LWR@igangle}{}}%
+ {%
+ \LWR@rotstyle{-ms-}{\LWR@igangle}\LWR@indentHTML
+ \LWR@rotstyle{-webkit-}{\LWR@igangle}\LWR@indentHTML
+ \LWR@rotstyle{}{\LWR@igangle }\LWR@indentHTML
+ }{}%
+ \ifthenelse{%
+ \NOT\equal{\LWR@igxscale}{1}\OR%
+ \NOT\equal{\LWR@igyscale}{1}%
+ }%
+ {%
+ \LWR@scalestyle{-ms-}{\LWR@igxscale}{\LWR@igyscale}%
+ \LWR@indentHTML
+ \LWR@scalestyle{-webkit-}{\LWR@igxscale}{\LWR@igyscale}%
+ \LWR@indentHTML
+ \LWR@scalestyle{}{\LWR@igxscale}{\LWR@igyscale}%
+ \LWR@indentHTML
+ }{}%
+ %
+ \ifthenelse{\NOT\equal{\LWR@opacity}{1}}%
+ {opacity:\LWR@opacity;\LWR@indentHTML}{}%
+ %
+ "\LWR@indentHTML%
+ }{}%
+% \end{macrocode}
+% Set the class and alt tag:
+% \changes{v0.65}{2018/12/19}{\pkg{graphics}: Added \cs{includegraphics} \attribute{alt} key.}
+% \begin{macrocode}
+ class="\LWR@igclass"\LWR@indentHTML%
+ alt="\AltTextOpen\LWR@igalt\AltTextClose" \LWR@orignewline%
+}% end of image tags
+% \end{macrocode}
+% \end{noindmacro}
-% \begin{macro}{\LWR@includegraphicsb} * \oarg{2: options} \oarg{3: options} \marg{4: filename}
+% \begin{noindmacro}{\LWR@includegraphicsb} * \oarg{2: options} \oarg{3: options} \marg{4: filename}
%
% \pkg{graphics} syntax is \cs{includegraphics} * \oarg{llx,lly} \oarg{urx,ury} \marg{file}
%
@@ -49782,246 +50948,121 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space
% |#4| will be \cs{LWR@epsfig@filename}, which will have been set by the |file| or |figure| keys.
% Therefore, |#4| must not be used until after the keys have been processed.
%
-% \changes{v0.18}{2016/04/14}{Improved \HTML\ output linebreaks.}
-% \changes{v0.18}{2016/05/17}{Fix: \cs{linewidth}, \cs{textwidth}, \cs{textheight}
+% \changes{v0.18}{2016/04/14}{\pkg{graphics}: Improved \HTML\ output linebreaks.}
+% \changes{v0.18}{2016/05/17}{\pkg{graphics}: Fix: \cs{linewidth}, \cs{textwidth}, \cs{textheight}
% inside a minipage.}
-% \changes{v0.18}{2016/05/17}{em, ex, \%, px dimensions preserved.}
-% \changes{v0.18}{2016/05/17}{Add: svgz file extension.}
-% \changes{v0.20}{2016/08/20}{Fix: \cs{linewidth} in a floatrow.}
-% \changes{v0.20}{2017/01/12}{Fix: Expands filename.}
-% \changes{v0.28}{2017/04/12}{Adapts to \pkg{graphics} syntax.}
-% \changes{v0.29}{2017/04/15}{Fix: Error when no optional arguments.}
-% \changes{v0.40}{2017/09/08}{Add: Full \cs{graphicspath} support.}
-% \changes{v0.42}{2017/10/26}{Fix: Filename expansion.}
-% \changes{v0.45}{2017/12/29}{Improved URLs with underscores.}
-% \changes{v0.59}{2018/09/07}{Now works with \filenm{.pdf} and \filenm{.eps}
+% \changes{v0.18}{2016/05/17}{\pkg{graphics}: em, ex, \%, px dimensions preserved.}
+% \changes{v0.18}{2016/05/17}{\pkg{graphics}: Add: svgz file extension.}
+% \changes{v0.20}{2016/08/20}{\pkg{graphics}: Fix: \cs{linewidth} in a floatrow.}
+% \changes{v0.20}{2017/01/12}{\pkg{graphics}: Fix: Expands filename.}
+% \changes{v0.28}{2017/04/12}{\pkg{graphics}: Adapts to \pkg{graphics} syntax.}
+% \changes{v0.29}{2017/04/15}{\pkg{graphics}: Fix: Error when no optional arguments.}
+% \changes{v0.40}{2017/09/08}{\pkg{graphics}: Add: Full \cs{graphicspath} support.}
+% \changes{v0.42}{2017/10/26}{\pkg{graphics}: Fix: Filename expansion.}
+% \changes{v0.45}{2017/12/29}{\pkg{graphics}: Improved URLs with underscores.}
+% \changes{v0.59}{2018/09/07}{\pkg{graphics}: Now works with \filenm{.pdf} and \filenm{.eps}
% filename extensions.}
-% \changes{v0.66}{2019/02/02}{Improved \HTML\ formatting.}
+% \changes{v0.66}{2019/02/02}{\pkg{graphics}: Improved \HTML\ formatting.}
% \begin{macrocode}
\NewDocumentCommand{\LWR@includegraphicsb}{s o o m}
{%
% \end{macrocode}
% Start the image tag on a new line, allow \PDF\ output word wrap:
% \begin{macrocode}
-\LWR@origtilde \LWR@orignewline%
+ \LWR@origtilde \LWR@orignewline%
% \end{macrocode}
% Temporarily compute \cs{linewidth}, \cs{textwidth}, \cs{textheight} arguments with a 6x9 inch size
% until the next \cs{endgroup}.
-% \changes{v0.48}{2018/02/11}{Fix: Virtual page size limited to a group.}
+% \changes{v0.48}{2018/02/11}{\pkg{graphics}: Fix: Virtual page size limited to a group.}
+% \changes{v0.79}{2020/01/10}{Factored to \cs{LWR@setvirtualpage}.}
% \begin{macrocode}
-\begingroup%
-\ifthenelse{\cnttest{\value{LWR@minipagedepth}}{=}{0}}%
-{%
- \ifbool{LWR@infloatrow}%
- {}
- {% not in a minipage or a floatrow:
- \setlength{\linewidth}{6in}%
- \setlength{\textwidth}{6in}%
- \setlength{\textheight}{9in}%
- }%
-}{}%
+ \begin{LWR@setvirtualpage}%
% \end{macrocode}
% For correct em sizing during the width and height conversions:
% \begin{macrocode}
-\large%
+ \large%
% \end{macrocode}
% Reset some defaults, possibly will be changed below if options were given:
% \begin{macrocode}
-\setlength{\LWR@igwidth}{0pt}%
-\setlength{\LWR@igheight}{0pt}%
-\renewcommand*{\LWR@igwidthstyle}{}%
-\renewcommand*{\LWR@igheightstyle}{}%
-\renewcommand*{\LWR@igorigin}{}%
-\renewcommand*{\LWR@igangle}{}%
-\renewcommand*{\LWR@igxscale}{1}%
-\renewcommand*{\LWR@igyscale}{1}%
-\renewcommand*{\LWR@igclass}{inlineimage}%
+ \setlength{\LWR@igwidth}{0pt}%
+ \setlength{\LWR@igheight}{0pt}%
+ \renewcommand*{\LWR@igwidthstyle}{}%
+ \renewcommand*{\LWR@igheightstyle}{}%
+ \renewcommand*{\LWR@igorigin}{}%
+ \renewcommand*{\LWR@igangle}{}%
+ \renewcommand*{\LWR@igxscale}{1}%
+ \renewcommand*{\LWR@igyscale}{1}%
+ \renewcommand*{\LWR@igclass}{inlineimage}%
% \end{macrocode}
% \changes{v0.65}{2018/12/19}{\pkg{graphics}: Added \cs{includegraphics} \attribute{alt} key.}
-% \changes{v0.74}{2019/08/20}{Add \cs{ThisAltText}.}
-% \changes{v0.78}{2019/10/17}{Fix: \attribute{alt} tag expansion.}
+% \changes{v0.74}{2019/08/20}{\pkg{graphics}: Add \cs{ThisAltText}.}
+% \changes{v0.78}{2019/10/17}{\pkg{graphics}: Fix: \attribute{alt} tag expansion.}
% \begin{macrocode}
-\ifdefvoid{\LWR@ThisAltText}{%
- \edef\LWR@igalt{\ImageAltText}%
-}{%
- \edef\LWR@igalt{\LWR@ThisAltText}%
-}%
+ \ifdefvoid{\LWR@ThisAltText}{%
+ \edef\LWR@igalt{\ImageAltText}%
+ }{%
+ \edef\LWR@igalt{\LWR@ThisAltText}%
+ }%
% \end{macrocode}
%
% If |#3| is empty, only one optional argument was given, thus \pkg{graphicx} syntax:
% \begin{macrocode}
-\IfValueF{#3}{%
- \IfValueTF{#2}%
- {\setkeys{igraph}{#2}}%
- {\setkeys{igraph}{}}%
-}%
+ \IfValueF{#3}{%
+ \IfValueTF{#2}%
+ {\setkeys{igraph}{#2}}%
+ {\setkeys{igraph}{}}%
+ }%
% \end{macrocode}
%
% Fully expand and detokenize the filename,
% changing the file extension to \filenm{.svg} if necessary.
-% \changes{v0.59}{2018/08/28}{Fix: Expand filename.}
-% \changes{v0.61}{2018/10/01}{Set keys before using filename, for \pkg{epsfig}.}
+% \changes{v0.59}{2018/08/28}{\pkg{graphics}: Fix: Expand filename.}
+% \changes{v0.61}{2018/10/01}{\pkg{graphics}: Set keys before using filename, for \pkg{epsfig}.}
% \begin{macrocode}
-\begingroup%
-\LetLtxMacro\Gin@setfile\LWR@HTML@Gin@setfile%
-\edef\LWR@tempone{#4}%
-\StrSubstitute{\LWR@tempone}{.pdf}{.svg}[\LWR@tempone]%
-\StrSubstitute{\LWR@tempone}{.PDF}{.SVG}[\LWR@tempone]%
-\LWR@replaceEPSSVG%
-\xdef\LWR@parsedfilename{\LWR@tempone}%
-\Ginclude@graphics{\detokenize\expandafter{\LWR@tempone}}%
-\endgroup%
-\filename@parse{\LWR@parsedfilename}%
-\LWR@traceinfo{LWR@parsedfilename is \LWR@parsedfilename}%
+ \begingroup%
+ \LetLtxMacro\Gin@setfile\LWR@HTML@Gin@setfile%
+ \edef\LWR@tempone{#4}%
+ \StrSubstitute{\LWR@tempone}{.pdf}{.svg}[\LWR@tempone]%
+ \StrSubstitute{\LWR@tempone}{.PDF}{.SVG}[\LWR@tempone]%
+ \LWR@replaceEPSSVG%
+ \xdef\LWR@parsedfilename{\LWR@tempone}%
+ \Ginclude@graphics{\detokenize\expandafter{\LWR@tempone}}%
+ \endgroup%
+ \filename@parse{\LWR@parsedfilename}%
+ \LWR@traceinfo{LWR@parsedfilename is \LWR@parsedfilename}%
% \LWR@sanitize{\LWR@parsedfilename}%
% \end{macrocode}
%
% If formatting for a word processor, find and set the actual image size,
% without rotation, using \PDF\ instead of \SVG\ to find the original bounding box:
-% \changes{v0.42}{2017/10/24}{If \progcode{FormatWP}, use explicit size.}
-% \changes{v0.61}{2018/10/06}{Fix: \EPS\ for \DVI\ \LaTeX.}
-% \changes{v0.62}{2018/10/27}{Fix: \bool{FormatWP}.}
% \begin{macrocode}
-\ifbool{FormatWP}{%
- \begingroup%
- \LWR@restoreorigformatting%
- \ifpdf%
- \appto\LWR@restoreorigformatting{%
- \DeclareGraphicsExtensions{.pdf,.PDF,.gif,.GIF,.png,.PNG,.jpg,.JPG,.jpeg,.JPEG}%
- }%
- \else% \ifpdf
- \ifXeTeX%
- \appto\LWR@restoreorigformatting{%
- \DeclareGraphicsExtensions{.pdf,.PDF,.gif,.GIF,.png,.PNG,.jpg,.JPG,.jpeg,.JPEG}%
- }%
- \else%
- \appto\LWR@restoreorigformatting{%
- \DeclareGraphicsExtensions{.eps,.EPS,.gif,.GIF,.png,.PNG,.jpg,.JPG,.jpeg,.JPEG}%
- }%
- \fi%
- \fi% \ifpdf
- \define@key{Gin}{angle}{}%
- \IfBooleanTF{#1}%
- {% starred
- \IfValueTF{#3}%
- {%
- \global\sbox{\LWR@imagesizebox}{\LWR@origincludegraphics*[#2][#3]{#4}}%
- }%
- {%
- \IfValueTF{#2}%
- {%
- \global\sbox{\LWR@imagesizebox}{\LWR@origincludegraphics*[#2]{#4}}%
- }{%
- \global\sbox{\LWR@imagesizebox}{\LWR@origincludegraphics*{#4}}%
- }%
- }%
- }% starred
- {% not starred
- \IfValueTF{#3}%
- {%
- \global\sbox{\LWR@imagesizebox}{\LWR@origincludegraphics[#2][#3]{#4}}%
- }%
- {%
- \IfValueTF{#2}%
- {%
- \global\sbox{\LWR@imagesizebox}{\LWR@origincludegraphics[#2]{#4}}%
- }{%
- \global\sbox{\LWR@imagesizebox}{\LWR@origincludegraphics{#4}}%
- }%
- }%
- }% not starred
- \endgroup%
- \settowidth{\LWR@igwidth}{\usebox{\LWR@imagesizebox}}%
- \global\renewcommand*{\LWR@igwidthstyle}{width:\LWR@printlength{\LWR@igwidth}}%
- \settoheight{\LWR@igheight}{\usebox{\LWR@imagesizebox}}%
- \global\renewcommand*{\LWR@igheightstyle}{height:\LWR@printlength{\LWR@igheight}}%
-}{}% FormatWP
+ \LWR@ig@wpimagesizes{#1}{#2}{#3}{#4}%
% \end{macrocode}
%
% Create the \HTML\ reference with the graphicspath, filename, extension,
-% alt tag, style, and class.
-%
-% The \cs{LWR@origtilde} adds space between tags in case this
-% is being done inside a \cs{savebox} where \cs{newline} has no effect.
-% \begin{macrocode}
-\LWR@traceinfo{LWR@includegraphicsb: about to create href}%
-\href{\LWR@parsedfilename}%
-{% start of href
-\LWR@traceinfo{LWR@includegraphicsb: about to LWR@htmltag}%
-\LWR@htmltag{% start of image tags
-img\LWR@indentHTML%
-src="%
-% \end{macrocode}
-% \changes{v0.62}{2018/10/27}{Fix: Filename expansion.}
-% \begin{macrocode}
-\detokenize\expandafter{\LWR@parsedfilename}%
-% \end{macrocode}
+% alt tag, style, and class:
% \begin{macrocode}
-"\LWR@indentHTML%
-% \end{macrocode}
-% Only include a style tag if a width, height, angle, or scale was given:
-% \begin{macrocode}
-\ifthenelse{
- \NOT\equal{\LWR@igwidthstyle}{} \OR
- \NOT\equal{\LWR@igheightstyle}{} \OR
- \NOT\equal{\LWR@igorigin}{} \OR
- \NOT\equal{\LWR@igangle}{} \OR
- \NOT\equal{\LWR@igxscale}{1} \OR
- \NOT\equal{\LWR@igyscale}{1}
-}%
-{%
- style="\LWR@indentHTML
- \ifthenelse{\NOT\equal{\LWR@igwidthstyle}{}}%
- {\LWR@igwidthstyle;\LWR@indentHTML}{}%
- \ifthenelse{\NOT\equal{\LWR@igheightstyle}{}}%
- {\LWR@igheightstyle;\LWR@indentHTML}{}%
- \ifthenelse{\NOT\equal{\LWR@igorigin}{}}%
- {%
- transform-origin: \LWR@originnames{\LWR@igorigin};\LWR@indentHTML%
- }{}%
- \ifthenelse{\NOT\equal{\LWR@igangle}{}}%
- {%
- \LWR@rotstyle{-ms-}{\LWR@igangle}\LWR@indentHTML
- \LWR@rotstyle{-webkit-}{\LWR@igangle}\LWR@indentHTML
- \LWR@rotstyle{}{\LWR@igangle }\LWR@indentHTML
- }{}%
- \ifthenelse{%
- \NOT\equal{\LWR@igxscale}{1}\OR%
- \NOT\equal{\LWR@igyscale}{1}%
- }%
- {%
- \LWR@scalestyle{-ms-}{\LWR@igxscale}{\LWR@igyscale}\LWR@indentHTML
- \LWR@scalestyle{-webkit-}{\LWR@igxscale}{\LWR@igyscale}\LWR@indentHTML
- \LWR@scalestyle{}{\LWR@igxscale}{\LWR@igyscale}\LWR@indentHTML
- }{}%
- %
- \ifthenelse{\NOT\equal{\LWR@opacity}{1}}%
- {opacity:\LWR@opacity;\LWR@indentHTML}{}%
- %
- "\LWR@indentHTML%
-}{}%
-% \end{macrocode}
-% Set the class and alt tag:
-% \changes{v0.65}{2018/12/19}{\pkg{graphics}: Added \cs{includegraphics} \attribute{alt} key.}
-% \begin{macrocode}
-class="\LWR@igclass"\LWR@indentHTML%
-alt="\AltTextOpen\LWR@igalt\AltTextClose" \LWR@orignewline%
-}% end of image tags
-}% end of href
+ \LWR@traceinfo{LWR@includegraphicsb: about to create href}%
+ \href{\LWR@parsedfilename}%
+ {% start of href
+ \LWR@traceinfo{LWR@includegraphicsb: about to LWR@htmltag}%
+ \LWR@htmltag{\LWR@ig@htmltag}%
+ }% end of href
% \end{macrocode}
% Return to original page size and font size:
-% \changes{v0.48}{2018/02/11}{Fix: Virtual page size limited to a group.}
+% \changes{v0.48}{2018/02/11}{\pkg{graphics}: Fix: Virtual page size limited to a group.}
% \begin{macrocode}
-\endgroup
+ \end{LWR@setvirtualpage}%
% \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{graphics}: Add \cs{ThisAltText}.}
% \begin{macrocode}
-\gdef\LWR@ThisAltText{}%
-\LWR@traceinfo{LWR@includegraphicsb done}%
+ \gdef\LWR@ThisAltText{}%
+ \LWR@traceinfo{LWR@includegraphicsb done}%
}
% \end{macrocode}
-% \end{macro}
+% \end{noindmacro}
+
% \begin{macro}{\includegraphics} \oarg{key=val} \marg{filename}
@@ -50053,14 +51094,14 @@ alt="\AltTextOpen\LWR@igalt\AltTextClose" \LWR@orignewline%
% \subsection{Boxes}
-% \begin{macro}{\LWR@rotboxorigin} Holds the origin key letters.
+% \begin{noindmacro}{\LWR@rotboxorigin} Holds the origin key letters.
% \begin{macrocode}
\newcommand*{\LWR@rotboxorigin}{}
% \end{macrocode}
-% \end{macro}
+% \end{noindmacro}
%
%
-% \begin{macro}{\LWR@originname} \marg{letter}
+% \begin{noindmacro}{\LWR@originname} \marg{letter}
%
% Given one \LaTeX{} origin key value,
% translate into an \HTML\ origin word:
@@ -50073,10 +51114,10 @@ alt="\AltTextOpen\LWR@igalt\AltTextClose" \LWR@orignewline%
\ifthenelse{\equal{#1}{r}}{right}{}%
}
% \end{macrocode}
-% \end{macro}
+% \end{noindmacro}
%
%
-% \begin{macro}{\LWR@originnames} \marg{letters}
+% \begin{noindmacro}{\LWR@originnames} \marg{letters}
%
% Given one- or two-letter \LaTeX{} origin key values,
% translate into \HTML\ origin words:
@@ -50088,7 +51129,7 @@ alt="\AltTextOpen\LWR@igalt\AltTextClose" \LWR@orignewline%
\LWR@originname{\LWR@strresult}
}
% \end{macrocode}
-% \end{macro}
+% \end{noindmacro}
%
%
% Handle the \optn{origin} key for \cs{rotatebox}:
@@ -51995,6 +53036,7 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
}
% \end{macrocode}
+
% After \pkg{keyfloat} has loaded:
% \begin{macrocode}
\AtBeginDocument{
@@ -52018,18 +53060,7 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
%
% \changes{v0.75}{2019/09/12}{\pkg{keyfloat}: Fix: \cs{normalcolor}.}
% \begin{macrocode}
-\providecommand*{\KFLT@LWR@hook@keysubfloats}{}
-\renewcommand*{\KFLT@LWR@hook@keysubfloats}{%
- \ifbool{KFLT@keywrap}{%
- }{%
- \ifnumequal{\value{KFLT@keyfloatdepth}}{0}{%
- \setlength{\linewidth}{6in}%
- \setlength{\textwidth}{6in}%
- \setlength{\textheight}{9in}%
- }{}%
- }%
- \normalcolor%
-}
+\LetLtxMacro\KFLT@LWR@hook@keysubfloats\KFLT@LWR@hook@boxouter
\let\KFLT@LWR@hook@keyfloatsminipage\relax
\let\endKFLT@LWR@hook@keyfloatsminipage\relax
@@ -52038,18 +53069,7 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
%
% \changes{v0.75}{2019/09/12}{\pkg{keyfloat}: Fix: \cs{normalcolor}.}
% \begin{macrocode}
-\providecommand*{\KFLT@LWR@hook@keyfloats}{}
-\renewcommand*{\KFLT@LWR@hook@keyfloats}{%
- \ifbool{KFLT@keywrap}{%
- }{%
- \ifnumequal{\value{KFLT@keyfloatdepth}}{0}{%
- \setlength{\linewidth}{6in}%
- \setlength{\textwidth}{6in}%
- \setlength{\textheight}{9in}%
- }{}%
- }%
- \normalcolor%
-}
+\LetLtxMacro\KFLT@LWR@hook@keyfloats\KFLT@LWR@hook@boxouter
\renewcommand*{\KFLT@maybeendfloatrow}{%
\ifnumless{\value{KFLT@thiscol}}{\value{KFLT@numcols}}%
@@ -52289,12 +53309,12 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
% \begin{noindenvironment}{keywrap} \marg{width} \marg{keyfloat}
+% \changes{v0.79}{2020/01/10}{Factored to \cs{LWR@setvirtualpage}.}
% ^^A % Modified to vertically align minipage for \HTML\ output:
% \begin{macrocode}
\DeclareDocumentEnvironment{keywrap}{m +m}
{%
- \LWR@ensuredoingapar%
- \setlength{\linewidth}{6in}% in case #1 has \linewidth
+ \begin{LWR@setvirtualpage}*
\setlength{\LWR@templengthone}{#1}%
\begin{LWR@BlockClassWP}%
{%
@@ -52307,6 +53327,7 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
\booltrue{KFLT@keywrap}%
#2%
\end{LWR@BlockClassWP}%
+ \end{LWR@setvirtualpage}%
}
{}
% \end{macrocode}
@@ -53319,28 +54340,28 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
% Options [c], [l], and [r] are ignored.
% \begin{macrocode}
\newenvironment{longtable*}[2][]{%
-\LWR@floatbegin{table}%
-\setcaptiontype{\LTcaptype}%
-\caption@setoptions{longtable}%
-\caption@setoptions{@longtable}%
-\caption@LT@setup%
-\booltrue{LWR@starredlongtable}%
-\boolfalse{LWR@longtable@havehead}%
-\let\captionlistentry\LWR@LTcaptionlistentry%
-\tabular{#2}
+ \LWR@floatbegin{table}%
+ \setcaptiontype{\LTcaptype}%
+ \caption@setoptions{longtable}%
+ \caption@setoptions{@longtable}%
+ \caption@LT@setup%
+ \booltrue{LWR@starredlongtable}%
+ \boolfalse{LWR@longtable@havehead}%
+ \let\captionlistentry\LWR@LTcaptionlistentry%
+ \tabular{#2}%
}
{\endtabular\LWR@floatend}
\newenvironment{longtable}[2][]{%
-\LWR@floatbegin{table}%
-\setcaptiontype{\LTcaptype}%
-\caption@setoptions{longtable}%
-\caption@setoptions{@longtable}%
-\caption@LT@setup%
-\refstepcounter{\LTcaptype}%
-\boolfalse{LWR@longtable@havehead}%
-\let\captionlistentry\LWR@LTcaptionlistentry%
-\tabular{#2}
+ \LWR@floatbegin{table}%
+ \setcaptiontype{\LTcaptype}%
+ \caption@setoptions{longtable}%
+ \caption@setoptions{@longtable}%
+ \caption@LT@setup%
+ \refstepcounter{\LTcaptype}%
+ \boolfalse{LWR@longtable@havehead}%
+ \let\captionlistentry\LWR@LTcaptionlistentry%
+ \tabular{#2}%
}
{\endtabular\LWR@floatend}
% \end{macrocode}
@@ -53373,9 +54394,9 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
\space \protect\insertTableNotes\space here,
optionally with\MessageBreak
\space \protect\UseMinipageWidths\space in front.\MessageBreak
- See the lwarp documentation regarding longtables\MessageBreak
+ See the Lwarp documentation regarding longtables\MessageBreak
and threeparttablex}
- {See the lwarp documentation regading longtables and threeparttablex.}
+ {See the Lwarp documentation regading longtables and threeparttablex.}
}
% \end{macrocode}
%
@@ -53490,12 +54511,14 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
% \pkg{ltablex} is emulated by \pkg{lwarp}.
%
% \changes{v0.57}{2018/05/25}{\pkg{ltablex}: Added.}
+% \changes{v0.79}{2020/01/18}{\pkg{ltablex}: Fix: Require \pkg{longtable}.}
%
% \codehtml
%
% Relies on \pkg{tabularx}.
%
% \begin{macrocode}
+\RequirePackage{longtable}
\RequirePackage{tabularx}
\LWR@ProvidesPackageDrop{ltablex}[2014/08/13]
@@ -53615,17 +54638,19 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
% \pkg{caption} package, while \pkg{lwarp} does.
%
% \changes{v0.44}{2017/11/15}{\pkg{ltxtable}: Added.}
+% \changes{v0.79}{2020/01/18}{\pkg{ltxtable}: Fix: Required packages.}
%
% \codehtml
%
% \begin{macrocode}
+\RequirePackage{tabularx,longtable}
\LWR@ProvidesPackageDrop{ltxtable}[1995/12/11]
% \end{macrocode}
%
% \begin{noindmacro}{\LTXtable} \marg{width} \marg{file}
% \begin{macrocode}
\newcommand*{\LTXtable}[2]{%
-\input{#2}%
+ \input{#2}%
}
% \end{macrocode}
% \end{noindmacro}
@@ -54423,9 +55448,9 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
%
% \DescribePackage{mathtools}
% \pkg{mathtools} is patched for use by \pkg{lwarp}.
+% Emulation macros are provided for \brand{MathJax}.
%
-% \optn{showonlyrefs} and \optn{mathic} are disabled.
-% \trouble[numbering, italics]{mathtools=\pkg{mathtools}}
+% \limitsmathtools
%
% \changes{v0.70}{2019/03/28}{\pkg{mathtools}: Added.}
%
@@ -54445,7 +55470,18 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
% Forces \optn{showonlyrefs} off because \pkg{lwarp} uses \pkg{cleveref},
% which is not compatible with \optn{showonlyrefs}.
% \begin{macrocode}
-\renewcommand*\MT_showonlyrefs_true:{\MT_showonlyrefs_false:}
+\renewcommand*\MT_showonlyrefs_true:{%
+ \PackageWarningNoLine{lwarp}
+ {%
+ Mathtools \space showonlyrefs \space conflicts \space
+ with \space cleveref,\MessageBreak
+ which \space is \space used \space by \space lwarp, \space
+ so \space showonlyrefs \space is\MessageBreak
+ forced \space off. \space\space
+ Equation \space numbers \space may \space not \space match%
+ }
+ \MT_showonlyrefs_false:
+}
\mathtoolsset{showonlyrefs=false}
% \end{macrocode}
%
@@ -54459,6 +55495,193 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak}
\MHInternalSyntaxOff
% \end{macrocode}
%
+%
+% For \brand{MathJax}:
+%
+% \changes{v0.79}{2020/01/26}{\pkg{mathtools}: Added \brand{MathJax} emulation.}
+% \begin{macrocode}
+\begin{warpMathJax}
+\CustomizeMathJax{\newcommand{\mathllap}[2][]{{#1#2}}}
+\CustomizeMathJax{\newcommand{\mathrlap}[2][]{{#1#2}}}
+\CustomizeMathJax{\newcommand{\mathclap}[2][]{{#1#2}}}
+\CustomizeMathJax{\newcommand{\mathmbox}[1]{#1}}
+\CustomizeMathJax{\newcommand{\clap}[1]{#1}}
+\CustomizeMathJax{\newcommand{\LWRmathmakebox}[2][]{#2}}
+\CustomizeMathJax{\newcommand{\mathmakebox}[1][]{\LWRmathmakebox}}
+\CustomizeMathJax{\newcommand{\cramped}[2][]{{#1#2}}}
+\CustomizeMathJax{\newcommand{\crampedllap}[2][]{{#1#2}}}
+\CustomizeMathJax{\newcommand{\crampedrlap}[2][]{{#1#2}}}
+\CustomizeMathJax{\newcommand{\crampedclap}[2][]{{#1#2}}}
+\CustomizeMathJax{\newenvironment{crampedsubarray}[1]{}{}}
+\CustomizeMathJax{\newcommand{\crampedsubstack}{}}
+\CustomizeMathJax{\newcommand{\smashoperator}[2][]{#2}}
+\CustomizeMathJax{\newcommand{\SwapAboveDisplaySkip}{}}
+
+\CustomizeMathJax{\require{extpfeil}}
+\CustomizeMathJax{\Newextarrow\xleftrightarrow{10,10}{0x2194}}
+\CustomizeMathJax{\Newextarrow\xLeftarrow{10,10}{0x21d0}}
+\CustomizeMathJax{\Newextarrow\xhookleftarrow{10,10}{0x21a9}}
+\CustomizeMathJax{\Newextarrow\xmapsto{10,10}{0x21a6}}
+\CustomizeMathJax{\Newextarrow\xRightarrow{10,10}{0x21d2}}
+\CustomizeMathJax{\Newextarrow\xLeftrightarrow{10,10}{0x21d4}}
+\CustomizeMathJax{\Newextarrow\xhookrightarrow{10,10}{0x21aa}}
+\CustomizeMathJax{\Newextarrow\xrightharpoondown{10,10}{0x21c1}}
+\CustomizeMathJax{\Newextarrow\xleftharpoondown{10,10}{0x21bd}}
+\CustomizeMathJax{\Newextarrow\xrightleftharpoons{10,10}{0x21cc}}
+\CustomizeMathJax{\Newextarrow\xrightharpoonup{10,10}{0x21c0}}
+\CustomizeMathJax{\Newextarrow\xleftharpoonup{10,10}{0x21bc}}
+\CustomizeMathJax{\Newextarrow\xleftrightharpoons{10,10}{0x21cb}}
+
+\CustomizeMathJax{\newcommand{\LWRdounderbracket}[1]{\underline{#1}}}
+\CustomizeMathJax{\newcommand{\LWRunderbracket}[2][]{\LWRdounderbracket{#2}}}
+\CustomizeMathJax{\newcommand{\underbracket}[1][]{\LWRunderbracket}}
+\CustomizeMathJax{\newcommand{\LWRdooverbracket}[1]{\overline{#1}}}
+\CustomizeMathJax{\newcommand{\LWRoverbracket}[2][]{\LWRdooverbracket{#2}}}
+\CustomizeMathJax{\newcommand{\overbracket}[1][]{\LWRoverbracket}}
+
+\CustomizeMathJax{\newcommand{\LaTeXunderbrace}[1]{\underbrace{#1}}}
+\CustomizeMathJax{\newcommand{\LaTeXoverbrace}[1]{\overbrace{#1}}}
+
+\CustomizeMathJax{\newenvironment{matrix*}[1][]{\begin{matrix}}{\end{matrix}}}
+\CustomizeMathJax{\newenvironment{pmatrix*}[1][]{\begin{pmatrix}}{\end{pmatrix}}}
+\CustomizeMathJax{\newenvironment{bmatrix*}[1][]{\begin{bmatrix}}{\end{bmatrix}}}
+\CustomizeMathJax{\newenvironment{Bmatrix*}[1][]{\begin{Bmatrix}}{\end{Bmatrix}}}
+\CustomizeMathJax{\newenvironment{vmatrix*}[1][]{\begin{vmatrix}}{\end{vmatrix}}}
+\CustomizeMathJax{\newenvironment{Vmatrix*}[1][]{\begin{Vmatrix}}{\end{Vmatrix}}}
+\CustomizeMathJax{\newenvironment{smallmatrix*}[1][]{\begin{matrix}}{\end{matrix}}}
+\CustomizeMathJax{\newenvironment{psmallmatrix*}[1][]{\begin{pmatrix}}{\end{pmatrix}}}
+\CustomizeMathJax{\newenvironment{bsmallmatrix*}[1][]{\begin{bmatrix}}{\end{bmatrix}}}
+\CustomizeMathJax{\newenvironment{Bsmallmatrix*}[1][]{\begin{Bmatrix}}{\end{Bmatrix}}}
+\CustomizeMathJax{\newenvironment{vsmallmatrix*}[1][]{\begin{vmatrix}}{\end{vmatrix}}}
+\CustomizeMathJax{\newenvironment{Vsmallmatrix*}[1][]{\begin{Vmatrix}}{\end{Vmatrix}}}
+\CustomizeMathJax{\newenvironment{psmallmatrix}[1][]{\begin{pmatrix}}{\end{pmatrix}}}
+\CustomizeMathJax{\newenvironment{bsmallmatrix}[1][]{\begin{bmatrix}}{\end{bmatrix}}}
+\CustomizeMathJax{\newenvironment{Bsmallmatrix}[1][]{\begin{Bmatrix}}{\end{Bmatrix}}}
+\CustomizeMathJax{\newenvironment{vsmallmatrix}[1][]{\begin{vmatrix}}{\end{vmatrix}}}
+\CustomizeMathJax{\newenvironment{Vsmallmatrix}[1][]{\begin{Vmatrix}}{\end{Vmatrix}}}
+
+
+\CustomizeMathJax{\newcommand{\LWRmultlined}[1][]{\begin{multline*}}}
+\CustomizeMathJax{\newenvironment{multlined}[1][]{\LWRmultlined}{\end{multline*}}}
+
+\CustomizeMathJax{\let\LWRorigshoveleft\shoveleft}
+\CustomizeMathJax{\renewcommand{\shoveleft}[1][]{\LWRorigshoveleft}}
+\CustomizeMathJax{\let\LWRorigshoveright\shoveright}
+\CustomizeMathJax{\renewcommand{\shoveright}[1][]{\LWRorigshoveright}}
+
+\CustomizeMathJax{\newenvironment{dcases}{\begin{cases}}{\end{cases}}}
+\CustomizeMathJax{\newenvironment{dcases*}{\begin{cases}}{\end{cases}}}
+\CustomizeMathJax{\newenvironment{rcases}{\begin{cases}}{\end{cases}}}
+\CustomizeMathJax{\newenvironment{rcases*}{\begin{cases}}{\end{cases}}}
+\CustomizeMathJax{\newenvironment{drcases}{\begin{cases}}{\end{cases}}}
+\CustomizeMathJax{\newenvironment{drcases*}{\begin{cases}}{\end{cases}}}
+\CustomizeMathJax{\newenvironment{cases*}{\begin{cases}}{\end{cases}}}
+
+\CustomizeMathJax{\newcommand{\MoveEqLeft}[1][]{}}
+
+\CustomizeMathJax{% special parsing to handle '&' in argument
+ \def\LWRAboxed#1&#2&#3!|!{\fbox{\(#1\)}&\fbox{\(#2\)}}
+ \newcommand{\Aboxed}[1]{\LWRAboxed#1&&!|!}
+}
+
+\CustomizeMathJax{
+ \newcommand{\ArrowBetweenLines}[1][\Updownarrow]{#1}% no starred
+}
+
+\CustomizeMathJax{\newcommand{\shortintertext}[1]{\\ \text{#1}\notag \\}}
+
+\CustomizeMathJax{\newcommand{\vdotswithin}[1]{\hspace{.5em}\vdots}}
+\CustomizeMathJax{\newcommand{\shortvdotswithin}[1]{ & \hspace{.5em}\vdots \\}}
+\CustomizeMathJax{\newcommand{\MTFlushSpaceAbove}{}}
+\CustomizeMathJax{\newcommand{\MTFlushSpaceBelow}{\\}}
+
+% The following does not create a starred version of the macro:
+\LetLtxMacro\LWR@mathtools@orig@DeclarePairedDelimiter\DeclarePairedDelimiter
+\renewcommand{\DeclarePairedDelimiter}[3]{
+ \LWR@mathtools@orig@DeclarePairedDelimiter{#1}{#2}{#3}
+ \CustomizeMathJax{\newcommand{#1}[2][]{{##1#2##2##1#3}}}
+}
+\@onlypreamble\DeclareParedDelimiter
+
+% (\cs{DeclarePairedDelimiterX} is already defined to use \cs{\DeclarePairedDelimiterXPP}.)
+
+% The following does not create a starred version of the macro.
+\LetLtxMacro\LWR@mathtools@orig@DeclarePairedDelimiterXPP\DeclarePairedDelimiterXPP
+\DeclareDocumentCommand{\DeclarePairedDelimiterXPP}{m O{1} m m m m m}{
+ \LWR@mathtools@orig@DeclarePairedDelimiterXPP{#1}[#2]{#3}{#4}{#5}{#6}{#7}
+ \appto\LWR@customizedMathJax{\LWRbackslash(}%
+ \appto\LWR@customizedMathJax{%
+ \LWRbackslash{}newcommand\{\LWRbackslash\macrotocsname{#1}LWRsub\}%
+ }%
+ \appto\LWR@customizedMathJax{[#2]}%
+ \appto\LWR@customizedMathJax{\{\{\LWRbackslash{}delimsize}%
+ \LWR@subcustomizedmathjax{#3#4#7}%
+ \appto\LWR@customizedMathJax{\LWRbackslash{}delimsize}%
+ \LWR@subcustomizedmathjax{#5#6}%
+ \appto\LWR@customizedMathJax{\}\}}%
+ \appto\LWR@customizedMathJax{\LWRbackslash)\par}%
+ \appto\LWR@customizedMathJax{\LWRbackslash(}%
+ \appto\LWR@customizedMathJax{%
+ \LWRbackslash{}newcommand\{\LWRbackslash\macrotocsname{#1}\}[1][]%
+ }%
+ \appto\LWR@customizedMathJax{%
+ \{
+ \LWRbackslash{}def\LWRbackslash{}delimsize\{\#1\}
+ \LWRbackslash\macrotocsname{#1}LWRsub
+ \}%
+ }%
+ \appto\LWR@customizedMathJax{\LWRbackslash)\par}%
+}
+\@onlypreamble\DeclareParedDelimiterXPP
+\@onlypreamble\DeclareParedDelimiterX
+
+\CustomizeMathJax{\newcommand\lparen{(}}
+\CustomizeMathJax{\newcommand\rparen{)}}
+\CustomizeMathJax{\newcommand{\vcentcolon}{:}}
+\CustomizeMathJax{\newcommand{\ordinarycolon}{:}}
+
+\CustomizeMathJax{\newcommand\dblcolon{\vcentcolon\vcentcolon}}
+\CustomizeMathJax{\newcommand\coloneqq{\vcentcolon=}}
+\CustomizeMathJax{\newcommand\Coloneqq{\dblcolon=}}
+\CustomizeMathJax{\newcommand\coloneq{\vcentcolon{-}}}
+\CustomizeMathJax{\newcommand\Coloneq{\dblcolon{-}}}
+
+\CustomizeMathJax{\newcommand\eqqcolon{=\vcentcolon}}
+\CustomizeMathJax{\newcommand\Eqqcolon{=\dblcolon}}
+\CustomizeMathJax{\newcommand\eqcolon{\mathrel{-}\vcentcolon}}
+\CustomizeMathJax{\newcommand\Eqcolon{\mathrel{-}\dblcolon}}
+
+\CustomizeMathJax{\newcommand\colonapprox{\vcentcolon\approx}}
+\CustomizeMathJax{\newcommand\Colonapprox{\dblcolon\approx}}
+\CustomizeMathJax{\newcommand\colonsim{\vcentcolon\sim}}
+\CustomizeMathJax{\newcommand\Colonsim{\dblcolon\sim}}
+
+\CustomizeMathJax{\newcommand{\nuparrow}{\cancel{\uparrow}}}
+\CustomizeMathJax{\newcommand{\ndownarrow}{\cancel{\downarrow}}}
+\CustomizeMathJax{\newcommand{\bigtimes}{{\Large\times}}}
+
+\CustomizeMathJax{\newcommand{\prescript}[3]{{}^{#1}_{#2}#3}}
+
+
+\CustomizeMathJax{\newenvironment{lgathered}{\begin{gathered}}{\end{gathered}}}
+\CustomizeMathJax{\newenvironment{rgathered}{\begin{gathered}}{\end{gathered}}}
+
+\LetLtxMacro\LWR@mathtools@orig@newgathered\newgathered
+\renewcommand{\newgathered}[4]{%
+ \LWR@mathtools@orig@newgathered{#1}{#2}{#3}{#4}%
+ \appto\LWR@customizedMathJax{\LWRbackslash(}%
+ \LWR@subcustomizedmathjax{%
+ \newenvironment{#1}{\begin{gathered}}{\end{gathered}}%
+ }%
+ \appto\LWR@customizedMathJax{\LWRbackslash)}%
+}
+\@onlypreamble\newgathered
+
+\CustomizeMathJax{\newcommand{\splitfrac}[2]{{}^{#1}_{#2}}}
+\CustomizeMathJax{\let\splitdfrac\splitfrac}
+\end{warpMathJax}
+% \end{macrocode}
+%
% \iffalse
%</mathtools>
% \fi
@@ -56261,11 +57484,11 @@ background:
\LWR@htmltag{td rowspan="#2" %
% \end{macrocode}
% The vertical alignment, if given:
+% \changes{v0.79}{2020/01/17}{\pkg{multirow}: Fix: Centered vertical alignment.}
% \begin{macrocode}
-\IfValueT{#1}{%
+\ifstrequal{#1}{c}{style="\LWR@print@mbox{vertical-align:middle}" }{}%
\ifstrequal{#1}{b}{style="\LWR@print@mbox{vertical-align:bottom}" }{}%
\ifstrequal{#1}{t}{style="\LWR@print@mbox{vertical-align:top}" }{}%
-}%
% \end{macrocode}
% The left/right border, if given:
% \begin{macrocode}
@@ -56310,7 +57533,7 @@ class="td%
% \begin{macrocode}
\begingroup\LetLtxMacro{\\}{\LWR@endofline}#6\endgroup%
\LWR@stoppars%
-\global\boolfalse{LWR@intabularmetadata}%
+\boolfalse{LWR@intabularmetadata}%
\renewcommand{\LWR@multirowborder}{}%
\LWR@traceinfo{*** LWR@HTML@multirow done}%
}%
@@ -56351,21 +57574,22 @@ class="td%
% \begin{macrocode}
\LWR@tabularhtmlcolumns{\arabic{LWR@tableLaTeXcolindex}}{#1}
% \end{macrocode}
-% Create the multicolumn/multirow tag:
+% Create the multicolumn/multirow tag, temporarily redefining the end of line.
+% (Using a group caused problems with a nested \env{tabular}.
+% \changes{v0.79}{2020/01/18}{\pkg{multirow}: Fix: Nested \env{tabular}s.}
% \begin{macrocode}
-\begingroup%
\LetLtxMacro{\\}{\LWR@endofline}%
\LWR@domulticolumn[#3][#4]{#1}{\arabic{LWR@tabhtmlcoltotal}}{#2}{#8}%
-\endgroup%
+\LetLtxMacro{\\}{\LWR@tabularendofline}%
% \end{macrocode}
% Move to the next \LaTeX\ column:
% \begin{macrocode}
-\addtocounter{LWR@tableLaTeXcolindex}{#1}%
-\addtocounter{LWR@tableLaTeXcolindex}{-1}%
+\defaddtocounter{LWR@tableLaTeXcolindex}{#1}%
+\defaddtocounter{LWR@tableLaTeXcolindex}{-1}%
% \end{macrocode}
% Skip any trailing |@| or |!| columns for this cell:
% \begin{macrocode}
-\global\booltrue{LWR@skipatbang}%
+\booltrue{LWR@skipatbang}%
}
\LWR@expandableformatted{multicolumnrow}
@@ -56375,6 +57599,23 @@ class="td%
% \end{macro}
%
%
+% For \brand{MathJax}.
+% Only the text is used. All other parameters are ignored.
+% \changes{v0.79}{2020/01/27}{\pkg{multirow}: Add: \brand{MathJax} emulation.}
+% \begin{macrocode}
+\begin{warpMathJax}
+% \multirow[vpos]{num}[bigstruts]{width}[vmove]{text}
+\CustomizeMathJax{\newcommand{\LWRsubmultirow}[2][]{#2}}
+\CustomizeMathJax{\newcommand{\LWRmultirow}[2][]{\LWRsubmultirow}}
+\CustomizeMathJax{\newcommand{\multirow}[2][]{\LWRmultirow}}
+%
+\CustomizeMathJax{\newcommand{\mrowcell}{}}
+\CustomizeMathJax{\newcommand{\mcolrowcell}{}}
+\CustomizeMathJax{\newcommand{\STneed}[1]{}}
+\end{warpMathJax}
+% \end{macrocode}
+%
+%
% \iffalse
%</multirow>
% \fi
@@ -57459,7 +58700,9 @@ do not attempt to patch lwarp's version of `nameref'.)\MessageBreak
%
% For Mathjax:
% \begin{macrocode}
+\begin{warpMathJax}
\CustomizeMathJax{\newcommand{\nicefrac}[3][]{#2/#3}}
+\end{warpMathJax}
% \end{macrocode}
%
% ^^A For Ka\TeX:
@@ -57494,12 +58737,15 @@ do not attempt to patch lwarp's version of `nameref'.)\MessageBreak
\LWR@ProvidesPackageDrop{niceframe}% the original date is in yyyy/dd/mm format
% \end{macrocode}
%
+% \changes{v0.79}{2020/01/07}{\pkg{niceframe}: Fix: Adjust for virtual page size.}
% \begin{macrocode}
-\newcommand{\LWR@niceframe}[3]{
- \setlength{\LWR@templengthone}{#1}
- \begin{BlockClass}[max-width:\LWR@printlength{\LWR@templengthone}]{#3}
+\newcommand{\LWR@niceframe}[3]{%
+ \begin{LWR@setvirtualpage}*%
+ \setlength{\LWR@templengthone}{#1}%
+ \begin{BlockClass}[max-width:\LWR@printlength{\LWR@templengthone}]{#3}%
#2
- \end{BlockClass}
+ \end{BlockClass}%
+ \end{LWR@setvirtualpage}%
}
\newcommand{\niceframe}[2][\textwidth]{\LWR@niceframe{#1}{#2}{niceframe}}
@@ -58750,6 +59996,248 @@ do not attempt to patch lwarp's version of `nameref'.)\MessageBreak
%
%
%
+% \iffalse
+%<*parallel>
+% \fi
+%
+% \part{lwarp-parallel.sty}
+%
+% \section{parallel}
+%
+% \credits{Matthias Eckermann}
+%
+% \DescribePackage{parallel} \pkg{parallel} is emulated.
+%
+% Package options are ignored. Footnotes are treated as normal \pkg{lwarp} footnotes.
+%
+% Environment option \optn{c} gives side-by-side \element{div}s
+% of class \attribute{minipage}, each of whose width is a percent depending
+% on the given left and right widths, proportional to \cs{linewidth}.
+%
+% Inside each environment, \cs{linewidth} and \cs{textwidth} are
+% set for the print-output sizes.
+%
+% \changes{v0.79}{2019/12/29}{\pkg{parallel}: Added.}
+%
+% \codehtml
+%
+% Discard all options for \pkg{lwarp-parallel}:
+% \begin{macrocode}
+\LWR@ProvidesPackageDrop{parallel}[2003/04/13]
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+\newcounter{LWR@parallel@Lwidth}
+\newcounter{LWR@parallel@Rwidth}
+\newcommand*{\LWR@parallel@border}
+
+\newenvironment*{Parallel}[3][]%
+ {%
+ \LWR@printpendingfootnotes%
+ \setlength{\linewidth}{\LWR@userstextwidth}%
+ \setlength{\textwidth}{\LWR@userstextwidth}%
+ \renewcommand*{\LWR@parallel@border}{}%
+ \ifstrequal{#1}{v}%
+ {%
+ \renewcommand*{\LWR@parallel@border}{ ; border-left: 2px solid black}%
+ }%
+ {}%
+ \ifblank{#2}{%
+ \ifblank{#3}{% {}{}
+ \setcounter{LWR@parallel@Lwidth}{45}%
+ \setcounter{LWR@parallel@Rwidth}{45}%
+ }% {}{}
+ {% {}{x}
+ \setlength{\LWR@templengthone}{\linewidth-#3}%
+ \setcounter{LWR@parallel@Lwidth}{%
+ 90*\ratio{\LWR@templengthone}{\linewidth}%
+ }%
+ \setcounter{LWR@parallel@Rwidth}{%
+ 90*\ratio{#3}{\linewidth}%
+ }%
+ }% {}{x}
+ }% #2 blank
+ {% #2 non-blank
+ \ifblank{#3}{% {x}{}
+ \setcounter{LWR@parallel@Lwidth}{%
+ 90*\ratio{#2}{\linewidth}%
+ }%
+ \setlength{\LWR@templengthone}{\linewidth-#2}%
+ \setcounter{LWR@parallel@Rwidth}{%
+ 90*\ratio{\LWR@templengthone}{\linewidth}%
+ }%
+ }% {x}{}
+ {% {x}{x}
+ \setcounter{LWR@parallel@Lwidth}{%
+ 90*\ratio{#2}{\linewidth}%
+ }%
+ \setcounter{LWR@parallel@Rwidth}{%
+ 90*\ratio{#3}{\linewidth}%
+ }%
+ }% {x}{x}
+ }% #2 non-blank
+ }
+ {%
+ \ParallelAtEnd%
+ \renewcommand*{\ParallelAtEnd}{}%
+ \LWR@printpendingfootnotes%
+ }
+
+\newcommand*{\ParallelLText}[1]{%
+ \begin{BlockClass}[%
+ width:\arabic{LWR@parallel@Lwidth}\% ; % space
+ padding: .5ex 1\% ; % space
+ ]{minipage}%
+ #1%
+ \end{BlockClass}%
+}
+
+\newcommand*{\ParallelRText}[1]{%
+ \begin{BlockClass}[%
+ width:\arabic{LWR@parallel@Rwidth}\% ; % space
+ padding: .5ex 1\% ; % space
+ \LWR@parallel@border%
+ ]{minipage}%
+ #1%
+ \end{BlockClass}%
+}
+
+\newcommand*{\ParallelPar}{\LWR@printpendingfootnotes}
+
+\newcommand*{\ParallelAtEnd}{}
+% \end{macrocode}
+%
+% \iffalse
+%</parallel>
+% \fi
+%
+%
+%
+%
+%
+%
+%
+% \iffalse
+%<*parcolumns>
+% \fi
+%
+% \part{lwarp-parcolumns.sty}
+%
+% \section{parcolumns}
+%
+% \credits{Jonathan Sauer}
+%
+% \DescribePackage{parcolumns} \pkg{parcolumns} is emulated.
+%
+% \optn{rulebetween} is honored. The other keys are ignored, including \optn{colwidths}.
+%
+% Each column is placed inside a \element{div} of class \attribute{minipage},
+% each of whose width is fixed at 85\% divided by the number of columns.
+% In most cases, this results in side-by-side minipages adapting to the browser width.
+% Inside each minipage, \cs{linewidth}, \cs{textwidth}, and \cs{textheight} are
+% set for a virtual $6\times9$ inch page, with \cs{linewidth} divided by the number
+% of columns.
+%
+% \changes{v0.79}{2019/12/22}{\pkg{parcolumns}: Added.}
+%
+% \codehtml
+%
+% Discard all options for \pkg{lwarp-parcolumns}:
+% \begin{macrocode}
+\RequirePackage{keyval}%
+
+\LWR@ProvidesPackageDrop{parcolumns}[2004/11/25]
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newcounter{LWR@parcolumns@numcols}
+\newcounter{LWR@parcolumns@thiscol}
+\newcounter{LWR@parcolumns@width}
+\newbool{LWR@parcolumns@started}
+\newbool{LWR@parcolumns@rule}
+
+\define@key{LWRparcols}{colwidths}{}
+\define@key{LWRparcols}{distance}{}
+\define@key{LWRparcols}{rulebetween}[true]{%
+ \setbool{LWR@parcolumns@rule}{#1}%
+}
+\define@key{LWRparcols}{nofirstindent}{}
+\define@key{LWRparcols}{sloppy}{}
+\define@key{LWRparcols}{sloppyspaces}{}
+
+\newenvironment*{parcolumns}[2][]
+ {%
+ \begin{LWR@setvirtualpage}*[#2]%
+ \setcounter{LWR@parcolumns@numcols}{#2}%
+ \setcounter{LWR@parcolumns@thiscol}{1}%
+ \boolfalse{LWR@parcolumns@started}%
+ \boolfalse{LWR@parcolumns@rule}%
+ \setcounter{LWR@parcolumns@width}{%
+ 85/#2
+ }%
+ \setkeys{LWRparcols}{#1}%
+ }
+ {\end{LWR@setvirtualpage}}
+
+\newcommand{\LWR@parcolumns@onecol}[1]{%
+ \ifbool{LWR@parcolumns@started}%
+ {}%
+ {%
+ \LWR@htmldivclass{parcolumns}%
+ \booltrue{LWR@parcolumns@started}%
+ }%
+ \ifboolexpr{%
+ bool {LWR@parcolumns@rule} and
+ test {%
+ \ifnumgreater
+ {\value{LWR@parcolumns@thiscol}}
+ {1}
+ }%
+ }%
+ {\renewcommand{\LWR@tempone}{ ; border-left: 2px solid black}}%
+ {\renewcommand{\LWR@tempone}{}}%
+ \begin{BlockClass}[%
+ width:\arabic{LWR@parcolumns@width}\% ; % space
+ padding: .5ex 1\% ; % space
+ \LWR@tempone%
+ ]{minipage}%
+ #1%
+ \end{BlockClass}%
+ \addtocounter{LWR@parcolumns@thiscol}{1}%
+}
+
+\newcommand{\colchunk}[2][\value{LWR@parcolumns@thiscol}]{%
+ \whileboolexpr{%
+ test {%
+ \ifnumcomp%
+ {\value{LWR@parcolumns@thiscol}}
+ {<}
+ {#1}%
+ }%
+ }{%
+ \LWR@parcolumns@onecol{}%
+ }%
+ \LWR@parcolumns@onecol{#2}%
+}
+
+\newcommand*{\colplacechunks}{%
+ \ifbool{LWR@parcolumns@started}%
+ {%
+ \LWR@htmldivclassend{div}%
+ \boolfalse{LWR@parcolumns@started}%
+ }%
+ {}%
+ \setcounter{LWR@parcolumns@thiscol}{1}%
+}
+% \end{macrocode}
+%
+% \iffalse
+%</parcolumns>
+% \fi
+%
+%
+%
%
% \iffalse
%<*parnotes>
@@ -58896,6 +60384,195 @@ do not attempt to patch lwarp's version of `nameref'.)\MessageBreak
%
%
%
+% \iffalse
+%<*pdfcol>
+% \fi
+%
+% \part{lwarp-pdfcol.sty}
+%
+% \section{pdfcol}
+%
+% \DescribePackage{pdfcol}
+% \pkg{pdfcol} is ignored.
+%
+% \changes{v0.79}{2019/12/18}{\pkg{pdfcol}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackageDrop{pdfcol}[2018/11/01]
+
+\ltx@newif\ifpdfcolAvailable
+\pdfcolAvailablefalse
+
+\def\pdfcolErrorNoStacks{
+ \PackageInfo{lwarp-pdfcol}{Ignoring pdfcol for HTML output.}
+}
+
+\def\pdfcolInitStack#1{}%
+
+\long\def\pdfcolIfStackExists#1#2#3{#3}%
+
+\def\pdfcolSwitchStack#1{}%
+
+\def\pdfcolSetCurrentColor{}%
+
+\def\pdfcolSetCurrent#1{}%
+% \end{macrocode}
+%
+% \iffalse
+%</pdfcol>
+% \fi
+%
+%
+%
+%
+% \iffalse
+%<*pdfcolfoot>
+% \fi
+%
+% \part{lwarp-pdfcolfoot.sty}
+%
+% \section{pdfcolfoot}
+%
+% \DescribePackage{pdfcolfoot}
+% \pkg{pdfcolfoot} is ignored.
+%
+% \changes{v0.79}{2019/12/18}{\pkg{pdfcolfoot}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackageDrop{pdfcolfoot}[2016/05/16]
+
+\newcommand*{\pdfcolfoot@switch}{}
+
+\newcommand*{\pdfcolfoot@current}{}
+% \end{macrocode}
+%
+% \iffalse
+%</pdfcolfoot>
+% \fi
+%
+%
+%
+%
+% \iffalse
+%<*pdfcolmk>
+% \fi
+%
+% \part{lwarp-pdfcolmk.sty}
+%
+% \section{pdfcolmk}
+%
+% \DescribePackage{pdfcolmk}
+% \pkg{pdfcolmk} is ignored.
+%
+% \changes{v0.79}{2019/11/18}{\pkg{pdfcolmk}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackageDrop{pdfcolmk}[2016/05/16]
+% \end{macrocode}
+%
+% \iffalse
+%</pdfcolmk>
+% \fi
+%
+%
+%
+%
+% \iffalse
+%<*pdfcolparallel>
+% \fi
+%
+% \part{lwarp-pdfcolparallel.sty}
+%
+% \section{pdfcolparallel}
+%
+% \DescribePackage{pdfcolparallel}
+% \pkg{pdfcolparallel} is ignored.
+%
+% \changes{v0.79}{2019/12/29}{\pkg{pdfcolparallel}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\RequirePackage{keyval}%
+
+\LWR@ProvidesPackageDropA{pdfcolparallel}{2016/05/16}
+% \end{macrocode}
+% Pass options to \pkg{parallel}:
+% \begin{macrocode}
+\DeclareOption*{%
+ \PassoptionsToPackage{\CurrentOption}{parallel}%
+}
+% \end{macrocode}
+% Process the options:
+% \begin{macrocode}
+\LWR@ProvidesPackageDropB
+% \end{macrocode}
+%
+% Require \pkg{parallel} with the given options:
+% \begin{macrocode}
+\RequirePackage{parallel}[2003/04/13]
+% \end{macrocode}
+%
+% Ignore the new key:
+% \begin{macrocode}
+\define@key{parallel}{rulebetweencolor}{}
+% \end{macrocode}
+%
+% \iffalse
+%</pdfcolparallel>
+% \fi
+%
+%
+%
+%
+% \iffalse
+%<*pdfcolparcolumns>
+% \fi
+%
+% \part{lwarp-pdfcolparcolumns.sty}
+%
+% \section{pdfcolparcolumns}
+%
+% \DescribePackage{pdfcolparcolumns}
+% \pkg{pdfcolparcolumns} is ignored.
+%
+% \changes{v0.79}{2019/12/22}{\pkg{pdfcolparcolumns}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackageDropA{pdfcolparcolumns}{2016/05/16}
+% \end{macrocode}
+% Pass options to \pkg{parcolumns}:
+% \begin{macrocode}
+\DeclareOption*{%
+ \PassoptionsToPackage{\CurrentOption}{parcolumns}%
+}
+% \end{macrocode}
+% Process the options:
+% \begin{macrocode}
+\LWR@ProvidesPackageDropB
+% \end{macrocode}
+% Require \pkg{parcolumns} with the given options:
+% \begin{macrocode}
+\RequirePackage{parcolumns}[2004/11/25]
+% \end{macrocode}
+%
+% Ignore the new key:
+% \begin{macrocode}
+\define@key{LWRparcols}{rulebetweencolor}{}
+% \end{macrocode}
+%
+% \iffalse
+%</pdfcolparcolumns>
+% \fi
+%
%
%
%
@@ -59528,6 +61205,318 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
%
%
% \iffalse
+%<*physics>
+% \fi
+%
+% \part{lwarp-physics.sty}
+%
+% \section{physics}
+%
+% \credits{Sergio C. de la Barrera}
+%
+% \DescribePackage{physics}
+% \limitsphysics
+%
+% \changes{v0.79}{2020/01/29}{\pkg{physics}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackagePass{physics}% No date is provided by the package.
+% \end{macrocode}
+%
+% \begin{macrocode}
+% doesn't work with \big, etc:
+\begin{warpMathJax}
+\CustomizeMathJax{\newcommand{\quantity}{}}
+\CustomizeMathJax{\let\qty\quantity}
+\CustomizeMathJax{\newcommand{\pqty}[1]{\left(#1\right)}}
+\CustomizeMathJax{\newcommand{\bqty}[1]{\left\lbrack#1\right\rbrack}}
+\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}}
+\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., no star, no paren or bracket
+\CustomizeMathJax{\newcommand{\evaluated}[1]{#1\vert}}
+\CustomizeMathJax{\let\eval\evaluated}
+
+% no \Big, star
+\CustomizeMathJax{\newcommand{\order}[1]{\mathcal{O}\left(#1\right)}}
+
+% no \Big, star
+\CustomizeMathJax{\newcommand{\commutator}[2]{\left\lbrack#1,#2\right\rbrack}}
+\CustomizeMathJax{\let\comm\commutator}
+
+% no \Big, star
+\CustomizeMathJax{\newcommand{\anticommutator}[2]{%
+ \left\lbrace#1,#2\right\rbrace}%
+}
+\CustomizeMathJax{\let\acomm\anticommutator}
+
+% no \Big, star
+\CustomizeMathJax{\let\poissonbracket\anticommutator}
+\CustomizeMathJax{\let\pb\anticommutator}
+
+% no star
+\CustomizeMathJax{\newcommand{\vectorbold}[1]{\mathbf{#1}}}
+\CustomizeMathJax{\let\vb\vectorbold}
+
+% no star
+\CustomizeMathJax{\newcommand{\vectorarrow}[1]{\vec{\mathbf{#1}}}}
+\CustomizeMathJax{\let\va\vectorarrow}
+
+% no star
+\CustomizeMathJax{\newcommand{\vectorunit}[1]{\mathbf{\hat{#1}}}}
+\CustomizeMathJax{\let\va\vectorunit}
+
+\CustomizeMathJax{\newcommand{\dotproduct}{\boldsymbol\cdot}}
+\CustomizeMathJax{\let\vdot\dotproduct}
+
+\CustomizeMathJax{\newcommand{\crossproduct}{\boldsymbol\times}}
+\CustomizeMathJax{\let\cross\crossproduct}
+\CustomizeMathJax{\let\cp\crossproduct}
+
+\CustomizeMathJax{\newcommand{\gradient}{\mathbf{\nabla}}}
+\CustomizeMathJax{\let\grad\gradient}
+
+\CustomizeMathJax{\let\divisionsymbol\div}
+
+\CustomizeMathJax{\newcommand{\divergence}{\nabla\vdot}}
+\CustomizeMathJax{\let\div\divergence}
+
+\CustomizeMathJax{\newcommand{\curl}{\nabla\cross}}
+
+\CustomizeMathJax{\newcommand{\laplacian}{\nabla^2}}
+
+% responds to notrig option
+\ifx\trigopt 1
+ \CustomizeMathJax{\DeclareMathOperator{\sine}{sin}}
+ \CustomizeMathJax{\DeclareMathOperator{\cosine}{cos}}
+ \CustomizeMathJax{\DeclareMathOperator{\tangent}{tan}}
+ \CustomizeMathJax{\DeclareMathOperator{\cosecant}{csc}}
+ \CustomizeMathJax{\DeclareMathOperator{\secant}{sec}}
+ \CustomizeMathJax{\DeclareMathOperator{\cotangent}{cot}}
+ \CustomizeMathJax{\DeclareMathOperator{\arcsine}{arcsin}}
+ \CustomizeMathJax{\DeclareMathOperator{\arccosine}{arccos}}
+ \CustomizeMathJax{\DeclareMathOperator{\arctangent}{arctan}}
+ \CustomizeMathJax{\DeclareMathOperator{\hypsine}{sinh}}
+ \CustomizeMathJax{\DeclareMathOperator{\hypcosine}{cosh}}
+ \CustomizeMathJax{\DeclareMathOperator{\hyptangent}{tanh}}
+ \CustomizeMathJax{\DeclareMathOperator{\hypcotangent}{coth}}
+ \CustomizeMathJax{\DeclareMathOperator{\exponential}{exp}}
+ \CustomizeMathJax{\DeclareMathOperator{\logarithm}{log}}
+ \CustomizeMathJax{\DeclareMathOperator{\naturallogarithm}{\ln}}
+ \CustomizeMathJax{\DeclareMathOperator{\determinant}{det}}
+ \CustomizeMathJax{\DeclareMathOperator{\Probability}{Pr}}
+ \CustomizeMathJax{\newcommand{\sin}[1][{}]{\mathrm{sin}^#1}}
+ \CustomizeMathJax{\newcommand{\sinh}[1][{}]{\mathrm{sinh}^#1}}
+ \CustomizeMathJax{\newcommand{\arcsin}[1][{}]{\mathrm{arcsin}^#1}}
+ \CustomizeMathJax{\newcommand{\asin}[1][{}]{\mathrm{asin}^#1}}
+ \CustomizeMathJax{\newcommand{\cos}[1][{}]{\mathrm{cos}^#1}}
+ \CustomizeMathJax{\newcommand{\cosh}[1][{}]{\mathrm{cosh}^#1}}
+ \CustomizeMathJax{\newcommand{\arccos}[1][{}]{\mathrm{arccos}^#1}}
+ \CustomizeMathJax{\newcommand{\acos}[1][{}]{\mathrm{acos}^#1}}
+ \CustomizeMathJax{\newcommand{\tan}[1][{}]{\mathrm{tan}^#1}}
+ \CustomizeMathJax{\newcommand{\tanh}[1][{}]{\mathrm{tanh}^#1}}
+ \CustomizeMathJax{\newcommand{\arctan}[1][{}]{\mathrm{arctan}^#1}}
+ \CustomizeMathJax{\newcommand{\atan}[1][{}]{\mathrm{atan}^#1}}
+ \CustomizeMathJax{\newcommand{\csc}[1][{}]{\mathrm{csc}^#1}}
+ \CustomizeMathJax{\newcommand{\csch}[1][{}]{\mathrm{csch}^#1}}
+ \CustomizeMathJax{\newcommand{\arccsc}[1][{}]{\mathrm{arccsc}^#1}}
+ \CustomizeMathJax{\newcommand{\acsc}[1][{}]{\mathrm{acsc}^#1}}
+ \CustomizeMathJax{\newcommand{\sec}[1][{}]{\mathrm{sec}^#1}}
+ \CustomizeMathJax{\newcommand{\sech}[1][{}]{\mathrm{sech}^#1}}
+ \CustomizeMathJax{\newcommand{\arcsec}[1][{}]{\mathrm{arcsec}^#1}}
+ \CustomizeMathJax{\newcommand{\asec}[1][{}]{\mathrm{asec}^#1}}
+ \CustomizeMathJax{\newcommand{\cot}[1][{}]{\mathrm{cot}^#1}}
+ \CustomizeMathJax{\newcommand{\coth}[1][{}]{\mathrm{coth}^#1}}
+ \CustomizeMathJax{\newcommand{\arccot}[1][{}]{\mathrm{arccot}^#1}}
+ \CustomizeMathJax{\newcommand{\acot}[1][{}]{\mathrm{acot}^#1}}
+\else
+ \CustomizeMathJax{\DeclareMathOperator{\arccsc}{arccsc}}
+ \CustomizeMathJax{\DeclareMathOperator{\arcsec}{arcsec}}
+ \CustomizeMathJax{\DeclareMathOperator{\arccot}{arccot}}
+ \CustomizeMathJax{\DeclareMathOperator{\asin}{asin}}
+ \CustomizeMathJax{\DeclareMathOperator{\acos}{acos}}
+ \CustomizeMathJax{\DeclareMathOperator{\atan}{atan}}
+ \CustomizeMathJax{\DeclareMathOperator{\acsc}{acsc}}
+ \CustomizeMathJax{\DeclareMathOperator{\asec}{asec}}
+ \CustomizeMathJax{\DeclareMathOperator{\acot}{acot}}
+ \CustomizeMathJax{\DeclareMathOperator{\csch}{csch}}
+ \CustomizeMathJax{\DeclareMathOperator{\sech}{sech}}
+ \CustomizeMathJax{\newcommand{\tr}{\trace}}
+ \CustomizeMathJax{\newcommand{\Tr}{\Trace}}
+ \CustomizeMathJax{\newcommand{\Res}{\Residue}}
+\fi
+
+\CustomizeMathJax{\DeclareMathOperator{\trace}{tr}}
+\CustomizeMathJax{\let\tr\trace}
+\CustomizeMathJax{\DeclareMathOperator{\Trace}{Tr}}
+\CustomizeMathJax{\let\Tr\Trace}
+\CustomizeMathJax{\DeclareMathOperator{\rank}{rank}}
+\CustomizeMathJax{\DeclareMathOperator{\erf}{erf}}
+\CustomizeMathJax{\DeclareMathOperator{\Residue}{Res}}
+\CustomizeMathJax{\newcommand{\principalvalue}{\mathcal{P}}}
+\CustomizeMathJax{\let\pv\principalvalue}
+\CustomizeMathJax{\newcommand{\PV}{\text{P.V.}}}
+\CustomizeMathJax{\newcommand{\real}{\mathcal{R}}}
+\CustomizeMathJax{\newcommand{\imaginary}{\mathcal{I}}}
+
+% must be brace arguments
+\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{\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}}
+
+\CustomizeMathJax{\newcommand{\differential}[1][]{\text{d}^{#1}}}
+\CustomizeMathJax{\let\dd\differential}
+
+\CustomizeMathJax{\newcommand{\derivative}[3][]{%
+ \frac{\text{d}^{#1}#2}{\text{d}#3^{#1}}}%
+}
+\CustomizeMathJax{\let\dv\derivative}
+
+\CustomizeMathJax{\newcommand{\partialderivative}[3][]{%
+ \frac{\partial^{#1}#2}{\partial#3^{#1}}}%
+}
+\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][]{%
+ \frac{\delta^{#1}#2}{\delta#3^{#1}}}%
+}
+\CustomizeMathJax{\let\fdv\functionalderivative}
+
+
+% use \braket to contract
+\CustomizeMathJax{\newcommand{\bra}[1]{\langle{#1}\rvert}}
+\CustomizeMathJax{\newcommand{\ket}[1]{\lvert{#1}\rangle}}
+
+% must have two args
+\CustomizeMathJax{\newcommand{\innerproduct}[2]{%
+ \left\langle{#1}\middle\vert{#2}\right\rangle}%
+}
+\CustomizeMathJax{\let\braket\innerproduct}
+\CustomizeMathJax{\let\ip\innerproduct}
+
+% must have two args
+\CustomizeMathJax{\newcommand{\outerproduct}[2]{%
+ \left\lvert{#1}\middle\rangle\!\middle\langle#2\right\rvert}%
+}
+\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{\let\expval\expectationvalue}
+\CustomizeMathJax{\let\ev\expectationvalue}
+
+\CustomizeMathJax{\newcommand{\matrixelement}[3]{%
+ \left\langle{#1}\middle\vert{#2}\middle\vert{#3}\right\rangle}%
+}
+\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}%
+}
+\CustomizeMathJax{\newcommand{\bmqty}[1]{\begin{bmatrix}#1\end{bmatrix}}}
+\CustomizeMathJax{\newcommand{\vmqty}[1]{\begin{vmatrix}#1\end{vmatrix}}}
+
+\CustomizeMathJax{\newcommand{\smallmatrixquantity}[1]{%
+ \begin{smallmatrix}#1\end{smallmatrix}}%
+}
+\CustomizeMathJax{\let\smqty\smallmatrixquantity}
+\CustomizeMathJax{\newcommand{\spmqty}[1]{%
+ \pqty{\begin{smallmatrix}#1\end{smallmatrix}}}%
+}
+\CustomizeMathJax{\newcommand{\sPmqty}[1]{%
+ \left\lgroup\begin{smallmatrix}#1\end{smallmatrix}\right\rgroup}%
+}
+\CustomizeMathJax{\newcommand{\sbmqty}[1]{%
+ \bqty{\begin{smallmatrix}#1\end{smallmatrix}}}%
+}
+\CustomizeMathJax{\newcommand{\svmqty}[1]{%
+ \vqty{\begin{smallmatrix}#1\end{smallmatrix}}}%
+}
+
+\CustomizeMathJax{\let\matrixdeterminant\vmqty}
+\CustomizeMathJax{\let\mdet\vmqty}
+\CustomizeMathJax{\let\smdet\svmqty}
+
+\CustomizeMathJax{\newcommand{\identitymatrix}[1]{(\text{imat}\{#1\})}}
+\CustomizeMathJax{\let\imat\identitymatrix}
+
+\CustomizeMathJax{\newcommand{\xmatrix}[3]{(\text{xmat}\{\}\{#2\}\{#3\})}}
+\CustomizeMathJax{\let\xmat\xmatrix}
+
+\CustomizeMathJax{\newcommand{\zeromatrix}[2]{(\text{zmat}\{#1\}\{#2\})}}
+\CustomizeMathJax{\let\zmat\zeromatrix}
+
+\CustomizeMathJax{\newcommand{\paulimatrix}[1]{(\text{pmat}\{#1\})}}
+\CustomizeMathJax{\let\pmat\paulimatrix}
+
+\CustomizeMathJax{\newcommand{\diagonalmatrix}[2][]{%
+ \left(\text{dmat}\right)}%
+}
+\CustomizeMathJax{\let\dmat\diagonalmatrix}
+
+\CustomizeMathJax{\newcommand{\antidiagonalmatrix}[2][]{%
+ \left(\text{admat}\right)}%
+}
+\CustomizeMathJax{\let\admat\antidiagonalmatrix}
+\end{warpMathJax}
+% \end{macrocode}
+%
+% \iffalse
+%</physics>
+% \fi
+%
+%
+%
+%
+% \iffalse
%<*pifont>
% \fi
%
@@ -62396,25 +64385,82 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
\__siunitx_number_output_parse:n {#1}
}
{
- \__siunitx_unit_output_pre_print:
% \end{macrocode}
% For |parse-numbers=false|:
% \changes{v0.48}{2018/02/14}{\pkg{siunitx}: Improved \SVG\ math.}
% \changes{v0.50}{2018/02/24}{\pkg{siunitx}: Improved \SVG\ math \attribute{alt} tags.}
+% \changes{v0.79}{2020/01/21}{\pkg{siunitx}: Improved \brand{MathJax}.}
% \begin{macrocode}
+ \__siunitx_unit_output_pre_print:
+ \begingroup% lwarp
+ \boolfalse{mathjax}% lwarp
% \__siunitx_print:nn { number } { \ensuremath {#1} }
- \LWR@subsingledollar{% lwarp
- \textbackslash( \LWR@HTMLsanitize{#1} \textbackslash)% lwarp
- }{siunitx}{%
- \__siunitx_print:nn { number } {%
- \LWR@origensuredmath{#1}%
- }%
- }% lwarp
+ \LWR@subsingledollar{% lwarp
+ \textbackslash( \LWR@HTMLsanitize{#1} \textbackslash)% lwarp
+ }{siunitx}{%
+ \__siunitx_print:nn { number } {%
+ \LWR@origensuredmath{#1}%
+ }%
+ }% lwarp
+ \endgroup% lwarp
+ \__siunitx_unit_output_print:
+ }
+ \group_end:% lwarp
+}
+% \end{macrocode}
+%
+% For |parse-numbers=false|:
+% \changes{v0.79}{2020/01/21}{\pkg{siunitx}: Improved \brand{MathJax}.}
+% \begin{macrocode}
+\cs_set_protected:Npn \__siunitx_range_numbers_aux:n #1
+ {
+ \bool_if:NTF \l__siunitx_number_parse_bool
+ {
+ \tl_clear:N \l__siunitx_number_out_tl
+ \tl_clear:N \l__siunitx_number_out_saved_tl
+ \bool_set_false:N \l__siunitx_number_compound_bool
+ \__siunitx_number_output_parse:n {#1}
+ \bool_if:NT \l__siunitx_number_compound_bool
+ { \msg_error:nnx { siunitx } { multi-part-range } {#1} }
+ }
+ {
+ \__siunitx_unit_output_pre_print:
+ \begingroup% lwarp
+ \boolfalse{mathjax}% lwarp
+% \__siunitx_print:nn { number } {#1}
+ \LWR@subsingledollar{% lwarp
+ \textbackslash( \LWR@HTMLsanitize{#1} \textbackslash)% lwarp
+ }{siunitx}{%
+ \__siunitx_print:nn { number } {
+ \LWR@origensuredmath{#1}%
+ } % lwarp
+ }% lwarp
+ \endgroup% lwarp
+ \__siunitx_unit_output_print:
+ }
+ }
% \end{macrocode}
+%
+% For |parse-numbers=false|:
+% \changes{v0.79}{2020/01/21}{\pkg{siunitx}: Improved \brand{MathJax}.}
% \begin{macrocode}
+\cs_set_protected:Npn \__siunitx_angle_print_direct_aux:nn #1#2 {
+ \tl_if_empty:nF {#1}
+ {
+ \tl_set:Nn \l__siunitx_unit_tl {#2}
+ \begingroup% lwarp
+ \boolfalse{mathjax}% lwarp
+% \__siunitx_print:nn { number } {#1}
+ \LWR@subsingledollar{% lwarp
+ \textbackslash( \LWR@HTMLsanitize{#1} \textbackslash)% lwarp
+ }{siunitx}{%
+ \__siunitx_print:nn { number } {
+ \LWR@origensuredmath{#1}%
+ } % lwarp
+ }% lwarp
+ \endgroup% lwarp
\__siunitx_unit_output_print:
}
- \group_end:% lwarp
}
%
% \end{macrocode}
@@ -62492,6 +64538,12 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
}
% \end{macrocode}
%
+% \changes{v0.79}{2020/01/20}{\pkg{siunitx}: Fix: \cs{square}, \cs{cubed}.}
+% \begin{macrocode}
+\cs_undefine:N \__siunitx_textsuperscript:n
+\cs_new_protected:Npn \__siunitx_textsuperscript:n #1 {\textsuperscript{#1}}
+% \end{macrocode}
+%
% \begin{macrocode}
\RenewDocumentCommand \num { o m } {
\leavevmode
@@ -62562,6 +64614,241 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
\ExplSyntaxOff
% \end{macrocode}
+% For \brand{MathJax}.
+% (The following runs much faster as separate \cs{CusomizeMathJax} calls instead
+% of one single call.)
+% \begin{macrocode}
+\begin{warpMathJax}
+\CustomizeMathJax{\newcommand{\ang}[2][]{(\mathrm{#2})\degree}}
+\CustomizeMathJax{\newcommand{\num}[2][]{\mathrm{#2}}}
+\CustomizeMathJax{\newcommand{\si}[2][]{\mathrm{#2}}}
+%
+% \SI[opt]{num}[preunit]{unit}
+\CustomizeMathJax{\newcommand{\LWRSI}[2][]{\mathrm{#1\LWRSInumber\,#2}}}
+\CustomizeMathJax{\newcommand{\SI}[2][]{\def\LWRSInumber{#2}\LWRSI}}
+%
+\CustomizeMathJax{\newcommand{\numlist}[2][]{\mathrm{#2}}}
+\CustomizeMathJax{\newcommand{\numrange}[3][]{\mathrm{#2~-- #3}}}
+\CustomizeMathJax{\newcommand{\SIlist}[3][]{\mathrm{#2\,#3}}}
+\CustomizeMathJax{\newcommand{\SIrange}[4][]{\mathrm{#2\,#4~-- #3\,#4}}}
+\CustomizeMathJax{\newcommand{\tablenum}[2][]{\mathrm{#2}}}
+%
+\CustomizeMathJax{\newcommand{\ampere}{\mathrm{A}}}
+\CustomizeMathJax{\newcommand{\candela}{\mathrm{cd}}}
+\CustomizeMathJax{\newcommand{\kelvin}{\mathrm{K}}}
+\CustomizeMathJax{\newcommand{\kilogram}{\mathrm{kg}}}
+\CustomizeMathJax{\newcommand{\metre}{\mathrm{m}}}
+\CustomizeMathJax{\newcommand{\mole}{\mathrm{mol}}}
+\CustomizeMathJax{\newcommand{\second}{\mathrm{s}}}
+%
+\CustomizeMathJax{\newcommand{\becquerel}{\mathrm{Bq}}}
+\CustomizeMathJax{\newcommand{\degreeCelsius}{\unicode{x2103}}}
+\CustomizeMathJax{\newcommand{\coulomb}{\mathrm{C}}}
+\CustomizeMathJax{\newcommand{\farad}{\mathrm{F}}}
+\CustomizeMathJax{\newcommand{\gray}{\mathrm{Gy}}}
+\CustomizeMathJax{\newcommand{\hertz}{\mathrm{Hz}}}
+\CustomizeMathJax{\newcommand{\henry}{\mathrm{H}}}
+\CustomizeMathJax{\newcommand{\joule}{\mathrm{J}}}
+\CustomizeMathJax{\newcommand{\katal}{\mathrm{kat}}}
+\CustomizeMathJax{\newcommand{\lumen}{\mathrm{lm}}}
+\CustomizeMathJax{\newcommand{\lux}{\mathrm{lx}}}
+\CustomizeMathJax{\newcommand{\newton}{\mathrm{N}}}
+\CustomizeMathJax{\newcommand{\ohm}{\mathrm{\Omega}}}
+\CustomizeMathJax{\newcommand{\pascal}{\mathrm{Pa}}}
+\CustomizeMathJax{\newcommand{\radian}{\mathrm{rad}}}
+\CustomizeMathJax{\newcommand{\siemens}{\mathrm{S}}}
+\CustomizeMathJax{\newcommand{\sievert}{\mathrm{Sv}}}
+\CustomizeMathJax{\newcommand{\steradian}{\mathrm{sr}}}
+\CustomizeMathJax{\newcommand{\tesla}{\mathrm{T}}}
+\CustomizeMathJax{\newcommand{\volt}{\mathrm{V}}}
+\CustomizeMathJax{\newcommand{\watt}{\mathrm{W}}}
+\CustomizeMathJax{\newcommand{\weber}{\mathrm{Wb}}}
+\CustomizeMathJax{\newcommand{\day}{\mathrm{d}}}
+\CustomizeMathJax{\newcommand{\degree}{\mathrm{^\circ}}}
+\CustomizeMathJax{\newcommand{\hectare}{\mathrm{ha}}}
+\CustomizeMathJax{\newcommand{\hour}{\mathrm{h}}}
+\CustomizeMathJax{\newcommand{\litre}{\mathrm{l}}}
+\CustomizeMathJax{\newcommand{\liter}{\mathrm{L}}}
+\CustomizeMathJax{\newcommand{\arcminute}{^\prime}}
+\CustomizeMathJax{\newcommand{\minute}{\mathrm{min}}}
+\CustomizeMathJax{\newcommand{\arcsecond}{^{\prime\prime}}}
+\CustomizeMathJax{\newcommand{\tonne}{\mathrm{t}}}
+\CustomizeMathJax{\newcommand{\astronomicalunit}{au}}
+\CustomizeMathJax{\newcommand{\atomicmassunit}{u}}
+\CustomizeMathJax{\newcommand{\bohr}{\mathit{a}_0}}
+\CustomizeMathJax{\newcommand{\clight}{\mathit{c}_0}}
+\CustomizeMathJax{\newcommand{\dalton}{\mathrm{D}_\mathrm{a}}}
+\CustomizeMathJax{\newcommand{\electronmass}{\mathit{m}_{\mathrm{e}}}}
+\CustomizeMathJax{\newcommand{\electronvolt}{\mathrm{eV}}}
+\CustomizeMathJax{\newcommand{\elementarycharge}{\mathit{e}}}
+\CustomizeMathJax{\newcommand{\hartree}{\mathit{E}_{\mathrm{h}}}}
+\CustomizeMathJax{\newcommand{\planckbar}{\mathit{\unicode{x0127}}}}
+\CustomizeMathJax{\newcommand{\angstrom}{\mathrm{\unicode{x00C5}}}}
+\CustomizeMathJax{\let\LWRorigbar\bar}
+\CustomizeMathJax{\newcommand{\bar}{\mathrm{bar}}}
+\CustomizeMathJax{\newcommand{\barn}{\mathrm{b}}}
+\CustomizeMathJax{\newcommand{\bel}{\mathrm{B}}}
+\CustomizeMathJax{\newcommand{\decibel}{\mathrm{dB}}}
+\CustomizeMathJax{\newcommand{\knot}{\mathrm{kn}}}
+\CustomizeMathJax{\newcommand{\mmHg}{\mathrm{mmHg}}}
+\CustomizeMathJax{\newcommand{\nauticalmile}{\mathrm{M}}}
+\CustomizeMathJax{\newcommand{\neper}{\mathrm{Np}}}
+%
+\CustomizeMathJax{\newcommand{\yocto}{\mathrm{y}}}
+\CustomizeMathJax{\newcommand{\zepto}{\mathrm{z}}}
+\CustomizeMathJax{\newcommand{\atto}{\mathrm{a}}}
+\CustomizeMathJax{\newcommand{\femto}{\mathrm{f}}}
+\CustomizeMathJax{\newcommand{\pico}{\mathrm{p}}}
+\CustomizeMathJax{\newcommand{\nano}{\mathrm{n}}}
+\CustomizeMathJax{\newcommand{\micro}{\mathrm{\unicode{x00B5}}}}
+\CustomizeMathJax{\newcommand{\milli}{\mathrm{m}}}
+\CustomizeMathJax{\newcommand{\centi}{\mathrm{c}}}
+\CustomizeMathJax{\newcommand{\deci}{\mathrm{d}}}
+\CustomizeMathJax{\newcommand{\deca}{\mathrm{da}}}
+\CustomizeMathJax{\newcommand{\hecto}{\mathrm{h}}}
+\CustomizeMathJax{\newcommand{\kilo}{\mathrm{k}}}
+\CustomizeMathJax{\newcommand{\mega}{\mathrm{M}}}
+\CustomizeMathJax{\newcommand{\giga}{\mathrm{G}}}
+\CustomizeMathJax{\newcommand{\tera}{\mathrm{T}}}
+\CustomizeMathJax{\newcommand{\peta}{\mathrm{P}}}
+\CustomizeMathJax{\newcommand{\exa}{\mathrm{E}}}
+\CustomizeMathJax{\newcommand{\zetta}{\mathrm{Z}}}
+\CustomizeMathJax{\newcommand{\yotta}{\mathrm{Y}}}
+%
+\CustomizeMathJax{\newcommand{\percent}{\mathrm{\%}}}
+%
+\CustomizeMathJax{\newcommand{\meter}{\mathrm{m}}}
+\CustomizeMathJax{\newcommand{\metre}{\mathrm{m}}}
+%
+\CustomizeMathJax{\newcommand{\gram}{\mathrm{g}}}
+\CustomizeMathJax{\newcommand{\kg}{\kilo\gram}}
+\CustomizeMathJax{\newcommand{\of}[1]{_{\mathrm{#1}}}}
+\CustomizeMathJax{\newcommand{\squared}{^2}}
+\CustomizeMathJax{\newcommand{\square}[1]{\mathrm{#1}^2}}
+\CustomizeMathJax{\newcommand{\cubed}{^3}}
+\CustomizeMathJax{\newcommand{\cubic}[1]{\mathrm{#1}^3}}
+\CustomizeMathJax{\newcommand{\per}{/}}
+\CustomizeMathJax{\newcommand{\celsius}{\unicode{x2103}}}
+%
+\CustomizeMathJax{\newcommand{\fg}{\femto\gram}}
+\CustomizeMathJax{\newcommand{\pg}{\pico\gram}}
+\CustomizeMathJax{\newcommand{\ng}{\nano\gram}}
+\CustomizeMathJax{\newcommand{\ug}{\micro\gram}}
+\CustomizeMathJax{\newcommand{\mg}{\milli\gram}}
+\CustomizeMathJax{\newcommand{\g}{\gram}}
+\CustomizeMathJax{\newcommand{\kg}{\kilo\gram}}
+%
+\CustomizeMathJax{\newcommand{\amu}{\mathrm{u}}}
+%
+\CustomizeMathJax{\newcommand{\pm}{\pico\metre}}
+\CustomizeMathJax{\newcommand{\nm}{\nano\metre}}
+\CustomizeMathJax{\newcommand{\um}{\micro\metre}}
+\CustomizeMathJax{\newcommand{\mm}{\milli\metre}}
+\CustomizeMathJax{\newcommand{\cm}{\centi\metre}}
+\CustomizeMathJax{\newcommand{\dm}{\deci\metre}}
+\CustomizeMathJax{\newcommand{\m}{\metre}}
+\CustomizeMathJax{\newcommand{\km}{\kilo\metre}}
+%
+\CustomizeMathJax{\newcommand{\as}{\atto\second}}
+\CustomizeMathJax{\newcommand{\fs}{\femto\second}}
+\CustomizeMathJax{\newcommand{\ps}{\pico\second}}
+\CustomizeMathJax{\newcommand{\ns}{\nano\second}}
+\CustomizeMathJax{\newcommand{\us}{\micro\second}}
+\CustomizeMathJax{\newcommand{\ms}{\milli\second}}
+\CustomizeMathJax{\newcommand{\s}{\second}}
+%
+\CustomizeMathJax{\newcommand{\fmol}{\femto\mol}}
+\CustomizeMathJax{\newcommand{\pmol}{\pico\mol}}
+\CustomizeMathJax{\newcommand{\nmol}{\nano\mol}}
+\CustomizeMathJax{\newcommand{\umol}{\micro\mol}}
+\CustomizeMathJax{\newcommand{\mmol}{\milli\mol}}
+\CustomizeMathJax{\newcommand{\mol}{\mol}}
+\CustomizeMathJax{\newcommand{\kmol}{\kilo\mol}}
+%
+\CustomizeMathJax{\newcommand{\pA}{\pico\ampere}}
+\CustomizeMathJax{\newcommand{\nA}{\nano\ampere}}
+\CustomizeMathJax{\newcommand{\uA}{\micro\ampere}}
+\CustomizeMathJax{\newcommand{\mA}{\milli\ampere}}
+\CustomizeMathJax{\newcommand{\A}{\ampere}}
+\CustomizeMathJax{\newcommand{\kA}{\kilo\ampere}}
+%
+\CustomizeMathJax{\newcommand{\ul}{\micro\litre}}
+\CustomizeMathJax{\newcommand{\ml}{\milli\litre}}
+\CustomizeMathJax{\newcommand{\l}{\litre}}
+\CustomizeMathJax{\newcommand{\hl}{\hecto\litre}}
+\CustomizeMathJax{\newcommand{\uL}{\micro\liter}}
+\CustomizeMathJax{\newcommand{\mL}{\milli\liter}}
+\CustomizeMathJax{\newcommand{\L}{\liter}}
+\CustomizeMathJax{\newcommand{\hL}{\hecto\liter}}
+%
+\CustomizeMathJax{\newcommand{\mHz}{\milli\hertz}}
+\CustomizeMathJax{\newcommand{\Hz}{\hertz}}
+\CustomizeMathJax{\newcommand{\kHz}{\kilo\hertz}}
+\CustomizeMathJax{\newcommand{\MHz}{\mega\hertz}}
+\CustomizeMathJax{\newcommand{\GHz}{\giga\hertz}}
+\CustomizeMathJax{\newcommand{\THz}{\tera\hertz}}
+%
+\CustomizeMathJax{\newcommand{\mN}{\milli\newton}}
+\CustomizeMathJax{\newcommand{\N}{\newton}}
+\CustomizeMathJax{\newcommand{\kN}{\kilo\newton}}
+\CustomizeMathJax{\newcommand{\MN}{\mega\newton}}
+%
+\CustomizeMathJax{\newcommand{\Pa}{\pascal}}
+\CustomizeMathJax{\newcommand{\kPa}{\kilo\pascal}}
+\CustomizeMathJax{\newcommand{\MPa}{\mega\pascal}}
+\CustomizeMathJax{\newcommand{\GPa}{\giga\pascal}}
+%
+\CustomizeMathJax{\newcommand{\mohm}{\milli\ohm}}
+\CustomizeMathJax{\newcommand{\kohm}{\kilo\ohm}}
+\CustomizeMathJax{\newcommand{\Mohm}{\mega\ohm}}
+%
+\CustomizeMathJax{\newcommand{\pV}{\pico\volt}}
+\CustomizeMathJax{\newcommand{\nV}{\nano\volt}}
+\CustomizeMathJax{\newcommand{\uV}{\micro\volt}}
+\CustomizeMathJax{\newcommand{\mV}{\milli\volt}}
+\CustomizeMathJax{\newcommand{\V}{\volt}}
+\CustomizeMathJax{\newcommand{\kV}{\kilo\volt}}
+%
+\CustomizeMathJax{\newcommand{\W}{\watt}}
+\CustomizeMathJax{\newcommand{\uW}{\micro\watt}}
+\CustomizeMathJax{\newcommand{\mW}{\milli\watt}}
+\CustomizeMathJax{\newcommand{\kW}{\kilo\watt}}
+\CustomizeMathJax{\newcommand{\MW}{\mega\watt}}
+\CustomizeMathJax{\newcommand{\GW}{\giga\watt}}
+%
+\CustomizeMathJax{\newcommand{\J}{\joule}}
+\CustomizeMathJax{\newcommand{\uJ}{\micro\joule}}
+\CustomizeMathJax{\newcommand{\mJ}{\milli\joule}}
+\CustomizeMathJax{\newcommand{\kJ}{\kilo\joule}}
+%
+\CustomizeMathJax{\newcommand{\eV}{\electronvolt}}
+\CustomizeMathJax{\newcommand{\meV}{\milli\electronvolt}}
+\CustomizeMathJax{\newcommand{\keV}{\kilo\electronvolt}}
+\CustomizeMathJax{\newcommand{\MeV}{\mega\electronvolt}}
+\CustomizeMathJax{\newcommand{\GeV}{\giga\electronvolt}}
+\CustomizeMathJax{\newcommand{\TeV}{\tera\electronvolt}}
+%
+\CustomizeMathJax{\newcommand{\kWh}{\kilo\watt\hour}}
+%
+\CustomizeMathJax{\newcommand{\F}{\farad}}
+\CustomizeMathJax{\newcommand{\fF}{\femto\farad}}
+\CustomizeMathJax{\newcommand{\pF}{\pico\farad}}
+%
+\CustomizeMathJax{\newcommand{\K}{\mathrm{K}}}
+%
+\CustomizeMathJax{\newcommand{\dB}{\mathrm{dB}}}
+%
+\CustomizeMathJax{\newcommand{\kibi}{\mathrm{Ki}}}
+\CustomizeMathJax{\newcommand{\mebi}{\mathrm{Mi}}}
+\CustomizeMathJax{\newcommand{\gibi}{\mathrm{Gi}}}
+\CustomizeMathJax{\newcommand{\tebi}{\mathrm{Ti}}}
+\CustomizeMathJax{\newcommand{\pebi}{\mathrm{Pi}}}
+\CustomizeMathJax{\newcommand{\exbi}{\mathrm{Ei}}}
+\CustomizeMathJax{\newcommand{\zebi}{\mathrm{Zi}}}
+\CustomizeMathJax{\newcommand{\yobi}{\mathrm{Yi}}}
+\end{warpMathJax}
+% \end{macrocode}
+
% \iffalse
%</siunitx>
% \fi
@@ -62609,6 +64896,41 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
%
%
%
+% \iffalse
+%<*slashed>
+% \fi
+%
+% \part{lwarp-slashed.sty}
+%
+% \section{slashed}
+%
+% \credits{David Carlisle}
+%
+% \DescribePackage{slashed}
+% \pkg{slashed} works as-s for \HTML\ \SVG\ math.
+% For \brand{MathJax}, emulation is provided.
+%
+% \changes{v0.79}{2020/01/30}{\pkg{slashed}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackagePass{slashed}[1997/01/16]
+% \end{macrocode}
+%
+% \begin{macrocode}
+\begin{warpMathJax}
+\CustomizeMathJax{\newcommand{\slashed}[1]{\cancel{#1}}}
+\end{warpMathJax}
+% \end{macrocode}
+%
+% \iffalse
+%</slashed>
+% \fi
+%
+%
+%
+%
%
% \iffalse
%<*soul>
@@ -63151,6 +65473,47 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
%
%
%
+% \iffalse
+%<*steinmetz>
+% \fi
+%
+% \part{lwarp-steinmetz.sty}
+%
+% \section{steinmetz}
+%
+% \credits{Enrico Gregorio}
+%
+% \DescribePackage{steinmetz}
+% \pkg{steinmetz} is patched for use by \pkg{lwarp}.
+% Emulation is provided for \brand{MathJax}
+%
+% \changes{v0.79}{2020/01/31}{\pkg{steinmetz}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackagePass{steinmetz}[2009/06/14]
+% \end{macrocode}
+%
+% \begin{macrocode}
+\begin{warpHTML}
+\renewcommand{\phase}[2][]{%
+ \begin{lateximage}*[steinmetz\{\detokenize{#2}\}]
+ \ensuremath{\underline{/#2}}
+ \end{lateximage}
+}
+\end{warpHTML}
+
+\begin{warpMathJax}
+\CustomizeMathJax{\newcommand{\phase}[2][]{\underline{/#2}}}
+\end{warpMathJax}
+% \end{macrocode}
+%
+% \iffalse
+%</steinmetz>
+% \fi
+%
+%
%
% \iffalse
%<*stfloats>
@@ -63754,6 +66117,56 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
%
%
%
+% \iffalse
+%<*svg>
+% \fi
+%
+% \part{lwarp-svg.sty}
+%
+% \section{svg}
+%
+% \credits{Philip Ilten, Falk Hanisch}
+%
+% \DescribePackage{svg}
+% \pkg{svg} is patched for use by \pkg{lwarp}.
+%
+% \changes{v0.79}{2020/01/05}{\pkg{svg}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackagePass{svg}[2019/10/22]
+% \end{macrocode}
+%
+% \begin{macrocode}
+\xpretocmd{\includesvg}%
+ {\begin{lateximage}}%
+ {}%
+ {\LWR@patcherror{svg}{includesvg}}
+
+\xapptocmd{\includesvg}%
+ {\end{lateximage}}%
+ {}%
+ {\LWR@patcherror{svg}{includesvg}}
+
+\xpretocmd{\includeinkscape}%
+ {\begin{lateximage}}%
+ {}%
+ {\LWR@patcherror{svg}{includeinkscape}}
+
+\xapptocmd{\includeinkscape}%
+ {\end{lateximage}}%
+ {}%
+ {\LWR@patcherror{svg}{includeinkscape}}
+% \end{macrocode}
+%
+% \iffalse
+%</svg>
+% \fi
+%
+%
+%
+%
%
%
% \iffalse
@@ -66951,23 +69364,29 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
% \trouble[Not \XeLaTeX!]{transparent=\pkg{transparent}}
%
% \changes{v0.36}{2017/08/09}{\pkg{transparent}: Added.}
+% \changes{v0.79}{2020/01/05}{\pkg{transparent}: Supports \env{lateximage}s.}
%
% \codehtml
%
% Discard all options for \pkg{lwarp-transparent}:
% \begin{macrocode}
-\LWR@ProvidesPackageDrop{transparent}[2016/05/16]
+\LWR@ProvidesPackagePass{transparent}[2019/11/29]
% \end{macrocode}
%
% \begin{macrocode}
-\newcommand*{\transparent}[1]{\edef\LWR@opacity{#1}}
+\newcommand*{\LWR@HTML@transparent}[1]{\edef\LWR@opacity{#1}}
+
+\LWR@formatted{transparent}
+
-\newcommand*{\texttransparent}[2]{%
+\newcommand*{\LWR@HTML@texttransparent}[2]{%
\begingroup%
\transparent{#1}%
\InlineClass[opacity: #1]{transparent}{#2}%
\endgroup%
}
+
+\LWR@formatted{texttransparent}
% \end{macrocode}
%
% \iffalse
@@ -67513,6 +69932,76 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
%
%
% \iffalse
+%<*unicode-math>
+% \fi
+%
+% \part{lwarp-unicode-math.sty}
+%
+% \section{unicode-math}
+%
+% \credits{Will Robertson}
+%
+% \DescribePackage{unicode-math}
+% \pkg{unicode-math} is supported as-is for \HTML\ with \SVG math.
+% For \brand{MathJax}, many characters do not seem to be encoded correctly,
+% and so are not read correctly by \prog{pdftotext} for \HTML.
+% Symbol font commands are emulated, but not all combinations are
+% supported by MathJax.
+%
+% \changes{v0.79}{2020/01/30}{\pkg{unicode-math}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackagePass{unicode-math}[2019/09/26]
+% \end{macrocode}
+%
+% \begin{macrocode}
+\begin{warpHTML}
+% Not all are possible in MathJax.
+\CustomizeMathJax{\let\symnormal\mathrm}
+\CustomizeMathJax{\let\symliteral\mathrm}
+\CustomizeMathJax{\let\symbb\mathbb}
+\CustomizeMathJax{\let\symbbit\mathbb}% not italic
+\CustomizeMathJax{\let\symcal\mathcal}
+\CustomizeMathJax{\let\symscr\mathscr}
+\CustomizeMathJax{\let\symfrak\mathfrak}
+\CustomizeMathJax{\let\symsfup\mathsf}% not up
+\CustomizeMathJax{\let\symsfit\mathit}% not sans
+\CustomizeMathJax{\let\symbfsf\mathbf}% not sans
+\CustomizeMathJax{\let\symbfup\mathbf}% not up
+\CustomizeMathJax{\let\symbfit\mathit}% not bold
+\CustomizeMathJax{\let\symbfcal\mathcal}% not bold
+\CustomizeMathJax{\let\symbfscr\mathscr}% not bold
+\CustomizeMathJax{\let\symbffrak\mathfrak}% not bold
+\CustomizeMathJax{\let\symbfsfup\mathbf}% not sans
+\CustomizeMathJax{\let\symbfsfit\mathit}% not bold nor sans
+% Duplicates below are commented out.
+\CustomizeMathJax{\let\symup\mathrm}
+\CustomizeMathJax{\let\symbf\mathbf}% \symbfup defined above
+\CustomizeMathJax{\let\symit\mathit}
+% \CustomizeMathJax{\let\symbfit\mathit}% not bold
+\CustomizeMathJax{\let\symsf\mathsf}
+% \CustomizeMathJax{\let\symbfsfup\mathbf}% not sans
+% \CustomizeMathJax{\let\symsfit\mathit}% not sans
+% \CustomizeMathJax{\let\symbfsfit\mathit}% not bold nor sans
+\CustomizeMathJax{\let\symtt\mathtt}
+% \CustomizeMathJax{\let\symbb\mathbb}
+% \CustomizeMathJax{\let\symbbit\mathbb}% not italic
+% \CustomizeMathJax{\let\symscr\mathscr}
+% \CustomizeMathJax{\let\symbfscr\mathscr}% not bold
+% \CustomizeMathJax{\let\symfrak\mathfrak}
+\CustomizeMathJax{\let\symbffrac\mathbffrac}
+\end{warpHTML}
+% \end{macrocode}
+%
+% \iffalse
+%</unicode-math>
+% \fi
+%
+%
+%
+% \iffalse
%<*units>
% \fi
%
@@ -67572,8 +70061,10 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
%
% For Mathjax:
% \begin{macrocode}
+\begin{warpMathJax}
\CustomizeMathJax{\newcommand{\unit}[2][]{#1 #2}}
\CustomizeMathJax{\newcommand{\unitfrac}[3][]{#1 #2/#3}}
+\end{warpMathJax}
% \end{macrocode}
% ^^A For Ka\TeX:
@@ -68277,6 +70768,40 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
%
%
%
+%
+%
+% \iffalse
+%<*widetable>
+% \fi
+%
+% \part{lwarp-widetable.sty}
+%
+% \section{widetable}
+%
+% \credits{Claudio Beccari}
+%
+% \DescribePackage{widetable}
+% \pkg{widetable} is emulated.
+%
+% \changes{v0.79}{2020/01/07}{\pkg{widetable}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackageDrop{widetable}[2019-06-25]
+% \end{macrocode}
+%
+% \begin{macrocode}
+\newenvironment{widetable}{\begin{tabular*}}{\end{tabular*}}
+% \end{macrocode}
+%
+% \iffalse
+%</widetable>
+% \fi
+%
+%
+%
+%
% \iffalse
%<*widows-and-orphans>
% \fi
@@ -68310,6 +70835,104 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
%
%
% \iffalse
+%<*witharrows>
+% \fi
+%
+% \part{lwarp-witharrows.sty}
+%
+% \section{witharrows}
+%
+% \credits{F. Pantigny}
+%
+% \DescribePackage{witharrows}
+% \pkg{witharrows} is patched for use by \pkg{lwarp}.
+% Emulation is provided for \brand{MathJax}.
+%
+% \changes{v0.79}{2020/01/31}{\pkg{witharrows}: Added.}
+%
+% \codehtml
+%
+% \begin{macrocode}
+\LWR@ProvidesPackagePass{witharrows}[2019/12/27]
+% \end{macrocode}
+%
+% \begin{macrocode}
+\begin{warpHTML}
+\makeatletter
+\ifbool{mathjax}{
+ % For the hidden print version in the HTML:
+ \newcommand{\Arrow}[2][]{}
+ \newcommand{\unicode}[1]{}
+ \NewDocumentEnvironment { DispWithArrows } { ! d < > ! O { } +b}
+ {
+ \IfValueTF{#1}{
+ \begin{displaymath}
+ #1 \left\lbrace
+ \begin{align}
+ #3
+ \end{align}
+ \right .
+ \end{displaymath}
+ }{
+ \begin{displaymath}
+ \begin{align}
+ #3
+ \end{align}
+ \end{displaymath}
+ }
+ }
+ {}
+ \NewDocumentEnvironment { DispWithArrows* } { ! d < > ! O { } +b}
+ {
+ \IfValueTF{#1}{
+ \begin{displaymath}
+ #1 \left\lbrace
+ \begin{align*}
+ #3
+ \end{align*}
+ \right .
+ \end{displaymath}
+ }{
+ \begin{displaymath}
+ \begin{align*}
+ #3
+ \end{align*}
+ \end{displaymath}
+ }
+ }
+ {}
+}{
+ % If not MathJax, use SVG images.
+ \BeforeBeginEnvironment{WithArrows}{\global\booltrue{LWR@unknownmathsize}}
+ \BeforeBeginEnvironment{DispWithArrows}{%
+ \begin{BlockClass}{displaymathnumbered}%
+ \begin{lateximage}%
+ }
+ \AfterEndEnvironment{DispWithArrows}{\end{lateximage}\end{BlockClass}}
+ \BeforeBeginEnvironment{DispWithArrows*}{%
+ \begin{BlockClass}{displaymath}%
+ \begin{lateximage}%
+ }
+ \AfterEndEnvironment{DispWithArrows*}{\end{lateximage}\end{BlockClass}}
+}
+\makeatother
+\end{warpHTML}
+
+\begin{warpMathJax}
+\CustomizeMathJax{\newenvironment{WithArrows}[1][]{\begin{aligned}}{\end{aligned}}}
+% Unable to make a sized box.
+\CustomizeMathJax{\newcommand{\Arrow}[2][]{&{\Large\unicode{x2938}}~\textit{#2}}}
+\end{warpMathJax}
+% \end{macrocode}
+%
+% \iffalse
+%</witharrows>
+% \fi
+%
+%
+%
+%
+% \iffalse
%<*wrapfig>
% \fi
@@ -68351,7 +70974,7 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
margin:10pt%
}%
{%
- \LWR@wrapposition%
+ width:\LWR@printlength{\LWR@templengthone}; \LWR@wrapposition; %
}%
{marginblock}%
% \end{macrocode}
@@ -68363,31 +70986,37 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf',
\NewDocumentEnvironment{wrapfigure}{o m o m}
{%
+\begin{LWR@setvirtualpage}*%
\LWR@subwrapfigure{#2}{#4}%
\captionsetup{type=figure}%
}
{%
\endLWR@BlockClassWP%
+\end{LWR@setvirtualpage}%
}
\NewDocumentEnvironment{wraptable}{o m o m}
{%
+\begin{LWR@setvirtualpage}*%
\LWR@subwrapfigure{#2}{#4}%
\captionsetup{type=table}%
}
{%
\endLWR@BlockClassWP%
+\end{LWR@setvirtualpage}%
}
\NewDocumentEnvironment{wrapfloat}{m o m o m}
{%
+\begin{LWR@setvirtualpage}*%
\LWR@subwrapfigure{#3}{#5}%
\captionsetup{type=#1}%
}
{%
\endLWR@BlockClassWP%
+\end{LWR@setvirtualpage}%
}
\newlength{\wrapoverhang}
@@ -69048,6 +71677,7 @@ height:\LWR@printlength{\LWR@tempheight}%
%
% \subsection{Row colors}
% \changes{v0.49}{2018/02/17}{\pkg{xcolor}: Added tabular row colors.}
+% \changes{v0.79}{2020/01/18}{\pkg{xcolor}: Fix: Nested \env{tabular}s.}
%
% \begin{noindmacro}{\rowc@l@rs} \oarg{cmds} \marg{startrow} \marg{odd color} \marg{even color}
% \begin{macrocode}
@@ -69055,8 +71685,8 @@ height:\LWR@printlength{\LWR@tempheight}%
\def\rowc@l@rs[#1]#2#3#4%
{
-\global\rownum=1
- \global\@rowcolorstrue
+\rownum=1%
+ \@rowcolorstrue%
\@ifxempty{#3}%
{\def\@oddrowcolor{\@norowcolor}}%
{%
@@ -69116,10 +71746,11 @@ height:\LWR@printlength{\LWR@tempheight}%
%
% \begin{noindmacro}{\@rowc@lors} Executed at the end of each row.
+% \changes{v0.79}{2020/01/18}{\pkg{xcolor}: Fix: Nested \env{tabular}s.}
% \begin{macrocode}
\def\@rowc@lors{%
% \noalign{%
- \global\advance\rownum\@ne%
+ \advance\rownum\@ne%
% }%
\@rowcolors%
}
@@ -69303,6 +71934,14 @@ height:\LWR@printlength{\LWR@tempheight}%
}
% \end{macrocode}
%
+% For \brand{MathJax}, \pkg{xfakebold} is ignored.
+% \begin{macrocode}
+\begin{warpMathJax}
+\CustomizeMathJax{\newcommand{\setBold}[1][]{}}
+\CustomizeMathJax{\newcommand{\unsetBold}{}}
+\end{warpMathJax}
+% \end{macrocode}
+%
% \iffalse
%</xfakebold>
% \fi
@@ -69503,6 +72142,7 @@ height:\LWR@printlength{\LWR@tempheight}%
% \pkg{xltabular} is emulated by \pkg{lwarp}.
%
% \changes{v0.57}{2018/05/25}{\pkg{xltabular}: Added.}
+% \changes{v0.79}{2020/01/18}{\pkg{xltabular}: Fix: Require \pkg{ltablex}.}
%
% \codehtml
%
@@ -69519,6 +72159,7 @@ height:\LWR@printlength{\LWR@tempheight}%
%
% \begin{macrocode}
\RequirePackage{tabularx}
+\RequirePackage{ltablex}
\LWR@ProvidesPackageDrop{xltabular}[2018/05/23]
@@ -69996,11 +72637,14 @@ height:\LWR@printlength{\LWR@tempheight}%
% \pkg{xurl} is ignored.
%
% \changes{v0.47}{2018/01/25}{\pkg{xurl}: Added.}
+% \changes{v0.79}{2020/01/16}{\pkg{xurl}: Updated to v0.08.}
%
% \codehtml
%
% \begin{macrocode}
-\LWR@ProvidesPackageDrop{xurl}[2018/06/02]
+\LWR@ProvidesPackageDrop{xurl}[2020/01/14]
+
+\def\useOriginalUrlSetting{}
% \end{macrocode}
%
% \iffalse
@@ -70288,9 +72932,9 @@ height:\LWR@printlength{\LWR@tempheight}%
% The \cs{minisec} is placed inside a \element{div} of class \attribute{minisec}.
% \begin{macrocode}
\renewcommand*{\minisec}[1]{
-\begin{BlockClass}{minisec}
-#1
-\end{BlockClass}
+ \begin{BlockClass}{minisec}
+ #1
+ \end{BlockClass}
}
% \end{macrocode}
%
@@ -70298,13 +72942,13 @@ height:\LWR@printlength{\LWR@tempheight}%
% \begin{macrocode}
\@ifundefined{setpartpreamble}{}{
\RenewDocumentCommand{\setpartpreamble}{o o +m}{%
-\renewcommand{\part@preamble}{#3}%
+ \renewcommand{\part@preamble}{#3}%
}
}
\@ifundefined{setchapterpreamble}{}{
\RenewDocumentCommand{\setchapterpreamble}{o o +m}{%
-\renewcommand{\chapter@preamble}{#3}%
+ \renewcommand{\chapter@preamble}{#3}%
}
}
% \end{macrocode}
@@ -70323,17 +72967,17 @@ height:\LWR@printlength{\LWR@tempheight}%
\RenewDocumentEnvironment{captionbeside}{o m o o o s}
{}
{%
-\IfValueTF{#1}%
-{\caption[#1]{#2}}%
-{\caption{#2}}%
+ \IfValueTF{#1}%
+ {\caption[#1]{#2}}%
+ {\caption{#2}}%
}
\RenewDocumentEnvironment{captionofbeside}{m o m o o o s}
{}
{%
-\IfValueTF{#2}%
-{\captionof{#1}[#2]{#3}}%
-{\captionof{#1}{#3}}%
+ \IfValueTF{#2}%
+ {\captionof{#1}[#2]{#3}}%
+ {\captionof{#1}{#3}}%
}
\RenewDocumentCommand{\setcapindent}{s m}{}
@@ -70415,9 +73059,25 @@ height:\LWR@printlength{\LWR@tempheight}%
\RequirePackage{lwarp-parskip}
\RequirePackage{lwarp-setspace}% req'd
\RequirePackage{lwarp-showidx}
-\RequirePackage{lwarp-subfigure}% red'q
+% \end{macrocode}
+
+% Avoids a conflict with \pkg{memoir}:
+% \changes{v0.79}{2020/01/06}{\pkg{subcaption}: Fix with \pkg{memoir}.}
+% \begin{macrocode}
+\AtBeginDocument{%
+ \@ifpackageloaded{subcaption}{}{
+ \RequirePackage{lwarp-subfigure}
+ \let\subfigure\subbottom
+ \let\subtable\subtop
+ }%
+}%
+% \end{macrocode}
+%
+% ^^A Not sure why this is here:
+% \begin{macrocode}
\makeindex
% \end{macrocode}
+%
% \pkg{subfigure} is emulated via \pkg{subfig}, which pre-defines
% |subfigure| and |subtable|, but \pkg{memoir} does not, so
% they must be tested for here:
@@ -70641,11 +73301,12 @@ height:\LWR@printlength{\LWR@tempheight}%
\newcommand{\titlingpageend}[2]{}
\let\andnext\and
\renewcommand*{\thanksmarkstyle}[1]{}
+
\renewcommand{\thanksfootmark}{%
-\thanksscript{\tamark}%
+ \thanksscript{\tamark}%
}
-% \newlength{\thanksmarksep}
+% \newlength{\thanksmarksep}% already provided by memoir
% \end{macrocode}
%
% \subsection{Abstracts}
@@ -70690,7 +73351,7 @@ height:\LWR@printlength{\LWR@tempheight}%
}
\DeclareDocumentCommand{\frontmatter}{s}{%
-\boolfalse{LWR@mainmatter}%
+ \boolfalse{LWR@mainmatter}%
}
% \end{macrocode}
%
@@ -70812,17 +73473,17 @@ height:\LWR@printlength{\LWR@tempheight}%
\RenewDocumentCommand{\plainbreak}{s m}{\begin{center}~\end{center}}
\RenewDocumentCommand{\fancybreak}{s +m}{%
-\begin{center}#2\end{center}%
+ \begin{center}#2\end{center}%
}
\RenewDocumentCommand{\plainfancybreak}{s m m +m}{%
-\begin{center}#4\end{center}%
+ \begin{center}#4\end{center}%
}
\RenewDocumentCommand{\pfbreak}{s}{%
-\begin{center}
-\pfbreakdisplay
-\end{center}
+ \begin{center}
+ \pfbreakdisplay
+ \end{center}
}
% \newlength{\pfbreakskip}
@@ -70913,13 +73574,14 @@ height:\LWR@printlength{\LWR@tempheight}%
\renewcommand*{\leftcenterright}{}
\renewcommand{\leftspringright}[4]{%
-\begin{minipage}{#1\linewidth}#3\end{minipage}\qquad%
-\begin{minipage}{#2\linewidth}\begin{flushright}#4\end{flushright}\end{minipage}%
+ \begin{minipage}{#1\linewidth}#3\end{minipage}\qquad%
+ \begin{minipage}{#2\linewidth}\begin{flushright}#4\end{flushright}\end{minipage}%
}
\renewenvironment*{blockdescription}
{\LWR@descriptionstart\LWR@origdescription}
{\enddescription}
+
\renewcommand*{\blockdescriptionlabel}[1]{\textbf{#1}}
\renewenvironment*{labelled}[1]{\begin{description}}{\end{description}}
\renewenvironment*{flexlabelled}[6]{\begin{description}}{\end{description}}
@@ -71190,17 +73852,17 @@ height:\LWR@printlength{\LWR@tempheight}%
% \marg{3: ext} \marg{4: capname}
% \begin{macrocode}
\RenewDocumentCommand{\newfloat}{o m m m}{%
-\IfValueTF{#1}%
-{\DeclareFloatingEnvironment[fileext=#3,within=#1,name={#4}]{#2}}%
-{\DeclareFloatingEnvironment[fileext=#3,name={#4}]{#2}}%
+ \IfValueTF{#1}%
+ {\DeclareFloatingEnvironment[fileext=#3,within=#1,name={#4}]{#2}}%
+ {\DeclareFloatingEnvironment[fileext=#3,name={#4}]{#2}}%
% \end{macrocode}
% \pkg{newfloat} package automatically creates the \cs{listof} command
% for new floats, but \pkg{float} does not,
% so remove \cs{listof} here in case it is manually created later.
% ^^A *8* keep the following?
% \begin{macrocode}
-\cslet{listof#2s}\relax%
-\cslet{listof#2es}\relax%
+ \cslet{listof#2s}\relax%
+ \cslet{listof#2es}\relax%
}
% \end{macrocode}
% \end{noindmacro}
@@ -71213,23 +73875,23 @@ height:\LWR@printlength{\LWR@tempheight}%
% \begin{macrocode}
\RenewDocumentCommand{\newlistof}{o m m m}
{%
-\IfValueTF{#1}
-{\newlistentry[#1]{#2}{#3}{0}}
-{\newlistentry{#2}{#3}{0}}
-\@namedef{ext@#2}{#3}%
-\@ifundefined{c@#3depth}{\newcounter{#3depth}}{}%
-\setcounter{#3depth}{1}%
-\@namedef{#3mark}{}%
-\@namedef{#2}{\listof{#2}{#4}}
-\@namedef{@cftmake#3title}{}
-\@ifundefined{cftbefore#3titleskip}{
- \expandafter\newlength\csname cftbefore#3titleskip\endcsname
- \expandafter\newlength\csname cftafter#3titleskip\endcsname
-}{}
-\@namedef{cft#3titlefont}{}
-\@namedef{cftafter#3title}{}
-\@namedef{cft#3prehook}{}
-\@namedef{cft#3posthook}{}
+ \IfValueTF{#1}%
+ {\newlistentry[#1]{#2}{#3}{0}}%
+ {\newlistentry{#2}{#3}{0}}%
+ \@namedef{ext@#2}{#3}%
+ \@ifundefined{c@#3depth}{\newcounter{#3depth}}{}%
+ \setcounter{#3depth}{1}%
+ \@namedef{#3mark}{}%
+ \@namedef{#2}{\listof{#2}{#4}}%
+ \@namedef{@cftmake#3title}{}%
+ \@ifundefined{cftbefore#3titleskip}{%
+ \expandafter\newlength\csname cftbefore#3titleskip\endcsname%
+ \expandafter\newlength\csname cftafter#3titleskip\endcsname%
+ }{}%
+ \@namedef{cft#3titlefont}{}%
+ \@namedef{cftafter#3title}{}%
+ \@namedef{cft#3prehook}{}%
+ \@namedef{cft#3posthook}{}%
}
% \end{macrocode}
% \end{noindmacro}
@@ -71243,11 +73905,11 @@ height:\LWR@printlength{\LWR@tempheight}%
% \begin{macrocode}
\NewDocumentEnvironment{KFLTmemoir@marginfloat}{O{-1.2ex} m}
{% start
-\LWR@BlockClassWP{float:right; width:2in; margin:10pt}{}{marginblock}%
-\captionsetup{type=#2}%
+ \LWR@BlockClassWP{float:right; width:2in; margin:10pt}{}{marginblock}%
+ \captionsetup{type=#2}%
}
{%
-\endLWR@BlockClassWP%
+ \endLWR@BlockClassWP%
}
\DeclareDocumentEnvironment{marginfigure}{o}
@@ -71279,7 +73941,7 @@ height:\LWR@printlength{\LWR@tempheight}%
\renewcommand{\subcaption}[2][]{%
-\ifblank{#1}{\subfloat[#2]{}}{\subfloat[#1][#2]{}}%
+ \ifblank{#1}{\subfloat[#2]{}}{\subfloat[#1][#2]{}}%
}
\renewcommand{\contsubcaption}{\ContinuedFloat\subcaption}
@@ -71300,9 +73962,9 @@ height:\LWR@printlength{\LWR@tempheight}%
\RenewDocumentEnvironment{sidecaption}{o m o}
{}
-{
-\IfValueTF{#1}{\caption[#1]{#2}}{\caption{#2}}%
-\IfValueT{#3}{\label{#3}}%
+{%
+ \IfValueTF{#1}{\caption[#1]{#2}}{\caption{#2}}%
+ \IfValueT{#3}{\label{#3}}%
}
% \newlength{\sidecapwidth}
@@ -71316,26 +73978,26 @@ height:\LWR@printlength{\LWR@tempheight}%
\RenewDocumentEnvironment{sidecontcaption}{m o}
{}
{%
-\ContinuedFloat%
-\caption{#1}%
+ \ContinuedFloat%
+ \caption{#1}%
% \end{macrocode}
% Without \cs{@captype}, the section is referred to instead.
% \begin{macrocode}
-\IfValueT{#2}{\label[\@captype]{#2}}%
+ \IfValueT{#2}{\label[\@captype]{#2}}%
}
% \end{macrocode}
% \cs{sidenamedlegend} does not appear to use the \TOC\ argument.
% \begin{macrocode}
\renewenvironment{sidenamedlegend}[2][]{
-\begin{center}
-\@nameuse{\@captype name}\CaptionSeparator#2
-\end{center}
+ \begin{center}
+ \@nameuse{\@captype name}\CaptionSeparator#2
+ \end{center}
}
{}
\renewenvironment{sidelegend}[1]
{\begin{center}
-#1
+ #1
}
{\end{center}}
@@ -71349,11 +74011,11 @@ height:\LWR@printlength{\LWR@tempheight}%
\LetLtxMacro\endctabular\endtabular
\renewcommand{\autorows}[5][]{%
-#5
+ #5%
}
\renewcommand{\autocols}[5][]{%
-#5
+ #5%
}
% \end{macrocode}
%
@@ -71364,10 +74026,10 @@ height:\LWR@printlength{\LWR@tempheight}%
\renewcommand*{\feetbelowfloat}{}
\renewcommand*{\feetatbottom}{}
-\renewcommand*{\verbfootnote}[2][]{
-\PackageError{lwarp,memoir}
-{Verbatim footnotes are not yet supported by lwarp.}
-{This may be improved some day.}
+\renewcommand*{\verbfootnote}[2][]{%
+ \PackageError{lwarp,memoir}%
+ {Verbatim footnotes are not yet supported by lwarp.}%
+ {This may be improved some day.}%
}
\renewcommand*{\plainfootnotes}{}
@@ -71376,10 +74038,10 @@ height:\LWR@printlength{\LWR@tempheight}%
\renewcommand*{\paragraphfootnotes}{}
\renewcommand*{\footfudgefiddle}{}
-\renewcommand*{\newfootnoteseries}[1]{
-\PackageError{lwarp,memoir}
-{Memoir footnote series are not yet supported by lwarp.}
-{This may be improved some day.}
+\renewcommand*{\newfootnoteseries}[1]{%
+ \PackageError{lwarp,memoir}%
+ {Memoir footnote series are not yet supported by lwarp.}%
+ {This may be improved some day.}%
}
\renewcommand*{\plainfootstyle}[1]{}
@@ -71467,9 +74129,9 @@ height:\LWR@printlength{\LWR@tempheight}%
% \renewcommand*{\linenumberfont}[1]{}
\DeclareDocumentCommand{\PoemTitle}{s o o m}{%
-\IfValueTF{#2}%
-{\poemtitle[#2]{#4}}%
-{\poemtitle{#4}}%
+ \IfValueTF{#2}%
+ {\poemtitle[#2]{#4}}%
+ {\poemtitle{#4}}%
}
\renewcommand*{\NumberPoemTitle}{}
@@ -71710,12 +74372,12 @@ height:\LWR@printlength{\LWR@tempheight}%
\renewcommand{\postcaption}[1]{}
\renewcommand{\midbicaption}[1]{}
\renewcommand{\contcaption}[1]{%
-% \ContinuedFloat%
-% \caption{#1}%
-\begin{LWR@figcaption}% later becomes \caption*
-\LWR@isolate{\@nameuse{\@captype name}}~%
-\thechapter.\the\value{\@captype}\CaptionSeparator\LWR@isolate{#1}%
-\end{LWR@figcaption}
+% \ContinuedFloat%
+% \caption{#1}%
+ \begin{LWR@figcaption}% later becomes \caption*
+ \LWR@isolate{\@nameuse{\@captype name}}~%
+ \thechapter.\the\value{\@captype}\CaptionSeparator\LWR@isolate{#1}%
+ \end{LWR@figcaption}%
}
% \end{macrocode}
@@ -71731,11 +74393,11 @@ height:\LWR@printlength{\LWR@tempheight}%
% \begin{macrocode}
\renewcommand{\legend}[1]{\begin{center}#1\\\end{center}}
-\renewcommand{\namedlegend}[2][]{
-\begin{center}
-\@nameuse{fleg\@captype}\CaptionSeparator#2\\
-\end{center}
-\@nameuse{flegtoc\@captype}{#1}
+\renewcommand{\namedlegend}[2][]{%
+ \begin{center}
+ \@nameuse{fleg\@captype}\CaptionSeparator#2\\
+ \end{center}
+ \@nameuse{flegtoc\@captype}{#1}
}
\renewcommand{\newfixedcaption}[3][\caption]{%
@@ -71746,31 +74408,32 @@ height:\LWR@printlength{\LWR@tempheight}%
\providecommand{#2}{\def\@captype{#3}#1}}
\renewcommand{\bitwonumcaption}[6][]{%
-\ifblank{#2}{\caption{#3}}{\caption[#2]{#3}}%
-\addtocounter{\@captype}{-1}%
-\begingroup%
-\csdef{\@captype name}{#4}%
-\ifblank{#5}{\caption{#6}}{\caption[#5]{#6}}%
-\endgroup%
-\ifblank{#1}{}{\label{#1}}%
+ \ifblank{#2}{\caption{#3}}{\caption[#2]{#3}}%
+ \addtocounter{\@captype}{-1}%
+ \begingroup%
+ \csdef{\@captype name}{#4}%
+ \ifblank{#5}{\caption{#6}}{\caption[#5]{#6}}%
+ \endgroup%
+ \ifblank{#1}{}{\label{#1}}%
}
\LetLtxMacro\bionenumcaption\bitwonumcaption% todo
\renewcommand{\bicaption}[5][]{%
-\ifblank{#2}{\caption{#3}}{\caption[#2]{#3}}%
-\begin{LWR@figcaption}% later becomes \caption*
-\LWR@isolate{#4} \thechapter.\the\value{\@captype}\CaptionSeparator\LWR@isolate{#5}%
-\end{LWR@figcaption}
-\ifblank{#1}{}{\label{#1}}%
+ \ifblank{#2}{\caption{#3}}{\caption[#2]{#3}}%
+ \begin{LWR@figcaption}% later becomes \caption*
+ \LWR@isolate{#4} % space
+ \thechapter.\the\value{\@captype}\CaptionSeparator\LWR@isolate{#5}%
+ \end{LWR@figcaption}%
+ \ifblank{#1}{}{\label{#1}}%
}
\renewcommand{\bicontcaption}[3]{%
-\contcaption{#1}%
-\begingroup%
-\csdef{\@captype name}{#2}%
-\contcaption{#3}%
-\endgroup%
+ \contcaption{#1}%
+ \begingroup%
+ \csdef{\@captype name}{#2}%
+ \contcaption{#3}%
+ \endgroup%
}
% \end{macrocode}
% ^^A *8* todo:
@@ -71781,26 +74444,25 @@ height:\LWR@printlength{\LWR@tempheight}%
% \LetLtxMacro\longbicaption\bicaption%
\RenewDocumentCommand{\subtop}{O{} O{} m}{%
-\subfloat[#1][#2]{#3}%
+ \subfloat[#1][#2]{#3}%
}
\RenewDocumentCommand{\subbottom}{O{} O{} m}{%
-\subfloat[#1][#2]{#3}%
+ \subfloat[#1][#2]{#3}%
}
\renewcommand{\contsubtop}{%
-\ContinuedFloat\addtocounter{\@captype}{1}%
-\subtop}
+ \ContinuedFloat\addtocounter{\@captype}{1}%
+ \subtop%
+}
\renewcommand{\contsubbottom}{%
-\ContinuedFloat\addtocounter{\@captype}{1}%
-\subbottom}
+ \ContinuedFloat\addtocounter{\@captype}{1}%
+ \subbottom%
+}
\renewcommand{\subconcluded}{}
-\let\subfigure\subbottom
-\let\subtable\subtop
-
\let\contsubtable\contsubtop
\let\contsubfigure\contsubbottom
% \end{macrocode}
diff --git a/macros/latex/contrib/lwarp/lwarp.ins b/macros/latex/contrib/lwarp/lwarp.ins
index 055804e0cd..b251ada07c 100644
--- a/macros/latex/contrib/lwarp/lwarp.ins
+++ b/macros/latex/contrib/lwarp/lwarp.ins
@@ -20,7 +20,7 @@
%% \usedir{tex/latex/ package }
\preamble
This is a generated file.
-Copyright 2016-2019 Brian Dunn
+Copyright 2016-2020 Brian Dunn
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3
@@ -65,6 +65,7 @@ version 2005/12/01 or later.
\file{lwarp-attachfile2.sty}{\from{lwarp.dtx}{attachfile2}}
\file{lwarp-authblk.sty}{\from{lwarp.dtx}{authblk}}
\file{lwarp-autonum.sty}{\from{lwarp.dtx}{autonum}}
+\file{lwarp-awesomebox.sty}{\from{lwarp.dtx}{awesomebox}}
\file{lwarp-axessibility.sty}{\from{lwarp.dtx}{axessibility}}
\file{lwarp-axodraw2.sty}{\from{lwarp.dtx}{axodraw2}}
\file{lwarp-backnaur.sty}{\from{lwarp.dtx}{backnaur}}
@@ -78,12 +79,14 @@ version 2005/12/01 or later.
\file{lwarp-bigstrut.sty}{\from{lwarp.dtx}{bigstrut}}
\file{lwarp-bitpattern.sty}{\from{lwarp.dtx}{bitpattern}}
\file{lwarp-blowup.sty}{\from{lwarp.dtx}{blowup}}
+\file{lwarp-bm.sty}{\from{lwarp.dtx}{bm}}
\file{lwarp-booklet.sty}{\from{lwarp.dtx}{booklet}}
\file{lwarp-bookmark.sty}{\from{lwarp.dtx}{bookmark}}
\file{lwarp-booktabs.sty}{\from{lwarp.dtx}{booktabs}}
\file{lwarp-bophook.sty}{\from{lwarp.dtx}{bophook}}
\file{lwarp-bounddvi.sty}{\from{lwarp.dtx}{bounddvi}}
\file{lwarp-boxedminipage2e.sty}{\from{lwarp.dtx}{boxedminipage2e}}
+\file{lwarp-braket.sty}{\from{lwarp.dtx}{braket}}
\file{lwarp-breakurl.sty}{\from{lwarp.dtx}{breakurl}}
\file{lwarp-breqn.sty}{\from{lwarp.dtx}{breqn}}
\file{lwarp-bsheaders.sty}{\from{lwarp.dtx}{bsheaders}}
@@ -298,9 +301,16 @@ version 2005/12/01 or later.
\file{lwarp-pagenote.sty}{\from{lwarp.dtx}{pagenote}}
\file{lwarp-pagesel.sty}{\from{lwarp.dtx}{pagesel}}
\file{lwarp-paralist.sty}{\from{lwarp.dtx}{paralist}}
+\file{lwarp-parallel.sty}{\from{lwarp.dtx}{parallel}}
+\file{lwarp-parcolumns.sty}{\from{lwarp.dtx}{parcolumns}}
\file{lwarp-parnotes.sty}{\from{lwarp.dtx}{parnotes}}
\file{lwarp-parskip.sty}{\from{lwarp.dtx}{parskip}}
\file{lwarp-pbox.sty}{\from{lwarp.dtx}{pbox}}
+\file{lwarp-pdfcol.sty}{\from{lwarp.dtx}{pdfcol}}
+\file{lwarp-pdfcolfoot.sty}{\from{lwarp.dtx}{pdfcolfoot}}
+\file{lwarp-pdfcolmk.sty}{\from{lwarp.dtx}{pdfcolmk}}
+\file{lwarp-pdfcolparallel.sty}{\from{lwarp.dtx}{pdfcolparallel}}
+\file{lwarp-pdfcolparcolumns.sty}{\from{lwarp.dtx}{pdfcolparcolumns}}
\file{lwarp-pdfcomment.sty}{\from{lwarp.dtx}{pdfcomment}}
\file{lwarp-pdfcrypt.sty}{\from{lwarp.dtx}{pdfcrypt}}
\file{lwarp-pdflscape.sty}{\from{lwarp.dtx}{pdflscape}}
@@ -314,6 +324,7 @@ version 2005/12/01 or later.
\file{lwarp-perpage.sty}{\from{lwarp.dtx}{perpage}}
\file{lwarp-pfnote.sty}{\from{lwarp.dtx}{pfnote}}
\file{lwarp-phfqit.sty}{\from{lwarp.dtx}{phfqit}}
+\file{lwarp-physics.sty}{\from{lwarp.dtx}{physics}}
\file{lwarp-pifont.sty}{\from{lwarp.dtx}{pifont}}
\file{lwarp-placeins.sty}{\from{lwarp.dtx}{placeins}}
\file{lwarp-plarydshln.sty}{\from{lwarp.dtx}{plarydshln}}
@@ -371,6 +382,7 @@ version 2005/12/01 or later.
\file{lwarp-SIunits.sty}{\from{lwarp.dtx}{SIunits}}
\file{lwarp-siunitx.sty}{\from{lwarp.dtx}{siunitx}}
\file{lwarp-slantsc.sty}{\from{lwarp.dtx}{slantsc}}
+\file{lwarp-slashed.sty}{\from{lwarp.dtx}{slashed}}
\file{lwarp-soul.sty}{\from{lwarp.dtx}{soul}}
\file{lwarp-soulpos.sty}{\from{lwarp.dtx}{soulpos}}
\file{lwarp-soulutf8.sty}{\from{lwarp.dtx}{soulutf8}}
@@ -379,12 +391,14 @@ version 2005/12/01 or later.
\file{lwarp-srctex.sty}{\from{lwarp.dtx}{srctex}}
\file{lwarp-stabular.sty}{\from{lwarp.dtx}{stabular}}
\file{lwarp-stackengine.sty}{\from{lwarp.dtx}{stackengine}}
+\file{lwarp-steinmetz.sty}{\from{lwarp.dtx}{steinmetz}}
\file{lwarp-stfloats.sty}{\from{lwarp.dtx}{stfloats}}
\file{lwarp-struktex.sty}{\from{lwarp.dtx}{struktex}}
\file{lwarp-subcaption.sty}{\from{lwarp.dtx}{subcaption}}
\file{lwarp-subfig.sty}{\from{lwarp.dtx}{subfig}}
\file{lwarp-subfigure.sty}{\from{lwarp.dtx}{subfigure}}
\file{lwarp-supertabular.sty}{\from{lwarp.dtx}{supertabular}}
+\file{lwarp-svg.sty}{\from{lwarp.dtx}{svg}}
\file{lwarp-syntonly.sty}{\from{lwarp.dtx}{syntonly}}
\file{lwarp-tabfigures.sty}{\from{lwarp.dtx}{tabfigures}}
\file{lwarp-tablefootnote.sty}{\from{lwarp.dtx}{tablefootnote}}
@@ -430,6 +444,7 @@ version 2005/12/01 or later.
\file{lwarp-ulem.sty}{\from{lwarp.dtx}{ulem}}
\file{lwarp-umoline.sty}{\from{lwarp.dtx}{umoline}}
\file{lwarp-underscore.sty}{\from{lwarp.dtx}{underscore}}
+\file{lwarp-unicode-math.sty}{\from{lwarp.dtx}{unicode-math}}
\file{lwarp-units.sty}{\from{lwarp.dtx}{units}}
\file{lwarp-unitsdef.sty}{\from{lwarp.dtx}{unitsdef}}
\file{lwarp-upref.sty}{\from{lwarp.dtx}{upref}}
@@ -444,7 +459,9 @@ version 2005/12/01 or later.
\file{lwarp-vwcol.sty}{\from{lwarp.dtx}{vwcol}}
\file{lwarp-wallpaper.sty}{\from{lwarp.dtx}{wallpaper}}
\file{lwarp-watermark.sty}{\from{lwarp.dtx}{watermark}}
+\file{lwarp-widetable.sty}{\from{lwarp.dtx}{widetable}}
\file{lwarp-widows-and-orphans.sty}{\from{lwarp.dtx}{widows-and-orphans}}
+\file{lwarp-witharrows.sty}{\from{lwarp.dtx}{witharrows}}
\file{lwarp-wrapfig.sty}{\from{lwarp.dtx}{wrapfig}}
\file{lwarp-xbmks.sty}{\from{lwarp.dtx}{xbmks}}
\file{lwarp-xcolor.sty}{\from{lwarp.dtx}{xcolor}}
diff --git a/macros/latex/contrib/lwarp/lwarp.pdf b/macros/latex/contrib/lwarp/lwarp.pdf
index 1c3d9aec65..1f8251c97e 100644
--- a/macros/latex/contrib/lwarp/lwarp.pdf
+++ b/macros/latex/contrib/lwarp/lwarp.pdf
Binary files differ
diff --git a/macros/latex/contrib/lwarp/lwarpmk.lua b/macros/latex/contrib/lwarp/lwarpmk.lua
index 2ccc1fa5bd..f90499f916 100755
--- a/macros/latex/contrib/lwarp/lwarpmk.lua
+++ b/macros/latex/contrib/lwarp/lwarpmk.lua
@@ -1,8 +1,8 @@
#!/usr/bin/env texlua
--- Copyright 2016-2019 Brian Dunn
+-- Copyright 2016-2020 Brian Dunn
-printversion = "v0.78"
+printversion = "v0.79"
requiredconfversion = "2" -- also at *lwarpmk.conf
function printhelp ()
@@ -699,7 +699,7 @@ else -- not --version
-- print intro:
-print ("lwarpmk: " .. printversion .. " Automated make for the LaTeX lwarp package.")
+print ("lwarpmk: " .. printversion .. " Automated make for the LaTeX Lwarp package.")
-- lwarpmk print: