[Tex/LaTex] New LaTeX user trying to install VauCanSon-G (state machine style)

installingpackages

I'm completely new to LaTeX and I'm trying to draw some state diagrams for an assignment.

So far the options I have found are

1- Use VauCanSon-G to generate the diagrams
2- Draw the diagrams in an external application

I definitely don't want to need 2 applications to write my assignment, so I must use the style. However, I have only ever install single .sty files and moved them to usr/share/texmf/tex/latex/[stylename] and use usepackage{[name]}.

This style is actually more than one (?) and has a bunch of other types of files listed on the download page. I've tried a couple times and always get errors. Can somebody point me in the right direction?

EDIT

I have downloaded and install texlive (and, thus tlmgr). I am sure that my setup is correct because I have been able to use styles I have not explicitly downloaded and install manually. However, when trying to run Herbert's example, I get several errors. I double check if I have the package installed:

max@linux-vwzy:~/downloads> tlmgr show vaucanson-g
package:     vaucanson-g
category:    Package
shortdesc:   PSTricks macros for drawing automata
longdesc:    VauCanSon-G is a package that enables the user to draw automata within texts written using LaTeX. The package macros make use of commands of PStricks
installed:   Yes
revision:    15878
cat-version: 0.4
cat-date:    2008-10-30 09:45:25 +0100
cat-license: lppl
collection:  collection-pstricks

So it is installed. Ideas?

Best Answer

save the files of the tarzip from the http://mirror.ctan.org/graphics/pstricks/contrib/vaucanson-g.zip and save the files in your home directory: ~/texmf/tex/generic/vaucanson Then it should be find by TeX.

\documentclass[]{article}
\usepackage{vaucanson-g}

\begin{document}
\begin{VCPicture}{(0,-2)(5.5,2)}
  \State[p]{(0,0)}{A}
  \State{(2.5,0)}{B}
  \State[r]{(5.5,0)}{C}
  \Initial{A} \Final{C}
  \EdgeL{A}{B}{a} \ArcL{B}{C}{b} \ArcL{C}{B}{b}                                                                                                                        
  \LoopN{A}{a} \LoopS{C}{d}                                                                                                             
\end{VCPicture}                                                                                                                         
\end{document}   

enter image description here

run the example with xelatex or latex->dvips->ps2pdf. A more complicated example can be found here: http://mirror.ctan.org/info/examples/PSTricks_en/33-04-3.ltx:

enter image description here

Related Question