texlive[45496] trunk: lwarp (7oct17)

commits+karl at tug.org commits+karl at tug.org
Sun Oct 8 00:12:25 CEST 2017


Revision: 45496
          http://tug.org/svn/texlive?view=revision&revision=45496
Author:   karl
Date:     2017-10-08 00:12:24 +0200 (Sun, 08 Oct 2017)
Log Message:
-----------
lwarp (7oct17)

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

Modified: trunk/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua	2017-10-07 22:11:56 UTC (rev 45495)
+++ trunk/Build/source/texk/texlive/linked_scripts/lwarp/lwarpmk.lua	2017-10-07 22:12:24 UTC (rev 45496)
@@ -4,7 +4,7 @@
 
 -- 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.") ;

Modified: trunk/Master/texmf-dist/doc/latex/lwarp/README.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/lwarp/README.txt	2017-10-07 22:11:56 UTC (rev 45495)
+++ trunk/Master/texmf-dist/doc/latex/lwarp/README.txt	2017-10-07 22:12:24 UTC (rev 45496)
@@ -1,5 +1,5 @@
 
-LaTeX lwarp package v0.40   README.txt
+LaTeX lwarp package v0.41   README.txt
 
 Files included are:
 

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

Modified: trunk/Master/texmf-dist/scripts/lwarp/lwarpmk.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/lwarp/lwarpmk.lua	2017-10-07 22:11:56 UTC (rev 45495)
+++ trunk/Master/texmf-dist/scripts/lwarp/lwarpmk.lua	2017-10-07 22:12:24 UTC (rev 45496)
@@ -4,7 +4,7 @@
 
 -- 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.") ;

Modified: trunk/Master/texmf-dist/source/latex/lwarp/lwarp.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/lwarp/lwarp.dtx	2017-10-07 22:11:56 UTC (rev 45495)
+++ trunk/Master/texmf-dist/source/latex/lwarp/lwarp.dtx	2017-10-07 22:12:24 UTC (rev 45496)
@@ -16,7 +16,7 @@
 % \iffalse
 %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
 %<package>\ProvidesPackage{lwarp}
-%<package>    [2017/09/25 v0.40  Allows LaTeX to directly produce HTML5 output.]
+%<package>    [2017/10/07 v0.41  Allows LaTeX to directly produce HTML5 output.]
 %
 %<*driver>
 \documentclass{ltxdoc}
@@ -301,7 +301,6 @@
 \par
 }
 
-
 \newenvironment{docsidebar}[1][]
 {%
 \ifthenelse{\isempty{#1}}{}{\medskip}%
@@ -1016,12 +1015,25 @@
         \watchout[\cs{multirow}]
         This will be a null function for the print output, and is a placeholder for
         parsing the table for \HTML\ output.
+        \begin{sourcedisplay}
+        \small
+        \begin{tabular}{lll}
+        \dots\ \& & \cs{multirow}\{2\}\{.5in\}\{text\} & \&\ \dots \\
+        \dots\ \& & \textcolor{red}{\cs{mrowcell}} & \&\ \dots \\
+        \end{tabular}
+        \end{sourcedisplay}
+        Note that recent versions of \pkg{multirow} include a new optional
+        \margintag{\texttt{vposn}}
+        \texttt{vposn} argument.
     \item The \pkg{multirow} documentation regarding colored cells recommends using
         a negative number of rows.  This will not work with \pkg{lwarp}, so
         \cs{warpprintonly} and \cs{warpHTMLonly} must be used to make versions for
         print and \HTML.
-    \item \limitsmulticolumnrow
-        See \cref{sec:multicolumnmultirow}.
+    \item
+        See \cref{sec:multicolumnmultirow} for \cs{multicolumrow}.
+
+        \limitsmulticolumnrow
+
     \item Using a custom macro inside a tabular data cell
         \watchout[macro in a table]\margintag{custom macros}
         \index{tabular>row corruption}%
@@ -1037,41 +1049,52 @@
 
 \item [Column specifiers:] \
     \begin{itemize}
-    \item Vertical rules are not yet supported.
-        \margintag{column types}
-
     \item \texttt{*} in a column specification is not used (so far).
         \watchout[* column specification]
         Repeat the column type the correct number of times.
 
-    \item Only one each of \texttt{@}, \texttt{!}, \texttt{>}, and \texttt{<}
-        may be used at each column, and they are used in that order.
+    \item Only one each of \texttt{@} and \texttt{!}
+        \margintag{\texttt{@} and \texttt{!}}
+        is used at each column, and they are used in that order.
 
+    \item In \cs{multirow} cells, the print version may have extra
+        \margintag{\cs{multirow}}
+        instances of \texttt{\textless}, \texttt{\textgreater}, \texttt{@},
+        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}.
+        \watchout[\cs{newcolumntype}]
     \end{itemize}
 
 \item [Rules:] \
     \begin{itemize}
-    \item If a multirow reaches to the bottom of a table,
-        and \cs{bottomrule} does not go over to that edge,
-        \margintag{\cs{multirow} with rules}
-        try adding a line of empty cells below the \cs{bottomrule}.
-        (This may be a browser bug.)
-        \changes{v0.19}{2016/05/28}{Docs: \env{multirow} browser bug workaround.}
+    \item Vertical rules next to either side of an \texttt{@} or \texttt{!} column
+        \margintag{vertical rules}
+        are displayed on both sides of the column.
 
-    \item If a \cs{midrule} is desired after the last row,
-        \margintag{rule at last row}
-        an additional row of blank cells must be used.
+    \item Width options are honored.  Trim options are converted to
+        \margintag{width and trim}
+        rounded top corners.
+        Trim corners are not rounded with \texttt{@} or \texttt{!} columns,
+        and full-width rules ignore trim.
 
-    \item \cs{cmidrule} does not support width or trim options
-        due to \CSS\ limitations.
-        \margintag{\cs{cmidrule} width, trim}
+    \item \cs{toprule}, \cs{midrule}, \cs{bottomrule}, and \cs{hline}
+        \margintag{full-width rules}
+        ignore trim.  When given an optional width, each cell is styled
+        to create the custom border.  Without an optional width, the entire
+        row is given a class to assign the standard border.
 
-    \item \cs{cmidrule} borders are generated by the individual cells
-        \margintag{\cs{cmidrule} and \cs{multicolumn}}
-        on the following row,
-        and so do not necessarily work correctly when the following row
-        has \cs{multicolumn} cells below \cs{cmidrule} borders.
+    \item If you wish to use \cs{cmidrule} followed by \cs{bottomrule},
+        \margintag{combined rules}
+        it may be necessary to use:
+        \begin{sourcedisplay}
+        \cs{cmidrule}\{2-3\} \textbackslash\textbackslash[-2ex] \\
+        \cs{bottomrule}
+        \end{sourcedisplay}
+        The optional \texttt{-2ex} is ignored in \HTML\, but improves the
+        visual formatting in the print output.
+
     \item For \cs{toprule} and \cs{bottomrule},
         \watchout[\cs{warpprintonly}]
         when combined with a \env{warpprint} or \env{warpHTML} environment,
@@ -1115,17 +1138,38 @@
 }
 
 \newcommand{\limitsmulticolumnrow}{%
-\pkg{lwarp} does not support combining \cs{multicolumn} and \cs{multirow}.
+\pkg{lwarp} does not support
 \watchout[\cs{multicolumn} \& \cs{multirow}]
+directly combining \cs{multicolumn} and \cs{multirow}.
 Use \cs{multicolumnrow} instead.
 To create a 2 column, 3 row cell:
 \begin{sourcedisplay}
-\cs{multicolumnrow}\{2\}\{c\}[c]\{3\}[0]\{1in\}[0pt]\{Text\}
+\cs{multicolumnrow}%
+  \textcolor{blue}{\{2\}\{c\}}%
+  \textcolor{green!50!black}{[c]\{3\}[0]\{1in\}[0pt]}\{Text\}
 \end{sourcedisplay}
 The two arguments for \cs{multicolumn} come first, followed by
 the five arguments for \cs{multirow}, many of which are optional,
 followed by the contents.
+
+As per \cs{multirow},
+\watchout[skipped cells]
+skipped cells to the right of the \cs{multicolumnrow}
+statement are not included in the source code on the same line.
+On the following lines, \cs{mcolrowcell} must be used for each cell
+\watchout[empty cells]
+of each column and each row to be skipped:
+\begin{sourcedisplay}
+\small
+\begin{tabular}{lll}
+\dots\ \& & \cs{multicolumnrow}\{2\}\{c\}[c]\{3\}[0]\{1in\}[0pt]\{Text\} & \&\ \dots \\
+\dots\ \& & \textcolor{red}{\cs{mcolrowcell}} \hfill \& \hfill \textcolor{red}{\cs{mcolrowcell}} & \&\ \dots \\
+\dots\ \& & \textcolor{red}{\cs{mcolrowcell}} \hfill \& \hfill \textcolor{red}{\cs{mcolrowcell}} & \&\ \dots \\
+\end{tabular}
+\end{sourcedisplay}
+
 Note that recent versions of \pkg{multirow} include a new optional
+\margintag{\texttt{vposn}}
 \texttt{vposn} argument.
 }
 
@@ -1551,7 +1595,7 @@
 %<*package>
 % \fi
 %
-% \CheckSum{14147}
+% \CheckSum{14314}
 %
 % \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
@@ -1633,6 +1677,7 @@
 % \changes{v0.38}{2017/08/27}{\ 2017/08/27}
 % \changes{v0.39}{2017/09/05}{\ 2017/09/05}
 % \changes{v0.40}{2017/09/25}{\ 2017/09/25}
+% \changes{v0.41}{2017/10/07}{\ 2017/10/07}
 
 
 
@@ -1767,6 +1812,23 @@
 % For a detailed list of changes, see the Change History on page \pageref{sec:changehistory}.
 %
 % \begin{description}
+% \item[v0.41:] \
+%   \begin{itemize}
+%       \item Added tabular vertical rules, subject to some limitations.
+%           \margintag{\env{tabular}}
+%           See the rules section of \cref{sec:limitstabular}.
+%       \item Improved \pkg{booktabs}: Width and trim are honored.
+%       \item Added \cs{mcolrowcell} for empty cells inside a \cs{multicolumnrow}.
+%           \watchout[new syntax]
+%           \textcolor{red}{Use \cs{mcolrowcell} instead of \cs{mrowcell} for two-dimensional
+%           cells created by \cs{multicolumnrow}.}
+%           Continue to use \cs{mrowcell} for empty cells in a \cs{multirow}.
+%           See \cref{sec:multicolumnmultirow} on \cpageref{sec:multicolumnmultirow}.
+%       \item Fix: Unfinished tabular rows are automatically filled.
+%       \item Fix for tabular column specifiers while using \pkg{babel-french}.
+%           (\cs{NoAutoSpacing} is activated then nullified inside the tabular,
+%           due to a conflict with the tabular column parsing code.)
+%   \end{itemize}
 % \item[v0.40:] \
 %   \begin{itemize}
 %       \item \pkg{graphics} and \pkg{graphicx} have been moved from the
@@ -8204,15 +8266,15 @@
 
 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 ;}
@@ -8228,29 +8290,33 @@
 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 ;
     padding-bottom: 1ex ; margin: 0ex ; }
@@ -9394,7 +9460,7 @@
 
 -- 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.") ;
@@ -10647,51 +10713,54 @@
 %    \begin{macrocode}
 \providecommand*{\LWR at FBcancel}{}
 
-\AtBeginDocument{
-\@ifundefined{frenchbsetup}
-{}
-{
-    \frenchbsetup{FrenchFootnotes=false}
-        % OR: redefine \insertfootnotemarkFB?
-    \LetLtxMacro\LWR at FBcancel\NoAutoSpacing
+\AtBeginDocument{%
+\@ifundefined{frenchbsetup}%
+{}%
+{%
+    \frenchbsetup{FrenchFootnotes=false}%
+%    \end{macrocode}
+% ^^A OR: redefine \insertfootnotemarkFB?
+%    \begin{macrocode}
+%
+    \LetLtxMacro\LWR at FBcancel\NoAutoSpacing%
     \renewcommand*{\FBcolonspace}{%
         \begingroup%
         \LWR at FBcancel%
         \LWR at origampersand{}nbsp;%
         \endgroup%
-    }
+    }%
     \renewcommand*{\FBthinspace}{%
         \begingroup%
         \LWR at FBcancel%
         \LWR at origampersand\#x202f;% \,
         \endgroup%
-    }
+    }%
     \renewcommand*{\FBguillspace}{%
         \begingroup%
         \LWR at FBcancel%
         \LWR at origampersand{}nbsp;% ~,  for \og xyz \fg{}
         \endgroup%
-    }
+    }%
     \DeclareDocumentCommand{\FBmedkern}{}{%
         \begingroup%
         \LWR at FBcancel%
         \LWR at origampersand\#x202f;% \,
         \endgroup%
-    }
+    }%
     \DeclareDocumentCommand{\FBthickkern}{}{%
         \begingroup%
         \LWR at FBcancel%
         \LWR at 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%
+}%
 }
