I would like to "reuse" some nodes' labels, as in example below
\documentclass[a4paper,12pt,oneside,titlepage]{report}
\usepackage{tikz}
\usetikzlibrary{positioning}
\tikzset{
label node/.style = {
rectangle,
minimum size = 6mm,
rounded corners = 2mm,
very thick,
draw = black!50,
top color = white,
bottom color = black!20,
font = \sffamily,
anchor = east,
}
}
\begin{document}
\begin{tikzpicture}[line width = 1pt]
\node(A) [label node] at (-1, 0) {Node A};
\node(B) [label node] at (2, 0) {A.label};
\end{tikzpicture}
\end{document}
So, instead of having "A.label" as label for node B, I want "Node A" to be its label without writing it explicitly, i.e. "take" the label text from the node A.
labeloption which adds external labels outside the node. At first this confused me. Why do you not store the content in a macro and use the same macro for every node? – Martin Scharrer Apr 17 '12 at 14:35{}. But you're right, it's confusing that there's also alabelkey. – Jake Apr 17 '12 at 14:40label node. – Alain Matthes Apr 17 '12 at 14:59Bto say "take the text from A" and for that many keystrokes, it's as easy to just define an auxiliary macro. – Andrew Stacey Apr 18 '12 at 13:24