Is it possible to draw arrows (preferential with TikZ) with two images: One for the line and one for the tip?
I would like to realize something like this:
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityHere is a different approach from what @percusse suggested. I used decorations to get the rectangles along the line:
\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usetikzlibrary{shapes, decorations.shapes, }
\begin{document}
\begin{tikzpicture}[decoration={shape backgrounds,shape=rectangle,shape width=4mm, shape height=10mm},
paint/.style={decorate, draw=#1!50!black, fill=#1!50}]]
\node (A) at (0,0) {};
\node [isosceles triangle, isosceles triangle apex angle=120, draw=blue!50!black, fill= blue!50, inner sep=1.1mm] (B) at (3.05,0) {};
\path [draw, paint=blue, decoration={shape sep=0.5cm}] (A)-- (B);
\end{tikzpicture}
\end{document}
It can be tweaked to wrap it into a single macro that takes for argument e.g. the length.
EDIT: Here is another version that is rotationally correct:
\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usetikzlibrary{positioning, shapes, decorations.shapes, decorations.markings}
\begin{document}
\begin{tikzpicture}[%
paint/.style={draw=#1!50!black, fill=#1!50},
linedeco/.style={decoration={%
markings,
mark=between positions 0 and 1 step #1 with {\draw (-1mm,-5mm) rectangle (1mm,5mm) [paint=blue];},
mark=at position 1 with
{\node [paint=blue, isosceles triangle, isosceles triangle apex angle=120, inner sep=1.1mm, transform shape] {};
},
}}]
\node (A) at (0,0) {};
\node (B) at (3,5) {};
\path [paint=blue, decorate, linedeco=0.05] (A)--(B);
\node (C) at (0,-2) {};
\node (D) at (3,-2) {};
\path [paint=blue, decorate, linedeco=0.1] (C)--(D);
\end{tikzpicture}
\end{document}
It takes a parameter you need to set manually, depending on the angles.
markings
decoration and then it would be complete :) Bah, vote cap...
:)
It would be really nice if I could automate the spacing, based on the actual orientation. I'll have to figure that out later...
Jun 13, 2012 at 19:02
shapes.geometric
library of tikz, you can have something like :\begin{tikzpicture}[every node/.style={draw,fill=blue!10,minimum height=1cm,minimum width=4mm}] \foreach \x in {1,...,5} { \node (l\x) at (0.6*\x,0) {};} \filldraw[fill=blue!10] ([xshift=2mm] l5.south east) -- ([xshift=2mm] l5.north east) -- ++(5mm,-0.5cm) -- cycle; \end{tikzpicture}
but is this portable enough or there must be a genuine line style?