[l2h] Help with latex/latex2html layout

Ian Thurlbeck Ian Thurlbeck <ian@stams.strath.ac.uk>
Thu, 21 Oct 1999 15:47:43 +0100


On Thu, 21 Oct 1999, Ross Moore wrote:
> Some time earlier, I wrote: 
> > Dear All
> > 
> > I'm trying to layout a page in latex which is readily
> > translatable with latex2html but, alas, I cannot do what I
> > want.  Here is a diagram of what I want:
> > 
> >  -----------
> > |           |  Some more text
> > |  Some     | 
> > |           |  adjacent to
> > |  text in  |  
> > |           |  the frame box.
> > |  a framed |
> > |           |
> > |  box.     |
> > |           |
> >  -----------
> > 
> > To keep the 2 bits of text adjacent in the HTML I can
> > use a tabular environment within an outer tabular
> > environment.  I can put a border around the left hand table
> > by specifiying a vertical bar in the column specs.  However,
> > I also need to insert some vertical space (I used \\)
> 
> Use \newline .
>  \\ is the table row-delimiter, in LaTeX and LaTeX2HTML.

Dear Ross (and the list)

that helped a lot, thanks!.  I now get what I want in the HTML output with
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.
------------------

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}  

Yours, very nearly

Ian
--