TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The package colortbl steals my beloved horizontal rules in the longtable. When I run tex4ht.

% run: htlatex main.tex



fooo & baaar \\\hline
baz &  morebaz\\\hline


The file above gives a beautiful html, but when I load the package colortbl, it eats my \hline.

Question: how to get the horizontal rules and use the package colortbl?

share|improve this question

Not sure of the official tex4ht customisation but the hrules end up as empty table rows with distinctive ids so you can add css rules such as

 #TBL-1-2-{ border-style: solid; border-bottom: 1pt; border-color: black;}
 #TBL-1-19-{ border-style: solid; border-bottom: 1pt; border-color: black;}

and the lines come back.

share|improve this answer
The id is not stable. If I add lines to the table, the ids will move.... – topskip Sep 21 '12 at 17:43
yes I know, They are I think the table and row number, but its best I could do in the time available tonight. If someone posts a proper tex4ht customisation I'll delete this. – David Carlisle Sep 21 '12 at 19:26
colortbl.4ht needs thorough rework. I am working on it, but not sure, when I'll be able to post a solution. As a workaround what you had suggested seems good enough than having nothing. – CV Radhakrishnan Sep 22 '12 at 4:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.