shige 03/25 2011
----------------

Nasser M. Abbasi wrote:
> I was wondering if there is something I can do to change this
> behavior by l2h. I wanted the table to look like it is in
> latex if possible.

For the border line, I think LaTeX tabular environment is 
more flexible than HTML table. For your example, the 
following may be one solution for your LaTeX code (some 
browsers may not support RULES attribute):

Ex. 1:
  <TABLE BORDER="1" RULES="rows">
    <TR><TD>a</TD><TD>b</TD></TR>
    <TR><TD>c</TD><TD>d</TD></TR>
  </TABLE>

But I don't know how to translate simply the following LaTeX
table to the HTML table:

Ex. 2:
  \begin{tabular}{|c|c|}\hline
    a & b \\    % NO \hline here
    c & d \\ \hline
    e & f \\ \hline
  \end{tabular}

Though latex2html has codes for \multicolumn and \multirow
to translate them to COLSPAN and ROWSPAN, it may do nothing
for \hline and \cline.

One simple solution of your problem using latex2html is to 
make image:

Ex. 3:
  \usepackage{html}
  ...
  \begin{makeimage}
  \begin{tabular}{|c|c|}\hline
    a & b \\    % NO \hline here
    c & d \\ \hline
  \end{tabular}
  \end{makeimage}

This will give the same results as the output by pdflatex.

I think another solution is to use several background colors 
for grouped cells. For example, this is the HTML sample for 
code2 above:

Ex. 4:
  <TABLE BORDER="1" RULES="none" FRAME="border">
    <TR><TD CLASS="celgrp1">a</TD><TD CLASS="celgrp2">b</TD></TR>
    <TR><TD CLASS="celgrp1">c</TD><TD CLASS="celgrp2">d</TD></TR>
    <TR><TD CLASS="celgrp3">e</TD><TD CLASS="celgrp4">f</TD></TR>
  </TABLE>

CSS:
  TD.celgrp1 { background : #ffccff }
  TD.celgrp2 { background : #ffffcc }
  TD.celgrp3 { background : #ccffff }
  TD.celgrp4 { background : #ffffff }

To achive this by latex2html, you will need to modify the
versions/html*.pl and your latex file.

+========================================================+
 Shigeharu TAKENO     NIigata Institute of Technology
                       kashiwazaki,Niigata 945-1195 JAPAN
 sh...@iee.niit.ac.jp   TEL(&FAX): +81-257-22-8161
+========================================================+
_______________________________________________
latex2html mailing list
latex2html@tug.org
http://tug.org/mailman/listinfo/latex2html

Reply via email to