[Tex/LaTex] short diagonal pointing arrow symbol

arrowssymbols

I understand that the package stmaryrd has a shorter version of the \rightarrow, \shortrightarrow, I wonder if there's a short version of the diagonal arrows (e.g. \searrow) and if not, if there's an easy way to draw my own?

Best Answer

You can rotate the short right arrow; however, due to a quirk in the font, rotation needs to artificially increase the height of the symbol. The picture shows its bounding box; the black blob shows that the arrow stem is on the math axis, so to get symmetric placement one needs to double the height.

\documentclass{article}
\usepackage{amsmath,stmaryrd,graphicx}

\makeatletter
\newcommand{\fixed@sra}{$\vrule height 2\fontdimen22\textfont2 width 0pt\shortrightarrow$}
\newcommand{\shortarrow}[1]{%
  \mathrel{\text{\rotatebox[origin=c]{\numexpr#1*45}{\fixed@sra}}}
}
\makeatother
\begin{document}

$a\shortrightarrow a$ % the base symbol

% the following is just to show the bounding box
{\vrule width 4pt height \fontdimen22\textfont2 \fboxsep=0pt\fbox{$\shortrightarrow$}}

% The usage example
$
a\shortarrow{0}
a\shortarrow{1}
a\shortarrow{2}
a\shortarrow{3}
a\shortarrow{4}
a\shortarrow{5}
a\shortarrow{6}
a\shortarrow{7}
a
$
\end{document}

enter image description here

Related Question