summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/lwarp
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-10-07 22:12:24 +0000
committerKarl Berry <karl@freefriends.org>2017-10-07 22:12:24 +0000
commit2fbf92614d7ece5991c30761bf90e7bbf0b6f93e (patch)
treef2cfda3751473fce80878f05273401d4d2c63f15 /Master/texmf-dist/tex/latex/lwarp
parentc394414696e3895403a2f2d599cee160e10d38de (diff)
lwarp (7oct17)
git-svn-id: svn://tug.org/texlive/trunk@45496 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/lwarp')
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-adjmulticol.sty3
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp-multirow.sty14
-rw-r--r--Master/texmf-dist/tex/latex/lwarp/lwarp.sty463
3 files changed, 361 insertions, 119 deletions
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-adjmulticol.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-adjmulticol.sty
index 9408e96bc7a..4a4454d8bc5 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-adjmulticol.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-adjmulticol.sty
@@ -17,8 +17,7 @@
%% version 2005/12/01 or later.
\LWR@ProvidesPackageDrop{adjmulticol}
\RequirePackage{multicol}
-\newlength{\LWR@templengthone}%
-\newlength{\LWR@templengthtwo}%
+
\NewDocumentEnvironment{adjmulticols}{s m m m}
{%
\setlength{\LWR@templengthone}{#3}%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp-multirow.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp-multirow.sty
index 94ce1f9aafb..95c0eb81367 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp-multirow.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp-multirow.sty
@@ -24,6 +24,7 @@
{%
\LWR@traceinfo{*** multirow #1 #2 #4}
\LWR@maybenewtablerow%
+\LWR@tabularleftedge%
\LWR@htmltag{td rowspan="#2" %
\IfValueT{#1}{%
\ifstrequal{#1}{b}{style="vertical-align:bottom" }{}%
@@ -32,12 +33,17 @@
\ifdefvoid{\LWR@multirowborder}{}{%
style="border-\LWR@multirowborder: 2px dotted black ; %
padding-\LWR@multirowborder: 2px" %
-}
+}%
class="td%
\StrChar{\LWR@tablecolspec}{\theLWR@tablecolspos}%
-\ifthenelse{\equal{\LWR@getexparray{LWR@midrules}{\theLWR@tablecolspos}}{Y}}{rule}{}%
-"{}}
-\begingroup \LetLtxMacro{\\}{\LWR@endofline} #6 \endgroup
+\LWR@addcmidruletrim%
+\LWR@addleftmostbartag%
+\LWR@printbartag{\theLWR@tablecolspos}%
+"%
+\LWR@addcmidrulewidth%
+}%
+\LWR@getexparray{LWR@colbeforespec}{\theLWR@tablecolspos}%
+\begingroup\LetLtxMacro{\\}{\LWR@endofline}#6\endgroup%
\LWR@stoppars%
\global\boolfalse{LWR@intabularmetadata}%
\renewcommand{\LWR@multirowborder}{}%
diff --git a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
index 09b09364a47..b5810e6e6b6 100644
--- a/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
+++ b/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
@@ -17,7 +17,7 @@
%% version 2005/12/01 or later.
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{lwarp}
- [2017/09/25 v0.40 Allows LaTeX to directly produce HTML5 output.]
+ [2017/10/07 v0.41 Allows LaTeX to directly produce HTML5 output.]
@@ -1611,15 +1611,15 @@ figure div.floatrow div.minipage figcaption {
table {
margin: 1ex auto 1ex auto ;
- border-collapse: collapse ;
+ border-collapse: separate ;
border-spacing: 0px ;
line-height: 1.3 ;
}
-tr.hline {border-top: 1px solid silver ; margin-top: 0ex ;
+tr.hline td {border-top: 1px solid #808080 ; margin-top: 0ex ;
margin-bottom: 0ex ; } /* for \hline */
-tr.tbrule {border-top: 1px solid black ; margin-top: 0ex ;
+tr.tbrule td {border-top: 1px solid black ; margin-top: 0ex ;
margin-bottom: 0ex ; } /* for \toprule, \bottomrule */
td {padding: 1ex .5em 1ex .5em ;}
@@ -1635,28 +1635,30 @@ 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.tdlrule { text-align: left ; border-top: 1px solid silver ;
- vertical-align: middle ; } /* for cmidrule */
-table td.tdcrule { text-align: center ; border-top: 1px solid silver ;
- vertical-align: middle ; }
-table td.tdatrule { text-align: center ; border-top: 1px solid silver ;
- vertical-align: middle ; padding: 0px ; margin: 0px ; }
-table td.tdbangrule { text-align: center ; border-top: 1px solid silver ;
- vertical-align: middle ; } /* for cmidrule */
-table td.tdrrule { text-align: right ; border-top: 1px solid silver ;
- vertical-align: middle ; }
-table td.tdprule { text-align: left ; border-top: 1px solid silver ;
- vertical-align: bottom ; }
-table td.tdmrule { text-align: left ; border-top: 1px solid silver ;
- vertical-align: middle ; }
-table td.tdbrule { text-align: left ; border-top: 1px solid silver ;
- vertical-align: top ; }
-table td.tdPrule { text-align: center ; border-top: 1px solid silver ;
- vertical-align: bottom ; }
-table td.tdMrule { text-align: center ; border-top: 1px solid silver ;
- vertical-align: middle ; }
-table td.tdBrule { text-align: center ; border-top: 1px solid silver ;
- vertical-align: top ; }
+
+table td.tvertbarl { border-left: 1px solid black }
+table td.tvertbarr { border-right: 1px solid black }
+
+/* for cmidrules: */
+table td.tdrule {
+ border-top: 1px solid #A0A0A0 ;
+}
+
+table td.tdrulel {
+ border-top-left-radius:.5em ;
+ border-top: 1px solid #A0A0A0 ;
+}
+
+table td.tdruler {
+ border-top-right-radius:.5em ;
+ border-top: 1px solid #A0A0A0 ;
+}
+
+table td.tdrulelr {
+ border-top-left-radius:.5em ;
+ border-top-right-radius:.5em ;
+ border-top: 1px solid #A0A0A0 ;
+}
/* Margins of paragraphs inside table cells: */
td.tdp p , td.tdprule p , td.tdP p , td.tdPrule p { padding-top: 1ex ;
@@ -2637,7 +2639,7 @@ src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-
-- Print the usage of the lwarpmk command:
-printversion = "v0.40"
+printversion = "v0.41"
function printhelp ()
print ("lwarpmk: Use lwarpmk -h or lwarpmk --help for help.") ;
@@ -3456,50 +3458,49 @@ end -- not --version
\providecommand*{\LWR@FBcancel}{}
-\AtBeginDocument{
-\@ifundefined{frenchbsetup}
-{}
-{
- \frenchbsetup{FrenchFootnotes=false}
- % OR: redefine \insertfootnotemarkFB?
- \LetLtxMacro\LWR@FBcancel\NoAutoSpacing
+\AtBeginDocument{%
+\@ifundefined{frenchbsetup}%
+{}%
+{%
+ \frenchbsetup{FrenchFootnotes=false}%
+ \LetLtxMacro\LWR@FBcancel\NoAutoSpacing%
\renewcommand*{\FBcolonspace}{%
\begingroup%
\LWR@FBcancel%
\LWR@origampersand{}nbsp;%
\endgroup%
- }
+ }%
\renewcommand*{\FBthinspace}{%
\begingroup%
\LWR@FBcancel%
\LWR@origampersand\#x202f;% \,
\endgroup%
- }
+ }%
\renewcommand*{\FBguillspace}{%
\begingroup%
\LWR@FBcancel%
\LWR@origampersand{}nbsp;% ~, for \og xyz \fg{}
\endgroup%
- }
+ }%
\DeclareDocumentCommand{\FBmedkern}{}{%
\begingroup%
\LWR@FBcancel%
\LWR@origampersand\#x202f;% \,
\endgroup%
- }
+ }%
\DeclareDocumentCommand{\FBthickkern}{}{%
\begingroup%
\LWR@FBcancel%
\LWR@origampersand{}nbsp;% ~
\endgroup%
- }
+ }%
\renewcommand*{~}{\HTMLentity{nbsp}}% was overwritten by babel-french
- \ifFBunicode
- \else
- \DeclareTextSymbol{\FBtextellipsis}{LY1}{133}
- \DeclareTextCommandDefault{\FBtextellipsis}{\textellipsis\xspace}
- \fi
-}
+ \ifFBunicode%
+ \else%
+ \DeclareTextSymbol{\FBtextellipsis}{LY1}{133}%
+ \DeclareTextCommandDefault{\FBtextellipsis}{\textellipsis\xspace}%
+ \fi%
+}%
}
@@ -5056,36 +5057,60 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\newbool{LWR@doingtbrule}
\boolfalse{LWR@doingtbrule}
+\newbool{LWR@doingcmidrule}
+\boolfalse{LWR@doingcmidrule}
+
\newbool{LWR@tableparcell}
\newbool{LWR@skippingmrowcell}
+\newbool{LWR@skippingmcolrowcell}
+
\newbool{LWR@skipatbang}
+\newbool{LWR@emptyatbang}
+
\newbool{LWR@intabularmetadata}
\boolfalse{LWR@intabularmetadata}
+\newcommand*{\LWR@insertatbangcols}{%
+\ifbool{LWR@skipatbang}%
+{}%
+{%
+ \LWR@printatbang{at}{\theLWR@tablecolspos}%
+ \LWR@printatbang{bang}{\theLWR@tablecolspos}%
+}%
+}
+
\newcommand*{\LWR@closetabledatacell}{%
\global\booltrue{LWR@intabularmetadata}%
\ifbool{LWR@exitingtabular}{}%
{% not exiting tabular
- \ifbool{LWR@skippingmrowcell}{}%
+ \ifboolexpr{bool{LWR@skippingmrowcell} or bool{LWR@skippingmcolrowcell}}%
+ {%
+ \ifbool{LWR@skippingmcolrowcell}%
+ {}%
+ {\LWR@insertatbangcols}%
+ }%
{% not skippingmrowcell
\unskip%
- \LWR@getexparray{LWR@colafterspec}{\theLWR@tablecolspos}%
+ \ifboolexpr{%
+ bool{LWR@tabularmutemods} or
+ bool{LWR@skipatbang} or
+ bool{LWR@emptyatbang}
+ }%
+ {}%
+ {\LWR@getexparray{LWR@colafterspec}{\theLWR@tablecolspos}}%
\ifbool{LWR@tableparcell}{\LWR@stoppars}{}%
\global\boolfalse{LWR@tableparcell}%
\leavevmode\unskip\LWR@htmltag{/td}\LWR@orignewline%
- \ifbool{LWR@skipatbang}%
- {\boolfalse{LWR@skipatbang}}%
- {%
- \LWR@printatbang{at}{\theLWR@tablecolspos}%
- \LWR@printatbang{bang}{\theLWR@tablecolspos}%
- }% not skipping at or bang
+ \LWR@insertatbangcols%
}% not skipping mrowcell
}% not exiting tabular
\global\boolfalse{LWR@skippingmrowcell}%
+\global\boolfalse{LWR@skippingmcolrowcell}%
+\global\boolfalse{LWR@skipatbang}%
}
\newcounter{LWR@tabulardepth}
@@ -5120,14 +5145,47 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
}
+\newcommand*{\LWR@tabularfinishrow}{%
+\ifboolexpr{%
+ not bool {LWR@exitingtabular} or%
+ bool{LWR@doingtbrule} or%
+ bool{LWR@doingcmidrule} or%
+ bool{LWR@doinghline} or%
+ bool{LWR@startedrow}%
+}{%
+\begingroup%
+\ifbool{LWR@exitingtabular}{%
+ \booltrue{LWR@tabularmutemods}%
+}{}%
+\boolfalse{LWR@exitingtabular}%
+\whiledo{\value{LWR@tablecolspos}<\value{LWR@tabletotalcols}}{%
+\LWR@tabledatasinglecolumntag%
+ \LWR@closetabledatacell%
+ \addtocounter{LWR@tablecolspos}{1}%
+ \global\booltrue{LWR@emptyatbang}%
+ \LWR@getmynexttoken%
+}%
+\LWR@closetabledatacell%
+\endgroup%
+\global\boolfalse{LWR@emptyatbang}%
+}{}% ifboolexpr
+}
+
+
\NewDocumentCommand{\LWR@tabularendofline}{s o}
{%
-\LWR@closetabledatacell%
+\ifthenelse{\value{LWR@tablecolspos}<\value{LWR@tabletotalcols}}{%
+ \LWR@tabularfinishrow%
+}%
+{%
+ \LWR@closetabledatacell%
+}%
\LWR@htmltag{/tr}\LWR@orignewline
\global\booltrue{LWR@intabularmetadata}
\global\boolfalse{LWR@startedrow}
\global\boolfalse{LWR@doinghline}%
\global\boolfalse{LWR@doingtbrule}%
+\global\boolfalse{LWR@doingcmidrule}%
\LWR@clearmidrules%
\setcounter{LWR@tablecolspos}{1}
\LWR@getmynexttoken%
@@ -5219,7 +5277,15 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\let\LWR@colparameter\relax%
\booltrue{LWR@validtablecol}%
}
-\newcommand*{\LWR@parseskipcolumn}{%
+\newcommand*{\LWR@parsebarcolumn}{%
+\LWR@traceinfo{bar column}%
+\ifthenelse{\cnttest{\value{LWR@tabletotalcols}}=0}%
+{% left edge of the table:
+ \LWR@setexparray{LWR@colbarspec}{leftedge}{tvertbarl}%
+}%
+{% not at the left edge:
+ \LWR@setexparray{LWR@colbarspec}{\theLWR@tabletotalcols}{tvertbarr}%
+}%
\booltrue{LWR@validtablecol}%
}
\newcommand*{\LWR@parsenormalcolumn}[1]{%
@@ -5231,6 +5297,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@setexparray{LWR@colbangspec}{\theLWR@tabletotalcolsnext}{}%
\LWR@setexparray{LWR@colbeforespec}{\theLWR@tabletotalcolsnext}{}%
\LWR@setexparray{LWR@colafterspec}{\theLWR@tabletotalcolsnext}{}%
+\LWR@setexparray{LWR@colbarspec}{\theLWR@tabletotalcolsnext}{}%
\booltrue{LWR@validtablecol}%
}
@@ -5266,6 +5333,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\LWR@setexparray{LWR@colafterspec}{1}{}%
\LWR@setexparray{LWR@colafterspec}{2}{}%
\LWR@setexparray{LWR@colafterspec}{3}{}%
+\LWR@setexparray{LWR@colbarspec}{leftedge}{}%
+\LWR@setexparray{LWR@colbarspec}{1}{}%
+\LWR@setexparray{LWR@colbarspec}{2}{}%
+\LWR@setexparray{LWR@colbarspec}{3}{}%
\setcounter{LWR@tablecolspos}{1}%
\LWR@traceinfo{about to StrLen}%
\noexpandarg%
@@ -5291,7 +5362,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\IfStrEq{\LWR@strresult}{!}{\LWR@parsebangcolumn}{}%
\IfStrEq{\LWR@strresult}{>}{\LWR@parsebeforecolumn}{}%
\IfStrEq{\LWR@strresult}{<}{\LWR@parseaftercolumn}{}%
-\IfStrEq{\LWR@strresult}{|}{\LWR@parseskipcolumn}{}%
+\IfStrEq{\LWR@strresult}{|}{\LWR@parsebarcolumn}{}%
\IfStrEq{\LWR@strresult}{p}{\LWR@parsepcolumn{p}}{}%
\IfStrEq{\LWR@strresult}{m}{\LWR@parsepcolumn{m}}{}%
\IfStrEq{\LWR@strresult}{b}{\LWR@parsepcolumn{b}}{}%
@@ -5317,30 +5388,73 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\global\booltrue{LWR@startedrow}%
\global\booltrue{LWR@intabularmetadata}%
\ifbool{LWR@doinghline}%
- {\LWR@htmltag{tr class="hline"{}}\LWR@orignewline}%
+ {%
+ \LWR@htmltag{tr class="hline" }%
+ \LWR@orignewline%
+ }%
{% not doing hline
\ifbool{LWR@doingtbrule}%
- {\LWR@htmltag{tr class="tbrule"{}}\LWR@orignewline}%
+ {%
+ \LWR@htmltag{tr class="tbrule"}%
+ \LWR@orignewline%
+ }%
{\LWR@htmltag{tr}\LWR@orignewline}%
}% end of not doing hline
}% end of not started the row
}
+\newcommand*{\LWR@printbartag}[1]{%
+\ifboolexpr{bool{LWR@tabularmutemods} or bool{LWR@emptyatbang}}%
+{%
+}%
+{ % not muting
+ \ifstrequal{#1}{leftedge}{%
+ \LWR@getexparray{LWR@colbarspec}{leftedge} %
+ }%
+ {
+ \LWR@getexparray{LWR@colbarspec}{#1} %
+ \edef\LWR@tempone{\LWR@getexparray{LWR@colbarspec}{#1}}%
+ } %
+}% not muting
+}
+
+
\newcommand*{\LWR@printatbang}[2]{%
-\edef\LWR@atbangspec{\LWR@getexparray{LWR@col#1spec}{#2}}
-\LWR@traceinfo{atbang: !\LWR@atbangspec!}
+\edef\LWR@atbangspec{\LWR@getexparray{LWR@col#1spec}{#2}}%
+\LWR@traceinfo{atbang: #2 !\LWR@atbangspec!}%
\ifdefempty{\LWR@atbangspec}%
{}%
-{%
- \LWR@htmltag{td class="td#1%
- \ifthenelse{\equal{\LWR@getexparray{LWR@midrules}{\theLWR@tablecolspos}}{Y}}{rule}{}%
- "}%
- \LWR@atbangspec%
+{% not empty
+ \LWR@htmltag{%
+ td class="td#1%
+ \LWR@subaddcmidruletrim{}{}%
+ \LWR@printbartag{#2}%
+ "%
+ \LWR@addcmidrulewidth%
+ }%
+ \ifboolexpr{bool{LWR@tabularmutemods} or bool{LWR@emptyatbang}}%
+ {}%
+ {\LWR@atbangspec}%
\LWR@htmltag{/td}\LWR@orignewline%
-}%
+}% not empty
}%
+\newcommand*{\LWR@addleftmostbartag}{%
+\ifnumcomp{\value{LWR@tablecolspos}}{=}{1}{%
+ \LWR@printbartag{leftedge}%
+}{}%
+}
+
+\newcommand*{\LWR@tabularleftedge}{%
+\ifthenelse{\cnttest{\value{LWR@tablecolspos}}=1}%
+{%
+ \LWR@printatbang{at}{leftedge}%
+ \LWR@printatbang{bang}{leftedge}%
+}% left edge
+{}% not left edge
+}
+
\newcommand*{\LWR@tabledatasinglecolumntag}%
{%
@@ -5349,19 +5463,16 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
{%
\ifbool{LWR@exitingtabular}{}%
{% not exiting tabular
- \ifthenelse{\cnttest{\value{LWR@tablecolspos}}=1}%
- {%
- \LWR@printatbang{at}{leftedge}%
- \LWR@printatbang{bang}{leftedge}%
- }% left edge
- {}% not left edge
+ \LWR@tabularleftedge%
\StrChar{\LWR@tablecolspec}{\theLWR@tablecolspos}[\LWR@strresult]%
\LWR@htmltag{td class="td%
\LWR@strresult%
- \ifthenelse{\equal{\LWR@getexparray{LWR@midrules}{\theLWR@tablecolspos}}{Y}}%
- {rule}%
- {}%
- "{}}%
+ \LWR@addcmidruletrim%
+ \LWR@addleftmostbartag%
+ \LWR@printbartag{\theLWR@tablecolspos}%
+ "%
+ \LWR@addcmidrulewidth%
+ }%
\ifthenelse{%
\equal{\LWR@strresult}{p}\OR%
\equal{\LWR@strresult}{m}\OR%
@@ -5376,15 +5487,31 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\global\booltrue{LWR@tableparcell}%
}% allow pars
{}% no pars
- \LWR@getexparray{LWR@colbeforespec}{\theLWR@tablecolspos}%
+ \ifboolexpr{bool{LWR@tabularmutemods} or bool{LWR@emptyatbang}}%
+ {}%
+ {\LWR@getexparray{LWR@colbeforespec}{\theLWR@tablecolspos}}%
\global\boolfalse{LWR@intabularmetadata}%
}% not exiting tabular
}{}% in tabular metadata
}%
+
+
\newcounter{LWR@midrulecounter}
+\newlength{\LWR@heavyrulewidth}
+\setlength{\LWR@heavyrulewidth}{.08em}
+
+\newlength{\LWR@lightrulewidth}
+\setlength{\LWR@lightrulewidth}{.05em}
+
+\newlength{\LWR@cmidrulewidth}
+\setlength{\LWR@cmidrulewidth}{.03em}
+
+\newlength{\LWR@thiscmidrulewidth}
+\setlength{\LWR@thiscmidrulewidth}{\LWR@cmidrulewidth}
+
\newcommand*{\LWR@clearmidrules}
{%
\setcounter{LWR@midrulecounter}{1}%
@@ -5392,7 +5519,10 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\cnttest{\value{LWR@midrulecounter}}{<=}{\value{LWR@tablecolswidth}}%
}%
{%
-\LWR@setexparray{LWR@midrules}{\theLWR@midrulecounter}{}%
+\LWR@setexparray{LWR@midrules}{\theLWR@midrulecounter}{0pt}%
+\setlength{\LWR@thiscmidrulewidth}{\LWR@cmidrulewidth}%
+\LWR@setexparray{LWR@trimlrules}{\theLWR@midrulecounter}{}%
+\LWR@setexparray{LWR@trimrrules}{\theLWR@midrulecounter}{}%
\addtocounter{LWR@midrulecounter}{1}%
}%
}
@@ -5401,14 +5531,57 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\setcounter{LWR@midrulecounter}{#3}%
\whiledo{\cnttest{\value{LWR@midrulecounter}}{<=}{#4}}%
{%
-\LWR@setexparray{LWR@midrules}{\theLWR@midrulecounter}{Y}%
+\LWR@setexparray{LWR@midrules}{\theLWR@midrulecounter}{#1}%
\addtocounter{LWR@midrulecounter}{1}%
-}% end of the whiledo
+}% whiledo
+\IfSubStr{#2}{l}{\LWR@setexparray{LWR@trimlrules}{#3}{l}}{}%
+\IfSubStr{#2}{r}{\LWR@setexparray{LWR@trimrrules}{#4}{r}}{}%
+\booltrue{LWR@doingcmidrule}%
}
-\NewDocumentCommand{\LWR@docmidrule}{o d() >{\SplitArgument{1}{-}}m}%
+\NewDocumentCommand{\LWR@docmidrule}{O{\LWR@cmidrulewidth} D(){} >{\SplitArgument{1}{-}}m}%
{\LWR@subcmidrule{#1}{#2}#3}
+\newlength{\LWR@templengthone}%
+\newlength{\LWR@templengthtwo}%
+
+\newcommand*{\LWR@subaddcmidruletrim}[2]{%
+\setlength{\LWR@templengthone}{\LWR@getexparray{LWR@midrules}{\theLWR@tablecolspos}}%
+\ifdimcomp{\LWR@templengthone}{>}{0pt}%
+{%
+ \LWR@origtilde tdrule#1#2%
+ \setlength{\LWR@thiscmidrulewidth}{\LWR@templengthone}%
+}{}%
+}
+
+\newcommand*{\LWR@addcmidruletrim}{%
+\LWR@subaddcmidruletrim%
+{\LWR@getexparray{LWR@trimlrules}{\theLWR@tablecolspos}}%
+{\LWR@getexparray{LWR@trimrrules}{\theLWR@tablecolspos}}%
+}
+
+\newcommand{\LWR@addrulewidth}[2]{%
+\ifdimcomp{#1}{=}{#2}%
+{}% default width
+{% custom width
+ \LWR@forceminwidth{#1}%
+ \uselengthunit{PT} % explicit space
+ style="border-top:\rndprintlength{\LWR@atleastonept} solid %
+ \ifdimcomp{#1}{<}{\LWR@lightrulewidth}%
+ {\#A0A0A0}%
+ {% lightrule or heaver
+ \ifdimcomp{#1}{<}{\LWR@heavyrulewidth}%
+ {\#808080}%
+ {black}%
+ }% lightrule or heavier
+ "%
+}% custom width
+}
+
+\newcommand{\LWR@addcmidrulewidth}{%
+\LWR@addrulewidth{\LWR@thiscmidrulewidth}{\LWR@cmidrulewidth}%
+}
+
\newcounter{LWR@tablemulticolswidth}
@@ -5499,6 +5672,7 @@ link rel="stylesheet" type="text/css" href="\LWR@currentcss" /}%
\booltrue{LWR@validtablecol}%
}%
\LWR@maybenewtablerow%
+\LWR@tabularleftedge%
\LWR@htmltag{td colspan="#3" %
\IfValueT{#2}{ % rows?
rowspan="#2" %
@@ -5509,8 +5683,11 @@ rowspan="#2" %
}% rows?
class="td%
\LWR@parsemulticolumnalignment{#4}{\LWR@printmccoltype}%
-\ifthenelse{\equal{\LWR@getexparray{LWR@midrules}{\theLWR@tablecolspos}}{Y}}{rule}{}%
+\LWR@addcmidruletrim%
+\LWR@addleftmostbartag%
+\LWR@printbartag{\theLWR@tablecolspos}%
"%
+\LWR@addcmidrulewidth%
}% end of the opening table data tag
\global\boolfalse{LWR@intabularmetadata}%
\LWR@parsemulticolumnalignment{#4}{\LWR@printmccoldata}%
@@ -5605,18 +5782,18 @@ rowspan="#2" %
\setcounter{LWR@tabhtmlcolend}{#1}%
\addtocounter{LWR@tabhtmlcolend}{#2}%
\whiledo{\value{LWR@tabhtmlcolindex}<\value{LWR@tabhtmlcolend}}{%
-\edef\LWR@atbangspec{\LWR@getexparray{LWR@colatspec}{\theLWR@tabhtmlcolindex}}%
-\ifdefempty{\LWR@atbangspec}{}{\addtocounter{LWR@tabhtmlcoltotal}{1}}%
-\edef\LWR@atbangspec{\LWR@getexparray{LWR@colbangspec}{\theLWR@tabhtmlcolindex}}%
-\ifdefempty{\LWR@atbangspec}{}{\addtocounter{LWR@tabhtmlcoltotal}{1}}%
-\addtocounter{LWR@tabhtmlcolindex}{1}%
-}%
-\ifthenelse{\value{LWR@tablecolspos}=1}{%
- \edef\LWR@atbangspec{\LWR@getexparray{LWR@colatspec}{leftedge}}%
- \ifdefempty{\LWR@atbangspec}{}{\addtocounter{LWR@tabhtmlcoltotal}{1}}%
- \edef\LWR@atbangspec{\LWR@getexparray{LWR@colbangspec}{leftedge}}%
- \ifdefempty{\LWR@atbangspec}{}{\addtocounter{LWR@tabhtmlcoltotal}{1}}%
-}{}%
+ \edef\LWR@atbangspec{\LWR@getexparray{LWR@colatspec}%
+ {\theLWR@tabhtmlcolindex}}%
+ \ifdefempty{\LWR@atbangspec}%
+ {}%
+ {\addtocounter{LWR@tabhtmlcoltotal}{1}}%
+ \edef\LWR@atbangspec{\LWR@getexparray{LWR@colbangspec}%
+ {\theLWR@tabhtmlcolindex}}%
+ \ifdefempty{\LWR@atbangspec}%
+ {}%
+ {\addtocounter{LWR@tabhtmlcoltotal}{1}}%
+ \addtocounter{LWR@tabhtmlcolindex}{1}%
+}% whiledo
}
\end{warpHTML}
\begin{warpall}
@@ -5648,8 +5825,6 @@ rowspan="#2" %
\end{warpall}
\begin{warpHTML}
\newcommand*{\LWR@donothing}{}
-\newcommand*{\LWR@domidrule}{\booltrue{LWR@doinghline}}
-\newcommand*{\LWR@dotbrule}{\booltrue{LWR@doingtbrule}}
\newcommand*{\ldelim}{}
\newcommand*{\rdelim}{}
@@ -5665,6 +5840,7 @@ rowspan="#2" %
\newcommand*{\ResumeTabular}{%
\global\boolfalse{LWR@exitingtabular}%
+\global\boolfalse{LWR@tabularmutemods}%
\LWR@getmynexttoken%
}
@@ -5681,6 +5857,8 @@ rowspan="#2" %
\newbool{LWR@exitingtabular}
+\newbool{LWR@tabularmutemods}
+
\newcommand*{\LWR@tabledatacolumntag}%
{%
\LWR@traceinfo{LWR@tabledatacolumntag}%
@@ -5697,6 +5875,8 @@ rowspan="#2" %
{\let\mynext\LWR@donothing}{}%
\ifdefequal{\LWR@mynexttoken}{\mrowcell}%
{\let\mynext\LWR@donothing}{}%
+\ifdefequal{\LWR@mynexttoken}{\mcolrowcell}%
+ {\let\mynext\LWR@donothing}{}%
\ifdefequal{\LWR@mynexttoken}{\TabularMacro}%
{\let\mynext\LWR@donothing}{}%
\ifdefequal{\LWR@mynexttoken}{\hline}%
@@ -5727,9 +5907,17 @@ rowspan="#2" %
\end{warpHTML}
-
\begin{warpall}
+
\newcommand*{\mrowcell}{}
+
+\end{warpall}
+
+
+\begin{warpall}
+
+\newcommand*{\mcolrowcell}{}
+
\end{warpall}
@@ -5743,9 +5931,28 @@ rowspan="#2" %
\newcommand*{\LWR@origspecialrule}[3]{\hline}
\AtBeginDocument{
\@ifpackageloaded{lwarp-tabls}
-{\newcommand*{\LWR@hline}[1][]{\LWR@domidrule\LWR@getmynexttoken}}
-{\newcommand*{\LWR@hline}{\LWR@domidrule\LWR@getmynexttoken}}
+{\newcommand*{\LWR@hline}[1][]{%
+ \booltrue{LWR@doinghline}%
+ \LWR@getmynexttoken}}
+{\newcommand*{\LWR@hline}{%
+ \booltrue{LWR@doinghline}%
+ \LWR@getmynexttoken}}
+}% AtBeginDocument
+
+\AtBeginDocument{
+\@ifundefined{frenchbsetup}%
+{% no babel-french
+ \newcommand*{\LWR@nullifyNoAutoSpacing}{}
+}% no babel-french
+{% yes babel-french
+ \newcommand*{\LWR@nullifyNoAutoSpacing}{%
+ \NoAutoSpacing%
+ \renewcommand*{\NoAutoSpacing}{}%
+ \renewcommand*{\LWR@FBcancel}{}%
+ }
+}% yes babel-french
}% AtBeginDocument
+
\StartDefiningTabulars
\newenvironment*{LWR@tabular}[2][]
@@ -5755,8 +5962,10 @@ rowspan="#2" %
\global\boolfalse{LWR@startedrow}%
\global\boolfalse{LWR@doinghline}%
\global\boolfalse{LWR@doingtbrule}%
-\LWR@FBcancel%
+\global\boolfalse{LWR@doingcmidrule}%
+\LWR@nullifyNoAutoSpacing%
\boolfalse{LWR@exitingtabular}%
+\boolfalse{LWR@tabularmutemods}%
\global\booltrue{LWR@intabularmetadata}%
\LWR@forcenewpage
\LWR@htmlblocktag{table}%
@@ -5769,24 +5978,47 @@ rowspan="#2" %
\renewcommand*{\hline}{\LWR@hline}%
\RenewDocumentCommand{\cline}{m}%
{\LWR@docmidrule{##1}\LWR@getmynexttoken}%
-
-\DeclareDocumentCommand{\toprule}{o}{\LWR@dotbrule\LWR@getmynexttoken}%
-
-\DeclareDocumentCommand{\midrule}{o}{\LWR@domidrule\LWR@getmynexttoken}%
-
-\DeclareDocumentCommand{\cmidrule}{o d() m}%
+\DeclareDocumentCommand{\toprule}{o d()}
+ {%
+ \IfValueTF{##1}%
+ {\LWR@docmidrule[##1](){1-\theLWR@tabletotalcols}}%
+ {\booltrue{LWR@doingtbrule}}%
+ \LWR@getmynexttoken}%
+\DeclareDocumentCommand{\midrule}{o d()}%
+ {%
+ \IfValueTF{##1}%
+ {\LWR@docmidrule[##1](){1-\theLWR@tabletotalcols}}%
+ {\booltrue{LWR@doinghline}}%
+ \LWR@getmynexttoken}%
+\DeclareDocumentCommand{\cmidrule}{O{\LWR@cmidrulewidth} d() m}%
{\LWR@docmidrule[##1](##2){##3}\LWR@getmynexttoken}%
-
-\DeclareDocumentCommand{\bottomrule}{o}{\LWR@dotbrule\LWR@getmynexttoken}%
-\DeclareDocumentCommand{\addlinespace}{o}{}
-\DeclareDocumentCommand{\morecmidrules}{}{}
-\DeclareDocumentCommand{\specialrule}{m m m}{\LWR@domidrule\LWR@getmynexttoken}
+\DeclareDocumentCommand{\bottomrule}{o d()}
+ {%
+ \IfValueTF{##1}%
+ {\LWR@docmidrule[##1](){1-\theLWR@tabletotalcols}}%
+ {\booltrue{LWR@doingtbrule}}%
+ \LWR@getmynexttoken}%
+\DeclareDocumentCommand{\addlinespace}{o}{}%
+\DeclareDocumentCommand{\morecmidrules}{}{}%
+\DeclareDocumentCommand{\specialrule}{m m m d()}%
+ {\LWR@docmidrule[##1](){1-\theLWR@tabletotalcols}\LWR@getmynexttoken}%
\renewcommand{\multicolumn}{\LWR@htmlmulticolumn}%
-\renewcommand*{\mrowcell}{\global\booltrue{LWR@skippingmrowcell}}%
+\renewcommand*{\mrowcell}{%
+ \LWR@maybenewtablerow%
+ \LWR@tabularleftedge%
+ \global\booltrue{LWR@skippingmrowcell}%
+}%
+\renewcommand*{\mcolrowcell}{%
+ \LWR@maybenewtablerow%
+ \LWR@tabularleftedge%
+ \global\booltrue{LWR@skippingmcolrowcell}%
+}%
\LetLtxMacro{\caption}{\LWR@longtabledatacaptiontag}%
\global\boolfalse{LWR@tableparcell}%
\global\boolfalse{LWR@skippingmrowcell}%
+\global\boolfalse{LWR@skippingmcolrowcell}%
\global\boolfalse{LWR@skipatbang}%
+\global\boolfalse{LWR@emptyatbang}%
\StartDefiningTabulars%
\protected\gdef&{\LWR@tabularampersand}%
\LWR@traceinfo{LWR@tabular: about to LWR@getmynexttoken}%
@@ -5794,7 +6026,12 @@ rowspan="#2" %
}%
{%
\LWR@traceinfo{LWR@tabular ending}%
-\LWR@closetabledatacell%
+\ifthenelse{\value{LWR@tablecolspos}<\value{LWR@tablecolswidth}}{%
+ \LWR@tabularfinishrow%
+}%
+{%
+ \LWR@closetabledatacell%
+}%
\LWR@htmlblocktag{/tr}%
\LWR@htmlblocktag{/table}%
\global\boolfalse{LWR@intabularmetadata}%