I'm partial to marking the initial state of my automata with a '>' (somewhat larger) pointing at the state. I find the "initial -->" distracting. Is there any way to change the default?


You can just decrease the initial distance and use arrows.meta to add a largish arrow.

    every initial by arrow/.style={-{Straight Barb[length=5pt,width=6pt]}},
    initial distance=0.01cm,initial text={}]
\node[state,initial] {$q_0$}; 

enter image description here

  • Fooling around before seeing your answer I came to essentially the same solution. Thanks!
    – vonbrand
    Feb 23 '20 at 0:15

This may interest you -- from the pgf manual chapter on decoration.markings at page 646 --

link--> http://ctan.imsc.res.in/graphics/pgf/base/doc/pgfmanual.pdf

enter image description here

Position and color can be adjusted as per your choice -- this is only a rough draft

enter image description here

\usetikzlibrary{automata, decorations.shapes, shapes.geometric}


\begin{tikzpicture}[>=latex, decoration={shape= isosceles triangle, shape 
  width=0.65cm, shape height=0.45cm,shape sep=0.75cm,shape backgrounds}]
  \node[state] (q_0) {$q_0$};
  \draw[decorate, fill=red] (-2cm,0)-- node[above]{start} (q_0);
  \draw [decorate, fill=red](1,0);


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.