I have an automaton in tikz and would like to have some text within a triangle of the right size. How can I do that efficiently?
I have tried using a regular polygon, but I can't shrink it to the right size: minimum height and minimum size have no effect. So is there any parameter that controls the size?
\begin{tikzpicture}[auto,>=latex]
\node[state,inner sep=0pt,minimum size=.3cm] at (0,0) (init) {};
\node[state,inner sep=0pt,minimum size=.3cm] at (-5,-1.3) (idelta)
{};
\node[draw,minimum height=.5cm,regular
polygon,regular polygon sides=3] at (-5,-1.3) {foo};
\path[->]
(init)+(0,.5cm) edge (init)
(init) edge node[] {bar} (idelta);
\end{tikzpicture}



inner sep=0maybe? – percusse Jul 08 '13 at 17:49inner sep=0did make the triangle a bit smaller, but minimum height, minimum size still has no effect. I do need the triangle much smaller. scale does the trick, but also shrinks the text. – DaveBall aka user750378 Jul 08 '13 at 17:52label=center:foo. But you have to take care that the shape border doesn’t overlap with the text as it doesn’t do this automatically anymore, similar to using a negative inner sep. – Qrrbrbirlbel Jul 08 '13 at 17:59label=center:foo, the text is exactly in the center of the triangle, which therefore has to be larger to surround the text. withlabel=south:foo, the text is below the triangle. How can I get it within the triangle, but close to the bottom? – DaveBall aka user750378 Jul 08 '13 at 18:41anchorof the label explicitlylabel={[anchor=south]below:foo}(or use theinsidekey) with the little hack from How can I set the TikZ label anchor explicitly? – Qrrbrbirlbel Jul 08 '13 at 19:04