[texhax] Decimal numbers in chemical equations with mhchem package

Joseph Wright joseph.wright at morningstar2.co.uk
Sun Oct 11 17:36:44 CEST 2009


Sonja Bente wrote:
> Dear texhax,
> 
> I have a question according to the mhchem package. I have some chemical 
> equations where the amounts are decimal numbers, for example \ce{0.151NH3}. Can 
> I typeset this with mhchem automatically?
> 
> If I use a dot, the dot is centered (like shown in the package documentation), 
> if I use a comma the part behind is subscript; brackets like {0.151} did not 
> help, too. If I use \ce{\num{0.151}NH3} it works for the number, but then NH3 is 
> not correct any more. I tried both math environment and text mode.
> 
> I think the package is great and I love using it, so I would be happy if there 
> is any trick for decimal numbers!
> 
> Kind regards

Have you tried maths-escape:

\mhchem{$0.151$NH3}
-- 
Joseph Wright


More information about the texhax mailing list