The following is a snippet of the original. It works..,
\documentclass[12pt]{article}
\usepackage{tikz} % drawing support
\usetikzlibrary{trees,arrows,decorations.markings}
\definecolor{darkgreen}{rgb}{0,.5,0}
\begin{document}
\begin{tikzpicture}[yscale=-1,scale=1,label/.style={postaction={decorate,decoration={ markings, mark=at position .5 with \node #1;}} }]
\node at (0,0) (node0) [inner sep=0pt,minimum width=1mm,circle,draw=blue] {1}; % node#1
\end{tikzpicture}
\end{document}
The label style is primarily for edges which don't appear in the snippet above. However, I'd like to label the nodes, too: change the \node line to:
\node at (0,0) (node0) [inner sep=0pt,minimum width=1mm,circle,draw=blue] [label=60:X] {1}; % node#1
which is intended to put the letter "X" at a 60 degree angle from the node.
Tikz then "blesses" me with a
Package tikz Error: A node must have a (possibly empty) label text.
I've tried numerous combinations of [] {} etc, and haven't gotten the code to work.
Best Answer
As TikZ already has already a
label
option (see section 16.10 The Label and Pin Options in the pgfmanual) you can not define your own style calling itlabel
(moreover with a different aim).