2

I want to use arrow heads that look like the triangle 45, but due to my technical background I would like to get the opening angle smaller (and overally smaller in relation to the line width).

My MWE here tries to get that by using decorations and a scalebox together with the scale option, but this approach skews and displaces the arrow head whenever the line is not in the origin axes (see red arrow).

\documentclass[10pt,border=1mm]{standalone}

\usepackage{tikz}

\usetikzlibrary{%
arrows,
decorations,
decorations.markings,
decorations.text,
arrows.meta}

\tikzset{
    arrow/.style={decoration={markings,mark=at position 1 with
    {\scalebox{1}[0.5]{\arrow[scale=0.5]{triangle 45}}}},postaction={decorate},shorten >=1.5 pt}
}

\begin{document}
\begin{tikzpicture}
\draw[arrow] (0,0) -- (1,0);
\draw[arrow,red] (0,-.5) -- (1,-.5);
\draw[arrow,red] (0,0) -- (-.7,-.7);
\end{tikzpicture}
\end{document}

enter image description here

Any simple solutions for my desired arrow heads?

2

If you use draw commands in such a marking definition, the coordinate system is automatically aligned "along the path". So you can define it e.g. like in the following example. The arrow style has an optional argument that will scale the arrow tip.

Code

\documentclass[10pt,border=1mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{decorations.markings}

\tikzset{
    arrow/.style={decoration={markings, mark=at position 1 with
    {\fill(-0.09*#1,-0.03*#1) -- (0,0) -- (-0.09*#1,0.03*#1) -- cycle;}}, postaction={decorate}},
    arrow/.default=1
}

\begin{document}

\begin{tikzpicture}[scale=4]
    \draw[arrow] (0,0) -- (1,0);
    \draw[arrow=1,red] (0,-.5) -- (1,-.5);
    \draw[arrow=10,red] (0,0) -- (-.7,-.7);
\end{tikzpicture}

\end{document}

Output

enter image description here

1

If you just want to change the angle, the easiest way would be to use the scale width key of the arrows.meta library:

\documentclass[10pt,border=1mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{tikzpicture}
    \draw[->,>={Triangle[scale width=1.75]}] (0,0) -- (1,0);
    \draw[->,red,>={Triangle[scale width=0.15]} ] (0,-.5) -- (1,-.5);
    \draw[->,red,>={Triangle[scale width=1]} ] (0,0) -- (-.7,-.7);
\end{tikzpicture}
\end{document}

enter image description here

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.