5

Is there an easy way to produce stealth style arrows in normal math mode? By "stealth" I'm thinking of TikZ stealth arrowhead. Something like \rightarrowstealth?

The question originates from a limit I'm writing. I find the arrowhead of \rightarrow (and the rest of the arrows, honestly) being somewhat less esthetic compared to the TikZ stealth arrowhead. I checked @Qrrbrbirlbel's comment, and I don't believe the arrowhead I'm looking for is listed.

enter image description here

Stevens comment fixes my problem, though! mathabx's \rightarrow arrowhead is indeed close enough to TikZ's stealth arrowheads for my purposes.

Holene
  • 6,920

2 Answers2

11

With the mathabx package, a number of stealth-like arrows are available, including these:

\documentclass{article}
\usepackage{mathabx}
\begin{document}
\[x \rightarrow y\]
\[y \leftarrow y\]
\end{document}

enter image description here

FOLLOW UP: In response to egreg's comment about many symbols being replaced with the mathabx package, and stealing code from Alan Munn at Importing a Single Symbol From a Different Font, one can import just the two arrow symbols, if one wishes to not change other symbols to mathabx.

\documentclass{article}
% Setup the matha font (from mathabx.sty)
\DeclareFontFamily{U}{matha}{\hyphenchar\font45}
\DeclareFontShape{U}{matha}{m}{n}{
      <5> <6> <7> <8> <9> <10> gen * matha
      <10.95> matha10 <12> <14.4> <17.28> <20.74> <24.88> matha12
      }{}
\DeclareSymbolFont{matha}{U}{matha}{m}{n}

% Define a subset character from that font (from mathabx.dcl)
% to completely replace the \subset character, you can replace
% \varsubset with \subset

\DeclareMathSymbol{\varleftarrow}{3}{matha}{"D0}
\DeclareMathSymbol{\varrightarrow}{3}{matha}{"D1}
\begin{document}

Computer Modern subset
\[
A \rightarrow B
\]

\texttt{mathabx} subset

\[
A \varrightarrow B
\]
\[
B \varleftarrow A
\]

\end{document}

enter image description here

6

If you mean the stealth as in the arrow head style of Tikz, the package tikz-cd provides such an interface:

\documentclass{amsart}
\usepackage{tikz-cd}
\usetikzlibrary{arrows} 
\tikzset{
  commutative diagrams/.cd, 
  arrow style=tikz, 
  diagrams={>=stealth}
}
\begin{document}
  \begin{tikzcd} 
     A \arrow{r} &B
  \end{tikzcd} 
\end{document}

Here is the output I get:

tikzarrows.png

Note that this is as versatile as the mathmode in that, you can have the tikz-cd environment both inline [default] and as display. Further, this is highly customisable: you can decrease the distance between the rows, between the columns, and so on.

I'd suggest that, you read tikz-cd documentation, which is very well-written.

kan
  • 4,545