[l2h] Problem with image positions

Ross Moore ross@ics.mq.edu.au
Sun, 11 Aug 2002 11:40:26 +1000 (EST)


> Hi all,
> 
> i wrote a document with latex and ppchtex. ppchtex is great package for
> writing texts with chemical structures.
> 
> latex2html doesn't support ppchtex style, so i put this in my
> /etc/latex2html.conf:
> 
> &::process_commands_in_tex (<<_RAW_ARG_CMDS_);
> chemie # {}
> startchemie # <<\\stopchemie>>
> _RAW_ARG_CMDS_
> 
> &::process_commands_in_tex (<<_RAW_ARG_CMDS_);
> stellechemieein # [] 
> _RAW_ARG_CMDS_
> 
> 1;
> #EOF

 Yes, this will give individual images for these (pseudo-)environments.
 
> this is a typical ppchtex part:
> 
> \stellechemieein[groesse=klein,format=klein,breite=passend,hoehe=5500,oben=2000,unten=2000]
> \hbox {
> \startchemie
> \chemie[ONE,DB1,SB46,Z1046][O,C,H_3C,H_3C]
> \textunter{Aceton}
> \stopchemie
> \startchemie
> \chemie[SPACE,GIVES,SPACE][+\ OH^-]
> \stopchemie
> \startchemie
> \chemie[ONE,DB1,SB46,Z1046][O,C,H_3C,^-H_2C]
> \textunter{Carbanion}
> \stopchemie
> \startchemie
> \chemie[SPACE,PLUS,SPACE,CHEM][H_2O]
> \stopchemie
> }
> 
> 
> I get an image for every \startchemie .. \stopchemie part and here is
> the problem. The images have all a different height. This looks very
> ugly in a browser because i can't center the images verticaly.

You want the images to be side-by-side, yes ?
Then HTML requires that you use a <TABLE> with cells centred vertically;
that is  valign="middle" .

You can get this consistently in LaTeX by loading the  {array}  package
and using the m (='middle') column parameter:

\usepackage{array}   %  goes in the preamble


\begin{tabular}{m{.2\textwidth}m{.2\textwidth}m{.2\textwidth}m{.2\textwidth}}
\startchemie
\chemie[ONE,DB1,SB46,Z1046][O,C,H_3C,H_3C]
\textunter{Aceton}
\stopchemie
&
\startchemie
\chemie[SPACE,GIVES,SPACE][+\ OH^-]
\stopchemie
&
\startchemie
\chemie[ONE,DB1,SB46,Z1046][O,C,H_3C,^-H_2C]
\textunter{Carbanion}
\stopchemie
&
\startchemie
\chemie[SPACE,PLUS,SPACE,CHEM][H_2O]
\stopchemie
\end{tabular}

> Is it possible to center the images ? The dvi file looks quite nice but
> the html translation not :/ Maybe my definitions in /etc/latex2html.conf
> are wrong.

You may need to tinker a bit with the widths, to avoid overlaps
or log-file messages.
Or you may want to move the captions into a separate row in the tabular,
either above of below the images.


> 
> Thanks for your time,


Hope this helps,

	Ross Moore


> Nils
> -- 
> My Key "gpg --keyserver wwwkeys.eu.pgp.net --recv-key 45CD0073"
> Fingerprint = F4D9 9274 6ED8 B227 A62A  33FA 0D2E 2414 45CD 0073
> http://www.darktec.org /|\ darkbit@IRCNet on #irc.de #linux.de
> Premature optimization is the root of all evil.  - D. Knuth
> 
> _______________________________________________
> latex2html mailing list
> latex2html@tug.org
> http://tug.org/mailman/listinfo/latex2html