Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
    
Can we see the symbol in context? How should the symbol behave like (an relational symbol, a binary operator)? Where should the baseline be? –  Gonzalo Medina Oct 10 '12 at 22:29
    
Yes, I want it in context like '$\alpha:a|b$' where this $|$ should be the dashed downarrow.. –  Berci Oct 10 '12 at 23:01
1  
Related: tex.stackexchange.com/questions/14386/… –  egreg Oct 10 '12 at 23:20

3 Answers 3

up vote 10 down vote accepted

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} 
share|improve this answer
    
Or \newcommand\dashdownarrow{\mathrel{\mathpalette\ddaaux\relax}} and then \newcommand\ddaaux[2]{\rotatebox[origin=c]{-90}{$#1\dashrightarrow$}} –  egreg Oct 10 '12 at 22:59
    
Or, with amsmath, \newcommand\dashdownarrow{\mathrel{\text{\ddaaux}}} and \newcommand\ddaaux{\rotatebox[origin=c]{-90}{$\dashrightarrow$}} –  egreg Oct 10 '12 at 23:00
    
Thanks, I'm going to try these all.. @Peter: I would prefer a bit smaller arrow, if possible. –  Berci 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. –  Peter Grill 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? –  Berci 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}

Result

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{}.
share|improve this answer
    
This answer is moved from a duplicate question. –  Heiko Oberdiek Jun 2 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}

enter image description here

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}

enter image description here

You may want to fine-tune the scaling.

share|improve this answer
    
This answer is moved from a duplicate question tex.stackexchange.com/q/182714. –  LaRiFaRi Jun 3 at 8:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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