梅威瑟:
\documentclass[a4paper]{scrartcl}
\usepackage{tikz}
\usetikzlibrary {automata,positioning}
\begin{document}
\begin{center}
\begin{tikzpicture}
\node[initial,state,accepting] (q0){$q_0$};
\node[state] (q1) [right = of q0] {$q_1$};
\path[->] (q0) edge node[above] {$1$} (q1);
\end{tikzpicture}
\par\end{center}
\end{document}
我想将“start”一词改为q_0
另一个单词,可以吗?
谢谢你!
答案1
您可以使用以下initial text
密钥:
\documentclass[a4paper]{scrartcl}
\usepackage{tikz}
\usetikzlibrary {automata,positioning}
\begin{document}
\begin{center}
\begin{tikzpicture}[initial text=your text]
\node[initial,state,accepting] (q0){$q_0$};
\node[state] (q1) [right = of q0] {$q_1$};
\path[->] (q0) edge node[above] {$1$} (q1);
\end{tikzpicture}
\par\end{center}
\end{document}