# Dashed down arrow

I am looking for a solution for dashed down arrow. Have already tried packages like lucidabr and MnSymbol, but these turn my whole stuff upside down, producing a lot errors like

"Something is not ok in line XY".

I have also tried \rotatebox for \dashrightarrow (which is available in ams), and it just didn't do neither the rotation nor the placing..

I was thinking, maybe the best if I can produce it for myself.

Any help?

• Can we see the symbol in context? How should the symbol behave like (an relational symbol, a binary operator)? Where should the baseline be? Oct 10 '12 at 22:29
• Yes, I want it in context like '$\alpha:a|b$' where this $|$ should be the dashed downarrow.. Oct 10 '12 at 23:01
• Oct 10 '12 at 23:20

## Basic Solution:

Now sure exactly what problem you had with using \rotatebox, but it seems to work if used as \rotatebox{-90}{$\dashrightarrow$}:

## Notes:

• Depending on the actual application this might need to be raised vertically, and that can be down with \raisebox:

  \newcommand{\dashdownarrow}{\raisebox{2.0ex}{\rotatebox{-90}{$\dashrightarrow$}}}

• If it is a binary/relational operator than you can enclose the symbol in \mathbin{}/\mathrel{}:

  \newcommand{\dashdownarrow}{\mathbin{\raisebox{2.0ex}{\rotatebox{-90}{$\dashrightarrow$}}}}


## Use \mathchoice to auto resize:

As per Gonzalo Medina 's suggestion, to be able to use this for different math sizes such as in subscripts, you can use \mathchoice to ensure that the symbol also adjusts in size depending on the surrounding math environment:

## Code:

\documentclass{article}
\usepackage{amssymb}
\usepackage{graphicx}

\newcommand\dashdownarrowi{\mathchoice%
{\rotatebox[origin=c]{-90}{$\displaystyle\dashrightarrow$}}%
{\rotatebox[origin=c]{-90}{$\displaystyle\dashrightarrow$}}%
{\rotatebox[origin=c]{-90}{$\scriptstyle\dashrightarrow$}}%
{\rotatebox[origin=c]{-90}{$\scriptscriptstyle\dashrightarrow$}}%
}

\newcommand{\dashdownarrow}{\mathrel{\dashdownarrowi}}

\begin{document}
$A\dashdownarrow B\quad M_{A\dashdownarrow B}\quad L_{M_{A\dashdownarrow B}}$
\end{document}


## Use \text{} for auto resizing (and change size):

egreg had provided a simpler way to get the same effect and that is by enclosing the symbol in \text{}, allows it to re size appropriately:

## Notes:

• In this version I added \scalebox so that you can make the symbol smaller -- adjust the scale factor to suit.
• If you desire to move it vertically you can use \raisebox{<length>}{}.

## Code:

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

\newcommand\ddaaux{\rotatebox[origin=c]{-90}{\scalebox{0.70}{$\dashrightarrow$}}}
\newcommand\dashdownarrow{\mathrel{\text{\ddaaux}}}

\begin{document}
$A\dashdownarrow B\quad M_{A\dashdownarrow B}\quad L_{M_{A\dashdownarrow B}}$
\end{document}

• Thanks, I'm going to try these all.. @Peter: I would prefer a bit smaller arrow, if possible. Oct 10 '12 at 23:02
• @egreg: Ingenious!! Don't think I have seen that trick before. Will update solution for egreg's suggestion, and also smaller arrow. Oct 10 '12 at 23:06
• Well, for me, it's not rotating the right arrow but places it in a very odd place:( Is it possible that the xdvi viewer is the faulty? Oct 10 '12 at 23:06

A solution that creates the missing symbols using \rotatebox:

\documentclass{article}
\usepackage{amssymb}
\usepackage{graphicx}

\makeatletter
\newcommand*{\dashdownarrow}{%
\mathrel{%
\mathpalette\dasharrow@vert{-90}%
}%
}
\newcommand*{\dashuparrow}{%
\mathrel{%
\mathpalette\dasharrow@vert{90}%
}%
}
\newcommand*{\dasharrow@vert}[2]{%
\sbox0{$#1\vcenter{}$}%
\sbox2{$#1\dashrightarrow\m@th$}%
\dimen@=1.2\dimexpr\ht2-\ht0\relax
% 1/2 width of the new symbol with side bearing
\sbox2{\raisebox{-\ht0}{\unhcopy2}}%
\ht2=\z@
\dp2=\z@
\vcenter{\hbox to 2\dimen@{\hfill\rotatebox{#2}{\box2}\hfill}}%
}
\makeatother

\begin{document}
$A \dashrightarrow B \dashdownarrow C \dashuparrow D \dashleftarrow E$
\setlength{\fboxsep}{0pt}%
\setlength{\fboxrule}{.1pt}%
$A \mathrel{\fbox{\dashrightarrow}} B \mathrel{\fbox{\dashdownarrow}} C \mathrel{\fbox{\dashuparrow}} D \mathrel{\fbox{\dashleftarrow}} E$
$A\dashdownarrow B % \displaystyle and \textstyle have same size \qquad \scriptstyle A \dashdownarrow B \qquad \scriptscriptstyle A \dashdownarrow B$

\end{document}


Remarks:

• The new symbols adapt to the current math style with the help of macro \mathpalette.
• \m@th sets \mathsurround=0pt, only needed if \mathsurround (additional space around math formula) is different from zero (zero is the default).
• \dashrightarrow is centered around the math axis. The height of the math axis can be measured by an empty \vcenter{}.
• This answer is moved from a duplicate question. Jun 2 '14 at 10:29
% arara: lualatex

\documentclass{article}
\usepackage{unicode-math}

\begin{document}
\setmathfont{xits-math}
$a\downdasharrow b$
%\setmathfont{cambria math} % not available on my system
%$%a\downdasharrow b %$
\setmathfont{asana-math}
$a\downdasharrow b$
\end{document}


And with the tips from this answer, you may define any other arrow for your needs:

% arara: lualatex

\documentclass{article}
\usepackage{graphicx}
\usepackage{mathtools}
\usepackage{unicode-math}

\newcommand\ddaaux{\rotatebox[origin=c]{-90}{\scalebox{1}{$\rightdotarrow$}}}
\newcommand\downdotarrow{\mathrel{\text{\ddaaux}}}
\newcommand\bkaux{\rotatebox[origin=c]{-90}{\scalebox{1}{$\rightbkarrow$}}}
\newcommand\downbkarrow{\mathrel{\text{\bkaux}}}
\newcommand\dbkaux{\rotatebox[origin=c]{-90}{\scalebox{1}{$\dbkarow$}}}
\newcommand\downdbkarrow{\mathrel{\text{\dbkaux}}}

\begin{document}
\setmathfont{xits-math}
$a\downdotarrow b; a\downbkarrow b; a\downdbkarrow b$
\setmathfont{asana-math}
$a\downdotarrow b; a\downbkarrow b; a\downdbkarrow b$
\end{document}
`

You may want to fine-tune the scaling.