# Interrupted toprule/midrule/bottomrule lines in booktabs-table when converting to html with tex4ebooks

I am converting latex to html/ebook using the command tex4ebook filename.tex .

When using the booktabs package, the line generated by \toprule, \midrule, \bottomrule are interrupted (have extra space) between the columns. Here is a screenshot:

How can I get continuous lines?

MWE :

\documentclass{article}
\usepackage{booktabs}
\begin{document}
\begin{tabular}{lll}
\toprule
Computer Science Term &  Explanation & some  \\
\midrule
bias  &  intercept in regression & thing \\
weight & coefficient in regression & else  \\
pattern recognition & classification & yes \\
\bottomrule
\end{tabular}
\end{document}


Edit:

If you use TeX Live, you can update your distribution, and rules should then work correctly.

Original:

I am not sure that you have an up-to date version of TeX4ht, because I don't get such result, the lines are connected for your example. There is a problem though, because by default, TeX4ebook produces Epub 2 ebooks, and there is a missing CSS instruction that cause the lines to disappear completely:

You can add the CSS instruction using the following .cfg file:

\Preamble{xhtml}
\Css{ table.tabular{border-collapse: collapse; border-spacing: 0;}}
\begin{document}
\EndPreamble


The result is then correct:

• Thank you, this worked! I updated my miktex distribution (Windows), but I still get the same graph I originally posted. Does not matter; it works with the .cfg file. Nov 10, 2021 at 16:41
• @Matthias Miktex can have older files than TeX Live. I am glad that .cfg file works Nov 10, 2021 at 17:09