[Tex/LaTex] Dashed down arrow

arrows

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?

Best Answer

Basic Solution:

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

enter image description here

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:

enter image description here

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:

enter image description here

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} 
Related Question