TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm working on the Chemwiki Dynamic Textbook Project at UC Davis, California and I've run into a problem. I need to formulate a symbol containing double harpoons (as in a reversible reaction, e.g. \rightleftharpoons); however, I need to have text both above and below the harpoons. I have an image I can email, but I can't post with an image because I'm new to this.

I can find code for \overleftrightarrow and \underleftrightarrow, but that's not quite what I need. I need both, on the same expression. If anyone has a minute to help me, I would greatly appreciate it!

share|improve this question
    
If you don't mind using TikZ, a quite similar (if not the same) problem was solved in this question. – sgbmyr Apr 4 '11 at 23:26
    
possible duplicate of Extending arrows with overset text – Caramdir Apr 5 '11 at 2:11

You could use the features provided by the mhchem package. A little example, taken from the package documentation:

\documentclass{article}
\usepackage{mhchem}

\begin{document}

\ce{Zn^2+
<=>[\ce{+ 2OH-}][\ce{+ 2H+}]
$\underset{\text{amphoteres Hydroxid}}{\ce{Zn(OH)2 v}}$
<=>C[+2OH-][{+ 2H+}]
$\underset{\text{Hydroxozikat}}{\cf{[Zn(OH)4]^2-}}$
}

\end{document}

The result:

share|improve this answer
\documentclass{article}
\usepackage{mathtools}
\begin{document}

$\mathrm{A} \xrightleftharpoons[k_2]{k_1} \mathrm{B}$

\end{document}
share|improve this answer
    
Welcome, can you please extend your answer to cover the duplicate suggested under the question? – percusse Jul 2 '14 at 23:49
    
done. I replaced \rightleftharpoons with \xrightleftharpoons. – Fred Senese Jul 5 '14 at 17:55
    
\rm was deprecated around twenty years ago. It's not part of the LaTeX commands. – Manuel Jul 5 '14 at 19:12
    
Yes, I know. It still works, though, and it's shorter than \mathrm but point taken. I edited my response. – Fred Senese Jul 7 '14 at 19:50

An alternative to mhchem would be the chemmacros bundle (including chemformula) by our user @cgnieder.

The syntax is simple and (pretty) intuitive, in many ways similar to the syntax of mhchem.

Here is a minimal example and the output.

\documentclass[border=10pt]{standalone}
\usepackage{chemformula}%loaded by chemmacros
\begin{document}
\ch{Zn^2+ 
<>[ + 2 OH- ][ + 2 H+ ]%Reaction in both directions
!(amphoteres~Hydroxid)( Zn(OH)2 v )
<=>[ + 2 OH- ][ + 2 H+ ]%Equilibrium arrow
!(Hydroxozikat)( [Zn(OH)4]^2- )
}
\end{document}![chemmacros output][1]

There is much more handy stuff in the bundle. Check out the documentation for more or the blog of the author.

share|improve this answer

A simple one-line solution which worked for me was:

X \underset{k_2}{\stackrel{k_1}{\rightleftharpoons}} Y

enter image description here

But the harpoon arrows don't extend when the text above and below is longer.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.