<?xml version="1.0" encoding="ISO-8859-15"?>
  <!-- $Id: drawing.xml,v 1.10  Exp $ -->
  <Appendix>
    <Heading>
      Drawing automata
    </Heading>
    The drawing of graphs described here uses
    <C>graphviz</C> <Cite Key="KoutsofiosNorth:2002"/>, a software for drawing graphs developed at AT
    <Alt Only="LaTeX">
      \&#38;
    </Alt>
    <Alt Not="LaTeX">
      <Alt Only="HTML">
        &#38;amp;
      </Alt>
      <Alt Not="HTML">
        &#38;
      </Alt>
    </Alt>
    T Labs, that can be obtained at
    <C>http://www.graphviz.org/</C>.
    <Section>
      <Heading>
        Installing some external programs
      </Heading>
      If you work under
      <C>LINUX</C>, you should install <C>graphviz</C>.
    </Section>
    <Section>
      <Heading>
        Functions to draw automata
      </Heading>
      <ManSection>
        <Func Arg="A [, file]" Name="DrawAutomaton" />
        <Description>
          This function draws automaton
          <C>A</C>.
<Example><![CDATA[
gap> x:=Automaton("det",3,2,[ [ 2, 3, 0 ], [ 0, 1, 2 ] ],[ 1 ],[ 1, 2, 3 ]);;
gap> DrawAutomaton(x,"exx");
Displaying file: /tmp/tmp.LKoc7O/exx.dot.ps
]]></Example>
The output would be the following diagram displayed in a <E>ghostview</E> window.
<P />
    <Alt Only="LaTeX">
      \begin{figure}[htbp] \begin{center} \leavevmode \includegraphics[bb=0 0 132 304]{aut2} \end{center} \label{fig:aut2} \end{figure}
    </Alt>
    <Alt Only="HTML">
      &#60;br&#62;&#60;center&#62;&#60;img src=&#34;aut2.gif&#34;&#62;&#60;/center&#62;&#60;br&#62;
    </Alt>
    <P />
        </Description>
      </ManSection>
      <ManSection>
        <Func Arg="A, B [, file]" Name="DrawAutomata" />
        <Description>
          This function tests if automaton
          <C>
            A
          </C>
          is a subautomaton of
          <C>
            B
          </C>
          in which case draws
          <C>
            B
          </C>
          highlighting the edges not in
          <C>
            A
          </C>
          by drawing them in a dotted style, while the others are drawn in a plain style.
        </Description>
      </ManSection>
      <ManSection>
        <Func Arg="G [, file]" Name="DrawGraph" />
        <Description>
          Draws a graph specified as an adjacency list
          <C>G</C>.
        </Description>
      </ManSection>
      <ManSection>
        <Func Arg="A [, file]" Name="DrawSCCAutomaton" />
        <Description>
          Draws automaton
          <C>
            A
          </C>
          and highlights it&#39;s strongly connected components by drawing the other edges in a dotted style.
        </Description>
      </ManSection>
    </Section>
  </Appendix>
