summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-08-28 20:38:00 +0000
committerKarl Berry <karl@freefriends.org>2021-08-28 20:38:00 +0000
commit09b8b2978a8611b9b0b5c22555499d941fccb5b1 (patch)
tree4564d3163963858e57fb5855d932174b332d15e9 /Master/texmf-dist/tex/latex/lwarp/lwarp.sty
parent36898810305246554a1e0e8a046879cb7c9e6db3 (diff)
lwarp (28aug21)
git-svn-id: svn://tug.org/texlive/trunk@60345 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp/lwarp.sty')
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp.sty485
1 files changed, 296 insertions, 189 deletions
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}