2

It is well-known that \(\rightarrow\) gives a single right arrow and that \(\Rightarrow\) gives a double right arrow. Using the amssymb package you can even make triple arrows with \(\Rrightarrow\). But what if one needs a quadruple or quintuple or any higher-order* arrow? Is there a command for this, something like \arroworder{} where the input is the order* of the arrow, e.g.:

  • \arroworder{1} is basically a \(\rightarrow\)
  • \arroworder{2} gives something like \(\Rightarrow\), and
  • \arroworder{3} is like the amssymb command \(\Rrightarrow\).
  • And could \arroworder{0} be just an arrowhead?

PS: there doesn't seem to be a command for a triple left-right arrow, either. Is there a way of doing that as well, preferably in the same style as the first question?

*"Order," in this case, refers to the number of stems attached to the arrowhead.

2 Answers 2

2

This is mainly a technical comment that the Implies arrow of arrows.meta claims to have a length parameter, but it does not really in the sense that changing the length does not have an impact. Can one rectify this? Yes. But let me warn you, at least this "fix" isn't pretty.

\documentclass{article}
\usepackage{amssymb}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\makeatletter
\pgfkeys{
  /pgf/arrow keys/.cd,
  xstretch/.store in=\pgfarrowxstretch,
  xstretch=1,
  ystretch/.store in=\pgfarrowystretch,
  ystretch=1,
  }
