
Ich möchte einen großen Pfeil zwischen zwei Punkten zeichnen. Ich habe eine hilfreiche ähnliche Antwort gefundenHier. Diese Antwort ist für die Kettenverbindung und funktioniert einwandfrei. Aber ich kopiere sie einfach und wende sie auf draw
den Befehl an, aber es hat keinen Effekt:
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes.arrows, calc, chains}
\tikzset{
myarr node/.style={
shape=single arrow, draw=black, minimum width=20mm, anchor=tail,
shape border uses incircle, single arrow head extend=+1pt,
inner sep=+0pt, outer sep=+0pt},
%
myarr with anchors/.style 2 args={
to path={
let \p0=($(\tikztotarget.#2)-(\tikztostart.#1)$) in
node[myarr node,
minimum height={veclen(\x0,\y0)},
shape border rotate={atan2(\y0,\x0)}] at (\tikztostart.#1) {}}
},
%
myarr/.default={}{},
myarr/.style 2 args={
to path={
\expanded{
(\tikztostart#1) edge[path only, overlay, line to]
coordinate[at start] (@start)
coordinate[at end] (@end) (\tikztotarget#2)}
let \p0=($(@end)-(@start)$) in
node[myarr node,
minimum height={veclen(\x0,\y0)},
shape border rotate={atan2(\y0,\x0)}] at (@start) {}}
},
}
\begin{document}
\begin{tikzpicture}
\draw[myarr] (0,0) -- (3,1);
\end{tikzpicture}
\end{document}
Antwort1
Antwort2
Ist das was du brauchst? Der Code ist von derPGF-Handbuch.
\documentclass[tikz,border=5mm]{standalone}
\usetikzlibrary{shapes.arrows}
\begin{document}
\begin{tikzpicture}[every node/.style={single arrow, draw},
rotate border/.style={shape border uses incircle, shape border rotate=#1}]
\node {right};
\node at (2,0) [shape border rotate=90]{up};
\node at (1,1) [rotate border=37, inner sep=0pt]{$37^\circ$};
\end{tikzpicture}
\end{document}