Another answer because I misunderstood your question. Digging around in the source code there are several macros which affect the length of the arrows.
From mhchem.sty
we have
\newcommand*\mhchem@xlongrightshortleftharpoons[2][]{\mathrel{%
\sbox{\mhchem@arrows@box}%
{$\mkern9mu\ext@arrow 3399\mhchem@leftharpoondownfill@%
{#1}{\hphantom{#2}\mkern-6mu\mkern-12mu}$}%
\rlap{\protect\raisebox{-.22ex}{\usebox{\mhchem@arrows@box}}}%
\protect\raisebox{.22ex}{$\ext@arrow 3399\mhchem@rightharpoonupfill@%
{\hphantom{\usebox{\mhchem@arrows@box}}\mkern-6mu}{#2}$}%
}}
It's basically a front end to amsmath
's \ext@arrow
macro:
\def\ext@arrow#1#2#3#4#5#6#7{%
\mathrel{\mathop{%
\setbox\z@\hbox{#5\displaystyle}%
\setbox\tw@\vbox{\m@th
\hbox{$\scriptstyle\mkern#3mu{#6}\mkern#4mu$}%
\hbox{$\scriptstyle\mkern#3mu{#7}\mkern#4mu$}%
\copy\z@
}%
\hbox to\wd\tw@{\unhbox\z@}}%
\limits
\@ifnotempty{#7}{^{\if0#1\else\mkern#1mu\fi
#7\if0#2\else\mkern#2mu\fi}}%
\@ifnotempty{#6}{_{\if0#1\else\mkern#1mu\fi
#6\if0#2\else\mkern#2mu\fi}}}%
}
So playing around with the arguments to \ext@arrow
in lines 3-4 will affect the length of the lower arrow. I could not grok the \ext@arrow
code enough to figure out how.
Instead I tried the option of drawing arrows with pgf
. You have to put
\usepackage{tikz}
\mhchemoptions{arrows=pgf}
in the preamble. Then the relevant macro is:
\newcommand*\mhchem@longrightshortleftharpoons@pgf[1]{%
\begin{tikzpicture}[baseline]%
\draw[use as bounding box] (0,0) (#1,1ex);
\draw[cap=round, join=round, line width=0.09ex]
(0.0cm,0.575ex+0.22ex) -- ++(#1,0cm) arc (250:198:0.9ex);
\draw[cap=round, join=round, line width=0.09ex]
(#1+0.5em-1em,0.575ex-0.22ex) -- (0.5em,0.575ex-0.22ex) arc (70:18:0.9ex);
\end{tikzpicture}%
}%
From this you can see that the bottom arrow is 1em shorter than the top one. To make it even shorter, change the last line to something like:
(#1-0.75em,0.575ex-0.22ex) -- (0.75em,0.575ex-0.22ex) arc (70:18:0.9ex);
This will make the bottom arrow 1.5em shorter.
To make this configurable, define a key and invoke it. Here's the complete example:
\documentclass[12pt]{minimal}
\usepackage[version=3]{mhchem}
\usepackage{tikz}
\mhchemoptions{arrows=pgf}
\makeatletter
\newlength{\mhchem@shortarrow@reduction}
\define@key{mhchem}{shortarrowreduction}{\setlength{\mhchem@shortarrow@reduction}{#1}}
\renewcommand*\mhchem@longrightshortleftharpoons@pgf[1]{%
\begin{tikzpicture}[baseline]%
\draw[use as bounding box] (0,0) (#1,1ex);
\draw[cap=round, join=round, line width=0.09ex]
(0.0cm,0.575ex+0.22ex) -- ++(#1,0cm) arc (250:198:0.9ex);
\draw[cap=round, join=round, line width=0.09ex]
% was: (#1+0.5em-1em,0.575ex-0.22ex) -- (0.5em,0.575ex-0.22ex) arc (70:18:0.9ex);
(#1-\the\mhchem@shortarrow@reduction,0.575ex-0.22ex)
-- (\the\mhchem@shortarrow@reduction,0.575ex-0.22ex) arc (70:18:0.9ex);
\end{tikzpicture}%
}
\AtBeginDocument{\mhchemoptions{shortarrowreduction=0.5em}}
\makeatother
\begin{document}
\noindent%
\ce{CH2OH + ATP <=>>[\text{Hexokinase}] + \text{glucose 6-phosphate} + ADP + H+} \\
{\mhchemoptions{shortarrowreduction=2em}
\ce{CH2OH + ATP <=>>[\text{Hexokinase}] + \text{glucose 6-phosphate} + ADP + H+}} \\
\end{document}
One possibility is the \curvearrowbotleft
mentioned by Qrrbrbirlbel along with the accents
package:
\documentclass{minimal}
\usepackage{mathabx}
\usepackage{accents}
\usepackage{xcolor}
\newcommand*{\uarr}[1]{\underaccent{\color{red}\curvearrowbotleft}{#1}}
\begin{document}
$\uarr{7}$.
$10.\uarr{5}\uarr{5}\uarr{6}$.
\end{document}
Here is a version with more visible arrow heads and less overlap with adjacent arrows, at the cost of more complication and a somewhat goofy-looking arrow head.
\documentclass{amsart}
\usepackage{mathabx} % for \curvearrowbotleft
\usepackage{accents} % for \underaccent
\usepackage{xcolor} % for \color
\usepackage{graphicx} % for \resizebox
\usepackage{calc} % for \widthof
\usepackage{bm} % for \bm (bold symbol)
\newcommand*{\uarr}[1]{\underaccent{\resizebox{\widthof{#1}}{\height}{$\color{red}\bm{\curvearrowbotleft}$}}{#1}}
\begin{document}
$\uarr{7}$.
$10.\uarr{5}\uarr{5}\uarr{6}$.
\end{document}
The command must be used in math mode (since \underaccent
is math-only), but has $ inside since \resizebox
leaves math mode.
Edit: Originally, I had \widthof{0}
in the above definition. This allowed the arrows to fit different font sizes and fonts, like so:
This depends on the fact that all digits are the same width, which is true in most math fonts but not all. I realized that simply changing it to \widthof{#1}
would not only take care of the case of different-width digits, but allow putting arrows under more than one digit.
For instance, $\uarr{00}$. $\uarr{007}$.
would have originally given , but now gives
Best Answer
I suggest to take a look to the new package
chemmacros
that was uploaded yesterday on CTAN and should be in TeX Live in the next update. The examples on pages 9 and 10 seem to be what you need.Link for
chemmacros
: http://www.ctan.org/tex-archive/macros/latex/contrib/chemmacros