In TikZ, is it possible to place a node at a specific distance along a path. I know that there is
\draw (A) -- node[pos=<f>, above] {$+$} (B);
which will place a node at fraction f
along the path. However, I want to place a node at, say 10pt, before the end of the path from (A)
to (B)
. What is the simplest way to do this in TikZ?
Minimal example
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}
\node (A) {$A$};
\node [right=of A] (B) {$B$};
\draw [->] (A) -- node[pos=0.9, above] {$+$} (B);
\end{tikzpicture}
\end{document}
Best Answer