I'm trying to draw an automata using TikZ and the library automata
. An accepting state I would like to denote by a double circle but the distance between the two circles should be larger than the default (which is initially 0.6pt
). I do this by setting double distance=1.5pt
but this does not play nicely together with the option shorten >=1pt
as seen in the following minimal example:
\documentclass{minimal}
\usepackage{tikz}
\usetikzlibrary{automata,positioning}
\begin{document}
\begin{tikzpicture}[shorten >=1pt]
\node[state] (1) {1};
\node[state,accepting] (2) [below=of 1] {2};
\path[->] (1) edge (2);
\end{tikzpicture}
%
\begin{tikzpicture}[shorten >=1pt,accepting/.style={double distance=1.5pt}]
\node[state] (1) {1};
\node[state,accepting] (2) [below=of 1] {2};
\path[->] (1) edge (2);
\end{tikzpicture}
%
\begin{tikzpicture}[shorten >=1pt,accepting/.style={double distance=1.5pt}]
\node[state] (1) {1};
\node[state,accepting] (2) [below=of 1] {2};
\path[->,shorten >=1.9pt] (1) edge (2);
\end{tikzpicture}
\end{document}
In the second automata the arrow touches the double circle of the accepting state. I can manually fix the problem by adding the missing 0.9pt
to the shorten parameter but this is somehow tedious and error prone. Is there some automagically way how to handle this situation?