Graphics, Figures & TablesArrow head in the middle of a line

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
mas
Posts: 226
Joined: Thu Dec 04, 2008 4:39 am

Arrow head in the middle of a line

Post by mas »

Using tikz, I can draw line like \draw[->] (0,0) -- (2,2) which puts an arrow head at the end of the line. There are situations where I would like the arrow head to be in the middle of the line. Browsing through the manual and searching online, did not yield any pointers to achieve that.

Any pointers to achieve this would be helpful.

Regards,

OS: Debian/GNU Linux; LaTeX System : TeXLive; Editor : Vim

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Arrow head in the middle of a line

Post by localghost »

The pgf manual (Section 27.6 - Mark Decorations: Adding Arrow Tips and Nodes on a Path, p. 267ff) introduces an example that uses the decorations.markings library (p. 269, bottom). You just have to translate it so that it fits your needs.


Best regards
Thorsten
Post Reply