[l2h] table cell spanning multiple rows

Ross Moore ross at ics.mq.edu.au
Tue Feb 24 20:09:45 CET 2009

Hello Lucio,

On 25/02/2009, at 4:47 AM, Lucio Chiappetti wrote:

> I would like to produce in a document I'm going to write (in  
> latex2html, with PDF and HTML versions) a series of tables  
> structured like this.
>  - two columns
>  - a header row
>  - the second column may contain groups of lines (typically statements
>    in a programming language)
>  - for each group of lines the first column shall contain a single  
> cell
>    (typically with the language name)
>  - the groups shall be bordered, but the multiple lines in each group
>    in the second column shall not be separated by horizontal borders.
> I found that the multirow package (see attached tex snippet) does  
> in the PDF output exactly what I want.
> But apparently latex2html does not support it, and does not  
> generate sensible HTML.

LaTeX2HTML does support a \multirow command, but the
sytax is a little different to what the  {multirow}
package uses.

There are ways to do what you want...

> The HTML I want is illustrated in the attached HTML snippet  
> (produced by hand, I'm more proficient with HTML than latex).
> As last resort I could duplicate the coding wrapping the two parts  
> in \latex and \html clauses (but to do that, since I have several  
> tables, I'd have to write some script to automatize it).

  ...by using your own macro, say  \mymultirow
which expands differently for LaTeX and LaTeX2HTML .

> Is there a smarter way all inside latex2html ?

Provided you  \usepackage{html}
then the  \begin{htmlonly} ... \end{htmlonly}
and  %begin{latexonly} ... %end{latexonly}
environments allow you to write documents that
compile correctly with different processing engines.

> -- 
> Lucio Chiappetti - INAF/IASF - via Bassini 15 - I-20133 Milano (Italy)
> For more info : http://www.iasf-milano.inaf.it/~lucio/personal.html

Hope this helps,


Ross Moore                                       ross at maths.mq.edu.au
Mathematics Department                           office: E7A-419
Macquarie University                             tel: +61 (0)2 9850 8955
Sydney, Australia  2109                          fax: +61 (0)2 9850 8114

More information about the latex2html mailing list