[l2h] Help with latex/latex2html layout

Ross Moore Ross Moore <ross@ics.mq.edu.au>
Fri, 22 Oct 1999 08:59:25 +1000 (EST)


> On Thu, 21 Oct 1999, Ross Moore wrote:

> the \newline generating a <BR> within the <TD> element - great!
> 
> But (!) the latex output ignores all the newlines and puts all the text that's
> in the left-hand box on to a single line! Sort of like:
>  -----------------
> | Sometext ina framedbox. | Some more textadjacent tothe frame box.
> ------------------
 
OK. In that case you also need a \parbox within the {tabular}
to tell LaTeX to make paragraphs.

You can specify this in the header, along with the desired width:

  \begin{tabular}{|p{4cm}|}
   ....
   ....
  \end{tabular}


> Here's my test document:
> 
> \documentclass[10pt]{article}
> 
> \begin{document}
> 
> \begin{tabular}{cc}
>         \begin{tabular}{|c|}
>                 \hline
>                 \newline
>                 Some
>                 \newline
>                 \newline
>                 text in
>                 \newline
>                 \newline
>                 a framed
>                 \newline
>                 \newline
>                 box.
>                 \newline
>                 \newline \\   % needed to avoid some error in latex
>                 \hline
>         \end{tabular}
>         &
>         \begin{tabular}[8cm]{l}
>                 Some more text
>                 \newline
>                 \newline
>                 adjacent to
>                 \newline
>                 \newline
>                 the frame box.
>         \end{tabular}
> \end{tabular}
> 
> \end{document}  
> 
Since those inner {tabular} environments have just a single cell,
you could try using a single {tabular} after loading:
 \usepackage{tabularx} .

Now the header can be:

  \begin{tabular}{m{4cm}m{8cm}}

 ...but you'll need to experiment to get the right cell borders
for both LaTeX and LaTeX2HTML.


Hope this helps,

	Ross Moore


> Yours, very nearly
> 
> Ian
> --
>