10

I am trying to replace vaucanson-g with TikZ, but I cannot make the automata as small. There seems to be a minimum size of the circle around nodes, that I can't reduce even with inner sep=0. Example below:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{automata,positioning}
\begin{document}
\begin{tikzpicture} [->,auto,node distance=0.6cm,line width=0.4mm]
 \node[state,initial,inner sep=1pt] (q) {$q$};
 \node[state,accepting] (p) [right=of q] {$p$};
\end{tikzpicture}
\end{document}

A lot of whitespace is left around the letters.

  • Please include a full compilable example including \documentclass and all the packages (especially with tikz) and not just code snippets. – Peter Grill Sep 21 '11 at 23:16
  • 1
    @Peter percusse and I took that liberty. – Alan Munn Sep 21 '11 at 23:24
12

Adding inner sep=0pt, minimum size=0pt does the job for me.

enter image description here

Here is the full code:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{automata,positioning}
\begin{document}
\begin{tikzpicture} [->,auto,node distance=0.6cm,line width=0.4mm]
 \node[state,initial,inner sep=1pt,minimum size=0pt] (q) {$q$};
 \node[state,accepting,inner sep=1pt,minimum size=0pt] (p) [right=of q] {$p$};
\end{tikzpicture}
\end{document}
  • 9
    You have to set this explicitly, because state is (basically) defined as circle,draw,minimum size=2.5em. To change this globally, add \tikzset{every state/.style={minimum size=0pt}}. – Caramdir Sep 21 '11 at 23:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.