-}
 %    \end{macrocode}
 
 
@@ -14558,7 +14627,8 @@
 %    \end{macrocode}
 
 % \DescribeBoolean{LWR at doinghline}
-% True if the next row will have an hline above it.
+% True if the next row will have an hline or midrule above it.
+% Also used for \cs{midrule}.
 %    \begin{macrocode}
 \newbool{LWR at doinghline}
 \boolfalse{LWR at doinghline}
@@ -14571,6 +14641,16 @@
 \boolfalse{LWR at doingtbrule}
 %    \end{macrocode}
 
+% \DescribeBoolean{LWR at doingcmidrule}
+% True if the next row will have a cmidrule above it.
+%
+% This is used by \cs{LWR at tabularfinishrow} to force a final empty row
+% to create the border for the \cs{cmidrule}.
+%    \begin{macrocode}
+\newbool{LWR at doingcmidrule}
+\boolfalse{LWR at doingcmidrule}
+%    \end{macrocode}
+
 % \DescribeBoolean{LWR at tableparcell}
 % True if are handling a paragraph inside a table cell,
 % so must close the paragraph tag before moving on.
@@ -14579,21 +14659,36 @@
 %    \end{macrocode}
 
 % \DescribeBoolean{LWR at skippingmrowcell}
-% True if are doing an empty multi-row cell,
+% True if are doing an empty \cs{multirow} cell,
 % and thus there is no data tag to close.
 %    \begin{macrocode}
 \newbool{LWR at skippingmrowcell}
 %    \end{macrocode}
 
+% \DescribeBoolean{LWR at skippingmcolrowcell}
+% True if are doing an empty \cs{multicolumnrow} cell,
+% and thus there is no data tag to close, and
+% do not print |@| and |!| columns.
+%    \begin{macrocode}
+\newbool{LWR at skippingmcolrowcell}
+%    \end{macrocode}
 
+
 % \DescribeBoolean{LWR at skipatbang}
-% True if just finished a \cs{multicolumn} so should not print the trailing
-% |@| or |!| columns.
+% True if just finished a \cs{multicolumn} so should not create the trailing
+% |@| or |!| columns table data cells.
 %    \begin{macrocode}
 \newbool{LWR at skipatbang}
 %    \end{macrocode}
 
 
+% \DescribeBoolean{LWR at emptyatbang}
+% True if finishing a row and should print empty |@| or |!| column table data cells.
+%    \begin{macrocode}
+\newbool{LWR at emptyatbang}
+%    \end{macrocode}
+
+
 % \DescribeBoolean{LWR at intabularmetadata}
 % True if are in a tabular but not in a data cell.
 % Used to prevent extra \HTML\ breaks if not inside table data.
@@ -14604,7 +14699,7 @@
 
 
 
-% \subsection{Handling \&, @, and !}
+% \subsection{Handling \&, @, !, and bar}
 %
 % \begin{minipage}{\linewidth}
 % For technical discussion regarding problems redefining |\&|, See: \\
@@ -14613,25 +14708,57 @@
 % \end{minipage}
 %
 
+% \begin{macro}{\LWR at instertatbangcols}
+%    \begin{macrocode}
+\newcommand*{\LWR at insertatbangcols}{%
+\ifbool{LWR at skipatbang}%
+{}%
+{%
+    \LWR at printatbang{at}{\theLWR at tablecolspos}%
+    \LWR at printatbang{bang}{\theLWR at tablecolspos}%
+}%
+}
+%    \end{macrocode}
+% \end{macro}
+
+
 % \begin{macro}{\LWR at closetabledatacell}
-% If |LWR at skippingmrowcell| then there is no data tag to close.
+% If |LWR at skippingmrowcell| or |LWR at skippingmcolrowcell| then
+% there is no data tag to close.
 % Otherwise, close any paragraphs, then close the data tag.
+%
+% \changes{v0.41}{2017/10/02}{Add: Mute \protect\texttt{\protect\textgreater} for \cs{bottomrule}.}
+%
 %    \begin{macrocode}
 \newcommand*{\LWR at closetabledatacell}{%
 \global\booltrue{LWR at intabularmetadata}%
 \ifbool{LWR at exitingtabular}{}%
 {% not exiting tabular
-    \ifbool{LWR at skippingmrowcell}{}%
+    \ifboolexpr{bool{LWR at skippingmrowcell} or bool{LWR at skippingmcolrowcell}}%
+    {%
+%    \end{macrocode}
+% If not skipping a \cs{multicolumnrow} cell,
+% insert the |@| and |!| columns after this non-existant column.
+% \changes{v0.41}{2017/10/03}{Fix: At/bang column with \cs{multirow}.}
+%    \begin{macrocode}
+        \ifbool{LWR at skippingmcolrowcell}%
+        {}%
+        {\LWR at insertatbangcols}%
+    }%
     {% not skippingmrowcell
 %    \end{macrocode}
-% Insert any |<| then any |@| and |!| column contents:
+% Insert any |<| then any |@| and |!| column contents, unless muted
+% for the \cs{bottomrule} or a \cs{multicolumn}:
+% \changes{v0.41}{2017/10/02}{Fix: Cancel \protect\texttt{\protect\textless} for \cs{multicolumn}.}
 %    \begin{macrocode}
         \unskip%
-        \LWR at getexparray{LWR at colafterspec}{\theLWR at tablecolspos}%
-% % \LWR at getexparray{LWR at colatspec}{\theLWR at tablecolspos}%
-% \LWR at printatbang{at}{\theLWR at tablecolspos}%
-% % \LWR at getexparray{LWR at colbangspec}{\theLWR at tablecolspos}%
-% \LWR at printatbang{bang}{\theLWR at tablecolspos}%
+        \ifboolexpr{%
+            bool{LWR at tabularmutemods} or
+            bool{LWR at skipatbang} or
+            bool{LWR at emptyatbang}
+        }%
+        {}%
+        {\LWR at getexparray{LWR at colafterspec}{\theLWR at tablecolspos}}%
 %    \end{macrocode}
 % Close paragraphs:
 %    \begin{macrocode}
@@ -14642,15 +14769,12 @@
 % Skip the |@| and |!| cells if are closing a multicolumn cell.
 %    \begin{macrocode}
         \leavevmode\unskip\LWR at htmltag{/td}\LWR at orignewline%
-        \ifbool{LWR at skipatbang}%
-        {\boolfalse{LWR at skipatbang}}%
-        {%
-            \LWR at printatbang{at}{\theLWR at tablecolspos}%
-            \LWR at printatbang{bang}{\theLWR at tablecolspos}%
-        }% not skipping at or bang
+        \LWR at insertatbangcols%
     }% not skipping mrowcell
 }% not exiting tabular
 \global\boolfalse{LWR at skippingmrowcell}%
+\global\boolfalse{LWR at skippingmcolrowcell}%
+\global\boolfalse{LWR at skipatbang}%
 }
 %    \end{macrocode}
 % \end{macro}
@@ -14771,9 +14895,82 @@
 %
 % |&| is left alone when in math alignments.
 % \end{macro}
+
+
+
+% \subsubsection{Filling an unfinished row}
+
+% \begin{macro}{\LWR at tabularfinishrow}
+% Adds empty table cells if necessary to finish the row.
 %
+% At the end of the table, if any bottom rules are requested then
+% an empty row must be generated to form the borders which show the rules.
+%
+% \changes{v0.41}{2017/10/02}{Unfinished tabular rows automatically filled.}
+%
+%    \begin{macrocode}
+\newcommand*{\LWR at tabularfinishrow}{%
+%    \end{macrocode}
+% If not exiting the tabular, or doing a rule, or have already started a row,
+% finish this row:
+%    \begin{macrocode}
+\ifboolexpr{%
+    not bool {LWR at exitingtabular} or%
+    bool{LWR at doingtbrule} or%
+    bool{LWR at doingcmidrule} or%
+    bool{LWR at doinghline} or%
+    bool{LWR at startedrow}%
+}{%
+%    \end{macrocode}
+% To locally temporarily turn off |LWR at exitingtabular| so that
+% table data tags will still be generated:
+%    \begin{macrocode}
+\begingroup%
+%    \end{macrocode}
+% If generating a final row for the \cs{bottomrule} borders,
+% turn off the |@|, |!|, |<|, and |>| column output:
+%    \begin{macrocode}
+\ifbool{LWR at exitingtabular}{%
+    \booltrue{LWR at tabularmutemods}%
+}{}%
+%    \end{macrocode}
+% Reenable the table data tags until finished with the final row:
+%    \begin{macrocode}
+\boolfalse{LWR at exitingtabular}%
+%    \end{macrocode}
+% Generate table data tags and ampersands until the right edge:
+%    \begin{macrocode}
+\whiledo{\value{LWR at tablecolspos}<\value{LWR at tabletotalcols}}{%
+\LWR at tabledatasinglecolumntag%
+%    \end{macrocode}
+% The following is essentially \cs{LWR at tabularampersand} with
+% |LWR at emptyatbang| added to empty the following cells:
+%    \begin{macrocode}
+    \LWR at closetabledatacell%
+    \addtocounter{LWR at tablecolspos}{1}%
+    \global\booltrue{LWR at emptyatbang}%
+%    \end{macrocode}
+% Starts the next cell:
+%    \begin{macrocode}
+    \LWR at getmynexttoken%
+}%
+%    \end{macrocode}
+% Required to close the final cell:
+%    \begin{macrocode}
+\LWR at closetabledatacell%
+%    \end{macrocode}
+% Reenable the original |LWR at exitingtabular| to close the entire table:
+%    \begin{macrocode}
+\endgroup%
+\global\boolfalse{LWR at emptyatbang}%
+}{}% ifboolexpr
+}
+%    \end{macrocode}
+% \end{macro}
 
 
+
+
 % \subsection{Handling \protect\textbackslash\protect\textbackslash}
 
 % Inside tabular, |\\| is redefined to |\LWR at tabularendofline|
@@ -14784,9 +14981,12 @@
 %    \begin{macrocode}
 \NewDocumentCommand{\LWR at tabularendofline}{s o}
 {%
-\LWR at closetabledatacell%
-%    \end{macrocode}
-% Finish the previous row:
+\ifthenelse{\value{LWR at tablecolspos}<\value{LWR at tabletotalcols}}{%
+    \LWR at tabularfinishrow%
+}%
+{%
+    \LWR at closetabledatacell%
+}%
 %    \begin{macrocode}
 \LWR at htmltag{/tr}\LWR at orignewline
 \global\booltrue{LWR at intabularmetadata}
@@ -14799,6 +14999,7 @@
 %    \begin{macrocode}
 \global\boolfalse{LWR at doinghline}%
 \global\boolfalse{LWR at doingtbrule}%
+\global\boolfalse{LWR at doingcmidrule}%
 \LWR at clearmidrules%
 %    \end{macrocode}
 % Start at first column:
@@ -14826,9 +15027,8 @@
 % of total width |LWR at tabletotalcols|, not counting |@| and |!| columns.
 %
 % Will contain a string such as |llrrccpc|, exactly one letter per \LaTeX\ table column,
-% without |@|, |!|, |>|, |<|, or the vertical pipe.
+% without |@|, |!|, |>|, |<|, or the vertical bar.
 %
-% This is indexed by the counter |LWR at tabletotalcols|.
 %    \begin{macrocode}
 \newcommand*{\LWR at tablecolspec}{}
 %    \end{macrocode}
@@ -14869,6 +15069,7 @@
 
 % \DescribeCounter{LWR at tabletotalcols}
 % Holds the final number of table columns, not counting |@| and |!| columns.
+% This is equal to the number of cells in each row.
 %    \begin{macrocode}
 \newcounter{LWR at tabletotalcols}
 %    \end{macrocode}
@@ -14880,21 +15081,22 @@
 \newcounter{LWR at tabletotalcolsnext}
 %    \end{macrocode}
 
-% \DescribeObject{LWR at colatspec}A data array of specifications for |@| columns.
+% \DescribeObject{LWR at colatspec} A data array of specifications for |@| columns.
 % The leftmost's index is |leftedge|, the others are counter values.
 % See \cref{sec:dataarray}.
 % 
-% \DescribeObject{LWR at colbangspec}A data array of specifications for |!| columns.
+% \DescribeObject{LWR at colbangspec} A data array of specifications for |!| columns.
 % The leftmost's index is |leftedge|, the others are counter values.
 % See \cref{sec:dataarray}.
 % 
-% \DescribeObject{LWR at colbeforespec}A data array of specifications for |>| columns.
+% \DescribeObject{LWR at colbeforespec} A data array of specifications for |>| columns.
 % 
-% \DescribeObject{LWR at colafterspec}A data array of specifications for |<| columns.
+% \DescribeObject{LWR at colafterspec} A data array of specifications for |<| columns.
+%
+% \DescribeObject{LWR at colbarspec} A data array of specifications for vertical rules.
 
 
-
-% \subsection{Parsing @, >, <, ! columns}
+% \subsection{Parsing @, >, <, !, bar columns}
 %
 %
 % Holds the parsed argument for |@|, |>|, |<|, or |!| columns:
@@ -15040,12 +15242,24 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}{\LWR at parseskipcolumn}
 %
