Is there way of producing multiline label for node:
\node[label=below:{unit\\cell}] (one){\tikz{\draw (0,0)rectangle (1,1);}};
The example produces "wrong" label output: untitcell
However, following code:
\node (one){\tikz{\draw (0,0)rectangle (1,1);}};
\path (one) node [below,align=center] {unit\\cell};
produces correct doble-line label, but alas wrong positioning…
Best Answer
Don't nest TikZ pictures (unless you really have to), it has some nontrivial consequences. Labels are also nodes(almost) only placed differently. If you add
draw
option to your node, you don't need to draw it's box additionally.You can also pass regular options to the label node (because it's a node) as follows
If it becomes tedious to write complicated label codes just use the positioning syntax
which leads to the same result. There are a few more ways of doing it but no need to complicate it for this simple application. You can find many examples here too by searching for positioning library use.