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

Nasser M. Abbasi nma at 12000.org
Fri Feb 4 20:43:15 CET 2022


On 2/3/2022 8:25 AM, Michal Hoftich wrote:

> 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
>      \gHAdvance\Next:TableNo by 1 \global\let\TableNo=\Next:TableNo }
>     {\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
> }
>     {\Advance:\NewGroup by 1
>      \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
> 

Hello Michal;

I got a chance finally to try the above. But I am getting an error
on even the most simple example.

make4ht -c ./nma_mathjax.cfg vborder.tex "mathjax,htm"

================
>make4ht -c ./nma_mathjax.cfg vborder.tex "mathjax,htm"
[STATUS]  make4ht: Conversion started
[STATUS]  make4ht: Input file: vborder.tex
[ERROR]   htlatex: Compilation errors in the htlatex run
[ERROR]   htlatex: Filename     Line    Message
[ERROR]   htlatex: ./nma_mathjax.cfg    16       Argument of \c:VBorder: has an extra }.
[ERROR]   htlatex: ./nma_mathjax.cfg    16       Paragraph ended before \c:VBorder: was complete.
[ERROR]   htlatex: ./nma_mathjax.cfg    16       Too many }'s.
[ERROR]   htlatex: ./nma_mathjax.cfg    18       Missing number, treated as zero.
[ERROR]   htlatex: ./nma_mathjax.cfg    18       Missing = inserted for \ifnum.
[ERROR]   htlatex: ./nma_mathjax.cfg    18       Missing number, treated as zero.
[ERROR]   htlatex: ./nma_mathjax.cfg    18       LaTeX Error: Missing \begin{document} in `./nma_mathjax.cfg'.
[ERROR]   htlatex: ./nma_mathjax.cfg    23       Too many }'s.
[ERROR]   htlatex: ./nma_mathjax.cfg    24       Undefined control sequence.
[ERROR]   htlatex: ./nma_mathjax.cfg    24       Missing number, treated as zero.
[ERROR]   htlatex: Compilation errors in the htlatex run
[ERROR]   htlatex: Filename     Line    Message
[ERROR]   htlatex: ./nma_mathjax.cfg    16       Argument of \c:VBorder: has an extra }.
[ERROR]   htlatex: ./nma_mathjax.cfg    16       Paragraph ended before \c:VBorder: was complete.
[ERROR]   htlatex: ./nma_mathjax.cfg    16       Too many }'s.
[ERROR]   htlatex: ./nma_mathjax.cfg    18       Missing number, treated as zero.
[ERROR]   htlatex: ./nma_mathjax.cfg    18       Missing = inserted for \ifnum.
[ERROR]   htlatex: ./nma_mathjax.cfg    18       Missing number, treated as zero.
[ERROR]   htlatex: ./nma_mathjax.cfg    18       LaTeX Error: Missing \begin{document} in `./nma_mathjax.cfg'.
[ERROR]   htlatex: ./nma_mathjax.cfg    23       Too many }'s.
[ERROR]   htlatex: ./nma_mathjax.cfg    24       Undefined control sequence.
[ERROR]   htlatex: ./nma_mathjax.cfg    24       Missing number, treated as zero.
[ERROR]   htlatex: Compilation errors in the htlatex run
[ERROR]   htlatex: Filename     Line    Message
[ERROR]   htlatex: ./nma_mathjax.cfg    16       Argument of \c:VBorder: has an extra }.
[ERROR]   htlatex: ./nma_mathjax.cfg    16       Paragraph ended before \c:VBorder: was complete.
[ERROR]   htlatex: ./nma_mathjax.cfg    16       Too many }'s.
[ERROR]   htlatex: ./nma_mathjax.cfg    18       Missing number, treated as zero.
[ERROR]   htlatex: ./nma_mathjax.cfg    18       Missing = inserted for \ifnum.
[ERROR]   htlatex: ./nma_mathjax.cfg    18       Missing number, treated as zero.
[ERROR]   htlatex: ./nma_mathjax.cfg    18       LaTeX Error: Missing \begin{document} in `./nma_mathjax.cfg'.
[ERROR]   htlatex: ./nma_mathjax.cfg    23       Too many }'s.
[ERROR]   htlatex: ./nma_mathjax.cfg    24       Undefined control sequence.
[ERROR]   htlatex: ./nma_mathjax.cfg    24       Missing number, treated as zero.
[STATUS]  make4ht: Conversion finished
>
===================

Where vboard.tex is

==================
\documentclass[12pt]{article}
\begin{document}

test

\end{document}
=====================

And nma_mathjax.cfg  is

>cat ./nma_mathjax.cfg


\Preamble{xhtml,p-width}

%TMP FIX due to table header missing 2/4/2022. Rememember to remove when
%texht sources are updated. by Micahl.
%%%%%%%%%%%%%%%%%%%%%
\catcode`\:=11
\Configure{VBorder}
    {\let\VBorder\empty \let\AllColMargins\empty
     \global\let\GROUPS\empty \HAssign\NewGroup = 0
     \gHAdvance\Next:TableNo by 1 \global\let\TableNo=\Next:TableNo }
    {\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
}
    {\Advance:\NewGroup by 1
     \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
-------------------------------------


Is there something wrong I am doing?

>which make4ht
/usr/local/texlive/2021/bin/x86_64-linux/make4ht

Thanks
--Nasser


More information about the tex4ht mailing list.