[tex4ht] How to change #ID property in the .CSS generated by htlatex to use width:auto?

Nasser M. Abbasi nma at 12000.org
Sat Jun 1 10:49:10 CEST 2013


After many hrs debugging, I find out some of my tables generated
to HTML from Latex are not coming out right. One of the columns
did not have the correct size.

htlatex generated HTML had the following

....
<td  style="white-space:wrap; text-align:left;" id="TBL-1-1-2"  class="td11">
....

The problem comes when looking at the CSS. the width was set to
zero for some reason on some of the ID's

...
#TBL-1-1-1{width:21.89987em;}
#TBL-1-1-2{width:0.0em;}    % ???? why
#TBL-1-1-3{width:29.19998em;}
....

Now these are CSS id's and not classes. I am not sure how these
are generated by htlatex. My question is, is there a way to
set something in the .cfg file so that to tell it to use
width:auto? since this fixed all the problems I have.

I can't just write

          \Css{ TBL-1-1-2{width:auto}}

since this is an ID and not CLASS. I am also not sure how
the names are generated, so I do not even know the name.

Any one has an idea how to control this?

My latex table, fyi, is layout as follows

\begin{tabular}{p{3in}p{4in}p{4in}}
     ...
     &
     ...
     &
\end{tabular}

but inside each column, I do have another smaller tablular in there as
well. I think that is what confusing it. Since when I remove the
internal tabular, the problem goes away.

thanks for any hints or ideas how to change the above ID's.

--Nasser



More information about the tex4ht mailing list