When editing figures with many nodes in TikZ (e.g. using tikzedt -- http://www.tikzedt.org/), it gets cumbersome to keep track of the names of nodes. Therefore, I would like to display their names in labels, when generating preliminary output.
after reading through the documentation and searching the internet, this was the closest I got, based on this post: How to extract the value from a pgfkeys style element
But I do not know how to refer to the name of the current node..
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[
% does work:
mystyle/.style={label={right:\pgfkeysvalueof{/pgf/minimum width}}}
% does not work:
% mystyle/.style={label={right:\pgfkeysvalueof{/pgf/name}}}
]
\node [mystyle, draw] (n1) {1};
\end{tikzpicture}
\end{document}
The generated output is shown below on the left, the desired output is shown on the right:
I would like the label to be defined in a style and not in the code of the every separate node, so that I do not need to edit the code for every node separately.
Thanks a lot in advance!
article
.minimal
isn't suitable, just in case you are interested in the gory details.