![如何更改初始单词命令?](https://linux22.com/image/425734/%E5%A6%82%E4%BD%95%E6%9B%B4%E6%94%B9%E5%88%9D%E5%A7%8B%E5%8D%95%E8%AF%8D%E5%91%BD%E4%BB%A4%EF%BC%9F.png)
梅威瑟:
\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}