-% Handles columns to skip, such as the vertical bar.
+% \begin{macro}{\LWR at parsebarcolumn} \qquad Handles vertical rules.
 %
+% \changes{v0.41}{2017/10/07}{Added vertical rules.}
+%
 %    \begin{macrocode}
-\newcommand*{\LWR at parseskipcolumn}{%
+\newcommand*{\LWR at parsebarcolumn}{%
+\LWR at traceinfo{bar column}%
+%    \end{macrocode}
+% Remember the bar at this position:
+%    \begin{macrocode}
+\ifthenelse{\cnttest{\value{LWR at tabletotalcols}}=0}%
+{% left edge of the table:
+    \LWR at setexparray{LWR at colbarspec}{leftedge}{tvertbarl}%
+}%
+{% not at the left edge:
+    \LWR at setexparray{LWR at colbarspec}{\theLWR at tabletotalcols}{tvertbarr}%
+}%
 \booltrue{LWR at validtablecol}%
 }
 %    \end{macrocode}
@@ -15068,6 +15282,7 @@
 \LWR at setexparray{LWR at colbangspec}{\theLWR at tabletotalcolsnext}{}%
 \LWR at setexparray{LWR at colbeforespec}{\theLWR at tabletotalcolsnext}{}%
 \LWR at setexparray{LWR at colafterspec}{\theLWR at tabletotalcolsnext}{}%
+\LWR at setexparray{LWR at colbarspec}{\theLWR at tabletotalcolsnext}{}%
 \booltrue{LWR at validtablecol}%
 }
 %    \end{macrocode}
@@ -15198,7 +15413,7 @@
 % Scans the column specification left to right.
 %
 % Builds \cs{LWR at tablecolspec} with the final specification,
-% one column per entry.  The number of final columns is
+% one column per entry.  The final number of cells in each row is
 % stored in |LWR at tabletotalcols|.
 %
 % \changes{v0.22}{2017/02/28}{Unknown table column types become \texttt{l}.
@@ -15238,6 +15453,10 @@
 \LWR at setexparray{LWR at colafterspec}{1}{}%
 \LWR at setexparray{LWR at colafterspec}{2}{}%
 \LWR at setexparray{LWR at colafterspec}{3}{}%
+\LWR at setexparray{LWR at colbarspec}{leftedge}{}%
+\LWR at setexparray{LWR at colbarspec}{1}{}%
+\LWR at setexparray{LWR at colbarspec}{2}{}%
+\LWR at setexparray{LWR at colbarspec}{3}{}%
 %    \end{macrocode}
 % Starting at the first column specification:
 %    \begin{macrocode}
@@ -15283,7 +15502,7 @@
 \IfStrEq{\LWR at strresult}{!}{\LWR at parsebangcolumn}{}%
 \IfStrEq{\LWR at strresult}{>}{\LWR at parsebeforecolumn}{}%
 \IfStrEq{\LWR at strresult}{<}{\LWR at parseaftercolumn}{}%
-\IfStrEq{\LWR at strresult}{|}{\LWR at parseskipcolumn}{}%
+\IfStrEq{\LWR at strresult}{|}{\LWR at parsebarcolumn}{}%
 \IfStrEq{\LWR at strresult}{p}{\LWR at parsepcolumn{p}}{}%
 \IfStrEq{\LWR at strresult}{m}{\LWR at parsepcolumn{m}}{}%
 \IfStrEq{\LWR at strresult}{b}{\LWR at parsepcolumn{b}}{}%
@@ -15342,10 +15561,16 @@
 %    \begin{macrocode}
     \global\booltrue{LWR at intabularmetadata}%
     \ifbool{LWR at doinghline}%
-    {\LWR at htmltag{tr class="hline"{}}\LWR at orignewline}%
+    {%
+        \LWR at htmltag{tr class="hline" }%
+        \LWR at orignewline%
+    }%
     {% not doing hline
         \ifbool{LWR at doingtbrule}%
-        {\LWR at htmltag{tr class="tbrule"{}}\LWR at orignewline}%
+        {%
+            \LWR at htmltag{tr class="tbrule"}%
+            \LWR at orignewline%
+        }%
         {\LWR at htmltag{tr}\LWR at orignewline}%
     }% end of not doing hline
 }% end of not started the row
@@ -15354,28 +15579,99 @@
 % \end{macro}
 
 
