#getting error when trying to use tikz
1 messages · Page 1 of 1 (latest)
on line 2 you said "on grid" but it doesn't understand what that means
Ok so this is smth my professor is trying to do, he’s just been getting into discord but knows latex and I’m not entirely sure what this is but he’s not on this server so I offered to ask, any idea what he’s trying to do with on grid and how he could fix it? Sorry for the trouble lol
I think you need to use the positioning library
,texdoc tikz
Documentation for tikz: http://texdoc.net/pkg/tikz
Documentation for tikz: http://texdoc.net/pkg/tikz
I see ty
\usetikzlibrary{automata}
\lipsum[1]%dummy text
\begin{figure}[!htbp]
\begin{tikzpicture}[shorten >=1pt,node distance=2cm,on grid=true]%<- on grid has to be followed by = true or false
\node[state] (q_0) {$q_0$};
\node[state] (q_1) [right=of q_0] {$q_1$};
\node[state, accepting] (q_2) [right=of q_1] {$q_2$};
\path[->] (q_0) edge [loop below] node {0,2} ()
(q_2) edge [loop above] node {0,1} ()
(q_1) edge [loop above] node {0,2} ()
(q_0) edge [bend right=50] node [below] {1} (q_2)
(q_1) edge [bend left=50] node [above] {1} (q_2)
(q_2) edge node [below] {2} (q_1);
\end{tikzpicture}
\caption{An automaton with cycle language at $q_2$ having $F(22)=9$.}
\label{fig:Fexam}
\end{figure}
do a ctrl+f for "on grid"
Purr ❄
automata library go hard
Tysm
For future reference, you should copy and paste the codes instead of just sending pictures.
Thanks so much got it
Will do
You’re welcome 
How do I mark as closed sorry
I think it’s like .resolved or something
.resolved