Graphics, Figures & TablesDraw Automata with LaTeX

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
wassimee
Posts: 1
Joined: Fri Feb 11, 2011 10:43 pm

Draw Automata with LaTeX

Post by wassimee »

I wanted to draw automata with latex, I install the package
Vaucanson-G, and I inserted this code but it does not work, I know where
it is the treatment problems. Thank you for helping me
Here is my code:


\documentclass[a4paper,10pt]{book}

\usepackage[utf8x]{inputenc}
\usepackage{amsmath}
\usepackage{vaucanson-g}
\begin{document}


\MediumPicture\VCDraw{%
\begin{VCPicture}{(-2,-6)(6,2)} \officialeuro\officialeuro
% states
\State[A]{(0,0)}{1}
\State{(8,0)}{2}
\FinalState[3]{(4,0)}{3}
\State[4]{(0,-4)}{4}
\FinalState[5]{(4,-4)}{5}
% initial--final
\Initial{1}
%\Final{10}
% transitions
\EdgeL{1}{3}{a}
\EdgeL{1}{4}{b}
\EdgeL{1}{5}{c}
\ArcL{2}{3}{a}
\EdgeL{2}{5}{c}
\LoopN{3}{a}
\ArcL{3}{2}{b}
\ArcL{3}{5}{c}
\ArcL{4}{5}{c}
\ArcL{5}{3}{a}
\ArcL{5}{4}{b}
\LoopS{5}{c}
\end{VCPicture}
}\\


\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Draw Automata with LaTeX

Post by frabjous »

As far as I can tell the only problem here is the command \officialeuro which requires that you load the eurosym package:

Code: Select all

\usepackage{eurosym}
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: Draw Automata with LaTeX

Post by localghost »

"Does not work" is a trivial statement and not helpful. Error messages from the log file are much better to get a clue of what might be going wrong.


Best regards and welcome to the board
Thorsten
Post Reply