+% \subsection{Printing vertical bar tags}
+
+% \begin{macro}{\LWR at printbartag} \marg{index}
+%
+% Adds to a tabular data cell an \HTML\ class name for a left/right vertical bar.
+%
+% \changes{v0.41}{2017/10/07}{Added vertical rules.}
+%
+%    \begin{macrocode}
+\newcommand*{\LWR at printbartag}[1]{%
+\ifboolexpr{bool{LWR at tabularmutemods} or bool{LWR at emptyatbang}}%
+{%
+}%
+{ % not muting
+    \ifstrequal{#1}{leftedge}{%
+            \LWR at getexparray{LWR at colbarspec}{leftedge} %
+    }%
+    {
+        \LWR at getexparray{LWR at colbarspec}{#1} %
+        \edef\LWR at tempone{\LWR at getexparray{LWR at colbarspec}{#1}}%
+    } %
+}% not muting
+}
+%    \end{macrocode}
+% \end{macro}
+
+
 % \subsection{Printing at or bang tags}
 
 % \begin{macro}{\LWR at printatbang} \marg{at -or- bang} \marg{index}
+%
+% \changes{v0.41}{2017/09/28}{Add: \cs{cmidrule} trims.}
+% \changes{v0.41}{2017/10/02}{Add: Mute at and bang columns for \cs{bottomrule}.}
 %    \begin{macrocode}
 \newcommand*{\LWR at printatbang}[2]{%
-\edef\LWR at atbangspec{\LWR at getexparray{LWR at col#1spec}{#2}}
-\LWR at traceinfo{atbang: !\LWR at atbangspec!}
+%    \end{macrocode}
+% Fetch the column at or bang spec:
+%    \begin{macrocode}
+\edef\LWR at atbangspec{\LWR at getexparray{LWR at col#1spec}{#2}}%
+\LWR at traceinfo{atbang: #2 !\LWR at atbangspec!}%
+%    \end{macrocode}
+% Only generate if is not empty;
+%    \begin{macrocode}
 \ifdefempty{\LWR at atbangspec}%
-% \ifthenelse{\isempty{\LWR at atbangspec}}%
 {}%
-{%
-    \LWR at htmltag{td class="td#1%
-    \ifthenelse{\equal{\LWR at getexparray{LWR at midrules}{\theLWR at tablecolspos}}{Y}}{rule}{}%
-    "}%
-    \LWR at atbangspec%
+{% not empty
+    \LWR at htmltag{%
+        td class="td#1%
+        \LWR at subaddcmidruletrim{}{}%
+        \LWR at printbartag{#2}%
+        "%
+        \LWR at addcmidrulewidth%
+    }%
+%    \end{macrocode}
+% Create an empty cell if muting for the \cs{bottomrule}:
+%    \begin{macrocode}
+    \ifboolexpr{bool{LWR at tabularmutemods} or bool{LWR at emptyatbang}}%
+    {}%
+    {\LWR at atbangspec}%
+%
     \LWR at htmltag{/td}\LWR at orignewline%
+}% not empty
 }%
-}%
 %    \end{macrocode}
 % \end{macro}
 
 
+% \begin{macro}{\LWR at addleftmostbartag}
+%    \begin{macrocode}
+\newcommand*{\LWR at addleftmostbartag}{%
+\ifnumcomp{\value{LWR at tablecolspos}}{=}{1}{%
+    \LWR at printbartag{leftedge}%
+}{}%
+}
+%    \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\LWR at tabularleftedge}
+%    \begin{macrocode}
+\newcommand*{\LWR at tabularleftedge}{%
+\ifthenelse{\cnttest{\value{LWR at tablecolspos}}=1}%
+{%
+    \LWR at printatbang{at}{leftedge}%
+    \LWR at printatbang{bang}{leftedge}%
+}% left edge
+{}% not left edge
+}
+%    \end{macrocode}
+% \end{macro}
+
+
+
 % \subsection{Data opening tag}
 
 % \begin{macro}{\LWR at tabledatasinglecolumntag}
@@ -15382,6 +15678,8 @@
 % Print a table data opening tag with style for alignment
 %
 % \changes{v0.33}{2017/06/22}{Fix: Macros in tabular could cause extra data cell.}
+% \changes{v0.41}{2017/09/28}{Add: \cs{cmidrule} trims.}
+% \changes{v0.41}{2017/10/02}{Add: Mute \protect\texttt{\protect\textless} for \cs{bottomrule}.}
 %
 %    \begin{macrocode}
 \newcommand*{\LWR at tabledatasinglecolumntag}%
@@ -15400,12 +15698,7 @@
 %    \end{macrocode}
 % Print the |@| and |!| contents before first column:
 %    \begin{macrocode}
-        \ifthenelse{\cnttest{\value{LWR at tablecolspos}}=1}%
-        {%
-            \LWR at printatbang{at}{leftedge}%
-            \LWR at printatbang{bang}{leftedge}%
-        }% left edge
-        {}% not left edge
+        \LWR at tabularleftedge%
 %    \end{macrocode}
 % Fetch the current column's alignment character into |\LWR at strresult|:
 %    \begin{macrocode}
@@ -15419,12 +15712,15 @@
 %    \begin{macrocode}
         \LWR at strresult%
 %    \end{macrocode}
-% If this column has a cmidrule, add ``rule'' to the end of the \HTML\ class tag:
+% If this column has a cmidrule, add ``rule'' to the end of the \HTML\ class tag.
+% Also add vertical bar tags.
 %    \begin{macrocode}
-        \ifthenelse{\equal{\LWR at getexparray{LWR at midrules}{\theLWR at tablecolspos}}{Y}}%
-        {rule}%
-        {}%
-        "{}}%
+        \LWR at addcmidruletrim%
+        \LWR at addleftmostbartag%
+        \LWR at printbartag{\theLWR at tablecolspos}%
+        "%
+        \LWR at addcmidrulewidth%
+        }%
 %    \end{macrocode}
 % If this is a p, m, b, or X column, allow paragraphs:
 %    \begin{macrocode}
@@ -15443,9 +15739,11 @@
         }% allow pars
         {}% no pars
 %    \end{macrocode}
-% Print the |>| contents:
+% Print the |>| contents unless muted for the \cs{bottomrule}:
 %    \begin{macrocode}
-        \LWR at getexparray{LWR at colbeforespec}{\theLWR at tablecolspos}%
+        \ifboolexpr{bool{LWR at tabularmutemods} or bool{LWR at emptyatbang}}%
+        {}%
+        {\LWR at getexparray{LWR at colbeforespec}{\theLWR at tablecolspos}}%
         \global\boolfalse{LWR at intabularmetadata}%
     }% not exiting tabular
 }{}% in tabular metadata
@@ -15457,20 +15755,69 @@
 % \subsection{Midrules}
 %
 % \DescribeObject{LWR at midrules}|LWR at midrules| is a data array
+% (\cref{sec:dataarray}) of columns each containing a non-zero width
+%  if a midrule should be created for this column.
+
+% \DescribeObject{LWR at trimlrules}|LWR at trimlrules| is a data array
 % (\cref{sec:dataarray}) of columns containing
-% |Y| if a midrule should be created for each column.
+% |l| if a midrule should be left trimmed for each column.
 
+% \DescribeObject{LWR at trimrrules}|LWR at trimrrules| is a data array
+% (\cref{sec:dataarray}) of columns containing
+% |r| if a midrule should be right trimmed for each column.
 
+
 % \DescribeCounter{LWR at midrulecounter}
-% Indexes across the |LWR at midrules| data array.
+% Indexes across the |LWR at midrules| and |LWR at trim<l/r>rules| data arrays.
 %    \begin{macrocode}
 \newcounter{LWR at midrulecounter}
 %    \end{macrocode}
 
+
+
+% \DescribeLength{\LWR at heavyrulewidth}
+% The default width of the rule.
+%    \begin{macrocode}
+\newlength{\LWR at heavyrulewidth}
+\setlength{\LWR at heavyrulewidth}{.08em}
+%    \end{macrocode}
+
+
+% \DescribeLength{\LWR at lightrulewidth}
+% The default width of the rule.
+%    \begin{macrocode}
+\newlength{\LWR at lightrulewidth}
+\setlength{\LWR at lightrulewidth}{.05em}
+%    \end{macrocode}
+
+
+% \DescribeLength{\LWR at cmidrulewidth}
+% The default width of the rule.
+%    \begin{macrocode}
+\newlength{\LWR at cmidrulewidth}
+\setlength{\LWR at cmidrulewidth}{.03em}
+%    \end{macrocode}
+
+
+% \DescribeLength{\LWR at thiscmidrulewidth}
+% The width of the next rule, defaulting to \cs{lightrulewidth}.
+%
+% If not \cs{lightrulewidth}, a style will be used to generate
+% the custom width.
+%
+% Assigned from the |LWR at midrules| array.
+%    \begin{macrocode}
+\newlength{\LWR at thiscmidrulewidth}
+\setlength{\LWR at thiscmidrulewidth}{\LWR at cmidrulewidth}
+%    \end{macrocode}
+
+
 % \begin{macro}{\LWR at clearmidrules}
 % Start new midrules.  Called at beginning of tabular and also at |\\|.
 %
-% Clears all |LWR at midrules| markers for this line.
+% Clears all |LWR at midrules| and |LWR at trimruels| markers for this line.
+%
+% \changes{v0.41}{2017/09/28}{Add: \cs{cmidrule} trims.}
 %    \begin{macrocode}
 \newcommand*{\LWR at clearmidrules}
 {%
@@ -15479,7 +15826,10 @@
 \cnttest{\value{LWR at midrulecounter}}{<=}{\value{LWR at tablecolswidth}}%
 }%
 {%
-\LWR at setexparray{LWR at midrules}{\theLWR at midrulecounter}{}%
+\LWR at setexparray{LWR at midrules}{\theLWR at midrulecounter}{0pt}%
+\setlength{\LWR at thiscmidrulewidth}{\LWR at cmidrulewidth}%
+\LWR at setexparray{LWR at trimlrules}{\theLWR at midrulecounter}{}%
+\LWR at setexparray{LWR at trimrrules}{\theLWR at midrulecounter}{}%
 \addtocounter{LWR at midrulecounter}{1}%
 }%
 }
@@ -15489,15 +15839,26 @@
 
 % \begin{macro}{\LWR at subcmidrule} \marg{width} \marg{trim} \marg{leftcolumn} \marg{rightcolumn}
 %
-% Marks |LWR at midrules| data array elements to be ``Y'' from left to right columns.
+% Marks |LWR at midrules| data array elements to be
+% non-zero widths from left to right columns.
+% Also marks trimming for the L and/or R columns.
+%
+% |LWR at doingcmidrule| is set to force an empty row at the end of the tabular
+% to create the rule.
+%
+% \changes{v0.41}{2017/09/28}{Add: \cs{cmidrule} trims.}
+%
 %    \begin{macrocode}
 \newcommand*{\LWR at subcmidrule}[4]{%
 \setcounter{LWR at midrulecounter}{#3}%
 \whiledo{\cnttest{\value{LWR at midrulecounter}}{<=}{#4}}%
 {%
-\LWR at setexparray{LWR at midrules}{\theLWR at midrulecounter}{Y}%
+\LWR at setexparray{LWR at midrules}{\theLWR at midrulecounter}{#1}%
 \addtocounter{LWR at midrulecounter}{1}%
-}% end of the whiledo
+}% whiledo
+\IfSubStr{#2}{l}{\LWR at setexparray{LWR at trimlrules}{#3}{l}}{}%
+\IfSubStr{#2}{r}{\LWR at setexparray{LWR at trimrrules}{#4}{r}}{}%
+\booltrue{LWR at doingcmidrule}%
 }
 %    \end{macrocode}
 % \end{macro}
@@ -15506,9 +15867,10 @@
 % \begin{macro}{\LWR at docmidrule} \oarg{width} \marg{trim} \marg{leftcolumn-rightcolumn}
 %
 % Marks |LWR at midrules| array elements to be ``Y'' from left to right columns.
+% Also marks trimming for the L and/or R columns.
 %
 %    \begin{macrocode}
-\NewDocumentCommand{\LWR at docmidrule}{o d() >{\SplitArgument{1}{-}}m}%
+\NewDocumentCommand{\LWR at docmidrule}{O{\LWR at cmidrulewidth} D(){} >{\SplitArgument{1}{-}}m}%
 {\LWR at subcmidrule{#1}{#2}#3}
 %    \end{macrocode}
 % \end{macro}
@@ -15515,8 +15877,97 @@
 
 
 
+% Used to compute margins, tabular trims
+%    \begin{macrocode}
+\newlength{\LWR at templengthone}%
+\newlength{\LWR at templengthtwo}%
+%    \end{macrocode}
 
 
+% \begin{macro}{\LWR at subaddcmidruletrim} \marg{lefttrim} \marg{righttrim}
+% Adds a \cs{cmidrule} with optional trim.
+%
+% \changes{v0.41}{2017/10/05}{Added.}
+%
+%    \begin{macrocode}
+\newcommand*{\LWR at subaddcmidruletrim}[2]{%
+\setlength{\LWR at templengthone}{\LWR at getexparray{LWR at midrules}{\theLWR at tablecolspos}}%
+\ifdimcomp{\LWR at templengthone}{>}{0pt}%
+{%
+%    \end{macrocode}
+% Print the class without left and right trim letters appended:
+%    \begin{macrocode}
+    \LWR at origtilde tdrule#1#2%
+%    \end{macrocode}
+%   Remember the width of the rule:
+%    \begin{macrocode}
+    \setlength{\LWR at thiscmidrulewidth}{\LWR at templengthone}%
+}{}%
+}
+%    \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\LWR at addcmidruletrim}
+% Adds left or right trim to a \cs{cmidrule}.
+%
+% \changes{v0.41}{2017/09/28}{Add: \cs{cmidrule} trims.}
+%
+%    \begin{macrocode}
+\newcommand*{\LWR at addcmidruletrim}{%
+\LWR at subaddcmidruletrim%
+{\LWR at getexparray{LWR at trimlrules}{\theLWR at tablecolspos}}%
+{\LWR at getexparray{LWR at trimrrules}{\theLWR at tablecolspos}}%
+}
+%    \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\LWR at addrulewidth} \marg{thiswidth} \marg{defaultwidth}
+%
+% If not default width, add a custom style with width and color
+% depending on |thiswidth|.
+%    \begin{macrocode}
+\newcommand{\LWR at addrulewidth}[2]{%
+%    \end{macrocode}
+% Only add a custom width if |thiswidth| is different than the |defaultwidth|:
+%    \begin{macrocode}
+\ifdimcomp{#1}{=}{#2}%
+{}% default width
+{% custom width
+%    \end{macrocode}
+% Ensure that the width is wide enough to display in the browser:
+%    \begin{macrocode}
+    \LWR at forceminwidth{#1}%
+    \uselengthunit{PT} % explicit space
+    style="border-top:\rndprintlength{\LWR at atleastonept} solid %
+%    \end{macrocode}
+% The darkness of the color depends on the thickness of the rule:
+%    \begin{macrocode}
+    \ifdimcomp{#1}{<}{\LWR at lightrulewidth}%
+    {\#A0A0A0}%
+    {% lightrule or heaver
+        \ifdimcomp{#1}{<}{\LWR at heavyrulewidth}%
+        {\#808080}%
+        {black}%
+    }% lightrule or heavier
+    "%
+}% custom width
+}
+%    \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\LWR at addcmidrulewidth}
+%    \begin{macrocode}
+\newcommand{\LWR at addcmidrulewidth}{%
+\LWR at addrulewidth{\LWR at thiscmidrulewidth}{\LWR at cmidrulewidth}%
+}
+%    \end{macrocode}
+% \end{macro}
+
+
+
 % \subsection{Multicolumns}
 
 % \subsubsection{Parsing multicolumns}
@@ -15706,6 +16157,7 @@
 %   \oarg{1: vpos} \oarg{2: \#rows} \marg{3: numcols} \marg{4: colspec} \marg{5: text}
 %
 % \changes{v0.39}{2017/08/30}{Add: Optional \protect\texttt{vpos} and \# rows.}
+% \changes{v0.41}{2017/09/28}{Add: \cs{cmidrule} trims.}
 %
 %    \begin{macrocode}
 \NewDocumentCommand{\LWR at domulticolumn}{o o m m +m}{%
@@ -15722,6 +16174,7 @@
 % Row processing:
 %    \begin{macrocode}
 \LWR at maybenewtablerow%
+\LWR at tabularleftedge%
 %    \end{macrocode}
 % Begin the opening table data tag:
 %    \begin{macrocode}
@@ -15751,12 +16204,17 @@
 % 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''.
+% Also add vertical bar class.
+% \changes{v0.41}{2017/10/07}{Added vertical rules.}
 %    \begin{macrocode}
-\ifthenelse{\equal{\LWR at getexparray{LWR at midrules}{\theLWR at tablecolspos}}{Y}}{rule}{}%
+\LWR at addcmidruletrim%
+\LWR at addleftmostbartag%
+\LWR at printbartag{\theLWR at tablecolspos}%
 %    \end{macrocode}
 % Close the class tag's opening quote:
 %    \begin{macrocode}
 "%
+\LWR at addcmidrulewidth%
 }% end of the opening table data tag
 \global\boolfalse{LWR at intabularmetadata}%
 \LWR at parsemulticolumnalignment{#4}{\LWR at printmccoldata}%
@@ -15972,30 +16430,27 @@
 %    \end{macrocode}
 % Temporarily define a macro equal to the |@| specification for this column:
 %    \begin{macrocode}
-\edef\LWR at atbangspec{\LWR at getexparray{LWR at colatspec}{\theLWR at tabhtmlcolindex}}%
+    \edef\LWR at atbangspec{\LWR at getexparray{LWR at colatspec}%
+        {\theLWR at tabhtmlcolindex}}%
 %    \end{macrocode}
 % If the |@| specification is not empty, add to the count:
 %    \begin{macrocode}
-\ifdefempty{\LWR at atbangspec}{}{\addtocounter{LWR at tabhtmlcoltotal}{1}}%
+    \ifdefempty{\LWR at atbangspec}%
+        {}%
+        {\addtocounter{LWR at tabhtmlcoltotal}{1}}%
 %    \end{macrocode}
 % Likewise for the |!| columns:
 %    \begin{macrocode}
-\edef\LWR at atbangspec{\LWR at getexparray{LWR at colbangspec}{\theLWR at tabhtmlcolindex}}%
-\ifdefempty{\LWR at atbangspec}{}{\addtocounter{LWR at tabhtmlcoltotal}{1}}%
+    \edef\LWR at atbangspec{\LWR at getexparray{LWR at colbangspec}%
+        {\theLWR at tabhtmlcolindex}}%
+    \ifdefempty{\LWR at atbangspec}%
+        {}%
+        {\addtocounter{LWR at tabhtmlcoltotal}{1}}%
 %    \end{macrocode}
 % Move to the next \LaTeX\ column:
 %    \begin{macrocode}
-\addtocounter{LWR at tabhtmlcolindex}{1}%
-}%
-%    \end{macrocode}
-% If at the left-most column, also skip the leftmost |@| and |!| cells:
-%    \begin{macrocode}
-\ifthenelse{\value{LWR at tablecolspos}=1}{%
-    \edef\LWR at atbangspec{\LWR at getexparray{LWR at colatspec}{leftedge}}%
-    \ifdefempty{\LWR at atbangspec}{}{\addtocounter{LWR at tabhtmlcoltotal}{1}}%
-    \edef\LWR at atbangspec{\LWR at getexparray{LWR at colbangspec}{leftedge}}%
-    \ifdefempty{\LWR at atbangspec}{}{\addtocounter{LWR at tabhtmlcoltotal}{1}}%
-}{}%
+    \addtocounter{LWR at tabhtmlcolindex}{1}%
+}% whiledo
 }
 %    \end{macrocode}
 % \end{macro}
@@ -16104,8 +16559,6 @@
 %
 %    \begin{macrocode}
 \newcommand*{\LWR at donothing}{}
-\newcommand*{\LWR at domidrule}{\booltrue{LWR at doinghline}}
-\newcommand*{\LWR at dotbrule}{\booltrue{LWR at doingtbrule}}
 %    \end{macrocode}
 %
 % In case \pkg{bigdelim} is not loaded:
@@ -16160,6 +16613,7 @@
 %    \begin{macrocode}
 \newcommand*{\ResumeTabular}{%
 \global\boolfalse{LWR at exitingtabular}%
+\global\boolfalse{LWR at tabularmutemods}%
 \LWR at getmynexttoken%
 }
 %    \end{macrocode}
@@ -16194,6 +16648,24 @@
 \begin{warpHTML}
 %    \end{macrocode}
 
+
+% \DescribeBoolean{LWR at exitingtabular}
+% When \cs{end} is found, turns off the next opening data tag.
+%    \begin{macrocode}
+\newbool{LWR at exitingtabular}
+%    \end{macrocode}
+
+
+% \DescribeBoolean{LWR at tabularmutemods}
+% Mutes \HTML\ output for |@|, |!|, |<| and |>|.
+%
+% This is used while printing the final row to generate \cs{bottomrule}s.
+%    \begin{macrocode}
+\newbool{LWR at tabularmutemods}
+%    \end{macrocode}
+
+
+
 % \begin{macro}{\LWR at tabledatacolumntag}
 % Open a new \HTML\ table cell unless the next token is for a macro
 % which does not create data, such as |\hline|, |\toprule|, etc:
@@ -16203,8 +16675,6 @@
 % \changes{v0.40}{2017/09/09}{Fix for \pkg{bigdelim}: \cs{ldelim}, \cs{rdelim}.}
 %
 %    \begin{macrocode}
-\newbool{LWR at exitingtabular}
-
 \newcommand*{\LWR at tabledatacolumntag}%
 {%
 \LWR at traceinfo{LWR at tabledatacolumntag}%
@@ -16235,10 +16705,15 @@
 \ifdefequal{\LWR at mynexttoken}{\multicolumnrow}%
     {\let\mynext\LWR at donothing}{}%
 %    \end{macrocode}
-% if come to an |\mrowcell|, this is a cell to be skipped over
+% If an |\mrowcell|, this is a cell to be skipped over:
 %    \begin{macrocode}
 \ifdefequal{\LWR at mynexttoken}{\mrowcell}%
     {\let\mynext\LWR at donothing}{}%
+%    \end{macrocode}
+% If an |\mcolrowcell|, this is a cell to be skipped over:
+%    \begin{macrocode}
+\ifdefequal{\LWR at mynexttoken}{\mcolrowcell}%
+    {\let\mynext\LWR at donothing}{}%
 %
 \ifdefequal{\LWR at mynexttoken}{\TabularMacro}%
     {\let\mynext\LWR at donothing}{}%
@@ -16295,15 +16770,43 @@
 
 % \subsection{\textbackslash{}mrowcell}
 
+% \codeall
+%    \begin{macrocode}
+\begin{warpall}
+%    \end{macrocode}
+
 % \begin{macro}{\mrowcell}
-% The user must insert |\mrowcell| into any multirow cells which must be skipped.
+% The user must insert |\mrowcell| into any \cs{multirow} cells which must be skipped.
 % This command has no action during print output.
 % \watchout
+%    \begin{macrocode}
+\newcommand*{\mrowcell}{}
+%    \end{macrocode}
 
+%    \begin{macrocode}
+\end{warpall}
+%    \end{macrocode}
+% \end{macro}
+
+
+% \subsection{\textbackslash{}mcolrowcell}
+
 % \codeall
 %    \begin{macrocode}
 \begin{warpall}
-\newcommand*{\mrowcell}{}
+%    \end{macrocode}
+
+% \begin{macro}{\mcolrowcell}
+% The user must insert |\mcolrowcell| into any \cs{multicolumnrow} cells
+% which must be skipped.
+% This command has no action during print output.
+% \watchout
+% \changes{v0.41}{2017/10/05}{Added for \cs{multicolumrow} cells.}
+%    \begin{macrocode}
+\newcommand*{\mcolrowcell}{}
+%    \end{macrocode}
+
+%    \begin{macrocode}
 \end{warpall}
 %    \end{macrocode}
 % \end{macro}
@@ -16310,6 +16813,8 @@
 
 
 
+
+
 % \subsection{New \textbackslash{}tabular definition}
 
 % \codehtml
@@ -16342,13 +16847,42 @@
 %    \begin{macrocode}
 \AtBeginDocument{
 \@ifpackageloaded{lwarp-tabls}
-{\newcommand*{\LWR at hline}[1][]{\LWR at domidrule\LWR at getmynexttoken}}
-{\newcommand*{\LWR at hline}{\LWR at domidrule\LWR at getmynexttoken}}
+{\newcommand*{\LWR at hline}[1][]{%
+    \booltrue{LWR at doinghline}%
+    \LWR at getmynexttoken}}
+{\newcommand*{\LWR at hline}{%
+    \booltrue{LWR at doinghline}%
+    \LWR at getmynexttoken}}
 }% AtBeginDocument
 %    \end{macrocode}
 % \end{macro}
 %
 %
+
+% \begin{macro}{\LWR at nullifyNoAutoSpacing}
+% For \pkg{babel-french}, turn off auto spacing at the start of the tabular,
+% then nullify the autospacing commands inside the tabular,
+% since they were not compatible with the tabular column parsing code,
+% which uses \pkg{xstring}.
+% \changes{v0.41}{2017/10/06}{Fix: \cs{NoAutoSpacing} in a tabular
+%   with \protect\pkg{babel-french}.}
+%    \begin{macrocode}
+\AtBeginDocument{
+\@ifundefined{frenchbsetup}%
+{% no babel-french
+    \newcommand*{\LWR at nullifyNoAutoSpacing}{}
+}% no babel-french
+{% yes babel-french
+    \newcommand*{\LWR at nullifyNoAutoSpacing}{%
+        \NoAutoSpacing%
+        \renewcommand*{\NoAutoSpacing}{}%
+        \renewcommand*{\LWR at FBcancel}{}%
+    }
+}% yes babel-french
+}% AtBeginDocument
+%    \end{macrocode}
+% \end{macro}
+
 %
 % \begin{environment}{LWR at tabular} \oarg{vertposition} \marg{colspecs}
 %
@@ -16370,21 +16904,27 @@
 %    \begin{macrocode}
 \global\boolfalse{LWR at startedrow}%
 %    \end{macrocode}
-% Not yet doing an hline:
+% Not yet doing any rules:
 %    \begin{macrocode}
 \global\boolfalse{LWR at doinghline}%
-%    \end{macrocode}
-% Not yet doing a top/bottom rule:
-%    \begin{macrocode}
 \global\boolfalse{LWR at doingtbrule}%
+\global\boolfalse{LWR at doingcmidrule}%
 %    \end{macrocode}
-% For \pkg{babel-french}:
+%
+% For \pkg{babel-french}, turn off auto spacing one time, then nullify
+% the autospacing commands since were not compatible with the tabular parsing code.
+%
+% \changes{v0.41}{2017/10/06}{Fix: \cs{NoAutoSpacing} in a tabular
+%   with \protect\pkg{babel-french}.}
+%
 %    \begin{macrocode}
-\LWR at FBcancel%
+\LWR at nullifyNoAutoSpacing%
 %    \end{macrocode}
-% Have not yet found the end of tabular command:
+% Have not yet found the end of tabular command.
+% Unmute the |@| and |!| columns.
 %    \begin{macrocode}
 \boolfalse{LWR at exitingtabular}%
+\boolfalse{LWR at tabularmutemods}%
 %    \end{macrocode}
 % Create the |table| tag:
 %    \begin{macrocode}
@@ -16425,18 +16965,37 @@
 %
 \RenewDocumentCommand{\cline}{m}%
 {\LWR at docmidrule{##1}\LWR at getmynexttoken}%
-
-\DeclareDocumentCommand{\toprule}{o}{\LWR at dotbrule\LWR at getmynexttoken}%
-
-\DeclareDocumentCommand{\midrule}{o}{\LWR at domidrule\LWR at getmynexttoken}%
-
-\DeclareDocumentCommand{\cmidrule}{o d() m}%
+%    \end{macrocode}
+% \changes{v0.41}{2017/10/03}{Improved rules.}
+%    \begin{macrocode}
+\DeclareDocumentCommand{\toprule}{o d()}
+    {%
+        \IfValueTF{##1}%
+            {\LWR at docmidrule[##1](){1-\theLWR at tabletotalcols}}%
+            {\booltrue{LWR at doingtbrule}}%
+    \LWR at getmynexttoken}%
+%
+\DeclareDocumentCommand{\midrule}{o d()}%
+    {%
+        \IfValueTF{##1}%
+            {\LWR at docmidrule[##1](){1-\theLWR at tabletotalcols}}%
+            {\booltrue{LWR at doinghline}}%
+    \LWR at getmynexttoken}%
+%
+\DeclareDocumentCommand{\cmidrule}{O{\LWR at cmidrulewidth} d() m}%
 {\LWR at docmidrule[##1](##2){##3}\LWR at getmynexttoken}%
-
-\DeclareDocumentCommand{\bottomrule}{o}{\LWR at dotbrule\LWR at getmynexttoken}%
-\DeclareDocumentCommand{\addlinespace}{o}{}
-\DeclareDocumentCommand{\morecmidrules}{}{}
-\DeclareDocumentCommand{\specialrule}{m m m}{\LWR at domidrule\LWR at getmynexttoken}
+%
+\DeclareDocumentCommand{\bottomrule}{o d()}
+    {%
+        \IfValueTF{##1}%
+            {\LWR at docmidrule[##1](){1-\theLWR at tabletotalcols}}%
+            {\booltrue{LWR at doingtbrule}}%
+    \LWR at getmynexttoken}%
+%
+\DeclareDocumentCommand{\addlinespace}{o}{}%
+\DeclareDocumentCommand{\morecmidrules}{}{}%
+\DeclareDocumentCommand{\specialrule}{m m m d()}%
+    {\LWR at docmidrule[##1](){1-\theLWR at tabletotalcols}\LWR at getmynexttoken}%
 %    \end{macrocode}
 % The following create data cells and will have no more data in this cell,
 % so we do not want to look ahead for a possible data cell,
@@ -16443,7 +17002,16 @@
 % so do not want to use |\LWR at getmynexttoken|.
 %    \begin{macrocode}
 \renewcommand{\multicolumn}{\LWR at htmlmulticolumn}%
-\renewcommand*{\mrowcell}{\global\booltrue{LWR at skippingmrowcell}}%
+\renewcommand*{\mrowcell}{%
+    \LWR at maybenewtablerow%
+    \LWR at tabularleftedge%
+    \global\booltrue{LWR at skippingmrowcell}%
+}%
+\renewcommand*{\mcolrowcell}{%
+    \LWR at maybenewtablerow%
+    \LWR at tabularleftedge%
+    \global\booltrue{LWR at skippingmcolrowcell}%
+}%
 \LetLtxMacro{\caption}{\LWR at longtabledatacaptiontag}%
 %    \end{macrocode}
 % Reset for new processing:
@@ -16450,7 +17018,9 @@
 %    \begin{macrocode}
 \global\boolfalse{LWR at tableparcell}%
 \global\boolfalse{LWR at skippingmrowcell}%
+\global\boolfalse{LWR at skippingmcolrowcell}%
 \global\boolfalse{LWR at skipatbang}%
+\global\boolfalse{LWR at emptyatbang}%
 %    \end{macrocode}
 % Set |&| for its special meaning inside the tabular:
 %    \begin{macrocode}
@@ -16467,7 +17037,12 @@
 %    \begin{macrocode}
 {%
 \LWR at traceinfo{LWR at tabular ending}%
-\LWR at closetabledatacell%
+\ifthenelse{\value{LWR at tablecolspos}<\value{LWR at tablecolswidth}}{%
+    \LWR at tabularfinishrow%
+}%
+{%
+    \LWR at closetabledatacell%
+}%
 \LWR at htmlblocktag{/tr}%
 \LWR at htmlblocktag{/table}%
 \global\boolfalse{LWR at intabularmetadata}%
@@ -16496,6 +17071,7 @@
 
 
 
+
 % \subsection{Array}
 % \label{sec:array}
 
@@ -20192,7 +20768,7 @@
 %
 % \begin{macro}{\LWR at forceminwidth} \marg{legth}
 %
-% Sets \cs{LWR at tempwidth} to be at least 1pt.
+% Sets \cs{LWR at atleastonept} to be at least 1pt.
 %    \begin{macrocode}
 \newlength{\LWR at atleastonept}
 
@@ -21659,11 +22235,8 @@
 %    \begin{macrocode}
 \RequirePackage{multicol}
 %    \end{macrocode}
-% Used to compute margins:
-%    \begin{macrocode}
-\newlength{\LWR at templengthone}%
-\newlength{\LWR at templengthtwo}%
-%    \end{macrocode}
+
+
 % * \marg{numcols} \marg{left margi} \marg{right margin}
 %   \marginpar{\hfill\env{adjmulticols}}
 %    \begin{macrocode}
@@ -28155,7 +28728,7 @@
 %
 % \subsection{Multirow}
 %
-% \begin{macro}{\LWR at tabledatamultirowtag}
+% \DescribeMacro{\multirow}
 %   \oarg{vpos} \marg{numrows} \oarg{bigstruts} \marg{width} \oarg{fixup} \marg{text}
 % \changes{v0.19}{2015/05/28}{Added optional args.}
 % \changes{v0.39}{2017/08/30}{Add: New optional \protect\texttt{vpos} argument.}
@@ -28162,11 +28735,13 @@
 % \changes{v0.39}{2017/08/30}{Add: Supports left/right border for \pkg{bigdelim}.}
 % \changes{v0.39}{2017/08/30}{Fix: Long text argument.}
 % \changes{v0.40}{2017/09/22}{Improved \pkg{bigdelim} borders.}
+% \changes{v0.41}{2017/09/28}{Add: \cs{cmidrule} trims.}
 %    \begin{macrocode}
 \RenewDocumentCommand{\multirow}{O{c} m o m o +m}%
 {%
 \LWR at traceinfo{*** multirow #1 #2 #4}
 \LWR at maybenewtablerow%
+\LWR at tabularleftedge%
 %    \end{macrocode}
 % Print the start of a new table data cell:
 %    \begin{macrocode}
@@ -28184,7 +28759,7 @@
 \ifdefvoid{\LWR at multirowborder}{}{%
 style="border-\LWR at multirowborder: 2px dotted black ; %
 padding-\LWR at multirowborder: 2px" %
-}
+}%
 %    \end{macrocode}
 % A class adds the column spec and the rule:
 %    \begin{macrocode}
@@ -28194,14 +28769,25 @@
 %    \begin{macrocode}
 \StrChar{\LWR at tablecolspec}{\theLWR at tablecolspos}%
 %    \end{macrocode}
-% If this column has a cmidrule, add ``rule'' to the end of the \HTML\ class tag:
+% If this column has a cmidrule, add ``rule'' to the end of the \HTML\ class tag.
+% Also add the vertical bar class.
+% \changes{v0.41}{2017/10/07}{Added vertical rules.}
 %    \begin{macrocode}
-\ifthenelse{\equal{\LWR at getexparray{LWR at midrules}{\theLWR at tablecolspos}}{Y}}{rule}{}%
-"{}}
+\LWR at addcmidruletrim%
+\LWR at addleftmostbartag%
+\LWR at printbartag{\theLWR at tablecolspos}%
+"%
+\LWR at addcmidrulewidth%
+}%
 %    \end{macrocode}
+% \changes{v0.41}{2017/10/05}{Fix: \protect\textless\ spec.}
+% The column's |<| spec:
+%    \begin{macrocode}
+\LWR at getexparray{LWR at colbeforespec}{\theLWR at tablecolspos}%
+%    \end{macrocode}
 % While printing the text, redefine |\\| to generate a new line
 %    \begin{macrocode}
-\begingroup \LetLtxMacro{\\}{\LWR at endofline} #6 \endgroup
+\begingroup\LetLtxMacro{\\}{\LWR at endofline}#6\endgroup%
 \LWR at stoppars%
 \global\boolfalse{LWR at intabularmetadata}%
 \renewcommand{\LWR at multirowborder}{}%
@@ -28208,7 +28794,6 @@
 \LWR at traceinfo{*** multirow done}%
 }%
 %    \end{macrocode}
-% \end{macro}
 %
 %
 % \subsection{Combined multicolumn and multirow}

Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-adjmulticol.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-adjmulticol.sty	2017-10-07 22:11:56 UTC (rev 45495)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-adjmulticol.sty	2017-10-07 22:12:24 UTC (rev 45496)
@@ -17,8 +17,7 @@
 %% version 2005/12/01 or later.
 \LWR at ProvidesPackageDrop{adjmulticol}
 \RequirePackage{multicol}
-\newlength{\LWR at templengthone}%
-\newlength{\LWR at templengthtwo}%
+
 \NewDocumentEnvironment{adjmulticols}{s m m m}
 {%
 \setlength{\LWR at templengthone}{#3}%

Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-multirow.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-multirow.sty	2017-10-07 22:11:56 UTC (rev 45495)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp-multirow.sty	2017-10-07 22:12:24 UTC (rev 45496)
@@ -24,6 +24,7 @@
 {%
 \LWR at traceinfo{*** multirow #1 #2 #4}
 \LWR at maybenewtablerow%
+\LWR at tabularleftedge%
 \LWR at htmltag{td rowspan="#2" %
 \IfValueT{#1}{%
 \ifstrequal{#1}{b}{style="vertical-align:bottom" }{}%
@@ -32,12 +33,17 @@
 \ifdefvoid{\LWR at multirowborder}{}{%
 style="border-\LWR at multirowborder: 2px dotted black ; %
 padding-\LWR at multirowborder: 2px" %
-}
+}%
 class="td%
 \StrChar{\LWR at tablecolspec}{\theLWR at tablecolspos}%
-\ifthenelse{\equal{\LWR at getexparray{LWR at midrules}{\theLWR at tablecolspos}}{Y}}{rule}{}%
-"{}}
-\begingroup \LetLtxMacro{\\}{\LWR at endofline} #6 \endgroup
+\LWR at addcmidruletrim%
+\LWR at addleftmostbartag%
+\LWR at printbartag{\theLWR at tablecolspos}%
+"%
+\LWR at addcmidrulewidth%
+}%
+\LWR at getexparray{LWR at colbeforespec}{\theLWR at tablecolspos}%
+\begingroup\LetLtxMacro{\\}{\LWR at endofline}#6\endgroup%
 \LWR at stoppars%
 \global\boolfalse{LWR at intabularmetadata}%
 \renewcommand{\LWR at multirowborder}{}%

Modified: trunk/Master/texmf-dist/tex/latex/lwarp/lwarp.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/lwarp/lwarp.sty	2017-10-07 22:11:56 UTC (rev 45495)
+++ trunk/Master/texmf-dist/tex/latex/lwarp/lwarp.sty	2017-10-07 22:12:24 UTC (rev 45496)
@@ -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 @@
 
 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,29 +1635,31 @@
 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 ;
     padding-bottom: 1ex ; margin: 0ex ; }
@@ -2637,7 +2639,7 @@
 
 -- 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,51 +3458,50 @@
 
 \providecommand*{\LWR at FBcancel}{}
 
-\AtBeginDocument{
-\@ifundefined{frenchbsetup}
-{}
-{
-    \frenchbsetup{FrenchFootnotes=false}
-        % OR: redefine \insertfootnotemarkFB?
-    \LetLtxMacro\LWR at FBcancel\NoAutoSpacing
+\AtBeginDocument{%
+\@ifundefined{frenchbsetup}%
+{}%
+{%
+    \frenchbsetup{FrenchFootnotes=false}%
+    \LetLtxMacro\LWR at FBcancel\NoAutoSpacing%
     \renewcommand*{\FBcolonspace}{%
         \begingroup%
         \LWR at FBcancel%
         \LWR at origampersand{}nbsp;%
         \endgroup%
-    }
+    }%
     \renewcommand*{\FBthinspace}{%
         \begingroup%
         \LWR at FBcancel%
         \LWR at origampersand\#x202f;% \,
         \endgroup%
-    }
+    }%
     \renewcommand*{\FBguillspace}{%
         \begingroup%
         \LWR at FBcancel%
         \LWR at origampersand{}nbsp;% ~,  for \og xyz \fg{}
         \endgroup%
-    }
+    }%
     \DeclareDocumentCommand{\FBmedkern}{}{%
         \begingroup%
         \LWR at FBcancel%
         \LWR at origampersand\#x202f;% \,
         \endgroup%
-    }
+    }%
     \DeclareDocumentCommand{\FBthickkern}{}{%
         \begingroup%
         \LWR at FBcancel%
         \LWR at 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%
+}%
 }
-}
 
 
 \newcommand*{\LWR at htmltagc}[1]{%
@@ -5056,36 +5057,60 @@
 \newbool{LWR at doingtbrule}
 \boolfalse{LWR at doingtbrule}
 
+\newbool{LWR at doingcmidrule}
+\boolfalse{LWR at doingcmidrule}
+
 \newbool{LWR at tableparcell}
 
 \newbool{LWR at skippingmrowcell}
 
+\newbool{LWR at skippingmcolrowcell}
+
 \newbool{LWR at skipatbang}
 
+\newbool{LWR at emptyatbang}
+
 \newbool{LWR at intabularmetadata}
 \boolfalse{LWR at intabularmetadata}
 
 
+\newcommand*{\LWR at insertatbangcols}{%
+\ifbool{LWR at skipatbang}%
+{}%
+{%
+    \LWR at printatbang{at}{\theLWR at tablecolspos}%
+    \LWR at printatbang{bang}{\theLWR at tablecolspos}%
+}%
+}
+
 \newcommand*{\LWR at closetabledatacell}{%
 \global\booltrue{LWR at intabularmetadata}%
 \ifbool{LWR at exitingtabular}{}%
 {% not exiting tabular
-    \ifbool{LWR at skippingmrowcell}{}%
+    \ifboolexpr{bool{LWR at skippingmrowcell} or bool{LWR at skippingmcolrowcell}}%
+    {%
+        \ifbool{LWR at skippingmcolrowcell}%
+        {}%
+        {\LWR at insertatbangcols}%
+    }%
     {% not skippingmrowcell
         \unskip%
-        \LWR at getexparray{LWR at colafterspec}{\theLWR at tablecolspos}%
+        \ifboolexpr{%
+            bool{LWR at tabularmutemods} or
+            bool{LWR at skipatbang} or
+            bool{LWR at emptyatbang}
+        }%
+        {}%
+        {\LWR at getexparray{LWR at colafterspec}{\theLWR at tablecolspos}}%
         \ifbool{LWR at tableparcell}{\LWR at stoppars}{}%
         \global\boolfalse{LWR at tableparcell}%
         \leavevmode\unskip\LWR at htmltag{/td}\LWR at orignewline%
-        \ifbool{LWR at skipatbang}%
-        {\boolfalse{LWR at skipatbang}}%
-        {%
-            \LWR at printatbang{at}{\theLWR at tablecolspos}%
-            \LWR at printatbang{bang}{\theLWR at tablecolspos}%
-        }% not skipping at or bang
+        \LWR at insertatbangcols%
     }% not skipping mrowcell
 }% not exiting tabular
 \global\boolfalse{LWR at skippingmrowcell}%
+\global\boolfalse{LWR at skippingmcolrowcell}%
+\global\boolfalse{LWR at skipatbang}%
 }
 
 \newcounter{LWR at tabulardepth}
@@ -5120,14 +5145,47 @@
 }
 
 
+\newcommand*{\LWR at tabularfinishrow}{%
+\ifboolexpr{%
+    not bool {LWR at exitingtabular} or%
+    bool{LWR at doingtbrule} or%
+    bool{LWR at doingcmidrule} or%
+    bool{LWR at doinghline} or%
+    bool{LWR at startedrow}%
+}{%
+\begingroup%
+\ifbool{LWR at exitingtabular}{%
+    \booltrue{LWR at tabularmutemods}%
+}{}%
+\boolfalse{LWR at exitingtabular}%
+\whiledo{\value{LWR at tablecolspos}<\value{LWR at tabletotalcols}}{%
+\LWR at tabledatasinglecolumntag%
+    \LWR at closetabledatacell%
+    \addtocounter{LWR at tablecolspos}{1}%
+    \global\booltrue{LWR at emptyatbang}%
+    \LWR at getmynexttoken%
+}%
+\LWR at closetabledatacell%
+\endgroup%
+\global\boolfalse{LWR at emptyatbang}%
+}{}% ifboolexpr
+}
+
+
 \NewDocumentCommand{\LWR at tabularendofline}{s o}
 {%
-\LWR at closetabledatacell%
+\ifthenelse{\value{LWR at tablecolspos}<\value{LWR at tabletotalcols}}{%
+    \LWR at tabularfinishrow%
+}%
+{%
+    \LWR at closetabledatacell%
+}%
 \LWR at htmltag{/tr}\LWR at orignewline
 \global\booltrue{LWR at intabularmetadata}
 \global\boolfalse{LWR at startedrow}
 \global\boolfalse{LWR at doinghline}%
 \global\boolfalse{LWR at doingtbrule}%
+\global\boolfalse{LWR at doingcmidrule}%
 \LWR at clearmidrules%
 \setcounter{LWR at tablecolspos}{1}
 \LWR at getmynexttoken%
@@ -5219,7 +5277,15 @@
 \let\LWR at colparameter\relax%
 \booltrue{LWR at validtablecol}%
 }
-\newcommand*{\LWR at parseskipcolumn}{%
+\newcommand*{\LWR at parsebarcolumn}{%
+\LWR at traceinfo{bar column}%
+\ifthenelse{\cnttest{\value{LWR at tabletotalcols}}=0}%
+{% left edge of the table:
+    \LWR at setexparray{LWR at colbarspec}{leftedge}{tvertbarl}%
+}%
+{% not at the left edge:
+    \LWR at setexparray{LWR at colbarspec}{\theLWR at tabletotalcols}{tvertbarr}%
+}%
 \booltrue{LWR at validtablecol}%
 }
 \newcommand*{\LWR at parsenormalcolumn}[1]{%
@@ -5231,6 +5297,7 @@
 \LWR at setexparray{LWR at colbangspec}{\theLWR at tabletotalcolsnext}{}%
 \LWR at setexparray{LWR at colbeforespec}{\theLWR at tabletotalcolsnext}{}%
 \LWR at setexparray{LWR at colafterspec}{\theLWR at tabletotalcolsnext}{}%
+\LWR at setexparray{LWR at colbarspec}{\theLWR at tabletotalcolsnext}{}%
 \booltrue{LWR at validtablecol}%
 }
 
@@ -5266,6 +5333,10 @@
 \LWR at setexparray{LWR at colafterspec}{1}{}%
 \LWR at setexparray{LWR at colafterspec}{2}{}%
 \LWR at setexparray{LWR at colafterspec}{3}{}%
+\LWR at setexparray{LWR at colbarspec}{leftedge}{}%
+\LWR at setexparray{LWR at colbarspec}{1}{}%
+\LWR at setexparray{LWR at colbarspec}{2}{}%
+\LWR at setexparray{LWR at colbarspec}{3}{}%
 \setcounter{LWR at tablecolspos}{1}%
 \LWR at traceinfo{about to StrLen}%
 \noexpandarg%
@@ -5291,7 +5362,7 @@
 \IfStrEq{\LWR at strresult}{!}{\LWR at parsebangcolumn}{}%
 \IfStrEq{\LWR at strresult}{>}{\LWR at parsebeforecolumn}{}%
 \IfStrEq{\LWR at strresult}{<}{\LWR at parseaftercolumn}{}%
-\IfStrEq{\LWR at strresult}{|}{\LWR at parseskipcolumn}{}%
+\IfStrEq{\LWR at strresult}{|}{\LWR at parsebarcolumn}{}%
 \IfStrEq{\LWR at strresult}{p}{\LWR at parsepcolumn{p}}{}%
 \IfStrEq{\LWR at strresult}{m}{\LWR at parsepcolumn{m}}{}%
 \IfStrEq{\LWR at strresult}{b}{\LWR at parsepcolumn{b}}{}%
@@ -5317,10 +5388,16 @@
     \global\booltrue{LWR at startedrow}%
     \global\booltrue{LWR at intabularmetadata}%
     \ifbool{LWR at doinghline}%
-    {\LWR at htmltag{tr class="hline"{}}\LWR at orignewline}%
+    {%
+        \LWR at htmltag{tr class="hline" }%
+        \LWR at orignewline%
+    }%
     {% not doing hline
         \ifbool{LWR at doingtbrule}%
-        {\LWR at htmltag{tr class="tbrule"{}}\LWR at orignewline}%
+        {%
+            \LWR at htmltag{tr class="tbrule"}%
+            \LWR at orignewline%
+        }%
         {\LWR at htmltag{tr}\LWR at orignewline}%
     }% end of not doing hline
 }% end of not started the row
@@ -5327,21 +5404,58 @@
 }
 
 
+\newcommand*{\LWR at printbartag}[1]{%
+\ifboolexpr{bool{LWR at tabularmutemods} or bool{LWR at emptyatbang}}%
+{%
+}%
+{ % not muting
+    \ifstrequal{#1}{leftedge}{%
+            \LWR at getexparray{LWR at colbarspec}{leftedge} %
+    }%
+    {
+        \LWR at getexparray{LWR at colbarspec}{#1} %
+        \edef\LWR at tempone{\LWR at getexparray{LWR at colbarspec}{#1}}%
+    } %
+}% not muting
+}
+
+
 \newcommand*{\LWR at printatbang}[2]{%
-\edef\LWR at atbangspec{\LWR at getexparray{LWR at col#1spec}{#2}}
-\LWR at traceinfo{atbang: !\LWR at atbangspec!}
+\edef\LWR at atbangspec{\LWR at getexparray{LWR at col#1spec}{#2}}%
+\LWR at traceinfo{atbang: #2 !\LWR at atbangspec!}%
 \ifdefempty{\LWR at atbangspec}%
 {}%
-{%
-    \LWR at htmltag{td class="td#1%
-    \ifthenelse{\equal{\LWR at getexparray{LWR at midrules}{\theLWR at tablecolspos}}{Y}}{rule}{}%
-    "}%
-    \LWR at atbangspec%
+{% not empty
+    \LWR at htmltag{%
+        td class="td#1%
+        \LWR at subaddcmidruletrim{}{}%
+        \LWR at printbartag{#2}%
+        "%
+        \LWR at addcmidrulewidth%
+    }%
+    \ifboolexpr{bool{LWR at tabularmutemods} or bool{LWR at emptyatbang}}%
+    {}%
+    {\LWR at atbangspec}%
     \LWR at htmltag{/td}\LWR at orignewline%
+}% not empty
 }%
-}%
 
+\newcommand*{\LWR at addleftmostbartag}{%
+\ifnumcomp{\value{LWR at tablecolspos}}{=}{1}{%
+    \LWR at printbartag{leftedge}%
+}{}%
+}
 
+\newcommand*{\LWR at tabularleftedge}{%
+\ifthenelse{\cnttest{\value{LWR at tablecolspos}}=1}%
+{%
+    \LWR at printatbang{at}{leftedge}%
+    \LWR at printatbang{bang}{leftedge}%
+}% left edge
+{}% not left edge
+}
+
+
 \newcommand*{\LWR at tabledatasinglecolumntag}%
 {%
 \LWR at maybenewtablerow%
@@ -5349,19 +5463,16 @@
 {%
     \ifbool{LWR at exitingtabular}{}%
     {% not exiting tabular
-        \ifthenelse{\cnttest{\value{LWR at tablecolspos}}=1}%
-        {%
-            \LWR at printatbang{at}{leftedge}%
-            \LWR at printatbang{bang}{leftedge}%
-        }% left edge
-        {}% not left edge
+        \LWR at tabularleftedge%
         \StrChar{\LWR at tablecolspec}{\theLWR at tablecolspos}[\LWR at strresult]%
         \LWR at htmltag{td class="td%
         \LWR at strresult%
-        \ifthenelse{\equal{\LWR at getexparray{LWR at midrules}{\theLWR at tablecolspos}}{Y}}%
-        {rule}%
-        {}%
-        "{}}%
+        \LWR at addcmidruletrim%
+        \LWR at addleftmostbartag%
+        \LWR at printbartag{\theLWR at tablecolspos}%
+        "%
+        \LWR at addcmidrulewidth%
+        }%
         \ifthenelse{%
             \equal{\LWR at strresult}{p}\OR%
             \equal{\LWR at strresult}{m}\OR%
@@ -5376,7 +5487,9 @@
             \global\booltrue{LWR at tableparcell}%
         }% allow pars
         {}% no pars
-        \LWR at getexparray{LWR at colbeforespec}{\theLWR at tablecolspos}%
+        \ifboolexpr{bool{LWR at tabularmutemods} or bool{LWR at emptyatbang}}%
+        {}%
+        {\LWR at getexparray{LWR at colbeforespec}{\theLWR at tablecolspos}}%
         \global\boolfalse{LWR at intabularmetadata}%
     }% not exiting tabular
 }{}% in tabular metadata
@@ -5383,8 +5496,22 @@
 }%
 
 
+
+
 \newcounter{LWR at midrulecounter}
 
+\newlength{\LWR at heavyrulewidth}
+\setlength{\LWR at heavyrulewidth}{.08em}
+
+\newlength{\LWR at lightrulewidth}
+\setlength{\LWR at lightrulewidth}{.05em}
+
+\newlength{\LWR at cmidrulewidth}
+\setlength{\LWR at cmidrulewidth}{.03em}
+
+\newlength{\LWR at thiscmidrulewidth}
+\setlength{\LWR at thiscmidrulewidth}{\LWR at cmidrulewidth}
+
 \newcommand*{\LWR at clearmidrules}
 {%
 \setcounter{LWR at midrulecounter}{1}%
@@ -5392,7 +5519,10 @@
 \cnttest{\value{LWR at midrulecounter}}{<=}{\value{LWR at tablecolswidth}}%
 }%
 {%
-\LWR at setexparray{LWR at midrules}{\theLWR at midrulecounter}{}%
+\LWR at setexparray{LWR at midrules}{\theLWR at midrulecounter}{0pt}%
+\setlength{\LWR at thiscmidrulewidth}{\LWR at cmidrulewidth}%
+\LWR at setexparray{LWR at trimlrules}{\theLWR at midrulecounter}{}%
+\LWR at setexparray{LWR at trimrrules}{\theLWR at midrulecounter}{}%
 \addtocounter{LWR at midrulecounter}{1}%
 }%
 }
@@ -5401,16 +5531,59 @@
 \setcounter{LWR at midrulecounter}{#3}%
 \whiledo{\cnttest{\value{LWR at midrulecounter}}{<=}{#4}}%
 {%
-\LWR at setexparray{LWR at midrules}{\theLWR at midrulecounter}{Y}%
+\LWR at setexparray{LWR at midrules}{\theLWR at midrulecounter}{#1}%
 \addtocounter{LWR at midrulecounter}{1}%
-}% end of the whiledo
+}% whiledo
+\IfSubStr{#2}{l}{\LWR at setexparray{LWR at trimlrules}{#3}{l}}{}%
+\IfSubStr{#2}{r}{\LWR at setexparray{LWR at trimrrules}{#4}{r}}{}%
+\booltrue{LWR at doingcmidrule}%
 }
 
-\NewDocumentCommand{\LWR at docmidrule}{o d() >{\SplitArgument{1}{-}}m}%
+\NewDocumentCommand{\LWR at docmidrule}{O{\LWR at cmidrulewidth} D(){} >{\SplitArgument{1}{-}}m}%
 {\LWR at subcmidrule{#1}{#2}#3}
 
+\newlength{\LWR at templengthone}%
+\newlength{\LWR at templengthtwo}%
 
+\newcommand*{\LWR at subaddcmidruletrim}[2]{%
+\setlength{\LWR at templengthone}{\LWR at getexparray{LWR at midrules}{\theLWR at tablecolspos}}%
+\ifdimcomp{\LWR at templengthone}{>}{0pt}%
+{%
+    \LWR at origtilde tdrule#1#2%
+    \setlength{\LWR at thiscmidrulewidth}{\LWR at templengthone}%
+}{}%
+}
 
+\newcommand*{\LWR at addcmidruletrim}{%
+\LWR at subaddcmidruletrim%
+{\LWR at getexparray{LWR at trimlrules}{\theLWR at tablecolspos}}%
+{\LWR at getexparray{LWR at trimrrules}{\theLWR at tablecolspos}}%
+}
+
+\newcommand{\LWR at addrulewidth}[2]{%
+\ifdimcomp{#1}{=}{#2}%
+{}% default width
+{% custom width
+    \LWR at forceminwidth{#1}%
+    \uselengthunit{PT} % explicit space
+    style="border-top:\rndprintlength{\LWR at atleastonept} solid %
+    \ifdimcomp{#1}{<}{\LWR at lightrulewidth}%
+    {\#A0A0A0}%
+    {% lightrule or heaver
+        \ifdimcomp{#1}{<}{\LWR at heavyrulewidth}%
+        {\#808080}%
+        {black}%
+    }% lightrule or heavier
+    "%
+}% custom width
+}
+
+\newcommand{\LWR at addcmidrulewidth}{%
+\LWR at addrulewidth{\LWR at thiscmidrulewidth}{\LWR at cmidrulewidth}%
+}
+
+
+
 \newcounter{LWR at tablemulticolswidth}
 \newcounter{LWR at tablemulticolspos}
 
@@ -5499,6 +5672,7 @@
 \booltrue{LWR at validtablecol}%
 }%
 \LWR at maybenewtablerow%
+\LWR at tabularleftedge%
 \LWR at htmltag{td colspan="#3" %
 \IfValueT{#2}{ % rows?
 rowspan="#2" %
@@ -5509,8 +5683,11 @@
 }% rows?
  class="td%
 \LWR at parsemulticolumnalignment{#4}{\LWR at printmccoltype}%
-\ifthenelse{\equal{\LWR at getexparray{LWR at midrules}{\theLWR at tablecolspos}}{Y}}{rule}{}%
+\LWR at addcmidruletrim%
+\LWR at addleftmostbartag%
+\LWR at printbartag{\theLWR at tablecolspos}%
 "%
+\LWR at addcmidrulewidth%
 }% end of the opening table data tag
 \global\boolfalse{LWR at intabularmetadata}%
 \LWR at parsemulticolumnalignment{#4}{\LWR at printmccoldata}%
@@ -5605,18 +5782,18 @@
 \setcounter{LWR at tabhtmlcolend}{#1}%
 \addtocounter{LWR at tabhtmlcolend}{#2}%
 \whiledo{\value{LWR at tabhtmlcolindex}<\value{LWR at tabhtmlcolend}}{%
-\edef\LWR at atbangspec{\LWR at getexparray{LWR at colatspec}{\theLWR at tabhtmlcolindex}}%
-\ifdefempty{\LWR at atbangspec}{}{\addtocounter{LWR at tabhtmlcoltotal}{1}}%
-\edef\LWR at atbangspec{\LWR at getexparray{LWR at colbangspec}{\theLWR at tabhtmlcolindex}}%
-\ifdefempty{\LWR at atbangspec}{}{\addtocounter{LWR at tabhtmlcoltotal}{1}}%
-\addtocounter{LWR at tabhtmlcolindex}{1}%
-}%
-\ifthenelse{\value{LWR at tablecolspos}=1}{%
-    \edef\LWR at atbangspec{\LWR at getexparray{LWR at colatspec}{leftedge}}%
-    \ifdefempty{\LWR at atbangspec}{}{\addtocounter{LWR at tabhtmlcoltotal}{1}}%
-    \edef\LWR at atbangspec{\LWR at getexparray{LWR at colbangspec}{leftedge}}%
-    \ifdefempty{\LWR at atbangspec}{}{\addtocounter{LWR at tabhtmlcoltotal}{1}}%
-}{}%
+    \edef\LWR at atbangspec{\LWR at getexparray{LWR at colatspec}%
+        {\theLWR at tabhtmlcolindex}}%
+    \ifdefempty{\LWR at atbangspec}%
+        {}%
+        {\addtocounter{LWR at tabhtmlcoltotal}{1}}%
+    \edef\LWR at atbangspec{\LWR at getexparray{LWR at colbangspec}%
+        {\theLWR at tabhtmlcolindex}}%
+    \ifdefempty{\LWR at atbangspec}%
+        {}%
+        {\addtocounter{LWR at tabhtmlcoltotal}{1}}%
+    \addtocounter{LWR at tabhtmlcolindex}{1}%
+}% whiledo
 }
 \end{warpHTML}
 \begin{warpall}
@@ -5648,8 +5825,6 @@
 \end{warpall}
 \begin{warpHTML}
 \newcommand*{\LWR at donothing}{}
-\newcommand*{\LWR at domidrule}{\booltrue{LWR at doinghline}}
-\newcommand*{\LWR at dotbrule}{\booltrue{LWR at doingtbrule}}
 \newcommand*{\ldelim}{}
 \newcommand*{\rdelim}{}
 
@@ -5665,6 +5840,7 @@
 
 \newcommand*{\ResumeTabular}{%
 \global\boolfalse{LWR at exitingtabular}%
+\global\boolfalse{LWR at tabularmutemods}%
 \LWR at getmynexttoken%
 }
 
@@ -5681,6 +5857,8 @@
 
 \newbool{LWR at exitingtabular}
 
+\newbool{LWR at tabularmutemods}
+
 \newcommand*{\LWR at tabledatacolumntag}%
 {%
 \LWR at traceinfo{LWR at tabledatacolumntag}%
@@ -5697,6 +5875,8 @@
     {\let\mynext\LWR at donothing}{}%
 \ifdefequal{\LWR at mynexttoken}{\mrowcell}%
     {\let\mynext\LWR at donothing}{}%
+\ifdefequal{\LWR at mynexttoken}{\mcolrowcell}%
+    {\let\mynext\LWR at donothing}{}%
 \ifdefequal{\LWR at mynexttoken}{\TabularMacro}%
     {\let\mynext\LWR at donothing}{}%
 \ifdefequal{\LWR at mynexttoken}{\hline}%
@@ -5727,12 +5907,20 @@
 \end{warpHTML}
 
 
+\begin{warpall}
 
-\begin{warpall}
 \newcommand*{\mrowcell}{}
+
 \end{warpall}
 
 
+\begin{warpall}
+
+\newcommand*{\mcolrowcell}{}
+
+\end{warpall}
+
+
 \begin{warpHTML}
 \newcommand*{\LWR at origtoprule}[1]{\hline}
 \newcommand*{\LWR at origmidrule}[1]{\hline}
@@ -5743,9 +5931,28 @@
 \newcommand*{\LWR at origspecialrule}[3]{\hline}
 \AtBeginDocument{
 \@ifpackageloaded{lwarp-tabls}
-{\newcommand*{\LWR at hline}[1][]{\LWR at domidrule\LWR at getmynexttoken}}
-{\newcommand*{\LWR at hline}{\LWR at domidrule\LWR at getmynexttoken}}
+{\newcommand*{\LWR at hline}[1][]{%
+    \booltrue{LWR at doinghline}%
+    \LWR at getmynexttoken}}
+{\newcommand*{\LWR at hline}{%
+    \booltrue{LWR at doinghline}%
+    \LWR at getmynexttoken}}
 }% AtBeginDocument
+
+\AtBeginDocument{
+\@ifundefined{frenchbsetup}%
+{% no babel-french
+    \newcommand*{\LWR at nullifyNoAutoSpacing}{}
+}% no babel-french
+{% yes babel-french
+    \newcommand*{\LWR at nullifyNoAutoSpacing}{%
+        \NoAutoSpacing%
+        \renewcommand*{\NoAutoSpacing}{}%
+        \renewcommand*{\LWR at FBcancel}{}%
+    }
+}% yes babel-french
+}% AtBeginDocument
+
 \StartDefiningTabulars
 
 \newenvironment*{LWR at tabular}[2][]
@@ -5755,8 +5962,10 @@
 \global\boolfalse{LWR at startedrow}%
 \global\boolfalse{LWR at doinghline}%
 \global\boolfalse{LWR at doingtbrule}%
-\LWR at FBcancel%
+\global\boolfalse{LWR at doingcmidrule}%
+\LWR at nullifyNoAutoSpacing%
 \boolfalse{LWR at exitingtabular}%
+\boolfalse{LWR at tabularmutemods}%
 \global\booltrue{LWR at intabularmetadata}%
 \LWR at forcenewpage
 \LWR at htmlblocktag{table}%
@@ -5769,24 +5978,47 @@
 \renewcommand*{\hline}{\LWR at hline}%
 \RenewDocumentCommand{\cline}{m}%
 {\LWR at docmidrule{##1}\LWR at getmynexttoken}%
-
-\DeclareDocumentCommand{\toprule}{o}{\LWR at dotbrule\LWR at getmynexttoken}%
-
-\DeclareDocumentCommand{\midrule}{o}{\LWR at domidrule\LWR at getmynexttoken}%
-
-\DeclareDocumentCommand{\cmidrule}{o d() m}%
+\DeclareDocumentCommand{\toprule}{o d()}
+    {%
+        \IfValueTF{##1}%
+            {\LWR at docmidrule[##1](){1-\theLWR at tabletotalcols}}%
+            {\booltrue{LWR at doingtbrule}}%
+    \LWR at getmynexttoken}%
+\DeclareDocumentCommand{\midrule}{o d()}%
+    {%
+        \IfValueTF{##1}%
+            {\LWR at docmidrule[##1](){1-\theLWR at tabletotalcols}}%
+            {\booltrue{LWR at doinghline}}%
+    \LWR at getmynexttoken}%
+\DeclareDocumentCommand{\cmidrule}{O{\LWR at cmidrulewidth} d() m}%
 {\LWR at docmidrule[##1](##2){##3}\LWR at getmynexttoken}%
-
-\DeclareDocumentCommand{\bottomrule}{o}{\LWR at dotbrule\LWR at getmynexttoken}%
-\DeclareDocumentCommand{\addlinespace}{o}{}
-\DeclareDocumentCommand{\morecmidrules}{}{}
-\DeclareDocumentCommand{\specialrule}{m m m}{\LWR at domidrule\LWR at getmynexttoken}
+\DeclareDocumentCommand{\bottomrule}{o d()}
+    {%
+        \IfValueTF{##1}%
+            {\LWR at docmidrule[##1](){1-\theLWR at tabletotalcols}}%
+            {\booltrue{LWR at doingtbrule}}%
+    \LWR at getmynexttoken}%
+\DeclareDocumentCommand{\addlinespace}{o}{}%
+\DeclareDocumentCommand{\morecmidrules}{}{}%
+\DeclareDocumentCommand{\specialrule}{m m m d()}%
+    {\LWR at docmidrule[##1](){1-\theLWR at tabletotalcols}\LWR at getmynexttoken}%
 \renewcommand{\multicolumn}{\LWR at htmlmulticolumn}%
-\renewcommand*{\mrowcell}{\global\booltrue{LWR at skippingmrowcell}}%
+\renewcommand*{\mrowcell}{%
+    \LWR at maybenewtablerow%
+    \LWR at tabularleftedge%
+    \global\booltrue{LWR at skippingmrowcell}%
+}%
+\renewcommand*{\mcolrowcell}{%
+    \LWR at maybenewtablerow%
+    \LWR at tabularleftedge%
+    \global\booltrue{LWR at skippingmcolrowcell}%
+}%
 \LetLtxMacro{\caption}{\LWR at longtabledatacaptiontag}%
 \global\boolfalse{LWR at tableparcell}%
 \global\boolfalse{LWR at skippingmrowcell}%
+\global\boolfalse{LWR at skippingmcolrowcell}%
 \global\boolfalse{LWR at skipatbang}%
+\global\boolfalse{LWR at emptyatbang}%
 \StartDefiningTabulars%
 \protected\gdef&{\LWR at tabularampersand}%
 \LWR at traceinfo{LWR at tabular: about to LWR at getmynexttoken}%
@@ -5794,7 +6026,12 @@
 }%
 {%
 \LWR at traceinfo{LWR at tabular ending}%
-\LWR at closetabledatacell%
+\ifthenelse{\value{LWR at tablecolspos}<\value{LWR at tablecolswidth}}{%
+    \LWR at tabularfinishrow%
+}%
+{%
+    \LWR at closetabledatacell%
+}%
 \LWR at htmlblocktag{/tr}%
 \LWR at htmlblocktag{/table}%
 \global\boolfalse{LWR at intabularmetadata}%



More information about the tex-live-commits mailing list