16

I want to decorate a path with little arrows (with definable length) parallel to it. I tried to modify an example from the manual, but I was only able to get arrowtips and not complete arrows where I can adjust the length. So is there a way to do this?

Here is what I tried:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations.markings}


\begin{document}

\begin{tikzpicture}[decoration={
markings,
mark=between positions 0 and 1 step 9.5mm with {\arrow{latex}},raise=0.1cm}
]
\draw [help lines] grid (3,2);
\draw [postaction={decorate}] (0,0) -- (3,1) arc (0:180:1.5 and 1);
\end{tikzpicture}


\end{document}

arrows

student
  • 29,003

1 Answers1

20

You can use any \draw command in the with options:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations.markings}


\begin{document}

\begin{tikzpicture}[decoration={
markings,
mark=between positions 0 and 1 step 9.5mm with {\draw [-latex] (-0.2,0) -- (0.2,0);},raise=0.1cm}
]
\draw [help lines] grid (3,2);
\draw [postaction={decorate}] (0,0) -- (3,1) arc (0:180:1.5 and 1);
\end{tikzpicture}


\end{document}
Jake
  • 232,450