texlive[44781] trunk: lwarp (11jul17)

commits+karl at tug.org commits+karl at tug.org
Fri Jul 14 01:05:35 CEST 2017


Revision: 44781
          http://tug.org/svn/texlive?view=revision&revision=44781
Author:   karl
Date:     2017-07-14 01:05:35 +0200 (Fri, 14 Jul 2017)
Log Message:
-----------
lwarp (11jul17)

Modified Paths:
--------------
    trunk/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua
    trunk/Master/texmf-dist/doc/latex/lwarp/README.txt
    trunk/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf
    trunk/Master/texmf-dist/scripts/lwarp/lwarpmk.lua
    trunk/Master/texmf-dist/source/latex/lwarp/lwarp.dtx
    trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-alltt.sty
    trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyhdr.sty
    trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-ltcaption.sty
    trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-verse.sty
    trunk/Master/texmf-dist/tex/latex/lwarp/lwarp.sty

Modified: trunk/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua	2017-07-13 22:06:46 UTC (rev 44780)
+++ trunk/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua	2017-07-13 23:05:35 UTC (rev 44781)
@@ -4,7 +4,7 @@
 
 -- Print the usage of the lwarpmk command:
 
-printversion = "v0.32"
+printversion = "v0.33"
 
 function printhelp ()
 print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;

Modified: trunk/Master/texmf-dist/doc/latex/lwarp/README.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/lwarp/README.txt	2017-07-13 22:06:46 UTC (rev 44780)
+++ trunk/Master/texmf-dist/doc/latex/lwarp/README.txt	2017-07-13 23:05:35 UTC (rev 44781)
@@ -1,5 +1,5 @@
 
-LaTeX lwarp package v0.32   README.txt
+LaTeX lwarp package v0.33   README.txt
 
 Files included are:
 

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

Modified: trunk/Master/texmf-dist/scripts/lwarp/lwarpmk.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/lwarp/lwarpmk.lua	2017-07-13 22:06:46 UTC (rev 44780)
+++ trunk/Master/texmf-dist/scripts/lwarp/lwarpmk.lua	2017-07-13 23:05:35 UTC (rev 44781)
@@ -4,7 +4,7 @@
 
 -- Print the usage of the lwarpmk command:
 
-printversion = "v0.32"
+printversion = "v0.33"
 
 function printhelp ()
 print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;

Modified: trunk/Master/texmf-dist/source/latex/lwarp/lwarp.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/lwarp/lwarp.dtx	2017-07-13 22:06:46 UTC (rev 44780)
+++ trunk/Master/texmf-dist/source/latex/lwarp/lwarp.dtx	2017-07-13 23:05:35 UTC (rev 44781)
@@ -16,7 +16,7 @@
 % \iffalse
 %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
 %<package>\ProvidesPackage{lwarp}
-%<package>    [2017/06/09 v0.32  Allows LaTeX to directly produce HTML5 output.]
+%<package>    [2017/07/10 v0.33  Allows LaTeX to directly produce HTML5 output.]
 %
 %<*driver>
 \documentclass{ltxdoc}
@@ -390,7 +390,12 @@
 
 
 \newcommand{\limitsmath}{%
-Math may be rendered as \SVG\ graphics or using the \textsc{MathJax} JavaScript display engine.
+
+\limitsntheoremnumbering
+
+Math may be rendered
+\margintag{Math rendering}
+as \SVG\ graphics or using the \textsc{MathJax} JavaScript display engine.
 \index{JavaScript>MathJax}
 
 For \SVG\ math,
@@ -505,8 +510,15 @@
 Font control is via \CSS, and the custom \LaTeX\ font settings
 are ignored.
 
-\pkg{ntheorem} has a bug with equation numbering in AMS environments
-\watchout[Equation numbering]
+\limitsntheoremnumbering
+}
+
+\newcommand{\limitsntheoremnumbering}{%
+\pkg{ntheorem} has a bug with equation numbering in \AmS\ environments%
+\watchout[Equation numbering]%
+\index{equation>miss-numbered}%
+\index{split>miss-numbered}%
+\index{AMSmath>split miss-numbered}
 when the option \texttt{thref} is used.  \pkg{lwarp} does not share
 this bug, so equations with \cs{split}, etc, are numbered correctly
 with \pkg{lwarp}'s \HTML\ output, but not with the print output.
@@ -569,6 +581,31 @@
 ugly results for scaling and rotating.
 }
 
