Is there a way to get label text to rotate with the TikZ node to which it is attached. I can rotate the node and its text; but labels do not rotate along with the node, and instead remain "level":
\tikzset{fig/.style={regular polygon, regular polygon sides=3, label=60:A,label=below:B}}
\begin{tikzpicture}
\foreach \i in {0,1,2,3}{\node[fig,rotate=20*\i,draw] at(\i*4,0) {Text};}
\end{tikzpicture}
In general, I'd like to find a way to rotate a "composite" element, consisting of more than just a single, simple node and it's labels; for example, a shape, in which the corners have been "marked" with symbols or other shapes:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes}
% Not needed for MWE but used in my code:
%\usetikzlibrary{positioning}
%\usetikzlibrary{petri}
\begin{document}
\tikzset{fig/.style={regular polygon, regular polygon sides=3, label=60:A,label=below:B}}
\begin{tikzpicture}
\foreach \i in {0,1,2,3}{\node[fig,rotate=20*\i,draw] at(\i*4,0) {Text};}
\end{tikzpicture}
% I don't know how to create the images in the second illustration
\end{document}
Best Answer
or with your code and like in Peter's answer remark : a local style is better (fig/.style here is a local style)