[tex4ht] [bug #636] tex4ht loses table boarders when adding color

Nasser M. Abbasi nma at 12000.org
Thu Oct 10 08:43:53 CEST 2024


On 10/9/2024 4:56 AM, Michal Hoftich wrote:
> Hi Nasser,
> 
> \usepackage{makecell}
>> \setcellgapes{3pt} %added march 14,2021
>> \begin{document}
>>
> 
> The issue is with the makecell package, which redefines some tabular
> internals. I am surprised that it worked until now. I've fixed this issue
> in the sources.

Thanks for the fix Michal.  I just did an update of TL
and saw new tex4ht downloaded. Now the compile error is gone.

Just one very minor issue. In HTML the cline remains black
and not gray colored in the table.

Not a big issue for me. I use cline very rarely. But if it
is something easy for you to fix and does not take time,
it will good to correct this also so all lines in the table
are gray like in PDF.

Attached screen shot . You see the line below "multiplicity"
is black and not gray.

Here is the code again just in case.

------------------
\documentclass[12pt]{book}%
\usepackage{xcolor}
\usepackage{colortbl}
\definecolor{lightgray}{rgb}{0.83, 0.83, 0.83}
\arrayrulecolor{lightgray}

\usepackage{makecell} %make sure before arydshln
\setcellgapes{3pt} %added march 14,2021

\begin{document}

\begin{center}
\setcellgapes{5pt}
\makegapedcells
\begin{tabular}{|*{5}{c|} }\hline
&   \multicolumn{2}{c|}{ multiplicity} &   & \\
\cline{2-3}
eigenvalue & algebraic $m$&  geometric $k$& defective? & eigenvectors \\ \hline
$3 i$&$1$&$1$&No&$\left[\begin{array}{c}
i
\\
  1
\end{array}\right]$ \\ \hline
$-3 i$&$1$&$1$&No&$\left[\begin{array}{c}
-i
\\
  1
\end{array}\right]$ \\ \hline
\end{tabular}
\end{center}

\end{document}
-----------------

Compiled using

make4ht -ulm default -a debug A.tex 'mathjax,htm'

Thanks again for the fix. I switched all my tabled now
to use gray borders, as I think they look better. I also
asked chatGPT and she also agreed:

"In most cases, a gray border for a table is generally considered
better than a black border because it is less visually
jarring and provides a more subtle separation between table
cells, making the content within the table easier to read,
especially on screens with high brightness or for users with
visual sensitivities; while a black border can appear too
harsh and distracting."

--Nasser
-------------- next part --------------
A non-text attachment was scrubbed...
Name: screen_shot_2.png
Type: image/png
Size: 27721 bytes
Desc: not available
URL: <https://tug.org/pipermail/tex4ht/attachments/20241010/6f0af119/attachment-0001.png>


More information about the tex4ht mailing list.