[Tex/LaTex] Problem with chemistry packages

chemformulachemistrymhchem

I have been using \usepackage{mhchem} to write chemical equations. Now I want to use also \usepackage{chemformula}. But when I use the second package it appears that LaTeX doesn't understand the keywords of the first package.

Is it possible? Any idea about how to fix it?

Best Answer

I am not a user of either of the mentioned packages, mhchem and chemformula.

From the documentation of chemformula:

Probably every chemist using LaTeX2ε is aware of the great mhchem package by Martin Hensel. There have always been some difficulties intertwining it with the chemmacros package, though. Also, some other minor points in mhchem always bothered me, but they hardly seemed enough for a new package. They weren’t even enough for a feature request to the mhchem author. The challenge and the fun of creating a new package and the wish for a highly customizable alternative led to chemformula after all. chemformula works very similar to mhchem but is more strict as to how compounds, stoichiometric factors and arrows are input. In the same time chemformula offers many possibilities to customize the output.

Though not mentioned explicitly, I have a feeling that these two package are not compatible. But your purposes should be served by either of the packages.


chemmacros is a comprehensive support for typesetting chemistry documents.

Either mhchem or chemformula can be loaded as modules:

formula = chemformula|mhchem

Default: chemformula.

If you set formula = {chemformula}, the chemformula module makes it possible that you can set all chemformula options via the \chemsetup command using the module chemformula, for example:

\chemsetup[chemformula]{format=\sffamily}

And if you set formula = {mhchem}, the chemformula module makes it possible that you can set all of mhchem’s options via the \chemsetup command using the module mhchem, for example:

\chemsetup[mhchem]{format=\sffamily}

(The last examples also implicitly indicate that either mhchem or chemformula should be used in a document, but not both.)

Related Question