Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

% run: htlatex main.tex

\documentclass{article}
\usepackage{longtable}
%\usepackage{colortbl}

\begin{document}

\begin{longtable}{c|c}
fooo & baaar \\\hline
baz &  morebaz\\\hline
\end{longtable}


\end{document}

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

1 Answer 1

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

 
discard

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.