4

I want to write this symbol in LaTeX.

enter image description here

I looked for it on Detexify and some code-lists but found nothing.

EDIT: I want the arrows and also the letters (general inputs in that place)

Thanks!

Sean Allred
  • 27,421
Miguel
  • 381

5 Answers5

3

I have found five possible ways to do this, out of which 2 match your requirements; however, the arrows are not extensible in those! Further information can be found in the code itself.

Note: No matter which method you choose the alignment just isn't right in all of them!

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{chemarrow}

\hbadness=10000  %For Underfull \hbox (badness 10000) warning.

%%%%%%% Taken from Math mode – v. 2.47 %%%%%%% 

% Method 1:
\makeatletter
\newcommand\zleftrightarrow[2][]{\ext@arrow 0099{\longleftrightarrowfill@}{#1}{#2}}
\def\longleftrightarrowfill@{\arrowfill@\leftarrow\relbar\rightarrow}
\makeatother

% Method 2:
\makeatletter
\def\rightharpoondownfill@{%
\arrowfill@\relbar\relbar\rightharpoondown}
\def\rightharpoonupfill@{%
\arrowfill@\relbar\relbar\rightharpoonup}
\def\leftharpoondownfill@{%
\arrowfill@\leftharpoondown\relbar\relbar}
\def\leftharpoonupfill@{%
\arrowfill@\leftharpoonup\relbar\relbar}
\newcommand{\xrightharpoondown}[2][]{%
\ext@arrow 0099\rightharpoondownfill@{#1}{#2}}
\newcommand{\xrightharpoonup}[2][]{%
\ext@arrow 0099\rightharpoonupfill@{#1}{#2}}
\newcommand{\xleftharpoondown}[2][]{%
\ext@arrow 0099\leftharpoondownfill@{#1}{#2}}
\newcommand{\xleftharpoonup}[2][]{%
\ext@arrow 0099\leftharpoonupfill@{#1}{#2}}
\newcommand{\xleftrightharpoons}[2][]{\mathrel{%
\raise.22ex\hbox{%
$\ext@arrow 0099\leftharpoonupfill@{\phantom{#1}}{#2}$}%
\setbox0=\hbox{%
$\ext@arrow 0099\rightharpoondownfill@{#1}{\phantom{#2}}$}%
\kern-\wd0 \lower.22ex\box0}%
}
\newcommand{\xrightleftharpoons}[2][]{\mathrel{%
\raise.22ex\hbox{%
$\ext@arrow 0099\rightharpoonupfill@{\phantom{#1}}{#2}$}%
\setbox0=\hbox{%
$\ext@arrow 0099\leftharpoondownfill@{#1}{\phantom{#2}}$}%
\kern-\wd0 \lower.22ex\box0}%
}
\makeatother

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}
\Huge
\show\rightarrow
\show\leftarrow
\show\leftrightarrows

\hspace*{\fill}$\autorightleftharpoons{3}{f}$\hspace*{\fill}\\[30pt] % chemarrow package

\hspace*{\fill}$A \overset{F}{\underset{G}\rightleftarrows} X$\hspace*{\fill}\\[30pt]

\hspace*{\fill}$a\zleftrightarrow[under]{over}b$\hspace*{\fill}\\[30pt] % Method 1

\hspace*{\fill}$a\xleftrightharpoons[down]{up}b$\hspace*{\fill}\\[5pt] % Method 2

\hspace*{\fill}\[a \mathrel{\mathop{\rightleftarrows}^{\mathrm{over}}_{\mathrm{under}}} b\]\hspace*{\fill}

\end{document}

enter image description here

Amar
  • 956
3

Here is another solution with :

% arara: pdflatex

\documentclass{article}
\usepackage{tikz-cd}

\begin{document}
\[
\begin{tikzcd}
A \arrow[shift left=2pt]{r}{e} & B\arrow[shift left=2pt]{l}{c}
\end{tikzcd}
\]
\end{document} 

enter image description here


And yet another one with unicode-math and substack:

% arara: lualatex

\documentclass{article}
\usepackage{mathtools}
\usepackage{unicode-math}
\newcommand*{\myarrows}[2]{\mathrel{\substack{#1\\\displaystyle\rightleftarrows\\#2}}}

\begin{document}
\[
A \myarrows{e}{c} B 
\]
\setmathfont{XITS Math}
\[
A \myarrows{e}{c} B 
\]
\setmathfont{Cambria Math}
\[
A \myarrows{e}{c} B 
\]
\setmathfont{Asana Math}
\[
A \myarrows{e}{c} B 
\]
%\setmathfont{TeX Gyre Pagella Math} currently not installed on my system
%\[
%A \myarrows{e}{c} B 
%\]
\end{document} 

enter image description here

LaRiFaRi
  • 43,807
2

This may not be the best solution (spacing seems off to me), but you can turn \leftrightarrows into a math operator and turn on limits:

\documentclass{article}
\usepackage{amssymb}

\newcommand\weird{\mathop\leftrightarrows\limits}

\begin{document}
$\weird^3_f$
\end{document}

output

Sean Allred
  • 27,421
  • I think what you need is the \autoleftrightharpoons{<text above>}{<text below>} command from the chemarrow package. See Table 169 on page 60 of "The Comprehensive LATEX Symbol List" (source: https://www.ctan.org/tex-archive/info/symbols/comprehensive/?lang=en). – Amar May 27 '15 at 01:57
  • 1
    @Amar It's still not an exact match, but you should consider posting that as an answer :) – Sean Allred May 27 '15 at 02:37
1

Are you using the arrows to show a chemical reaction?

Then you might be interested in knowing that you can use the mhchem package which simplifies writing reactions. It gives the same result as Amar's code but you don't have to include all the extra definitions yourself.

I used the option arrows=pgf to get arrow heads more like the ones in your picture.

MWE:

\documentclass{standalone}
\usepackage[arrows=pgf]{mhchem}
\usepackage{tikz}
\begin{document}
\ce{H2 + 1/2O2 <-->[a][b] H2O}
\end{document}

And the result: mhchemisnice

  • I'm not using it for chemical reactions hahaha, I'm using it for a correspondence between two sets. Thanks anyway =) – Miguel May 27 '15 at 16:32
1

There is another package for this task not yet mentioned: stackrel. It adds an optional argument to the LaTeX \stackrel command to set something below the relation, as in

\usepackage{stackrel}
\usepackage{amssymb}

\[  \stackrel[c]{e}{\leftrightarrows}  \]

enter image description here