[texhax] Decimal numbers in chemical equations with mhchem package

Sonja Bente sonja.bente at tu-bs.de
Mon Oct 12 14:30:37 CEST 2009

Joseph Wright wrote:
> 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}
Thanks for your mail! Maths-escape is ok for the number, but I would 
have to insert the space between number and NH3 manually. And it would 
not work when using the \ce- command within an equation environment for 
predefined reaction equations. But maybe I just use text mode with the 
version you suggested.

More information about the texhax mailing list