[l2h] mhchem package problem

Dr Nicola L C Talbot n.talbot at uea.ac.uk
Fri Sep 26 10:40:02 CEST 2008

> Hi, my main problem is trying to get rendered images of my chemical 
> equations.
> It seems that when compiling the text in latex, the chemical equations 
> are rendered; but on latex2html, no images are rendered, text just appears.
> Most of the text is in [ce] [/ce] also tried \ce {CO2}, this the \ce 
> {CO2} it works well on latex but on latex2html, it does not render the 
> images.
> Anybody knows about this package? or something going on with latex2html?

I imagine there's no LaTeX2HTML implementation of mhchem (i.e. there's 
no file called mhchem.perl). Does latex2html issue any warnings along 
the lines of

No implementation found for style `mhchem'

and does it list ce as an unknown command?

If latex2html encounters a command it doesn't know, it ignores the 
command which means that any arguments are processed as is.

You need to tell latex2html to pass \ce to LaTeX and create an image. I 
haven't tested it, but if you put the following in your .latex2html-init 
file, it should work:

&process_commands_inline_in_tex (<<_RAW_ARG_CMDS_);
ce # {}

Nicola Talbot

More information about the latex2html mailing list