Re: [tex4ht] question about missing table vertical lines in HTML after 118 subsections have been processed.
Hi Nasser, > > Thanks, your fix did fix the vertical lines on tabular that went missing > after 118 subsections. > > Now they show in all sections. > > But I am afraid a new problem shows up. Now verical lines on > longtable no long show up. I am not sure why. thanks for the report. Try the following config 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 \fi} \HAssign\NewGroup = 0 % \gdef\GROUPS{rules="groups"} \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}\fi \xdef\VBorder{\VBorder}\xdef\AllColMargins{\AllColMargins1}} {\xdef\AllColMargins{\AllColMargins 0}} \catcode`\:=12 \Css{table.longtable{border-collapse: collapse; border-spacing: 0;}} \begin{document} \EndPreamble % The necessary fix for longtable is this: \Css{table.longtable{border-collapse: collapse; border-spacing: 0;}} Best regards, Michal
Re: [tex4ht] question about missing table vertical lines in HTML after 118 subsections have been processed.
Hello Micahl; An update. Thanks, your fix did fix the vertical lines on tabular that went missing after 118 subsections. Now they show in all sections. But I am afraid a new problem shows up. Now verical lines on longtable no long show up. I am not sure why. Here is a MWE (I attached all these in zip file in case of line wraping) == \documentclass[12pt]{article} \usepackage{longtable} \begin{document} \begin{tabular}[c]{|l|l|l|l|l|l|l|l|l|}\hline 1&1. (1)&3.9 (50)&16.6 (114)&3.8 (169)&4. (45)&7.5 (169)&4.2 (164)&42.4 (169)\\ 2&7.3 (21)&5. (20)&3.6 (17)&1.9 (4)&14.3 (13)&16.8 (5)&4.6 (2)&3.3 (26)\\ 4&6.4 (5)&14.3 (13)&40.7 (46)&16.6 (43)&5.5 (43)&4.8 (40)&5.3 (1)&6.9 (4)\\\hline \end{tabular} \begin{longtable}[c]{|l|l|l|l|l|l|l|l|l|}\hline 1&1. (1)&3.9 (50)&16.6 (114)&3.8 (169)&4. (45)&7.5 (169)&4.2 (164)&42.4 (169)\\ 2&7.3 (21)&5. (20)&3.6 (17)&1.9 (4)&14.3 (13)&16.8 (5)&4.6 (2)&3.3 (26)\\ 4&6.4 (5)&14.3 (13)&40.7 (46)&16.6 (43)&5.5 (43)&4.8 (40)&5.3 (1)&6.9 (4)\\\hline \end{longtable} \end{document} === When compiling the above using make4ht -c ./nma_mathjax.cfg vborder.tex "mathjax,htm" Then vertical lines in longtable are missing in HTML. But when compiling using make4ht vborder.tex "mathjax,htm" Then vertical lines in longtable do show up. In both cases the vertical line in tabular show up OK. the .cfg above is what you send. It seems the fix had some side interaction with longtable? Please see attached zip file with the source code and .cfg and HTML generated Using TL 2021 on Linux. Thanks for your help --Nasser<>
Re: [tex4ht] question about missing table vertical lines in HTML after 118 subsections have been processed.
Hi Nasser, > > Btw, after send this email, I noticed that your .cfg file had > > % \Css{\#TBL-\TableNo\space colgroup{border-left: 1px solid > black;border-right:1px solid black;}} > > This looks like wrraping error in email and it should be all on one line > > % \Css{\#TBL-\TableNo\space colgroup{border-left: 1px solid > black;border-right:1px solid black;}} > > When I fixed this, and made it all on one line, the error went > away. so will try now with this version. You are right, the config file got wrong wrapping, and braces from the CSS instruction caused compilation error. You can safely remove both \Css commands that are commented out. Best regards, Michal
Re: [tex4ht] question about missing table vertical lines in HTML after 118 subsections have been processed.
Btw, after send this email, I noticed that your .cfg file had % \Css{\#TBL-\TableNo\space colgroup{border-left: 1px solid black;border-right:1px solid black;}} This looks like wrraping error in email and it should be all on one line % \Css{\#TBL-\TableNo\space colgroup{border-left: 1px solid black;border-right:1px solid black;}} When I fixed this, and made it all on one line, the error went away. so will try now with this version. regards --Nasser On 2/4/2022 1:43 PM, Nasser M. Abbasi wrote: 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 \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}\fi \xdef\VBorder{\VBorder}\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 LineMessage [ERROR] htlatex: ./nma_mathjax.cfg16 Argument of \c:VBorder: has an extra }. [ERROR] htlatex: ./nma_mathjax.cfg16 Paragraph ended before \c:VBorder: was complete. [ERROR] htlatex: ./nma_mathjax.cfg16 Too many }'s. [ERROR] htlatex: ./nma_mathjax.cfg18 Missing number, treated as zero. [ERROR] htlatex: ./nma_mathjax.cfg18 Missing = inserted for \ifnum. [ERROR] htlatex: ./nma_mathjax.cfg18 Missing number, treated as zero. [ERROR] htlatex: ./nma_mathjax.cfg18 LaTeX Error: Missing \begin{document} in `./nma_mathjax.cfg'. [ERROR] htlatex: ./nma_mathjax.cfg23 Too many }'s. [ERROR] htlatex: ./nma_mathjax.cfg24 Undefined control sequence. [ERROR] htlatex: ./nma_mathjax.cfg24 Missing number, treated as zero. [ERROR] htlatex: Compilation errors in the htlatex run [ERROR] htlatex: Filename LineMessage [ERROR] htlatex: ./nma_mathjax.cfg16 Argument of \c:VBorder: has an extra }. [ERROR] htlatex: ./nma_mathjax.cfg16 Paragraph ended before \c:VBorder: was complete. [ERROR] htlatex: ./nma_mathjax.cfg16 Too many }'s. [ERROR] htlatex: ./nma_mathjax.cfg18 Missing number, treated as zero. [ERROR] htlatex: ./nma_mathjax.cfg18 Missing = inserted for \ifnum. [ERROR] htlatex: ./nma_mathjax.cfg18 Missing number, treated as zero. [ERROR] htlatex: ./nma_mathjax.cfg18 LaTeX Error: Missing \begin{document} in `./nma_mathjax.cfg'. [ERROR] htlatex: ./nma_mathjax.cfg23 Too many }'s. [ERROR] htlatex: ./nma_mathjax.cfg24 Undefined control sequence. [ERROR] htlatex: ./nma_mathjax.cfg24 Missing number, treated as zero. [ERROR] htlatex: Compilation errors in the htlatex run [ERROR] htlatex: Filename LineMessage [ERROR] htlatex: ./nma_mathjax.cfg16 Argument of \c:VBorder: has an extra }. [ERROR] htlatex: ./nma_mathjax.cfg16 Paragraph ended before \c:VBorder: was complete. [ERROR] htlatex: ./nma_mathjax.cfg16 Too many }'s. [ERROR] htlatex: ./nma_mathjax.cfg18 Missing number, treated as zero. [ERROR] htlatex: ./nma_mathjax.cfg18 Missing = inserted for \ifnum. [ERROR] htlatex: ./nma_mathjax.cfg18 Missing number, treated as zero. [ERROR] htlatex: ./nma_mathjax.cfg18 LaTeX Error: Missing \begin{document} in `./nma_mathjax.cfg'. [ERROR] htlatex: ./nma_mathjax.cfg23 Too many }'s. [ERROR] htlatex: ./nma_mathjax.cfg24 Undefined control sequence. [ERROR] htlatex: ./nma_mathjax.cfg24 Missing number, treated as zero. [STATUS] make4ht: Conversion
Re: [tex4ht] question about missing table vertical lines in HTML after 118 subsections have been processed.
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 \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}\fi \xdef\VBorder{\VBorder}\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 LineMessage [ERROR] htlatex: ./nma_mathjax.cfg16 Argument of \c:VBorder: has an extra }. [ERROR] htlatex: ./nma_mathjax.cfg16 Paragraph ended before \c:VBorder: was complete. [ERROR] htlatex: ./nma_mathjax.cfg16 Too many }'s. [ERROR] htlatex: ./nma_mathjax.cfg18 Missing number, treated as zero. [ERROR] htlatex: ./nma_mathjax.cfg18 Missing = inserted for \ifnum. [ERROR] htlatex: ./nma_mathjax.cfg18 Missing number, treated as zero. [ERROR] htlatex: ./nma_mathjax.cfg18 LaTeX Error: Missing \begin{document} in `./nma_mathjax.cfg'. [ERROR] htlatex: ./nma_mathjax.cfg23 Too many }'s. [ERROR] htlatex: ./nma_mathjax.cfg24 Undefined control sequence. [ERROR] htlatex: ./nma_mathjax.cfg24 Missing number, treated as zero. [ERROR] htlatex: Compilation errors in the htlatex run [ERROR] htlatex: Filename LineMessage [ERROR] htlatex: ./nma_mathjax.cfg16 Argument of \c:VBorder: has an extra }. [ERROR] htlatex: ./nma_mathjax.cfg16 Paragraph ended before \c:VBorder: was complete. [ERROR] htlatex: ./nma_mathjax.cfg16 Too many }'s. [ERROR] htlatex: ./nma_mathjax.cfg18 Missing number, treated as zero. [ERROR] htlatex: ./nma_mathjax.cfg18 Missing = inserted for \ifnum. [ERROR] htlatex: ./nma_mathjax.cfg18 Missing number, treated as zero. [ERROR] htlatex: ./nma_mathjax.cfg18 LaTeX Error: Missing \begin{document} in `./nma_mathjax.cfg'. [ERROR] htlatex: ./nma_mathjax.cfg23 Too many }'s. [ERROR] htlatex: ./nma_mathjax.cfg24 Undefined control sequence. [ERROR] htlatex: ./nma_mathjax.cfg24 Missing number, treated as zero. [ERROR] htlatex: Compilation errors in the htlatex run [ERROR] htlatex: Filename LineMessage [ERROR] htlatex: ./nma_mathjax.cfg16 Argument of \c:VBorder: has an extra }. [ERROR] htlatex: ./nma_mathjax.cfg16 Paragraph ended before \c:VBorder: was complete. [ERROR] htlatex: ./nma_mathjax.cfg16 Too many }'s. [ERROR] htlatex: ./nma_mathjax.cfg18 Missing number, treated as zero. [ERROR] htlatex: ./nma_mathjax.cfg18 Missing = inserted for \ifnum. [ERROR] htlatex: ./nma_mathjax.cfg18 Missing number, treated as zero. [ERROR] htlatex: ./nma_mathjax.cfg18 LaTeX Error: Missing \begin{document} in `./nma_mathjax.cfg'. [ERROR] htlatex: ./nma_mathjax.cfg23 Too many }'s. [ERROR] htlatex: ./nma_mathjax.cfg24 Undefined control sequence. [ERROR] htlatex: ./nma_mathjax.cfg24 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\
Re: [tex4ht] question about missing table vertical lines in HTML after 118 subsections have been processed.
> I think you are right here. I googled this and it says > > "Firefox is not based on Chromium (the open source > browser project at the core of Google Chrome). In > fact, we're one of the last major browsers that isn't. > Firefox runs on our Quantum browser engine built specifically for Firefox" > > So this explains the difference between what Firefox shows (correct) > and Brave, Edge and Chrome (missing vertical lines after some subsections). > Yes, I think so, as they all use the same browser engine. > > Yes, I noticed this duplication also when I was looking at the .css, > Actually some had more duplication than others, and I did not know why. > > For example this is duplicated 4 times > But this one earlier in the .css file, is duplicated 6 times ! > They are duplicated for every vertical line. What is wrong is that they are same. They all use a different ID, to address each particular vertical line in tables. > This is why the .css is so large. May be this also affects performance > og loading the pages as I noticed they are slow to come up at first. > Yes, it most likely affects the performance. This is the downside of the fact that you have such large files. Maybe I could make a make4ht filter that tries to make the CSS file smaller, but it won't be easy. > > Thank you for the fix. I will test the above later tonight, The HTML build > takes about 10 hrs to finish (pdf about 1 hr) so I will see the result > sometime tomorrow. I hope it will. Best regards, Michal
Re: [tex4ht] question about missing table vertical lines in HTML after 118 subsections have been processed.
On 2/3/2022 8:25 AM, Michal Hoftich wrote: 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 think you are right here. I googled this and it says "Firefox is not based on Chromium (the open source browser project at the core of Google Chrome). In fact, we're one of the last major browsers that isn't. Firefox runs on our Quantum browser engine built specifically for Firefox" So this explains the difference between what Firefox shows (correct) and Brave, Edge and Chrome (missing vertical lines after some subsections). 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. Yes, I noticed this duplication also when I was looking at the .css, Actually some had more duplication than others, and I did not know why. For example this is duplicated 4 times #TBL-737 colgroup{border-left: 1px solid black;border-right:1px solid black;} #TBL-737{border-collapse:collapse;} #TBL-737 colgroup{border-left: 1px solid black;border-right:1px solid black;} #TBL-737{border-collapse:collapse;} #TBL-737 colgroup{border-left: 1px solid black;border-right:1px solid black;} #TBL-737{border-collapse:collapse;} #TBL-737 colgroup{border-left: 1px solid black;border-right:1px solid black;} #TBL-737{border-collapse:collapse;} But this one earlier in the .css file, is duplicated 6 times ! #TBL-107 colgroup{border-left: 1px solid black;border-right:1px solid black;} #TBL-107{border-collapse:collapse;} #TBL-107 colgroup{border-left: 1px solid black;border-right:1px solid black;} #TBL-107{border-collapse:collapse;} #TBL-107 colgroup{border-left: 1px solid black;border-right:1px solid black;} #TBL-107{border-collapse:collapse;} #TBL-107 colgroup{border-left: 1px solid black;border-right:1px solid black;} #TBL-107{border-collapse:collapse;} #TBL-107 colgroup{border-left: 1px solid black;border-right:1px solid black;} #TBL-107{border-collapse:collapse;} #TBL-107 colgroup{border-left: 1px solid black;border-right:1px solid black;} #TBL-107{border-collapse:collapse;} This is why the .css is so large. May be this also affects performance og loading the pages as I noticed they are slow to come up at first. 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 \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}\fi \xdef\VBorder{\VBorder}\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 Thank you for the fix. I will test the above later tonight, The HTML build takes about 10 hrs to finish (pdf about 1 hr) so I will see the result sometime tomorrow. --Nasser
Re: [tex4ht] question about missing table vertical lines in HTML after 118 subsections have been processed.
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 \gHAdvance\Next:TableNo by 1 \global\let\TableNo=\Next:TableNo } {\xdef\VBorder{\VBorder\ifnum \NewGroup> 0 \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}\fi \xdef\VBorder{\VBorder}\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