# Non-stoichiometric equations using chemformula (chemmacros)

Upon trying to do this non-stoichiometric reaction using chemmacros;

\documentclass[a4paper,12pt]{article}
\usepackage{chemmacros}
\chemsetup{modules=all}
\usepackage{chemgreek}
\usepackage{siunitx}

\begin{document}
$$\ch{Mg1.8Fe0.2SiO4\sld{} + 1.37 H2O -> 0.5 Mg3Si2O5(OH)4\sld{} + 0.3 Mg(OH)2\sld{} + 0.067 Fe3O4\sld{} + 0.067 H2\gas{}}$$

\end{document}


I get something like this. See the formatting errors in the stiochiometry term.

Any help help would super duper!!

• I don't know what you mean exactly. Obviously the equation is too long, so you'd be better off with something like \begin{multline} \ch{Mg1.8Fe0.2SiO4\sld{} + 1.37 H2O -> 0.5 Mg3Si2O5(OH)4\sld{} \\ {+} 0.3 Mg(OH)2\sld{} + 0.067 Fe3O4\sld{} + 0.067 H2\gas{}} \end{multline}, but is that what you meant? Aug 25 '17 at 9:41
• You probably want \ch{Mg_{1.8}Fe_{0.2}SiO4} Aug 25 '17 at 9:56
• Thanks Torbjorn and clemens for your answers. Clemens agreed that was the path I was think about going down but wondered if I was missing some chemmacros trick. Aug 25 '17 at 10:02

You need to denote the decimal subscripts as such:

Mg_{1.8}Fe_{0.2}SiO4


As a further suggestion you might want to break the long equation into two lines:

\documentclass[a4paper,12pt]{article}
\usepackage{chemmacros}

\begin{document}

\begin{multline}
\ch{Mg_{1.8}Fe_{0.2}SiO4\sld{} + 1.37 H2O -> 0.5 Mg3Si2O5(OH)4\sld{}} \\
\ch{+ 0.3 Mg(OH)2\sld{} + 0.067 Fe3O4\sld{} + 0.067 H2\gas{}}
\end{multline}

\end{document}