Hallo,
ich will ein Diagramm in meine Arbeit einfügen. Wenn ich den Code so auf de.overleaf.com eingebe, wird mir kein Fehler angezeigt. Füge ich es in meinem Dokument (mit TexnicCenter) wird mir 8-mal zu der Zeile "\draw[line width=0.5mm,gray,{Stealth}-{Stealth}] (L.\anchB) -- (\X.\anchA); }" diese Fehlermeldung angezeigt:
Package PGF math error: Unknown function 'south' (in '{"south east", "south west", "north west","north east")
[Mod(3+1,4)]'). See the PGF Math package documentation for explanation.
Kann mir jmd. sagen, was der Fehler ist und was ich ändern muss? In der Dokumentation habe ich nichts gefunden. Hier der Code:
\documentclass{scrbook} \usetikzlibrary{positioning,shadows.blur,arrows.meta,bending,calc,intersections} \usepackage{capt-of} \begin{document} \begin{tikzpicture}[node distance=2em, nodes={draw,rounded corners,align=center,blur shadow, fill=white,minimum height=3em,minimum width=8em}, pics/circular arc/.style args={from #1 to #2}{code={ \path[name path=arc] let \p1=(#1),\p2=(#2),\n1={atan2(\y1,\x1)},\n2={atan2(\y2,\x2)}, \n3={ifthenelse(abs(\n1-\n2)<180,\n2,\n2-360)} in (\n1:\r) arc(\n1:\n3:\r); \draw[>={Stealth[bend]},pic actions, name intersections={of=#1 and arc,by=arcstart}, name intersections={of=#2 and arc,by=arcend}] let \p1=(arcstart),\p2=(arcend),\n1={atan2(\y1,\x1)},\n2={atan2(\y2,\x2)}, \n3={ifthenelse(abs(\n1-\n2)<180,\n2,\n2-360)} in (\n1:\r) arc(\n1:\n3:\r); }}] \node (L){Imit}; \node[above left=of L,name path=M] (M) {Go}; \node[above right=of L,name path=A] (A) {Ab}; \node[below right=of L,name path=S] (S) {Fr \&\\ W}; \node[below left=of L,name path=R] (R) {M \&\\ Wand}; \def\LstAnchors{"south east","south west","north west","north east"} \def\r{4} \foreach \X [remember=\X as \Y (initially R),count=\Z] in {M,A,S,R} {\path[line width=0.5mm,gray,shorten >=1mm,shorten <=1mm] pic{circular arc=from {\Y} to \X}; \pgfmathsetmacro{\anchA}{{\LstAnchors}[Mod(\Z+3,4)]} \pgfmathsetmacro{\anchB}{{\LstAnchors}[Mod(\Z+1,4)]} \draw[line width=0.5mm,gray,{Stealth}-{Stealth}] (L.\anchB) -- (\X.\anchA); } \end{tikzpicture} \captionof{figure}{A caption.} \end{document}