\ifcsname pgfutil@tempdimc\endcsname
\else
\newlength\pgfutil@tempdimc
\fi 
\ifcsname pgfutil@tempdimd\endcsname
\else
\newlength\pgfutil@tempdimd
\fi 
\pgfdeclarearrow{
  name = varImplies,
  setup code = {
    \pgf@xa\pgfinnerlinewidth
    \[email protected]\pgflinewidth
    \pgfutil@tempdimc\pgfarrowxstretch\pgfutil@tempdima
    \pgfutil@tempdimd\pgfarrowystretch\pgfutil@tempdima
    \advance\pgfutil@tempdima by.25\pgf@xa%
    \[email protected]\pgflinewidth
    \advance\pgfutil@tempdimb by-.5\pgf@xa%
    \pgfutil@tempdimb\pgfutil@tempdimb
    \pgfarrowssettipend{2.06\pgfutil@tempdimc\advance\pgf@x by.5\pgfutil@tempdimb}
    \pgfarrowssetbackend{-1.36\pgfutil@tempdimc\advance\pgf@x by.5\pgfutil@tempdimb}
    \pgfarrowsupperhullpoint{-1.4\pgfutil@tempdimc}{2.8\pgfutil@tempdimd}
    \pgfarrowsupperhullpoint{2\pgfutil@tempdimc}{.5\pgfutil@tempdimd}
    \pgfarrowssavethe\pgfutil@tempdima
    \pgfarrowssavethe\pgfutil@tempdimb
    \pgfarrowssavethe\pgfutil@tempdimc
    \pgfarrowssavethe\pgfutil@tempdimd
  },
  drawing code = {
    \pgfmathsetmacro{\pft}{0.1/(\pgfutil@tempdimc/\pgfutil@tempdimd)}%
    \pgftransformxshift{\pft\pgfutil@tempdima}
    \pgfsetlinewidth{\pgfutil@tempdimb}
    \pgfsetdash{}{+0pt}
    \pgfsetroundcap
    \pgfsetroundjoin
    \pgfpathmoveto{\pgfpoint{-1.4\pgfutil@tempdimc}{2.65\pgfutil@tempdimd}}
    \pgfpathcurveto
    {\pgfpoint{-0.75\pgfutil@tempdimc}{1.25\pgfutil@tempdimd}}
    {\pgfpoint{1\pgfutil@tempdimc}{0.05\pgfutil@tempdimd}}
    {\pgfpoint{2\pgfutil@tempdimc}{0pt}}
    \pgfpathcurveto
    {\pgfpoint{1\pgfutil@tempdimc}{-0.05\pgfutil@tempdimd}}
    {\pgfpoint{-.75\pgfutil@tempdimc}{-1.25\pgfutil@tempdimd}}
    {\pgfpoint{-1.4\pgfutil@tempdimc}{-2.65\pgfutil@tempdimd}}
    \pgfusepathqstroke
  },
 parameters = {}
}%
\makeatother
\newif\ifarrowordervar
\tikzset{arrow var/.is if=arrowordervar}
\arrowordervarfalse
\newcommand\arroworder[2][]{\begin{tikzpicture}[Rightarrow/.style={double equal sign distance,>={Implies},->},
triple/.style={-,preaction={draw,Rightarrow}},
Triple/.style={-,preaction={draw,double distance=0.75ex,
>={varImplies[xstretch=1,ystretch=1.4]},->}},
quadruple/.style={preaction={draw,Rightarrow,shorten >=0pt},shorten >=1.2pt,-,double,double
distance=0.2pt},
Quadruple/.style={draw,double distance=0.75ex,
>={varImplies[xstretch=1,ystretch=1.4]},->,
postaction={draw,line width=0.4pt,shorten >=1.4pt,-,double,double
distance=0.18ex}},#1]
\path[use as bounding box] (0,-0.6ex) rectangle
({width("$\Rightarrow$")*1pt},0.6ex);
\draw \ifcase#2
\or [->]
\or [Rightarrow]
\or \ifarrowordervar [Triple] \else [triple] \fi
\or \ifarrowordervar [Quadruple] \else [quadruple] \fi
\fi
(0.2pt,0) -- ({width("$\Rightarrow$")*1pt-0.8pt},0);
\end{tikzpicture}}
\begin{document}
$\to$ $\arroworder{1}$\par
$\Rightarrow$ $\arroworder{2}$\par
$\Rrightarrow$ $\arroworder[arrow var]{3}$ $\arroworder{3}$\par
$\Rrightarrow$ $\arroworder[arrow var]{4}$ $\arroworder{4}$\par
\end{document}

enter image description here

So this has some option arrow var that switches to a mode in which the arrows look similar to their AMS counterparts. One could go on, make these scalable and so and so forth but I think that the first thing to do is to come up with a clear prescription of how these arrows are to be constructed and so on.

Please note that in a TikZy environment like tikz-cd such arrows have, in my humble opinion, a much better motivation because there you can bend them and so on and so forth. I am posting this mainly as a reference for future attempts to mess around with the Implies arrow head.

8
  • I have finished my votes now. :-) I see, sorry, that the lines across the tips with the last two examples.
    – Sebastiano
    Commented Apr 8, 2020 at 22:15
  • 1
    @Sebastiano Grazie, good catch! Tried to improve it.
    – user194703
    Commented Apr 8, 2020 at 22:23
  • Is the one on the bottom left supposed to have four shafts? (The result would probably look preposterous. I'm just nit-picking.) Commented Apr 8, 2020 at 22:37
  • @barbarabeeton AFAIK AMS does not have such an arrow so I put one with three shafts to guide the eye (compare dimensions, vertical alignment etc.)
    – user194703
    Commented Apr 8, 2020 at 22:39
  • I'm pretty sure that amsfonts doesn't have it. To my surprise, it is in Unicode, at 0x2B46, so it'll be in STIX. (But I don't know its TeX name; look in unicode-math.) Commented Apr 8, 2020 at 22:46
0

You can check this discussion Triple arrows in tikz and tikz-cd, where a solution for a "triple" and even a "quadruple" arrow style is provided using \usepackage{tikz} and \rightarrow\

Otherwise, with \usepackge{witharrows} it's possibile to make multiple nested arrows and change the level number. But WithArrows does not draw straight arrows.

For "WithArrows" package, please go to The Package WithArrows documentation edited by F. Pantigny (last. rev. March, 30th, 2020)

I hope it helps.

1
  • I read the documentation and found a way to draw straight down arrows, but what about right ones?
    – Someone
    Commented Apr 9, 2020 at 14:51

You must log in to answer this question.

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