0

the standard arrows in latex are often the curly ones like underneath \usepackage{extarrows} But i'd like a more black-filled-triangle kinda arrow any suggestions? enter image description here

the one answer I found here seems pretty complex, almost drawing it by hand. is there an easy package?

1
  • 1
    Maybe have a look at the arrows from mathabx? They aren't exactly triangles, but more "filled" than the normal ones. If you want real triangles, the boisik package has \rightarrowTriangle Commented Jan 25 at 12:35

1 Answer 1

1

Here is a TikZ solution that has built-in extensiblity with an optional argument. You can adjust the size and angle of the arrowhead by changing single arrow head extend and single arrow tip angle

enter image description here

\documentclass{article}

\usepackage{tikz, amsmath}
\usetikzlibrary {shapes.arrows}

\newcommand{\myarrow}[1][]{\mathrel{\tikz{
    \node[fill, minimum width=.5ex, minimum height=.9em, inner sep=0pt, single arrow, single arrow head extend=2pt, single arrow tip angle=60]
        (A){\raisebox{3.5pt}[0pt][0pt]{$\,\scriptstyle #1\ $}}; \path([xshift=-.4pt]A.west)--(A.east);}}}
\newcommand{\myarrowleft}[1][]{\mathrel{\tikz{
    \node[fill, minimum width=.5ex, minimum height=.9em, inner sep=0pt, single arrow, single arrow head extend=2pt, single arrow tip angle=60, shape border rotate=180]
        (A){\raisebox{3.5pt}[0pt][0pt]{$\ \scriptstyle #1\,$}}; \path(A.west)--([xshift=.4pt]A.east);}}}

\begin{document}

$A\to B\qquad A\xrightarrow{f\circ g}B$

$A\myarrow B\qquad A\myarrow[f\circ g] B$

$A\myarrowleft B\qquad A\myarrowleft[f\circ g] B$

\end{document}

Not the answer you're looking for? Browse other questions tagged .