Pfeile mit Mathe
Oct 26 2020
Auf dem folgenden Code
\begin{figure}[htbp!]
\begin{center}
\begin{tikzpicture}[>=stealth,baseline,anchor=base,inner sep=0pt]
\draw[thick,->] (-3.5,0) -- (4.5,0) node[anchor=north west] {$\mathbb{Z}$};
\foreach \x in {-3,-2,-1,0,1,2,3,4}
\draw (\x cm,1pt) -- (\x cm,-1pt) node[anchor=north] {$\x$};
\end{tikzpicture}
\caption{Somma algebrica} \label{fig:somma algebrica} %\label va messo qui
\end{center}
\end{figure}
Ich möchte Pfeile wie das Bild unten hinzufügen
Damit ich zeigen kann, wie man die Summe von zwei oder mehr Zahlen macht, aber ich weiß nicht, wie ich sie in meinen Code integrieren soll.
Vielen Dank für Ihre Hinweise
Gian Carlo
Antworten
3 Zarko Oct 26 2020 at 14:42
\documentclass[tikz, margin=3.14159mm]{standalone}
\usetikzlibrary{arrows.meta,
positioning}
\usepackage{amssymb}
\begin{document}
\begin{tikzpicture}[
node distance = 6mm,
> = Straight Barb,
arr/.style = {very thick, gray, shorten <=1pt,
-{Triangle[length=3pt]}, looseness=3}
]
\draw[thick,->] (-3.5,0) -- (5,0) node[below left=2pt] {$\mathbb{Z}$};
\foreach \x in {-3,-2,-1,0,1,2,3,4}
\draw (\x,2pt) -- ++ (0,-4pt) node (n\x) [below] {$\x$};
\draw[arr] (n1) to [out=270, in=270] (n0);
\draw[arr] (n0) to [out=270, in=270] (n-1);
\end{tikzpicture}
\end{document}