# “node contents” is no more available in label, what's going on?

Normally a label is a node and we can use it as such, at least I think I was able to do it before version 3.1 of TikZ.

Now when I try to use node contents in label, for example like this :

\documentclass[tikz,border=7pt]{standalone}
\begin{document}
\tikz\node[label={[node contents=B]}]{A};
\end{document}


! Package tikz Error: Giving up on this path. Did you forget a semicolon?.


This is the same error that we obtain if we use node contents style within non empty node, like this \node[node contents=B]{A};.

So my question is : Has something changed in the way labels are treated in TikZ since version 3.1 ?

• for the second error: \tikz\node[node contents=B]; works (as expected). use node contents={...} meas that to you not declare its contains again. – Zarko Mar 1 at 13:26
• @Zarko I know how to use node contents:) The example of \node[node contents=B]{A}; is here just to say that may be for some reason the label node label={[node contents=B]} is not considered as "empty" in 3.1. – Kpym Mar 1 at 13:57
• well, i newer use such a way of labeling of nodes. to my opinion it is against to basic concept of the use of labels. so if this works in older version, probably was not by intention. – Zarko Mar 1 at 14:11
• I guess you wouldn't accept "yes" as the answer to "Has something changed in the way labels are treated in TikZ since version 3.1 ?", would you? ;-) – marmot Mar 24 at 20:10
• @marmot this reminds me of that :) – Kpym Mar 24 at 20:58