5

I am trying to write chemical equation with \usepackage{chemmacros} but I have a problem.

I want something like that

$...Al + Fe_2O_3 \longrightarrow ...Fe + Al_2O_3$

The dots are for my students.

When I write

\ch{..Fe{} + ...O2 -> Fe3O4}

it's a mess.

Anybody have a solution?

Sigur
  • 37,330

1 Answers1

6

When a dot is part of a formula or is a single dot (i.e. separated by spaces from other formula parts) it is interpreted as an adduct:

\ch{Na2SO4. 10 H2O}

enter image description here

The same will happen to consecutive dots \ch{...}.

If it is only together with numbers it is interpreted as the decimal mark:

\ch{1.5 Fe}

enter image description here

Here are three possibilities achieving what you want, one of them being simply \ldots as mentioned in the comments. The first version (which I wouldn't use as it looks not so nice) uses chemformula's escaping between " ". The third version uses the math escaping where chemformula adds the same space after it as after a stoichiometric factor (this could be changed with the math-space option).

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{chemmacros}

\begin{document}

\begin{tabular}{ll}
  manual solution (looks bad IMHO) &
  \ch{"..." Fe + "..." O2 -> Fe3O4} \\
  \texttt{\string\ldots} &
  \ch{\ldots Fe + \ldots O2 -> Fe3O4} \\
  with spacing of stoichiometric factor &
  \ch{$\ldots{}$ Fe + $\ldots{}$ O2 -> Fe3O4}
\end{tabular}

\end{document}

enter image description here

cgnieder
  • 66,645