Posts

Showing posts from December 7, 2018

How to add caption for a TikZ picture?

Image
up vote 68 down vote favorite 28 I'm drawing a automaton figure, and I want to name it says 'M1' below the figure? A minimal example would be greatly appreciated. Thank you. begin{tikzpicture}[shorten >=1pt,node distance=2cm,on grid,auto] node[state,initial] (q_0) {$q_0$}; node[state,accepting] (q_1) [right=of q_0] {$q_1$}; node[state] (q_2) [right=of q_1] {$q_2$}; path[->] (q_0) edge node {a} (q_1) (q_1) edge node {$lambda$} (q_2) (q_2) edge [bend right] node {$lambda$} (q_0) ; %end path end{tikzpicture} tikz-pgf captions share | improve this question