Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

up vote 15 down vote accepted

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}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.