I need the code for arrows underneath numbers going in the right direction. I've looked up the commands online and all I have \uarrow which goes to the left and not right.:

enter image description here

Thank you Hendrik. My problem is solved!


The previous solution at Getting arrows underneath numbers allows one to provide options to the \DrawArrow which you can use to reverse the direction of the arrow. You could either change the arrow style for all subsequent \DrawArrow calls from:

\tikzset{BottomArrowStyle/.style={thin, -stealth}}

where the -stealth option draws a stealth style arrow from left to right, to

\tikzset{BottomArrowStyle/.style={thin, stealth-}}

which draws the arrow from right to left as shown in the first line on the right hand side.

Alternatively, you could specify <- for each \DrawArrow so you can then mix and match as desired the direction, as shown by the right hand side of the second line, where the olive and magenta are drawn in opposite directions. Not that I think you want to do this, but rather to illustrate its use.

enter image description here




%% Set these if you want to globally atler the arrow styles
%% for the top and bottom arrows.

    \tikz[overlay,remember picture,baseline] \node [anchor=base] (#1) {\phantom{#2}};#2%

\NewDocumentCommand{\DrawArrow}{s O{} m m}{%
    \IfBooleanTF {#1} {% starred variant - draw arrows below
        \tikzset{Arrow Style/.style={BottomArrowStyle}}%
    }{% non-starred - draw arrows above
        \tikzset{Arrow Style/.style={TopArrowStyle}}%
    \begin{tikzpicture}[overlay,remember picture]
                ->, thick, distance=\ArcDistance,
                shorten <=\ShortenBegin, shorten >=\ShortenEnd,
                out=\OutAngle, in=\InAngle, Arrow Style, #2
                ($(#3.\AnchorPoint)+(2.0*\XShift,0)$) to 

\tikzset{BottomArrowStyle/.style={thin, -stealth}}% change arrow style
\tikzset{BottomArrowStyle/.style={thin, stealth-}}% change arrow style
\tikzset{BottomArrowStyle/.style={}}% restore to default


\DrawArrow*[red,in=-85, out=-95, distance=0.2cm]{One}{Three}%
\DrawArrow*[magenta,in=-85, out=-95, distance=0.2cm, <-]{One}{Three}%
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.