21

I'd like to draw an arrow using TikZ where I can specify more than one tip (or tail). This is presumably technically possible since the >> tip is a "doubled" tip: defining >=diamond produces a double diamond tip. Also, quoting from the arrows section of the manual:

The spacing arrow tips are useful for combining them with other arrows to get arrows that do not touch the end of the line.

Which is, admittedly, vague enough that I could be interpreting it incorrectly.

But what is the actual syntax for combining two tips? Just listing them one after another doesn't work.

2 Answers 2

20
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows}
\pgfarrowsdeclarecombine{blah}{blah}{diamond}{diamond}{stealth}{stealth}
\begin{document}
  \tikz{\draw[blah-blah] (0,0)--(1,0);}
\end{document}
3
  • Wow! How did you find that command? I looked at pgfarrows.sty, but it's not defined there, nor is it explained in the manual.
    – Jake
    Jan 21, 2011 at 14:09
  • It's in pgfcorearrows.code.tex. Jan 21, 2011 at 14:15
  • 1
    Thanks, this is great to know -- I was surprised there was no arrow tip like this: |<--->| which is good for indicating measurements, but was able to use \pgfarrowsdeclarecombine{blah}{blah}{stealth}{stealth}{|}{|} to good effect (I imagine you can use a name other than blah but haven't bothered).
    – bryn
    Nov 7, 2011 at 23:19
9

Take a look at section 58 of the manual (version 2.00). Not only that you can combine two arrow tips, you can also double or triple a tip, reverse a tip, or even draw your own arrow tips (section 58.2). The commands are in the basic layer though.

2
  • 3
    It's section 74 in the 2.10 manual. Jan 21, 2011 at 20:23
  • You mean that there's even more in the manual now than when I first read it! Better get reading ... Jan 21, 2011 at 22:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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