[l2h] Minipage env

Ross Moore ross@ics.mq.edu.au
Tue, 26 Jun 2001 07:49:42 +1000 (EST)


> Hi,
> 
> I am trying to use the minipage environment to typset some text next to a eps 
> picture.
> 
> The code might look like:
> \begin{minipage}{0.3\textwidth}
> test
> \end{minipage}
> \begin{minipage}{0.4\textwidth}
> \Fig{fig/test.eps}{0.3\textwidth}
> \end{minipage}
> 
> In latex this appears:
> 
> test   <the picture>
> 
> In html this appear:
> 
> test
> <the picture>

The only way to set things side-by-side in HTML is to use 
<TABLE> tags. These are most easily obtained with LaTeX2HTML
using the {tabular} environment.
 

> At the moment I get round this by defining an environment FigL of FigR that 
> uses \html\latex conditionals to include a minipage in a table for the html 
> but not for pure latex.
> 
> i.e. the macros create code like:
> \begin{tabular}{cc}
> \begin{minipage}{0.3\textwidth}
> test
> \end{minipage}&
> \begin{minipage}{0.4\textwidth}
> \Fig{fig/test.eps}{0.3\textwidth}
> \end{minipage}
> \end{tabular}
> 
> This does port between latex/dvips and latex2html to give similar style.

Yes. This is the approach that I would recommend as a first effort.

> Is there any other way round this using pure minipage without the tabular 
> code?
> 
The alternative is to use some {rawhtml} environments
to include the required <TABLE>, <TR>, and <TD> tags directly
as well as </TD>, </TR> and </TABLE> at the end,
and of course some </TD><TD> in-between the figure and text.

 
> Maybe a Q to any pure Latex gurus out there: Is using the minipage 
> environment to typset two objects side by side bad style in Latex and is it 
> better to use tabular to layout such objects in addtion to minipage? I find 

It isn't bad style in LaTeX.
However TeX's concept of horizontal/vertical boxes does not map well
to HTML's page model. 
When you code for one model and also try to have it work in another
there will always be difficulties. This is just one of those.


> that using minipage works in Latex (but not Latex2html) as long as you 
> specify the widths correctly and is less typing than my second version. 
> Defining macros is OK but not as flexible.

If you know the underlying HTML language, you can code portions of your
document directly. This gives you the greatest flexibility of all.



Hope this helps,

	Ross Moore

 
> Martin
> 
> 
> 
> -- 
> / Dr. M.J. Reed                               Room:          4SB.6.15 \
> | Dept. Electronic Systems Engineering         Tel:+44 (0)1206 872479 |
> | University of Essex, Colchester CO4 3SQ, UK  FAX:+44 (0)1206 872900 |
> \ mailto:mjreed@essex.ac.uk    Web: http://esewww.essex.ac.uk/~mjreed /
> _______________________________________________
> latex2html mailing list
> latex2html@tug.org
> http://tug.org/mailman/listinfo/latex2html