diff options
author | Karl Berry <karl@freefriends.org> | 2021-08-28 20:38:00 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-08-28 20:38:00 +0000 |
commit | 09b8b2978a8611b9b0b5c22555499d941fccb5b1 (patch) | |
tree | 4564d3163963858e57fb5855d932174b332d15e9 | |
parent | 36898810305246554a1e0e8a046879cb7c9e6db3 (diff) |
lwarp (28aug21)
git-svn-id: svn://tug.org/texlive/trunk@60345 c570f23f-e606-0410-a88d-b1316a301751
26 files changed, 1487 insertions, 1015 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua b/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua index 6206329a3ba..0b276a93010 100755 --- a/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua +++ b/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua @@ -2,7 +2,7 @@ -- Copyright 2016-2021 Brian Dunn -printversion = "v0.900" +printversion = "v0.901" requiredconfversion = "2" -- also at *lwarpmk.conf function printhelp () diff --git a/Master/texmf-dist/doc/latex/lwarp/README.txt b/Master/texmf-dist/doc/latex/lwarp/README.txt index 84c75558b64..b493fb76a1e 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.900 README.txt +LaTeX lwarp package v0.901 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 aafbad9edd7..ccdf3d87da7 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 6206329a3ba..0b276a93010 100755 --- a/Master/texmf-dist/scripts/lwarp/lwarpmk.lua +++ b/Master/texmf-dist/scripts/lwarp/lwarpmk.lua @@ -2,7 +2,7 @@ -- Copyright 2016-2021 Brian Dunn -printversion = "v0.900" +printversion = "v0.901" requiredconfversion = "2" -- also at *lwarpmk.conf function printhelp () diff --git a/Master/texmf-dist/source/latex/lwarp/lwarp.dtx b/Master/texmf-dist/source/latex/lwarp/lwarp.dtx index fce36d17710..1f899bfa1f2 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> [2021/07/17 v0.900 Allows LaTeX to directly produce HTML5 output.] +%<package> [2021/08/27 v0.901 Allows LaTeX to directly produce HTML5 output.] % %<*driver> \documentclass{ltxdoc} @@ -1602,11 +1602,6 @@ from the \pkg{hyperref} package: \end{sourcedisplay} \item \optn{showonlyrefs} does not work in \brand{MathJax}, and will result in a difference in equation numbering compared to the print version. - \item Due to \brand{MathJax} limitations, the following do not render well: - \cs{overbracket}, \cs{underbracket}, \cs{overbrace}, \cs{underbrace}, - \env{rcases}, \env{drcases}, \cs{Aboxed}, and \linebreak \cs{ArrowBetweenLines}. - \item For the new \env{cases}-like environments, - \cs{text} must be used to set the normal roman font if desired. \item \env{alignat} in \brand{MathJax} requires math mode, but in \LaTeX\ it doesn't. It may be required to use \env{warpHTML} and \env{warpprint} to isolate a version for each mode. @@ -1698,9 +1693,11 @@ It is recommended to use \pkg{cleveref} instead of \pkg{ntheorem}'s \newcommand{\limitsgraphics}{% Per \cref{tab:includegraphicsfilenames}, image filenames may be specified either with or without an extension. -\trouble[case sensitive]{image>not displayed} -\trouble{image>extension case} +\trouble{image>not displayed>extension} +\trouble{image>filename extension} \trouble{filename>image extension} +\trouble{graphics>image not displayed>extension} +\trouble{graphics>\cs{graphicspath}} \gindex{image>file names} \gindex{graphics>file names} \gindex{includegraphics=\cs{includegraphics}>file names} @@ -1708,9 +1705,11 @@ image filenames may be specified either with or without an extension. \gindex{filename>images} If an extension is given it will be used as-is, for either print or \HTML\ output. If no extension is given, a list of possible extensions is tried, which depends +\margintag{file extensions} on whether print or \HTML\ is being generated. This allows a \PDF\ file for print and a \SVG\ file for \HTML, for example. If no extension is given, the automatic search will only return lowercase extensions, +\watchout[case sensitive] even if the filename actually has an uppercase extension, and \pkg{lwarp} cannot get around this problem, so image file extensions must be lowercase to be seen by the \HTML\ browser with \pkg{lwarp}. @@ -1789,6 +1788,18 @@ If a file extension is not used, for \HTML\ the file extension priorities are: \SVG, \GIF, \PNG, then \JPG. +A complication occurs if a file of the same name exists elsewhere in the \TeX\ tree, +\margintag{duplicate files} +\trouble[image not displayed]{graphics>image not displayed>duplicate file} +\trouble{image>not displayed>duplicate file} +\trouble{graphicspath=\cs{graphicspath}} +such as a test image from some \LaTeX\ package. +\TeX\ looks in the local document directory before considering the directories +specified by \cs{graphicspath}, but the \TeX\ tree is found as ``local'', so any +file in the tree is found before the directories in \cs{graphicspath}. +To use such an image, it must be copied to the document's directory to be used for \HTML, +and furthermore must be in the document's base directory instead of an images subdirectory. + If using the older \pkg{graphics} syntax, use both optional arguments \trouble[\pkg{graphics} vs. \pkg{graphicx}]{graphics>optional arguments} \trouble{includegraphics=\cs{includegraphics}>optional arguments} @@ -1796,7 +1807,7 @@ for \cs{includegraphics}. A single optional parameter is interpreted as the newer \pkg{graphicx} syntax. Note that viewports are not supported by \pkg{lwarp} \Dash \trouble[viewport]{graphics>viewport} -\trouble[viewport]{image>viewport} +\trouble{image>viewport} \trouble{viewport} the entire image will be shown. @@ -1857,7 +1868,9 @@ Avoid using the \cs{includegraphics} \optn{scale} option. Change: \newcommand{\limitssvgimages}{% When a math expression, \env{picture}, or \tikz\ environment is added or \trouble[adding/removing]{SVG image>out of order} -\trouble{graphics>images out of order} +\trouble{graphics>incorrect>added or removed} +\trouble{image>incorrect>added or removed} +\trouble{math>incorrect>added or removed} removed, the \SVG\ images must be re-created by entering \cmds{lwarpmk limages} to maintain the proper image-file associations. Inline \SVG\ math may be hashed and thus not need to be recreated, but @@ -1886,9 +1899,9 @@ time to get the page numbers back in sync, then remake the images one more time. Incorrect \SVG\ images will also occur if the document changes the \progcode{page} counter: \trouble[page counter]{page counter>SVG images} -\trouble{SVG image>incorrect} -\trouble{math>incorrect} -\trouble{image>incorrect} +\trouble{SVG image>incorrect>page counter} +\trouble{image>incorrect>page counter} +\trouble{graphics>incorrect>page counter} \begin{sourcedisplay} \cs{setcounter}\{page\}\{<value>\} \end{sourcedisplay} @@ -2102,7 +2115,7 @@ or the packages \pkg{multirow}, \pkg{longtable}, \pkg{supertabular}, or \pkg{xta \item When defining environments or macros which include \env{tabular} and \trouble[Misplaced alignment tab character \&]% {Misplaced alignment tab character \&>tabular>macros} - \trouble{tabular>Misplaced alignment tab character \&>macros} + \trouble{tabular=\env{tabular}>Misplaced alignment tab character \&>macros} 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. @@ -2118,8 +2131,8 @@ or the packages \pkg{multirow}, \pkg{longtable}, \pkg{supertabular}, or \pkg{xta \item \limitsresumetabular \item To automate the use of \cs{StartDefiningTabulars} \gindex{StartDefiningTabulars=\cs{StartDefiningTabulars}} - \gindex{tabular>StartDefiningTabulars=\cs{StartDefiningTabulars}} - \gindex{tabular>in environments, catcode of \&} + \gindex{tabular=\env{tabular}>StartDefiningTabulars=\cs{StartDefiningTabulars}} + \gindex{tabular=\env{tabular}>in environments, catcode of \&} \margintag{For developers:} and \cs{EndDefiningTabulars}, these macros may be embedded inside an \HTML\ environment definition @@ -2151,9 +2164,9 @@ or the packages \pkg{multirow}, \pkg{longtable}, \pkg{supertabular}, or \pkg{xta \item [Cell contents:] \ \begin{itemize} \item Using a custom macro inside a tabular data cell - \trouble[macro in a table]{tabular>macro inside} - \trouble{tabular>row corruption} - \gindex{tabular>macros inside} + \trouble[macro in a table]{tabular=\env{tabular}>macro inside} + \trouble{tabular=\env{tabular}>row corruption} + \gindex{tabular=\env{tabular}>macros inside} may result in an extra \HTML\ data cell tag, corrupting the \HTML\ table. To avoid this, use \cs{TabularMacro} just before the macro. This is ignored in print mode. @@ -2164,7 +2177,14 @@ or the packages \pkg{multirow}, \pkg{longtable}, \pkg{supertabular}, or \pkg{xta \end {itemize} \item [Column specifiers:] \ + \gindex{tabular=\env{tabular}>column specifier} + \trouble{tabular=\env{tabular}>column specifier} \begin{itemize} + \item Due to the way math is gathered for processing, + \watchout[math] + column specifiers such as \progcode{>\{\$\}c<\{\$\}} do not work with \pkg{lwarp}. + Instead, each cell must specify math mode individually. + \item Only one each of \texttt{@} and \texttt{!} \margintag{\texttt{@} and \texttt{!}} is used at each column, and they are used in that order. @@ -2175,8 +2195,30 @@ or the packages \pkg{multirow}, \pkg{longtable}, \pkg{supertabular}, or \pkg{xta and \texttt{!} cells on the second and later rows in the \cs{multirow} which do not appear in the \HTML\ version. - \item \cs{newcolumntype} is ignored; unknown column types are set to \texttt{l}. - \trouble[\cs{newcolumntype}]{tabular>newcolumntype=\cs{newcolumntype}} + \item If \cs{newcolumntype} does not work for \HTML, + \trouble[\cs{newcolumntype}]{tabular=\env{tabular}>newcolumntype=\cs{newcolumntype} and \cs{HTMLnewcolumntype}} + \trouble{newcolumntype=\cs{newcolumntype}} + add a simplified column type using \cs{HTMLnewcolumntype}. + + \item \pkg{lwarp} detects each of the following, + \margintag{font and alignment} + \trouble{tabular=\env{tabular}>text-align=\progcode{text-align}} + \trouble{text-align=\progcode{text-align}} + \gindex{text-align=\progcode{text-align}} + \gindex{tabular=\env{tabular}>text-align=\progcode{text-align}} + and sets \HTML\ \CSS\ appropriately: + \begin{sourcedisplay} + >\{\cs{centering}\cs{arraybackslash}\} \\ + >\{\cs{raggedright}\cs{arraybackslash}\} \\ + >\{\cs{raggedleft}\cs{arraybackslash}\} \\ + >\{\cs{itshape}\} \\ + >\{\cs{bfseries}\} \\ + >\{\cs{bfseries}\cs{itshape}\} + \end{sourcedisplay} + These may be used with \cs{newcolumntype}, such as: + \begin{sourcedisplay} + \cs{newcolumntype}\{P\}[1]\{>\{\cs{centering}\cs{arraybackslash}\}p\{\#1\}\} \\ + \end{sourcedisplay} \end{itemize} \item [Rules:] \ @@ -2208,9 +2250,9 @@ or the packages \pkg{multirow}, \pkg{longtable}, \pkg{supertabular}, or \pkg{xta \item For \cs{toprule} and \cs{bottomrule}, \trouble[\cs{warpprintonly}]{Misplaced \cs{noalign}>tabular>rules} - \trouble{tabular>rules} + \trouble{tabular=\env{tabular}>rules} when combined with a \env{warpprint} or \env{warpHTML} environment, - \trouble[Misplaced \cs{noalign}]{tabular>Misplaced \protect\cs{noalign}}% + \trouble[Misplaced \cs{noalign}]{tabular=\env{tabular}>Misplaced \protect\cs{noalign}}% if a ``Misplaced \cs{noalign}'' error occurs, change \begin{sourcedisplay} @@ -2234,7 +2276,7 @@ or the packages \pkg{multirow}, \pkg{longtable}, \pkg{supertabular}, or \pkg{xta do not apply to \HTML\ inside \cs{warpprintonly\{\}}. \item For S columns (from the \pkg{siunitx} package), \trouble[S columns]{siunitx=\pkg{siunitx}>S column} - \trouble{tabular>S column} + \trouble{tabular=\env{tabular}>S column} while producing print output, anything non-numeric must be placed inside \{ \} braces, including commands such as \cs{multirow}. @@ -2321,8 +2363,8 @@ or the packages \pkg{multirow}, \pkg{longtable}, \pkg{supertabular}, or \pkg{xta \newcommand{\limitsresumetabular}{% When creating a new environment -\trouble[\env{tabular} inside another environment]{tabular>inside an environment} -\trouble{tabular>corrupt rows} +\trouble[\env{tabular} inside another environment]{tabular=\env{tabular}>inside an environment} +\trouble{tabular=\env{tabular}>corrupt rows} which contains a \env{tabular} environment, \pkg{lwarp}'s emulation of the tabular does not automatically resume when the containing enviroment ends, resulting in corrupted \HTML\ rows. @@ -2349,7 +2391,7 @@ Use one of either \cs{endhead} or \cs{endfirsthead} for both print and \HTML, and use a \cs{warpprintonly} macro to disable the other head phrase, and also the \cs{endfoot} and \cs{endfirstfoot} phrases. (See \cref{sec:limitsthreeparttablex} if using \pkg{threeparttablex}.) -\trouble{tabular>endhead=\cs{endhead}, \cs{endfoot}, \cs{endlastfoot}} +\trouble{tabular=\env{tabular}>endhead=\cs{endhead}, \cs{endfoot}, \cs{endlastfoot}} \begin{sourcedisplay} \cs{begin}\{longtable\}\{ [column specifiers] \} \\ {[} \dots ] \cs{endfirsthead} \quad \textgreen{\% or \cs{endhead}, for print and HTML} \\ @@ -2371,7 +2413,7 @@ Use the \cs{warpprintonly} macro instead of the \env{warpprint} environment. Doing so helps avoid ``Misplaced \cs{noalign}.'' when using \cs{begin}\{warpprint\}. \cs{kill} is ignored, place a \cs{kill} line inside -\trouble[\cs{kill}]{tabular>kill=\cs{kill}} +\trouble[\cs{kill}]{tabular=\env{tabular}>kill=\cs{kill}} \begin{sourcedisplay} \cs{begin}\{warpprint\} \ldots\ \cs{end}\{warpprint\} \end{sourcedisplay} @@ -2798,14 +2840,14 @@ defining macros using \cs{ttabbox} with a tabular inside. See \cref{sec:limitstabular}. When combined with the \pkg{subfig} package, -\trouble[\pkg{subfig} package]{floatrow>with \pkg{subfig}} +\trouble[\pkg{subfig} package]{floatrow=\pkg{floatrow}>with \pkg{subfig}} \trouble{subfig=\pkg{subfig}>with \pkg{floatrow}} while inside a \env{subfloatrow} \cs{ffigbox} and \cs{ttabbox} must have the caption in the first of the two of the mandatory arguments. The emulation of \pkg{floatrow} does not support \cs{FBwidth} or \cs{FBheight}. These values are pre-set to \texttt{.3\cs{linewidth}} and \texttt{2in}. -\trouble[\cs{FBwidth}, \cs{FBheight}]{floatrow>\cs{FBwidth} and \cs{FBheight}} +\trouble[\cs{FBwidth}, \cs{FBheight}]{floatrow=\pkg{floatrow}>\cs{FBwidth} and \cs{FBheight}} Possible solutions include: \begin{itemize} \item Use fixed lengths. \pkg{lwarp} will scale the \HTML\ lengths appropriately. @@ -2848,9 +2890,8 @@ output for \optn{per-mode} and \optn{quotient-mode}. Some units will require that the expression be placed inside math mode. \trouble[math mode required]{siunitx=\pkg{siunitx}} -Tabular \texttt{S} columns are rendered as simple \texttt{c} columns, +Tabular \texttt{S} and {s} columns are rendered as simple \texttt{c} columns. \trouble[\env{tabular}]{siunitx=\pkg{siunitx}>tabular S and s columns} -and tabular \texttt{s} columns are not supported. These may be replaced by \texttt{c} columns with each cell contained in \cs{num} or \cs{si}. @@ -3100,7 +3141,7 @@ This boolean may be tested by the user for later use. %<*package> % \fi % -% \CheckSum{54342} +% \CheckSum{53937} % % \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 @@ -3242,6 +3283,7 @@ This boolean may be tested by the user for later use. % \changes{v0.898}{2021/05/29}{\ 2021/05/29} % \changes{v0.899}{2021/06/29}{\ 2021/06/29} % \changes{v0.900}{2021/07/17}{\ 2021/07/17} +% \changes{v0.901}{2021/08/27}{\ 2021/08/27} @@ -3467,6 +3509,26 @@ This boolean may be tested by the user for later use. % % \begin{description} % \needspace{2\baselineskip} +% \item[v0.901:] Tabular columns, float caption \CSS, \brand{MathJax} packages. +% \begin{itemize} +% \item Added \env{warpsvg} to isolate \SVG\ math, as opposed to \env{warpMathJax}. +% \margintag{core} +% \item Improved float caption \CSS\ for newer browsers. +% \item Improved emulation of \cs{newcolumntype}. +% \item Added \cs{HTMLnewcolumntype}. See \cref{sec:htmlsettings}, +% \item \progcode{>\{\cs{centering}\cs{arraybackslash}\}}, etc. +% now sets \HTML\ \CSS\ \progcode{text-align}. +% Also detects \cs{itshape}, \cs{bfseries}, and \cs{bfseries}\cs{itshape}. +% See \cref{sec:limitstabular}. +% \item Now uses \brand{MathJax} 3.2 packages for \pkg{centernot}, \pkg{colortbl}, +% \margintag{\brand{MathJax}} +% \pkg{gensymb}, \pkg{mathtools}, \pkg{textcomp}, \pkg{upgreek}. +% \item \pkg{dcolumn}: Now works inside a \env{lateximage}. +% \margintag{packages} +% \item Added \pkg{mwe}. +% \item Added \pkg{lltjp-tascmac}, which fixed \pkg{ascmac}. +% \end{itemize} +% \needspace{2\baselineskip} % \item[v0.900:] Package updates. % \begin{itemize} % \item Fix for detecting |\usepackage{lwarp}|. @@ -5777,7 +5839,7 @@ This boolean may be tested by the user for later use. % \spkg{accents}\ejax, \spkg{amscd}\sjax, \spkg{amscdx}, \spkg{autobreak}\ejax, \ipkg{autonum}, % \mpkg{backnaur}\ejax, \mpkg{bm}\ejax, \spkg{braket}\sjax, % \mpkg{breqn}\ijax, \mpkg{bussproofs}\sjax, \mpkg{cases}\ijax, -% \spkg{centernot}\ejax, \spkg{cmbright}\ejax, +% \spkg{centernot}\sjax, \spkg{cmbright}\ejax, % \spkg{colonequals}\ejax, \spkg{decimal}\ejax, % \spkg{delarray}, \mpkg{DotArrow}\ejax, \spkg{dotlessi}\ejax, \spkg{dotlessj}\sjax, % \spkg{esvect}\ejax, \spkg{extarrows}\ejax, \spkg{fixmath}\ejax, @@ -5790,7 +5852,7 @@ This boolean may be tested by the user for later use. % \spkg{mathdots}\ejax, \spkg{mathfixs}\ejax, % \spkg{mathpazo}\ejax, \spkg{mathptmx}\ejax, % \spkg{mathpunctspace}\ijax, -% \spkg{mathspec}\ejax, \mpkg{mathtools}\ejax, \spkg{mattens}\ejax, +% \spkg{mathspec}\ejax, \mpkg{mathtools}\sjax, \spkg{mattens}\ejax, % \spkg{maybemath}\ijax, \spkg{mdwmath}\ejax, % \mpkg{mismath}\ejax, \spkg{mleftright}\ejax, % \spkg{multiobjective}\ejax, \mpkg{nccmath}\ejax, @@ -5804,7 +5866,7 @@ This boolean may be tested by the user for later use. % \spkg{subsupscripts}\ejax, \spkg{tensind}, \spkg{tensor}\ejax, % \spkg{textualicomma}\ijax, % \spkg{txfonts}\ejax, \spkg{txgreeks}\ejax, -% \spkg{unicode-math}\ejax, \spkg{upgreek}\ejax, +% \spkg{unicode-math}\ejax, \spkg{upgreek}\sjax, % \spkg{ushort}\ejax, \mpkg{witharrows}\ejax, % \mpkg{xfakebold}\ejax, \mpkg{xy}. % Many others work as-is. \\ @@ -5836,7 +5898,8 @@ This boolean may be tested by the user for later use. % Tabular: & % \env{tabular} environment, \mpkg{array}\ejax, \epkg{arydshln}\ejax, % \mpkg{bigdelim}\ejax, \mpkg{bigstrut}\ejax, \mpkg{booktabs}\ejax, -% \mpkg{colortbl}\ijax, \mpkg{ctable}, \mpkg{diagbox}, \mpkg{hhline}\ejax, \epkg{longtable}, +% \mpkg{colortbl}\sjax, \mpkg{ctable}, \mpkg{dcolumn}, \mpkg{diagbox}, +% \mpkg{hhline}\ejax, \epkg{longtable}, % \epkg{ltablex}, \epkg{ltxtable}, % \mpkg{multirow}\ejax, \epkg{supertabular}, \epkg{tabularx}, \epkg{tabulary}, % \epkg{threeparttable}, \mpkg{threeparttablex}, @@ -5959,12 +6022,12 @@ This boolean may be tested by the user for later use. % Symbols: & Native \LaTeX\ diacriticals, \mpkg{academicons}, \spkg{amssymb}\sjax, % \mpkg{bbding}, \mpkg{ccicons}, % \mpkg{chemgreek}, \mpkg{dingbat}, \spkg{euro}, \mpkg{eurosym}, -% \mpkg{fontawesome}, \mpkg{fontawesome5}, \spkg{gensymb}\ejax, \spkg{latexsym}\sjax, +% \mpkg{fontawesome}, \mpkg{fontawesome5}, \spkg{gensymb}\sjax, \spkg{latexsym}\sjax, % \mpkg{marvosym}, % \mpkg{metalogo}, \mpkg{metalogox}, % \mpkg{pifont}, % \spkg{textalpha}, -% \mpkg{textcomp}, \spkg{textgreek}, +% \mpkg{textcomp}\sjax, \spkg{textgreek}, % \mpkg{typicons}, % \mpkg{xunicode}. % \\ @@ -6033,7 +6096,7 @@ This boolean may be tested by the user for later use. % Package handling: & \spkg{catoptions}. \\ % % Debug: & \ipkg{chkfloat}, \ipkg{cmdtrack}, \ipkg{dprogress}, \mpkg{lipsum}, -% \ipkg{lua-visual-debug}, \ipkg{refcheck}, +% \ipkg{lua-visual-debug}, \mpkg{mwe}, \ipkg{refcheck}, % \ipkg{srcltx}, \ipkg{srctex}, \ipkg{vpe}, \ipkg{xbmks}. \\ % % \midrule @@ -8183,6 +8246,8 @@ This boolean may be tested by the user for later use. % \cs{HTMLPageTop} & PS & Heading for the other pages. \\ % \cs{HTMLPageBottom} & PS & Footer for the other pages. \\ % \midrule +% \cs{HTMLnewcolumntype} & D & \cs{newcolumntype} for \HTML. \\ +% \midrule % \cs{IndexPageSeparator} & P & Index page list separator. \\ % \cs{IndexRangeSeparator} & P & Index page range separator. \\ % \midrule @@ -8547,6 +8612,20 @@ This boolean may be tested by the user for later use. % Redefine with \cs{renewcommand}. % \describeAltTextOpenClose % +% \ItemDescribeMacro{\HTMLnewcolumntype} +% \cs{newcolumntype} may not always work with \pkg{lwarp} for \HTML\ output, +% \trouble{newcolumntype=\cs{newcolumntype}} +% \trouble{htmlnewcolumntype=\cs{HTMLnewcolumntype}} +% \trouble{array=\env{array}>newcolumntype=\cs{newcolumntype} and \cs{HTMLnewcolumntype}} +% \trouble{tabular=\env{tabular}>newcolumntype=\cs{newcolumntype} and \cs{HTMLnewcolumntype}} +% \gindex{array=\env{array}>newcolumntype=\cs{newcolumntype} and \cs{HTMLnewcolumntype}} +% \gindex{tabular=\env{tabular}>newcolumntype=\cs{newcolumntype} and \cs{HTMLnewcolumntype}} +% \gindex{newcolumntype=\cs{newcolumntype} and \cs{HTMLnewcolumntype}} +% \gindex{HTMLnewcolumntype=\cs{HTMLnewcolumntype} and \cs{newcolumntype}} +% since it often involves \TeX\ boxes and fills. +% To provide a simplified column type for \HTML, +% add \cs{HTMLnewcolumntype} in addition. +% % \ItemDescribeEnv{warpprint} An environment which is only used % while generating print output. Place inside anything which does not % apply to \HTML\ and which may cause problems with \pkg{lwarp}. @@ -8811,6 +8890,16 @@ This boolean may be tested by the user for later use. % Do not nest \env{warpMathJax} inside itself. \watchout[nesting] % \env{warpMathJax} may be used inside \env{warpHTML}. % +% \DescribeEnv{warpsvg} +% Anything which is to be done only while using print output or +% \HTML\ output with \SVG\ math +% is surrounded by a \env{warpsvg} environment. +% |\end{warpsvg}| must appear on its own line. +% \trouble[\texttt{\cs{end}\{warpsvg\}}]{warpsvg} +% Do not nest \env{warpsvg} inside itself. \watchout[nesting] +% \env{warpsvg} may be used inside \env{warpHTML}. +% +% % % \subsection{Commands to be placed into the \env{warpprint} environment} % \label{sec:printcommands} @@ -10543,7 +10632,6 @@ This boolean may be tested by the user for later use. % % \DescribePackage{graphics}% % \DescribePackage{graphicx}% -% % \begin{table} % \caption{\cs{includegraphics} and file names} % \label{tab:includegraphicsfilenames} @@ -10570,7 +10658,6 @@ This boolean may be tested by the user for later use. % \end{threeparttable} % \end{center} % \end{table} -% % \limitsgraphics % % @@ -10677,17 +10764,17 @@ This boolean may be tested by the user for later use. % % \subsubsection{\pkg{multirow} package} % \gindex{multirow=\pkg{multirow}>mrowcell=\cs{mrowcell} and \cs{mcolrowcell}} -% \gindex{tabular>multirow=\pkg{multirow} \cs{mrowcell} and \cs{mcolrowcell}} +% \gindex{tabular=\env{tabular}>multirow=\pkg{multirow} \cs{mrowcell} and \cs{mcolrowcell}} % \gindex{mrowcell=\cs{mrowcell}} % \gindex{mcolrowcell=\cs{mcolrowcell}} % \trouble{multirow=\pkg{multirow}>mrowcell=\cs{mrowcell} and \cs{mcolrowcell}} -% \trouble{tabular>multirow=\pkg{multirow} \cs{mrowcell} and \cs{mcolrowcell}} +% \trouble{tabular=\env{tabular}>multirow=\pkg{multirow} \cs{mrowcell} and \cs{mcolrowcell}} % \trouble{mrowcell=\cs{mrowcell}} % \trouble{mcolrowcell=\cs{mcolrowcell}} % \gindex{multicolumn=\cs{multicolumn}>with \cs{multirow}} % \gindex{multirow=\cs{multirow}>with \cs{multicolumn}} -% \gindex{tabular>multicolumn=\cs{multicolumn} with \cs{multirow}} -% \trouble{tabular>multicolumn=\cs{multicolumn} with \cs{multirow}} +% \gindex{tabular=\env{tabular}>multicolumn=\cs{multicolumn} with \cs{multirow}} +% \trouble{tabular=\env{tabular}>multicolumn=\cs{multicolumn} with \cs{multirow}} % \limitsmultirow % % \subsubsection{\pkg{longtable} package} @@ -12302,10 +12389,13 @@ This boolean may be tested by the user for later use. % \end{description} % % \item [Images are appearing in strange places:] ~ -% \trouble{image>incorrect} -% \trouble{SVG image>incorrect} +% \trouble{image>incorrect>added or removed} +% \trouble{graphics>incorrect>added or removed} +% \trouble{SVG image>incorrect>added or removed} +% \trouble{math>incorrect>added or removed} % \begin{itemize} -% \item Enter \cmds{lwarpmk limages} to refresh the \env{lateximage} images. +% \item When images are added or removed, +% Enter \cmds{lwarpmk limages} to refresh the \env{lateximage} images. % \end{itemize} % % \item[\SVG\ images:] \ @@ -12503,9 +12593,9 @@ This boolean may be tested by the user for later use. % In order to make it easier to locate a solution, % the same issue may be addressed by more than one entry. % -% Entries with higher page numbers are often duplicates of entries with +% Entries starting with page \pageref{source} are often duplicates of entries with % lower page numbers, as the same warning may occur within the user manual -% and again within the source code for a given package. +% and again within the source code. % } % % \printindex[trb][Troubleshooting Index] @@ -12630,6 +12720,7 @@ This boolean may be tested by the user for later use. % \section{Source code} % % ^^A *source +% \label{source} % % This is where the documented source code for \pkg{lwarp} begins, % continuing through the following sections all the way to the @@ -13036,6 +13127,7 @@ This boolean may be tested by the user for later use. \LWR@checkloadnever{cals}{} \LWR@checkloadnever{cellspace}{} \LWR@checkloadnever{cgloss4e}{} +\LWR@checkloadnever{collcell}{} \LWR@checkloadnever{colophon}{} \LWR@checkloadnever{cooltooltips}{} \LWR@checkloadnever{covington}{} @@ -13421,6 +13513,7 @@ This boolean may be tested by the user for later use. \LWR@loadafter{lips} \LWR@loadafter{listings} \LWR@loadafter{listliketab} +\LWR@loadafter{lltjp-tascmac} \LWR@loadafter{longtable} \LWR@loadafter{lpic} \LWR@loadafter{lscape} @@ -13485,6 +13578,7 @@ This boolean may be tested by the user for later use. \LWR@loadafter{multirow} \LWR@loadafter{multitoc} \LWR@loadafter{musicography} +\LWR@loadafter{mwe} \LWR@loadafter{nameauth} \LWR@loadafter{nameref} \LWR@loadafter{natbib} @@ -15153,6 +15247,24 @@ This boolean may be tested by the user for later use. % \end{environment} +% \begin{environment}{warpsvg} +% Only if \SVG\ math is being used along with \HTML, +% or in print mode. +% \changes{v0.901}{2021/08/26}{Added.} +% \begin{macrocode} +\begin{warpprint} +\LWR@includecomment{warpsvg}{mathsvg} +\end{warpprint} + +\begin{warpHTML} +\ifbool{mathjax} + {\LWR@excludecomment{warpsvg}{mathsvg}} + {\LWR@includecomment{warpsvg}{mathsvg}} +\end{warpHTML} +% \end{macrocode} +% \end{environment} + + % \begin{environment}{LWRcreatelwarpmk} % Optionally generate a local copy of \prog{lwarpmk}. % Default to no. @@ -16640,14 +16752,26 @@ This boolean may be tested by the user for later use. % % \begin{macro}{\LWR@formatted@checkname} \marg{name} % \changes{v0.893}{2020/11/15}{Added.} +% \changes{v0.901}{2021/08/18}{Improved error handling.} % \begin{macrocode} \newcommand*{\LWR@formatted@checkname}[1]{% + \ifcsundef{#1}{% + \ifcsundef{LWR@print@#1}{% + \PackageError{lwarp} + {% + \LWRbackslash#1 or \protect\LWR@print@#1\MessageBreak + must be defined before using \protect\LWR@formatted, etc% + } + {Perhaps #1 is misspelled.} + }{\relax}% + }{\relax}% \ifcsundef{LWR@HTML@#1}{% \PackageError{lwarp} {% - \protect\LWR@HTML@#1 is not defined% + \protect\LWR@HTML@#1 must be defined + before using \protect\LWR@formatted, etc% } - {Perhaps it is misspelled.} + {Perhaps #1 is misspelled.} }{\relax}% } % \end{macrocode} @@ -16655,14 +16779,26 @@ This boolean may be tested by the user for later use. % % \begin{macro}{\LWR@formatted@checkendname} \marg{name} % \changes{v0.893}{2020/11/15}{Added.} +% \changes{v0.901}{2021/08/18}{Improved error handling.} % \begin{macrocode} \newcommand*{\LWR@formatted@checkendname}[1]{% + \ifcsundef{end#1}{% + \ifcsundef{endLWR@print@#1}{% + \PackageError{lwarp} + {% + \protect\end#1 or \protect\endLWR@print@#1\MessageBreak + must be defined before using \protect\LWR@formatted, etc% + } + {Perhaps #1 is misspelled.} + }{\relax}% + }{\relax}% \ifcsundef{endLWR@HTML@#1}{% \PackageError{lwarp} {% - \protect\endLWR@HTML@#1 is not defined% + \protect\endLWR@HTML@#1 must be defined + before using \protect\LWR@formatted, etc% } - {Perhaps it is misspelled.} + {Perhaps #1 is misspelled.} }{\relax}% } % \end{macrocode} @@ -16783,6 +16919,24 @@ This boolean may be tested by the user for later use. % \end{macrocode} +% Print versions. +% +% \codeprint +% \begin{macrocode} +\begin{warpprint} +% \end{macrocode} + +% \changes{v0.901}{2021/08/20}{Added print versions of \cs{LWR@formatted}, etc.} +% \begin{macrocode} +\newcommand*{\LWR@formatted}[1]{} +\newcommand*{\LWR@expandableformatted}[1]{} +\newcommand*{\LWR@formattedenv}[1]{} +\newcommand*{\LWR@expandableformattedenv}[1]{} +% \end{macrocode} + +% \begin{macrocode} +\end{warpprint} +% \end{macrocode} % \section{\HTML-conversion output modifications} @@ -17761,6 +17915,8 @@ This boolean may be tested by the user for later use. % \changes{v0.894}{2020/12/15}{\filenm{lwarp.css}: \TeX\ logos no longer below baseline.} % \changes{v0.896}{2021/03/04}{\filenm{lwarp.css}: Added \element{main}, adjusted \element{sidetoccontainer} margin.} % \changes{v0.899}{2021/06/25}{\filenm{lwarp.css}: Improved \pkg{multicol}.} +% \changes{v0.901}{2021/08/20}{\filenm{lwarp.css}: Tabular cell text alignment.} +% \changes{v0.901}{2021/08/20}{\filenm{lwarp.css}: Improved captions.} % % ^^A *lwarp.css % @@ -17841,9 +17997,11 @@ kbd, span.texttt, p span.texttt { pre { padding: 3pt ; } -span.strong, span.textbf, div.strong, div.textbf { font-weight: bold; } +span.strong, span.textbf, div.strong, div.textbf, table td.tdbfseries { font-weight: bold; } -span.textit, div.textit { font-style: italic; } +span.textit, div.textit, table td.tditshape { font-style: italic; } + +table td.tdbfit { font-weight: bold ; font-style:italic } span.textmd, div.textmd { font-weight: normal; } @@ -18758,6 +18916,12 @@ figure.subfigure, figure.subtable { div.figurecaption .minipage { margin:0 ; padding: 0 } +/* for subcaptions: */ +figure div.minipage div.figurecaption { + max-width: 100% ; /* fallback if min() does not work */ + max-width: min(30em,100%) +} + div.minipage figure { border: none ; box-shadow: none ; } div.minipage figure.table { margin: 0ex } div.minipage div.footnotes { margin: 1ex 2em 0ex 2em } @@ -18769,12 +18933,20 @@ div.floatrow figure { display: inline-block ; margin: 1ex 2% ; } div.floatfoot { font-size: .85em ; border-top: 1px solid silver ; line-height: 1.2 ; } +/* Center if only one line, "start" align if more than one line: */ div.figurecaption , .lstlistingtitle { font-size: .85em ; - text-align: center ; font-weight: bold ; - margin-top: 1ex ; - margin-bottom: 1ex ; + text-align: start ; + margin: 1ex auto; + width: max-content; + max-width: 100%; +} + +/* A marginblock is small, so always center and don't mess with the width. */ +div.marginblock div.figurecaption { + width: 100% ; + text-align: center ; } figure.subfigure div.figurecaption, figure.subtable div.figurecaption { @@ -18840,9 +19012,6 @@ 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 ; } table td.tdb { text-align: left ; vertical-align: top ; } -table td.tdP { text-align: center ; vertical-align: bottom ; } -table td.tdM { text-align: center ; vertical-align: middle ; } -table td.tdB { text-align: center ; vertical-align: top ; } table td.tvertbarl { border-left: 1px solid black } table td.tvertbarldouble { border-left: 4px double black } @@ -18854,6 +19023,10 @@ table td.tvertbarldoubledash { border-left: 2px dashed black } table td.tvertbarrdash { border-right: 1px dashed black } table td.tvertbarrdoubledash { border-right: 2px dashed black } +table td.tdcenter { text-align: center} +table td.tdleft { text-align: left} +table td.tdright { text-align: right} + /* for cmidrules: */ table td.tdrule { @@ -20578,7 +20751,7 @@ MathJax = { -- Copyright 2016-2021 Brian Dunn -printversion = "v0.900" +printversion = "v0.901" requiredconfversion = "2" -- also at *lwarpmk.conf function printhelp () @@ -21874,7 +22047,7 @@ end -- not --version % \cs{StopDefiningTabulars} % \trouble[Misplaced alignment tab character \&] % {Misplaced alignment tab character \&>tabular>macros} -% \trouble{tabular>Misplaced alignment tab character \&>rules} +% \trouble{tabular=\env{tabular}>Misplaced alignment tab character \&>rules} % before and after defining macros or environments which include % the tabular |&| character in their definitions. % @@ -21939,9 +22112,9 @@ end -- not --version % \section{Localizing dynamic math} % \label{sec:localizingdynamicmath} -% \trouble{SVG image>math incorrect} +% \trouble{SVG image>math incorrect>dymamic} % \gindex{SVG>dynamic math} -% \trouble{math>incorrect} +% \trouble{math>incorrect>dynamic} % \trouble{math>dynamic} % \trouble{mathjax=\brand{MathJax}>errors} % \gindex{math>dynamic} @@ -29621,13 +29794,13 @@ end -- not --version % See \cref{sec:dataarray}. % % \DescribeObject{LWR@colbeforespec} A data array of specifications for |>| columns. -% +% % \DescribeObject{LWR@colafterspec} A data array of specifications for |<| columns. % % \DescribeObject{LWR@colbarspec} A data array of specifications for vertical rules. - - +% \DescribeObject{LWR@coladdclass} A data array of extra \CSS\ class, as set by |>|. +% % \DescribeCounter{LWR@cellcolordepth} % Counts how many cell color \element{div}s were added to the current tabular data cell. % \begin{macrocode} @@ -29635,7 +29808,6 @@ end -- not --version % \end{macrocode} - % \subsubsection{Multicolumn variables} % \begin{macrocode} @@ -29678,7 +29850,7 @@ end -- not --version -% \subsection{Handling \&, @, !, and bar} +% \subsection{Handling \progcode{\&}, \progcode{@}, \progcode{!}, and bar} % % \begin{minipage}{\linewidth} % For technical discussion regarding problems redefining |\&|, See: \\ @@ -29864,7 +30036,7 @@ end -- not --version -% \subsubsection{Filling an unfinished row} +% \subsection{Filling an unfinished row} % \begin{macro}{\LWR@tabularfinishrow} % Adds empty table cells if necessary to finish the row. @@ -30059,14 +30231,17 @@ end -- not --version % \end{macrocode} % % -% \begin{macro}{\LWR@parseatcolumn} +% \begin{macro}{\LWR@parseatcolumn} \marg{this column type} % % Handles |@{text}| columns. % +% The argument is ignored, +% but provided for compatibility with \cs{LWR@parsenormalcolumn}. +% % \changes{v0.33}{2017/07/07}{Fix: Column alignment with leftmost \progcode{@}.} % % \begin{macrocode} -\newcommand*{\LWR@parseatcolumn}{% +\newcommand*{\LWR@parseatcolumn}[1]{% % \end{macrocode} % Move to the next token after the '@': % \begin{macrocode} @@ -30110,13 +30285,16 @@ end -- not --version % \end{macro} % % -% \begin{macro}{\LWR@parsebangcolumn} +% \begin{macro}{\LWR@parsebangcolumn} \marg{this column type} % Handles |!{text}| columns. % +% The argument is ignored, +% but provided for compatibility with \cs{LWR@parsenormalcolumn}. +% % \changes{v0.22}{2017/02/28}{Added tabular \progcode{!!} column.} % % \begin{macrocode} -\newcommand*{\LWR@parsebangcolumn}{% +\newcommand*{\LWR@parsebangcolumn}[1]{% % \end{macrocode} % Move to the next token after the '!': % \begin{macrocode} @@ -30157,18 +30335,58 @@ end -- not --version % \end{macro} % % +% \begin{macro}{\LWR@checkbeforeaddclass} \marg{compared csname} \marg{\CSS\ class to add} +% \begin{macrocode} +\newcommand*{\LWR@checkbeforeaddclass}[2]{% + \ifcsstrequal{LWR@tempone}{#1}% + {% + \LWR@setexparray{LWR@coladdclass}% + {\arabic{LWR@tabletotalLaTeXcolsnext}}% + { #2}% space is intentional + }{}% +} +% \end{macrocode} +% \end{macro} % -% \begin{macro}{\LWR@parsebeforecolumn} +% +% \begin{macro}{\LWR@checkmathcolpar} Error if using math in column parameters. +% \changes{v0.901}{2021/08/21}{Error if math in column specifier.} +% \begin{macrocode} +\newcommand*{\LWR@checkmathcolpar}{% + \IfSubStr{\detokenize\expandafter{\LWR@colparameter}}{\LWRdollar}% + {% + \PackageError{lwarp}% + {% + Lwarp does not support `$' in column specifiers.\MessageBreak + Specify `$' math for each cell in the column.\MessageBreak + Enter 'h' for more info% + }% + {% + For example, replace `>{$}c<{$}' with `c', and then\MessageBreak + use `$cell contents$' for each cell in the column.% + }% + }{}% +} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\LWR@parsebeforecolumn} \marg{this column type} % % Handles |>{text}| columns. % +% The argument is ignored, +% but provided for compatibility with \cs{LWR@parsenormalcolumn}. +% % \begin{macrocode} -\newcommand*{\LWR@parsebeforecolumn}{% +\newcommand*{\LWR@parsebeforecolumn}[1]{% % \end{macrocode} +% % Move to the next token after the '>': % \begin{macrocode} \defaddtocounter{LWR@tablecolspecindex}{1}% % \end{macrocode} +% % Read the next token, expanding once into \cs{LWR@colparameter}: % \begin{macrocode} \expandarg% @@ -30176,29 +30394,56 @@ end -- not --version {\arabic{LWR@tablecolspecindex}}[\LWR@colparameter]% \fullexpandarg% % \end{macrocode} +% +% Error if using |>{$}|, which is not supported by \pkg{lwarp}. +% \changes{v0.901}{2021/08/21}{Error if math in column specifier.} +% \begin{macrocode} + \LWR@checkmathcolpar% +% \end{macrocode} +% % Store the result into a data array, expanding once out of \cs{LWR@colparameter}: % \changes{v0.79}{2020/01/16}{Remove outermost braces.} % \begin{macrocode} \LWR@setexparray{LWR@colbeforespec}% {\arabic{LWR@tabletotalLaTeXcolsnext}}% {\expandafter\@firstofone\LWR@colparameter}% +% + \edef\LWR@tempone{\expandafter\@firstofone\LWR@colparameter}% +% \end{macrocode} +% +% If detect |>{\centering\arraybackslash}| or related, add a \CSS\ class. +% \changes{v0.901}{2021/08/20}{Tabular cell text alignment.} +% \begin{macrocode} + \LWR@checkbeforeaddclass{LWR@detect@centeringarraybackslash}{tdcenter} + \LWR@checkbeforeaddclass{LWR@detect@raggedrightarraybackslash}{tdleft} + \LWR@checkbeforeaddclass{LWR@detect@raggedleftarraybackslash}{tdright} + \LWR@checkbeforeaddclass{LWR@detect@itshape}{tditshape} + \LWR@checkbeforeaddclass{LWR@detect@bfseries}{tdbfseries} + \LWR@checkbeforeaddclass{LWR@detect@bfit}{tdbfit} +% \end{macrocode} +% \begin{macrocode} \let\LWR@colparameter\relax% \booltrue{LWR@validtablecol}% } % \end{macrocode} % \end{macro} % -% \begin{macro}{\LWR@parseaftercolumn} +% \begin{macro}{\LWR@parseaftercolumn} \marg{this column type} % % Handles |<{text}| columns. % +% The argument is ignored, +% but provided for compatibility with \cs{LWR@parsenormalcolumn}. +% % \begin{macrocode} -\newcommand*{\LWR@parseaftercolumn}{% +\newcommand*{\LWR@parseaftercolumn}[1]{% % \end{macrocode} +% % Move to the next token after the '<': % \begin{macrocode} \defaddtocounter{LWR@tablecolspecindex}{1}% % \end{macrocode} +% % Read the next token, expanding once into \cs{LWR@colparameter}: % \begin{macrocode} \expandarg% @@ -30206,6 +30451,13 @@ end -- not --version {\arabic{LWR@tablecolspecindex}}[\LWR@colparameter]% \fullexpandarg% % \end{macrocode} +% +% Error if using |>{$}|, which is not supported by \pkg{lwarp}. +% \changes{v0.901}{2021/08/21}{Error if math in column specifier.} +% \begin{macrocode} + \LWR@checkmathcolpar% +% \end{macrocode} +% % Store the result into a data array, expanding once out of \cs{LWR@colparameter}: % \changes{v0.79}{2020/01/16}{Remove outermost braces.} % \begin{macrocode} @@ -30219,15 +30471,21 @@ end -- not --version % \end{macro} % % -% \begin{macro}{\LWR@parsebarcolumn} \qquad Handles vertical rules. +% \begin{macro}{\LWR@parsebarcolumn} \marg{this column type} +% +% Handles vertical rules. +% +% The argument is ignored, +% but provided for compatibility with \cs{LWR@parsenormalcolumn}. % % \changes{v0.41}{2017/10/07}{Added vertical rules.} % \changes{v0.56}{2018/04/30}{Adds support for double vertical rules.} % % \begin{macrocode} -\newcommand*{\LWR@parsebarcolumn}{% +\newcommand*{\LWR@parsebarcolumn}[1]{% \LWR@traceinfo{LWR@parsebarcolumn}% % \end{macrocode} +% % Remember the bar at this position: % \begin{macrocode} \ifnumcomp{\value{LWR@tabletotalLaTeXcols}}{=}{0}% @@ -30257,13 +30515,19 @@ end -- not --version % \end{macro} % % -% \begin{macro}{\LWR@parsecoloncolumn} \qquad Handles vertical rules. +% \begin{macro}{\LWR@parsecoloncolumn} \marg{this column type} +% +% Handles vertical rules. +% +% The argument is ignored, +% but provided for compatibility with \cs{LWR@parsenormalcolumn}. % % \changes{v0.56}{2018/05/04}{\pkg{arydshln}: Added.} % \begin{macrocode} -\newcommand*{\LWR@parsecoloncolumn}{% +\newcommand*{\LWR@parsecoloncolumn}[1]{% \LWR@traceinfo{LWR@parsecoloncolumn}% % \end{macrocode} +% % Remember the bar at this position: % \begin{macrocode} \ifnumcomp{\value{LWR@tabletotalLaTeXcols}}{=}{0}% @@ -30289,32 +30553,46 @@ end -- not --version % \end{macro} % % -% \begin{macro}{\LWR@parsesemicoloncolumn} \qquad Handles vertical rules. +% \begin{macro}{\LWR@parsesemicoloncolumn} \marg{this column type} +% +% Handles vertical rules. +% +% The argument is ignored, +% but provided for compatibility with \cs{LWR@parsenormalcolumn}. +% +% The arguments to the column type are absorbed by \cs{LWR@columntype@<char>}, +% defined by \cs{LWR@modifycolumntype}. % % \changes{v0.56}{2018/05/04}{\pkg{arydshln}: Added.} % \begin{macrocode} -\newcommand*{\LWR@parsesemicoloncolumn}{% +\newcommand*{\LWR@parsesemicoloncolumn}[1]{% % \end{macrocode} +% % Treat |;| as a |:| column: % \begin{macrocode} - \LWR@parsecoloncolumn% -% \end{macrocode} -% Skip the following width token: -% \begin{macrocode} - \defaddtocounter{LWR@tablecolspecindex}{1}% + \LWR@parsecoloncolumn{}% } % \end{macrocode} % \end{macro} % % -% \subsection{Parsing `l', `c', or `r' columns} +% \subsection{Parsing common column types} % -% \begin{macro}{\LWR@parsenormalcolumn} \marg{thiscolumn} +% \begin{macro}{\LWR@parsenormalcolumn} \marg{this column type} % % Add to the accumulated column specs, advance counters, % and pre-clear another column of at, before, and after specs. +% +% \cs{newcolumntype} definitons use \cs{LWR@parsenormalcolumn}, +% so an \HTML\ and print version are given so that they may work inside +% a \env{lateximage}. +% +% The arguments to the column type are absorbed by \cs{LWR@columntype@<char>}, +% defined by \cs{LWR@modifycolumntype}. +% +% \changes{v0.901}{2021/08/12}{Improved \cs{newcolumntype} emulation.} % \begin{macrocode} -\newcommand*{\LWR@parsenormalcolumn}[1]{% +\newcommand*{\LWR@HTML@LWR@parsenormalcolumn}[1]{% \defaddtocounter{LWR@tabletotalLaTeXcols}{1}% \defaddtocounter{LWR@tabletotalLaTeXcolsnext}{1}% % \end{macrocode} @@ -30329,45 +30607,33 @@ end -- not --version \LWR@setexparray{LWR@colbeforespec}{\arabic{LWR@tabletotalLaTeXcolsnext}}{}% \LWR@setexparray{LWR@colafterspec}{\arabic{LWR@tabletotalLaTeXcolsnext}}{}% \LWR@setexparray{LWR@colbarspec}{\arabic{LWR@tabletotalLaTeXcolsnext}}{}% + \LWR@setexparray{LWR@coladdclass}{\arabic{LWR@tabletotalLaTeXcolsnext}}{}% \booltrue{LWR@validtablecol}% } -% \end{macrocode} -% \end{macro} +\newcommand*{\LWR@print@LWR@parsenormalcolumn}[1]{} -% \subsection{Parsing `p', `m', or `b' columns} -% -% \begin{macro}{\LWR@parsepcolumn} \marg{thiscolumn} -% The width will be ignored. -% \begin{macrocode} -\newcommand*{\LWR@parsepcolumn}[1]{% -% \end{macrocode} -% Converts to the given column type: -% \begin{macrocode} - \LWR@parsenormalcolumn{#1}% -% \end{macrocode} -% Skips the following width token: -% \begin{macrocode} - \defaddtocounter{LWR@tablecolspecindex}{1}% -} +\LWR@formatted{LWR@parsenormalcolumn} % \end{macrocode} % \end{macro} + % \subsection{Parsing `w' columns} % -% \begin{macro}{\LWR@parsewcolumn} +% \begin{macro}{\LWR@parsewcolumn} \marg{this column type} % The width will be ignored. +% +% The arguments to the column type are absorbed by \cs{LWR@columntype@<char>}, +% defined by \cs{LWR@modifycolumntype}. +% +% The argument is ignored, +% but provided for compatibility with \cs{LWR@parsenormalcolumn}. +% % \begin{macrocode} -\newcommand*{\LWR@parsewcolumn}{% -% \end{macrocode} -% \begin{macrocode} +\newcommand*{\LWR@parsewcolumn}[1]{% \LWR@columnspeclookahead{1}% \expandafter\LWR@parsenormalcolumn\expandafter{\LWR@strresulttwo}% -% \end{macrocode} -% Skips the following width and alignment tokens: -% \begin{macrocode} - \defaddtocounter{LWR@tablecolspecindex}{2}% } % \end{macrocode} % \end{macro} @@ -30375,143 +30641,41 @@ end -- not --version % \subsection{Parsing '*' columns} % -% \begin{macro}{\LWR@parsestarcolumn} +% \begin{macro}{\LWR@parsestarcolumn} \marg{this column type} % Star columns should already have been expanded, so this should never be used. -% \begin{macrocode} -\newcommand*{\LWR@parsestarcolumn}{% - \defaddtocounter{LWR@tablecolspecindex}{2}% -} -% \end{macrocode} -% \end{macro} - - -% \subsection{Parsing `D' columns} % -% From the \pkg{dcolumn} package. +% The arguments to the column type are absorbed by \cs{LWR@columntype@<char>}, +% defined by \cs{LWR@modifycolumntype}. % -% \begin{macro}{\LWR@parseDcolumn} \marg{thiscolumn} -% The three parameters will be ignored. -% -% \changes{v0.22}{2017/02/24}{Added tabular \progcode{D} column.} +% The argument is ignored, +% but provided for compatibility with \cs{LWR@parsenormalcolumn}. % % \begin{macrocode} -\newcommand*{\LWR@parseDcolumn}[1]{% -% \end{macrocode} -% Converts to the given column type. -% \begin{macrocode} - \LWR@parsenormalcolumn{#1}% -% \end{macrocode} -% Skips the following three parameters. -% \begin{macrocode} - \defaddtocounter{LWR@tablecolspecindex}{3}% -} +\newcommand*{\LWR@parsestarcolumn}[1]{} % \end{macrocode} % \end{macro} + % \subsection{Expanding the star column specifications} -% \DescribeCounter{LWR@starcount} -% Internal count for duplicating star columns. -% \begin{macrocode} -\newcount\LWR@starcount -% \end{macrocode} -% -% \begin{macro}{\LWR@expcolspec} -% Temporary storage used to build the expanded column specifier. -% \begin{macrocode} -\newcommand*{\LWR@expcolspec}{} -% \end{macrocode} -% \end{macro} -% -% \DescribeCounter{LWR@splitstarindex} -% Indexes into the column specifiers. -% \begin{macrocode} -\newcounter{LWR@splitstarindex} -% \end{macrocode} -% -% \DescribeCounter{LWR@splitstarcopies} -% Number of copies. -% \begin{macrocode} -\newcounter{LWR@splitstarcopies} -% \end{macrocode} -% -% \begin{macro}{\LWR@splitstarcontents} -% Contents to duplicate. -% \begin{macrocode} -\newcommand*{\LWR@splitstarcontents}{} -% \end{macrocode} -% \end{macro} -% -% -% \begin{macro}{\expandcolspec} Expands \cs{LWR@origcolspec} for star columns. -% \changes{v0.71}{2019/04/26}{Added support for tabular `\texttt{*}' column.} -% \begin{macrocode} -\newcommand*{\expandcolspec}{% -% \end{macrocode} -% -% Find the position of any star token. -% \begin{macrocode} - \StrPosition{\LWR@origcolspec}{*}[\LWR@tempone]% -% \end{macrocode} -% -% Expand until no stars are found: -% \begin{macrocode} - \whileboolexpr{ test {\ifnumgreater{\LWR@tempone}{0}}}% - {% -% \end{macrocode} -% -% Begin with any characters to the left of the star. -% \begin{macrocode} - \setcounter{LWR@splitstarindex}{\LWR@tempone}% - \addtocounter{LWR@splitstarindex}{-1}% - \StrLeft{\LWR@origcolspec}{\value{LWR@splitstarindex}}[\LWR@expcolspec]% -% \end{macrocode} -% -% Move past the star to remember its number of copies. -% \begin{macrocode} - \addtocounter{LWR@splitstarindex}{2}% - \StrChar{\LWR@origcolspec}{\value{LWR@splitstarindex}}[\LWR@tempone]% - \setcounter{LWR@splitstarcopies}{\expandafter\@firstofone\LWR@tempone}% -% \end{macrocode} -% -% Move past the number of copies and remember the contents. -% \begin{macrocode} - \addtocounter{LWR@splitstarindex}{1}% - \StrChar{\LWR@origcolspec}{\value{LWR@splitstarindex}}[\LWR@splitstarcontents]% -% \end{macrocode} -% -% For each copy, append the contents. -% \begin{macrocode} - \ifnumgreater{\value{LWR@splitstarcopies}}{0}% - {% - \LWR@starcount=\value{LWR@splitstarcopies}% - \loop - \appto\LWR@expcolspec{% -% \end{macrocode} -% (Remove the enclosing braces.) -% \begin{macrocode} - \expandafter\@firstofone\LWR@splitstarcontents% - }% - \advance \LWR@starcount -1 - \ifnum \LWR@starcount>0 \repeat - }{}% -% \end{macrocode} + +% \begin{macro}{\LWR@expandpreamble} \marg{tabular preamble} % -% Remove any token to the left, and append the rightmost remainding tokens. -% \begin{macrocode} - \StrGobbleLeft{\LWR@origcolspec}{\value{LWR@splitstarindex}}[\colspecremainder]% - \appto{\LWR@expcolspec}{\colspecremainder}% -% \end{macrocode} +% From \pkg{array} \cs{@mkpream}. % -% Remember the final result. -% \begin{macrocode} - \edef\LWR@origcolspec{\LWR@expcolspec}% -% \end{macrocode} -% -% See if more stars exist. +% The resulting expanded preamble is stored in \cs{the}\cs{@temptokena}. +% Assign as: +% \begin{sourceverb} +% \edef\destination{\the\@temptokena} +% \end{sourceverb} % \begin{macrocode} - \StrPosition{\LWR@origcolspec}{*}[\LWR@tempone]% +\newcommand*{\LWR@expandpreamble}[1]{% + \edef\@tempa{\@temptokena={#1}}% + \@tempa% + \@tempswatrue% + \@whilesw\if@tempswa\fi{% + \@tempswafalse\the\NC@list% }% } % \end{macrocode} @@ -30522,7 +30686,7 @@ end -- not --version % \HTML\ \CSS\ cannot exactly match the \LaTeX{} concept of a baseline for % a table row. -% \trouble[tabular baselines]{tabular>baselines} +% \trouble[tabular baselines]{tabular=\env{tabular}>baselines} % \Cref{tab:baseline} shows the \LaTeX{} results for various % vertical-alignment choices, with the baseline of the first column drawn across % all the columns for comparison. @@ -30530,7 +30694,7 @@ end -- not --version % % \begin{table} % \caption{Tabular baseline\label{tab:baseline}} -% \gindex{tabular>baseline}\gindex{baseline>tabular} +% \gindex{tabular=\env{tabular}>baseline}\gindex{baseline>tabular} % \centering % \smallskip % \begin{tabular}{lp{.25in}m{.25in}b{.25in}r} @@ -30546,16 +30710,22 @@ end -- not --version % \end{tabular} % \end{table} % +% % \Cref{tab:columnconversions} describes how each kind of column is % converted to \HTML. % +% % \begin{table} % \caption{Tabular \HTML\ column conversions\label{tab:columnconversions}} -% \gindex{tabular>HTML colummn conversion} +% \gindex{tabular=\env{tabular}>HTML colummn conversion} % \gindex{HTML>tabular column conversion} % % \medskip % +% Each cell is given a \CSS\ class of \attribute{td<columntype>}. +% +% \medskip +% % \hrule % \begin{description}[parsep=.5ex] % \item [l, r, c:] Converted to table cells without paragraph tags. \\ @@ -30575,18 +30745,197 @@ end -- not --version % \item [m:] With paragraph tags, \CSS\ |vertical-align:middle|. % \item [b:] With paragraph tags, \CSS\ |vertical-align:top| so that the bottom of the % text is closest to the middle of the text line. +% \item [w and W:] Converted to |l|, |c|, or |r|. No paragraph tags. % \item [P, M, B:] Horizontally-centered versions. -% \item [S:] Converted to 'r'. Ignores optional argument. From the \pkg{siunitx} package. -% \item [D:] Converted to 'c'. From the \pkg{dcolumn} package. +% \item [S:] Treated as '|c|'. Ignores optional argument. From the \pkg{siunitx} package. +% \item [D:] Treated as '|c|'. From the \pkg{dcolumn} package. % \item [@, !, \textgreater{}, \textless{}:] One each, in that order. % \item [\textbar:] Vertical rule. -% \item [Unknown:] Converted to 'l'. -% \item [\cs{newcolumn}:] Currently treated as unknown. +% \item [Unknown:] Converted to '|l|'. +% \item [\cs{newcolumntype}:] Expands to its replacement text. +% \item [\cs{HTMLnewcolumntype}:] Provides simplified replacement text for \HTML. +% \end{description} +% \hrule +% \end{table} +% +% \Cref{tab:columnmacros} shows the various internal macros generated for +% each column type. +% +% \begin{table} +% \caption{HTML column type internal macros} +% \label{tab:columnmacros} +% \hrule +% \begin{description} +% \item[\texttt{<coltype>}:] The single-letter column type, +% such as \texttt{c} or \texttt{X}. +% \item[Created by \cs{LWR@modifycolumntype}:] Used by \pkg{lwarp} to add +% \HTML\ functionality to each built-in column type. +% \begin{description} +% \item[\cs{LWR@columntype@<coltype>}:] Handles tabular columns +% depending on the type. +% Calls \cs{LWR@parsenormalcolumn} or related, +% then advances \cs{LWR@tablecolspecindex}. +% \item[\cs{LWR@columntype@mctype@<coltype>}:] Generates the +% \cs{multicolumn} \HTML\ cell \CSS\ class. +% Calls \cs{LWR@printmccoltype@normal} or related. +% \item[\cs{LWR@columntype@mcdata@<coltype>}:] Generates the +% \cs{multicolumn} \HTML\ cell data. +% Calls \cs{LWR@printmccoldata@normal} or related. +% \end{description} +% \item[Created by \cs{newcolumntype}:] From \pkg{array}. +% \begin{description} +% \item[\cs{NC@find@<coltype>}:] Internally used to parse +% the column specifier. +% \item[\cs{NC@rewrite@<coltype>}:] Stores the print-mode replacement text. +% \end{description} +% \item[Created by \cs{HTMLnewcolumntype}:] From \pkg{lwarp}. +% \begin{description} +% \item[\cs{LWR@print@NC@rewrite@<coltype>}:] Copied +% from \cs{NC@rewrite@<type>}. +% \item[\cs{LWR@HTML@NC@rewrite@<coltype>}:] Stores the +% \HTML-mode replacement text. +% \item[\cs{NC@rewrite@<coltype>}:] Redefined to use +% the print or \HTML\ version. +% \end{description} % \end{description} % \hrule % \end{table} % % +% \begin{macro}{\LWR@modifycolumntype} +% \marg{1: column type letter} +% \marg{2: number args to ignore} +% \marg{3: csname of the cell action} +% \marg{4: csname of the multicolumn print type action} +% \marg{5: csname of the multicolumn print data action} +% +% Add \HTML\ functionality to an existing print version column type. +% +% \changes{v0.901}{2021/08/17}{Improved \cs{newcolumntype} emulation.} +% \begin{macrocode} +\newcommand*{\LWR@modifycolumntype}[5]{% + \LWR@traceinfo{LWR@modifycolumntype !#1!#2!#3!#4!#5!}% + \LWR@traceinfo{LWR@modifycolumntype #1}% + \edef\@tempa{% + \noexpand\csdef{LWR@columntype@#1}{% + \noexpand\@nameuse{#3}{#1}% + \noexpand\defaddtocounter{LWR@tablecolspecindex}{#2}% + }% + \noexpand\csdef{LWR@columntype@mctype@#1}{% + \noexpand\@nameuse{#4}{#1}% + }% + \noexpand\csdef{LWR@columntype@mcdata@#1}{% + \noexpand\@nameuse{#5}{#2}% + }% + }% + \@tempa% + \LWR@traceinfo{LWR@modifycolumntype done}% +} +% \end{macrocode} +% \end{macro} + +% \begin{macrocode} +\LWR@modifycolumntype{l}{0}{LWR@parsenormalcolumn} + {LWR@printmccoltype@normal}{LWR@printmccoldata@normal} + +\LWR@modifycolumntype{c}{0}{LWR@parsenormalcolumn} + {LWR@printmccoltype@normal}{LWR@printmccoldata@normal} + +\LWR@modifycolumntype{r}{0}{LWR@parsenormalcolumn} + {LWR@printmccoltype@normal}{LWR@printmccoldata@normal} +% \end{macrocode} +% \begin{macrocode} +\LWR@modifycolumntype{@}{0}{LWR@parseatcolumn} + {LWR@printmccoltype@ignore}{LWR@printmccoldata@other} + +\LWR@modifycolumntype{!}{0}{LWR@parsebangcolumn} + {LWR@printmccoltype@ignore}{LWR@printmccoldata@other} + +\LWR@modifycolumntype{>}{0}{LWR@parsebeforecolumn} + {LWR@printmccoltype@ignore}{LWR@printmccoldata@other} + +\LWR@modifycolumntype{<}{0}{LWR@parseaftercolumn} + {LWR@printmccoltype@ignore}{LWR@printmccoldata@other} + +\LWR@modifycolumntype{|}{0}{LWR@parsebarcolumn} + {LWR@printmccoltype@vertbar}{LWR@printmccoldata@skip} + +\LWR@modifycolumntype{:}{0}{LWR@parsecoloncolumn} + {LWR@printmccoltype@colon}{LWR@printmccoldata@skip} + +\LWR@modifycolumntype{;}{1}{LWR@parsesemicoloncolumn} + {LWR@printmccoltype@semicolon}{LWR@printmccoldata@skip} +% \end{macrocode} +% \begin{macrocode} +\LWR@modifycolumntype{p}{1}{LWR@parsenormalcolumn} + {LWR@printmccoltype@normal}{LWR@printmccoldata@paragraph} + +\LWR@modifycolumntype{m}{1}{LWR@parsenormalcolumn} + {LWR@printmccoltype@normal}{LWR@printmccoldata@paragraph} + +\LWR@modifycolumntype{b}{1}{LWR@parsenormalcolumn} + {LWR@printmccoltype@normal}{LWR@printmccoldata@paragraph} +% \end{macrocode} +% \changes{v0.56}{2018/05/10}{Added \pkg{array} \texttt{W} column.} +% \begin{macrocode} +\LWR@modifycolumntype{w}{2}{LWR@parsewcolumn} + {LWR@printmccoltype@normal}{LWR@printmccoldata@normal} + +\LWR@modifycolumntype{W}{2}{LWR@parsewcolumn} + {LWR@printmccoltype@normal}{LWR@printmccoldata@normal} +% \end{macrocode} +% A star column: +% \begin{macrocode} +\LWR@modifycolumntype{*}{2}{LWR@parsestarcolumn} + {LWR@printmccoltype@ignore}{LWR@printmccoldata@skip} +% \end{macrocode} +% +% +% +% \begin{macro}{\HTMLnewcolumntype} \marg{col type} \oarg{num args} \marg{replacement text} +% +% A user-level macro to creates an \HTML\ version +% of the replacement text for the column type. +% +% This is the equivalent to: +% \begin{sourceverb} +% \newcommand*{\LWR@HTML@NC@rewrite@<columntype>}[<num args>] +% {\NC@find <replacement text>} +% \LWR@formatted{NC@rewrite@<columntype>} +% \end{sourceverb} +% +% \changes{v0.901}{2021/08/17}{Improved \cs{newcolumntype} emulation.} +% \begin{macrocode} +\NewDocumentCommand{\HTMLnewcolumntype}{m O{0} m}{% + \expandafter\newcommand\expandafter*% + \csname LWR@HTML@NC@rewrite@#1\endcsname[#2]{\NC@find #3}% + \LWR@formatted{NC@rewrite@#1}% +} +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +\end{warpHTML} +% \end{macrocode} +% +% \codeprint +% \begin{macrocode} +\begin{warpprint} +% \end{macrocode} +% +% \begin{macrocode} +\NewDocumentCommand{\HTMLnewcolumntype}{m O{0} m}{} +% \end{macrocode} +% +% \begin{macrocode} +\end{warpprint} +% \end{macrocode} +% +% \codehtml +% \begin{macrocode} +\begin{warpHTML} +% \end{macrocode} +% % % \begin{macro}{\LWR@parsetablecols} \marg{colspecs} % @@ -30621,7 +30970,8 @@ end -- not --version % % Expand any star columns: % \begin{macrocode} - \expandcolspec% + \LWR@expandpreamble{\LWR@origcolspec}% + \edef\LWR@origcolspec{\the\@temptokena}% % \end{macrocode} % % The parsed column spec data array, |LWR@tablecolspec|, @@ -30650,6 +31000,9 @@ end -- not --version \LWR@setexparray{LWR@colbarspec}{1}{}% \LWR@setexparray{LWR@colbarspec}{2}{}% \LWR@setexparray{LWR@colbarspec}{3}{}% + \LWR@setexparray{LWR@coladdclass}{1}{}% + \LWR@setexparray{LWR@coladdclass}{2}{}% + \LWR@setexparray{LWR@coladdclass}{3}{}% % \end{macrocode} % Starting at the first column specification: % \begin{macrocode} @@ -30703,70 +31056,18 @@ end -- not --version {% not an optional tabular argument % \end{macrocode} % Not inside an optional argument, so consider the column type: +% \changes{v0.901}{2021/08/12}{Improved \cs{newcolumntype} emulation.} % \begin{macrocode} - \IfStrEq{\LWR@strresult}{l}{\LWR@parsenormalcolumn{l}}{}% - \IfStrEq{\LWR@strresult}{c}{\LWR@parsenormalcolumn{c}}{}% - \IfStrEq{\LWR@strresult}{r}{\LWR@parsenormalcolumn{r}}{}% - \IfStrEq{\LWR@strresult}{L}{\LWR@parsenormalcolumn{l}}{}% - \IfStrEq{\LWR@strresult}{C}{\LWR@parsenormalcolumn{c}}{}% - \IfStrEq{\LWR@strresult}{R}{\LWR@parsenormalcolumn{r}}{}% - \IfStrEq{\LWR@strresult}{J}{\LWR@parsenormalcolumn{l}}{}% -% \end{macrocode} -% \begin{macrocode} - \IfStrEq{\LWR@strresult}{S}{\LWR@parsenormalcolumn{c}}{}% - \IfStrEq{\LWR@strresult}{s}{\LWR@parsenormalcolumn{c}}{}% -% \end{macrocode} -% \begin{macrocode} - \IfStrEq{\LWR@strresult}{\detokenize{@}}{\LWR@parseatcolumn}{}% - \IfStrEq{\LWR@strresult}{!}{\LWR@parsebangcolumn}{}% - \IfStrEq{\LWR@strresult}{>}{\LWR@parsebeforecolumn}{}% - \IfStrEq{\LWR@strresult}{<}{\LWR@parseaftercolumn}{}% - \IfStrEq{\LWR@strresult}{|}{\LWR@parsebarcolumn}{}% - \IfStrEq{\LWR@strresult}{:}{\LWR@parsecoloncolumn}{}% - \IfStrEq{\LWR@strresult}{;}{\LWR@parsesemicoloncolumn}{}% -% \end{macrocode} -% \begin{macrocode} - \IfStrEq{\LWR@strresult}{p}{\LWR@parsepcolumn{p}}{}% - \IfStrEq{\LWR@strresult}{m}{\LWR@parsepcolumn{m}}{}% - \IfStrEq{\LWR@strresult}{b}{\LWR@parsepcolumn{b}}{}% -% \end{macrocode} -% \changes{v0.56}{2018/05/10}{Added \pkg{array} \texttt{W} column.} -% \begin{macrocode} - \IfStrEq{\LWR@strresult}{w}{\LWR@parsewcolumn}{}% - \IfStrEq{\LWR@strresult}{W}{\LWR@parsewcolumn}{}% -% \end{macrocode} -% A star column: -% \begin{macrocode} - \IfStrEq{\LWR@strresult}{*}{\LWR@parsestarcolumn}{}% -% \end{macrocode} -% From the \pkg{dcolumn} package: -% \begin{macrocode} - \IfStrEq{\LWR@strresult}{D}{\LWR@parseDcolumn{c}}{}% -% \end{macrocode} -% From the \pkg{tabularx} package. -% X column has no parameter, but will be given paragraph tags. -% \begin{macrocode} - \IfStrEq{\LWR@strresult}{X}{\LWR@parsenormalcolumn{X}}{}% -% \end{macrocode} -% \begin{docsidebar} -% \raggedright -% Many people define centered versions ``|P|'', ``|M|'', and ``|B|'': -% \begin{Verbatim}[tabsize=4,gobble=2] -% \newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}} -% \end{Verbatim} -% \vspace{-\baselineskip} -% \end{docsidebar} -% \begin{macrocode} - \IfStrEq{\LWR@strresult}{P}{\LWR@parsepcolumn{P}}{}% - \IfStrEq{\LWR@strresult}{M}{\LWR@parsepcolumn{M}}{}% - \IfStrEq{\LWR@strresult}{B}{\LWR@parsepcolumn{B}}{}% + \ifcsdef{LWR@columntype@\LWR@strresult}% + {\csuse{LWR@columntype@\LWR@strresult}}% + {}% % \end{macrocode} -% If this column was an invalid column type, convert it to an |l| column: +% If an unknown column type, use |l|: % \begin{macrocode} - \ifbool{LWR@validtablecol}{}{% - \LWR@traceinfo{invalid column type: \LWR@strresult}% - \LWR@parsenormalcolumn{l}% - }% + \ifbool{LWR@validtablecol}{}{% + \LWR@traceinfo{invalid column type: \LWR@strresult}% + \LWR@parsenormalcolumn{l}% + }% }% not an optional column argument % \end{macrocode} % If read the closing bracket, no longer inside the optional argument: @@ -30985,8 +31286,8 @@ end -- not --version % Create an empty cell if muting for the \cs{bottomrule}: % \begin{macrocode} \ifboolexpr{bool{LWR@tabularmutemods} or bool{LWR@emptyatbang}}% - {}% - {\LWR@atbangspec}% + {}% + {\LWR@atbangspec}% % \LWR@htmltag{/td}\LWR@orignewline% \global\booltrue{LWR@tabularcelladded}% @@ -31022,7 +31323,7 @@ end -- not --version -% \subsection{Data opening tag} +% \subsection{Cell opening tag} % \begin{macro}{\LWR@thiscolspec} Temporary storage. @@ -31045,20 +31346,24 @@ end -- not --version \LWR@traceinfo{LWR@tabledatasinglecolumntag}% \LWR@maybenewtablerow% % \end{macrocode} +% % Don't start a new paragraph tag if have already started one: % \begin{macrocode} \ifbool{LWR@intabularmetadata}% {% % \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} \LWR@tabularleftedge% % \end{macrocode} +% % Fetch the current column's alignment character into \cs{LWR@strresult}: % \changes{v0.60}{2018/09/17}{\env{tabular}: Improved memory management: Not using \pkg{xstring}.} % \begin{macrocode} @@ -31066,6 +31371,7 @@ end -- not --version \LWR@getexparray{LWR@tablecolspec}{\arabic{LWR@tableLaTeXcolindex}}% }% % \end{macrocode} +% % Print the start of a new table data cell: % \changes{v0.895}{2021/01/14}{Improved \HTML\ quotes.} % \begin{macrocode} @@ -31073,18 +31379,32 @@ end -- not --version \LWR@htmltag{% td class=\textquotedbl{}td% % \end{macrocode} +% % Append this column's spec: % \begin{macrocode} \LWR@strresult% % \end{macrocode} +% % If this column has a cmidrule, add ``rule'' to the end of the \HTML\ class tag. % Also add vertical bar tags. % \begin{macrocode} \LWR@addcmidruletrim% \LWR@addleftmostbartag% \LWR@printbartag{\arabic{LWR@tableLaTeXcolindex}}% +% \end{macrocode} +% +% Add any tabular |>| column text alignment or font control \CSS: +% \changes{v0.901}{2021/08/20}{Tabular cell text alignment.} +% \begin{macrocode} + \LWR@getexparray{LWR@coladdclass}% + {\arabic{LWR@tableLaTeXcolindex}}% +% \end{macrocode} +% +% Close the class description: +% \begin{macrocode} \textquotedbl{}% % \end{macrocode} +% % Add styles for rules, alignment: % \changes{v0.42}{2017/10/26}{If \progcode{FormatWP} add cell alignment.} % \begin{macrocode} @@ -31092,6 +31412,7 @@ end -- not --version \LWR@addcmidrulewidth% \LWR@addcdashline% % \end{macrocode} +% % \changes{v0.60}{2018/09/17}{\env{tabular}: Improved memory management: Not using \pkg{xstring}.} % \begin{macrocode} \xdef\LWR@thiscolspec{% @@ -31100,27 +31421,26 @@ end -- not --version }% \LWR@addformatwpalignment{\LWR@thiscolspec}% % \end{macrocode} +% % Add styles for cell and rule colors: % \changes{v0.48}{2018/02/08}{\pkg{colortbl}: Added.} % \begin{macrocode} \LWR@addtabularrowcolor% \LWR@addtabularrulecolors% % \end{macrocode} +% % \begin{macrocode} \LWR@tdendstyles% }% HTML td \LWR@traceinfo{LWR@tabledatasinglecolumntag: done printing td tag}% % \end{macrocode} +% % If this is a |p|, |m|, |b|, or X column, allow paragraphs: % \begin{macrocode} \ifboolexpr{% test{ \ifdefstring{\LWR@strresult}{p} } or test{ \ifdefstring{\LWR@strresult}{m} } or - test{ \ifdefstring{\LWR@strresult}{b} } or - test{ \ifdefstring{\LWR@strresult}{P} } or - test{ \ifdefstring{\LWR@strresult}{M} } or - test{ \ifdefstring{\LWR@strresult}{B} } or - test{ \ifdefstring{\LWR@strresult}{X} } + test{ \ifdefstring{\LWR@strresult}{b} } }% {% allow pars \LWR@traceinfo{LWR@tabledatasinglecolumntag: about to LWR@startpars}% @@ -31130,6 +31450,7 @@ end -- not --version }% allow pars {}% no pars % \end{macrocode} +% % Print the |>| contents unless muted for the \cs{bottomrule}: % \begin{macrocode} \ifboolexpr{bool{LWR@tabularmutemods} or bool{LWR@emptyatbang}}% @@ -31503,7 +31824,8 @@ end -- not --version % \end{macrocode} % \end{macro} -% \begin{macro}{\LWR@addformatwpalignment} +% \begin{macro}{\LWR@addformatwpalignment} \marg{colspec} +% % If |FormatWP|, adds a \attribute{style} for the alignment. % % Must be placed between \cs{LWR@tdstartstyles} and \cs{LWR@tdendstyles}. @@ -31520,9 +31842,6 @@ end -- not --version \IfSubStr{#1}{p}{\LWR@WPcell{left}{bottom}}{}% \IfSubStr{#1}{m}{\LWR@WPcell{left}{middle}}{}% \IfSubStr{#1}{b}{\LWR@WPcell{left}{top}}{}% - \IfSubStr{#1}{P}{\LWR@WPcell{center}{bottom}}{}% - \IfSubStr{#1}{M}{\LWR@WPcell{center}{middle}}{}% - \IfSubStr{#1}{B}{\LWR@WPcell{center}{top}}{}% }{}% } % \end{macrocode} @@ -31750,96 +32069,106 @@ end -- not --version % \subsubsection{Parsing multicolumns} +% \begin{macro}{\LWR@printmccoltype@normal} \marg{col type} +% +% Prints the column type, and remembers that any vertical bars +% are no longer on the left edge. +% \begin{macrocode} +\newcommand*{\LWR@printmccoltype@normal}[1]{% + #1% + \boolfalse{LWR@mcolvertbaronleft}% +} +% \end{macrocode} +% \end{macro} + + +% \begin{macro}{\LWR@printmccoltype@ignore} \marg{col type} +% +% This type does not print a multi-column data cell. +% \begin{macrocode} +\newcommand*{\LWR@printmccoltype@ignore}[1]{}% +% \end{macrocode} +% \end{macro} + + +% \begin{macro}{\LWR@printmccoltype@vertbar} \marg{col type} +% +% Adds a left or right vertical bar. +% \begin{macrocode} +\newcommand*{\LWR@printmccoltype@vertbar}[1]{% + \ifbool{LWR@mcolvertbaronleft}% + {\defaddtocounter{LWR@mcolvertbarsl}{1}}% left edge + {\defaddtocounter{LWR@mcolvertbarsr}{1}}% not left edge +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\LWR@printmccoltype@colon} \marg{col type} +% +% Adds a left or right vertical bar. +% \begin{macrocode} +\newcommand*{\LWR@printmccoltype@colon}[1]{% + \ifbool{LWR@mcolvertbaronleft}% + {\defaddtocounter{LWR@mcolvertbarsldash}{1}}% left edge + {\defaddtocounter{LWR@mcolvertbarsrdash}{1}}% not left edge +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\LWR@printmccoltype@semicolon} \marg{col type} +% +% Adds a left or right vertical bar. +% \begin{macrocode} +\let\LWR@printmccoltype@semicolon\LWR@printmccoltype@colon +% \end{macrocode} +% \end{macro} + + % \begin{macro}{\LWR@printmccoltype} \marg{colspec} % 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|. +% +% \cs{LWR@columntype@mctype@<type>} is defined by \cs{LWR@modifycolumntype}. % \begin{macrocode} \newcommand*{\LWR@printmccoltype}[1]{% \LWR@traceinfo{lwr@printmccoltype -#1-}% % \end{macrocode} +% % Get one token of the column spec: % \begin{macrocode} \StrChar{#1}{\arabic{LWR@tablemulticolspos}}[\LWR@strresult]% % \end{macrocode} -% Add to the \HTML\ tag depending on which column type is found: -% \begin{macrocode} - \IfStrEq{\LWR@strresult}{l}{l}{}% - \IfStrEq{\LWR@strresult}{c}{c}{}% - \IfStrEq{\LWR@strresult}{r}{r}{}% - \IfStrEq{\LWR@strresult}{p}{p}{}% - \IfStrEq{\LWR@strresult}{m}{m}{}% - \IfStrEq{\LWR@strresult}{b}{b}{}% - \IfStrEq{\LWR@strresult}{P}{P}{}% - \IfStrEq{\LWR@strresult}{M}{M}{}% - \IfStrEq{\LWR@strresult}{B}{B}{}% -% \end{macrocode} -% \changes{v0.56}{2018/05/10}{Added \pkg{array} \texttt{W} column.} -% \begin{macrocode} - \IfStrEq{\LWR@strresult}{w}{w}{}% - \IfStrEq{\LWR@strresult}{W}{W}{}% -% \end{macrocode} -% \begin{macrocode} - \IfStrEq{\LWR@strresult}{S}{c}{}% - \IfStrEq{\LWR@strresult}{s}{c}{}% -% \end{macrocode} +% +% Detokenize to avoid problems with special characters: % \begin{macrocode} - \IfStrEq{\LWR@strresult}{X}{p}{}% + \edef\LWR@strresult{\detokenize\expandafter{\LWR@strresult}}% % \end{macrocode} -% \changes{v0.43}{2017/11/07}{Added vertical rules.} -% \changes{v0.56}{2018/04/30}{Adds support for double vertical rules.} -% \changes{v0.56}{2018/05/05}{Adds support for dashed vertical rules.} +% +% Add to the \HTML\ tag depending on which column type is found: +% \changes{v0.901}{2021/08/17}{Improved \cs{newcolumntype} emulation.} +% % \begin{macrocode} - \IfStrEq{\LWR@strresult}{|}% - {% - \ifbool{LWR@mcolvertbaronleft}% - {\defaddtocounter{LWR@mcolvertbarsl}{1}}% left edge - {\defaddtocounter{LWR@mcolvertbarsr}{1}}% not left edge - }% - {% - \IfStrEq{\LWR@strresult}{:}% - {% - \ifbool{LWR@mcolvertbaronleft}% - {\defaddtocounter{LWR@mcolvertbarsldash}{1}}% left edge - {\defaddtocounter{LWR@mcolvertbarsrdash}{1}}% not left edge - }% - {% - \IfStrEq{\LWR@strresult}{;}% - {% - \ifbool{LWR@mcolvertbaronleft}% - {\defaddtocounter{LWR@mcolvertbarsldash}{1}}% left edge - {\defaddtocounter{LWR@mcolvertbarsrdash}{1}}% not left edge - }% - {\boolfalse{LWR@mcolvertbaronleft}}% - }% - }% + \ifcsdef{LWR@columntype@mctype@\LWR@strresult}% + {\csuse{LWR@columntype@mctype@\LWR@strresult}}% + {\boolfalse{LWR@mcolvertbaronleft}}% \LWR@traceinfo{lwr@printmccoltype done}% } % \end{macrocode} % \end{macro} -% \begin{macro}{\LWR@multicolpartext} \marg{num parameters} -% Print the data with paragraph tags, advance to bypass the given number of parameters. -% \changes{v0.56}{2018/05/12}{Fix: \cs{multicolumn} parameters.} -% \begin{macrocode} -\newcommand*{\LWR@multicolpartext}[1]{% - \LWR@startpars% - \LWR@multicoltext% - \defaddtocounter{LWR@tablemulticolspos}{#1}% - \LWR@stoppars% -} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\LWR@multicolother} \marg{colspec} +% \begin{macro}{\LWR@printmccoldata@other} \marg{num args to skip} \marg{entire colspec} +% % For |@|, |!|, |>|, |<|, print the next token without paragraph tags: % \begin{macrocode} -\newcommand*{\LWR@multicolother}[1]{% +\newcommand*{\LWR@printmccoldata@other}[2]{% \defaddtocounter{LWR@tablemulticolspos}{1}% - \StrChar{#1}{\arabic{LWR@tablemulticolspos}}[\LWR@strresult]% + \StrChar{#2}{\arabic{LWR@tablemulticolspos}}[\LWR@strresult]% \LWR@strresult% % \end{macrocode} +% % A valid column data type was found: % \begin{macrocode} \booltrue{LWR@validtablecol}% @@ -31847,11 +32176,14 @@ end -- not --version % \end{macrocode} % \end{macro} -% \begin{macro}{\LWR@multicolskip} +% \begin{macro}{\LWR@printmccoldata@skip} \marg{num args to skip} \marg{entire colspec} +% % Nothing to print for this column type. % \begin{macrocode} -\newcommand*{\LWR@multicolskip}{% +\newcommand*{\LWR@printmccoldata@skip}[2]{% + \defaddtocounter{LWR@tablemulticolspos}{#1}% % \end{macrocode} +% % A valid column data type was found: % \begin{macrocode} \booltrue{LWR@validtablecol}% @@ -31859,74 +32191,73 @@ end -- not --version % \end{macrocode} % \end{macro} -% \begin{macro}{\LWR@printmccoldata} \marg{colspec} + +% For \cs{LWR@printmccoldata@...>}, \marg{num args to skip} is provided by +% \cs{LWR@columntype@mcdata@<coltype>} when it was defined by +% \cs{LWR@modifycolumntype}. +% \cs{entire colspec} is provided by \cs{LWR@printmccoldata} when it uses +% \cs{LWR@columntype@mcdata@<coltype>}. + +% \begin{macro}{\LWR@printmccoldata@normal} \marg{num args to skip} \marg{entire colspec} +% \begin{macrocode} +\newcommand*{\LWR@printmccoldata@normal}[2]{% + \LWR@multicoltext% + \defaddtocounter{LWR@tablemulticolspos}{#1}% +} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\LWR@printmccoldata@paragraph} \marg{num args to skip} \marg{entire colspec} +% \begin{macrocode} +\newcommand*{\LWR@printmccoldata@paragraph}[2]{% + \LWR@startpars% + \LWR@multicoltext% + \defaddtocounter{LWR@tablemulticolspos}{#1}% + \LWR@stoppars% +} +% \end{macrocode} +% \end{macro} + + +% \begin{macro}{\LWR@printmccoldata} \marg{entire colspec} +% % Print the data for any valid column type found. % % \changes{v0.22}{2017/02/28}{Added tabular \progcode{D}, \progcode{!!}, % and \progcode{X} columns.} % % \changes{v0.23}{2017/03/02}{Fix for vert bar column type.} +% \changes{v0.901}{2021/08/17}{Improved \cs{newcolumntype} emulation.} % % \begin{macrocode} \newcommand*{\LWR@printmccoldata}[1]{% \LWR@traceinfo{lwr@printmccoldata -#1}% % \end{macrocode} +% % Not yet found a valid column type: % \begin{macrocode} \boolfalse{LWR@validtablecol}% % \end{macrocode} +% % Get one token of the column spec, into a local copy in case nested. % \begin{macrocode} \StrChar{#1}{\arabic{LWR@tablemulticolspos}}[\LWR@strresult]% \edef\LWR@printmccoldatatoken{\LWR@strresult}% % \end{macrocode} +% % Print the text depending on which column type is found. % Also handles |@|, |>|, |<| as it comes to them. % \begin{macrocode} - \IfStrEq{\LWR@printmccoldatatoken}{l}{\LWR@multicoltext}{}% - \IfStrEq{\LWR@printmccoldatatoken}{c}{\LWR@multicoltext}{}% - \IfStrEq{\LWR@printmccoldatatoken}{r}{\LWR@multicoltext}{}% - \IfStrEq{\LWR@printmccoldatatoken}{D}{% - \defaddtocounter{LWR@tablemulticolspos}{3}% skip parameters - \LWR@multicoltext% - }{}% -% \end{macrocode} -% \changes{v0.56}{2018/05/12}{Fix: \cs{multicolumn} parameters.} -% \changes{v0.72}{2019/06/07}{Fix: \cs{multicolumn} parameters.} -% \begin{macrocode} - \IfStrEq{\LWR@printmccoldatatoken}{p}{\LWR@multicolpartext{2}}{}% - \IfStrEq{\LWR@printmccoldatatoken}{m}{\LWR@multicolpartext{2}}{}% - \IfStrEq{\LWR@printmccoldatatoken}{b}{\LWR@multicolpartext{2}}{}% - \IfStrEq{\LWR@printmccoldatatoken}{P}{\LWR@multicolpartext{2}}{}% - \IfStrEq{\LWR@printmccoldatatoken}{M}{\LWR@multicolpartext{2}}{}% - \IfStrEq{\LWR@printmccoldatatoken}{B}{\LWR@multicolpartext{2}}{}% -% \end{macrocode} -% \changes{v0.56}{2018/05/10}{Added \pkg{array} \texttt{W} column.} -% \begin{macrocode} - \IfStrEq{\LWR@printmccoldatatoken}{w}{\LWR@multicolpartext{3}}{}% - \IfStrEq{\LWR@printmccoldatatoken}{W}{\LWR@multicolpartext{3}}{}% -% \end{macrocode} -% \begin{macrocode} - \IfStrEq{\LWR@printmccoldatatoken}{S}{\LWR@multicoltext}{}% - \IfStrEq{\LWR@printmccoldatatoken}{s}{\LWR@multicoltext}{}% -% \end{macrocode} -% \begin{macrocode} - \IfStrEq{\LWR@printmccoldatatoken}{X}{\LWR@multicolpartext{1}}{}% - \IfStrEq{\LWR@printmccoldatatoken}{|}{\LWR@multicolskip}{}% - \IfStrEq{\LWR@printmccoldatatoken}{:}{\LWR@multicolskip}{}% - \IfStrEq{\LWR@printmccoldatatoken}{;}{% - \LWR@multicolskip% - \defaddtocounter{LWR@tablemulticolspos}{1}% skip parameter - }{}% - \IfStrEq{\LWR@printmccoldatatoken}{\detokenize{@}}{\LWR@multicolother{#1}}{}% - \IfStrEq{\LWR@printmccoldatatoken}{\detokenize{!}}{\LWR@multicolother{#1}}{}% - \IfStrEq{\LWR@printmccoldatatoken}{\detokenize{>}}{\LWR@multicolother{#1}}{}% - \IfStrEq{\LWR@printmccoldatatoken}{\detokenize{<}}{\LWR@multicolother{#1}}{}% + \ifcsdef{LWR@columntype@mcdata@\LWR@printmccoldatatoken}% + {\csuse{LWR@columntype@mcdata@\LWR@printmccoldatatoken}{#1}}% + {}% % \end{macrocode} -% If an invalid column type: +% +% If an unknown column type, print the text: % \begin{macrocode} \ifbool{LWR@validtablecol}{}{\LWR@multicoltext{}}% % \end{macrocode} +% % Tracing: % \begin{macrocode} \LWR@traceinfo{lwr@printmccoldata done}% @@ -31938,7 +32269,7 @@ end -- not --version % \begin{macro}{\parsemulticolumnalignment} -% \marg{1: colspec} \marg{2: printresults} +% \marg{1: colspec} \marg{2: printresults csname} % % Scan the multicolumn specification and execute the printfunction % for each entry. @@ -31951,6 +32282,7 @@ end -- not --version \StrLen{#1}[\LWR@strresult]% \defcounter{LWR@tablemulticolswidth}{\LWR@strresult}% % \end{macrocode} +% % Scan across the tokens in the column spec: % \begin{macrocode} \whileboolexpr{% @@ -31961,10 +32293,12 @@ end -- not --version }% {% % \end{macrocode} +% % Execute the assigned print function for each token in the column spec: % \begin{macrocode} - #2{#1}% + \csuse{#2}{#1}% % \end{macrocode} +% % Move to the next token in the column spec: % \begin{macrocode} \defaddtocounter{LWR@tablemulticolspos}{1}% @@ -32052,7 +32386,8 @@ end -- not --version \NewDocumentCommand{\LWR@domulticolumn}{o o m m m +m}{% \LWR@traceinfo{LWR@domulticolumn -#1- -#2- -#4- -#5-}% % \end{macrocode} -% Remember the text to be inserted, and +% +% Remember the text to be inserted, and when used % remember that a valid column type was found: % \begin{macrocode} \renewcommand{\LWR@multicoltext}{% @@ -32060,6 +32395,13 @@ end -- not --version \booltrue{LWR@validtablecol}% }% % \end{macrocode} +% +% Expand the preamble and save it. +% \begin{macrocode} + \LWR@expandpreamble{#5}% + \edef\LWR@origmccolspec{\the\@temptokena}% +% \end{macrocode} +% % Compute the rightmost column to be included. % This is used to create the right trim. % \changes{v0.43}{2017/11/07}{Fix: Multicolumn trim.} @@ -32068,10 +32410,12 @@ end -- not --version \defaddtocounter{LWR@lastmulticolumn}{#3}% \defaddtocounter{LWR@lastmulticolumn}{-1}% % \end{macrocode} +% % Row processing: % \begin{macrocode} \LWR@maybenewtablerow% % \end{macrocode} +% % Begin the opening table data tag: % \changes{v0.895}{2021/01/14}{Improved \HTML\ quotes.} % \begin{macrocode} @@ -32090,6 +32434,7 @@ end -- not --version % \begin{macrocode} class=\textquotedbl{}td% % \end{macrocode} +% % Print the column type and vertical bars: % \begin{macrocode} \defcounter{LWR@mcolvertbarsl}{0}% @@ -32097,8 +32442,9 @@ end -- not --version \defcounter{LWR@mcolvertbarsldash}{0}% \defcounter{LWR@mcolvertbarsrdash}{0}% \booltrue{LWR@mcolvertbaronleft}% - \LWR@parsemulticolumnalignment{#5}{\LWR@printmccoltype}% + \LWR@parsemulticolumnalignment{\LWR@origmccolspec}{LWR@printmccoltype}% % \end{macrocode} +% % If this column has a cmidrule, add ``rule'' to the end of the \HTML\ class tag. % % If this position had a ``Y'' then add ``rule'' for a horizontal rule: @@ -32114,6 +32460,7 @@ end -- not --version {\arabic{LWR@lastmulticolumn}}% }% % \end{macrocode} +% % Also add vertical bar class. % \changes{v0.41}{2017/10/07}{Added vertical rules.} % \changes{v0.43}{2017/11/07}{Fix for vertical rules.} @@ -32131,11 +32478,13 @@ end -- not --version \ifnumcomp{\value{LWR@mcolvertbarsrdash}}{>}{1}% { tvertbarrdoubledash}{}% % \end{macrocode} +% % Close the class tag's opening quote: % \changes{v0.895}{2021/01/14}{Improved \HTML\ quotes.} % \begin{macrocode} \textquotedbl{}% % \end{macrocode} +% % \changes{v0.42}{2017/10/26}{If \progcode{FormatWP} add cell alignment.} % \begin{macrocode} \LWR@tdstartstyles% @@ -32163,17 +32512,18 @@ end -- not --version % \begin{macrocode} \LWR@addtabularrowcolor% % \end{macrocode} +% % Other styles: % \begin{macrocode} \LWR@addcmidrulewidth% \LWR@addcdashline% \LWR@addtabularhrulecolor% \LWR@addmulticolvertrulecolor% - \LWR@addformatwpalignment{#5}% + \LWR@addformatwpalignment{\LWR@origmccolspec}% \LWR@tdendstyles% }% end of the opening table data tag \boolfalse{LWR@intabularmetadata}% - \LWR@parsemulticolumnalignment{#5}{\LWR@printmccoldata}% + \LWR@parsemulticolumnalignment{\LWR@origmccolspec}{LWR@printmccoldata}% } % \end{macrocode} % \end{macro} @@ -32228,6 +32578,7 @@ end -- not --version \NewDocumentCommand{\LWR@longtabledatacaptiontag}{s o +m} {% % \end{macrocode} +% % Remember the latest name for \cs{nameref}: % \begin{macrocode} \IfValueTF{#2}{% optional given? @@ -32237,6 +32588,7 @@ end -- not --version }% optional given {\LWR@setlatestname{#3}}% no optional % \end{macrocode} +% % Create a multicolumn across all the columns: % % Figure out how many extra \HTML\ columns to add for |@| and |!| columns @@ -32244,14 +32596,16 @@ end -- not --version % \begin{macrocode} \LWR@tabularhtmlcolumns{1}{\arabic{LWR@tabletotalLaTeXcols}}% % \end{macrocode} -% Create the multicolumn tag: +% +% Create the multicolumn tag. The caption will be centered by the \CSS\ caption class. % \begin{macrocode} \LWR@domulticolumn{\arabic{LWR@tabletotalLaTeXcols}}% {\arabic{LWR@tabhtmlcoltotal}}% - {P}% + {p}% {% \LWR@domulticolumn \IfBooleanTF{#1}% star? % \end{macrocode} +% % Star version, show a caption but do not make a LOT entry: % \begin{macrocode} {% yes star @@ -32261,6 +32615,7 @@ end -- not --version }% {% No star: % \end{macrocode} +% % Not the star version: % % Don't step the counter if |\caption[]{A caption.}| @@ -32277,6 +32632,7 @@ end -- not --version }% }{}% % \end{macrocode} +% % Create an \HTML\ caption. Afterwards, maybe make a LOT entry. % \begin{macrocode} \LWR@figcaption% @@ -32285,19 +32641,23 @@ end -- not --version \LWR@isolate{#3}% \endLWR@figcaption% % \end{macrocode} +% % See if an optional caption was given: % \begin{macrocode} \ifblank{#2}% TOC entry empty % \end{macrocode} +% % if the optional caption was given, but empty, do not form a \TOC\ entry % \begin{macrocode} {}% % \end{macrocode} +% % If the optional caption was given, but might only be |[]|: % \begin{macrocode} {% TOC entry not empty \IfNoValueTF{#2}% No TOC entry? % \end{macrocode} +% % The optional caption is |[]|: % \begin{macrocode} {% No TOC entry @@ -32311,6 +32671,7 @@ end -- not --version }% }% end of No TOC entry % \end{macrocode} +% % The optional caption has text enclosed: % \begin{macrocode} {% yes TOC entry @@ -32326,6 +32687,7 @@ end -- not --version }% 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}% @@ -38123,7 +38485,7 @@ end -- not --version % the environment's contents which % were automatically captured by the \AmS{} environment. % -% For \brand{MathJax}: Each environment is syched with \LaTeX's equation numbers, +% For \brand{MathJax}: Each environment is synched with \LaTeX's equation numbers, % typeset with \LaTeX\ inside an \HTML\ comment, then % printed to \HTML\ output for \brand{MathJax} to process. % @@ -39527,6 +39889,19 @@ end -- not --version % \end{macrocode} % \end{environment} + +% \pkg{xcolor} is known to have been loaded, and provided +% \HTML\ versions of the following, and the print versions are provide above, +% so now they may be \cs{LW@formatted}. +% \changes{v0.901}{2021/08/20}{\pkg{xcolor}: Moved \cs{LWR@formatted}.} +% \begin{macrocode} +\LWR@formatted{colorbox} +\LWR@formatted{colorboxBlock} +\LWR@formatted{fcolorbox} +\LWR@formatted{fcolorboxBlock} +\LWR@formattedenv{fcolorminipage} +% \end{macrocode} + % \begin{macrocode} \LWR@traceinfo{xcolor patches done} }{}% xcolor loaded @@ -40530,6 +40905,7 @@ color:\LWR@origpound\LWR@tempcolor% % \begin{macro}{\texteb} \marg{text} \qquad From \pkg{nfssext-cfr}. % \changes{v0.72}{2019/05/26}{\pkg{nfssext-cfr}: Added.} % \begin{macrocode} +\@ifpackageloaded{nfssext-cfr}{ \DeclareRobustCommand{\LWR@HTML@texteb}[1]{% {% \LWR@HTML@ebweight% @@ -40538,6 +40914,9 @@ color:\LWR@origpound\LWR@tempcolor% } \LWR@formatted{texteb} +}{% if not loaded + \providerobustcmd{\texteb}[1]{} +} % \end{macrocode} % \end{macro} @@ -40545,6 +40924,7 @@ color:\LWR@origpound\LWR@tempcolor% % \begin{macro}{\textlg} \marg{text} \qquad From \pkg{nfssext-cfr}. % \changes{v0.72}{2019/05/26}{\pkg{nfssext-cfr}: Added.} % \begin{macrocode} +\@ifpackageloaded{nfssext-cfr}{ \DeclareRobustCommand{\LWR@HTML@textlg}[1]{% {% \LWR@HTML@lgweight% @@ -40553,6 +40933,9 @@ color:\LWR@origpound\LWR@tempcolor% } \LWR@formatted{textlg} +}{% if not loaded + \providerobustcmd{\textlg}[1]{} +} % \end{macrocode} % \end{macro} @@ -40830,22 +41213,26 @@ color:\LWR@origpound\LWR@tempcolor% % \begin{macro}{\ebweight} From \pkg{nfssext-cfr}. % \changes{v0.72}{2019/05/26}{\pkg{nfssext-cfr}: Added.} % \begin{macrocode} +\@ifpackageloaded{nfssext-cfr}{ \newrobustcmd*{\LWR@HTML@ebweight}{% \LWR@print@ebweight% \renewcommand*{\LWR@f@series}{eb}% } \LWR@formatted{ebweight} +}{} % \end{macrocode} % \end{macro} % \begin{macro}{\lgweight} From \pkg{nfssext-cfr}. % \changes{v0.72}{2019/05/26}{\pkg{nfssext-cfr}: Added.} % \begin{macrocode} +\@ifpackageloaded{nfssext-cfr}{ \newrobustcmd*{\LWR@HTML@lgweight}{% \LWR@print@lgweight% \renewcommand*{\LWR@f@series}{lg}% } \LWR@formatted{lgweight} +}{} % \end{macrocode} % \end{macro} @@ -42111,6 +42498,34 @@ color:\LWR@origpound\LWR@tempcolor% % \end{macrocode} + +% \section{Loading \pkg{array}} +% +% \pkg{array} is required for \pkg{lwarp}'s column parsing. +% It and its patches are now loaded. +% +% \changes{v0.901}{2021/08/19}{\pkg{array}: Now required.} +% +% \codehtml +% \begin{macrocode} +\begin{warpHTML} +\RequirePackage{array} +% \end{macrocode} +% +% The following are compared with the tabular preamble |>| to add \CSS\ classes +% to adjust tabular cells. +% Defined here now that \cs{arraybackslash} is defined after \pkg{array} is loaded. +% \begin{macrocode} +\edef\LWR@detect@centeringarraybackslash{\centering\arraybackslash} +\edef\LWR@detect@raggedrightarraybackslash{\raggedright\arraybackslash} +\edef\LWR@detect@raggedleftarraybackslash{\raggedleft\arraybackslash} +\def\LWR@detect@itshape{\itshape} +\def\LWR@detect@bfseries{\bfseries} +\def\LWR@detect@bfit{\bfseries\itshape} +\end{warpHTML} +% \end{macrocode} + + % \section{Loading \pkg{everyshi} patches} % % \pkg{everyshi} is emulated by the \LaTeX\ core, so its patches are loaded @@ -42594,6 +43009,7 @@ color:\LWR@origpound\LWR@tempcolor% {Keys/values are ignored in MathJax.\MessageBreak \protect\Cdots, etc. do not span multiple cells.\MessageBreak AutoNiceMatrix, etc. are not supported for MathJax.\MessageBreak + \protect\CodeBefore\space cannot be done with MathJax.\MessageBreak \LWR@forceSVGmessage{nicematrix}% } \LWR@nomathjaxwarn{pb-diagram} @@ -44981,14 +45397,25 @@ color:\LWR@origpound\LWR@tempcolor% % % \codehtml % -% Remove the default nullfied macros: +% If \pkg{array} is not yet loaded, remove the default nullfied macros: +% \changes{v0.901}{2021/08/20}{\pkg{array}: Fixed if \pkg{array} already loaed.} % \begin{macrocode} -\let\firsthline\relax -\let\lasthline\relax +\@ifpackageloaded{array}{}{% + \let\firsthline\relax + \let\lasthline\relax +} \LWR@ProvidesPackagePass{array}[2018/12/30] % \end{macrocode} % +% Provide simplified column types for \HTML: +% \changes{v0.901}{2021/08/12}{\pkg{array}: Improved \cs{newcolumntype} emulation.} +% \begin{macrocode} +\HTMLnewcolumntype{w}[2]{#1} +\HTMLnewcolumntype{W}[2]{#1} +% \end{macrocode} +% +% More \HTML\ versions: % \begin{macrocode} \newcommand*{\LWR@HTML@firsthline}{\LWR@HTMLhline}% \LWR@expandableformatted{firsthline} @@ -44999,6 +45426,7 @@ color:\LWR@origpound\LWR@tempcolor% % % \changes{v0.69}{2019/03/09}{\pkg{array}: Fix for \cs{tabularnewline}.} % \begin{macrocode} +\let\tabularnewline\\ \providecommand*{\LWR@HTML@tabularnewline}{\LWR@tabularendofline} \LWR@formatted{tabularnewline} % \end{macrocode} @@ -48107,8 +48535,8 @@ s% % \DescribePackage{cases} % \pkg{cases} is patched for use by \pkg{lwarp}. % -% % While using \brand{MathJax}, \pkg{cases} objects are converted to \SVG\ math images. +% The MathJax 3.2 \pkg{cases} package does not yet work with \pkg{lwarp}. % % \changes{v0.58}{2018/06/08}{\pkg{cases}: Added.} % @@ -48241,6 +48669,7 @@ s% % % \changes{v0.80}{2020/02/08}{\pkg{centernot}: Added.} % \changes{v0.89}{2020/08/17}{\pkg{centernot}: Improved.} +% \changes{v0.901}{2021/08/26}{\pkg{centernot}: Now uses \brand{MathJax} 3.2 package.} % % \codehtml % @@ -48248,17 +48677,9 @@ s% \LWR@ProvidesPackagePass{centernot}[2016/05/16] % \end{macrocode} % -% Based on \href{https://github.com/mathjax/MathJax/issues/2107} -% {\texttt{https://github.com/mathjax/MathJax/issues/2107}} -% with \cs{textstyle} removed to work with sub \Slash super scripts. -% % \begin{macrocode} -\LWR@origRequirePackage{lwarp-common-mathjax-overlaysymbols} - \begin{warpMathJax} -\CustomizeMathJax{\newcommand{\centernot}[1]{% - \LWRoverlaysymbols{\unicode{x2215}}{#1} -}} +\CustomizeMathJax{\require{centernot}} \end{warpMathJax} % \end{macrocode} % @@ -51204,7 +51625,12 @@ name = \chemmacros_translate:n {scheme-name} % inside the data area of the tabular. % % \changes{v0.57}{2018/06/02}{\pkg{colortbl}: New system for switching print and \HTML\ outputs.} +% +% \cs{columncolor} is provided here to satisfy \cs{LWR@formatted}'s test for +% the existence of the print-mode macro. % \begin{macrocode} +\ProvideDocumentCommand{\columncolor}{O{named} m o o}{}% + \NewDocumentCommand{\LWR@HTML@columncolor}{O{named} m o o}{% \convertcolorspec{#1}{#2}{HTML}\LWR@columnHTMLcolor% \LWR@addtabularcellcolor% @@ -51296,13 +51722,31 @@ name = \chemmacros_translate:n {scheme-name} % \end{macrocode} % \end{noindmacro} -% For \brand{MathJax}, colors are discarded. +% For \brand{MathJax}, use the \brand{MathJax} package. +% The unused macro options are ignored. % \changes{v0.894}{2020/12/22}{\pkg{colortbl}: Added \brand{MathJax} emulation.} % \begin{macrocode} \begin{warpMathJax} -\CustomizeMathJax{\newcommand{\columncolor}[2][]{\LWRabsorbtwooptions}} -\CustomizeMathJax{\let\rowcolor\columncolor} -\CustomizeMathJax{\let\cellcolor\columncolor} + +\CustomizeMathJax{\require{colortbl}} +\CustomizeMathJax{\let\LWRorigcolumncolor\columncolor} +\CustomizeMathJax{\renewcommand{\columncolor}[2][named]{% + \LWRorigcolumncolor[#1]{#2}% + \LWRabsorbtwooptions% +}} + +\CustomizeMathJax{\let\LWRorigrowcolor\rowcolor} +\CustomizeMathJax{\renewcommand{\rowcolor}[2][named]{% + \LWRorigrowcolor[#1]{#2}% + \LWRabsorbtwooptions% +}} + +\CustomizeMathJax{\let\LWRorigcellcolor\cellcolor} +\CustomizeMathJax{\renewcommand{\cellcolor}[2][named]{% + \LWRorigcellcolor[#1]{#2}% + \LWRabsorbtwooptions% +}} + \end{warpMathJax} % \end{macrocode} @@ -51775,12 +52219,29 @@ name = \chemmacros_translate:n {scheme-name} % \label{sec:dcolumn} % % \changes{v0.22}{2017/02/24}{\pkg{dcolumn}: Added.} +% \changes{v0.901}{2021/08/12}{\pkg{dcolumn}: Works inside \env{lateximage}.} % % \DescribePackage{dcolumn} -% \pkg{dcolumn} is emulated by the \pkg{lwarp} core. +% \pkg{dcolumn} is used as-is in a \env{lateximage}, and +% is emulated by the \pkg{lwarp} core. +% +% \pkg{dcolumn} used to be \cs{LWR@ProvidesPackageDrop} in prior versions of \pkg{lwarp}, +% but is now supported for print mode. +% +% \begin{macrocode} +\LWR@ProvidesPackagePass{dcolumn}[2014/10/28] +% \end{macrocode} % +% Due to how the |D| column is created, cannot use \cs{HTMLnewcolumntype} here. +% An \HTML\ version neutralizes the lower-level macros, leaving a |c| column type. % \begin{macrocode} -\LWR@ProvidesPackageDrop{dcolumn}[2014/10/28] +\newcommand*{\LWR@HTML@DC@}[3]{} +\LWR@formatted{DC@} + +\providecommand*{\DC@end}{} + +\newcommand*{\LWR@HTML@DC@end}{} +\LWR@formatted{DC@end} % \end{macrocode} % % \iffalse @@ -58169,9 +58630,10 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space % % \DescribePackage{gensymb} % \pkg{gensymb} works as-is for \SVG\ math, and -% is emulated for \brand{MathJax}. +% uses the \brand{MathJax} package. % % \changes{v0.80}{2020/02/09}{\pkg{gensymb}: Added.} +% \changes{v0.901}{2021/08/26}{\pkg{gensymb}: Use \brand{MathJax} 3.2 package.} % % \codehtml % @@ -58181,11 +58643,7 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space % % \begin{macrocode} \begin{warpMathJax} -\CustomizeMathJax{\newcommand{\degree}{\mathrm{^\circ}}} -\CustomizeMathJax{\newcommand{\celsius}{\unicode{x2103}}} -\CustomizeMathJax{\newcommand{\perthousand}{\unicode{x2030}}} -\CustomizeMathJax{\newcommand{\ohm}{\mathrm{\Omega}}} -\CustomizeMathJax{\newcommand{\micro}{\mathrm{\unicode{x00B5}}}} +\CustomizeMathJax{\require{gensymb}} \end{warpMathJax} % \end{macrocode} % @@ -58620,6 +59078,7 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space \DeclareGraphicsRule{.SVG}{svg}{.SVG}{} } % \end{macrocode} +% % Inside a \env{lateximage}, allow \PDF\ instead of \SVG: % \changes{v0.61}{2018/10/06}{Fix: \EPS\ for \DVI\ \LaTeX.} % \begin{macrocode} @@ -59039,6 +59498,7 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space % \begin{macrocode} \textquotedbl\LWR@indentHTML% % \end{macrocode} +% % Only include a style tag if a width, height, angle, or scale was given: % \changes{v0.895}{2021/01/14}{Improved \HTML\ quotes.} % \begin{macrocode} @@ -59086,6 +59546,7 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space \textquotedbl\LWR@indentHTML% }{}% % \end{macrocode} +% % Set the class and alt tag: % \changes{v0.65}{2018/12/19}{\pkg{graphics}: Added \cs{includegraphics} \attribute{alt} key.} % \changes{v0.895}{2021/01/14}{Improved \HTML\ quotes.} @@ -59195,11 +59656,18 @@ solid {\FancyVerbRuleColor{\LWR@origpound\LWR@tempcolor}} ; % space \begingroup% \LetLtxMacro\Gin@setfile\LWR@HTML@Gin@setfile% \edef\LWR@tempone{#4}% - \StrSubstitute{\LWR@tempone}{.pdf}{.svg}[\LWR@tempone]% - \StrSubstitute{\LWR@tempone}{.PDF}{.SVG}[\LWR@tempone]% +% \end{macrocode} +% +% \PDF\ extensions are removed to allow a search for another +% graphics format such as \SVG\ or \PNG. +% \begin{macrocode} + \StrSubstitute{\LWR@tempone}{.pdf}{}[\LWR@tempone]% + \StrSubstitute{\LWR@tempone}{.PDF}{}[\LWR@tempone]% +% \end{macrocode} +% \begin{macrocode} \LWR@replaceEPSSVG% \xdef\LWR@parsedfilename{\LWR@tempone}% - \Ginclude@graphics{\detokenize\expandafter{\LWR@tempone}}% + \Ginclude@graphics{\detokenize\expandafter{\LWR@parsedfilename}}% \endgroup% \filename@parse{\LWR@parsedfilename}% % \end{macrocode} @@ -62316,6 +62784,7 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak} % \begin{noindenvironment}{KFLT@marginfloat} \oarg{offset} \marg{type} % \changes{v0.42}{2017/10/26}{\pkg{keyfloat}: If \progcode{FormatWP} add explicit \HTML\ style.} % \changes{v0.896}{2021/03/05}{\pkg{keyfloat}: Added \ARIA\ role.} +% \changes{v0.901}{2021/08/22}{\pkg{keyfloat}: More room.} % \begin{macrocode} \DeclareDocumentEnvironment{KFLT@marginfloat}{O{-1.2ex} m} {% @@ -62326,7 +62795,7 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak} (note)% {marginblock}% \renewcommand*{\@captype}{#2}% - \minipage{\LWR@usersmarginparwidth}% + \minipage{1.2\LWR@usersmarginparwidth}% \setlength{\marginparwidth}{.95\LWR@usersmarginparwidth}% } {% @@ -64226,6 +64695,30 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak} % % % +% \iffalse +%<*lltjp-tascmac> +% \fi +% +% \part{lwarp-lltjp-tascmac.sty} +% +% \section{lltjp-tascmac} +% +% \DescribePackage{lltjp-tascmac} +% \pkg{lltjp-tascmac} is a patch for \pkg{tascmac}, and is ignored. +% +% \changes{v0.901}{2021/08/19}{\pkg{lltjp-tascmac}: Added.} +% +% \codehtml +% +% \begin{macrocode} +\LWR@ProvidesPackageDrop{lltjp-tascmac}[2020/12/24] +% \end{macrocode} +% +% \iffalse +%</lltjp-tascmac> +% \fi +% +% % % % \iffalse @@ -64370,8 +64863,9 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak} \def\endlastfoot{\LWR@longtable@headerror} % \end{macrocode} % -% \changes{v0.69}{2019/03/09}{\pkg{array}: Fix for \cs{tabularnewline}.} +% \changes{v0.69}{2019/03/09}{\pkg{longtable}: Fix for \cs{tabularnewline}.} % \begin{macrocode} +\let\tabularnewline\\ \providecommand*{\LWR@HTML@tabularnewline}{\LWR@tabularendofline} \LWR@formatted{tabularnewline} % \end{macrocode} @@ -64635,6 +65129,7 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak} % \end{macrocode} % \end{noindmacro} % +% % \iffalse %</ltxtable> % \fi @@ -66297,88 +66792,30 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak} % \end{macrocode} % % -% For \brand{MathJax}: +% For \brand{MathJax}. +% +% The \brand{MathJax} package is used, and improvements are added. % % \changes{v0.79}{2020/01/26}{\pkg{mathtools}: Added \brand{MathJax} emulation.} % \changes{v0.87}{2020/05/20}{\pkg{mathtools}: Updated starred macros.} % \changes{v0.87}{2020/05/20}{\pkg{mathtools}: Improved \cs{underbraket}, \cs{overbracket}.} % \changes{v0.891}{2020/09/19}{\pkg{mathtools}: Improved \cs{underbraket}, \cs{overbracket}.} +% \changes{v0.901}{2021/08/26}{\pkg{mathtools}: Uses \brand{MathJax} 3.2 package.} % \begin{macrocode} \begin{warpMathJax} +\CustomizeMathJax{\require{mathtools}} + \LWR@infoprocessingmathjax{mathtools} -\CustomizeMathJax{\newcommand{\mathllap}[2][]{{#1#2}}} -\CustomizeMathJax{\newcommand{\mathrlap}[2][]{{#1#2}}} -\CustomizeMathJax{\newcommand{\mathclap}[2][]{{#1#2}}} -\CustomizeMathJax{\newcommand{\mathmbox}[1]{#1}} -\CustomizeMathJax{\newcommand{\clap}[1]{#1}} -\CustomizeMathJax{\newcommand{\LWRmathmakebox}[2][]{#2}} -\CustomizeMathJax{\newcommand{\mathmakebox}[1][]{\LWRmathmakebox}} -\CustomizeMathJax{\newcommand{\cramped}[2][]{{#1#2}}} -\CustomizeMathJax{\newcommand{\crampedllap}[2][]{{#1#2}}} -\CustomizeMathJax{\newcommand{\crampedrlap}[2][]{{#1#2}}} -\CustomizeMathJax{\newcommand{\crampedclap}[2][]{{#1#2}}} \CustomizeMathJax{\newenvironment{crampedsubarray}[1]{}{}} -\CustomizeMathJax{\newcommand{\crampedsubstack}{}} -% \end{macrocode} -% \changes{v0.89}{2020/08/21}{\pkg{mathtools}: Minor improvements.} -% \begin{macrocode} + \CustomizeMathJax{\newcommand{\smashoperator}[2][]{#2\limits}} -% \end{macrocode} -% \changes{v0.89}{2020/08/21}{\pkg{mathtools}: Added \cs{adjustlimits}.} -% \begin{macrocode} -\CustomizeMathJax{\newcommand{\adjustlimits}{}} -% \end{macrocode} -% \begin{macrocode} -\CustomizeMathJax{\newcommand{\SwapAboveDisplaySkip}{}} -\CustomizeMathJax{\require{extpfeil}} -\CustomizeMathJax{\Newextarrow\xleftrightarrow{10,10}{0x2194}} -\CustomizeMathJax{\Newextarrow\xLeftarrow{10,10}{0x21d0}} -\CustomizeMathJax{\Newextarrow\xhookleftarrow{10,10}{0x21a9}} -\CustomizeMathJax{\Newextarrow\xmapsto{10,10}{0x21a6}} -\CustomizeMathJax{\Newextarrow\xRightarrow{10,10}{0x21d2}} -\CustomizeMathJax{\Newextarrow\xLeftrightarrow{10,10}{0x21d4}} -\CustomizeMathJax{\Newextarrow\xhookrightarrow{10,10}{0x21aa}} -\CustomizeMathJax{\Newextarrow\xrightharpoondown{10,10}{0x21c1}} -\CustomizeMathJax{\Newextarrow\xleftharpoondown{10,10}{0x21bd}} -\CustomizeMathJax{\Newextarrow\xrightleftharpoons{10,10}{0x21cc}} -\CustomizeMathJax{\Newextarrow\xrightharpoonup{10,10}{0x21c0}} -\CustomizeMathJax{\Newextarrow\xleftharpoonup{10,10}{0x21bc}} -\CustomizeMathJax{\Newextarrow\xleftrightharpoons{10,10}{0x21cb}} - -\CustomizeMathJax{\newcommand{\LWRdounderbracket}[3]{% - \mathinner{\underset{#3}{\underline{\llcorner{#1}\lrcorner}}}% -}} -\CustomizeMathJax{\newcommand{\LWRunderbracket}[2][]{\LWRdounderbracket{#2}}} -\CustomizeMathJax{\newcommand{\underbracket}[1][]{\LWRunderbracket}} -\CustomizeMathJax{\newcommand{\LWRdooverbracket}[3]{% - \mathinner{\overset{#3}{\overline{\ulcorner{#1}\urcorner}}}% -}} -\CustomizeMathJax{\newcommand{\LWRoverbracket}[2][]{\LWRdooverbracket{#2}}} -\CustomizeMathJax{\newcommand{\overbracket}[1][]{\LWRoverbracket}} +\CustomizeMathJax{\newcommand{\SwapAboveDisplaySkip}{}} \CustomizeMathJax{\newcommand{\LaTeXunderbrace}[1]{\underbrace{#1}}} \CustomizeMathJax{\newcommand{\LaTeXoverbrace}[1]{\overbrace{#1}}} -\CustomizeMathJax{\newenvironment{matrix*}[1][]{\begin{matrix}}{\end{matrix}}} -\CustomizeMathJax{\newenvironment{pmatrix*}[1][]{\begin{pmatrix}}{\end{pmatrix}}} -\CustomizeMathJax{\newenvironment{bmatrix*}[1][]{\begin{bmatrix}}{\end{bmatrix}}} -\CustomizeMathJax{\newenvironment{Bmatrix*}[1][]{\begin{Bmatrix}}{\end{Bmatrix}}} -\CustomizeMathJax{\newenvironment{vmatrix*}[1][]{\begin{vmatrix}}{\end{vmatrix}}} -\CustomizeMathJax{\newenvironment{Vmatrix*}[1][]{\begin{Vmatrix}}{\end{Vmatrix}}} -\CustomizeMathJax{\newenvironment{smallmatrix*}[1][]{\begin{matrix}}{\end{matrix}}} -\CustomizeMathJax{\newenvironment{psmallmatrix*}[1][]{\begin{pmatrix}}{\end{pmatrix}}} -\CustomizeMathJax{\newenvironment{bsmallmatrix*}[1][]{\begin{bmatrix}}{\end{bmatrix}}} -\CustomizeMathJax{\newenvironment{Bsmallmatrix*}[1][]{\begin{Bmatrix}}{\end{Bmatrix}}} -\CustomizeMathJax{\newenvironment{vsmallmatrix*}[1][]{\begin{vmatrix}}{\end{vmatrix}}} -\CustomizeMathJax{\newenvironment{Vsmallmatrix*}[1][]{\begin{Vmatrix}}{\end{Vmatrix}}} -\CustomizeMathJax{\newenvironment{psmallmatrix}[1][]{\begin{pmatrix}}{\end{pmatrix}}} -\CustomizeMathJax{\newenvironment{bsmallmatrix}[1][]{\begin{bmatrix}}{\end{bmatrix}}} -\CustomizeMathJax{\newenvironment{Bsmallmatrix}[1][]{\begin{Bmatrix}}{\end{Bmatrix}}} -\CustomizeMathJax{\newenvironment{vsmallmatrix}[1][]{\begin{vmatrix}}{\end{vmatrix}}} -\CustomizeMathJax{\newenvironment{Vsmallmatrix}[1][]{\begin{Vmatrix}}{\end{Vmatrix}}} - \CustomizeMathJax{\newcommand{\LWRmultlined}[1][]{\begin{multline*}}} \CustomizeMathJax{\newenvironment{multlined}[1][]{\LWRmultlined}{\end{multline*}}} @@ -66388,50 +66825,8 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak} \CustomizeMathJax{\let\LWRorigshoveright\shoveright} \CustomizeMathJax{\renewcommand{\shoveright}[1][]{\LWRorigshoveright}} -\CustomizeMathJax{\newenvironment{dcases}{\begin{cases}}{\end{cases}}} -\CustomizeMathJax{\newenvironment{dcases*}{\begin{cases}}{\end{cases}}} -\CustomizeMathJax{\newenvironment{rcases}{\begin{cases}}{\end{cases}}} -\CustomizeMathJax{\newenvironment{rcases*}{\begin{cases}}{\end{cases}}} -\CustomizeMathJax{\newenvironment{drcases}{\begin{cases}}{\end{cases}}} -\CustomizeMathJax{\newenvironment{drcases*}{\begin{cases}}{\end{cases}}} -\CustomizeMathJax{\newenvironment{cases*}{\begin{cases}}{\end{cases}}} - -\CustomizeMathJax{\newcommand{\MoveEqLeft}[1][]{}} - -\CustomizeMathJax{% special parsing to handle '&' in argument - \def\LWRAboxed#1!|!{\fbox{\(#1\)}&\fbox{\(#2\)}} - \newcommand{\Aboxed}[1]{\LWRAboxed#1&&!|!} -} -% \end{macrocode} -% -% \changes{v0.86}{2020/05/09}{\pkg{mathtools}: Added \cs{ArrowBetweenLines*}.} -% \begin{macrocode} -\CustomizeMathJax{ - \newcommand{\LWRABLines}[1][\Updownarrow]{#1 \notag \\}% star/nostar the same - \newcommand{\ArrowBetweenLines}{\ifstar\LWRABLines\LWRABLines} -} -% \end{macrocode} -% -% \changes{v0.85}{2020/05/01}{\pkg{mathtools}: Fixed: \cs{shortintertext}.} -% \changes{v0.86}{2020/05/09}{\pkg{mathtools}: Added starred delimited macros.} -% \begin{macrocode} \CustomizeMathJax{\newcommand{\shortintertext}[1]{\text{#1}\notag \\}} -\CustomizeMathJax{\newcommand{\vdotswithin}[1]{\hspace{.5em}\vdots}} -% \end{macrocode} -% -% \changes{v0.86}{2020/05/09}{\pkg{mathtools}: Added \cs{shortvdotswithin*}.} -% \begin{macrocode} -\CustomizeMathJax{\newcommand{\LWRshortvdotswithinstar}[1]{\vdots \hspace{.5em} & \\}} -\CustomizeMathJax{\newcommand{\LWRshortvdotswithinnostar}[1]{& \hspace{.5em}\vdots \\}} -\CustomizeMathJax{% - \newcommand{\shortvdotswithin}% - {\ifstar\LWRshortvdotswithinstar\LWRshortvdotswithinnostar}% -} - -\CustomizeMathJax{\newcommand{\MTFlushSpaceAbove}{}} -\CustomizeMathJax{\newcommand{\MTFlushSpaceBelow}{\\}} - \LetLtxMacro\LWR@mathtools@orig@DeclarePairedDelimiter\DeclarePairedDelimiter \renewcommand{\DeclarePairedDelimiter}[3]{ \LWR@mathtools@orig@DeclarePairedDelimiter{#1}{#2}{#3} @@ -66537,44 +66932,8 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak} \@onlypreamble\DeclareParedDelimiterXPP \@onlypreamble\DeclareParedDelimiterX -\CustomizeMathJax{\newcommand\lparen{(}} -\CustomizeMathJax{\newcommand\rparen{)}} -\CustomizeMathJax{\newcommand{\ordinarycolon}{:}} -% \end{macrocode} -% \changes{v0.89}{2020/08/21}{\pkg{mathtools}: Minor improvements.} -% \changes{v0.891}{2020/09/08}{\pkg{mathtools}: Uses Unicode and \cs{mathrel}.} -% \begin{macrocode} \CustomizeMathJax{\newcommand{\vcentcolon}{\mathrel{\unicode{x2236}}}} -\CustomizeMathJax{\newcommand\dblcolon{\mathrel{\unicode{x2237}}}} -\CustomizeMathJax{\newcommand\coloneqq{\mathrel{\unicode{x2236}\!=}}} -\CustomizeMathJax{\newcommand\Coloneqq{\mathrel{\unicode{x2237}\!=}}} -\CustomizeMathJax{\newcommand\coloneq{\mathrel{\unicode{x2236}-}}} -\CustomizeMathJax{\newcommand\Coloneq{\mathrel{\unicode{x2237}-}}} - -\CustomizeMathJax{\newcommand\eqqcolon{\mathrel{=\!\unicode{x2236}}}} -\CustomizeMathJax{\newcommand\Eqqcolon{\mathrel{=\!\unicode{x2237}}}} -\CustomizeMathJax{\newcommand\eqcolon{\mathrel{-\unicode{x2236}}}} -\CustomizeMathJax{\newcommand\Eqcolon{\mathrel{-\unicode{x2237}}}} - -\CustomizeMathJax{\newcommand\colonapprox{\mathrel{\unicode{x2236}\!\approx}}} -\CustomizeMathJax{\newcommand\Colonapprox{\mathrel{\unicode{x2237}\!\approx}}} -\CustomizeMathJax{\newcommand\colonsim{\mathrel{\unicode{x2236}\!\sim}}} -\CustomizeMathJax{\newcommand\Colonsim{\mathrel{\unicode{x2237}\!\sim}}} - -% \end{macrocode} -% \changes{v0.89}{2020/08/21}{\pkg{mathtools}: Minor improvements.} -% \begin{macrocode} -\CustomizeMathJax{\newcommand{\nuparrow}{\mathrel{\cancel{\uparrow}}}} -\CustomizeMathJax{\newcommand{\ndownarrow}{\mathrel{\cancel{\downarrow}}}} -\CustomizeMathJax{\newcommand{\bigtimes}{\mathop{\Large\times}\limits}} - -\CustomizeMathJax{\newcommand{\prescript}[3]{{}^{#1}_{#2}#3}} - - -\CustomizeMathJax{\newenvironment{lgathered}{\begin{gathered}}{\end{gathered}}} -\CustomizeMathJax{\newenvironment{rgathered}{\begin{gathered}}{\end{gathered}}} - \LetLtxMacro\LWR@mathtools@orig@newgathered\newgathered \renewcommand{\newgathered}[4]{% \LWR@mathtools@orig@newgathered{#1}{#2}{#3}{#4}% @@ -66586,8 +66945,6 @@ do not attempt to patch lwarp's version of `hyperref'.)\MessageBreak} } \@onlypreamble\newgathered -\CustomizeMathJax{\newcommand{\splitfrac}[2]{{}^{#1}_{#2}}} -\CustomizeMathJax{\let\splitdfrac\splitfrac} \end{warpMathJax} % \end{macrocode} % @@ -67773,7 +68130,7 @@ background: % \pkg{lwarp} does not support % \trouble[nested math]{mhchem=\pkg{mhchem}>nested dollar signs} % the use of nested dollar signs in \pkg{mhchem} expressions. -% \gindex{array>mhchem=\pkg{mhchem}} +% \gindex{array=\env{array}>mhchem=\pkg{mhchem}} % \gindex{math>mhchem=\pkg{mhchem}} % % For some examples from the \pkg{mhchem} manual, change as follows: @@ -69471,6 +69828,46 @@ class=\textquotedbl{}td% % % % +% \iffalse +%<*mwe> +% \fi +% +% \part{lwarp-mwe.sty} +% +% \section{mwe} +% +% \credits{Martin Scharrer} +% +% \DescribePackage{mwe} +% \pkg{mwe} is used as-is, but a warning is issued to copy the images +% to the local directory. +% +% \changes{v0.901}{2021/08/02}{\pkg{mwe}: Added.} +% +% \codehtml +% +% \begin{macrocode} +\LWR@ProvidesPackagePass{mwe}[2018/03/30] +% \end{macrocode} +% +% \begin{macrocode} +\AtEndDocument{% + \PackageWarningNoLine{lwarp}{% + For package mwe, copy any mwe images to be used for\MessageBreak + HTML, such as PNG or JPG, to the document's base\MessageBreak + directory. Neither a subdirectory nor the mwe\MessageBreak + directory will work, due to the TeX file search\MessageBreak + algorithm% + }% +}% +% \end{macrocode} +% +% \iffalse +%</mwe> +% \fi +% +% +% % % \iffalse %<*nameauth> @@ -70790,6 +71187,11 @@ do not attempt to patch lwarp's version of `nameref'.)\MessageBreak % More approximations: % \begin{macrocode} \CustomizeMathJax{\let\hdottedline\hdashline} +% \end{macrocode} +% +% \changes{v0.901}{2021/08/26}{\pkg{nicematrix}: Added \cs{Hline}.} +% \begin{macrocode} +\CustomizeMathJax{\let\Hline\hline} \CustomizeMathJax{\newcommand{\ldots}[1][]{\dots}} \CustomizeMathJax{\newcommand{\Cdots}[1][]{\cdots}} @@ -73027,8 +73429,8 @@ do not attempt to patch lwarp's version of `nameref'.)\MessageBreak % % Option \optn{link} and \optn{linkname} work: % \begin{Verbatim}[tabsize=4,gobble=2,frame=lines] -% \hyperlink{<filename>.pdf.<pagenubmer}}{some text} -% \hyperlink{<linkname>.<pagenubmer}}{some text} +% \hyperlink{<filename>.pdf.<pagenubmer}{some text} +% \hyperlink{<linkname>.<pagenubmer}{some text} % \end{Verbatim} % % Options which make no sense in \HTML\ are disabled. @@ -77975,6 +78377,16 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', \DeclareSIUnit\planckbar{\LWR@siunitx@textplanckbar} }% AtBeginDocument % \end{macrocode} + +% Support the |S| and |s| column types: +% \changes{v0.901}{2021/08/18}{\pkg{siunitx}: Improved \cs{newcolumntype} emulation.} +% \begin{macrocode} +\AtBeginDocument{ +\HTMLnewcolumntype{S}{c} +\HTMLnewcolumntype{s}{c} +} +% \end{macrocode} + % % \cs{@ensuredmath} is not supported inside an \cs{hbox}, so it must % temporarily be restored to its original. @@ -80006,7 +80418,7 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', \CustomizeMathJax{\newcommand{\iid}{\;\stackrel{\mb{\mathrm{iid}}}{\sim}\;}} \CustomizeMathJax{\newcommand{\ind}{\;\stackrel{\mb{\mathrm{ind}}}{\sim}\;}} \CustomizeMathJax{\newcommand{\indpr}{% - \;\stackrel{\mb{\mathrm{ind}}}{\stackrel{\mb{\mathrm{prior}}}{\sim}}\;% + \;\stackrel{\mb{\mathrm{ind}}}{\stackrel{\mb{\mathrm{prior}}}{\sim}}\; }} \CustomizeMathJax{\newcommand{\post}{\;\stackrel{\mb{\mathrm{post}}}{\sim}\;}} \CustomizeMathJax{\newcommand{\prior}{\;\stackrel{\mb{\mathrm{prior}}}{\sim}\;}} @@ -81606,16 +82018,25 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', \RequirePackage{array} % \end{macrocode} +% \cs{tabularxcolumn} is ignored. +% All |X| columns will be |p| for now. The width is ignored. +% \changes{v0.901}{2021/08/17}{\pkg{tabularx}: Improved \cs{newcolumntype} emulation.} +% \begin{macrocode} +\def\tabularxcolumn#1{p{#1}} +\newcolumntype{X}{p{1in}} +% \end{macrocode} +% % \begin{macrocode} \DeclareDocumentEnvironment{tabularx}{m o m} -{\tabular{#3}} -{\endtabular} + {\tabular{#3}} + {\endtabular} \DeclareDocumentEnvironment{tabularx*}{m o m} -{\tabular{#3}} -{\endtabular} + {\tabular{#3}} + {\endtabular} % \end{macrocode} - +% +% % \iffalse %</tabularx> % \fi @@ -81659,7 +82080,17 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', \NewDocumentEnvironment{tabulary*}{m o m} {\tabular{#3}} {\endtabular} - +% \end{macrocode} +% +% \changes{v0.901}{2021/08/17}{\pkg{tabulary}: Improved \cs{newcolumntype} emulation.} +% \begin{macrocode} +\newcolumntype{L}{l} +\newcolumntype{C}{c} +\newcolumntype{R}{r} +\newcolumntype{J}{l} +% \end{macrocode} +% +% \begin{macrocode} \newdimen\tymin \newdimen\tymax \def\tyformat{} @@ -82484,6 +82915,9 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', % \DescribePackage{textcomp} % \pkg{textcomp} is patched for use by \pkg{lwarp}. % +% For \brand{MathJax}, the \brand{MathJax} packge is used. +% +% % \subsection{Limitations} % % \limitstextcomp @@ -82677,6 +83111,11 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', % \end{macrocode} % % +% For \brand{MathJax}: +% \changes{v0.901}{2021/08/26}{\pkg{textcomp}: Uses \pkg{MathJax} 3.2 package.} +% \begin{macrocode} +\CustomizeMathJax{\require{textcomp}} +% \end{macrocode} % % \iffalse %</textcomp> @@ -86674,6 +87113,7 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', % emulated for \brand{MathJax}. % % \changes{v0.89}{2020/08/10}{\pkg{upgreek}: Added.} +% \changes{v0.901}{2021/08/26}{\pkg{upgreek}: Use \brand{MathJax} package.} % % \codehtml % @@ -86683,14 +87123,8 @@ remember to convert PDF images to SVG using 'lwarpmk pdftosvg *-fig.pdf', % % For \brand{MathJax}: % \begin{macrocode} -\LWR@origRequirePackage{lwarp-common-mathjax-letters} - \begin{warpMathJax} -\LWR@infoprocessingmathjax{upgreek} - -\LWR@mathjax@addgreek@l@up{up}{} -\LWR@mathjax@addgreek@u@up{Up}{} - +\CustomizeMathJax{\require{upgreek}} \end{warpMathJax} % \end{macrocode} % @@ -88111,10 +88545,6 @@ padding:\LWR@printlength{\fboxsep}% ]{colorbox}{#3}% \endgroup% } - -\AtBeginDocument{ - \LWR@formatted{colorbox} -} % \end{macrocode} % \end{macro} @@ -88148,10 +88578,6 @@ padding:\LWR@printlength{\fboxsep}% % \begin{macrocode} \global\booltrue{LWR@minipagethispar}% } - -\AtBeginDocument{ - \LWR@formatted{colorboxBlock} -} % \end{macrocode} % \end{macro} @@ -88185,10 +88611,6 @@ padding:\LWR@printlength{\fboxsep}% }% \endgroup% } - -\AtBeginDocument{ - \LWR@formatted{fcolorbox} -} % \end{macrocode} % \end{macro} @@ -88239,10 +88661,6 @@ padding:\LWR@printlength{\fboxsep}% \global\booltrue{LWR@minipagethispar}% \LWR@traceinfo{HTML fcolorboxBlock done}% } - -\AtBeginDocument{ - \LWR@formatted{fcolorboxBlock} -} % \end{macrocode} % \end{macro} @@ -88306,10 +88724,6 @@ width:\LWR@printlength{\LWR@tempwidth}% % \begin{macrocode} \global\booltrue{LWR@minipagethispar}% } - -\AtBeginDocument{ -\LWR@formattedenv{fcolorminipage} -} % \end{macrocode} % \end{environment} % @@ -88841,7 +89255,7 @@ height:\LWR@printlength{\LWR@tempheight}% % Relies on \pkg{tabularx}. % % At present, an \env{xltabular} without a caption or with only a \cs{caption*} -% \trouble[table numbering]{tabular>numbering} +% \trouble[table numbering]{tabular=\env{tabular}>numbering} % \trouble{xltabular=\pkg{xltabular}>numbering} % may be misnumbered in \HTML, so it may be necessary to place at the end % of the table: diff --git a/Master/texmf-dist/source/latex/lwarp/lwarp.ins b/Master/texmf-dist/source/latex/lwarp/lwarp.ins index 143e4ba4f10..5d3ad912df9 100644 --- a/Master/texmf-dist/source/latex/lwarp/lwarp.ins +++ b/Master/texmf-dist/source/latex/lwarp/lwarp.ins @@ -285,6 +285,7 @@ version 2005/12/01 or later. \file{lwarp-listings.sty}{\from{lwarp.dtx}{listings}} \file{lwarp-listliketab.sty}{\from{lwarp.dtx}{listliketab}} \file{lwarp-lltjext.sty}{\from{lwarp.dtx}{lltjext}} +\file{lwarp-lltjp-tascmac.sty}{\from{lwarp.dtx}{lltjp-tascmac}} \file{lwarp-longtable.sty}{\from{lwarp.dtx}{longtable}} \file{lwarp-lpic.sty}{\from{lwarp.dtx}{lpic}} \file{lwarp-lscape.sty}{\from{lwarp.dtx}{lscape}} @@ -350,6 +351,7 @@ version 2005/12/01 or later. \file{lwarp-multirow.sty}{\from{lwarp.dtx}{multirow}} \file{lwarp-multitoc.sty}{\from{lwarp.dtx}{multitoc}} \file{lwarp-musicography.sty}{\from{lwarp.dtx}{musicography}} +\file{lwarp-mwe.sty}{\from{lwarp.dtx}{mwe}} \file{lwarp-nameauth.sty}{\from{lwarp.dtx}{nameauth}} \file{lwarp-nameref.sty}{\from{lwarp.dtx}{nameref}} \file{lwarp-natbib.sty}{\from{lwarp.dtx}{natbib}} diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-array.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-array.sty index 27ed987b674..c13e5e3f1b6 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-array.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-array.sty @@ -15,15 +15,20 @@ %% http://www.latex-project.org/lppl.txt %% and version 1.3 or later is part of all distributions of LaTeX %% version 2005/12/01 or later. -\let\firsthline\relax -\let\lasthline\relax +\@ifpackageloaded{array}{}{% + \let\firsthline\relax + \let\lasthline\relax +} \LWR@ProvidesPackagePass{array}[2018/12/30] +\HTMLnewcolumntype{w}[2]{#1} +\HTMLnewcolumntype{W}[2]{#1} \newcommand*{\LWR@HTML@firsthline}{\LWR@HTMLhline}% \LWR@expandableformatted{firsthline} \newcommand*{\LWR@HTML@lasthline}{\LWR@HTMLhline}% \LWR@expandableformatted{lasthline} +\let\tabularnewline\\ \providecommand*{\LWR@HTML@tabularnewline}{\LWR@tabularendofline} \LWR@formatted{tabularnewline} \CustomizeMathJax{ diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-centernot.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-centernot.sty index c595d961d20..2bb3b879791 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-centernot.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-centernot.sty @@ -16,12 +16,8 @@ %% and version 1.3 or later is part of all distributions of LaTeX %% version 2005/12/01 or later. \LWR@ProvidesPackagePass{centernot}[2016/05/16] -\LWR@origRequirePackage{lwarp-common-mathjax-overlaysymbols} - \begin{warpMathJax} -\CustomizeMathJax{\newcommand{\centernot}[1]{% - \LWRoverlaysymbols{\unicode{x2215}}{#1} -}} +\CustomizeMathJax{\require{centernot}} \end{warpMathJax} \endinput %% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-colortbl.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-colortbl.sty index 21fc08d2864..73423c71bbe 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-colortbl.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-colortbl.sty @@ -18,6 +18,8 @@ \let\rowcolor\relax \LWR@ProvidesPackagePass{colortbl}[2018/12/12] +\ProvideDocumentCommand{\columncolor}{O{named} m o o}{}% + \NewDocumentCommand{\LWR@HTML@columncolor}{O{named} m o o}{% \convertcolorspec{#1}{#2}{HTML}\LWR@columnHTMLcolor% \LWR@addtabularcellcolor% @@ -59,9 +61,26 @@ \AtBeginDocument{\LWR@expandableformatted{doublerulesepcolornexttoken}} \begin{warpMathJax} -\CustomizeMathJax{\newcommand{\columncolor}[2][]{\LWRabsorbtwooptions}} -\CustomizeMathJax{\let\rowcolor\columncolor} -\CustomizeMathJax{\let\cellcolor\columncolor} + +\CustomizeMathJax{\require{colortbl}} +\CustomizeMathJax{\let\LWRorigcolumncolor\columncolor} +\CustomizeMathJax{\renewcommand{\columncolor}[2][named]{% + \LWRorigcolumncolor[#1]{#2}% + \LWRabsorbtwooptions% +}} + +\CustomizeMathJax{\let\LWRorigrowcolor\rowcolor} +\CustomizeMathJax{\renewcommand{\rowcolor}[2][named]{% + \LWRorigrowcolor[#1]{#2}% + \LWRabsorbtwooptions% +}} + +\CustomizeMathJax{\let\LWRorigcellcolor\cellcolor} +\CustomizeMathJax{\renewcommand{\cellcolor}[2][named]{% + \LWRorigcellcolor[#1]{#2}% + \LWRabsorbtwooptions% +}} + \end{warpMathJax} \endinput diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-dcolumn.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-dcolumn.sty index 1c1c2c91806..2bd51e0709f 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-dcolumn.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-dcolumn.sty @@ -15,7 +15,14 @@ %% http://www.latex-project.org/lppl.txt %% and version 1.3 or later is part of all distributions of LaTeX %% version 2005/12/01 or later. -\LWR@ProvidesPackageDrop{dcolumn}[2014/10/28] +\LWR@ProvidesPackagePass{dcolumn}[2014/10/28] +\newcommand*{\LWR@HTML@DC@}[3]{} +\LWR@formatted{DC@} + +\providecommand*{\DC@end}{} + +\newcommand*{\LWR@HTML@DC@end}{} +\LWR@formatted{DC@end} \endinput %% %% End of file `lwarp-dcolumn.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-gensymb.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-gensymb.sty index cd2a10ac370..19bce7d2907 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-gensymb.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-gensymb.sty @@ -17,11 +17,7 @@ %% version 2005/12/01 or later. \LWR@ProvidesPackagePass{gensymb}[2003/07/02] \begin{warpMathJax} -\CustomizeMathJax{\newcommand{\degree}{\mathrm{^\circ}}} -\CustomizeMathJax{\newcommand{\celsius}{\unicode{x2103}}} -\CustomizeMathJax{\newcommand{\perthousand}{\unicode{x2030}}} -\CustomizeMathJax{\newcommand{\ohm}{\mathrm{\Omega}}} -\CustomizeMathJax{\newcommand{\micro}{\mathrm{\unicode{x00B5}}}} +\CustomizeMathJax{\require{gensymb}} \end{warpMathJax} \endinput %% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty index 6a5d70df83e..bf5e0657c28 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-graphics.sty @@ -334,11 +334,11 @@ \begingroup% \LetLtxMacro\Gin@setfile\LWR@HTML@Gin@setfile% \edef\LWR@tempone{#4}% - \StrSubstitute{\LWR@tempone}{.pdf}{.svg}[\LWR@tempone]% - \StrSubstitute{\LWR@tempone}{.PDF}{.SVG}[\LWR@tempone]% + \StrSubstitute{\LWR@tempone}{.pdf}{}[\LWR@tempone]% + \StrSubstitute{\LWR@tempone}{.PDF}{}[\LWR@tempone]% \LWR@replaceEPSSVG% \xdef\LWR@parsedfilename{\LWR@tempone}% - \Ginclude@graphics{\detokenize\expandafter{\LWR@tempone}}% + \Ginclude@graphics{\detokenize\expandafter{\LWR@parsedfilename}}% \endgroup% \filename@parse{\LWR@parsedfilename}% \StrSubstitute{\LWR@parsedfilename}{//}{/}[\LWR@parsedfilename]% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty index 63ffeb1ef23..e9877b4b347 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-keyfloat.sty @@ -230,7 +230,7 @@ (note)% {marginblock}% \renewcommand*{\@captype}{#2}% - \minipage{\LWR@usersmarginparwidth}% + \minipage{1.2\LWR@usersmarginparwidth}% \setlength{\marginparwidth}{.95\LWR@usersmarginparwidth}% } {% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-lltjp-tascmac.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-lltjp-tascmac.sty new file mode 100644 index 00000000000..01ed9457db4 --- /dev/null +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-lltjp-tascmac.sty @@ -0,0 +1,21 @@ +%% +%% This is file `lwarp-lltjp-tascmac.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% lwarp.dtx (with options: `lltjp-tascmac') +%% This is a generated file. +%% Copyright 2016-2020 Brian Dunn +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +\LWR@ProvidesPackageDrop{lltjp-tascmac}[2020/12/24] +\endinput +%% +%% End of file `lwarp-lltjp-tascmac.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-longtable.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-longtable.sty index 6b4723383fd..e6caecee83b 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-longtable.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-longtable.sty @@ -93,6 +93,7 @@ \def\endfirsthead{\LWR@longtable@maybeheaderror} \def\endfoot{\LWR@longtable@headerror} \def\endlastfoot{\LWR@longtable@headerror} +\let\tabularnewline\\ \providecommand*{\LWR@HTML@tabularnewline}{\LWR@tabularendofline} \LWR@formatted{tabularnewline} \newcommand{\setlongtables}{}% Obsolete command, does nothing. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-mathtools.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-mathtools.sty index 70c119f42ac..b827fde1a6d 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-mathtools.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-mathtools.sty @@ -35,72 +35,19 @@ \mathtoolsset{mathic=false} \MHInternalSyntaxOff \begin{warpMathJax} +\CustomizeMathJax{\require{mathtools}} + \LWR@infoprocessingmathjax{mathtools} -\CustomizeMathJax{\newcommand{\mathllap}[2][]{{#1#2}}} -\CustomizeMathJax{\newcommand{\mathrlap}[2][]{{#1#2}}} -\CustomizeMathJax{\newcommand{\mathclap}[2][]{{#1#2}}} -\CustomizeMathJax{\newcommand{\mathmbox}[1]{#1}} -\CustomizeMathJax{\newcommand{\clap}[1]{#1}} -\CustomizeMathJax{\newcommand{\LWRmathmakebox}[2][]{#2}} -\CustomizeMathJax{\newcommand{\mathmakebox}[1][]{\LWRmathmakebox}} -\CustomizeMathJax{\newcommand{\cramped}[2][]{{#1#2}}} -\CustomizeMathJax{\newcommand{\crampedllap}[2][]{{#1#2}}} -\CustomizeMathJax{\newcommand{\crampedrlap}[2][]{{#1#2}}} -\CustomizeMathJax{\newcommand{\crampedclap}[2][]{{#1#2}}} \CustomizeMathJax{\newenvironment{crampedsubarray}[1]{}{}} -\CustomizeMathJax{\newcommand{\crampedsubstack}{}} -\CustomizeMathJax{\newcommand{\smashoperator}[2][]{#2\limits}} -\CustomizeMathJax{\newcommand{\adjustlimits}{}} -\CustomizeMathJax{\newcommand{\SwapAboveDisplaySkip}{}} -\CustomizeMathJax{\require{extpfeil}} -\CustomizeMathJax{\Newextarrow\xleftrightarrow{10,10}{0x2194}} -\CustomizeMathJax{\Newextarrow\xLeftarrow{10,10}{0x21d0}} -\CustomizeMathJax{\Newextarrow\xhookleftarrow{10,10}{0x21a9}} -\CustomizeMathJax{\Newextarrow\xmapsto{10,10}{0x21a6}} -\CustomizeMathJax{\Newextarrow\xRightarrow{10,10}{0x21d2}} -\CustomizeMathJax{\Newextarrow\xLeftrightarrow{10,10}{0x21d4}} -\CustomizeMathJax{\Newextarrow\xhookrightarrow{10,10}{0x21aa}} -\CustomizeMathJax{\Newextarrow\xrightharpoondown{10,10}{0x21c1}} -\CustomizeMathJax{\Newextarrow\xleftharpoondown{10,10}{0x21bd}} -\CustomizeMathJax{\Newextarrow\xrightleftharpoons{10,10}{0x21cc}} -\CustomizeMathJax{\Newextarrow\xrightharpoonup{10,10}{0x21c0}} -\CustomizeMathJax{\Newextarrow\xleftharpoonup{10,10}{0x21bc}} -\CustomizeMathJax{\Newextarrow\xleftrightharpoons{10,10}{0x21cb}} +\CustomizeMathJax{\newcommand{\smashoperator}[2][]{#2\limits}} -\CustomizeMathJax{\newcommand{\LWRdounderbracket}[3]{% - \mathinner{\underset{#3}{\underline{\llcorner{#1}\lrcorner}}}% -}} -\CustomizeMathJax{\newcommand{\LWRunderbracket}[2][]{\LWRdounderbracket{#2}}} -\CustomizeMathJax{\newcommand{\underbracket}[1][]{\LWRunderbracket}} -\CustomizeMathJax{\newcommand{\LWRdooverbracket}[3]{% - \mathinner{\overset{#3}{\overline{\ulcorner{#1}\urcorner}}}% -}} -\CustomizeMathJax{\newcommand{\LWRoverbracket}[2][]{\LWRdooverbracket{#2}}} -\CustomizeMathJax{\newcommand{\overbracket}[1][]{\LWRoverbracket}} +\CustomizeMathJax{\newcommand{\SwapAboveDisplaySkip}{}} \CustomizeMathJax{\newcommand{\LaTeXunderbrace}[1]{\underbrace{#1}}} \CustomizeMathJax{\newcommand{\LaTeXoverbrace}[1]{\overbrace{#1}}} -\CustomizeMathJax{\newenvironment{matrix*}[1][]{\begin{matrix}}{\end{matrix}}} -\CustomizeMathJax{\newenvironment{pmatrix*}[1][]{\begin{pmatrix}}{\end{pmatrix}}} -\CustomizeMathJax{\newenvironment{bmatrix*}[1][]{\begin{bmatrix}}{\end{bmatrix}}} -\CustomizeMathJax{\newenvironment{Bmatrix*}[1][]{\begin{Bmatrix}}{\end{Bmatrix}}} -\CustomizeMathJax{\newenvironment{vmatrix*}[1][]{\begin{vmatrix}}{\end{vmatrix}}} -\CustomizeMathJax{\newenvironment{Vmatrix*}[1][]{\begin{Vmatrix}}{\end{Vmatrix}}} -\CustomizeMathJax{\newenvironment{smallmatrix*}[1][]{\begin{matrix}}{\end{matrix}}} -\CustomizeMathJax{\newenvironment{psmallmatrix*}[1][]{\begin{pmatrix}}{\end{pmatrix}}} -\CustomizeMathJax{\newenvironment{bsmallmatrix*}[1][]{\begin{bmatrix}}{\end{bmatrix}}} -\CustomizeMathJax{\newenvironment{Bsmallmatrix*}[1][]{\begin{Bmatrix}}{\end{Bmatrix}}} -\CustomizeMathJax{\newenvironment{vsmallmatrix*}[1][]{\begin{vmatrix}}{\end{vmatrix}}} -\CustomizeMathJax{\newenvironment{Vsmallmatrix*}[1][]{\begin{Vmatrix}}{\end{Vmatrix}}} -\CustomizeMathJax{\newenvironment{psmallmatrix}[1][]{\begin{pmatrix}}{\end{pmatrix}}} -\CustomizeMathJax{\newenvironment{bsmallmatrix}[1][]{\begin{bmatrix}}{\end{bmatrix}}} -\CustomizeMathJax{\newenvironment{Bsmallmatrix}[1][]{\begin{Bmatrix}}{\end{Bmatrix}}} -\CustomizeMathJax{\newenvironment{vsmallmatrix}[1][]{\begin{vmatrix}}{\end{vmatrix}}} -\CustomizeMathJax{\newenvironment{Vsmallmatrix}[1][]{\begin{Vmatrix}}{\end{Vmatrix}}} - \CustomizeMathJax{\newcommand{\LWRmultlined}[1][]{\begin{multline*}}} \CustomizeMathJax{\newenvironment{multlined}[1][]{\LWRmultlined}{\end{multline*}}} @@ -109,37 +56,8 @@ \CustomizeMathJax{\let\LWRorigshoveright\shoveright} \CustomizeMathJax{\renewcommand{\shoveright}[1][]{\LWRorigshoveright}} -\CustomizeMathJax{\newenvironment{dcases}{\begin{cases}}{\end{cases}}} -\CustomizeMathJax{\newenvironment{dcases*}{\begin{cases}}{\end{cases}}} -\CustomizeMathJax{\newenvironment{rcases}{\begin{cases}}{\end{cases}}} -\CustomizeMathJax{\newenvironment{rcases*}{\begin{cases}}{\end{cases}}} -\CustomizeMathJax{\newenvironment{drcases}{\begin{cases}}{\end{cases}}} -\CustomizeMathJax{\newenvironment{drcases*}{\begin{cases}}{\end{cases}}} -\CustomizeMathJax{\newenvironment{cases*}{\begin{cases}}{\end{cases}}} - -\CustomizeMathJax{\newcommand{\MoveEqLeft}[1][]{}} - -\CustomizeMathJax{% special parsing to handle '&' in argument - \def\LWRAboxed#1!|!{\fbox{\(#1\)}&\fbox{\(#2\)}} - \newcommand{\Aboxed}[1]{\LWRAboxed#1&&!|!} -} -\CustomizeMathJax{ - \newcommand{\LWRABLines}[1][\Updownarrow]{#1 \notag \\}% star/nostar the same - \newcommand{\ArrowBetweenLines}{\ifstar\LWRABLines\LWRABLines} -} \CustomizeMathJax{\newcommand{\shortintertext}[1]{\text{#1}\notag \\}} -\CustomizeMathJax{\newcommand{\vdotswithin}[1]{\hspace{.5em}\vdots}} -\CustomizeMathJax{\newcommand{\LWRshortvdotswithinstar}[1]{\vdots \hspace{.5em} & \\}} -\CustomizeMathJax{\newcommand{\LWRshortvdotswithinnostar}[1]{& \hspace{.5em}\vdots \\}} -\CustomizeMathJax{% - \newcommand{\shortvdotswithin}% - {\ifstar\LWRshortvdotswithinstar\LWRshortvdotswithinnostar}% -} - -\CustomizeMathJax{\newcommand{\MTFlushSpaceAbove}{}} -\CustomizeMathJax{\newcommand{\MTFlushSpaceBelow}{\\}} - \LetLtxMacro\LWR@mathtools@orig@DeclarePairedDelimiter\DeclarePairedDelimiter \renewcommand{\DeclarePairedDelimiter}[3]{ \LWR@mathtools@orig@DeclarePairedDelimiter{#1}{#2}{#3} @@ -236,36 +154,8 @@ \@onlypreamble\DeclareParedDelimiterXPP \@onlypreamble\DeclareParedDelimiterX -\CustomizeMathJax{\newcommand\lparen{(}} -\CustomizeMathJax{\newcommand\rparen{)}} -\CustomizeMathJax{\newcommand{\ordinarycolon}{:}} \CustomizeMathJax{\newcommand{\vcentcolon}{\mathrel{\unicode{x2236}}}} -\CustomizeMathJax{\newcommand\dblcolon{\mathrel{\unicode{x2237}}}} -\CustomizeMathJax{\newcommand\coloneqq{\mathrel{\unicode{x2236}\!=}}} -\CustomizeMathJax{\newcommand\Coloneqq{\mathrel{\unicode{x2237}\!=}}} -\CustomizeMathJax{\newcommand\coloneq{\mathrel{\unicode{x2236}-}}} -\CustomizeMathJax{\newcommand\Coloneq{\mathrel{\unicode{x2237}-}}} - -\CustomizeMathJax{\newcommand\eqqcolon{\mathrel{=\!\unicode{x2236}}}} -\CustomizeMathJax{\newcommand\Eqqcolon{\mathrel{=\!\unicode{x2237}}}} -\CustomizeMathJax{\newcommand\eqcolon{\mathrel{-\unicode{x2236}}}} -\CustomizeMathJax{\newcommand\Eqcolon{\mathrel{-\unicode{x2237}}}} - -\CustomizeMathJax{\newcommand\colonapprox{\mathrel{\unicode{x2236}\!\approx}}} -\CustomizeMathJax{\newcommand\Colonapprox{\mathrel{\unicode{x2237}\!\approx}}} -\CustomizeMathJax{\newcommand\colonsim{\mathrel{\unicode{x2236}\!\sim}}} -\CustomizeMathJax{\newcommand\Colonsim{\mathrel{\unicode{x2237}\!\sim}}} - -\CustomizeMathJax{\newcommand{\nuparrow}{\mathrel{\cancel{\uparrow}}}} -\CustomizeMathJax{\newcommand{\ndownarrow}{\mathrel{\cancel{\downarrow}}}} -\CustomizeMathJax{\newcommand{\bigtimes}{\mathop{\Large\times}\limits}} - -\CustomizeMathJax{\newcommand{\prescript}[3]{{}^{#1}_{#2}#3}} - -\CustomizeMathJax{\newenvironment{lgathered}{\begin{gathered}}{\end{gathered}}} -\CustomizeMathJax{\newenvironment{rgathered}{\begin{gathered}}{\end{gathered}}} - \LetLtxMacro\LWR@mathtools@orig@newgathered\newgathered \renewcommand{\newgathered}[4]{% \LWR@mathtools@orig@newgathered{#1}{#2}{#3}{#4}% @@ -277,8 +167,6 @@ } \@onlypreamble\newgathered -\CustomizeMathJax{\newcommand{\splitfrac}[2]{{}^{#1}_{#2}}} -\CustomizeMathJax{\let\splitdfrac\splitfrac} \end{warpMathJax} \endinput %% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-mwe.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-mwe.sty new file mode 100644 index 00000000000..521f903755f --- /dev/null +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-mwe.sty @@ -0,0 +1,30 @@ +%% +%% This is file `lwarp-mwe.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% lwarp.dtx (with options: `mwe') +%% This is a generated file. +%% Copyright 2016-2020 Brian Dunn +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +\LWR@ProvidesPackagePass{mwe}[2018/03/30] +\AtEndDocument{% + \PackageWarningNoLine{lwarp}{% + For package mwe, copy any mwe images to be used for\MessageBreak + HTML, such as PNG or JPG, to the document's base\MessageBreak + directory. Neither a subdirectory nor the mwe\MessageBreak + directory will work, due to the TeX file search\MessageBreak + algorithm% + }% +}% +\endinput +%% +%% End of file `lwarp-mwe.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-nicematrix.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-nicematrix.sty index 52e8f2c297b..d8762302c3e 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-nicematrix.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-nicematrix.sty @@ -97,6 +97,7 @@ }% } \CustomizeMathJax{\let\hdottedline\hdashline} +\CustomizeMathJax{\let\Hline\hline} \CustomizeMathJax{\newcommand{\ldots}[1][]{\dots}} \CustomizeMathJax{\newcommand{\Cdots}[1][]{\cdots}} diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx-v2.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx-v2.sty index 5009c7e3032..f7ac9e0342a 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx-v2.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-siunitx-v2.sty @@ -29,6 +29,12 @@ \DeclareSIUnit\planckbar{\LWR@siunitx@textplanckbar} }% AtBeginDocument +\AtBeginDocument{ +\HTMLnewcolumntype{S}{c} +\HTMLnewcolumntype{s}{c} +} + + \ExplSyntaxOn \cs_set_protected:Npn \__siunitx_print_aux: { diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-statex2.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-statex2.sty index a003d482a93..e1bb2b23a6c 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-statex2.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-statex2.sty @@ -86,7 +86,7 @@ \CustomizeMathJax{\newcommand{\iid}{\;\stackrel{\mb{\mathrm{iid}}}{\sim}\;}} \CustomizeMathJax{\newcommand{\ind}{\;\stackrel{\mb{\mathrm{ind}}}{\sim}\;}} \CustomizeMathJax{\newcommand{\indpr}{% - \;\stackrel{\mb{\mathrm{ind}}}{\stackrel{\mb{\mathrm{prior}}}{\sim}}\;% + \;\stackrel{\mb{\mathrm{ind}}}{\stackrel{\mb{\mathrm{prior}}}{\sim}}\; }} \CustomizeMathJax{\newcommand{\post}{\;\stackrel{\mb{\mathrm{post}}}{\sim}\;}} \CustomizeMathJax{\newcommand{\prior}{\;\stackrel{\mb{\mathrm{prior}}}{\sim}\;}} diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-tabularx.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-tabularx.sty index 7e92bfd07c8..f66a2b055a5 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-tabularx.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-tabularx.sty @@ -20,14 +20,15 @@ \LWR@ProvidesPackageDrop{tabularx}[2016/02/03] \RequirePackage{array} +\def\tabularxcolumn#1{p{#1}} +\newcolumntype{X}{p{1in}} \DeclareDocumentEnvironment{tabularx}{m o m} -{\tabular{#3}} -{\endtabular} + {\tabular{#3}} + {\endtabular} \DeclareDocumentEnvironment{tabularx*}{m o m} -{\tabular{#3}} -{\endtabular} - + {\tabular{#3}} + {\endtabular} \endinput %% %% End of file `lwarp-tabularx.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-tabulary.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-tabulary.sty index 34f90324b8b..abdead7a4af 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-tabulary.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-tabulary.sty @@ -27,7 +27,10 @@ \NewDocumentEnvironment{tabulary*}{m o m} {\tabular{#3}} {\endtabular} - +\newcolumntype{L}{l} +\newcolumntype{C}{c} +\newcolumntype{R}{r} +\newcolumntype{J}{l} \newdimen\tymin \newdimen\tymax \def\tyformat{} diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-textcomp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-textcomp.sty index 1e78f0318b7..60efecc649a 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-textcomp.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-textcomp.sty @@ -153,6 +153,7 @@ }% FilenameNullify }% AtBeginDocument +\CustomizeMathJax{\require{textcomp}} \endinput %% %% End of file `lwarp-textcomp.sty'. diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-upgreek.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-upgreek.sty index 8867ad622b7..99963919c6f 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-upgreek.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-upgreek.sty @@ -16,14 +16,8 @@ %% and version 1.3 or later is part of all distributions of LaTeX %% version 2005/12/01 or later. \LWR@ProvidesPackagePass{upgreek}[2003/02/12] -\LWR@origRequirePackage{lwarp-common-mathjax-letters} - \begin{warpMathJax} -\LWR@infoprocessingmathjax{upgreek} - -\LWR@mathjax@addgreek@l@up{up}{} -\LWR@mathjax@addgreek@u@up{Up}{} - +\CustomizeMathJax{\require{upgreek}} \end{warpMathJax} \endinput %% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty index 1596d07a9e5..83dd68dfd44 100644 --- a/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty +++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-xcolor.sty @@ -111,10 +111,6 @@ padding:\LWR@printlength{\fboxsep}% \endgroup% } -\AtBeginDocument{ - \LWR@formatted{colorbox} -} - \NewDocumentCommand{\LWR@HTML@colorboxBlock}{O{named} m +m}{% \begingroup% \LWR@hook@processingtags% @@ -129,10 +125,6 @@ padding:\LWR@printlength{\fboxsep}% \global\booltrue{LWR@minipagethispar}% } -\AtBeginDocument{ - \LWR@formatted{colorboxBlock} -} - \NewDocumentCommand{\LWR@HTML@fcolorbox}{O{named} m O{#1} m +m}{% \LWR@traceinfo{HTML fcolorbox #2 #4}% \begingroup% @@ -153,10 +145,6 @@ padding:\LWR@printlength{\fboxsep}% \endgroup% } -\AtBeginDocument{ - \LWR@formatted{fcolorbox} -} - \NewDocumentCommand{\LWR@HTML@fcolorboxBlock}{O{named} m O{#1} m +m}{% \LWR@traceinfo{HTML fcolorboxBlock #2 #4}% \begingroup% @@ -185,10 +173,6 @@ padding:\LWR@printlength{\fboxsep}% \LWR@traceinfo{HTML fcolorboxBlock done}% } -\AtBeginDocument{ - \LWR@formatted{fcolorboxBlock} -} - \NewDocumentCommand{\LWR@subfcolorminipage}{m m m m}{% \LWR@stoppars% \begin{BlockClass}[% @@ -218,10 +202,6 @@ width:\LWR@printlength{\LWR@tempwidth}% \end{BlockClass}% \global\booltrue{LWR@minipagethispar}% } - -\AtBeginDocument{ -\LWR@formattedenv{fcolorminipage} -} \newcommand*{\LWR@HTML@boxframe}[3]{% {% \setlength{\LWR@tempwidth}{#1}% diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty index 50306247b96..cbda8bad396 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} - [2021/07/17 v0.900 Allows LaTeX to directly produce HTML5 output.] + [2021/08/27 v0.901 Allows LaTeX to directly produce HTML5 output.] @@ -195,6 +195,7 @@ \LWR@checkloadnever{cals}{} \LWR@checkloadnever{cellspace}{} \LWR@checkloadnever{cgloss4e}{} +\LWR@checkloadnever{collcell}{} \LWR@checkloadnever{colophon}{} \LWR@checkloadnever{cooltooltips}{} \LWR@checkloadnever{covington}{} @@ -508,6 +509,7 @@ \LWR@loadafter{lips} \LWR@loadafter{listings} \LWR@loadafter{listliketab} +\LWR@loadafter{lltjp-tascmac} \LWR@loadafter{longtable} \LWR@loadafter{lpic} \LWR@loadafter{lscape} @@ -568,6 +570,7 @@ \LWR@loadafter{multirow} \LWR@loadafter{multitoc} \LWR@loadafter{musicography} +\LWR@loadafter{mwe} \LWR@loadafter{nameauth} \LWR@loadafter{nameref} \LWR@loadafter{natbib} @@ -1330,6 +1333,16 @@ {\LWR@excludecomment{warpMathJax}{mathjax}} \end{warpHTML} +\begin{warpprint} +\LWR@includecomment{warpsvg}{mathsvg} +\end{warpprint} + +\begin{warpHTML} +\ifbool{mathjax} + {\LWR@excludecomment{warpsvg}{mathsvg}} + {\LWR@includecomment{warpsvg}{mathsvg}} +\end{warpHTML} + \ifbool{LWR@creatinglwarpmk} {\LWR@includecomment{LWRcreatelwarpmk}{lwarpmk}} {\LWR@excludecomment{LWRcreatelwarpmk}{lwarpmk}} @@ -1816,21 +1829,43 @@ \begin{warpHTML} \newcommand*{\LWR@formatting}{HTML} \newcommand*{\LWR@formatted@checkname}[1]{% + \ifcsundef{#1}{% + \ifcsundef{LWR@print@#1}{% + \PackageError{lwarp} + {% + \LWRbackslash#1 or \protect\LWR@print@#1\MessageBreak + must be defined before using \protect\LWR@formatted, etc% + } + {Perhaps #1 is misspelled.} + }{\relax}% + }{\relax}% \ifcsundef{LWR@HTML@#1}{% \PackageError{lwarp} {% - \protect\LWR@HTML@#1 is not defined% + \protect\LWR@HTML@#1 must be defined + before using \protect\LWR@formatted, etc% } - {Perhaps it is misspelled.} + {Perhaps #1 is misspelled.} }{\relax}% } \newcommand*{\LWR@formatted@checkendname}[1]{% + \ifcsundef{end#1}{% + \ifcsundef{endLWR@print@#1}{% + \PackageError{lwarp} + {% + \protect\end#1 or \protect\endLWR@print@#1\MessageBreak + must be defined before using \protect\LWR@formatted, etc% + } + {Perhaps #1 is misspelled.} + }{\relax}% + }{\relax}% \ifcsundef{endLWR@HTML@#1}{% \PackageError{lwarp} {% - \protect\endLWR@HTML@#1 is not defined% + \protect\endLWR@HTML@#1 must be defined + before using \protect\LWR@formatted, etc% } - {Perhaps it is misspelled.} + {Perhaps #1 is misspelled.} }{\relax}% } \newcommand*{\LWR@formatted}[1]{% @@ -1899,6 +1934,15 @@ } \end{warpHTML} +\begin{warpprint} + +\newcommand*{\LWR@formatted}[1]{} +\newcommand*{\LWR@expandableformatted}[1]{} +\newcommand*{\LWR@formattedenv}[1]{} +\newcommand*{\LWR@expandableformattedenv}[1]{} + +\end{warpprint} + \begin{warpall} \newbool{FormatEPUB} \boolfalse{FormatEPUB} @@ -2430,9 +2474,11 @@ kbd, span.texttt, p span.texttt { pre { padding: 3pt ; } -span.strong, span.textbf, div.strong, div.textbf { font-weight: bold; } +span.strong, span.textbf, div.strong, div.textbf, table td.tdbfseries { font-weight: bold; } + +span.textit, div.textit, table td.tditshape { font-style: italic; } -span.textit, div.textit { font-style: italic; } +table td.tdbfit { font-weight: bold ; font-style:italic } span.textmd, div.textmd { font-weight: normal; } @@ -3311,6 +3357,12 @@ figure.subfigure, figure.subtable { div.figurecaption .minipage { margin:0 ; padding: 0 } +/* for subcaptions: */ +figure div.minipage div.figurecaption { + max-width: 100% ; /* fallback if min() does not work */ + max-width: min(30em,100%) +} + div.minipage figure { border: none ; box-shadow: none ; } div.minipage figure.table { margin: 0ex } div.minipage div.footnotes { margin: 1ex 2em 0ex 2em } @@ -3322,12 +3374,20 @@ div.floatrow figure { display: inline-block ; margin: 1ex 2% ; } div.floatfoot { font-size: .85em ; border-top: 1px solid silver ; line-height: 1.2 ; } +/* Center if only one line, "start" align if more than one line: */ div.figurecaption , .lstlistingtitle { font-size: .85em ; - text-align: center ; font-weight: bold ; - margin-top: 1ex ; - margin-bottom: 1ex ; + text-align: start ; + margin: 1ex auto; + width: max-content; + max-width: 100%; +} + +/* A marginblock is small, so always center and don't mess with the width. */ +div.marginblock div.figurecaption { + width: 100% ; + text-align: center ; } figure.subfigure div.figurecaption, figure.subtable div.figurecaption { @@ -3391,9 +3451,6 @@ 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 ; } table td.tdb { text-align: left ; vertical-align: top ; } -table td.tdP { text-align: center ; vertical-align: bottom ; } -table td.tdM { text-align: center ; vertical-align: middle ; } -table td.tdB { text-align: center ; vertical-align: top ; } table td.tvertbarl { border-left: 1px solid black } table td.tvertbarldouble { border-left: 4px double black } @@ -3405,6 +3462,10 @@ table td.tvertbarldoubledash { border-left: 2px dashed black } table td.tvertbarrdash { border-right: 1px dashed black } table td.tvertbarrdoubledash { border-right: 2px dashed black } +table td.tdcenter { text-align: center} +table td.tdleft { text-align: left} +table td.tdright { text-align: right} + /* for cmidrules: */ table td.tdrule { border-top: 1px solid #A0A0A0 ; @@ -4762,7 +4823,7 @@ MathJax = { -- Copyright 2016-2021 Brian Dunn -printversion = "v0.900" +printversion = "v0.901" requiredconfversion = "2" -- also at *lwarpmk.conf function printhelp () @@ -9104,7 +9165,7 @@ end -- not --version } \newcommand*{\LWR@colparameter}{} -\newcommand*{\LWR@parseatcolumn}{% +\newcommand*{\LWR@parseatcolumn}[1]{% \LWR@traceinfo{at column}% \defaddtocounter{LWR@tablecolspecindex}{1}% \LWR@traceinfo{about to read the next token:}% @@ -9134,7 +9195,7 @@ end -- not --version \let\LWR@colparameter\relax% \booltrue{LWR@validtablecol}% } -\newcommand*{\LWR@parsebangcolumn}{% +\newcommand*{\LWR@parsebangcolumn}[1]{% \LWR@traceinfo{bang column}% \defaddtocounter{LWR@tablecolspecindex}{1}% \LWR@traceinfo{about to read the next token:}% @@ -9160,31 +9221,63 @@ end -- not --version \let\LWR@colparameter\relax% \booltrue{LWR@validtablecol}% } -\newcommand*{\LWR@parsebeforecolumn}{% +\newcommand*{\LWR@checkbeforeaddclass}[2]{% + \ifcsstrequal{LWR@tempone}{#1}% + {% + \LWR@setexparray{LWR@coladdclass}% + {\arabic{LWR@tabletotalLaTeXcolsnext}}% + { #2}% space is intentional + }{}% +} +\newcommand*{\LWR@checkmathcolpar}{% + \IfSubStr{\detokenize\expandafter{\LWR@colparameter}}{\LWRdollar}% + {% + \PackageError{lwarp}% + {% + Lwarp does not support `$' in column specifiers.\MessageBreak + Specify `$' math for each cell in the column.\MessageBreak + Enter 'h' for more info% + }% + {% + For example, replace `>{$}c<{$}' with `c', and then\MessageBreak + use `$cell contents$' for each cell in the column.% + }% + }{}% +} +\newcommand*{\LWR@parsebeforecolumn}[1]{% \defaddtocounter{LWR@tablecolspecindex}{1}% \expandarg% \StrChar{\LWR@origcolspec}% {\arabic{LWR@tablecolspecindex}}[\LWR@colparameter]% \fullexpandarg% + \LWR@checkmathcolpar% \LWR@setexparray{LWR@colbeforespec}% {\arabic{LWR@tabletotalLaTeXcolsnext}}% {\expandafter\@firstofone\LWR@colparameter}% + \edef\LWR@tempone{\expandafter\@firstofone\LWR@colparameter}% + \LWR@checkbeforeaddclass{LWR@detect@centeringarraybackslash}{tdcenter} + \LWR@checkbeforeaddclass{LWR@detect@raggedrightarraybackslash}{tdleft} + \LWR@checkbeforeaddclass{LWR@detect@raggedleftarraybackslash}{tdright} + \LWR@checkbeforeaddclass{LWR@detect@itshape}{tditshape} + \LWR@checkbeforeaddclass{LWR@detect@bfseries}{tdbfseries} + \LWR@checkbeforeaddclass{LWR@detect@bfit}{tdbfit} \let\LWR@colparameter\relax% \booltrue{LWR@validtablecol}% } -\newcommand*{\LWR@parseaftercolumn}{% +\newcommand*{\LWR@parseaftercolumn}[1]{% \defaddtocounter{LWR@tablecolspecindex}{1}% \expandarg% \StrChar{\LWR@origcolspec}% {\arabic{LWR@tablecolspecindex}}[\LWR@colparameter]% \fullexpandarg% + \LWR@checkmathcolpar% \LWR@setexparray{LWR@colafterspec}% {\arabic{LWR@tabletotalLaTeXcols}}% {\expandafter\@firstofone\LWR@colparameter}% \let\LWR@colparameter\relax% \booltrue{LWR@validtablecol}% } -\newcommand*{\LWR@parsebarcolumn}{% +\newcommand*{\LWR@parsebarcolumn}[1]{% \LWR@traceinfo{LWR@parsebarcolumn}% \ifnumcomp{\value{LWR@tabletotalLaTeXcols}}{=}{0}% {% left edge of the table: @@ -9209,7 +9302,7 @@ end -- not --version }% \booltrue{LWR@validtablecol}% } -\newcommand*{\LWR@parsecoloncolumn}{% +\newcommand*{\LWR@parsecoloncolumn}[1]{% \LWR@traceinfo{LWR@parsecoloncolumn}% \ifnumcomp{\value{LWR@tabletotalLaTeXcols}}{=}{0}% {% left edge of the table: @@ -9230,11 +9323,10 @@ end -- not --version }% \booltrue{LWR@validtablecol}% } -\newcommand*{\LWR@parsesemicoloncolumn}{% - \LWR@parsecoloncolumn% - \defaddtocounter{LWR@tablecolspecindex}{1}% +\newcommand*{\LWR@parsesemicoloncolumn}[1]{% + \LWR@parsecoloncolumn{}% } -\newcommand*{\LWR@parsenormalcolumn}[1]{% +\newcommand*{\LWR@HTML@LWR@parsenormalcolumn}[1]{% \defaddtocounter{LWR@tabletotalLaTeXcols}{1}% \defaddtocounter{LWR@tabletotalLaTeXcolsnext}{1}% \LWR@setexparray{LWR@tablecolspec}{\arabic{LWR@tabletotalLaTeXcols}}{#1}% @@ -9244,71 +9336,111 @@ end -- not --version \LWR@setexparray{LWR@colbeforespec}{\arabic{LWR@tabletotalLaTeXcolsnext}}{}% \LWR@setexparray{LWR@colafterspec}{\arabic{LWR@tabletotalLaTeXcolsnext}}{}% \LWR@setexparray{LWR@colbarspec}{\arabic{LWR@tabletotalLaTeXcolsnext}}{}% + \LWR@setexparray{LWR@coladdclass}{\arabic{LWR@tabletotalLaTeXcolsnext}}{}% \booltrue{LWR@validtablecol}% } -\newcommand*{\LWR@parsepcolumn}[1]{% - \LWR@parsenormalcolumn{#1}% - \defaddtocounter{LWR@tablecolspecindex}{1}% -} +\newcommand*{\LWR@print@LWR@parsenormalcolumn}[1]{} -\newcommand*{\LWR@parsewcolumn}{% +\LWR@formatted{LWR@parsenormalcolumn} + +\newcommand*{\LWR@parsewcolumn}[1]{% \LWR@columnspeclookahead{1}% \expandafter\LWR@parsenormalcolumn\expandafter{\LWR@strresulttwo}% - \defaddtocounter{LWR@tablecolspecindex}{2}% } -\newcommand*{\LWR@parsestarcolumn}{% - \defaddtocounter{LWR@tablecolspecindex}{2}% -} +\newcommand*{\LWR@parsestarcolumn}[1]{} -\newcommand*{\LWR@parseDcolumn}[1]{% - \LWR@parsenormalcolumn{#1}% - \defaddtocounter{LWR@tablecolspecindex}{3}% + +\newcommand*{\LWR@expandpreamble}[1]{% + \edef\@tempa{\@temptokena={#1}}% + \@tempa% + \@tempswatrue% + \@whilesw\if@tempswa\fi{% + \@tempswafalse\the\NC@list% + }% } -\newcount\LWR@starcount -\newcommand*{\LWR@expcolspec}{} -\newcounter{LWR@splitstarindex} -\newcounter{LWR@splitstarcopies} -\newcommand*{\LWR@splitstarcontents}{} -\newcommand*{\expandcolspec}{% - \StrPosition{\LWR@origcolspec}{*}[\LWR@tempone]% - \whileboolexpr{ test {\ifnumgreater{\LWR@tempone}{0}}}% - {% - \setcounter{LWR@splitstarindex}{\LWR@tempone}% - \addtocounter{LWR@splitstarindex}{-1}% - \StrLeft{\LWR@origcolspec}{\value{LWR@splitstarindex}}[\LWR@expcolspec]% - \addtocounter{LWR@splitstarindex}{2}% - \StrChar{\LWR@origcolspec}{\value{LWR@splitstarindex}}[\LWR@tempone]% - \setcounter{LWR@splitstarcopies}{\expandafter\@firstofone\LWR@tempone}% - \addtocounter{LWR@splitstarindex}{1}% - \StrChar{\LWR@origcolspec}{\value{LWR@splitstarindex}}[\LWR@splitstarcontents]% - \ifnumgreater{\value{LWR@splitstarcopies}}{0}% - {% - \LWR@starcount=\value{LWR@splitstarcopies}% - \loop - \appto\LWR@expcolspec{% - \expandafter\@firstofone\LWR@splitstarcontents% +\newcommand*{\LWR@modifycolumntype}[5]{% + \LWR@traceinfo{LWR@modifycolumntype !#1!#2!#3!#4!#5!}% + \LWR@traceinfo{LWR@modifycolumntype #1}% + \edef\@tempa{% + \noexpand\csdef{LWR@columntype@#1}{% + \noexpand\@nameuse{#3}{#1}% + \noexpand\defaddtocounter{LWR@tablecolspecindex}{#2}% }% - \advance \LWR@starcount -1 - \ifnum \LWR@starcount>0 \repeat - }{}% - \StrGobbleLeft{\LWR@origcolspec}{\value{LWR@splitstarindex}}[\colspecremainder]% - \appto{\LWR@expcolspec}{\colspecremainder}% - \edef\LWR@origcolspec{\LWR@expcolspec}% - \StrPosition{\LWR@origcolspec}{*}[\LWR@tempone]% - }% + \noexpand\csdef{LWR@columntype@mctype@#1}{% + \noexpand\@nameuse{#4}{#1}% + }% + \noexpand\csdef{LWR@columntype@mcdata@#1}{% + \noexpand\@nameuse{#5}{#2}% + }% + }% + \@tempa% + \LWR@traceinfo{LWR@modifycolumntype done}% } +\LWR@modifycolumntype{l}{0}{LWR@parsenormalcolumn} + {LWR@printmccoltype@normal}{LWR@printmccoldata@normal} + +\LWR@modifycolumntype{c}{0}{LWR@parsenormalcolumn} + {LWR@printmccoltype@normal}{LWR@printmccoldata@normal} + +\LWR@modifycolumntype{r}{0}{LWR@parsenormalcolumn} + {LWR@printmccoltype@normal}{LWR@printmccoldata@normal} +\LWR@modifycolumntype{@}{0}{LWR@parseatcolumn} + {LWR@printmccoltype@ignore}{LWR@printmccoldata@other} + +\LWR@modifycolumntype{!}{0}{LWR@parsebangcolumn} + {LWR@printmccoltype@ignore}{LWR@printmccoldata@other} + +\LWR@modifycolumntype{>}{0}{LWR@parsebeforecolumn} + {LWR@printmccoltype@ignore}{LWR@printmccoldata@other} + +\LWR@modifycolumntype{<}{0}{LWR@parseaftercolumn} + {LWR@printmccoltype@ignore}{LWR@printmccoldata@other} + +\LWR@modifycolumntype{|}{0}{LWR@parsebarcolumn} + {LWR@printmccoltype@vertbar}{LWR@printmccoldata@skip} + +\LWR@modifycolumntype{:}{0}{LWR@parsecoloncolumn} + {LWR@printmccoltype@colon}{LWR@printmccoldata@skip} +\LWR@modifycolumntype{;}{1}{LWR@parsesemicoloncolumn} + {LWR@printmccoltype@semicolon}{LWR@printmccoldata@skip} +\LWR@modifycolumntype{p}{1}{LWR@parsenormalcolumn} + {LWR@printmccoltype@normal}{LWR@printmccoldata@paragraph} + +\LWR@modifycolumntype{m}{1}{LWR@parsenormalcolumn} + {LWR@printmccoltype@normal}{LWR@printmccoldata@paragraph} + +\LWR@modifycolumntype{b}{1}{LWR@parsenormalcolumn} + {LWR@printmccoltype@normal}{LWR@printmccoldata@paragraph} +\LWR@modifycolumntype{w}{2}{LWR@parsewcolumn} + {LWR@printmccoltype@normal}{LWR@printmccoldata@normal} + +\LWR@modifycolumntype{W}{2}{LWR@parsewcolumn} + {LWR@printmccoltype@normal}{LWR@printmccoldata@normal} +\LWR@modifycolumntype{*}{2}{LWR@parsestarcolumn} + {LWR@printmccoltype@ignore}{LWR@printmccoldata@skip} +\NewDocumentCommand{\HTMLnewcolumntype}{m O{0} m}{% + \expandafter\newcommand\expandafter*% + \csname LWR@HTML@NC@rewrite@#1\endcsname[#2]{\NC@find #3}% + \LWR@formatted{NC@rewrite@#1}% +} +\end{warpHTML} +\begin{warpprint} +\NewDocumentCommand{\HTMLnewcolumntype}{m O{0} m}{} +\end{warpprint} +\begin{warpHTML} \newcommand*{\LWR@parsetablecols}[1]{% \LWR@traceinfo{LWR@parsetablecols}% \renewcommand*{\LWR@origcolspec}{#1}% \expandarg% \StrSubstitute{\LWR@origcolspec}{ }{}[\LWR@origcolspec]% - \expandcolspec% + \LWR@expandpreamble{\LWR@origcolspec}% + \edef\LWR@origcolspec{\the\@temptokena}% \defcounter{LWR@tabletotalLaTeXcols}{0}% \defcounter{LWR@tabletotalLaTeXcolsnext}{1}% \LWR@setexparray{LWR@colatspec}{leftedge}{}% @@ -9329,6 +9461,9 @@ end -- not --version \LWR@setexparray{LWR@colbarspec}{1}{}% \LWR@setexparray{LWR@colbarspec}{2}{}% \LWR@setexparray{LWR@colbarspec}{3}{}% + \LWR@setexparray{LWR@coladdclass}{1}{}% + \LWR@setexparray{LWR@coladdclass}{2}{}% + \LWR@setexparray{LWR@coladdclass}{3}{}% \defcounter{LWR@tablecolspecindex}{1}% \expandarg% \StrLen{\LWR@origcolspec}[\LWR@strresult]% @@ -9352,37 +9487,13 @@ end -- not --version \ifbool{LWR@opttablecol}% {}% inside an optional argument {% not an optional tabular argument - \IfStrEq{\LWR@strresult}{l}{\LWR@parsenormalcolumn{l}}{}% - \IfStrEq{\LWR@strresult}{c}{\LWR@parsenormalcolumn{c}}{}% - \IfStrEq{\LWR@strresult}{r}{\LWR@parsenormalcolumn{r}}{}% - \IfStrEq{\LWR@strresult}{L}{\LWR@parsenormalcolumn{l}}{}% - \IfStrEq{\LWR@strresult}{C}{\LWR@parsenormalcolumn{c}}{}% - \IfStrEq{\LWR@strresult}{R}{\LWR@parsenormalcolumn{r}}{}% - \IfStrEq{\LWR@strresult}{J}{\LWR@parsenormalcolumn{l}}{}% - \IfStrEq{\LWR@strresult}{S}{\LWR@parsenormalcolumn{c}}{}% - \IfStrEq{\LWR@strresult}{s}{\LWR@parsenormalcolumn{c}}{}% - \IfStrEq{\LWR@strresult}{\detokenize{@}}{\LWR@parseatcolumn}{}% - \IfStrEq{\LWR@strresult}{!}{\LWR@parsebangcolumn}{}% - \IfStrEq{\LWR@strresult}{>}{\LWR@parsebeforecolumn}{}% - \IfStrEq{\LWR@strresult}{<}{\LWR@parseaftercolumn}{}% - \IfStrEq{\LWR@strresult}{|}{\LWR@parsebarcolumn}{}% - \IfStrEq{\LWR@strresult}{:}{\LWR@parsecoloncolumn}{}% - \IfStrEq{\LWR@strresult}{;}{\LWR@parsesemicoloncolumn}{}% - \IfStrEq{\LWR@strresult}{p}{\LWR@parsepcolumn{p}}{}% - \IfStrEq{\LWR@strresult}{m}{\LWR@parsepcolumn{m}}{}% - \IfStrEq{\LWR@strresult}{b}{\LWR@parsepcolumn{b}}{}% - \IfStrEq{\LWR@strresult}{w}{\LWR@parsewcolumn}{}% - \IfStrEq{\LWR@strresult}{W}{\LWR@parsewcolumn}{}% - \IfStrEq{\LWR@strresult}{*}{\LWR@parsestarcolumn}{}% - \IfStrEq{\LWR@strresult}{D}{\LWR@parseDcolumn{c}}{}% - \IfStrEq{\LWR@strresult}{X}{\LWR@parsenormalcolumn{X}}{}% - \IfStrEq{\LWR@strresult}{P}{\LWR@parsepcolumn{P}}{}% - \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}% - }% + \ifcsdef{LWR@columntype@\LWR@strresult}% + {\csuse{LWR@columntype@\LWR@strresult}}% + {}% + \ifbool{LWR@validtablecol}{}{% + \LWR@traceinfo{invalid column type: \LWR@strresult}% + \LWR@parsenormalcolumn{l}% + }% }% not an optional column argument \IfStrEq{\LWR@strresult}{]}{\boolfalse{LWR@opttablecol}}{}% \defaddtocounter{LWR@tablecolspecindex}{1}% @@ -9471,8 +9582,8 @@ end -- not --version \LWR@tdendstyles% }% \ifboolexpr{bool{LWR@tabularmutemods} or bool{LWR@emptyatbang}}% - {}% - {\LWR@atbangspec}% + {}% + {\LWR@atbangspec}% \LWR@htmltag{/td}\LWR@orignewline% \global\booltrue{LWR@tabularcelladded}% }% not empty @@ -9515,6 +9626,8 @@ end -- not --version \LWR@addcmidruletrim% \LWR@addleftmostbartag% \LWR@printbartag{\arabic{LWR@tableLaTeXcolindex}}% + \LWR@getexparray{LWR@coladdclass}% + {\arabic{LWR@tableLaTeXcolindex}}% \textquotedbl{}% \LWR@tdstartstyles% \LWR@addcmidrulewidth% @@ -9532,11 +9645,7 @@ end -- not --version \ifboolexpr{% test{ \ifdefstring{\LWR@strresult}{p} } or test{ \ifdefstring{\LWR@strresult}{m} } or - test{ \ifdefstring{\LWR@strresult}{b} } or - test{ \ifdefstring{\LWR@strresult}{P} } or - test{ \ifdefstring{\LWR@strresult}{M} } or - test{ \ifdefstring{\LWR@strresult}{B} } or - test{ \ifdefstring{\LWR@strresult}{X} } + test{ \ifdefstring{\LWR@strresult}{b} } }% {% allow pars \LWR@traceinfo{LWR@tabledatasinglecolumntag: about to LWR@startpars}% @@ -9725,9 +9834,6 @@ end -- not --version \IfSubStr{#1}{p}{\LWR@WPcell{left}{bottom}}{}% \IfSubStr{#1}{m}{\LWR@WPcell{left}{middle}}{}% \IfSubStr{#1}{b}{\LWR@WPcell{left}{top}}{}% - \IfSubStr{#1}{P}{\LWR@WPcell{center}{bottom}}{}% - \IfSubStr{#1}{M}{\LWR@WPcell{center}{middle}}{}% - \IfSubStr{#1}{B}{\LWR@WPcell{center}{top}}{}% }{}% } @@ -9872,100 +9978,70 @@ end -- not --version +\newcommand*{\LWR@printmccoltype@normal}[1]{% + #1% + \boolfalse{LWR@mcolvertbaronleft}% +} + +\newcommand*{\LWR@printmccoltype@ignore}[1]{}% + +\newcommand*{\LWR@printmccoltype@vertbar}[1]{% + \ifbool{LWR@mcolvertbaronleft}% + {\defaddtocounter{LWR@mcolvertbarsl}{1}}% left edge + {\defaddtocounter{LWR@mcolvertbarsr}{1}}% not left edge +} + +\newcommand*{\LWR@printmccoltype@colon}[1]{% + \ifbool{LWR@mcolvertbaronleft}% + {\defaddtocounter{LWR@mcolvertbarsldash}{1}}% left edge + {\defaddtocounter{LWR@mcolvertbarsrdash}{1}}% not left edge +} + +\let\LWR@printmccoltype@semicolon\LWR@printmccoltype@colon + \newcommand*{\LWR@printmccoltype}[1]{% \LWR@traceinfo{lwr@printmccoltype -#1-}% \StrChar{#1}{\arabic{LWR@tablemulticolspos}}[\LWR@strresult]% - \IfStrEq{\LWR@strresult}{l}{l}{}% - \IfStrEq{\LWR@strresult}{c}{c}{}% - \IfStrEq{\LWR@strresult}{r}{r}{}% - \IfStrEq{\LWR@strresult}{p}{p}{}% - \IfStrEq{\LWR@strresult}{m}{m}{}% - \IfStrEq{\LWR@strresult}{b}{b}{}% - \IfStrEq{\LWR@strresult}{P}{P}{}% - \IfStrEq{\LWR@strresult}{M}{M}{}% - \IfStrEq{\LWR@strresult}{B}{B}{}% - \IfStrEq{\LWR@strresult}{w}{w}{}% - \IfStrEq{\LWR@strresult}{W}{W}{}% - \IfStrEq{\LWR@strresult}{S}{c}{}% - \IfStrEq{\LWR@strresult}{s}{c}{}% - \IfStrEq{\LWR@strresult}{X}{p}{}% - \IfStrEq{\LWR@strresult}{|}% - {% - \ifbool{LWR@mcolvertbaronleft}% - {\defaddtocounter{LWR@mcolvertbarsl}{1}}% left edge - {\defaddtocounter{LWR@mcolvertbarsr}{1}}% not left edge - }% - {% - \IfStrEq{\LWR@strresult}{:}% - {% - \ifbool{LWR@mcolvertbaronleft}% - {\defaddtocounter{LWR@mcolvertbarsldash}{1}}% left edge - {\defaddtocounter{LWR@mcolvertbarsrdash}{1}}% not left edge - }% - {% - \IfStrEq{\LWR@strresult}{;}% - {% - \ifbool{LWR@mcolvertbaronleft}% - {\defaddtocounter{LWR@mcolvertbarsldash}{1}}% left edge - {\defaddtocounter{LWR@mcolvertbarsrdash}{1}}% not left edge - }% - {\boolfalse{LWR@mcolvertbaronleft}}% - }% - }% + \edef\LWR@strresult{\detokenize\expandafter{\LWR@strresult}}% + \ifcsdef{LWR@columntype@mctype@\LWR@strresult}% + {\csuse{LWR@columntype@mctype@\LWR@strresult}}% + {\boolfalse{LWR@mcolvertbaronleft}}% \LWR@traceinfo{lwr@printmccoltype done}% } -\newcommand*{\LWR@multicolpartext}[1]{% - \LWR@startpars% - \LWR@multicoltext% - \defaddtocounter{LWR@tablemulticolspos}{#1}% - \LWR@stoppars% -} - -\newcommand*{\LWR@multicolother}[1]{% +\newcommand*{\LWR@printmccoldata@other}[2]{% \defaddtocounter{LWR@tablemulticolspos}{1}% - \StrChar{#1}{\arabic{LWR@tablemulticolspos}}[\LWR@strresult]% + \StrChar{#2}{\arabic{LWR@tablemulticolspos}}[\LWR@strresult]% \LWR@strresult% \booltrue{LWR@validtablecol}% } -\newcommand*{\LWR@multicolskip}{% +\newcommand*{\LWR@printmccoldata@skip}[2]{% + \defaddtocounter{LWR@tablemulticolspos}{#1}% \booltrue{LWR@validtablecol}% } + +\newcommand*{\LWR@printmccoldata@normal}[2]{% + \LWR@multicoltext% + \defaddtocounter{LWR@tablemulticolspos}{#1}% +} + +\newcommand*{\LWR@printmccoldata@paragraph}[2]{% + \LWR@startpars% + \LWR@multicoltext% + \defaddtocounter{LWR@tablemulticolspos}{#1}% + \LWR@stoppars% +} + \newcommand*{\LWR@printmccoldata}[1]{% \LWR@traceinfo{lwr@printmccoldata -#1}% \boolfalse{LWR@validtablecol}% \StrChar{#1}{\arabic{LWR@tablemulticolspos}}[\LWR@strresult]% \edef\LWR@printmccoldatatoken{\LWR@strresult}% - \IfStrEq{\LWR@printmccoldatatoken}{l}{\LWR@multicoltext}{}% - \IfStrEq{\LWR@printmccoldatatoken}{c}{\LWR@multicoltext}{}% - \IfStrEq{\LWR@printmccoldatatoken}{r}{\LWR@multicoltext}{}% - \IfStrEq{\LWR@printmccoldatatoken}{D}{% - \defaddtocounter{LWR@tablemulticolspos}{3}% skip parameters - \LWR@multicoltext% - }{}% - \IfStrEq{\LWR@printmccoldatatoken}{p}{\LWR@multicolpartext{2}}{}% - \IfStrEq{\LWR@printmccoldatatoken}{m}{\LWR@multicolpartext{2}}{}% - \IfStrEq{\LWR@printmccoldatatoken}{b}{\LWR@multicolpartext{2}}{}% - \IfStrEq{\LWR@printmccoldatatoken}{P}{\LWR@multicolpartext{2}}{}% - \IfStrEq{\LWR@printmccoldatatoken}{M}{\LWR@multicolpartext{2}}{}% - \IfStrEq{\LWR@printmccoldatatoken}{B}{\LWR@multicolpartext{2}}{}% - \IfStrEq{\LWR@printmccoldatatoken}{w}{\LWR@multicolpartext{3}}{}% - \IfStrEq{\LWR@printmccoldatatoken}{W}{\LWR@multicolpartext{3}}{}% - \IfStrEq{\LWR@printmccoldatatoken}{S}{\LWR@multicoltext}{}% - \IfStrEq{\LWR@printmccoldatatoken}{s}{\LWR@multicoltext}{}% - \IfStrEq{\LWR@printmccoldatatoken}{X}{\LWR@multicolpartext{1}}{}% - \IfStrEq{\LWR@printmccoldatatoken}{|}{\LWR@multicolskip}{}% - \IfStrEq{\LWR@printmccoldatatoken}{:}{\LWR@multicolskip}{}% - \IfStrEq{\LWR@printmccoldatatoken}{;}{% - \LWR@multicolskip% - \defaddtocounter{LWR@tablemulticolspos}{1}% skip parameter - }{}% - \IfStrEq{\LWR@printmccoldatatoken}{\detokenize{@}}{\LWR@multicolother{#1}}{}% - \IfStrEq{\LWR@printmccoldatatoken}{\detokenize{!}}{\LWR@multicolother{#1}}{}% - \IfStrEq{\LWR@printmccoldatatoken}{\detokenize{>}}{\LWR@multicolother{#1}}{}% - \IfStrEq{\LWR@printmccoldatatoken}{\detokenize{<}}{\LWR@multicolother{#1}}{}% + \ifcsdef{LWR@columntype@mcdata@\LWR@printmccoldatatoken}% + {\csuse{LWR@columntype@mcdata@\LWR@printmccoldatatoken}{#1}}% + {}% \ifbool{LWR@validtablecol}{}{\LWR@multicoltext{}}% \LWR@traceinfo{lwr@printmccoldata done}% } @@ -9981,7 +10057,7 @@ end -- not --version }% }% {% - #2{#1}% + \csuse{#2}{#1}% \defaddtocounter{LWR@tablemulticolspos}{1}% }% } @@ -10034,6 +10110,8 @@ end -- not --version #6% \booltrue{LWR@validtablecol}% }% + \LWR@expandpreamble{#5}% + \edef\LWR@origmccolspec{\the\@temptokena}% \defcounter{LWR@lastmulticolumn}{\value{LWR@tableLaTeXcolindex}}% \defaddtocounter{LWR@lastmulticolumn}{#3}% \defaddtocounter{LWR@lastmulticolumn}{-1}% @@ -10049,7 +10127,7 @@ end -- not --version \defcounter{LWR@mcolvertbarsldash}{0}% \defcounter{LWR@mcolvertbarsrdash}{0}% \booltrue{LWR@mcolvertbaronleft}% - \LWR@parsemulticolumnalignment{#5}{\LWR@printmccoltype}% + \LWR@parsemulticolumnalignment{\LWR@origmccolspec}{LWR@printmccoltype}% \LWR@subaddcmidruletrim% {% \LWR@getexparray{LWR@trimlrules}% @@ -10088,11 +10166,11 @@ end -- not --version \LWR@addcdashline% \LWR@addtabularhrulecolor% \LWR@addmulticolvertrulecolor% - \LWR@addformatwpalignment{#5}% + \LWR@addformatwpalignment{\LWR@origmccolspec}% \LWR@tdendstyles% }% end of the opening table data tag \boolfalse{LWR@intabularmetadata}% - \LWR@parsemulticolumnalignment{#5}{\LWR@printmccoldata}% + \LWR@parsemulticolumnalignment{\LWR@origmccolspec}{LWR@printmccoldata}% } @@ -10117,7 +10195,7 @@ end -- not --version \LWR@tabularhtmlcolumns{1}{\arabic{LWR@tabletotalLaTeXcols}}% \LWR@domulticolumn{\arabic{LWR@tabletotalLaTeXcols}}% {\arabic{LWR@tabhtmlcoltotal}}% - {P}% + {p}% {% \LWR@domulticolumn \IfBooleanTF{#1}% star? {% yes star @@ -13190,6 +13268,12 @@ end -- not --version {\LWR@print@fcolorminipage} {\endLWR@print@fcolorminipage} +\LWR@formatted{colorbox} +\LWR@formatted{colorboxBlock} +\LWR@formatted{fcolorbox} +\LWR@formatted{fcolorboxBlock} +\LWR@formattedenv{fcolorminipage} + \LWR@traceinfo{xcolor patches done} }{}% xcolor loaded }% AtBeginDocument @@ -13597,6 +13681,7 @@ color:\LWR@origpound\LWR@tempcolor% \LWR@formatted{textbf} +\@ifpackageloaded{nfssext-cfr}{ \DeclareRobustCommand{\LWR@HTML@texteb}[1]{% {% \LWR@HTML@ebweight% @@ -13605,7 +13690,11 @@ color:\LWR@origpound\LWR@tempcolor% } \LWR@formatted{texteb} +}{% if not loaded + \providerobustcmd{\texteb}[1]{} +} +\@ifpackageloaded{nfssext-cfr}{ \DeclareRobustCommand{\LWR@HTML@textlg}[1]{% {% \LWR@HTML@lgweight% @@ -13614,6 +13703,9 @@ color:\LWR@origpound\LWR@tempcolor% } \LWR@formatted{textlg} +}{% if not loaded + \providerobustcmd{\textlg}[1]{} +} \DeclareRobustCommand{\LWR@HTML@textrm}[1]{% {% @@ -13776,17 +13868,21 @@ color:\LWR@origpound\LWR@tempcolor% } \LWR@formatted{bfseries} +\@ifpackageloaded{nfssext-cfr}{ \newrobustcmd*{\LWR@HTML@ebweight}{% \LWR@print@ebweight% \renewcommand*{\LWR@f@series}{eb}% } \LWR@formatted{ebweight} +}{} +\@ifpackageloaded{nfssext-cfr}{ \newrobustcmd*{\LWR@HTML@lgweight}{% \LWR@print@lgweight% \renewcommand*{\LWR@f@series}{lg}% } \LWR@formatted{lgweight} +}{} \newrobustcmd*{\LWR@HTML@rmfamily}{% \LWR@print@rmfamily% @@ -14316,6 +14412,16 @@ color:\LWR@origpound\LWR@tempcolor% \end{warpHTML} \begin{warpHTML} +\RequirePackage{array} +\edef\LWR@detect@centeringarraybackslash{\centering\arraybackslash} +\edef\LWR@detect@raggedrightarraybackslash{\raggedright\arraybackslash} +\edef\LWR@detect@raggedleftarraybackslash{\raggedleft\arraybackslash} +\def\LWR@detect@itshape{\itshape} +\def\LWR@detect@bfseries{\bfseries} +\def\LWR@detect@bfit{\bfseries\itshape} +\end{warpHTML} + +\begin{warpHTML} \AtBeginDocument{ \@ifpackageloaded{everyshi}{ \RequirePackage{lwarp-everyshi} @@ -14595,6 +14701,7 @@ color:\LWR@origpound\LWR@tempcolor% {Keys/values are ignored in MathJax.\MessageBreak \protect\Cdots, etc. do not span multiple cells.\MessageBreak AutoNiceMatrix, etc. are not supported for MathJax.\MessageBreak + \protect\CodeBefore\space cannot be done with MathJax.\MessageBreak \LWR@forceSVGmessage{nicematrix}% } \LWR@nomathjaxwarn{pb-diagram} |