michal-h21 / make4ht

Build system for tex4ht
132 stars 15 forks source link

'mathml'-option messes up the first \hline of the tabular #87

Closed yalguzaq closed 1 year ago

yalguzaq commented 1 year ago

Compiling this table in a minimal LaTeX environment

\begin{table}
  \begin{tabular}{|r|rrr|}
    \hline
    & a & b & c \\
    \hline
    & d & e & f \\
    \hline
  \end{tabular}
\end{table}

normally with make4ht markup.tex produces the desired output. When turning on MathML: make4ht markup.tex 'mathml,mathjax' the first hline disappears.

michal-h21 commented 1 year ago

I've fixed this in TeX4ht sources, it was a bit more involved due to recent changes in handling of the array environment, but the basic fix should be this CSS:

\Preamble{xhtml}
\Css{.hline:first-child, .array-hline:first-child{border-bottom:1px solid black;border-top:none;}}
\begin{document}
\EndPreamble