How to type this arrow in math mode?
No tikz
...works across math styles.
\documentclass{article}
\usepackage{scalerel,stmaryrd}
\newsavebox\wedgearrowbaseline
\savebox\wedgearrowbaseline{$\scalerel{%
\ooalign{\kern.05pt/\cr/}\mkern-8.5mu}{\ssearrow}$}
\newcommand{\wedgearrow}{\mathrel{\scalerel*{%
\usebox{\wedgearrowbaseline}}{X}}} %stmaryrd
\begin{document}
$K\wedgearrow L$
$\scriptstyle K\wedgearrow L$
$\scriptscriptstyle K\wedgearrow L$
\end{document}
Similar to Ahrtaler's answer, the difference being that it also cooperates with subscripts (and all math styles) and becomes bold if one is in bold mode. I recommend this thread for further reading.
\documentclass{article}
\usepackage{tikz}
\usepackage{amsmath}
\makeatletter
\DeclareRobustCommand{\checkbold}[1]{% https://tex.stackexchange.com/a/24635/121799
\edef\@tempa{\math@version}\edef\@tempb{bold}%
\ifx\@tempa\@tempb%
\def#1{1}%
\else
\def#1{0}%
\fi}
\makeatother
\tikzset{wedge arrow/.style={->,line cap=round,line join=round}}
\newcommand{\wedgearrow}{\checkbold\tmp%
\ensuremath{\mathrel{%
\mathchoice{%
\tikz[baseline=-0.1ex]{\draw[line width={(1+0.33*\tmp)*0.06em},wedge arrow](0,0) -- (60:0.6em) -- ++ (-60:0.6em);}
}{%
\tikz[baseline=-0.1ex]{\draw[line width={(1+0.33*\tmp)*0.06em},wedge arrow](0,0) -- (60:0.6em) -- ++ (-60:0.6em);}
}{%
\tikz[baseline=-0.075ex]{\draw[line width={(1+0.33*\tmp)*0.045em},wedge arrow](0,0) -- (60:0.45em) -- ++(-60:0.45em);}
}{%
\tikz[baseline=-0.06ex]{\draw[line width={(1+0.33*\tmp)*0.035em},wedge arrow](0,0) -- (60:0.35em) -- ++ (-60:0.35em);}
}}}}
\begin{document}
$A\wedgearrow B_{C\wedgearrow D}$ {\Large $A\wedgearrow B_{C\wedgearrow D}$}
\boldmath$A\wedgearrow B_{C\wedgearrow D}$ {\Large $A\wedgearrow B_{C\wedgearrow D}$}
\unboldmath
\end{document}
EDITs:
- added
\mathrel
at Eclipse Sun's suggestion. - Made the macro detect the font weight, too, so the arrow goes bold in
\boldmath
or\boldsymbol
, just like the standard arrows. - Added round line caps and joins, motivated by Joey's comment.
I think you could do something like that:
\documentclass{scrartcl}
\usepackage{tikz}
\newlength{\textsize}
\makeatletter
\setlength{\textsize}{\f@size pt}
\makeatother
\newcommand{\wedgearrow}{%
\resizebox {!} {\textsize} {
\begin{tikzpicture}
\draw[->, line width = 2pt] (0,0) -- (.5,1) -- (1,0);
\end{tikzpicture}}
}
\begin{document}
Hi this \wedgearrow is a wedgearrow
\end{document}