1

I have a short question about the arrow in the reaction I made with chemfig. As you can see in the picture underneath the code the arrow is just "<=>". What I need is this: enter image description here

How can I produce this arrow with \chemsign{...}?

\documentclass{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{chemfig}

\begin{document}

\chemname{\chemfig{R-[:30](=[:90]O)-[:-30]O-[:30]H}}{Carboxygruppe}
\chemsign{+}
\chemname{\chemfig{H-[:30]O-[:-30]R_2}}{Hydroxygruppe}
\chemsign{<=>}
\chemname{\chemfig{R_1-[:30](=[:90]O)-[:-30]O-[:30]R_2}}{Ester}
\chemsign{+}
\chemname{\chemfig{H-[:30]O-[:-30]H}}{Wasser}

\end{document}

enter image description here

0

2 Answers 2

1

You can obtain this arrow with \schemestart \arrow{<=>}\schemestop or with \chemrel{<>}

Code

\documentclass{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{chemfig}

\begin{document}

\chemname{\chemfig{R-[:30](=[:90]O)-[:-30]O-[:30]H}}{Carboxygruppe}
\chemsign{+}
\chemname{\chemfig{H-[:30]O-[:-30]R_2}}{Hydroxygruppe}
\schemestart \arrow{<=>}\schemestop
\chemname{\chemfig{R_1-[:30](=[:90]O)-[:-30]O-[:30]R_2}}{Ester}
\chemsign{+}
\chemname{\chemfig{H-[:30]O-[:-30]H}}{Wasser}

\end{document}
2
  • I have no warning with texlive 2015, chemfig v1.1
    – Salim Bou
    Aug 26, 2015 at 20:22
  • Oh, yes there is the above message in the log file, thanks for clarification.
    – Salim Bou
    Aug 26, 2015 at 20:30
0

I borrowed a code from Mathmode, § 55 to define an extensible \xrightleftharpoons command with one mandatory argument (will be placed above the arrow) and one optional (placed below)

\documentclass{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{chemfig}
\usepackage{amsmath}

\makeatletter%
\def\rightharpoonupfill@{%
\arrowfill@\relbar\relbar\rightharpoonup}
\def\leftharpoondownfill@{%
\arrowfill@\leftharpoondown\relbar\relbar}
\newcommand{\xrightleftharpoons}[2][]{\mathrel{%
\raise.22ex\hbox{%
$\ext@arrow 3095\rightharpoonupfill@{\phantom
{#1}}{#2}$}%
\setbox0=\hbox{%
$\ext@arrow 0359\leftharpoondownfill@{#1}{\phantom
{#2}}$}%
\kern -\wd0 \lower.22ex\box0}%
}
\makeatother

\begin{document}

\chemname{\chemfig{R-[:30](=[:90]O)-[:-30]O-[:30]H}}{Carboxygruppe}
\chemsign{+}
\chemname{\chemfig{H-[:30]O-[:-30]R_2}}{Hydroxygruppe}
\chemsign{$ \xrightleftharpoons{\qquad} $}
\chemname{\chemfig{R_1-[:30](=[:90]O)-[:-30]O-[:30]R_2}}{Ester}
\chemsign{+}
\chemname{\chemfig{H-[:30]O-[:-30]H}}{Wasser}

\end{document} 

enter image description here

2
  • Thanks, but I need the arrows to be much longer.
    – simande
    Aug 26, 2015 at 20:29
  • 1
    @simande: Please see my updated answer. Is that OK now?
    – Bernard
    Aug 26, 2015 at 20:50

You must log in to answer this question.

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