diff options
author | Karl Berry <karl@freefriends.org> | 2017-07-13 23:05:35 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-07-13 23:05:35 +0000 |
commit | a7ecf3589db1dd3722fda599c2ac8e80ac17b6ad (patch) | |
tree | 8f2f4636e1e0ce9a3f96f06d5b666702b02e6a9d /Master | |
parent | f08c5282873636378a865aa48c1c9fcdd6d00365 (diff) |
lwarp (11jul17)
git-svn-id: svn://tug.org/texlive/trunk@44781 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/lwarp/README.txt | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/lwarp/lwarp.pdf | bin | 1484432 -> 1500385 bytes | |||
-rwxr-xr-x | Master/texmf-dist/scripts/lwarp/lwarpmk.lua | 2 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/lwarp/lwarp.dtx | 916 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/lwarp/lwarp-alltt.sty | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/lwarp/lwarp-fancyhdr.sty | 12 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/lwarp/lwarp-ltcaption.sty | 1 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/lwarp/lwarp-verse.sty | 4 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/lwarp/lwarp.sty | 247 |
9 files changed, 827 insertions, 361 deletions
diff --git a/Master/texmf-dist/doc/latex/lwarp/README.txt b/Master/texmf-dist/doc/latex/lwarp/README.txt index 22db4ca6457..645dd1c553d 100644 --- a/Master/texmf-dist/doc/latex/lwarp/README.txt +++ b/Master/texmf-dist/doc/latex/lwarp/README.txt @@ -1,5 +1,5 @@ -LaTeX lwarp package v0.32 README.txt +LaTeX lwarp package v0.33 README.txt Files included are: diff --git a/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf b/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf Binary files differindex 52671ae8d0d..b3f8bf8ebd6 100644 --- a/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf +++ b/Master/texmf-dist/doc/latex/lwarp/lwarp.pdf diff --git a/Master/texmf-dist/scripts/lwarp/lwarpmk.lua b/Master/texmf-dist/scripts/lwarp/lwarpmk.lua index 83cfd06edd9..5c6f7576aaf 100755 --- a/Master/texmf-dist/scripts/lwarp/lwarpmk.lua +++ b/Master/texmf-dist/scripts/lwarp/lwarpmk.lua @@ -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.") ; diff --git a/Master/texmf-dist/source/latex/lwarp/lwarp.dtx b/Master/texmf-dist/source/latex/lwarp/lwarp.dtx index a956f0a45f7..f21ed1054b1 100644 --- a/Master/texmf-dist/source/latex/lwarp/lwarp.dtx +++ b/Master/texmf-dist/source/latex/lwarp/lwarp.dtx @@ -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 @@ by setting \cs{LateximageFontSizeName} to a font size name --- \emph{without the \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 @@ This conversion is not total. 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 @@ unlike \LaTeX{}, so expect some 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 @@ Use \CSS\ or \cs{textcolor} where possible. \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 @@ Use \CSS\ or \cs{textcolor} where possible. 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 @@ This boolean may be tested by the user for later use. %<*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,6 +1097,8 @@ This boolean may be tested by the user for later use. % \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} + @@ -1176,6 +1232,23 @@ This boolean may be tested by the user for later use. % 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 @@ This boolean may be tested by the user for later use. % \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 @@ This boolean may be tested by the user for later use. % |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,20 +2608,7 @@ This boolean may be tested by the user for later use. % \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. -% -% 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. +% \limitssvgimages % % \clearpage % @@ -4135,6 +4198,8 @@ This boolean may be tested by the user for later use. % \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 @@ after lwarp.} % \begin{macro}{\LWR@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@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 @@ top=1in,bottom=1in,% % 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 @@ td {padding: 1ex .5em 1ex .5em ;} 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 @@ table td.tdlrule { text-align: left ; border-top: 1px solid silver ; 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 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX- -- 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 @@ end -- not --version % % To assign an empty value: % \begin{sourcedisplay} -% |\LWR@setexparray{name}{index}{\relax}| +% |\LWR@setexparray{name}{index}{}| % \end{sourcedisplay} % % \changes{v0.20}{2017/01/07}{Added single-expansion data arrays.} @@ -8580,7 +8658,9 @@ end -- not --version % \begin{macro}{\LWR@setexparray} \marg{name} \marg{index} \marg{contents} % \begin{macrocode} \NewDocumentCommand{\LWR@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 @@ end -- not --version % % \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 @@ end -- not --version \LWR@traceinfo{chapter #3}% \LWR@epubprintpendingfootnotes% \LWR@stoppars% + \LWR@startnewdepth{\LWR@depthchapter}{\LWR@printclosechapter}% \LWR@traceinfo{chapter: about to LWR@section}% @@ -11160,11 +11243,6 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \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@startpars @@ -12275,9 +12353,9 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \AfterEndPreamble{ \AtBeginEnvironment{verbatim}{% \LWR@forcenewpage -\LWR@atbeginverbatim{verbatim}\unskip\vspace*{-\baselineskip}% +\LWR@atbeginverbatim{verbatim}\unskip\LWR@origvspace*{-\baselineskip}% } -\AfterEndEnvironment{verbatim}{\unskip\vspace*{-\baselineskip}\LWR@afterendverbatim} +\AfterEndEnvironment{verbatim}{\unskip\LWR@origvspace*{-\baselineskip}\LWR@afterendverbatim} } % \end{macrocode} % \end{environment} @@ -12599,7 +12677,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \AfterEndEnvironment{BVerbatim} { -\leavevmode\par\vspace{-\baselineskip} +\leavevmode\par\LWR@origvspace{-\baselineskip} \LWR@afterendverbatim } % \end{macrocode} @@ -12611,12 +12689,12 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % ^^A \AtBeginEnvironment{LVerbatim} % ^^A { % ^^A \LWR@atbeginverbatim{lverbatim} -% ^^A \unskip\vspace{-\baselineskip} +% ^^A \unskip\LWR@origvspace{-\baselineskip} % ^^A } % ^^A \AfterEndEnvironment{LVerbatim} % ^^A { -% ^^A \unskip\vspace{-\baselineskip} +% ^^A \unskip\LWR@origvspace{-\baselineskip} % ^^A \LWR@afterendverbatim % ^^A } % ^^A \end{macrocode} @@ -12636,7 +12714,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % ^^A % ^^A \renewcommand*{\UseVerbatim}[1]{% % ^^A \LWR@atbeginverbatim{bverbatim}% -% ^^A \unskip\vspace{-\baselineskip}% +% ^^A \unskip\LWR@origvspace{-\baselineskip}% % ^^A \LWR@origUseVerbatim{#1}% % ^^A \unskip% % ^^A \LWR@afterendverbatim% @@ -12889,6 +12967,9 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % % \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 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \end{macrocode} +% \DescribeBoolean{LWR@skipatbang} +% True if just finished a \cs{multicolumn} so should not print the trailing +% |@| or |!| columns. +% \begin{macrocode} +\newbool{LWR@skipatbang} +% \end{macrocode} + + % \DescribeBoolean{LWR@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 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% -% \subsection{Handling \& and !} +% \subsection{Handling \&, @, and !} % % \begin{minipage}{\linewidth} % For technical discussion regarding problems redefining |\&|, See: \\ @@ -13005,17 +13094,28 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \begin{macrocode} \unskip% \LWR@getexparray{LWR@colafterspec}{\theLWR@tablecolspos}% -\LWR@getexparray{LWR@colatspec}{\theLWR@tablecolspos}% -\LWR@getexparray{LWR@colbangspec}{\theLWR@tablecolspos}% +% % \LWR@getexparray{LWR@colatspec}{\theLWR@tablecolspos}% +% \LWR@printatbang{at}{\theLWR@tablecolspos}% +% % \LWR@getexparray{LWR@colbangspec}{\theLWR@tablecolspos}% +% \LWR@printatbang{bang}{\theLWR@tablecolspos}% % \end{macrocode} % Close paragraphs: % \begin{macrocode} \ifbool{LWR@tableparcell}{\LWR@stoppars}{}% \global\boolfalse{LWR@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@htmltag{/td}\LWR@orignewline% +\leavevmode\unskip\LWR@htmltag{/td}\LWR@orignewline% +\ifbool{LWR@skipatbang}% +{\boolfalse{LWR@skipatbang}}% +{% +% \LWR@getexparray{LWR@colatspec}{\theLWR@tablecolspos}% +\LWR@printatbang{at}{\theLWR@tablecolspos}% +% \LWR@getexparray{LWR@colbangspec}{\theLWR@tablecolspos}% +\LWR@printatbang{bang}{\theLWR@tablecolspos}% +}% not skipping at or bang }% not skipping mrowcell }% not exiting tabular \global\boolfalse{LWR@skippingmrowcell}% @@ -13033,13 +13133,67 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % When not used inside a \env{tabular}, |&| performs its original % function as recorded here ( with catcode 4 ). % \begin{macrocode} -\def\LWR@origampmacro{&} +\let\LWR@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 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % 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@tabularampersand}{% +\LWR@traceinfo{LWR@tabularampersand}% \ifthenelse{\cnttest{\value{LWR@tabulardepth}}{>}{0}}% {% % \end{macrocode} @@ -13074,15 +13226,16 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \begin{macrocode} {\LWR@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@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 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \end{macrocode} % \begin{macro}{\LWR@tablecolspec} Holds the parsed column specification, -% of total width |LWR@tabletotalcols|. +% of total width |LWR@tabletotalcols|, not counting |@| and |!| columns. +% +% Will contain a string such as |llrrccpc|, exactly one letter per \LaTeX\ table column, +% without |@|, |!|, |>|, |<|, or the vertical pipe. % -% Will contain a string such as |llrrccpc|, exactly one letter per column, -% without |@|, |>|, |<|, or the vertical pipe. +% This is indexed by the counter |LWR@tabletotalcols|. % \begin{macrocode} \newcommand*{\LWR@tablecolspec}{} % \end{macrocode} @@ -13160,9 +13315,12 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \DescribeCounter{LWR@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@tablecolswidth} % \end{macrocode} @@ -13170,12 +13328,13 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \DescribeCounter{LWR@tablecolspos} % Where are currently looking into the table column specification. +% Index starts at 1. % \begin{macrocode} \newcounter{LWR@tablecolspos} % \end{macrocode} % \DescribeCounter{LWR@tabletotalcols} -% Holds the final number of table columns. +% Holds the final number of table columns, not counting |@| and |!| columns. % \begin{macrocode} \newcounter{LWR@tabletotalcols} % \end{macrocode} @@ -13203,10 +13362,18 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \subsection{Parsing @, >, <, ! columns} % +% +% Holds the parsed argument for |@|, |>|, |<|, or |!| columns: +% \begin{macrocode} +\newcommand*{\LWR@colparameter}{} +% \end{macrocode} +% % \begin{macro}{\LWR@parseatcolumn} % % Handles |@{text}| columns. % +% \changes{v0.33}{2017/07/07}{Fix: Column alignment with leftmost \protect\texttt{@}.} +% % \begin{macrocode} \newcommand*{\LWR@parseatcolumn}{% % \end{macrocode} @@ -13219,7 +13386,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \begin{macrocode} \LWR@traceinfo{about to read the next token:}% \expandarg% -\StrChar{\LWR@origcolspec}{\theLWR@tablecolspos}[\LWR@strresult] +\StrChar{\LWR@origcolspec}{\theLWR@tablecolspos}[\LWR@colparameter] \fullexpandarg% % \end{macrocode} % Store the result into a data array, expanding once out of \cs{LWR@strresult}: @@ -13228,22 +13395,25 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \ifthenelse{\cnttest{\value{LWR@tabletotalcols}}=0} {% left edge of the table: \LWR@traceinfo{at the left edge}% -\LWR@setexparray{LWR@colatspec}{leftedge}{\LWR@strresult}% +\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}{\theLWR@tabletotalcols}{\LWR@strresult}% +\LWR@setexparray{LWR@colatspec}{\theLWR@tabletotalcols}{\LWR@colparameter}% \LWR@traceinfo{at \theLWR@tabletotalcols: % - \LWR@getexparray{LWR@colatspec}{\theLWR@tabletotalcols})!}% -\let\LWR@strresult\relax% -\booltrue{LWR@validtablecol}% + \LWR@getexparray{LWR@colatspec}{\theLWR@tabletotalcols}}% }% +\let\LWR@colparameter\relax% +\booltrue{LWR@validtablecol}% } % \end{macrocode} % \end{macro} % % % \begin{macro}{\LWR@parsebangcolumn} +% Handles |!{text}| columns. % % \changes{v0.22}{2017/02/28}{Added tabular \texttt{!!} column.} % @@ -13259,7 +13429,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \begin{macrocode} \LWR@traceinfo{about to read the next token:}% \expandarg% -\StrChar{\LWR@origcolspec}{\theLWR@tablecolspos}[\LWR@strresult] +\StrChar{\LWR@origcolspec}{\theLWR@tablecolspos}[\LWR@colparameter] \fullexpandarg% % \end{macrocode} % Store the result into a data array, expanding once out of \cs{LWR@strresult}: @@ -13268,14 +13438,14 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \ifthenelse{\cnttest{\value{LWR@tabletotalcols}}=0} {% left edge of the table: \LWR@traceinfo{at the left edge}% -\LWR@setexparray{LWR@colbangspec}{leftedge}{\LWR@strresult}% +\LWR@setexparray{LWR@colbangspec}{leftedge}{\LWR@colparameter}% }% {% not at the left edge: \LWR@traceinfo{not at the left edge}% -\LWR@setexparray{LWR@colbangspec}{\theLWR@tabletotalcols}{\LWR@strresult}% -\LWR@traceinfo{bang \theLWR@tabletotalcols: \LWR@colbangspec(\theLWR@tabletotalcols)!}% +\LWR@setexparray{LWR@colbangspec}{\theLWR@tabletotalcols}{\LWR@colparameter}% +\LWR@traceinfo{bang \theLWR@tabletotalcols: \LWR@colparameter!}% }% -\let\LWR@strresult\relax% +\let\LWR@colparameter\relax% \booltrue{LWR@validtablecol}% } % \end{macrocode} @@ -13297,13 +13467,13 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % Read the next token, expanding once into \cs{LWR@strresult}: % \begin{macrocode} \expandarg% -\StrChar{\LWR@origcolspec}{\theLWR@tablecolspos}[\LWR@strresult]% +\StrChar{\LWR@origcolspec}{\theLWR@tablecolspos}[\LWR@colparameter]% \fullexpandarg% % \end{macrocode} % Store the result into a data array, expanding once out of \cs{LWR@strresult}: % \begin{macrocode} -\LWR@setexparray{LWR@colbeforespec}{\theLWR@tabletotalcolsnext}{\LWR@strresult}% -\let\LWR@strresult\relax% +\LWR@setexparray{LWR@colbeforespec}{\theLWR@tabletotalcolsnext}{\LWR@colparameter}% +\let\LWR@colparameter\relax% \booltrue{LWR@validtablecol}% } % \end{macrocode} @@ -13322,15 +13492,15 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \end{macrocode} % Read the next token, expanding once into \cs{LWR@strresult}: % \begin{macrocode} -% \StrChar{#1}{\theLWR@tablecolspos}[\LWR@strresult] +% \StrChar{#1}{\theLWR@tablecolspos}[\LWR@colparameter] \expandarg% -\StrChar{\LWR@origcolspec}{\theLWR@tablecolspos}[\LWR@strresult]% +\StrChar{\LWR@origcolspec}{\theLWR@tablecolspos}[\LWR@colparameter]% \fullexpandarg% % \end{macrocode} % Store the result into a data array, expanding once out of \cs{LWR@strresult}: % \begin{macrocode} -\LWR@setexparray{LWR@colafterspec}{\theLWR@tabletotalcols}{\LWR@strresult}% -\let\LWR@strresult\relax% +\LWR@setexparray{LWR@colafterspec}{\theLWR@tabletotalcols}{\LWR@colparameter}% +\let\LWR@colparameter\relax% \booltrue{LWR@validtablecol}% } % \end{macrocode} @@ -13359,10 +13529,11 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \appto\LWR@tablecolspec{#1}% \addtocounter{LWR@tabletotalcols}{1}% \addtocounter{LWR@tabletotalcolsnext}{1}% -\LWR@setexparray{LWR@colatspec}{\theLWR@tabletotalcolsnext}{\relax}% -\LWR@setexparray{LWR@colbangspec}{\theLWR@tabletotalcolsnext}{\relax}% -\LWR@setexparray{LWR@colbeforespec}{\theLWR@tabletotalcolsnext}{\relax}% -\LWR@setexparray{LWR@colafterspec}{\theLWR@tabletotalcolsnext}{\relax}% +\LWR@traceinfo{normal column \theLWR@tabletotalcols: #1}% +\LWR@setexparray{LWR@colatspec}{\theLWR@tabletotalcolsnext}{}% +\LWR@setexparray{LWR@colbangspec}{\theLWR@tabletotalcolsnext}{}% +\LWR@setexparray{LWR@colbeforespec}{\theLWR@tabletotalcolsnext}{}% +\LWR@setexparray{LWR@colafterspec}{\theLWR@tabletotalcolsnext}{}% \booltrue{LWR@validtablecol}% } % \end{macrocode} @@ -13376,11 +13547,11 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \begin{macrocode} \newcommand*{\LWR@parsepcolumn}[1]{% % \end{macrocode} -% Converts to the given column type. +% Converts to the given column type: % \begin{macrocode} \LWR@parsenormalcolumn{#1}% % \end{macrocode} -% skips the following width +% Skips the following width token: % \begin{macrocode} \addtocounter{LWR@tablecolspos}{1}% } @@ -13519,20 +13690,20 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \begin{macrocode} \setcounter{LWR@tabletotalcols}{0}% \setcounter{LWR@tabletotalcolsnext}{1}% -\LWR@setexparray{LWR@colatspec}{leftedge}{\relax}% -\LWR@setexparray{LWR@colatspec}{1}{\relax}% -\LWR@setexparray{LWR@colatspec}{2}{\relax}% -\LWR@setexparray{LWR@colatspec}{3}{\relax}% -\LWR@setexparray{LWR@colbangspec}{leftedge}{\relax}% -\LWR@setexparray{LWR@colbangspec}{1}{\relax}% -\LWR@setexparray{LWR@colbangspec}{2}{\relax}% -\LWR@setexparray{LWR@colbangspec}{3}{\relax}% -\LWR@setexparray{LWR@colbeforespec}{1}{\relax}% -\LWR@setexparray{LWR@colbeforespec}{2}{\relax}% -\LWR@setexparray{LWR@colbeforespec}{3}{\relax}% -\LWR@setexparray{LWR@colafterspec}{1}{\relax}% -\LWR@setexparray{LWR@colafterspec}{2}{\relax}% -\LWR@setexparray{LWR@colafterspec}{3}{\relax}% +\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}{}% % \end{macrocode} % Starting at the first column specification: % \begin{macrocode} @@ -13556,6 +13727,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \begin{macrocode} \noexpandarg% \StrChar{#1}{\theLWR@tablecolspos}[\LWR@strresult]% +\LWR@traceinfo{position \arabic{LWR@tablecolspos}: \LWR@strresult}% \fullexpandarg% % \end{macrocode} % Not yet found a valid column type @@ -13601,9 +13773,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \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 a |p| column: +% 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}% }% \addtocounter{LWR@tablecolspos}{1}% @@ -13647,21 +13820,58 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \end{macro} +% \subsection{Printing at or bang tags} + +% \begin{macro}{\LWR@printatbang} \marg{at -or- bang} \marg{index} +% \begin{macrocode} +\newcommand*{\LWR@printatbang}[2]{% +\edef\LWR@atbangspec{\LWR@getexparray{LWR@col#1spec}{#2}} +\LWR@traceinfo{atbang: !\LWR@atbangspec!} +\ifdefempty{\LWR@atbangspec}% +% \ifthenelse{\isempty{\LWR@atbangspec}}% +{}% +{% +\LWR@htmltag{td class="td#1% +\ifthenelse{\equal{\LWR@getexparray{LWR@midrules}{\theLWR@tablecolspos}}{Y}}{rule}{}% +"}% +\LWR@atbangspec% +\LWR@htmltag{/td}\LWR@orignewline% +}% +}% +% \end{macrocode} +% \end{macro} + % \subsection{Data opening tag} % \begin{macro}{\LWR@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@tabledatasinglecolumntag}% {% \LWR@maybenewtablerow% % \end{macrocode} +% Don't start a new paragraph tag if have already started one: +% \begin{macrocode} +\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 % \end{macrocode} +% Print the |@| and |!| contents before first column: +% \begin{macrocode} +\ifthenelse{\cnttest{\value{LWR@tablecolspos}}=1}% +{% +\LWR@printatbang{at}{leftedge}% +\LWR@printatbang{bang}{leftedge}% +}% left edge +{}% not left edge +% \end{macrocode} % Fetch the current column's alignment character into |\LWR@strresult|: % \begin{macrocode} \StrChar{\LWR@tablecolspec}{\theLWR@tablecolspos}[\LWR@strresult]% @@ -13696,18 +13906,12 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% }% 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@tablecolspos}}=1}% -{% -\LWR@getexparray{LWR@colatspec}{leftedge}% -\LWR@getexparray{LWR@colbangspec}{leftedge}% -}% left edge -{}% not left edge \LWR@getexparray{LWR@colbeforespec}{\theLWR@tablecolspos}% \global\boolfalse{LWR@intabularmetadata}% }% not exiting tabular +}{}% in tabular metadata }% % \end{macrocode} % \end{macro} @@ -13738,7 +13942,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \cnttest{\value{LWR@midrulecounter}}{<=}{\value{LWR@tablecolswidth}}% }% {% -\LWR@setexparray{LWR@midrules}{\theLWR@midrulecounter}{\relax}% +\LWR@setexparray{LWR@midrules}{\theLWR@midrulecounter}{}% \addtocounter{LWR@midrulecounter}{1}% }% } @@ -13746,7 +13950,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \end{macro} -% \begin{macro}{\LWR@subcmidrule} \oarg{width} \marg{trim} \marg{leftcolumn} \marg{rightcolumn} +% \begin{macro}{\LWR@subcmidrule} \marg{width} \marg{trim} \marg{leftcolumn} \marg{rightcolumn} % % Marks |LWR@midrules| data array elements to be ``Y'' from left to right columns. % \begin{macrocode} @@ -13782,13 +13986,17 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \begin{macrocode} \newcounter{LWR@tablemulticolswidth} +% \end{macrocode} +% +% Indexes into the multicolumn specification: +% \begin{macrocode} \newcounter{LWR@tablemulticolspos} % \end{macrocode} % \begin{macro}{\LWR@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 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \end{macro} % \begin{macro}{\LWR@multicolother} \marg{colspec} -% For |@|, |>|, |<|, print the next token without paragraph tags: +% For |@|, |!|, |>|, |<|, print the next token without paragraph tags: % \begin{macrocode} \newcommand*{\LWR@multicolother}[1]{% \addtocounter{LWR@tablemulticolspos}{1}% @@ -13948,13 +14156,18 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \end{macro} + % \subsubsection{High-level multicolumn interface} -% \begin{macro}{\LWR@domulticolumn} \marg{1: numcols} \marg{2: colspec} \marg{3: text} -% + % \begin{macrocode} \newcommand{\LWR@multicoltext}{} +% \end{macrocode} + +% \begin{macro}{\LWR@domulticolumn} \marg{1: numcols} \marg{2: colspec} \marg{3: text} +% +% \begin{macrocode} \NewDocumentCommand{\LWR@domulticolumn}{m m +m}{% \LWR@traceinfo{lwr@domulticolumn -#1- -#2-}% % \end{macrocode} @@ -14030,12 +14243,16 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% }% optional given {\LWR@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@tabularhtmlcolumns{1}{\theLWR@tabletotalcols} +% \end{macrocode} +% Create the multicolumn tag: % \begin{macrocode} -\LWR@domulticolumn{\theLWR@tabletotalcols}{P}{% \LWR@domulticolumn -% \IfBooleanTF{#1}% star? -% {\IfValueTF{#2}{\LWR@origcaption*[#2]{#3}}{\LWR@origcaption*{#3}}} -% {\IfValueTF{#2}{\LWR@origcaption[#2]{#3}}{\LWR@origcaption{#3}}} +\LWR@domulticolumn{\theLWR@tabhtmlcoltotal}{P}{% \LWR@domulticolumn \IfBooleanTF{#1}% star? % \end{macrocode} % Star version, show a caption but do not make a LOT entry: @@ -14108,6 +14325,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% }% 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@skipatbang}% }% end of \LWR@domulticolumn \addtocounter{LWR@tablecolspos}{\theLWR@tabletotalcols} @@ -14119,6 +14340,79 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% +% \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@tabhtmlcolindex} +\newcounter{LWR@tabhtmlcolend} +\newcounter{LWR@tabhtmlcoltotal} +% \end{macrocode} + +% \begin{macro}{\LWR@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@tabhtmlcoltotal|. +% \begin{macrocode} +\newcommand*{\LWR@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@tabhtmlcolindex}{#1}% +\setcounter{LWR@tabhtmlcoltotal}{#2}% +\setcounter{LWR@tabhtmlcolend}{#1}% +\addtocounter{LWR@tabhtmlcolend}{#2}% +% \end{macrocode} +% Walk across the \LaTeX\ columns looking for |@| and |!| columns: +% \begin{macrocode} +\whiledo{\value{LWR@tabhtmlcolindex}<\value{LWR@tabhtmlcolend}}{% +% \end{macrocode} +% Temporarily define a macro equal to the |@| specification for this column: +% \begin{macrocode} +\edef\LWR@atbangspec{\LWR@getexparray{LWR@colatspec}{\theLWR@tabhtmlcolindex}}% +% \end{macrocode} +% If the |@| specification is not empty, add to the count: +% \begin{macrocode} +\ifdefempty{\LWR@atbangspec}{}{\addtocounter{LWR@tabhtmlcoltotal}{1}}% +% \end{macrocode} +% Likewise for the |!| columns: +% \begin{macrocode} +\edef\LWR@atbangspec{\LWR@getexparray{LWR@colbangspec}{\theLWR@tabhtmlcolindex}}% +\ifdefempty{\LWR@atbangspec}{}{\addtocounter{LWR@tabhtmlcoltotal}{1}}% +% \end{macrocode} +% Move to the next \LaTeX\ column: +% \begin{macrocode} +\addtocounter{LWR@tabhtmlcolindex}{1}% +}% +% \end{macrocode} +% If at the left-most column, also skip the leftmost |@| and |!| cells: +% \begin{macrocode} +\ifthenelse{\value{LWR@tablecolspos}=1}{% +\edef\LWR@atbangspec{\LWR@getexparray{LWR@colatspec}{leftedge}}% +\ifdefempty{\LWR@atbangspec}{}{\addtocounter{LWR@tabhtmlcoltotal}{1}}% +\edef\LWR@atbangspec{\LWR@getexparray{LWR@colbangspec}{leftedge}}% +\ifdefempty{\LWR@atbangspec}{}{\addtocounter{LWR@tabhtmlcoltotal}{1}}% +}{}% +} +% \end{macrocode} +% \end{macro} + + % \subsubsection{\textbackslash{}tabledatamulticolumntag} @@ -14126,9 +14420,23 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \begin{macrocode} \NewDocumentCommand{\LWR@tabledatamulticolumntag}{m m +m}% {% -\LWR@domulticolumn{#1}{#2}{#3}% +% \end{macrocode} +% Figure out how many extra \HTML\ columns to add for |@| and |!| columns: +% \begin{macrocode} +\LWR@tabularhtmlcolumns{\theLWR@tablecolspos}{#1} +% \end{macrocode} +% Create the multicolumn tag: +% \begin{macrocode} +\LWR@domulticolumn{\theLWR@tabhtmlcoltotal}{#2}{#3}% +% \end{macrocode} +% Move to the next \LaTeX\ column: +% \begin{macrocode} \addtocounter{LWR@tablecolspos}{#1}% \addtocounter{LWR@tablecolspos}{-1}% +% \end{macrocode} +% Skip any trailing |@| or |!| columns for this cell: +% \begin{macrocode} +\booltrue{LWR@skipatbang}% } % \end{macrocode} % \end{macro} @@ -14223,8 +14531,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% {\let\mynext\LWR@donothing}{}% % \ifthenelse{\isequivalentto{\LWR@mynexttoken}{\toprule}}% -{% -\let\mynext\LWR@donothing}{}% +{\let\mynext\LWR@donothing}{}% % \ifthenelse{\isequivalentto{\LWR@mynexttoken}{\midrule}}% {\let\mynext\LWR@donothing}{}% @@ -14290,10 +14597,11 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % The new tabular environment will be |\let| in |\LWR@LwarpStart|, % since \pkg{siunitx} might redefine tabular in the user's document. % \begin{macrocode} +\StartDefiningTabulars + \newenvironment*{LWR@tabular}[2][] {% -\LWR@traceinfo{tabular started}% -\begingroup% +\LWR@traceinfo{LWR@tabular started}% \addtocounter{LWR@tabulardepth}{1}% % \end{macrocode} % Not yet started a table row: @@ -14345,12 +14653,17 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % to see if the next token might create a new data cell: % \begin{macrocode} \renewcommand*{\hline}{\LWR@domidrule\LWR@getmynexttoken}% + \newcommand*{\midrule}{\LWR@domidrule\LWR@getmynexttoken}% + \NewDocumentCommand{\cmidrule}{o d() m}% {\LWR@docmidrule[##1](##2){##3}\LWR@getmynexttoken}% + \RenewDocumentCommand{\cline}{m}% {\LWR@docmidrule{##1}\LWR@getmynexttoken}% + \newcommand*{\toprule}{\LWR@dotbrule\LWR@getmynexttoken}% + \newcommand*{\bottomrule}{\LWR@dotbrule\LWR@getmynexttoken}% % \end{macrocode} % The following create data cells and will have no more data in this cell, @@ -14366,6 +14679,12 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % \begin{macrocode} \global\boolfalse{LWR@tableparcell}% \global\boolfalse{LWR@skippingmrowcell}% +\global\boolfalse{LWR@skipatbang}% +% \end{macrocode} +% Set |&| for its special meaning inside the tabular: +% \begin{macrocode} +\StartDefiningTabulars% +\protected\gdef&{\LWR@tabularampersand}% % \end{macrocode} % Look ahead for a possible table data cell: % \begin{macrocode} @@ -14375,15 +14694,26 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% % Ending the environment: % \begin{macrocode} {% +\LWR@traceinfo{LWR@tabular ending}% \LWR@closetabledatacell% \LWR@htmlblocktag{/tr}% \LWR@htmlblocktag{/table}% \global\boolfalse{LWR@intabularmetadata}% % \end{macrocode} +% +% Unnest one level of tabular: % \begin{macrocode} \addtocounter{LWR@tabulardepth}{-1}% -\endgroup% +% \end{macrocode} +% +% Restore |&| to its usual meaning: +% \begin{macrocode} +\protected\gdef&{\LWR@origampmacro}% +\EndDefiningTabulars% +\LWR@traceinfo{LWR@tabular finished ending}% } + +\EndDefiningTabulars % \end{macrocode} % \end{environment} @@ -15240,7 +15570,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \end{macrocode} % Subcaptions were being over-written by the closing \HTML\ tag: % \begin{macrocode} -\vspace*{\baselineskip}% +\LWR@origvspace*{\baselineskip}% % \end{macrocode} % Closing tag: % \begin{macrocode} @@ -16403,8 +16733,10 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \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 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \begin{environment}{multline} % \begin{macrocode} \BeforeBeginEnvironment{multline}{ + \ifbool{mathjax} { \LWR@syncmathjax @@ -16450,6 +16783,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \begin{environment}{multline*} % \begin{macrocode} \BeforeBeginEnvironment{multline*}{ + \ifbool{mathjax} { \LWR@syncmathjax @@ -16480,6 +16814,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \begin{environment}{gather} % \begin{macrocode} \BeforeBeginEnvironment{gather}{ + \ifbool{mathjax} { \LWR@syncmathjax @@ -16507,6 +16842,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \begin{environment}{gather*} % \begin{macrocode} \BeforeBeginEnvironment{gather*}{ + \ifbool{mathjax} { \LWR@syncmathjax @@ -16535,6 +16871,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \begin{environment}{align} % \begin{macrocode} \BeforeBeginEnvironment{align}{ + \ifbool{mathjax} { \LWR@syncmathjax @@ -16563,6 +16900,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \begin{environment}{align*} % \begin{macrocode} \BeforeBeginEnvironment{align*}{ + \ifbool{mathjax} { \LWR@syncmathjax @@ -16591,6 +16929,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \begin{environment}{flalign} % \begin{macrocode} \BeforeBeginEnvironment{flalign}{ + \ifbool{mathjax} { \LWR@syncmathjax @@ -16619,6 +16958,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% % \begin{environment}{flalign*} % \begin{macrocode} \BeforeBeginEnvironment{flalign*}{ + \ifbool{mathjax} { \LWR@syncmathjax @@ -17660,7 +18000,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline -% \section{Cleverref} +% \section{Cleveref} % \label{sec:cleveref} % \DescribePackage{cleveref} @@ -17688,16 +18028,17 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline % \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 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \LWR@endminipage% The following empty line is required: \LWR@htmldivclassend{minipage}% -\vspace{1\baselineskip}% required for subcaption +\LWR@origvspace{1\baselineskip}% required for subcaption \addtocounter{LWR@minipagedepth}{-1}% \LWR@startpars% % \end{macrocode} @@ -18392,6 +18733,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \let\LWR@origquad\quad \let\LWR@origqquad\qquad \let\LWR@orighspace\hspace +\let\LWR@origvspace\vspace \let\LWR@origrule\rule \let\LWR@origmedskip\medskip % \end{macrocode} @@ -18630,6 +18972,23 @@ span style="width:\printlength{\LWR@tempwidth}; display:inline-block;"% % \end{macro} +% \begin{macro}{\LWR@vspace} * \marg{length} Nullified vspace. +% +% \changes{v0.33}{2017/06/21}{Add: \cs{vspace} nullified.} +% +% \begin{macrocode} +\NewDocumentCommand{\LWR@vspace}{s m}{} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\vspace} * \marg{length} Nullified. +% \begin{macrocode} +\let\vspace\LWR@vspace +% \end{macrocode} +% \end{macro} + + % \begin{macro}{\linebreak} \oarg{num} \qquad % Inserts an \HTML\ |br| tag. % \begin{macrocode} @@ -19228,9 +19587,9 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% \AfterEndPreamble{ \AtBeginEnvironment{alltt}{% \LWR@forcenewpage -\LWR@atbeginverbatim{alltt}\unskip\vspace*{-\baselineskip}% +\LWR@atbeginverbatim{alltt}\unskip\LWR@origvspace*{-\baselineskip}% } -\AfterEndEnvironment{alltt}{\unskip\vspace*{-\baselineskip}\LWR@afterendverbatim} +\AfterEndEnvironment{alltt}{\unskip\LWR@origvspace*{-\baselineskip}\LWR@afterendverbatim} } % \end{macrocode} @@ -20014,6 +20373,7 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% % \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 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% \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 @@ span style="width:\rndprintlength{\ALG@thistlm}; display:inline-block;"% \newlength{\LTcapright} \newcommand*{\LTcapmarginsfalse}{} % \end{macrocode} - - +% +% % \iffalse %</ltcaption> % \fi @@ -26266,14 +26626,14 @@ solid }{} \LWR@forcenewpage \LWR@atbeginverbatim{verse} -\unskip\vspace{-\baselineskip} +\unskip\LWR@origvspace{-\baselineskip} } % \end{macrocode} % After the end of the \env{verse} environment, which places the |pre| tag at the % regular left margin: % \begin{macrocode} \AfterEndEnvironment{verse}{ -\unskip\vspace{-\baselineskip} +\unskip\LWR@origvspace{-\baselineskip} \LWR@afterendverbatim } % \end{macrocode} diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-alltt.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-alltt.sty index 6dea9a9a53c..a0cd928d430 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-alltt.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-alltt.sty @@ -21,9 +21,9 @@ \AfterEndPreamble{ \AtBeginEnvironment{alltt}{% \LWR@forcenewpage -\LWR@atbeginverbatim{alltt}\unskip\vspace*{-\baselineskip}% +\LWR@atbeginverbatim{alltt}\unskip\LWR@origvspace*{-\baselineskip}% } -\AfterEndEnvironment{alltt}{\unskip\vspace*{-\baselineskip}\LWR@afterendverbatim} +\AfterEndEnvironment{alltt}{\unskip\LWR@origvspace*{-\baselineskip}\LWR@afterendverbatim} } \endinput diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyhdr.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyhdr.sty index 87ddbe03c4e..48933536a65 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyhdr.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-fancyhdr.sty @@ -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][]{} diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-ltcaption.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-ltcaption.sty index 24d8a2c0f25..01fbf6add9a 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-ltcaption.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-ltcaption.sty @@ -25,7 +25,6 @@ \newlength{\LTcapleft} \newlength{\LTcapright} \newcommand*{\LTcapmarginsfalse}{} - \endinput %% %% End of file `lwarp-ltcaption.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-verse.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-verse.sty index b739f34b90b..e2e20c7ccee 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-verse.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-verse.sty @@ -26,10 +26,10 @@ }{} \LWR@forcenewpage \LWR@atbeginverbatim{verse} -\unskip\vspace{-\baselineskip} +\unskip\LWR@origvspace{-\baselineskip} } \AfterEndEnvironment{verse}{ -\unskip\vspace{-\baselineskip} +\unskip\LWR@origvspace{-\baselineskip} \LWR@afterendverbatim } \ifdef{\poemtitle}{ diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty index bad047aecbf..e50befca6dd 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty @@ -17,7 +17,7 @@ %% version 2005/12/01 or later. \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{lwarp} - [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 @@ after lwarp.} } \newcommand*{\LWR@loadbefore}[1]{% +\@ifpackageloaded{#1} +{} +{ \PackageError{lwarp} {Package #1 must be loaded before lwarp} {Move \detokenize{\usepackage}{#1} before \detokenize{\usepackage}{lwarp}.} } +} \newcommand*{\LWR@loadnever}[2]{% \PackageError{lwarp} @@ -361,7 +365,7 @@ top=1in,bottom=1in,% \RequirePackage{zref} -\PassOptionsToPackage{leqno,fleqn}{amsmath} +\PassOptionsToPackage{leqno}{amsmath} \RequirePackage{amsmath} \RequirePackage{environ} @@ -1304,6 +1308,8 @@ td {padding: 1ex .5em 1ex .5em ;} 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 @@ table td.tdlrule { text-align: left ; border-top: 1px solid silver ; 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 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX- -- 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 @@ end -- not --version \begin{warpHTML} \NewDocumentCommand{\LWR@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@getexparray}[2]{\csuse{#1#2}} @@ -3438,6 +3450,7 @@ end -- not --version \begin{warpall} +\providecommand{\theauthor}{} \newcommand{\theHTMLAuthor}{\theauthor} \newcommand{\HTMLAuthor}[1]{\renewcommand{\theHTMLAuthor}{#1}} @@ -3831,6 +3844,7 @@ end -- not --version \LWR@traceinfo{chapter #3}% \LWR@epubprintpendingfootnotes% \LWR@stoppars% + \LWR@startnewdepth{\LWR@depthchapter}{\LWR@printclosechapter}% \LWR@traceinfo{chapter: about to LWR@section}% @@ -4020,7 +4034,6 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \thanksmarkseries{fnsymbol} \fi \fvset{frame=none}% -\catcode`\&=\active \LWR@startpars } @@ -4486,9 +4499,9 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \AfterEndPreamble{ \AtBeginEnvironment{verbatim}{% \LWR@forcenewpage -\LWR@atbeginverbatim{verbatim}\unskip\vspace*{-\baselineskip}% +\LWR@atbeginverbatim{verbatim}\unskip\LWR@origvspace*{-\baselineskip}% } -\AfterEndEnvironment{verbatim}{\unskip\vspace*{-\baselineskip}\LWR@afterendverbatim} +\AfterEndEnvironment{verbatim}{\unskip\LWR@origvspace*{-\baselineskip}\LWR@afterendverbatim} } \end{warpHTML} @@ -4669,7 +4682,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \AfterEndEnvironment{BVerbatim} { -\leavevmode\par\vspace{-\baselineskip} +\leavevmode\par\LWR@origvspace{-\baselineskip} \LWR@afterendverbatim } @@ -4832,6 +4845,8 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \newbool{LWR@skippingmrowcell} +\newbool{LWR@skipatbang} + \newbool{LWR@intabularmetadata} \boolfalse{LWR@intabularmetadata} @@ -4844,11 +4859,15 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% {% not skippingmrowcell \unskip% \LWR@getexparray{LWR@colafterspec}{\theLWR@tablecolspos}% -\LWR@getexparray{LWR@colatspec}{\theLWR@tablecolspos}% -\LWR@getexparray{LWR@colbangspec}{\theLWR@tablecolspos}% \ifbool{LWR@tableparcell}{\LWR@stoppars}{}% \global\boolfalse{LWR@tableparcell}% -\unskip\LWR@htmltag{/td}\LWR@orignewline% +\leavevmode\unskip\LWR@htmltag{/td}\LWR@orignewline% +\ifbool{LWR@skipatbang}% +{\boolfalse{LWR@skipatbang}}% +{% +\LWR@printatbang{at}{\theLWR@tablecolspos}% +\LWR@printatbang{bang}{\theLWR@tablecolspos}% +}% not skipping at or bang }% not skipping mrowcell }% not exiting tabular \global\boolfalse{LWR@skippingmrowcell}% @@ -4857,11 +4876,22 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \newcounter{LWR@tabulardepth} \setcounter{LWR@tabulardepth}{0} -\def\LWR@origampmacro{&} -\begingroup -\catcode`\&=\active +\let\LWR@origampmacro& + +\end{warpHTML} +\begin{warpall} +\newcommand{\StartDefiningTabulars}{% +\warpHTMLonly{\catcode`\&=\active}% +} +\newcommand{\EndDefiningTabulars}{% +\warpHTMLonly{\catcode`\&=4}% +} + +\end{warpall} +\begin{warpHTML} -\gdef&{% +\newcommand*{\LWR@tabularampersand}{% +\LWR@traceinfo{LWR@tabularampersand}% \ifthenelse{\cnttest{\value{LWR@tabulardepth}}{>}{0}}% {% \unskip% @@ -4871,7 +4901,6 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% }% {\LWR@origampmacro}% } -\endgroup \NewDocumentCommand{\LWR@tabularendofline}{s o} @@ -4909,65 +4938,68 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \newcounter{LWR@tabletotalcolsnext} +\newcommand*{\LWR@colparameter}{} \newcommand*{\LWR@parseatcolumn}{% \LWR@traceinfo{at column}% \addtocounter{LWR@tablecolspos}{1}% \LWR@traceinfo{about to read the next token:}% \expandarg% -\StrChar{\LWR@origcolspec}{\theLWR@tablecolspos}[\LWR@strresult] +\StrChar{\LWR@origcolspec}{\theLWR@tablecolspos}[\LWR@colparameter] \fullexpandarg% \LWR@traceinfo{have now read the next token}% \ifthenelse{\cnttest{\value{LWR@tabletotalcols}}=0} {% left edge of the table: \LWR@traceinfo{at the left edge}% -\LWR@setexparray{LWR@colatspec}{leftedge}{\LWR@strresult}% +\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}{\theLWR@tabletotalcols}{\LWR@strresult}% +\LWR@setexparray{LWR@colatspec}{\theLWR@tabletotalcols}{\LWR@colparameter}% \LWR@traceinfo{at \theLWR@tabletotalcols: % - \LWR@getexparray{LWR@colatspec}{\theLWR@tabletotalcols})!}% -\let\LWR@strresult\relax% -\booltrue{LWR@validtablecol}% + \LWR@getexparray{LWR@colatspec}{\theLWR@tabletotalcols}}% }% +\let\LWR@colparameter\relax% +\booltrue{LWR@validtablecol}% } \newcommand*{\LWR@parsebangcolumn}{% \LWR@traceinfo{bang column}% \addtocounter{LWR@tablecolspos}{1}% \LWR@traceinfo{about to read the next token:}% \expandarg% -\StrChar{\LWR@origcolspec}{\theLWR@tablecolspos}[\LWR@strresult] +\StrChar{\LWR@origcolspec}{\theLWR@tablecolspos}[\LWR@colparameter] \fullexpandarg% \LWR@traceinfo{have now read the next token}% \ifthenelse{\cnttest{\value{LWR@tabletotalcols}}=0} {% left edge of the table: \LWR@traceinfo{at the left edge}% -\LWR@setexparray{LWR@colbangspec}{leftedge}{\LWR@strresult}% +\LWR@setexparray{LWR@colbangspec}{leftedge}{\LWR@colparameter}% }% {% not at the left edge: \LWR@traceinfo{not at the left edge}% -\LWR@setexparray{LWR@colbangspec}{\theLWR@tabletotalcols}{\LWR@strresult}% -\LWR@traceinfo{bang \theLWR@tabletotalcols: \LWR@colbangspec(\theLWR@tabletotalcols)!}% +\LWR@setexparray{LWR@colbangspec}{\theLWR@tabletotalcols}{\LWR@colparameter}% +\LWR@traceinfo{bang \theLWR@tabletotalcols: \LWR@colparameter!}% }% -\let\LWR@strresult\relax% +\let\LWR@colparameter\relax% \booltrue{LWR@validtablecol}% } \newcommand*{\LWR@parsebeforecolumn}{% \addtocounter{LWR@tablecolspos}{1}% \expandarg% -\StrChar{\LWR@origcolspec}{\theLWR@tablecolspos}[\LWR@strresult]% +\StrChar{\LWR@origcolspec}{\theLWR@tablecolspos}[\LWR@colparameter]% \fullexpandarg% -\LWR@setexparray{LWR@colbeforespec}{\theLWR@tabletotalcolsnext}{\LWR@strresult}% -\let\LWR@strresult\relax% +\LWR@setexparray{LWR@colbeforespec}{\theLWR@tabletotalcolsnext}{\LWR@colparameter}% +\let\LWR@colparameter\relax% \booltrue{LWR@validtablecol}% } \newcommand*{\LWR@parseaftercolumn}{% \addtocounter{LWR@tablecolspos}{1}% \expandarg% -\StrChar{\LWR@origcolspec}{\theLWR@tablecolspos}[\LWR@strresult]% +\StrChar{\LWR@origcolspec}{\theLWR@tablecolspos}[\LWR@colparameter]% \fullexpandarg% -\LWR@setexparray{LWR@colafterspec}{\theLWR@tabletotalcols}{\LWR@strresult}% -\let\LWR@strresult\relax% +\LWR@setexparray{LWR@colafterspec}{\theLWR@tabletotalcols}{\LWR@colparameter}% +\let\LWR@colparameter\relax% \booltrue{LWR@validtablecol}% } \newcommand*{\LWR@parseskipcolumn}{% @@ -4977,10 +5009,11 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \appto\LWR@tablecolspec{#1}% \addtocounter{LWR@tabletotalcols}{1}% \addtocounter{LWR@tabletotalcolsnext}{1}% -\LWR@setexparray{LWR@colatspec}{\theLWR@tabletotalcolsnext}{\relax}% -\LWR@setexparray{LWR@colbangspec}{\theLWR@tabletotalcolsnext}{\relax}% -\LWR@setexparray{LWR@colbeforespec}{\theLWR@tabletotalcolsnext}{\relax}% -\LWR@setexparray{LWR@colafterspec}{\theLWR@tabletotalcolsnext}{\relax}% +\LWR@traceinfo{normal column \theLWR@tabletotalcols: #1}% +\LWR@setexparray{LWR@colatspec}{\theLWR@tabletotalcolsnext}{}% +\LWR@setexparray{LWR@colbangspec}{\theLWR@tabletotalcolsnext}{}% +\LWR@setexparray{LWR@colbeforespec}{\theLWR@tabletotalcolsnext}{}% +\LWR@setexparray{LWR@colafterspec}{\theLWR@tabletotalcolsnext}{}% \booltrue{LWR@validtablecol}% } @@ -5002,20 +5035,20 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \renewcommand*{\LWR@tablecolspec}{}% \setcounter{LWR@tabletotalcols}{0}% \setcounter{LWR@tabletotalcolsnext}{1}% -\LWR@setexparray{LWR@colatspec}{leftedge}{\relax}% -\LWR@setexparray{LWR@colatspec}{1}{\relax}% -\LWR@setexparray{LWR@colatspec}{2}{\relax}% -\LWR@setexparray{LWR@colatspec}{3}{\relax}% -\LWR@setexparray{LWR@colbangspec}{leftedge}{\relax}% -\LWR@setexparray{LWR@colbangspec}{1}{\relax}% -\LWR@setexparray{LWR@colbangspec}{2}{\relax}% -\LWR@setexparray{LWR@colbangspec}{3}{\relax}% -\LWR@setexparray{LWR@colbeforespec}{1}{\relax}% -\LWR@setexparray{LWR@colbeforespec}{2}{\relax}% -\LWR@setexparray{LWR@colbeforespec}{3}{\relax}% -\LWR@setexparray{LWR@colafterspec}{1}{\relax}% -\LWR@setexparray{LWR@colafterspec}{2}{\relax}% -\LWR@setexparray{LWR@colafterspec}{3}{\relax}% +\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}{}% \setcounter{LWR@tablecolspos}{1}% \LWR@traceinfo{about to StrLen}% \noexpandarg% @@ -5026,6 +5059,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \whiledo{\not\value{LWR@tablecolspos}>\value{LWR@tablecolswidth}}{% \noexpandarg% \StrChar{#1}{\theLWR@tablecolspos}[\LWR@strresult]% +\LWR@traceinfo{position \arabic{LWR@tablecolspos}: \LWR@strresult}% \fullexpandarg% \boolfalse{LWR@validtablecol}% \IfStrEq{\LWR@strresult}{l}{\LWR@parsenormalcolumn{l}}{}% @@ -5050,6 +5084,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \IfStrEq{\LWR@strresult}{M}{\LWR@parsepcolumn{M}}{}% \IfStrEq{\LWR@strresult}{B}{\LWR@parsepcolumn{B}}{}% \ifbool{LWR@validtablecol}{}{% +\LWR@traceinfo{invalid column type: \LWR@strresult}% \LWR@parsenormalcolumn{l}% }% \addtocounter{LWR@tablecolspos}{1}% @@ -5075,11 +5110,33 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% } +\newcommand*{\LWR@printatbang}[2]{% +\edef\LWR@atbangspec{\LWR@getexparray{LWR@col#1spec}{#2}} +\LWR@traceinfo{atbang: !\LWR@atbangspec!} +\ifdefempty{\LWR@atbangspec}% +{}% +{% +\LWR@htmltag{td class="td#1% +\ifthenelse{\equal{\LWR@getexparray{LWR@midrules}{\theLWR@tablecolspos}}{Y}}{rule}{}% +"}% +\LWR@atbangspec% +\LWR@htmltag{/td}\LWR@orignewline% +}% +}% + + \newcommand*{\LWR@tabledatasinglecolumntag}% {% \LWR@maybenewtablerow% +\ifbool{LWR@intabularmetadata}{% \ifbool{LWR@exitingtabular}{}% {% not exiting tabular +\ifthenelse{\cnttest{\value{LWR@tablecolspos}}=1}% +{% +\LWR@printatbang{at}{leftedge}% +\LWR@printatbang{bang}{leftedge}% +}% left edge +{}% not left edge \StrChar{\LWR@tablecolspec}{\theLWR@tablecolspos}[\LWR@strresult]% \LWR@htmltag{td class="td% \LWR@strresult% @@ -5099,15 +5156,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \global\booltrue{LWR@tableparcell}% }% allow pars {}% no pars -\ifthenelse{\cnttest{\value{LWR@tablecolspos}}=1}% -{% -\LWR@getexparray{LWR@colatspec}{leftedge}% -\LWR@getexparray{LWR@colbangspec}{leftedge}% -}% left edge -{}% not left edge \LWR@getexparray{LWR@colbeforespec}{\theLWR@tablecolspos}% \global\boolfalse{LWR@intabularmetadata}% }% not exiting tabular +}{}% in tabular metadata }% @@ -5120,7 +5172,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \cnttest{\value{LWR@midrulecounter}}{<=}{\value{LWR@tablecolswidth}}% }% {% -\LWR@setexparray{LWR@midrules}{\theLWR@midrulecounter}{\relax}% +\LWR@setexparray{LWR@midrules}{\theLWR@midrulecounter}{}% \addtocounter{LWR@midrulecounter}{1}% }% } @@ -5249,7 +5301,8 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% {\LWR@setlatestname{#2}}% given and non-empty }% optional given {\LWR@setlatestname{#3}}% no optional -\LWR@domulticolumn{\theLWR@tabletotalcols}{P}{% \LWR@domulticolumn +\LWR@tabularhtmlcolumns{1}{\theLWR@tabletotalcols} +\LWR@domulticolumn{\theLWR@tabhtmlcoltotal}{P}{% \LWR@domulticolumn \IfBooleanTF{#1}% star? {% yes star \LWR@htmlblocktag{figcaption}% @@ -5296,6 +5349,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% }% end of yes TOC entry }% end of TOC entry not empty }% end of no star +\booltrue{LWR@skipatbang}% }% end of \LWR@domulticolumn \addtocounter{LWR@tablecolspos}{\theLWR@tabletotalcols} @@ -5304,11 +5358,39 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% } + +\newcounter{LWR@tabhtmlcolindex} +\newcounter{LWR@tabhtmlcolend} +\newcounter{LWR@tabhtmlcoltotal} + +\newcommand*{\LWR@tabularhtmlcolumns}[2]{% +\setcounter{LWR@tabhtmlcolindex}{#1}% +\setcounter{LWR@tabhtmlcoltotal}{#2}% +\setcounter{LWR@tabhtmlcolend}{#1}% +\addtocounter{LWR@tabhtmlcolend}{#2}% +\whiledo{\value{LWR@tabhtmlcolindex}<\value{LWR@tabhtmlcolend}}{% +\edef\LWR@atbangspec{\LWR@getexparray{LWR@colatspec}{\theLWR@tabhtmlcolindex}}% +\ifdefempty{\LWR@atbangspec}{}{\addtocounter{LWR@tabhtmlcoltotal}{1}}% +\edef\LWR@atbangspec{\LWR@getexparray{LWR@colbangspec}{\theLWR@tabhtmlcolindex}}% +\ifdefempty{\LWR@atbangspec}{}{\addtocounter{LWR@tabhtmlcoltotal}{1}}% +\addtocounter{LWR@tabhtmlcolindex}{1}% +}% +\ifthenelse{\value{LWR@tablecolspos}=1}{% +\edef\LWR@atbangspec{\LWR@getexparray{LWR@colatspec}{leftedge}}% +\ifdefempty{\LWR@atbangspec}{}{\addtocounter{LWR@tabhtmlcoltotal}{1}}% +\edef\LWR@atbangspec{\LWR@getexparray{LWR@colbangspec}{leftedge}}% +\ifdefempty{\LWR@atbangspec}{}{\addtocounter{LWR@tabhtmlcoltotal}{1}}% +}{}% +} + + \NewDocumentCommand{\LWR@tabledatamulticolumntag}{m m +m}% {% -\LWR@domulticolumn{#1}{#2}{#3}% +\LWR@tabularhtmlcolumns{\theLWR@tablecolspos}{#1} +\LWR@domulticolumn{\theLWR@tabhtmlcoltotal}{#2}{#3}% \addtocounter{LWR@tablecolspos}{#1}% \addtocounter{LWR@tablecolspos}{-1}% +\booltrue{LWR@skipatbang}% } @@ -5347,8 +5429,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \ifthenelse{\isequivalentto{\LWR@mynexttoken}{\hline}}% {\let\mynext\LWR@donothing}{}% \ifthenelse{\isequivalentto{\LWR@mynexttoken}{\toprule}}% -{% -\let\mynext\LWR@donothing}{}% +{\let\mynext\LWR@donothing}{}% \ifthenelse{\isequivalentto{\LWR@mynexttoken}{\midrule}}% {\let\mynext\LWR@donothing}{}% \ifthenelse{\isequivalentto{\LWR@mynexttoken}{\cmidrule}}% @@ -5375,10 +5456,11 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \begin{warpHTML} +\StartDefiningTabulars + \newenvironment*{LWR@tabular}[2][] {% -\LWR@traceinfo{tabular started}% -\begingroup% +\LWR@traceinfo{LWR@tabular started}% \addtocounter{LWR@tabulardepth}{1}% \global\boolfalse{LWR@startedrow}% \global\boolfalse{LWR@doinghline}% @@ -5393,12 +5475,17 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \LWR@clearmidrules% \let\\\LWR@tabularendofline% \renewcommand*{\hline}{\LWR@domidrule\LWR@getmynexttoken}% + \newcommand*{\midrule}{\LWR@domidrule\LWR@getmynexttoken}% + \NewDocumentCommand{\cmidrule}{o d() m}% {\LWR@docmidrule[##1](##2){##3}\LWR@getmynexttoken}% + \RenewDocumentCommand{\cline}{m}% {\LWR@docmidrule{##1}\LWR@getmynexttoken}% + \newcommand*{\toprule}{\LWR@dotbrule\LWR@getmynexttoken}% + \newcommand*{\bottomrule}{\LWR@dotbrule\LWR@getmynexttoken}% \let\multicolumn\LWR@tabledatamulticolumntag% \let\multirow\LWR@tabledatamultirowtag% @@ -5406,17 +5493,25 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}% \let\caption\LWR@longtabledatacaptiontag% \global\boolfalse{LWR@tableparcell}% \global\boolfalse{LWR@skippingmrowcell}% +\global\boolfalse{LWR@skipatbang}% +\StartDefiningTabulars% +\protected\gdef&{\LWR@tabularampersand}% \LWR@getmynexttoken% }% {% +\LWR@traceinfo{LWR@tabular ending}% \LWR@closetabledatacell% \LWR@htmlblocktag{/tr}% \LWR@htmlblocktag{/table}% \global\boolfalse{LWR@intabularmetadata}% \addtocounter{LWR@tabulardepth}{-1}% -\endgroup% +\protected\gdef&{\LWR@origampmacro}% +\EndDefiningTabulars% +\LWR@traceinfo{LWR@tabular finished ending}% } +\EndDefiningTabulars + \end{warpHTML} @@ -5706,7 +5801,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \newcommand{\LWR@caption@end} {% \LWR@origcaption@end% -\vspace*{\baselineskip}% +\LWR@origvspace*{\baselineskip}% \LWR@htmlblocktag{/figcaption}% \endgroup% \LWR@traceinfo{LWR@caption@end: done}% @@ -6178,8 +6273,8 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% } - \BeforeBeginEnvironment{multline}{ + \ifbool{mathjax} { \LWR@syncmathjax @@ -6204,6 +6299,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% } \BeforeBeginEnvironment{multline*}{ + \ifbool{mathjax} { \LWR@syncmathjax @@ -6229,6 +6325,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% \BeforeBeginEnvironment{gather}{ + \ifbool{mathjax} { \LWR@syncmathjax @@ -6252,6 +6349,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% } \BeforeBeginEnvironment{gather*}{ + \ifbool{mathjax} { \LWR@syncmathjax @@ -6275,6 +6373,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% } \BeforeBeginEnvironment{align}{ + \ifbool{mathjax} { \LWR@syncmathjax @@ -6298,6 +6397,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% } \BeforeBeginEnvironment{align*}{ + \ifbool{mathjax} { \LWR@syncmathjax @@ -6321,6 +6421,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% } \BeforeBeginEnvironment{flalign}{ + \ifbool{mathjax} { \LWR@syncmathjax @@ -6344,6 +6445,7 @@ class="#3"\LWR@orignewline}#2\LWR@htmltag{/a}% } \BeforeBeginEnvironment{flalign*}{ + \ifbool{mathjax} { \LWR@syncmathjax @@ -6831,8 +6933,9 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \begin{warpHTML} - - +\AtEndPreamble{ +\RequirePackage{cleveref} +} \AfterEndPreamble{ @@ -6979,7 +7082,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \LWR@endminipage% The following empty line is required: \LWR@htmldivclassend{minipage}% -\vspace{1\baselineskip}% required for subcaption +\LWR@origvspace{1\baselineskip}% required for subcaption \addtocounter{LWR@minipagedepth}{-1}% \LWR@startpars% \global\booltrue{LWR@minipagethispar}% @@ -7081,6 +7184,7 @@ img src="\thisgraphicspath\LWR@strresult\LWR@imageextension" \LWR@orignewline \let\LWR@origquad\quad \let\LWR@origqquad\qquad \let\LWR@orighspace\hspace +\let\LWR@origvspace\vspace \let\LWR@origrule\rule \let\LWR@origmedskip\medskip @@ -7180,6 +7284,9 @@ span style="width:\printlength{\LWR@tempwidth}; display:inline-block;"% } \let\hspace\LWR@hspace +\NewDocumentCommand{\LWR@vspace}{s m}{} +\let\vspace\LWR@vspace + \renewcommand*{\linebreak}[1][]{\newline} \renewcommand*{\nolinebreak}[1][]{} |