11

Whats the command for this symbol: ⇅

I've found ⇈ \upuparrows but I can't find the other one.

doncherry
  • 54,637
Micha
  • 111

4 Answers4

14

The package mathabx provides all arrows of this kind. The one you're looking for is \updownarrows.

\documentclass{article}

\usepackage{mathabx}

\begin{document}

$\upuparrows$ -  $\downdownarrows$ - $\updownarrows$ - $\downuparrows$

\end{document}

enter image description here

For such questions, a good place to look at is the comprehensive LaTeX symbols list.

Note that mathabx redefines many symbols. An alternative is the following code, which produces updownarrows in a pure-latex fashion, but as you can see, the result is still not fully identical to amssymb's \upuparrows.

\documentclass{article}

\usepackage{amsmath,amssymb}

\newcommand{\updownarrows}{\mathbin\uparrow\hspace{-.5em}\downarrow}
\newcommand{\downuparrows}{\mathbin\downarrow\hspace{-.5em}\uparrow}

\begin{document}

$\upuparrows$ -  $\downdownarrows$ - $\updownarrows$ - $\downuparrows$


\end{document}

enter image description here

A possible solution would be to redefine \upuparrows and \downdownarrows as well :

\documentclass{article}

\usepackage{amsmath,amssymb}

\newcommand{\updownarrows}{\mathbin\uparrow\hspace{-.3em}\downarrow}
\newcommand{\downuparrows}{\mathbin\downarrow\hspace{-.3em}\uparrow}
\renewcommand{\upuparrows}{\mathbin\uparrow\hspace{-.3em}\uparrow}
\renewcommand{\downdownarrows}{\mathbin\downarrow\hspace{-.3em}\downarrow}

\begin{document}

$\upuparrows$ -  $\downdownarrows$ - $\updownarrows$ - $\downuparrows$

\end{document}

enter image description here

In comments, egreg proposed the following answer, for the same result (well, not technically the same), but with a cleaner code. It will probably give better spacing results if used within longer formulas :

\documentclass{article}

\usepackage{amsmath,amssymb}

\newcommand{\updownarrows}{\uparrow\mathrel{\mspace{-1mu}}\downarrow}
\newcommand{\downuparrows}{\downarrow\mathrel{\mspace{-1mu}}\uparrow}
\renewcommand{\upuparrows}{\uparrow\uparrow}
\renewcommand{\downdownarrows}{\downarrow\downarrow}

\begin{document}

$\upuparrows$ -  $\downdownarrows$ - $\updownarrows$ - $\downuparrows$

\end{document}

tex output

TeXnician
  • 33,589
T. Verron
  • 13,552
  • 3
    Usual caveat: mathabx changes many symbols with its owns. – egreg Dec 09 '12 at 14:00
  • 1
    @egreg : Indeed, and even those arrows don't have the same heads as the usual arrows. I will edit with a pure-latex solution, but the result isn't exactly similar to amssymb's double arrows either. – T. Verron Dec 09 '12 at 14:17
  • Why those \mathbin tokens in the last solution? They act only on the following token and affect the global spacing. – egreg Dec 09 '12 at 14:50
  • @egreg : If I don't add them, the arrows will be stuck to the dash, unlike the regular \upuparrows. About the command affecting only the first token, that's what I thought as well, but since the result seems quite symmetrically spaced, I did not change it further. – T. Verron Dec 09 '12 at 14:56
  • 1
    I'd simply go for \uparrow\uparrow and \uparrow\mathrel{\mspace{-1mu}}\downarrow, using the fact that those arrows are defined as relation symbols. – egreg Dec 09 '12 at 16:04
3

\updownarrows is present in the Unicode table and it is included in typical Unicode math fonts. For example with OpTeX:

\fontfam[lm]

The $\updownarrows$ is the same as $⇅$.

\bye

General rule: When you are able to write down the desired character in the question form here (and we see it here in title too), then the character is declared in Unicode. You can use a proper Unicode font and simply use the character.

wipet
  • 74,238
1

The shape of \upuparrows doesn't match with the shape of \uparrow in the Computer Modern fonts.

I don't like too much the shape of arrows in the Computer Modern fonts, to be honest: I find that the original versions were far better, with smaller tips.

Here's the visual proof:

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

\begin{document}

$\upuparrows \uparrow$

\end{document}

enter image description here

However, if you load old-arrows, then magically all arrows become the same as in amssymb (that was designed when the CM arrows had smaller tips):

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{old-arrows}

\begin{document}

$\upuparrows \uparrow$

\end{document}

enter image description here

Now defining \updownarrows and \downuparrows is a breeze:

\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{old-arrows}

\newcommand{\updownarrows}{\uparrow\joinrel\downarrow} \newcommand{\downuparrows}{\downarrow\joinrel\uparrow}

\begin{document}

$\uparrow \downarrow \upuparrows \downdownarrows \updownarrows \downuparrows$

\end{document}

enter image description here

You might prefer the arrows to be even nearer to each other. With

\newcommand{\updownarrows}{\uparrow\mathrel{\mspace{-4mu}}\downarrow}
\newcommand{\downuparrows}{\downarrow\mathrel{\mspace{-4mu}}\uparrow}

the same input as above would produce

enter image description here

egreg
  • 1,121,712
0

My solution is to rotate \rightleftarrows by 90 degrees using \rotatebox from graphicx. It produces an \updownarrows that is visually compatible with \upuparrows.

\newcommand{\updownarrows}{\mathrel{\kern1pt\rotatebox[origin=c]{90}{$\rightleftarrows$}\kern-1pt}}

(This requires the graphicx package)

The result in context, with \upuparrows also shown

  • 6
    A legitimate solution. However, in order to be appreciated (i.e. upvoted) you should expand it to a complete code, maybe with a snapshot of the result. – campa Oct 07 '23 at 14:45