CarLaTeX
I'm a little rusty with Ti*k*Z...
How to put the writing at the middle of the following arrow line?
```
\documentclass{book}
\usepackage{tikz}
\usetikzlibrary{positioning, matrix}
\begin{document}
\begin{tikzpicture}
\matrix[matrix of nodes, nodes={draw, text width=30pt, align=center}, row sep=30pt] (mymatr) {
A\\
B\\
C\\
};
\draw[->] (mymatr-3-1) -- +(30pt,0) |- node[anchor=west, align=center, midway] {Something to put\\ at the middle of the arrow line} (mymatr-1-1);
\end{tikzpicture}
\end{document}
```

Top Answer
user 3.14159
In the `|-` and `-|`, midway refers to the corner, regardless of how long the horizontal and vertical stretches really are. You will need then `pos=0.25` or `pos=0.75` to put something in the middle of the vertical or horizontal stretches, respectively, i.e. `pos=0.25` in the example you posted.
```
\documentclass{book}
\usepackage{tikz}
\usetikzlibrary{positioning, matrix}
\begin{document}
\begin{tikzpicture}
\matrix[matrix of nodes, nodes={draw, text width=30pt, align=center}, row sep=30pt] (mymatr) {
A\\
B\\
C\\
};
\draw[->] (mymatr-3-1) -- +(30pt,0) |-
node[pos=0.25,anchor=west, align=center] {Something to put\\ at the middle of the arrow line} (mymatr-1-1);
\end{tikzpicture}
\end{document}
```

Answer #2
joulev
With the help of `decorations.markings` you can add anything at any position along the path.
```
\documentclass{book}
\usepackage{tikz}
\usetikzlibrary{positioning, matrix, decorations.markings}
\begin{document}
\begin{tikzpicture}
\matrix[matrix of nodes, nodes={draw, text width=30pt, align=center}, row sep=30pt] (mymatr) {
A\\
B\\
C\\
};
\draw[->,postaction=decorate,
decoration={
markings,
mark=at position 0.5 with {\node[anchor=west] {It is now at the middle!};}
}] (mymatr-3-1) -- +(30pt,0) |- node[anchor=west, align=center, midway] {Something to put\\ at the middle of the arrow line} (mymatr-1-1);
\end{tikzpicture}
\end{document}
```
