How can I draw a horizontal line inside a TikZ node?
I want the name of the state to be seperated from the rest of the node. How can i achieve this?
\documentclass[tikz,border=2pt]{standalone}
\usetikzlibrary{automata}
\begin{document}
\begin{tikzpicture}[%
every node/.style={%
align=center,
state
}
]
\node (T0) {
\textbf{State$_1$} \\
\hline \\ % <--- This is not working!
$\overline{A}$ \\
$B$
};
\end{tikzpicture}
\end{document}
Best Answer
You could try
circle split
:The keys are:
circle split
\nodepart{lower}
instead of\hline
One drawback of this method is that the split line is drawn exactly at the middle of the circle. I don't know if that bothers you.