# [tex4ht] question about missing table vertical lines in HTML after 118 subsections have been processed.

Michal Hoftich michal.h21 at gmail.com
Thu Feb 3 15:25:25 CET 2022

Hi Nasser,

>
> All subsection use the same latex code to make a small
> table. The table shows OK with vertical lines showing
> up to subsection 118, then after that the same table
> starts showing with the vertical lines missing !
>

I think that it is an issue with browsers that are based on Chromium
or Webkit. They seem to ignore table border instructions at some
point. It is true that your CSS file is huge, it has hundreds of
thousands of lines. This huge number is caused by tables.

I dug into the code that handles vertical rules and found that it
generates some unnecessary instructions, in particular lines like
#TBL-5586{border-collapse:collapse;}. These can be safely removed, as
all tabulars have set this property by default. When I removed all of
these declarations from your CSS file using regex, Chromium could show
vertical rules.

I also found a way how to support individual vertical rules. Right
now, a table that has one vertical rule, will have set all vertical
rules, regardless of the original LaTeX code. The new code should fix
that. Try the following .cfg file:

%%%%%%%%%%%%%%%%%%%%%
\Preamble{xhtml}

\catcode\:=11
\Configure{VBorder}
{\let\VBorder\empty \let\AllColMargins\empty
\global\let\GROUPS\empty \HAssign\NewGroup = 0
{\xdef\VBorder{\VBorder\ifnum \NewGroup> 0 </colgroup>\fi}
\HAssign\NewGroup = 0 % \gdef\GROUPS{rules="groups"}
%  \Css{\#TBL-\TableNo\space colgroup{border-left: 1px solid
black;border-right:1px solid black;}}
%\Css{\#TBL-\TableNo{border-collapse:collapse;}}
\ifnum\ar:cnt > 0
\Css{\#TBL-\TableNo-\ar:cnt {border-right:1px solid black;}}
\else
\Css{\#TBL-\TableNo-1{border-left: 1px solid black;}}
\fi
}
\ifnum \NewGroup=1 \xdef\VBorder{\VBorder<colgroup
id="TBL-\TableNo-\ar:cnt g">}\fi
\xdef\VBorder{\VBorder<col\Hnewline id="TBL-\TableNo
-\ar:cnt"\xml:empty>}\xdef\AllColMargins{\AllColMargins1}}
{\xdef\AllColMargins{\AllColMargins 0}}
\catcode\:=12
\begin{document}
\EndPreamble

%%%%%%%%%%%%%%%%%%%

I will update TeX4ht sources, so it should work soon in TL.

Best regards,
Michal