[l2h] \newcolumntype not shown

Ross Moore ross at ics.mq.edu.au
Thu Feb 26 07:46:26 CET 2009

Hello again Christian,

On 26/02/2009, at 4:35 PM, Christian wrote:

> Hello,
> I am using
> \usepackage{multicol}

There is no direct support for {multicol}
within LaTeX2HTML, so the \newcolumntype
command is not understood by it.

> \newcolumntype{H}{p{8cm}}

There is no real reason to support this, because the
  8cm  width that you specify may be appropriate for
a PDF producing a printed page, but may be quite
inappropriate for an HTML table on a webpage.

> within the preambel and
> \begin{table}[h]
> \centering
> \caption{some commands}\label{tab:somecom}
> \begin{tabular}{lH}
> 	\multicolumn{2}{c}{some headline}\\\hline
> 	cell 1	&	cell2\\
> \end{tabular}
> \end{table}
> The is that cell2 (for newcolumntype{H}) is not appearing at all in
> the html.

> Is there a way to make this iable work?

There are various ways to make this work.
  (a) just use   \begin{tabular}{lp{8cm}}

  (b) put the table-header line into a macro, but allow
      the macro to expand differently for PDF and HTML.
     \usepackage{html}  %  always use this with LaTeX2HTML

Then specify your tables as:

     	\multicolumn{2}{c}{some headline}\\\hline
	cell 1	&	cell2\\

Alternatively, try something similar using
   \newenvironment ...
instead of \newcommand .

> Thanks a lot
> Christian

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