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'm wondering if it's possible to draw, by \tikzstyle, this style of arrow : +++++>. Thanks, Simon

share|improve this question
    
Welcome to TeX.SX! Could you provide more information on what + symbols should represent in paths? –  Claudio Fiandrino Jun 16 at 10:47
    
Is [decorate=crosses] close enough? If so you can maybe obtain plusses using rotation... –  Bordaigorl Jun 16 at 10:50
1  
@silama, that is what Bordaigorl suggests with his comment. –  zeroth Jun 16 at 10:55
1  
Maybe something like decoration={markings, mark=between positions 0 and .9 step 4pt with {\draw[-] (2pt,-2pt) -- (2pt,2pt);} } ? –  Bordaigorl Jun 16 at 11:03
1  
have you included the decorations library? \usetikzlibrary{decorations.shapes} –  Bordaigorl Jun 16 at 11:09

1 Answer 1

up vote 21 down vote accepted

Here is an idea: use dashed, and define a decoration which draws the vertical line which crosses each dash to produce a plus:

\usetikzlibrary{decorations.markings}
\tikzset{
  pluses/.style={
    dashed,
    decoration={markings,
    mark=between positions 1.5pt and 1 step 6pt with {
       \draw[-] (0,1.5pt) -- (0,-1.5pt);
       }
    },
    postaction=decorate,
  }
}
\begin{tikzpicture}
\draw[very thin, pluses, ->] (0,0) to[bend left=45] (2,2);
\draw[very thick, red, pluses, ->] (-1,1) -- (2,0);
\end{tikzpicture}

Result:

Result

share|improve this answer
    
It works very well. Thanks everybody, thank you JLDiaz. –  silama Jun 16 at 11:18
4  
@silama: you can even define a ++++> style for this; according to JLDiaz's answer you need: \tikzset{++++>/.style={pluses,->}}, then \draw[very thick, red, ++++>].... –  Claudio Fiandrino Jun 16 at 12:10

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.