11

In his pretty awesome book “Undergraduate Algebraic Geometry” M. Reid uses (e.g. see page 4) symbol of “broken” arrow (which looks quite a like dash+space+short arrow : “- →”) for partially defined maps. What is the most suitable way to produce it in LaTeX? I looked through “The Comprehensive LaTeX Symbol List” but didn't find something similar.

17

The MnSymbol package provides it.

\documentclass{article}
\usepackage{MnSymbol}
\begin{document}
So a rational map f: $V_1 \dashedrightarrow V_2$ is not a map at all;
\end{document}

enter image description here

  • Oops, I missed it when looked through Comprehensive List. Thanks! – Artem Pelenitsyn Dec 18 '11 at 10:16
  • It might be worth adding that including this package also significantly changes the look of a lot of often-used symbols, such as \setminus, \in and \neq. – Marc Paul Jun 11 '17 at 21:17
10

You can also use the usual overkill option of tikz which then gives you all the flexibility inherent in tikz. Here are a few of the possible options:

enter image description here

\documentclass{article}
\usepackage{tikz}

\newcommand*{\DashedArrow}[1][]{\mathbin{\tikz [baseline=-0.25ex,-latex, dashed,#1] \draw [#1] (0pt,0.5ex) -- (1.3em,0.5ex);}}%

\begin{document}
$V_1 \DashedArrow V_2$\par

\medskip
$V_1 \DashedArrow[densely dashed    ] V_2$\par
$V_1 \DashedArrow[dotted            ] V_2$\par
$V_1 \DashedArrow[densely dotted    ] V_2$\par
$V_1 \DashedArrow[densely dashdotted] V_2$\par

\medskip
$V_1 \DashedArrow[->,densely dashed    ] V_2$\par
$V_1 \DashedArrow[->,dotted            ] V_2$\par
$V_1 \DashedArrow[->,densely dotted    ] V_2$\par
$V_1 \DashedArrow[->,densely dashdotted] V_2$\par
\end{document}
4

I found a trick that will do a decent job without having to install packages or anything. Just write in math mode

$A-\!\! \rightarrow B$

The minus sign after the A is followed by two negative spaces in LaTeX and this will give the impression of a broken or dashed arrow. I was working on a poster and was loading several conflicting packages which made the above mentioned solutions to the dashed arrow not to work. Hence the new way of working it out.

  • 3
    Welcome to TeX.SX! You can improve it by doing $A\mathrel{-\,}\rightarrow B$ (or using a different space instead of \,) so the whole thing will be regarded as a relation symbol and the space between A and the dash will be correct. – egreg Jul 28 '15 at 16:08
4

While MnSymbol provides \dashedrightarrow, it actually provides a whole host of math symbols as an entire font, which might have an unwanted effect. As such, it is possible to create your own \dashedrightarrow:

enter image description here

\documentclass{article}
\usepackage{color}% http://ctan.org/pkg/color
\makeatletter
\newcommand{\dashedrightarrow}[1][2pt]{%
  \settowidth{\@tempdima}{$\rightarrow$}\rightarrow% typeset arrow
  \makebox[-\@tempdima]{\hskip-1.5ex\color{white}\rule[0.5ex]{#1}{1pt}}% typeset overlay
  \phantom{\rightarrow}% advance appropriate horizontal distance
}
\makeatother
\begin{document}
\begin{tabular}{lc}
  \verb|\rightarrow|: & $V_1 \rightarrow V_2$ \\
  \verb|\dashedrightarrow|: & $V_1 \dashedrightarrow V_2$ \\
  \verb|\dashedrightarrow[4pt]|: & $V_1 \dashedrightarrow[4pt] V_2$
\end{tabular}
\end{document}

The above \dashedrightarrow[<len>] overwrites \rightarrow with a white \rule in the middle of the operator. The optional parameter provides a means to increase the dashed-ness, with a default of 2pt.

1

While this answer uses packages, it does not load fonts which change the default math symbols. It is set up to work across mathstyles. It has the virtue of being the same width as \rightarrow (as shown in MWE).

As egreg notes, it will only work on a white background. Of course, if the non-white background color is known, the macro can be altered.

\documentclass{article}
\usepackage{scalerel,xcolor}
\def\darrow{\mathrel{\ThisStyle{\ooalign{$\SavedStyle\rightarrow$\cr%
  \hfil\textcolor{white}{\rule{2\LMpt}{1\LMex}}\kern2\LMpt\hfil}}}}
\begin{document}
$a\darrow b \quad
\quad\scriptstyle a\darrow b \quad
\quad\scriptscriptstyle a\darrow b \quad
$

$a\rightarrow b \quad
\quad\scriptstyle a\rightarrow b \quad
\quad\scriptscriptstyle a\rightarrow b \quad
$
\end{document}

enter image description here

  • 1
    It doesn't work on a colored background, of course. – egreg Jul 28 '15 at 16:14

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.