9

I have the following code made with the mhchem package:

\begin{align}
    \ce{CH3COOH + NaOH <=> CH3COONa + H2O} \\
    \ce{H2O <=> H^{+}_{(aq)} + OH^{-}_{(aq)}}
\end{align}

Which produces the following output:

enter image description here

Now I'd like to align the two equilibrium arrows. I've only come up with this:

\begin{align}
    \ce{CH3COOH + OH-} &\rightleftharpoons \ce{CH3COO- + H2O} \\
    \ce{H2O} &\rightleftharpoons \ce{H^{+}_{(aq)} + OH^{-}_{(aq)}}
\end{align}

Which gives this:

enter image description here

The arrows are too short. I've searched and couldn't find any that are longer. I'd like to either a) use the same arrows as mhchem in the second example or b) align the arrows in the first example.

2 Answers 2

13

There is a separate command for using \ce in equation environments that allows using ampersands (&) for alignment: \cee

So, no need to work around an make things less readable:

\documentclass{article}
\usepackage[version=3]{mhchem}
\begin{document}
\begin{align}
\cee{CH3COOH + NaOH &<=> CH3COONa + H2O} \\
\cee{H2O &<=> H^{+}_{(aq)} + OH^{-}_{(aq)}}
\end{align}
\end{document}
2
  • That's even better
    – Argo
    Nov 9, 2014 at 14:25
  • 8
    In the meantime, also the \ce macro supports & and \\ . There is no need for \cee any more.
    – mhchem
    Jun 13, 2016 at 18:58
2
\documentclass{article}
\usepackage[version=3]{mhchem}
\begin{document}
\begin{align}
\ce{CH3COOH + NaOH} & \ce{<=> CH3COONa + H2O} \\
\ce{H2O}& \ce{<=> H^{+}_{(aq)} + OH^{-}_{(aq)}}
\end{align}
\end{document}
1
  • I can't believe I didn't think of that, thanks.
    – Argo
    Sep 18, 2014 at 14:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .