[l2h] \newcolumntype not shown
Christian
maillists at gmx.de
Fri Feb 27 06:16:14 CET 2009
Am 26.02.2009 um 07:46 schrieb Ross Moore:
Hello Ross
> 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.
> e.g.
> (a) just use \begin{tabular}{lp{8cm}}
>
> or
> (b) put the table-header line into a macro, but allow
> the macro to expand differently for PDF and HTML.
> viz.
> \usepackage{html} % always use this with LaTeX2HTML
> %begin{latexonly}
> \usepackage{multicol}
> \newcolumntype{H}{p{8cm}}
> \newcommand{\mytablestart}{\begin{tabular}{lH}}
> %end{latexonly}
> \begin{htmlonly}
> \newcommand{\mytablestart}{\begin{tabular}{ll}}
> \end{htmlonly}
>
> Then specify your tables as:
>
> \mytablestart
> \multicolumn{2}{c}{some headline}\\\hline
> cell 1 & cell2\\
> \end{tabular}
That worked fine, thanks! Now I have a table for LaTeX and html that
is easy maintainable and in different width.
>
> Alternatively, try something similar using
> \newenvironment ...
> instead of \newcommand .
>
>>
>> Thanks a lot
>> Christian
>
> Hope this helps,
>
> Ross
Thanks again
Christian
More information about the latex2html
mailing list