+\newcommand{\limitssvgimages}{%
+When a math expression, \texttt{picture}, or \tikz\ environment is added or
+\watchout[Adding/removing]
+removed, the \SVG\ images must be re-created with \texttt{lwarpmk limages}
+to maintain the proper image file sequence numbers.
+
+If \HTML\ appears where an \SVG\ image should be,\watchout[\HTML\ instead of images]%
+\index{math>showing as HTML}%
+\index{images>showing as HTML}%
+\index{SVG>images showing as HTML}%
+\index{HTML>in place of SVG images}
+recompile the document one more
+time to get the page numbers back in sync, then remake the images one more time.
+
+Expressing math as \SVG\ images has the advantage of representing
+the math exactly as \LaTeX\ would, but has the disadvantage of requiring
+an individual file for each math expression.
+\watchout[Lots of files!]
+There is no attempt at
+reusing the same file each time the same expression occurs, so each
+time \texttt{\$x\$} is used, for example, yet another file is created.
+For a document with a large amount of math,
+see \cref{sec:tutorialmathjax} to use MathJax instead.
+}
+
 \newcommand{\limitsxcolor}{%
 Color definitions, models, and mixing are fully supported
 \margintag{support}
@@ -587,6 +624,17 @@
 
 \newcommand{\limitstabular}{%
 \begin{itemize}
+\item When defining environments or macros which include \env{tabular} plus
+	\margintag{misplaced alignment alignment tab character \&}
+	\index{alignment tab character \&, misplaced}
+	\index{misplaced alignment tab character \&}
+	instances of the \texttt{\&} character, it may be
+	necessary to make \texttt{\&} active before the environment or macro is defined,
+	then restore \texttt{\&} to its default catcode after, using the following commands: \\
+	\hspace*{.375in} \cs{StartDefiningTabulars} \\
+	\hspace*{.375in} <define macros or environments using \env{tabular} and \texttt{\&} here> \\
+	\hspace*{.375in} \cs{EndDefiningTabulars}
+
 \item Vertical rules are not yet supported.
 	\margintag{column types}
 
@@ -629,6 +677,12 @@
 	due to \CSS\ limitations.
 	\margintag{\cs{cmidrule} width, trim}
 
+\item \cs{cmidrule} borders are generated by the individual cells
+	\margintag{\cs{cmidrule} and \cs{multicolumn}}
+	on the following row,
+	and so do not necessarily work correctly when the following row
+	has \cs{multicolumn} cells below \cs{cmidrule} borders.
+
 \item For \pkg{longtable}, place headings and footings which
 	\margintag{\env{longtable} headings}
 	do not apply to \HTML\ inside \cs{warpprintonly\{\}}.
@@ -972,7 +1026,7 @@
 %<*package>
 % \fi
 %
-% \CheckSum{10994}
+% \CheckSum{0}
 %
 % \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
@@ -1043,10 +1097,12 @@
 % \changes{v0.30}{2017/04/29}{\ 2017/04/29}
 % \changes{v0.31}{2017/05/15}{\ 2017/05/15}
 % \changes{v0.32}{2017/06/09}{\ 2016/06/09}
+% \changes{v0.33}{2017/07/10}{\ 2017/07/10}
 
 
 
 
+
 % \GetFileInfo{lwarp.sty}
 %
 % \DoNotIndex{\newcommand,\renewcommand,\addtocounter,\begin,\end,\begingroup,\endgroup}
@@ -1176,6 +1232,23 @@
 % For a detailed list of changes, see the Change History on page \pageref{sec:changehistory}.
 %
 % \begin{description}
+% \item[v0.33:] \
+%	\begin{itemize}
+%	\item Tabular |@| and |!| columns now have their own \HTML\ columns.
+%	\item |&| catcode changes are localized, perhaps causing errors
+%		about the tab alignment character |&|,
+%		so any definitions of macros or environments
+%		which themselves contain \env{tabular} and |&| must be enclosed within \cs{StartDefiningTabulars}
+%		and \cs{EndDefiningTabulars}.  See \cref{sec:localizingampersand}.
+%		This change is not required for the routine use of tables,
+%		but only when a table is defined inside another macro or environment,
+%		and while also using the |&| character inside the definition.
+%		This may include the use inside conditional expressions.
+%	\item   Several math environments were incorrectly placed inline.
+%		Also, for \pkg{amsmath} with \SVG\ math, the |fleqn| option has been removed,
+%		resulting in improved spacing for aligned equations.
+%	\item Bug fixes; see the changelog.
+%	\end{itemize}
 % \item[v0.32:] Bug fixes; no source changes needed:
 %	\begin{itemize}
 %	\item |lwarpmk| has been adjusted to work with the latest |luatex|.
@@ -1187,6 +1260,7 @@
 %	\item Improved compatibility with \pkg{keyfloat},
 %		including the new \env{keywrap} environment.
 %	\end{itemize}
+%	\needspace{2\baselineskip}
 % \item[v0.30:] \
 %	\begin{itemize}
 %	\item \pkg{lwarp-newproject} has been removed, and its functions
@@ -1298,142 +1372,144 @@
 %		|lwarpmk| is modified to add |printglosssary| and |htmlglossary| actions.
 %	\end{itemize}
 %
-% \item[v0.27:] \
-%	\begin{itemize}
-%	\item Improved documentation for MacOS install.
-%	\item Fix for \pkg{microtype} with \XeLaTeX\ and \LuaLaTeX.
-%	\item Fix for table footnote paragraph tags.
-%	\item Adds \pkg{lettrine}, \pkg{ulem}, and \pkg{soul}.
-%	\end{itemize}
-% \needspace{2\baselineskip}
-% \item[v0.26:] \
-%	\begin{itemize}
-%	\item Improved installation instructions for MiK\TeX\ regarding generating
-%		the |lwarpmk| executable.
-%	\item Footnotes are now supported by \LaTeX\ boxes instead of pagenotes.
-%		\pkg{pagenote} now works as per the print version.
-%		\pkg{footnote}, \pkg{footnotehyper}, \pkg{footmisc}, \pkg{endnotes},
-%		\pkg{marginnote}, and \pkg{sidenotes} are also supported.
-%	\item \LaTeX\ labels now are used to track the page numbers of |latexiamge|s.
-%		This allows the correct inclusion of |lateximage|s in footnotes, pagenotes, and endnotes.
-%	\item \pkg{cutwin} and \pkg{floatflt} are also supported.
-%	\end{itemize}
-% \needspace{2\baselineskip}
-% \item[v0.25:] \
-%	\begin{itemize}
-%	\item Fix: Allows \pkg{graphicx} and \pkg{graphicsx} before \pkg{lwarp} because
-%		\XeLaTeX\ and \LuaLaTeX\ use \pkg{xunicode} which uses \pkg{graphics}.
-%	\item Package support for \pkg{framed}, several theorem packages, and ellipses.
-%	\end{itemize}
-% \needspace{2\baselineskip}
-% \item[v0.24:] \
-%	\begin{itemize}
-%	\item \pkg{tikz}'s |babel| library is load automatically as needed.
-%	\item \pkg{subfig} has been added, along with |lofdepth| and |lotdepth|.
-%	\item \env{picture} and \env{tikzpicture} now may be inline.
-%	\end{itemize}
-% \needspace{2\baselineskip}
-% \item[v0.22:] \
-%	\begin{itemize}
-%	\item Support has been added for tabular column types |D|, |!|, and |X|.
-%		Unknown column types are converted to |l|.
-%	\item Additional packages are supported, including \pkg{abstract},
-%		\pkg{dcolumn}, \pkg{tabularx}, and \pkg{varioref}.
-%	\end{itemize}
-% \item[v0.21:] \
-%	\begin{itemize}
-%	\item Documentation for installing on Windows has been updated and improved.
-%	\item For Windows compatibility, the |lateximages| shell script
-%		has been replaced with a |lateximages.txt| file, which is parsed
-%		by |lwarpmk| to generate lateximages.
-%		This does not require any changes in the user's code.
-%	\item Windows |lwarpmk again| now functions.
-%	\item For improved error handling, \pkg{lwarp} now verifies the
-%		order in which packages are loaded, and signals an error for misplaced packages.
-%		\pkg{inputenc}, \pkg{fontenc}, \pkg{newunicode}, and \pkg{fontspec}
-%		must be loaded before \pkg{lwarp}, and the other packages which
-%		\pkg{lwarp} knows about must be loaded after.
-%	\item \pkg{lwarp} no longer requires a \cs{title} be assigned.
-%	\end{itemize}
-% \item[v0.20:] \
-%	\begin{itemize}
-%	\item The |makefile| and related infrastructure
-%		has been replaced by the |lwarpmk| utility.
-%		This provides increased portability, reduced dependencies,
-%		and much simpler installation and setup.
-%	\item The |lwarp-newproject| package is now used to locally create
-%		support files.
-%	\item The print and \HTML\ versions of a document may co-exist with their
-%		own sets of auxiliary files.
-%	\item Package handling is now controlled by a modular system which
-%		looks for and loads an |lwarp-<package>| version if available.
-%	\item High-level source compatibility is provided for all supported
-%		packages, almost totally eliminating the need
-%		for |warpprint| and |warpHTML| environments.
-%	\item A large number of additional packages are supported.
-%	\item A new tutorial is included in the documentation, and
-%		many obsolete sections have been removed.
-%	\item \cs{NewHTMLdescription} sets the \HTML\ meta description tag for each file.
-%		See \cref{sec:htmldescription}.  (v0.30 changes this to \cs{HTMLDescription}.)
-%	\item \cs{HTMLFilename} may now be empty, allowing filenames without a prefix.
-%		Lwarp no longer automatically appends a |-| character.
-%		\watchout
-%		For existing projects, add a |-| to the end of \cs{HTMLFilename}.
-%	\item \cs{HomeHTMLFilename} and \cs{HTMLFilename} no longer use
-%		escaped underscore\watchout\
-%		characters.  Underscores may be used in filenames as-is.
-%		(Version 0.30 changes these to package options |HomeHTMLFilename| and
-%		|HTMLFilename|.)
-%	\item \pkg{lwarp} now tries to auto-detect the operating system,
-%		and \cs{warpOSwindows} is only needed if the auto-detection
-%		fails to detect Windows. (As of v0.30, \cs{warpOSwindows} has been converted to
-%		the |OSWindows| option.)
-%	\item Tabular column types |@|, |>|, and |<| are now supported.
-%	\item |BlockClass| and \cs{InlineClass} add an optional style.
-%	\item The |sidebar| and |example| environments have been moved to the
-%		test suite, and are no longer included in \pkg{lwarp}.
-%	\end{itemize}
-% \item[v0.19:] \
-%	\begin{itemize}
-%	\item \textsc{MathJax} now may be used to display math via the |mathjax| option.
-%		See \cref{sec:loading,sec:limitsmath}.
-%	To use MathJax with a pre-existing project,
-%	\watchout
-%	copy or link the file |lwarp_mathjax.txt| to the project's directory.
-%	\item \cs{rule} added, supporting width, height, raise, \cs{textcolor}.
-%	\item \cs{LateximageFontSizeName} provides user-adjustable font size for math
-%		and \env{lateximage}s.
-%	\item \cs{minipagefullwidth} requests that the next minipage be
-%		full-width in \HTML, but still the assigned width in print.
-%	\item \env{minipage} improved side-by-side rendering.
-%	\item CSS class |tablenotes| is provided for table note items.
-%	\item \cs{warpprintonly} replaces \cs{rowprintedonly},
-%		and \cs{warpHTMLonly} is added.  These behave like the \env{warpprint}
-%		\watchout
-%		and \env{warpHTML} environments, and are generally useful, so they replace
-%		the previously table-specific syntax.
-%	\item \pkg{cleveref} is loaded \cs{AtEndPreamble} for improved reliability.
-%		See \cref{sec:cleveref}.
-%	\item \cs{xfracHTMLfontsize} controls \pkg{xfrac} font size in \HTML.
-%	\item \tikz\ improved catcode handling.
-%	\end{itemize}
-% \item[v0.18:] \
-%	\begin{itemize}
-%	\item The \pkg{verse} package and the verse-related commands from
-%		the \pkg{memoir} package are now supported.
-%	\item Responsive web design has been improved for the side\TOC.
-%	\item \cs{includegraphics} now maintains relative sized for em, ex, and \%.
-%	\end{itemize}
-% \item[v0.17:] \
-%	\begin{itemize}
-%	\item \pkg{mdframed} package is supported.
-%	\end{itemize}
-% \item[v0.16:] \
-%	\begin{itemize}
-%	\item Font and input encoding are now controlled by the user, and
-%		\pkg{lwarp} is loaded after fonts have been selected.
-%	\item Support for \XeLaTeX{} and \LuaLaTeX.  See \cref{sec:fonts}.
-%	\end{itemize}
+% ^^A	\needspace{2\baselineskip}
+% ^^A  \item[v0.27:] \
+% ^^A 	\begin{itemize}
+% ^^A 	\item Improved documentation for MacOS install.
+% ^^A 	\item Fix for \pkg{microtype} with \XeLaTeX\ and \LuaLaTeX.
+% ^^A 	\item Fix for table footnote paragraph tags.
+% ^^A 	\item Adds \pkg{lettrine}, \pkg{ulem}, and \pkg{soul}.
+% ^^A 	\end{itemize}
+% ^^A  \needspace{2\baselineskip}
+% ^^A  \item[v0.26:] \
+% ^^A 	\begin{itemize}
+% ^^A 	\item Improved installation instructions for MiK\TeX\ regarding generating
+% ^^A 		the |lwarpmk| executable.
+% ^^A 	\item Footnotes are now supported by \LaTeX\ boxes instead of pagenotes.
+% ^^A 		\pkg{pagenote} now works as per the print version.
+% ^^A 		\pkg{footnote}, \pkg{footnotehyper}, \pkg{footmisc}, \pkg{endnotes},
+% ^^A 		\pkg{marginnote}, and \pkg{sidenotes} are also supported.
+% ^^A 	\item \LaTeX\ labels now are used to track the page numbers of |latexiamge|s.
+% ^^A 		This allows the correct inclusion of |lateximage|s in footnotes, pagenotes, and endnotes.
+% ^^A 	\item \pkg{cutwin} and \pkg{floatflt} are also supported.
+% ^^A 	\end{itemize}
+% ^^A  \needspace{2\baselineskip}
+% ^^A  \item[v0.25:] \
+% ^^A 	\begin{itemize}
+% ^^A 	\item Fix: Allows \pkg{graphicx} and \pkg{graphicsx} before \pkg{lwarp} because
+% ^^A 		\XeLaTeX\ and \LuaLaTeX\ use \pkg{xunicode} which uses \pkg{graphics}.
+% ^^A 	\item Package support for \pkg{framed}, several theorem packages, and ellipses.
+% ^^A 	\end{itemize}
+% ^^A  \needspace{2\baselineskip}
+% ^^A  \item[v0.24:] \
+% ^^A 	\begin{itemize}
+% ^^A 	\item \pkg{tikz}'s |babel| library is load automatically as needed.
+% ^^A 	\item \pkg{subfig} has been added, along with |lofdepth| and |lotdepth|.
+% ^^A 	\item \env{picture} and \env{tikzpicture} now may be inline.
+% ^^A 	\end{itemize}
+% ^^A  \needspace{2\baselineskip}
+% ^^A  \item[v0.22:] \
+% ^^A 	\begin{itemize}
+% ^^A 	\item Support has been added for tabular column types |D|, |!|, and |X|.
+% ^^A 		Unknown column types are converted to |l|.
+% ^^A 	\item Additional packages are supported, including \pkg{abstract},
+% ^^A 		\pkg{dcolumn}, \pkg{tabularx}, and \pkg{varioref}.
+% ^^A 	\end{itemize}
+% ^^A  \item[v0.21:] \
+% ^^A 	\begin{itemize}
+% ^^A 	\item Documentation for installing on Windows has been updated and improved.
+% ^^A 	\item For Windows compatibility, the |lateximages| shell script
+% ^^A 		has been replaced with a |lateximages.txt| file, which is parsed
+% ^^A 		by |lwarpmk| to generate lateximages.
+% ^^A 		This does not require any changes in the user's code.
+% ^^A 	\item Windows |lwarpmk again| now functions.
+% ^^A 	\item For improved error handling, \pkg{lwarp} now verifies the
+% ^^A 		order in which packages are loaded, and signals an error for misplaced packages.
+% ^^A 		\pkg{inputenc}, \pkg{fontenc}, \pkg{newunicode}, and \pkg{fontspec}
+% ^^A 		must be loaded before \pkg{lwarp}, and the other packages which
+% ^^A 		\pkg{lwarp} knows about must be loaded after.
+% ^^A 	\item \pkg{lwarp} no longer requires a \cs{title} be assigned.
+% ^^A 	\end{itemize}
+% ^^A  \item[v0.20:] \
+% ^^A 	\begin{itemize}
+% ^^A 	\item The |makefile| and related infrastructure
+% ^^A 		has been replaced by the |lwarpmk| utility.
+% ^^A 		This provides increased portability, reduced dependencies,
+% ^^A 		and much simpler installation and setup.
+% ^^A 	\item The |lwarp-newproject| package is now used to locally create
+% ^^A 		support files.
+% ^^A 	\item The print and \HTML\ versions of a document may co-exist with their
+% ^^A 		own sets of auxiliary files.
+% ^^A 	\item Package handling is now controlled by a modular system which
+% ^^A 		looks for and loads an |lwarp-<package>| version if available.
+% ^^A 	\item High-level source compatibility is provided for all supported
+% ^^A 		packages, almost totally eliminating the need
+% ^^A 		for |warpprint| and |warpHTML| environments.
+% ^^A 	\item A large number of additional packages are supported.
+% ^^A 	\item A new tutorial is included in the documentation, and
+% ^^A 		many obsolete sections have been removed.
+% ^^A 	\item \cs{NewHTMLdescription} sets the \HTML\ meta description tag for each file.
+% ^^A 		See \cref{sec:htmldescription}.  (v0.30 changes this to \cs{HTMLDescription}.)
+% ^^A 	\item \cs{HTMLFilename} may now be empty, allowing filenames without a prefix.
+% ^^A 		Lwarp no longer automatically appends a |-| character.
+% ^^A 		\watchout
+% ^^A 		For existing projects, add a |-| to the end of \cs{HTMLFilename}.
+% ^^A 	\item \cs{HomeHTMLFilename} and \cs{HTMLFilename} no longer use
+% ^^A 		escaped underscore\watchout\
+% ^^A 		characters.  Underscores may be used in filenames as-is.
+% ^^A 		(Version 0.30 changes these to package options |HomeHTMLFilename| and
+% ^^A 		|HTMLFilename|.)
+% ^^A 	\item \pkg{lwarp} now tries to auto-detect the operating system,
+% ^^A 		and \cs{warpOSwindows} is only needed if the auto-detection
+% ^^A 		fails to detect Windows. (As of v0.30, \cs{warpOSwindows} has been converted to
+% ^^A 		the |OSWindows| option.)
+% ^^A 	\item Tabular column types |@|, |>|, and |<| are now supported.
+% ^^A 	\item |BlockClass| and \cs{InlineClass} add an optional style.
+% ^^A 	\item The |sidebar| and |example| environments have been moved to the
+% ^^A 		test suite, and are no longer included in \pkg{lwarp}.
+% ^^A 	\end{itemize}
+% ^^A 	\needspace{2\baselineskip}
+% ^^A  \item[v0.19:] \
+% ^^A 	\begin{itemize}
+% ^^A 	\item \textsc{MathJax} now may be used to display math via the |mathjax| option.
+% ^^A 		See \cref{sec:loading,sec:limitsmath}.
+% ^^A 	To use MathJax with a pre-existing project,
+% ^^A 	\watchout
+% ^^A 	copy or link the file |lwarp_mathjax.txt| to the project's directory.
+% ^^A 	\item \cs{rule} added, supporting width, height, raise, \cs{textcolor}.
+% ^^A 	\item \cs{LateximageFontSizeName} provides user-adjustable font size for math
+% ^^A 		and \env{lateximage}s.
+% ^^A 	\item \cs{minipagefullwidth} requests that the next minipage be
+% ^^A 		full-width in \HTML, but still the assigned width in print.
+% ^^A 	\item \env{minipage} improved side-by-side rendering.
+% ^^A 	\item CSS class |tablenotes| is provided for table note items.
+% ^^A 	\item \cs{warpprintonly} replaces \cs{rowprintedonly},
+% ^^A 		and \cs{warpHTMLonly} is added.  These behave like the \env{warpprint}
+% ^^A 		\watchout
+% ^^A 		and \env{warpHTML} environments, and are generally useful, so they replace
+% ^^A 		the previously table-specific syntax.
+% ^^A 	\item \pkg{cleveref} is loaded \cs{AtEndPreamble} for improved reliability.
+% ^^A 		See \cref{sec:cleveref}.
+% ^^A 	\item \cs{xfracHTMLfontsize} controls \pkg{xfrac} font size in \HTML.
+% ^^A 	\item \tikz\ improved catcode handling.
+% ^^A 	\end{itemize}
+% ^^A  \item[v0.18:] \
+% ^^A 	\begin{itemize}
+% ^^A 	\item The \pkg{verse} package and the verse-related commands from
+% ^^A 		the \pkg{memoir} package are now supported.
+% ^^A 	\item Responsive web design has been improved for the side\TOC.
+% ^^A 	\item \cs{includegraphics} now maintains relative sized for em, ex, and \%.
+% ^^A 	\end{itemize}
+% ^^A  \item[v0.17:] \
+% ^^A 	\begin{itemize}
+% ^^A 	\item \pkg{mdframed} package is supported.
+% ^^A 	\end{itemize}
+% ^^A  \item[v0.16:] \
+% ^^A 	\begin{itemize}
+% ^^A 	\item Font and input encoding are now controlled by the user, and
+% ^^A 		\pkg{lwarp} is loaded after fonts have been selected.
+% ^^A 	\item Support for \XeLaTeX{} and \LuaLaTeX.  See \cref{sec:fonts}.
+% ^^A 	\end{itemize}
 % \end{description}
 %
 % \clearpage
@@ -2532,21 +2608,8 @@
 % \item Copy/paste a math expression into a text editor to see the \LaTeX\ source.
 % \end{enumerate}
 %
-% When a math expression, |picture|, or \tikz\ environment is added or
-% \watchout[Adding/removing]
-% removed, the \SVG\ images must be re-created with |lwarpmk limages|
-% to maintain the proper image file sequence numbers.
+% \limitssvgimages
 %
-% Expressing math as \SVG\ images has the advantage of representing
-% the math exactly as \LaTeX\ would, but has the disadvantage of requiring
-% an individual file for each math expression.
-% \watchout[Lots of files!]
-% There is no attempt at
-% reusing the same file each time the same expression occurs, so each
-% time \$x\$ is used, for example, yet another file is created.
-% For a document with a large amount of math,
-% see \cref{sec:tutorialmathjax} to use MathJax instead.
-%
 % \clearpage
 %
 % \subsection{Using MathJax for math}
@@ -4135,6 +4198,8 @@
 %	\item |lwarpmk limages| to refresh the |lateximage| images.
 %	\end{itemize}
 %
+% \item[SVG images:] \limitssvgimages
+%
 % \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.
@@ -4809,12 +4874,18 @@
 % \begin{macro}{\LWR at loadbefore} \marg{packagename} \quad
 % Error if this package is after \pkg{lwarp}.
 %
+% \changes{v0.33}{2017/07/06}{Fix: No \cs{PackageError} if already loaded.}
+%
 %    \begin{macrocode}
 \newcommand*{\LWR at loadbefore}[1]{%
+\@ifpackageloaded{#1}
+{}
+{
 \PackageError{lwarp}
 {Package #1 must be loaded before lwarp}
 {Move \detokenize{\usepackage}{#1} before \detokenize{\usepackage}{lwarp}.}
 }
+}
 %    \end{macrocode}
 % \end{macro}
 
@@ -5373,9 +5444,10 @@
 % so the options |leqno| and |fleqn| are passed beforehand to be
 % picked up both here and by \pkg{newtxmath} if it is used.
 % \changes{v0.16}{2016/04/11}{Fix: newtxmath compatibility.}
+% \changes{v0.33}{2016/06/21}{\protect\pkg{amsmath}: Removed \protect\texttt{fleqn} option.}
 %
 %    \begin{macrocode}
-\PassOptionsToPackage{leqno,fleqn}{amsmath}
+\PassOptionsToPackage{leqno}{amsmath}
 \RequirePackage{amsmath}
 %    \end{macrocode}
 
@@ -6701,6 +6773,8 @@
 
 table td.tdl { text-align: left ; vertical-align: middle ; }
 table td.tdc { text-align: center ; vertical-align: middle ; }
+table td.tdat { text-align: center ; vertical-align: middle ; padding: 0px ; margin: 0px ; }
+table td.tdbang { text-align: center ; vertical-align: middle ; }
 table td.tdr { text-align: right ; vertical-align: middle ; }
 table td.tdp { text-align: left ; vertical-align: bottom ; }
 table td.tdm { text-align: left ; vertical-align: middle ; }
@@ -6712,6 +6786,10 @@
     vertical-align: middle ; } /* for cmidrule */
 table td.tdcrule { text-align: center ; border-top: 1px solid silver ;
     vertical-align: middle ; }
+table td.tdatrule { text-align: center ; border-top: 1px solid silver ;
+    vertical-align: middle ;  padding: 0px ; margin: 0px ; }
+table td.tdbangrule { text-align: center ; border-top: 1px solid silver ;
+    vertical-align: middle ; } /* for cmidrule */
 table td.tdrrule { text-align: right ; border-top: 1px solid silver ;
     vertical-align: middle ; }
 table td.tdprule { text-align: left ; border-top: 1px solid silver ;
@@ -7845,7 +7923,7 @@
 
 -- Print the usage of the lwarpmk command:
 
-printversion = "v0.32"
+printversion = "v0.33"
 
 function printhelp ()
 print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
@@ -8566,7 +8644,7 @@
 %
 % To assign an empty value:
 %	\begin{sourcedisplay}
-%	|\LWR at setexparray{name}{index}{\relax}|
+%	|\LWR at setexparray{name}{index}{}|
 %	\end{sourcedisplay}
 %
 % \changes{v0.20}{2017/01/07}{Added single-expansion data arrays.}
@@ -8580,7 +8658,9 @@
 % \begin{macro}{\LWR at setexparray} \marg{name} \marg{index} \marg{contents}
 %    \begin{macrocode}
 \NewDocumentCommand{\LWR at setexparray}{m m m}{%
-\expandafter\edef\csname #1#2\endcsname{\expandonce#3}%
+\ifthenelse{\isempty{#3}}%
+{\csdef{#1#2}{}}
+{\expandafter\edef\csname #1#2\endcsname{\expandonce#3}}%
 }
 %    \end{macrocode}
 % \end{macro}
@@ -9848,8 +9928,10 @@
 %
 % \changes{v0.28}{2017/04/06}{Added \cs{HTMLauthor}. (Renamed in v0.30.)}
 % \changes{v0.30}{2017/04/28}{Renamed from \cs{HTMLauthor}.}
+% \changes{v0.33}{2017/06/18}{Fix: Provides empty default author if none given.}
 %
 %    \begin{macrocode}
+\providecommand{\theauthor}{}
 \newcommand{\theHTMLAuthor}{\theauthor}
 
 \newcommand{\HTMLAuthor}[1]{\renewcommand{\theHTMLAuthor}{#1}}
@@ -10743,6 +10825,7 @@
 \LWR at traceinfo{chapter #3}%
 \LWR at epubprintpendingfootnotes%
 \LWR at stoppars%
+
 \LWR at startnewdepth{\LWR at depthchapter}{\LWR at printclosechapter}%
 
 \LWR at traceinfo{chapter: about to LWR at section}%
@@ -11160,11 +11243,6 @@
 \fvset{frame=none}%
 %    \end{macrocode}
 %
-% The ampersand is redefined active, and acts depending
-% on whether it is inside a tabular.
-%    \begin{macrocode}
-\catcode`\&=\active
-%    \end{macrocode}
 % Allow \HTML\ paragraphs to begin:
 %    \begin{macrocode}
 \LWR at startpars
@@ -12275,9 +12353,9 @@
 \AfterEndPreamble{
 \AtBeginEnvironment{verbatim}{%
 \LWR at forcenewpage
-\LWR at atbeginverbatim{verbatim}\unskip\vspace*{-\baselineskip}%
+\LWR at atbeginverbatim{verbatim}\unskip\LWR at origvspace*{-\baselineskip}%
 }
-\AfterEndEnvironment{verbatim}{\unskip\vspace*{-\baselineskip}\LWR at afterendverbatim}
+\AfterEndEnvironment{verbatim}{\unskip\LWR at origvspace*{-\baselineskip}\LWR at afterendverbatim}
 }
 %    \end{macrocode}
 % \end{environment}
@@ -12599,7 +12677,7 @@
 
 \AfterEndEnvironment{BVerbatim}
 {
-\leavevmode\par\vspace{-\baselineskip}
+\leavevmode\par\LWR at origvspace{-\baselineskip}
 \LWR at afterendverbatim
 }
 %    \end{macrocode}
@@ -12611,12 +12689,12 @@
 % ^^A \AtBeginEnvironment{LVerbatim}
 % ^^A {
 % ^^A \LWR at atbeginverbatim{lverbatim}
-% ^^A \unskip\vspace{-\baselineskip}
+% ^^A \unskip\LWR at origvspace{-\baselineskip}
 % ^^A }
 
 % ^^A \AfterEndEnvironment{LVerbatim}
 % ^^A {
-% ^^A \unskip\vspace{-\baselineskip}
+% ^^A \unskip\LWR at origvspace{-\baselineskip}
 % ^^A \LWR at afterendverbatim
 % ^^A }
 % ^^A    \end{macrocode}
@@ -12636,7 +12714,7 @@
 % ^^A 
 % ^^A \renewcommand*{\UseVerbatim}[1]{%
 % ^^A \LWR at atbeginverbatim{bverbatim}%
-% ^^A \unskip\vspace{-\baselineskip}%
+% ^^A \unskip\LWR at origvspace{-\baselineskip}%
 % ^^A \LWR at origUseVerbatim{#1}%
 % ^^A \unskip%
 % ^^A \LWR at afterendverbatim%
@@ -12889,6 +12967,9 @@
 %
 % \changes{v0.20}{2017/01/07}{Added @, \protect\textless, \protect\textgreater\ columns.}
 % \changes{v0.20}{2017/01/17}{Tabular: \cs{unskip} extra spaces.}
+% \changes{v0.33}{2017/06/20}{New handling of \protect\texttt{\&} to localize catcode changes.}
+% \changes{v0.33}{2017/07/10}{Add: Tabular at and bang columns now have their
+%	own HTML columns.}
 %
 % \subsection{Token lookahead}
 
@@ -12971,6 +13052,14 @@
 %    \end{macrocode}
 
 
+% \DescribeBoolean{LWR at skipatbang}
+% True if just finished a \cs{multicolumn} so should not print the trailing
+% |@| or |!| columns.
+%    \begin{macrocode}
+\newbool{LWR at skipatbang}
+%    \end{macrocode}
+
+
 % \DescribeBoolean{LWR at intabularmetadata}
 % True if are in a tabular but not in a data cell.
 % Used to prevent extra \HTML\ breaks if not inside table data.
@@ -12981,7 +13070,7 @@
 
 
 
-% \subsection{Handling \& and !}
+% \subsection{Handling \&, @, and !}
 %
 % \begin{minipage}{\linewidth}
 % For technical discussion regarding problems redefining |\&|, See: \\
@@ -13005,8 +13094,10 @@
 %    \begin{macrocode}
 \unskip%
 \LWR at getexparray{LWR at colafterspec}{\theLWR at tablecolspos}%
-\LWR at getexparray{LWR at colatspec}{\theLWR at tablecolspos}%
-\LWR at getexparray{LWR at colbangspec}{\theLWR at tablecolspos}%
+% % \LWR at getexparray{LWR at colatspec}{\theLWR at tablecolspos}%
+% \LWR at printatbang{at}{\theLWR at tablecolspos}%
+% % \LWR at getexparray{LWR at colbangspec}{\theLWR at tablecolspos}%
+% \LWR at printatbang{bang}{\theLWR at tablecolspos}%
 %    \end{macrocode}
 % Close paragraphs:
 %    \begin{macrocode}
@@ -13013,9 +13104,18 @@
 \ifbool{LWR at tableparcell}{\LWR at stoppars}{}%
 \global\boolfalse{LWR at tableparcell}%
 %    \end{macrocode}
-% Close the table data cell:
+% Close the table data cell.
+% Skip the |@| and |!| cells if are closing a multicolumn cell.
 %    \begin{macrocode}
-\unskip\LWR at htmltag{/td}\LWR at orignewline%
+\leavevmode\unskip\LWR at htmltag{/td}\LWR at orignewline%
+\ifbool{LWR at skipatbang}%
+{\boolfalse{LWR at skipatbang}}%
+{%
+% \LWR at getexparray{LWR at colatspec}{\theLWR at tablecolspos}%
+\LWR at printatbang{at}{\theLWR at tablecolspos}%
+% \LWR at getexparray{LWR at colbangspec}{\theLWR at tablecolspos}%
+\LWR at printatbang{bang}{\theLWR at tablecolspos}%
+}% not skipping at or bang
 }% not skipping mrowcell
 }% not exiting tabular
 \global\boolfalse{LWR at skippingmrowcell}%
@@ -13033,13 +13133,67 @@
 % When not used inside a \env{tabular}, |&| performs its original
 % function as recorded here ( with catcode 4 ).
 %    \begin{macrocode}
-\def\LWR at origampmacro{&}
+\let\LWR at origampmacro&
 %    \end{macrocode}
-% See below for why the group is used.
+
 %    \begin{macrocode}
-\begingroup
+\end{warpHTML}
 %    \end{macrocode}
 %
+%
+%
+% \subsubsection{Localizing \& catcodes}
+% \label{sec:localizingampersand}
+%
+% \codeall
+%    \begin{macrocode}
+\begin{warpall}
+%    \end{macrocode}
+%
+% Place \cs{StartDefiningTabulars} and
+%	\cs{EndDefiningTabulars}\margintag{misplaced alignment tab character \&}
+% 	\index{alignment tab character \&, misplaced}
+% 	\index{misplaced alignment tab character \&}
+% before and after defining macros or environments which include
+% the tabular \texttt{\&} character in their definitions.
+%
+% The catcode of \texttt{\&} must be changed before the definitions begin,
+%	and must be restored afterwards.  Doing so avoids the error\\
+%	\hspace*{.5in}\texttt{misplaced alignment tab character \&}
+%
+% \begin{macro}{\StartDefiningTabulars} Place before defining something with |&| in it.
+% \changes{v0.33}{2017/06/20}{Add: Avoids error: \protect\texttt{misplaced alignment tab character \&}.}
+%    \begin{macrocode}
+\newcommand{\StartDefiningTabulars}{%
+\warpHTMLonly{\catcode`\&=\active}%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\EndDefiningTabulars} Place after defining something with |&| in it.
+%    \begin{macrocode}
+\newcommand{\EndDefiningTabulars}{%
+\warpHTMLonly{\catcode`\&=4}%
+}
+%    \end{macrocode}
+% \end{macro}
+
+%    \begin{macrocode}
+\end{warpall}
+%    \end{macrocode}
+%
+%
+% \subsubsection{Handling \&}
+%
+%
+% \codehtml
+%    \begin{macrocode}
+\begin{warpHTML}
+%    \end{macrocode}
+%
+%
+
+%
 % \changes{v0.15}{2016/03/31}{Ampersand (\&): Fixed handling when passed as an argument.}
 %
 % \begin{macro}{&} Will behave depending on whether it is being used inside \env{tabular}.
@@ -13048,11 +13202,9 @@
 % in which case it performs special processing for \HTML\ conversion.
 % If not, it behaves normally.
 %
-% The |\catcode| allows the |&| character to be redefined.
 %    \begin{macrocode}
-\catcode`\&=\active
-
-\gdef&{%
+\newcommand*{\LWR at tabularampersand}{%
+\LWR at traceinfo{LWR at tabularampersand}%
 \ifthenelse{\cnttest{\value{LWR at tabulardepth}}{>}{0}}%
 {%
 %    \end{macrocode}
@@ -13074,15 +13226,16 @@
 %    \begin{macrocode}
 {\LWR at origampmacro}%
 }
-\endgroup
 %    \end{macrocode}
-% Outside the group, |&| is left its original catcode for now.
+% |&| is left with its original catcode for now.
 %
 % \pkg{tikz} package seems to require |&| be left alone until after
-% \pkg{tikz} has been loaded.
+% \pkg{tikz} has been loaded.  Also, \pkg{cleveref} uses the ampersand in
+% one of its options.
 %
-% \cs{LWR at lwarpStart} finally makes |&| active at the beginning of the
-% \HTML\ conversion.
+% |&| is made active inside a \env{tabular}.
+%
+% |&| is left alone when in math alignments.
 % \end{macro}
 %
 
@@ -13136,10 +13289,12 @@
 %    \end{macrocode}
 
 % \begin{macro}{\LWR at tablecolspec} Holds the parsed column specification,
-% of total width |LWR at tabletotalcols|.
+% of total width |LWR at tabletotalcols|, not counting |@| and |!| columns.
 %
-% Will contain a string such as |llrrccpc|, exactly one letter per column,
-% without |@|, |>|, |<|, or the vertical pipe.
+% Will contain a string such as |llrrccpc|, exactly one letter per \LaTeX\ table column,
+% without |@|, |!|, |>|, |<|, or the vertical pipe.
+%
+% This is indexed by the counter |LWR at tabletotalcols|.
 %    \begin{macrocode}
 \newcommand*{\LWR at tablecolspec}{}
 %    \end{macrocode}
@@ -13160,9 +13315,12 @@
 
 
 % \DescribeCounter{LWR at tablecolswidth}
-% Holds the width of the table specification.
+% Holds the width of the table columns specification.
 %
-% (This is not the total \# columns.)
+% This is the number of tokens, including one for each |@| etc. column, and also
+% one each for the parameters of |p|, |@|, etc. columns, and three for each |D| column.
+%
+% (This is not the total \# of \LaTeX\ columns in the table.)
 %    \begin{macrocode}
 \newcounter{LWR at tablecolswidth}
 %    \end{macrocode}
@@ -13170,12 +13328,13 @@
 
 % \DescribeCounter{LWR at tablecolspos}
 % Where are currently looking into the table column specification.
+% Index starts at 1.
 %    \begin{macrocode}
 \newcounter{LWR at tablecolspos}
 %    \end{macrocode}
 
 % \DescribeCounter{LWR at tabletotalcols}
-% Holds the final number of table columns.
+% Holds the final number of table columns, not counting |@| and |!| columns.
 %    \begin{macrocode}
 \newcounter{LWR at tabletotalcols}
 %    \end{macrocode}
@@ -13203,10 +13362,18 @@
 
 % \subsection{Parsing @, >, <, ! columns}
 %
+%
+% Holds the parsed argument for |@|, |>|, |<|, or |!| columns:
+%    \begin{macrocode}
+\newcommand*{\LWR at colparameter}{}
+%    \end{macrocode}
+%
 % \begin{macro}{\LWR at parseatcolumn}
 %
 % Handles |@{text}| columns.
 %
+% \changes{v0.33}{2017/07/07}{Fix: Column alignment with leftmost \protect\texttt{@}.}
+%
 %    \begin{macrocode}
 \newcommand*{\LWR at parseatcolumn}{%
 %    \end{macrocode}
@@ -13219,7 +13386,7 @@
 %    \begin{macrocode}
 \LWR at traceinfo{about to read the next token:}%
 \expandarg%
-\StrChar{\LWR at origcolspec}{\theLWR at tablecolspos}[\LWR at strresult]
+\StrChar{\LWR at origcolspec}{\theLWR at tablecolspos}[\LWR at colparameter]
 \fullexpandarg%
 %    \end{macrocode}
 % Store the result into a data array, expanding once out of \cs{LWR at strresult}:
@@ -13228,16 +13395,18 @@
 \ifthenelse{\cnttest{\value{LWR at tabletotalcols}}=0}
 {% left edge of the table:
 \LWR at traceinfo{at the left edge}%
-\LWR at setexparray{LWR at colatspec}{leftedge}{\LWR at strresult}%
+\LWR at setexparray{LWR at colatspec}{leftedge}{\LWR at colparameter}%
+\LWR at traceinfo{at the left edge: %
+  \LWR at getexparray{LWR at colatspec}{leftedge}}%
 }%
 {% not at the left edge:
 \LWR at traceinfo{not at the left edge}%
-\LWR at setexparray{LWR at colatspec}{\theLWR at tabletotalcols}{\LWR at strresult}%
+\LWR at setexparray{LWR at colatspec}{\theLWR at tabletotalcols}{\LWR at colparameter}%
 \LWR at traceinfo{at \theLWR at tabletotalcols: %
-  \LWR at getexparray{LWR at colatspec}{\theLWR at tabletotalcols})!}%
-\let\LWR at strresult\relax%
+  \LWR at getexparray{LWR at colatspec}{\theLWR at tabletotalcols}}%
+}%
+\let\LWR at colparameter\relax%
 \booltrue{LWR at validtablecol}%
-}%
 }
 %    \end{macrocode}
 % \end{macro}
@@ -13244,6 +13413,7 @@
 %
 %
 % \begin{macro}{\LWR at parsebangcolumn}
+% Handles |!{text}| columns.
 %
 % \changes{v0.22}{2017/02/28}{Added tabular \texttt{!!} column.}
 %
@@ -13259,7 +13429,7 @@
 %    \begin{macrocode}
 \LWR at traceinfo{about to read the next token:}%
 \expandarg%
-\StrChar{\LWR at origcolspec}{\theLWR at tablecolspos}[\LWR at strresult]
+\StrChar{\LWR at origcolspec}{\theLWR at tablecolspos}[\LWR at colparameter]
 \fullexpandarg%
 %    \end{macrocode}
 % Store the result into a data array, expanding once out of \cs{LWR at strresult}:
@@ -13268,14 +13438,14 @@
 \ifthenelse{\cnttest{\value{LWR at tabletotalcols}}=0}
 {% left edge of the table:
 \LWR at traceinfo{at the left edge}%
-\LWR at setexparray{LWR at colbangspec}{leftedge}{\LWR at strresult}%
+\LWR at setexparray{LWR at colbangspec}{leftedge}{\LWR at colparameter}%
 }%
 {% not at the left edge:
 \LWR at traceinfo{not at the left edge}%
-\LWR at setexparray{LWR at colbangspec}{\theLWR at tabletotalcols}{\LWR at strresult}%
-\LWR at traceinfo{bang \theLWR at tabletotalcols: \LWR at colbangspec(\theLWR at tabletotalcols)!}%
+\LWR at setexparray{LWR at colbangspec}{\theLWR at tabletotalcols}{\LWR at colparameter}%
+\LWR at traceinfo{bang \theLWR at tabletotalcols: \LWR at colparameter!}%
 }%
-\let\LWR at strresult\relax%
+\let\LWR at colparameter\relax%
 \booltrue{LWR at validtablecol}%
 }
 %    \end{macrocode}
@@ -13297,13 +13467,13 @@
 % Read the next token, expanding once into \cs{LWR at strresult}:
 %    \begin{macrocode}
 \expandarg%
-\StrChar{\LWR at origcolspec}{\theLWR at tablecolspos}[\LWR at strresult]%
+\StrChar{\LWR at origcolspec}{\theLWR at tablecolspos}[\LWR at colparameter]%
 \fullexpandarg%
 %    \end{macrocode}
 % Store the result into a data array, expanding once out of \cs{LWR at strresult}:
 %    \begin{macrocode}
-\LWR at setexparray{LWR at colbeforespec}{\theLWR at tabletotalcolsnext}{\LWR at strresult}%
-\let\LWR at strresult\relax%
+\LWR at setexparray{LWR at colbeforespec}{\theLWR at tabletotalcolsnext}{\LWR at colparameter}%
+\let\LWR at colparameter\relax%
 \booltrue{LWR at validtablecol}%
 }
 %    \end{macrocode}
@@ -13322,15 +13492,15 @@
 %    \end{macrocode}
 % Read the next token, expanding once into \cs{LWR at strresult}:
 %    \begin{macrocode}
-% \StrChar{#1}{\theLWR at tablecolspos}[\LWR at strresult]
+% \StrChar{#1}{\theLWR at tablecolspos}[\LWR at colparameter]
 \expandarg%
-\StrChar{\LWR at origcolspec}{\theLWR at tablecolspos}[\LWR at strresult]%
+\StrChar{\LWR at origcolspec}{\theLWR at tablecolspos}[\LWR at colparameter]%
 \fullexpandarg%
 %    \end{macrocode}
 % Store the result into a data array, expanding once out of \cs{LWR at strresult}:
 %    \begin{macrocode}
-\LWR at setexparray{LWR at colafterspec}{\theLWR at tabletotalcols}{\LWR at strresult}%
-\let\LWR at strresult\relax%
+\LWR at setexparray{LWR at colafterspec}{\theLWR at tabletotalcols}{\LWR at colparameter}%
+\let\LWR at colparameter\relax%
 \booltrue{LWR at validtablecol}%
 }
 %    \end{macrocode}
@@ -13359,10 +13529,11 @@
 \appto\LWR at tablecolspec{#1}%
 \addtocounter{LWR at tabletotalcols}{1}%
 \addtocounter{LWR at tabletotalcolsnext}{1}%
-\LWR at setexparray{LWR at colatspec}{\theLWR at tabletotalcolsnext}{\relax}%
-\LWR at setexparray{LWR at colbangspec}{\theLWR at tabletotalcolsnext}{\relax}%
-\LWR at setexparray{LWR at colbeforespec}{\theLWR at tabletotalcolsnext}{\relax}%
-\LWR at setexparray{LWR at colafterspec}{\theLWR at tabletotalcolsnext}{\relax}%
+\LWR at traceinfo{normal column \theLWR at tabletotalcols: #1}%
+\LWR at setexparray{LWR at colatspec}{\theLWR at tabletotalcolsnext}{}%
+\LWR at setexparray{LWR at colbangspec}{\theLWR at tabletotalcolsnext}{}%
+\LWR at setexparray{LWR at colbeforespec}{\theLWR at tabletotalcolsnext}{}%
+\LWR at setexparray{LWR at colafterspec}{\theLWR at tabletotalcolsnext}{}%
 \booltrue{LWR at validtablecol}%
 }
 %    \end{macrocode}
@@ -13376,11 +13547,11 @@
 %    \begin{macrocode}
 \newcommand*{\LWR at parsepcolumn}[1]{%
 %    \end{macrocode}
-% Converts to the given column type.
+% Converts to the given column type:
 %    \begin{macrocode}
 \LWR at parsenormalcolumn{#1}%
 %    \end{macrocode}
-% skips the following width
+% Skips the following width token:
 %    \begin{macrocode}
 \addtocounter{LWR at tablecolspos}{1}%
 }
@@ -13519,20 +13690,20 @@
 %    \begin{macrocode}
 \setcounter{LWR at tabletotalcols}{0}%
 \setcounter{LWR at tabletotalcolsnext}{1}%
-\LWR at setexparray{LWR at colatspec}{leftedge}{\relax}%
-\LWR at setexparray{LWR at colatspec}{1}{\relax}%
-\LWR at setexparray{LWR at colatspec}{2}{\relax}%
-\LWR at setexparray{LWR at colatspec}{3}{\relax}%
-\LWR at setexparray{LWR at colbangspec}{leftedge}{\relax}%
-\LWR at setexparray{LWR at colbangspec}{1}{\relax}%
-\LWR at setexparray{LWR at colbangspec}{2}{\relax}%
-\LWR at setexparray{LWR at colbangspec}{3}{\relax}%
-\LWR at setexparray{LWR at colbeforespec}{1}{\relax}%
-\LWR at setexparray{LWR at colbeforespec}{2}{\relax}%
-\LWR at setexparray{LWR at colbeforespec}{3}{\relax}%
-\LWR at setexparray{LWR at colafterspec}{1}{\relax}%
-\LWR at setexparray{LWR at colafterspec}{2}{\relax}%
-\LWR at setexparray{LWR at colafterspec}{3}{\relax}%
+\LWR at setexparray{LWR at colatspec}{leftedge}{}%
+\LWR at setexparray{LWR at colatspec}{1}{}%
+\LWR at setexparray{LWR at colatspec}{2}{}%
+\LWR at setexparray{LWR at colatspec}{3}{}%
+\LWR at setexparray{LWR at colbangspec}{leftedge}{}%
+\LWR at setexparray{LWR at colbangspec}{1}{}%
+\LWR at setexparray{LWR at colbangspec}{2}{}%
+\LWR at setexparray{LWR at colbangspec}{3}{}%
+\LWR at setexparray{LWR at colbeforespec}{1}{}%
+\LWR at setexparray{LWR at colbeforespec}{2}{}%
+\LWR at setexparray{LWR at colbeforespec}{3}{}%
+\LWR at setexparray{LWR at colafterspec}{1}{}%
+\LWR at setexparray{LWR at colafterspec}{2}{}%
+\LWR at setexparray{LWR at colafterspec}{3}{}%
 %    \end{macrocode}
 % Starting at the first column specification:
 %    \begin{macrocode}
@@ -13556,6 +13727,7 @@
 %    \begin{macrocode}
 \noexpandarg%
 \StrChar{#1}{\theLWR at tablecolspos}[\LWR at strresult]%
+\LWR at traceinfo{position \arabic{LWR at tablecolspos}: \LWR at strresult}%
 \fullexpandarg%
 %    \end{macrocode}
 % Not yet found a valid column type
@@ -13601,9 +13773,10 @@
 \IfStrEq{\LWR at strresult}{M}{\LWR at parsepcolumn{M}}{}%
 \IfStrEq{\LWR at strresult}{B}{\LWR at parsepcolumn{B}}{}%
 %    \end{macrocode}
-% If this column was an invalid column type, convert it to a |p| column:
+% If this column was an invalid column type, convert it to an |l| column:
 %    \begin{macrocode}
 \ifbool{LWR at validtablecol}{}{%
+\LWR at traceinfo{invalid column type: \LWR at strresult}%
 \LWR at parsenormalcolumn{l}%
 }%
 \addtocounter{LWR at tablecolspos}{1}%
@@ -13647,21 +13820,58 @@
 % \end{macro}
 
 
+% \subsection{Printing at or bang tags}
 
+% \begin{macro}{\LWR at printatbang} \marg{at -or- bang} \marg{index}
+%    \begin{macrocode}
+\newcommand*{\LWR at printatbang}[2]{%
+\edef\LWR at atbangspec{\LWR at getexparray{LWR at col#1spec}{#2}}
+\LWR at traceinfo{atbang: !\LWR at atbangspec!}
+\ifdefempty{\LWR at atbangspec}%
+% \ifthenelse{\isempty{\LWR at atbangspec}}%
+{}%
+{%
+\LWR at htmltag{td class="td#1%
+\ifthenelse{\equal{\LWR at getexparray{LWR at midrules}{\theLWR at tablecolspos}}{Y}}{rule}{}%
+"}%
+\LWR at atbangspec%
+\LWR at htmltag{/td}\LWR at orignewline%
+}%
+}%
+%    \end{macrocode}
+% \end{macro}
+
+
 % \subsection{Data opening tag}
 
 % \begin{macro}{\LWR at tabledatasinglecolumntag}
 % Print a table data opening tag with style for alignment
+%
+% \changes{v0.33}{2017/06/22}{Fix: Macros in tabular could cause extra data cell.}
+%
 %    \begin{macrocode}
 \newcommand*{\LWR at tabledatasinglecolumntag}%
 {%
 \LWR at maybenewtablerow%
 %    \end{macrocode}
+% Don't start a new paragraph tag if have already started one:
+%    \begin{macrocode}
+\ifbool{LWR at intabularmetadata}{%
+%    \end{macrocode}
 % If have found the end of tabular command, do not create the next data cell:
 %    \begin{macrocode}
 \ifbool{LWR at exitingtabular}{}%
 {% not exiting tabular
 %    \end{macrocode}
+% Print the |@| and |!| contents before first column:
+%    \begin{macrocode}
+\ifthenelse{\cnttest{\value{LWR at tablecolspos}}=1}%
+{%
+\LWR at printatbang{at}{leftedge}%
+\LWR at printatbang{bang}{leftedge}%
+}% left edge
+{}% not left edge
+%    \end{macrocode}
 % Fetch the current column's alignment character into |\LWR at strresult|:
 %    \begin{macrocode}
 \StrChar{\LWR at tablecolspec}{\theLWR at tablecolspos}[\LWR at strresult]%
@@ -13696,18 +13906,12 @@
 }% allow pars
 {}% no pars
 %    \end{macrocode}
-% Print the |@| and |!| contents before first column,
-% and then the |>| contents:
+% Print the |>| contents:
 %    \begin{macrocode}
-\ifthenelse{\cnttest{\value{LWR at tablecolspos}}=1}%
-{%
-\LWR at getexparray{LWR at colatspec}{leftedge}%
-\LWR at getexparray{LWR at colbangspec}{leftedge}%
-}% left edge
-{}% not left edge
 \LWR at getexparray{LWR at colbeforespec}{\theLWR at tablecolspos}%
 \global\boolfalse{LWR at intabularmetadata}%
 }% not exiting tabular
+}{}% in tabular metadata
 }%
 %    \end{macrocode}
 % \end{macro}
@@ -13738,7 +13942,7 @@
 \cnttest{\value{LWR at midrulecounter}}{<=}{\value{LWR at tablecolswidth}}%
 }%
 {%
-\LWR at setexparray{LWR at midrules}{\theLWR at midrulecounter}{\relax}%
+\LWR at setexparray{LWR at midrules}{\theLWR at midrulecounter}{}%
 \addtocounter{LWR at midrulecounter}{1}%
 }%
 }
@@ -13746,7 +13950,7 @@
 % \end{macro}
 
 
-% \begin{macro}{\LWR at subcmidrule} \oarg{width} \marg{trim} \marg{leftcolumn} \marg{rightcolumn}
+% \begin{macro}{\LWR at subcmidrule} \marg{width} \marg{trim} \marg{leftcolumn} \marg{rightcolumn}
 %
 % Marks |LWR at midrules| data array elements to be ``Y'' from left to right columns.
 %    \begin{macrocode}
@@ -13782,6 +13986,10 @@
 
 %    \begin{macrocode}
 \newcounter{LWR at tablemulticolswidth}
+%    \end{macrocode}
+%
+% Indexes into the multicolumn specification:
+%    \begin{macrocode}
 \newcounter{LWR at tablemulticolspos}
 %    \end{macrocode}
 
@@ -13788,7 +13996,7 @@
 
 
 % \begin{macro}{\LWR at printmccoltype} \marg{colspec}
-% Print any valid column type found.  Does not print |@|, |>|, or |<| columns
+% Print any valid column type found.  Does not print |@|, |!|, |>|, or |<| columns
 % or their associated tokens.
 %
 % This is printed as part of the table data tag's |class|.
@@ -13830,7 +14038,7 @@
 % \end{macro}
 
 % \begin{macro}{\LWR at multicolother} \marg{colspec}
-% For |@|, |>|, |<|, print the next token without paragraph tags:
+% For |@|, |!|, |>|, |<|, print the next token without paragraph tags:
 %    \begin{macrocode}
 \newcommand*{\LWR at multicolother}[1]{%
 \addtocounter{LWR at tablemulticolspos}{1}%
@@ -13948,13 +14156,18 @@
 % \end{macro}
 
 
+
 % \subsubsection{High-level multicolumn interface}
 
+
+%    \begin{macrocode}
+\newcommand{\LWR at multicoltext}{}
+%    \end{macrocode}
+
+
 % \begin{macro}{\LWR at domulticolumn} \marg{1: numcols} \marg{2: colspec} \marg{3: text}
 %
 %    \begin{macrocode}
-\newcommand{\LWR at multicoltext}{}
-
 \NewDocumentCommand{\LWR at domulticolumn}{m m +m}{%
 \LWR at traceinfo{lwr at domulticolumn -#1- -#2-}%
 %    \end{macrocode}
@@ -14030,12 +14243,16 @@
 }% optional given
 {\LWR at setlatestname{#3}}% no optional
 %    \end{macrocode}
-% create a multicolumn across all the columns
+% 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 at domulticolumn{\theLWR at tabletotalcols}{P}{% \LWR at domulticolumn
-% \IfBooleanTF{#1}% star?
-% {\IfValueTF{#2}{\LWR at origcaption*[#2]{#3}}{\LWR at origcaption*{#3}}}
-% {\IfValueTF{#2}{\LWR at origcaption[#2]{#3}}{\LWR at origcaption{#3}}}
+\LWR at tabularhtmlcolumns{1}{\theLWR at tabletotalcols}
+%    \end{macrocode}
+% Create the multicolumn tag:
+%    \begin{macrocode}
+\LWR at domulticolumn{\theLWR at tabhtmlcoltotal}{P}{% \LWR at domulticolumn
 \IfBooleanTF{#1}% star?
 %    \end{macrocode}
 % Star version, show a caption but do not make a LOT entry:
@@ -14108,6 +14325,10 @@
 }% 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}
+\booltrue{LWR at skipatbang}%
 }% end of \LWR at domulticolumn
 
 \addtocounter{LWR at tablecolspos}{\theLWR at tabletotalcols}
@@ -14119,7 +14340,80 @@
 
 
 
+% \subsubsection{Counting HTML tabular columns}
 
+% The \LaTeX\ specification for a table includes a number of columns separated
+% by the |&| character.  These columns differ in content from line to line.
+% Additional virtual columns may be specified by the special |@| and |!| columns.
+% These columns are identical from line to line, but may be skipped during a
+% multicolumn cell.
+%
+% For \HTML\ output, |@| and |!| columns are placed into their own tabular columns.
+% Thus, a \LaTeX\ \cs{multicolumn} command may span several additional |@| and |!|
+% columns in \HTML\ output.  These additional columns must be added to the total
+% number of columns spanned by an \HTML\ multi-column data cell.
+
+%    \begin{macrocode}
+\newcounter{LWR at tabhtmlcolindex}
+\newcounter{LWR at tabhtmlcolend}
+\newcounter{LWR at tabhtmlcoltotal}
+%    \end{macrocode}
+
+% \begin{macro}{\LWR at tabularhtmlcolumns}
+%	\marg{starting \LaTeX\ column} \marg{number \LaTeX\ columns}
+%
+% Compute the total number of \HTML\ columns being spanned, considering the
+% starting \LaTeX\ table column and the number of \LaTeX\ tabular columns being
+% spanned.  Any |@| and |!| columns within this span are included in the total count.
+% The resulting number of \HTML\ columns is returned in the counter |LWR at tabhtmlcoltotal|.
+%    \begin{macrocode}
+\newcommand*{\LWR at tabularhtmlcolumns}[2]{%
+%    \end{macrocode}
+% Count the starting index, compute ending index,
+% and begin with the count being the \LaTeX\ span, to which additional |@| and |!|
+% columns may be added:
+%    \begin{macrocode}
+\setcounter{LWR at tabhtmlcolindex}{#1}%
+\setcounter{LWR at tabhtmlcoltotal}{#2}%
+\setcounter{LWR at tabhtmlcolend}{#1}%
+\addtocounter{LWR at tabhtmlcolend}{#2}%
+%    \end{macrocode}
+% Walk across the \LaTeX\ columns looking for |@| and |!| columns:
+%    \begin{macrocode}
+\whiledo{\value{LWR at tabhtmlcolindex}<\value{LWR at tabhtmlcolend}}{%
+%    \end{macrocode}
+% Temporarily define a macro equal to the |@| specification for this column:
+%    \begin{macrocode}
+\edef\LWR at atbangspec{\LWR at getexparray{LWR at colatspec}{\theLWR at tabhtmlcolindex}}%
+%    \end{macrocode}
+% If the |@| specification is not empty, add to the count:
+%    \begin{macrocode}
+\ifdefempty{\LWR at atbangspec}{}{\addtocounter{LWR at tabhtmlcoltotal}{1}}%
+%    \end{macrocode}
+% Likewise for the |!| columns:
+%    \begin{macrocode}
+\edef\LWR at atbangspec{\LWR at getexparray{LWR at colbangspec}{\theLWR at tabhtmlcolindex}}%
+\ifdefempty{\LWR at atbangspec}{}{\addtocounter{LWR at tabhtmlcoltotal}{1}}%
+%    \end{macrocode}
+% Move to the next \LaTeX\ column:
+%    \begin{macrocode}
+\addtocounter{LWR at tabhtmlcolindex}{1}%
+}%
+%    \end{macrocode}
+% If at the left-most column, also skip the leftmost |@| and |!| cells:
+%    \begin{macrocode}
+\ifthenelse{\value{LWR at tablecolspos}=1}{%
+\edef\LWR at atbangspec{\LWR at getexparray{LWR at colatspec}{leftedge}}%
+\ifdefempty{\LWR at atbangspec}{}{\addtocounter{LWR at tabhtmlcoltotal}{1}}%
+\edef\LWR at atbangspec{\LWR at getexparray{LWR at colbangspec}{leftedge}}%
+\ifdefempty{\LWR at atbangspec}{}{\addtocounter{LWR at tabhtmlcoltotal}{1}}%
+}{}%
+}
+%    \end{macrocode}
+% \end{macro}
+
+
+
 % \subsubsection{\textbackslash{}tabledatamulticolumntag}
 
 % \begin{macro}{\LWR at tabledatamulticolumntag} \marg{numcols} \marg{alignment} \marg{text}
@@ -14126,9 +14420,23 @@
 %    \begin{macrocode}
 \NewDocumentCommand{\LWR at tabledatamulticolumntag}{m m +m}%
 {%
-\LWR at domulticolumn{#1}{#2}{#3}%
+%    \end{macrocode}
+% Figure out how many extra \HTML\ columns to add for |@| and |!| columns:
+%    \begin{macrocode}
+\LWR at tabularhtmlcolumns{\theLWR at tablecolspos}{#1}
+%    \end{macrocode}
+% Create the multicolumn tag:
+%    \begin{macrocode}
+\LWR at domulticolumn{\theLWR at tabhtmlcoltotal}{#2}{#3}%
+%    \end{macrocode}
+% Move to the next \LaTeX\ column:
+%    \begin{macrocode}
 \addtocounter{LWR at tablecolspos}{#1}%
 \addtocounter{LWR at tablecolspos}{-1}%
+%    \end{macrocode}
+% Skip any trailing |@| or |!| columns for this cell:
+%    \begin{macrocode}
+\booltrue{LWR at skipatbang}%
 }
 %    \end{macrocode}
 % \end{macro}
@@ -14223,8 +14531,7 @@
 {\let\mynext\LWR at donothing}{}%
 %
 \ifthenelse{\isequivalentto{\LWR at mynexttoken}{\toprule}}%
-{%
-\let\mynext\LWR at donothing}{}%
+{\let\mynext\LWR at donothing}{}%
 %
 \ifthenelse{\isequivalentto{\LWR at mynexttoken}{\midrule}}%
 {\let\mynext\LWR at donothing}{}%
@@ -14290,10 +14597,11 @@
 % The new tabular environment will be |\let| in |\LWR at LwarpStart|,
 % since \pkg{siunitx} might redefine tabular in the user's document.
 %    \begin{macrocode}
+\StartDefiningTabulars
+
 \newenvironment*{LWR at tabular}[2][]
 {%
-\LWR at traceinfo{tabular started}%
-\begingroup%
+\LWR at traceinfo{LWR at tabular started}%
 \addtocounter{LWR at tabulardepth}{1}%
 %    \end{macrocode}
 % Not yet started a table row:
@@ -14345,12 +14653,17 @@
 % to see if the next token might create a new data cell:
 %    \begin{macrocode}
 \renewcommand*{\hline}{\LWR at domidrule\LWR at getmynexttoken}%
+
 \newcommand*{\midrule}{\LWR at domidrule\LWR at getmynexttoken}%
+
 \NewDocumentCommand{\cmidrule}{o d() m}%
 {\LWR at docmidrule[##1](##2){##3}\LWR at getmynexttoken}%
+
 \RenewDocumentCommand{\cline}{m}%
 {\LWR at docmidrule{##1}\LWR at getmynexttoken}%
+
 \newcommand*{\toprule}{\LWR at dotbrule\LWR at getmynexttoken}%
+
 \newcommand*{\bottomrule}{\LWR at dotbrule\LWR at getmynexttoken}%
 %    \end{macrocode}
 % The following create data cells and will have no more data in this cell,
@@ -14366,7 +14679,13 @@
 %    \begin{macrocode}
 \global\boolfalse{LWR at tableparcell}%
 \global\boolfalse{LWR at skippingmrowcell}%
+\global\boolfalse{LWR at skipatbang}%
 %    \end{macrocode}
+% Set |&| for its special meaning inside the tabular:
+%    \begin{macrocode}
+\StartDefiningTabulars%
+\protected\gdef&{\LWR at tabularampersand}%
+%    \end{macrocode}
 % Look ahead for a possible table data cell:
 %    \begin{macrocode}
 \LWR at getmynexttoken%
@@ -14375,15 +14694,26 @@
 % Ending the environment:
 %    \begin{macrocode}
 {%
+\LWR at traceinfo{LWR at tabular ending}%
 \LWR at closetabledatacell%
 \LWR at htmlblocktag{/tr}%
 \LWR at htmlblocktag{/table}%
 \global\boolfalse{LWR at intabularmetadata}%
 %    \end{macrocode}
+%
+% Unnest one level of tabular:
 %    \begin{macrocode}
 \addtocounter{LWR at tabulardepth}{-1}%
-\endgroup%
+%    \end{macrocode}
+%
+% Restore |&| to its usual meaning:
+%    \begin{macrocode}
+\protected\gdef&{\LWR at origampmacro}%
+\EndDefiningTabulars%
+\LWR at traceinfo{LWR at tabular finished ending}%
 }
+
+\EndDefiningTabulars
 %    \end{macrocode}
 % \end{environment}
 
@@ -15240,7 +15570,7 @@
 %    \end{macrocode}
 % Subcaptions were being over-written by the closing \HTML\ tag:
 %    \begin{macrocode}
-\vspace*{\baselineskip}%
+\LWR at origvspace*{\baselineskip}%
 %    \end{macrocode}
 % Closing tag:
 %    \begin{macrocode}
@@ -16403,8 +16733,10 @@
 
 
 % \subsubsection{Environment patches}
+%
 % \changes{v0.19}{2016/05/25}{MathJax support added.}
-
+% \changes{v0.33}{2017/06/20}{Fix: Incorrectly-inline math environments.}
+%
 % The following \pkg{amsmath} environments already collect their contents
 % in \cs{@envbody} for further processing.
 %
@@ -16421,6 +16753,7 @@
 % \begin{environment}{multline}
 %    \begin{macrocode}
 \BeforeBeginEnvironment{multline}{
+
 \ifbool{mathjax}
 {
 \LWR at syncmathjax
@@ -16450,6 +16783,7 @@
 % \begin{environment}{multline*}
 %    \begin{macrocode}
 \BeforeBeginEnvironment{multline*}{
+
 \ifbool{mathjax}
 {
 \LWR at syncmathjax
@@ -16480,6 +16814,7 @@
 % \begin{environment}{gather}
 %    \begin{macrocode}
 \BeforeBeginEnvironment{gather}{
+
 \ifbool{mathjax}
 {
 \LWR at syncmathjax
@@ -16507,6 +16842,7 @@
 % \begin{environment}{gather*}
 %    \begin{macrocode}
 \BeforeBeginEnvironment{gather*}{
+
 \ifbool{mathjax}
 {
 \LWR at syncmathjax
@@ -16535,6 +16871,7 @@
 % \begin{environment}{align}
 %    \begin{macrocode}
 \BeforeBeginEnvironment{align}{
+
 \ifbool{mathjax}
 {
 \LWR at syncmathjax
@@ -16563,6 +16900,7 @@
 % \begin{environment}{align*}
 %    \begin{macrocode}
 \BeforeBeginEnvironment{align*}{
+
 \ifbool{mathjax}
 {
 \LWR at syncmathjax
@@ -16591,6 +16929,7 @@
 % \begin{environment}{flalign}
 %    \begin{macrocode}
 \BeforeBeginEnvironment{flalign}{
+
 \ifbool{mathjax}
 {
 \LWR at syncmathjax
@@ -16619,6 +16958,7 @@
 % \begin{environment}{flalign*}
 %    \begin{macrocode}
 \BeforeBeginEnvironment{flalign*}{
+
 \ifbool{mathjax}
 {
 \LWR at syncmathjax
@@ -17660,7 +18000,7 @@
 
 
 
-% \section{Cleverref}
+% \section{Cleveref}
 % \label{sec:cleveref}
 
 % \DescribePackage{cleveref}
@@ -17688,16 +18028,17 @@
 %    \begin{macrocode}
 \begin{warpHTML}
 %    \end{macrocode}
-
-% \changes{v0.19}{2016/06/06}{cleveref: Loaded \cs{AtEndPreamble}.}
-
-
-
 %
 % \cs{AtEndPreable} forces \pkg{cleveref} to be loaded last:
 %
 % \changes{v0.19}{2016/06/06}{cleveref: Loaded \cs{AtEndPreamble}.}
+% \changes{v0.33}{2017/06/18}{cleveref: Fix: Loaded \cs{AtEndPreamble}.}
 %
+%    \begin{macrocode}
+\AtEndPreamble{
+\RequirePackage{cleveref}
+}
+%    \end{macrocode}
 %
 %
 % \changes{v0.20}{2017/01/05}{\pkg{cleveref} and referencing patches: Applied \cs{AfterEndPreamble}.}
@@ -18075,7 +18416,7 @@
 \LWR at endminipage% The following empty line is required:
 
 \LWR at htmldivclassend{minipage}%
-\vspace{1\baselineskip}% required for subcaption
+\LWR at origvspace{1\baselineskip}% required for subcaption
 \addtocounter{LWR at minipagedepth}{-1}%
 \LWR at startpars%
 %    \end{macrocode}
@@ -18392,6 +18733,7 @@
 \let\LWR at origquad\quad
 \let\LWR at origqquad\qquad
 \let\LWR at orighspace\hspace
+\let\LWR at origvspace\vspace
 \let\LWR at origrule\rule
 \let\LWR at origmedskip\medskip
 %    \end{macrocode}
@@ -18630,6 +18972,23 @@
 % \end{macro}
 
 
+% \begin{macro}{\LWR at vspace} * \marg{length} Nullified vspace.
+%
+% \changes{v0.33}{2017/06/21}{Add: \cs{vspace} nullified.}
+%
+%    \begin{macrocode}
+\NewDocumentCommand{\LWR at vspace}{s m}{}
+%    \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\vspace} * \marg{length} Nullified.
+%    \begin{macrocode}
+\let\vspace\LWR at vspace
+%    \end{macrocode}
+% \end{macro}
+
+
 % \begin{macro}{\linebreak} \oarg{num} \qquad
 % Inserts an \HTML\ |br| tag.
 %    \begin{macrocode}
@@ -19228,9 +19587,9 @@
 \AfterEndPreamble{
 \AtBeginEnvironment{alltt}{%
 \LWR at forcenewpage
-\LWR at atbeginverbatim{alltt}\unskip\vspace*{-\baselineskip}%
+\LWR at atbeginverbatim{alltt}\unskip\LWR at origvspace*{-\baselineskip}%
 }
-\AfterEndEnvironment{alltt}{\unskip\vspace*{-\baselineskip}\LWR at afterendverbatim}
+\AfterEndEnvironment{alltt}{\unskip\LWR at origvspace*{-\baselineskip}\LWR at afterendverbatim}
 }
 %    \end{macrocode}
 
@@ -20014,6 +20373,7 @@
 % \pkg{fancyhdr} is nullified.
 %
 % \changes{v0.20}{2017/01/11}{\pkg{fancyhdr}: Added.}
+% \changes{v0.33}{2017/06/18}{\pkg{fancyhdr}: Fix: Optional args for \cs{lhead}, etc.}
 %
 % \codehtml
 %
@@ -20027,12 +20387,12 @@
 \newcommand*{\fancyfoot}[2][]{}
 \newcommand*{\fancyhf}[2][]{}
 \newcommand*{\fancypagestyle}[2]{}
-\newcommand*{\lhead}[1]{}
-\newcommand*{\chead}[1]{}
-\newcommand*{\rhead}[1]{}
-\newcommand*{\lfoot}[1]{}
-\newcommand*{\cfoot}[1]{}
-\newcommand*{\rfoot}[1]{}
+\newcommand*{\lhead}[2][]{}
+\newcommand*{\chead}[2][]{}
+\newcommand*{\rhead}[2][]{}
+\newcommand*{\lfoot}[2][]{}
+\newcommand*{\cfoot}[2][]{}
+\newcommand*{\rfoot}[2][]{}
 \newcommand*{\headrulewidth}{}
 \newcommand*{\footrulewidth}{}
 \newcommand*{\fancyheadoffset}[2][]{}
@@ -22227,8 +22587,8 @@
 \newlength{\LTcapright}
 \newcommand*{\LTcapmarginsfalse}{}
 %    \end{macrocode}
-
-
+%
+%
 % \iffalse
 %</ltcaption>
 % \fi
@@ -26266,7 +26626,7 @@
 }{}
 \LWR at forcenewpage
 \LWR at atbeginverbatim{verse}
-\unskip\vspace{-\baselineskip}
+\unskip\LWR at origvspace{-\baselineskip}
 }
 %    \end{macrocode}
 % After the end of the \env{verse} environment, which places the |pre| tag at the
@@ -26273,7 +26633,7 @@
 % regular left margin:
 %    \begin{macrocode}
 \AfterEndEnvironment{verse}{
-\unskip\vspace{-\baselineskip}
+\unskip\LWR at origvspace{-\baselineskip}
 \LWR at afterendverbatim
 }
 %    \end{macrocode}

Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-alltt.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-alltt.sty	2017-07-13 22:06:46 UTC (rev 44780)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-alltt.sty	2017-07-13 23:05:35 UTC (rev 44781)
@@ -21,9 +21,9 @@
 \AfterEndPreamble{
 \AtBeginEnvironment{alltt}{%
 \LWR at forcenewpage
-\LWR at atbeginverbatim{alltt}\unskip\vspace*{-\baselineskip}%
+\LWR at atbeginverbatim{alltt}\unskip\LWR at origvspace*{-\baselineskip}%
 }
-\AfterEndEnvironment{alltt}{\unskip\vspace*{-\baselineskip}\LWR at afterendverbatim}
+\AfterEndEnvironment{alltt}{\unskip\LWR at origvspace*{-\baselineskip}\LWR at afterendverbatim}
 }
 
 \endinput

Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyhdr.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyhdr.sty	2017-07-13 22:06:46 UTC (rev 44780)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyhdr.sty	2017-07-13 23:05:35 UTC (rev 44781)
@@ -23,12 +23,12 @@
 \newcommand*{\fancyfoot}[2][]{}
 \newcommand*{\fancyhf}[2][]{}
 \newcommand*{\fancypagestyle}[2]{}
-\newcommand*{\lhead}[1]{}
-\newcommand*{\chead}[1]{}
-\newcommand*{\rhead}[1]{}
-\newcommand*{\lfoot}[1]{}
-\newcommand*{\cfoot}[1]{}
-\newcommand*{\rfoot}[1]{}
+\newcommand*{\lhead}[2][]{}
+\newcommand*{\chead}[2][]{}
+\newcommand*{\rhead}[2][]{}
+\newcommand*{\lfoot}[2][]{}
+\newcommand*{\cfoot}[2][]{}
+\newcommand*{\rfoot}[2][]{}
 \newcommand*{\headrulewidth}{}
 \newcommand*{\footrulewidth}{}
 \newcommand*{\fancyheadoffset}[2][]{}

Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-ltcaption.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-ltcaption.sty	2017-07-13 22:06:46 UTC (rev 44780)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-ltcaption.sty	2017-07-13 23:05:35 UTC (rev 44781)
@@ -25,7 +25,6 @@
 \newlength{\LTcapleft}
 \newlength{\LTcapright}
 \newcommand*{\LTcapmarginsfalse}{}
-
 \endinput
 %%
 %% End of file `lwarp-ltcaption.sty'.

Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-verse.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-verse.sty	2017-07-13 22:06:46 UTC (rev 44780)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-verse.sty	2017-07-13 23:05:35 UTC (rev 44781)
@@ -26,10 +26,10 @@
 }{}
 \LWR at forcenewpage
 \LWR at atbeginverbatim{verse}
-\unskip\vspace{-\baselineskip}
+\unskip\LWR at origvspace{-\baselineskip}
 }
 \AfterEndEnvironment{verse}{
-\unskip\vspace{-\baselineskip}
+\unskip\LWR at origvspace{-\baselineskip}
 \LWR at afterendverbatim
 }
 \ifdef{\poemtitle}{

Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp.sty	2017-07-13 22:06:46 UTC (rev 44780)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp.sty	2017-07-13 23:05:35 UTC (rev 44781)
@@ -17,7 +17,7 @@
 %% version 2005/12/01 or later.
 \NeedsTeXFormat{LaTeX2e}[1999/12/01]
 \ProvidesPackage{lwarp}
-    [2017/06/09 v0.32  Allows LaTeX to directly produce HTML5 output.]
+    [2017/07/10 v0.33  Allows LaTeX to directly produce HTML5 output.]
 
 
 
@@ -161,10 +161,14 @@
 }
 
 \newcommand*{\LWR at loadbefore}[1]{%
+\@ifpackageloaded{#1}
+{}
+{
 \PackageError{lwarp}
 {Package #1 must be loaded before lwarp}
 {Move \detokenize{\usepackage}{#1} before \detokenize{\usepackage}{lwarp}.}
 }
+}
 
 \newcommand*{\LWR at loadnever}[2]{%
 \PackageError{lwarp}
@@ -361,7 +365,7 @@
 
 \RequirePackage{zref}
 
-\PassOptionsToPackage{leqno,fleqn}{amsmath}
+\PassOptionsToPackage{leqno}{amsmath}
 \RequirePackage{amsmath}
 
 \RequirePackage{environ}
@@ -1304,6 +1308,8 @@
 
 table td.tdl { text-align: left ; vertical-align: middle ; }
 table td.tdc { text-align: center ; vertical-align: middle ; }
+table td.tdat { text-align: center ; vertical-align: middle ; padding: 0px ; margin: 0px ; }
+table td.tdbang { text-align: center ; vertical-align: middle ; }
 table td.tdr { text-align: right ; vertical-align: middle ; }
 table td.tdp { text-align: left ; vertical-align: bottom ; }
 table td.tdm { text-align: left ; vertical-align: middle ; }
@@ -1315,6 +1321,10 @@
     vertical-align: middle ; } /* for cmidrule */
 table td.tdcrule { text-align: center ; border-top: 1px solid silver ;
     vertical-align: middle ; }
+table td.tdatrule { text-align: center ; border-top: 1px solid silver ;
+    vertical-align: middle ;  padding: 0px ; margin: 0px ; }
+table td.tdbangrule { text-align: center ; border-top: 1px solid silver ;
+    vertical-align: middle ; } /* for cmidrule */
 table td.tdrrule { text-align: right ; border-top: 1px solid silver ;
     vertical-align: middle ; }
 table td.tdprule { text-align: left ; border-top: 1px solid silver ;
@@ -2287,7 +2297,7 @@
 
 -- Print the usage of the lwarpmk command:
 
-printversion = "v0.32"
+printversion = "v0.33"
 
 function printhelp ()
 print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
@@ -2903,7 +2913,9 @@
 
 \begin{warpHTML}
 \NewDocumentCommand{\LWR at setexparray}{m m m}{%
-\expandafter\edef\csname #1#2\endcsname{\expandonce#3}%
+\ifthenelse{\isempty{#3}}%
+{\csdef{#1#2}{}}
+{\expandafter\edef\csname #1#2\endcsname{\expandonce#3}}%
 }
 \newcommand*{\LWR at getexparray}[2]{\csuse{#1#2}}
 
@@ -3438,6 +3450,7 @@
 
 \begin{warpall}
 
+\providecommand{\theauthor}{}
 \newcommand{\theHTMLAuthor}{\theauthor}
 
 \newcommand{\HTMLAuthor}[1]{\renewcommand{\theHTMLAuthor}{#1}}
@@ -3831,6 +3844,7 @@
 \LWR at traceinfo{chapter #3}%
 \LWR at epubprintpendingfootnotes%
 \LWR at stoppars%
+
 \LWR at startnewdepth{\LWR at depthchapter}{\LWR at printclosechapter}%
 
 \LWR at traceinfo{chapter: about to LWR at section}%
@@ -4020,7 +4034,6 @@
    \thanksmarkseries{fnsymbol}
 \fi
 \fvset{frame=none}%
-\catcode`\&=\active
 \LWR at startpars
 }
 
@@ -4486,9 +4499,9 @@
 \AfterEndPreamble{
 \AtBeginEnvironment{verbatim}{%
 \LWR at forcenewpage
-\LWR at atbeginverbatim{verbatim}\unskip\vspace*{-\baselineskip}%
+\LWR at atbeginverbatim{verbatim}\unskip\LWR at origvspace*{-\baselineskip}%
 }
-\AfterEndEnvironment{verbatim}{\unskip\vspace*{-\baselineskip}\LWR at afterendverbatim}
+\AfterEndEnvironment{verbatim}{\unskip\LWR at origvspace*{-\baselineskip}\LWR at afterendverbatim}
 }
 
 \end{warpHTML}
@@ -4669,7 +4682,7 @@
 
 \AfterEndEnvironment{BVerbatim}
 {
-\leavevmode\par\vspace{-\baselineskip}
+\leavevmode\par\LWR at origvspace{-\baselineskip}
 \LWR at afterendverbatim
 }
 
@@ -4832,6 +4845,8 @@
 
 \newbool{LWR at skippingmrowcell}
 
+\newbool{LWR at skipatbang}
+
 \newbool{LWR at intabularmetadata}
 \boolfalse{LWR at intabularmetadata}
 
@@ -4844,11 +4859,15 @@
 {% not skippingmrowcell
 \unskip%
 \LWR at getexparray{LWR at colafterspec}{\theLWR at tablecolspos}%
-\LWR at getexparray{LWR at colatspec}{\theLWR at tablecolspos}%
-\LWR at getexparray{LWR at colbangspec}{\theLWR at tablecolspos}%
 \ifbool{LWR at tableparcell}{\LWR at stoppars}{}%
 \global\boolfalse{LWR at tableparcell}%
-\unskip\LWR at htmltag{/td}\LWR at orignewline%
+\leavevmode\unskip\LWR at htmltag{/td}\LWR at orignewline%
+\ifbool{LWR at skipatbang}%
+{\boolfalse{LWR at skipatbang}}%
+{%
+\LWR at printatbang{at}{\theLWR at tablecolspos}%
+\LWR at printatbang{bang}{\theLWR at tablecolspos}%
+}% not skipping at or bang
 }% not skipping mrowcell
 }% not exiting tabular
 \global\boolfalse{LWR at skippingmrowcell}%
@@ -4857,11 +4876,22 @@
 \newcounter{LWR at tabulardepth}
 \setcounter{LWR at tabulardepth}{0}
 
-\def\LWR at origampmacro{&}
-\begingroup
-\catcode`\&=\active
+\let\LWR at origampmacro&
 
-\gdef&{%
+\end{warpHTML}
+\begin{warpall}
+\newcommand{\StartDefiningTabulars}{%
+\warpHTMLonly{\catcode`\&=\active}%
+}
+\newcommand{\EndDefiningTabulars}{%
+\warpHTMLonly{\catcode`\&=4}%
+}
+
+\end{warpall}
+\begin{warpHTML}
+
+\newcommand*{\LWR at tabularampersand}{%
+\LWR at traceinfo{LWR at tabularampersand}%
 \ifthenelse{\cnttest{\value{LWR at tabulardepth}}{>}{0}}%
 {%
 \unskip%
@@ -4871,7 +4901,6 @@
 }%
 {\LWR at origampmacro}%
 }
-\endgroup
 
 
 \NewDocumentCommand{\LWR at tabularendofline}{s o}
@@ -4909,27 +4938,30 @@
 \newcounter{LWR at tabletotalcolsnext}
 
 
+\newcommand*{\LWR at colparameter}{}
 \newcommand*{\LWR at parseatcolumn}{%
 \LWR at traceinfo{at column}%
 \addtocounter{LWR at tablecolspos}{1}%
 \LWR at traceinfo{about to read the next token:}%
 \expandarg%
-\StrChar{\LWR at origcolspec}{\theLWR at tablecolspos}[\LWR at strresult]
+\StrChar{\LWR at origcolspec}{\theLWR at tablecolspos}[\LWR at colparameter]
 \fullexpandarg%
 \LWR at traceinfo{have now read the next token}%
 \ifthenelse{\cnttest{\value{LWR at tabletotalcols}}=0}
 {% left edge of the table:
 \LWR at traceinfo{at the left edge}%
-\LWR at setexparray{LWR at colatspec}{leftedge}{\LWR at strresult}%
+\LWR at setexparray{LWR at colatspec}{leftedge}{\LWR at colparameter}%
+\LWR at traceinfo{at the left edge: %
+  \LWR at getexparray{LWR at colatspec}{leftedge}}%
 }%
 {% not at the left edge:
 \LWR at traceinfo{not at the left edge}%
-\LWR at setexparray{LWR at colatspec}{\theLWR at tabletotalcols}{\LWR at strresult}%
+\LWR at setexparray{LWR at colatspec}{\theLWR at tabletotalcols}{\LWR at colparameter}%
 \LWR at traceinfo{at \theLWR at tabletotalcols: %
-  \LWR at getexparray{LWR at colatspec}{\theLWR at tabletotalcols})!}%
-\let\LWR at strresult\relax%
+  \LWR at getexparray{LWR at colatspec}{\theLWR at tabletotalcols}}%
+}%
+\let\LWR at colparameter\relax%
 \booltrue{LWR at validtablecol}%
-}%
 }
 \newcommand*{\LWR at parsebangcolumn}{%
 \LWR at traceinfo{bang column}%
@@ -4936,38 +4968,38 @@
 \addtocounter{LWR at tablecolspos}{1}%
 \LWR at traceinfo{about to read the next token:}%
 \expandarg%
-\StrChar{\LWR at origcolspec}{\theLWR at tablecolspos}[\LWR at strresult]
+\StrChar{\LWR at origcolspec}{\theLWR at tablecolspos}[\LWR at colparameter]
 \fullexpandarg%
 \LWR at traceinfo{have now read the next token}%
 \ifthenelse{\cnttest{\value{LWR at tabletotalcols}}=0}
 {% left edge of the table:
 \LWR at traceinfo{at the left edge}%
-\LWR at setexparray{LWR at colbangspec}{leftedge}{\LWR at strresult}%
+\LWR at setexparray{LWR at colbangspec}{leftedge}{\LWR at colparameter}%
 }%
 {% not at the left edge:
 \LWR at traceinfo{not at the left edge}%
-\LWR at setexparray{LWR at colbangspec}{\theLWR at tabletotalcols}{\LWR at strresult}%
-\LWR at traceinfo{bang \theLWR at tabletotalcols: \LWR at colbangspec(\theLWR at tabletotalcols)!}%
+\LWR at setexparray{LWR at colbangspec}{\theLWR at tabletotalcols}{\LWR at colparameter}%
+\LWR at traceinfo{bang \theLWR at tabletotalcols: \LWR at colparameter!}%
 }%
-\let\LWR at strresult\relax%
+\let\LWR at colparameter\relax%
 \booltrue{LWR at validtablecol}%
 }
 \newcommand*{\LWR at parsebeforecolumn}{%
 \addtocounter{LWR at tablecolspos}{1}%
 \expandarg%
-\StrChar{\LWR at origcolspec}{\theLWR at tablecolspos}[\LWR at strresult]%
+\StrChar{\LWR at origcolspec}{\theLWR at tablecolspos}[\LWR at colparameter]%
 \fullexpandarg%
-\LWR at setexparray{LWR at colbeforespec}{\theLWR at tabletotalcolsnext}{\LWR at strresult}%
-\let\LWR at strresult\relax%
+\LWR at setexparray{LWR at colbeforespec}{\theLWR at tabletotalcolsnext}{\LWR at colparameter}%
+\let\LWR at colparameter\relax%
 \booltrue{LWR at validtablecol}%
 }
 \newcommand*{\LWR at parseaftercolumn}{%
 \addtocounter{LWR at tablecolspos}{1}%
 \expandarg%
-\StrChar{\LWR at origcolspec}{\theLWR at tablecolspos}[\LWR at strresult]%
+\StrChar{\LWR at origcolspec}{\theLWR at tablecolspos}[\LWR at colparameter]%
 \fullexpandarg%
-\LWR at setexparray{LWR at colafterspec}{\theLWR at tabletotalcols}{\LWR at strresult}%
-\let\LWR at strresult\relax%
+\LWR at setexparray{LWR at colafterspec}{\theLWR at tabletotalcols}{\LWR at colparameter}%
+\let\LWR at colparameter\relax%
 \booltrue{LWR at validtablecol}%
 }
 \newcommand*{\LWR at parseskipcolumn}{%
@@ -4977,10 +5009,11 @@
 \appto\LWR at tablecolspec{#1}%
 \addtocounter{LWR at tabletotalcols}{1}%
 \addtocounter{LWR at tabletotalcolsnext}{1}%
-\LWR at setexparray{LWR at colatspec}{\theLWR at tabletotalcolsnext}{\relax}%
-\LWR at setexparray{LWR at colbangspec}{\theLWR at tabletotalcolsnext}{\relax}%
-\LWR at setexparray{LWR at colbeforespec}{\theLWR at tabletotalcolsnext}{\relax}%
-\LWR at setexparray{LWR at colafterspec}{\theLWR at tabletotalcolsnext}{\relax}%
+\LWR at traceinfo{normal column \theLWR at tabletotalcols: #1}%
+\LWR at setexparray{LWR at colatspec}{\theLWR at tabletotalcolsnext}{}%
+\LWR at setexparray{LWR at colbangspec}{\theLWR at tabletotalcolsnext}{}%
+\LWR at setexparray{LWR at colbeforespec}{\theLWR at tabletotalcolsnext}{}%
+\LWR at setexparray{LWR at colafterspec}{\theLWR at tabletotalcolsnext}{}%
 \booltrue{LWR at validtablecol}%
 }
 
@@ -5002,20 +5035,20 @@
 \renewcommand*{\LWR at tablecolspec}{}%
 \setcounter{LWR at tabletotalcols}{0}%
 \setcounter{LWR at tabletotalcolsnext}{1}%
-\LWR at setexparray{LWR at colatspec}{leftedge}{\relax}%
-\LWR at setexparray{LWR at colatspec}{1}{\relax}%
-\LWR at setexparray{LWR at colatspec}{2}{\relax}%
-\LWR at setexparray{LWR at colatspec}{3}{\relax}%
-\LWR at setexparray{LWR at colbangspec}{leftedge}{\relax}%
-\LWR at setexparray{LWR at colbangspec}{1}{\relax}%
-\LWR at setexparray{LWR at colbangspec}{2}{\relax}%
-\LWR at setexparray{LWR at colbangspec}{3}{\relax}%
-\LWR at setexparray{LWR at colbeforespec}{1}{\relax}%
-\LWR at setexparray{LWR at colbeforespec}{2}{\relax}%
-\LWR at setexparray{LWR at colbeforespec}{3}{\relax}%
-\LWR at setexparray{LWR at colafterspec}{1}{\relax}%
-\LWR at setexparray{LWR at colafterspec}{2}{\relax}%
-\LWR at setexparray{LWR at colafterspec}{3}{\relax}%
+\LWR at setexparray{LWR at colatspec}{leftedge}{}%
+\LWR at setexparray{LWR at colatspec}{1}{}%
+\LWR at setexparray{LWR at colatspec}{2}{}%
+\LWR at setexparray{LWR at colatspec}{3}{}%
+\LWR at setexparray{LWR at colbangspec}{leftedge}{}%
+\LWR at setexparray{LWR at colbangspec}{1}{}%
+\LWR at setexparray{LWR at colbangspec}{2}{}%
+\LWR at setexparray{LWR at colbangspec}{3}{}%
+\LWR at setexparray{LWR at colbeforespec}{1}{}%
+\LWR at setexparray{LWR at colbeforespec}{2}{}%
+\LWR at setexparray{LWR at colbeforespec}{3}{}%
+\LWR at setexparray{LWR at colafterspec}{1}{}%
+\LWR at setexparray{LWR at colafterspec}{2}{}%
+\LWR at setexparray{LWR at colafterspec}{3}{}%
 \setcounter{LWR at tablecolspos}{1}%
 \LWR at traceinfo{about to StrLen}%
 \noexpandarg%
@@ -5026,6 +5059,7 @@
 \whiledo{\not\value{LWR at tablecolspos}>\value{LWR at tablecolswidth}}{%
 \noexpandarg%
 \StrChar{#1}{\theLWR at tablecolspos}[\LWR at strresult]%
+\LWR at traceinfo{position \arabic{LWR at tablecolspos}: \LWR at strresult}%
 \fullexpandarg%
 \boolfalse{LWR at validtablecol}%
 \IfStrEq{\LWR at strresult}{l}{\LWR at parsenormalcolumn{l}}{}%
@@ -5050,6 +5084,7 @@
 \IfStrEq{\LWR at strresult}{M}{\LWR at parsepcolumn{M}}{}%
 \IfStrEq{\LWR at strresult}{B}{\LWR at parsepcolumn{B}}{}%
 \ifbool{LWR at validtablecol}{}{%
+\LWR at traceinfo{invalid column type: \LWR at strresult}%
 \LWR at parsenormalcolumn{l}%
 }%
 \addtocounter{LWR at tablecolspos}{1}%
@@ -5075,11 +5110,33 @@
 }
 
 
+\newcommand*{\LWR at printatbang}[2]{%
+\edef\LWR at atbangspec{\LWR at getexparray{LWR at col#1spec}{#2}}
+\LWR at traceinfo{atbang: !\LWR at atbangspec!}
+\ifdefempty{\LWR at atbangspec}%
+{}%
+{%
+\LWR at htmltag{td class="td#1%
+\ifthenelse{\equal{\LWR at getexparray{LWR at midrules}{\theLWR at tablecolspos}}{Y}}{rule}{}%
+"}%
+\LWR at atbangspec%
+\LWR at htmltag{/td}\LWR at orignewline%
+}%
+}%
+
+
 \newcommand*{\LWR at tabledatasinglecolumntag}%
 {%
 \LWR at maybenewtablerow%
+\ifbool{LWR at intabularmetadata}{%
 \ifbool{LWR at exitingtabular}{}%
 {% not exiting tabular
+\ifthenelse{\cnttest{\value{LWR at tablecolspos}}=1}%
+{%
+\LWR at printatbang{at}{leftedge}%
+\LWR at printatbang{bang}{leftedge}%
+}% left edge
+{}% not left edge
 \StrChar{\LWR at tablecolspec}{\theLWR at tablecolspos}[\LWR at strresult]%
 \LWR at htmltag{td class="td%
 \LWR at strresult%
@@ -5099,15 +5156,10 @@
 \global\booltrue{LWR at tableparcell}%
 }% allow pars
 {}% no pars
-\ifthenelse{\cnttest{\value{LWR at tablecolspos}}=1}%
-{%
-\LWR at getexparray{LWR at colatspec}{leftedge}%
-\LWR at getexparray{LWR at colbangspec}{leftedge}%
-}% left edge
-{}% not left edge
 \LWR at getexparray{LWR at colbeforespec}{\theLWR at tablecolspos}%
 \global\boolfalse{LWR at intabularmetadata}%
 }% not exiting tabular
+}{}% in tabular metadata
 }%
 
 
@@ -5120,7 +5172,7 @@
 \cnttest{\value{LWR at midrulecounter}}{<=}{\value{LWR at tablecolswidth}}%
 }%
 {%
-\LWR at setexparray{LWR at midrules}{\theLWR at midrulecounter}{\relax}%
+\LWR at setexparray{LWR at midrules}{\theLWR at midrulecounter}{}%
 \addtocounter{LWR at midrulecounter}{1}%
 }%
 }
@@ -5249,7 +5301,8 @@
 {\LWR at setlatestname{#2}}% given and non-empty
 }% optional given
 {\LWR at setlatestname{#3}}% no optional
-\LWR at domulticolumn{\theLWR at tabletotalcols}{P}{% \LWR at domulticolumn
+\LWR at tabularhtmlcolumns{1}{\theLWR at tabletotalcols}
+\LWR at domulticolumn{\theLWR at tabhtmlcoltotal}{P}{% \LWR at domulticolumn
 \IfBooleanTF{#1}% star?
 {% yes star
 \LWR at htmlblocktag{figcaption}%
@@ -5296,6 +5349,7 @@
 }% end of yes TOC entry
 }% end of TOC entry not empty
 }% end of no star
+\booltrue{LWR at skipatbang}%
 }% end of \LWR at domulticolumn
 
 \addtocounter{LWR at tablecolspos}{\theLWR at tabletotalcols}
@@ -5304,11 +5358,39 @@
 }
 
 
+
+\newcounter{LWR at tabhtmlcolindex}
+\newcounter{LWR at tabhtmlcolend}
+\newcounter{LWR at tabhtmlcoltotal}
+
+\newcommand*{\LWR at tabularhtmlcolumns}[2]{%
+\setcounter{LWR at tabhtmlcolindex}{#1}%
+\setcounter{LWR at tabhtmlcoltotal}{#2}%
+\setcounter{LWR at tabhtmlcolend}{#1}%
+\addtocounter{LWR at tabhtmlcolend}{#2}%
+\whiledo{\value{LWR at tabhtmlcolindex}<\value{LWR at tabhtmlcolend}}{%
+\edef\LWR at atbangspec{\LWR at getexparray{LWR at colatspec}{\theLWR at tabhtmlcolindex}}%
+\ifdefempty{\LWR at atbangspec}{}{\addtocounter{LWR at tabhtmlcoltotal}{1}}%
+\edef\LWR at atbangspec{\LWR at getexparray{LWR at colbangspec}{\theLWR at tabhtmlcolindex}}%
+\ifdefempty{\LWR at atbangspec}{}{\addtocounter{LWR at tabhtmlcoltotal}{1}}%
+\addtocounter{LWR at tabhtmlcolindex}{1}%
+}%
+\ifthenelse{\value{LWR at tablecolspos}=1}{%
+\edef\LWR at atbangspec{\LWR at getexparray{LWR at colatspec}{leftedge}}%
+\ifdefempty{\LWR at atbangspec}{}{\addtocounter{LWR at tabhtmlcoltotal}{1}}%
+\edef\LWR at atbangspec{\LWR at getexparray{LWR at colbangspec}{leftedge}}%
+\ifdefempty{\LWR at atbangspec}{}{\addtocounter{LWR at tabhtmlcoltotal}{1}}%
+}{}%
+}
+
+
 \NewDocumentCommand{\LWR at tabledatamulticolumntag}{m m +m}%
 {%
-\LWR at domulticolumn{#1}{#2}{#3}%
+\LWR at tabularhtmlcolumns{\theLWR at tablecolspos}{#1}
+\LWR at domulticolumn{\theLWR at tabhtmlcoltotal}{#2}{#3}%
 \addtocounter{LWR at tablecolspos}{#1}%
 \addtocounter{LWR at tablecolspos}{-1}%
+\booltrue{LWR at skipatbang}%
 }
 
 
@@ -5347,8 +5429,7 @@
 \ifthenelse{\isequivalentto{\LWR at mynexttoken}{\hline}}%
 {\let\mynext\LWR at donothing}{}%
 \ifthenelse{\isequivalentto{\LWR at mynexttoken}{\toprule}}%
-{%
-\let\mynext\LWR at donothing}{}%
+{\let\mynext\LWR at donothing}{}%
 \ifthenelse{\isequivalentto{\LWR at mynexttoken}{\midrule}}%
 {\let\mynext\LWR at donothing}{}%
 \ifthenelse{\isequivalentto{\LWR at mynexttoken}{\cmidrule}}%
@@ -5375,10 +5456,11 @@
 
 \begin{warpHTML}
 
+\StartDefiningTabulars
+
 \newenvironment*{LWR at tabular}[2][]
 {%
-\LWR at traceinfo{tabular started}%
-\begingroup%
+\LWR at traceinfo{LWR at tabular started}%
 \addtocounter{LWR at tabulardepth}{1}%
 \global\boolfalse{LWR at startedrow}%
 \global\boolfalse{LWR at doinghline}%
@@ -5393,12 +5475,17 @@
 \LWR at clearmidrules%
 \let\\\LWR at tabularendofline%
 \renewcommand*{\hline}{\LWR at domidrule\LWR at getmynexttoken}%
+
 \newcommand*{\midrule}{\LWR at domidrule\LWR at getmynexttoken}%
+
 \NewDocumentCommand{\cmidrule}{o d() m}%
 {\LWR at docmidrule[##1](##2){##3}\LWR at getmynexttoken}%
+
 \RenewDocumentCommand{\cline}{m}%
 {\LWR at docmidrule{##1}\LWR at getmynexttoken}%
+
 \newcommand*{\toprule}{\LWR at dotbrule\LWR at getmynexttoken}%
+
 \newcommand*{\bottomrule}{\LWR at dotbrule\LWR at getmynexttoken}%
 \let\multicolumn\LWR at tabledatamulticolumntag%
 \let\multirow\LWR at tabledatamultirowtag%
@@ -5406,17 +5493,25 @@
 \let\caption\LWR at longtabledatacaptiontag%
 \global\boolfalse{LWR at tableparcell}%
 \global\boolfalse{LWR at skippingmrowcell}%
+\global\boolfalse{LWR at skipatbang}%
+\StartDefiningTabulars%
+\protected\gdef&{\LWR at tabularampersand}%
 \LWR at getmynexttoken%
 }%
 {%
+\LWR at traceinfo{LWR at tabular ending}%
 \LWR at closetabledatacell%
 \LWR at htmlblocktag{/tr}%
 \LWR at htmlblocktag{/table}%
 \global\boolfalse{LWR at intabularmetadata}%
 \addtocounter{LWR at tabulardepth}{-1}%
-\endgroup%
+\protected\gdef&{\LWR at origampmacro}%
+\EndDefiningTabulars%
+\LWR at traceinfo{LWR at tabular finished ending}%
 }
 
+\EndDefiningTabulars
+
 \end{warpHTML}
 
 
@@ -5706,7 +5801,7 @@
 \newcommand{\LWR at caption@end}
 {%
 \LWR at origcaption@end%
-\vspace*{\baselineskip}%
+\LWR at origvspace*{\baselineskip}%
 \LWR at htmlblocktag{/figcaption}%
 \endgroup%
 \LWR at traceinfo{LWR at caption@end: done}%
@@ -6178,8 +6273,8 @@
 }
 
 
+\BeforeBeginEnvironment{multline}{
 
-\BeforeBeginEnvironment{multline}{
 \ifbool{mathjax}
 {
 \LWR at syncmathjax
@@ -6204,6 +6299,7 @@
 }
 
 \BeforeBeginEnvironment{multline*}{
+
 \ifbool{mathjax}
 {
 \LWR at syncmathjax
@@ -6229,6 +6325,7 @@
 
 
 \BeforeBeginEnvironment{gather}{
+
 \ifbool{mathjax}
 {
 \LWR at syncmathjax
@@ -6252,6 +6349,7 @@
 }
 
 \BeforeBeginEnvironment{gather*}{
+
 \ifbool{mathjax}
 {
 \LWR at syncmathjax
@@ -6275,6 +6373,7 @@
 }
 
 \BeforeBeginEnvironment{align}{
+
 \ifbool{mathjax}
 {
 \LWR at syncmathjax
@@ -6298,6 +6397,7 @@
 }
 
 \BeforeBeginEnvironment{align*}{
+
 \ifbool{mathjax}
 {
 \LWR at syncmathjax
@@ -6321,6 +6421,7 @@
 }
 
 \BeforeBeginEnvironment{flalign}{
+
 \ifbool{mathjax}
 {
 \LWR at syncmathjax
@@ -6344,6 +6445,7 @@
 }
 
 \BeforeBeginEnvironment{flalign*}{
+
 \ifbool{mathjax}
 {
 \LWR at syncmathjax
@@ -6831,8 +6933,9 @@
 
 
 \begin{warpHTML}
-
-
+\AtEndPreamble{
+\RequirePackage{cleveref}
+}
 \AfterEndPreamble{
 
 
@@ -6979,7 +7082,7 @@
 \LWR at endminipage% The following empty line is required:
 
 \LWR at htmldivclassend{minipage}%
-\vspace{1\baselineskip}% required for subcaption
+\LWR at origvspace{1\baselineskip}% required for subcaption
 \addtocounter{LWR at minipagedepth}{-1}%
 \LWR at startpars%
 \global\booltrue{LWR at minipagethispar}%
@@ -7081,6 +7184,7 @@
 \let\LWR at origquad\quad
 \let\LWR at origqquad\qquad
 \let\LWR at orighspace\hspace
+\let\LWR at origvspace\vspace
 \let\LWR at origrule\rule
 \let\LWR at origmedskip\medskip
 
@@ -7180,6 +7284,9 @@
 }
 \let\hspace\LWR at hspace
 
+\NewDocumentCommand{\LWR at vspace}{s m}{}
+\let\vspace\LWR at vspace
+
 \renewcommand*{\linebreak}[1][]{\newline}
 
 \renewcommand*{\nolinebreak}[1][]{}



More information about the tex-live-commits mailing list