People in my lab sometimes want to be able to typeset the equation for a reversible chemical reaction in LaTeX:

I've created a macro that allows you to typset that as follows:

{\rm H}_2{\rm O} \rates{k_{\rm 1}}{k_{\rm 2}} {\rm H}^+ + {\rm OH}^-

Here is the macro definition:




Note that I have to use the \mathstrut command in the defintion since otherwise the subscript on k1 seems to be a bit too close to the arrow. I also go into displaystyle automatically; this is not useful if you are in a different mode.

Download an example file.