  <refentryinfo>
    <copyright>
      <year>1999</year>
      <year>2004</year>
      <holder>Fredrik Hallenberg, W. Borgert, Alan Horkan</holder>
    </copyright>
    <date>2004-11-26</date>
    <authorgroup>
      <author>
	<firstname>Fredrik</firstname>
	<surname>Hallenberg</surname>
	<email>hallon@lysator.liu.se</email>
      </author>
      <author>
	<firstname>W.</firstname>
	<surname>Borgert</surname>
	<email>debacle@debian.org</email>
      </author>
      <author>
	<firstname>Alan</firstname>
	<surname>Horkan</surname>
	<email>horkana@tcd.ie</email>
      </author>
    </authorgroup>
    <revhistory>
      <revision>
	<revnumber>4</revnumber>
	<date>2004-11-26</date>
	<authorinitials>AH</authorinitials>
	<revremark>added to See Also, corrected grammar</revremark>
      </revision>
      <revision>
	<revnumber>3</revnumber>
	<date>2003-11-26</date>
	<authorinitials>WB</authorinitials>
	<revremark>added --size option</revremark>
      </revision>
      <revision>
	<revnumber>2</revnumber>
	<date>2003-10-16</date>
	<authorinitials>WB</authorinitials>
	<revremark>added different EPS variants and section on
	files</revremark>
      </revision>
      <revision>
	<revnumber>1</revnumber>
	<date>2003-10-12</date>
	<authorinitials>WB</authorinitials>
	<revremark>1st DocBook/XML version</revremark>
      </revision>
    </revhistory>
  </refentryinfo>

  <refmeta>
    <refentrytitle>dia</refentrytitle>

    <manvolnum>1</manvolnum>
  </refmeta>

  <refnamediv>
    <refname>dia</refname>

    <refpurpose>a diagram drawing program</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <cmdsynopsis>
      <command>dia</command>

      <arg><option>-c</option></arg>

      <arg><option>--credits</option></arg>

      <arg><option>-e <replaceable>OUTPUT</replaceable></option></arg>

      <arg><option>--export=<replaceable>OUTPUT</replaceable></option></arg>

      <arg><option>-L <replaceable>LAYER,LAYER,...</replaceable></option></arg>

      <arg><option>--show-layers=<replaceable>LAYER,LAYER,...</replaceable></option></arg>

      <arg><option>-h</option></arg>

      <arg><option>--help</option></arg>

      <arg><option>-n</option></arg>

      <arg><option>--nosplash</option></arg>

      <arg><option>-s <replaceable>WxH</replaceable></option></arg>

      <arg><option>--size=<replaceable>WxH</replaceable></option></arg>

      <arg><option>-t <replaceable>FORMAT</replaceable></option></arg>

      <arg><option>--filter=<replaceable>FORMAT</replaceable></option></arg>

      <arg><option>-v</option></arg>

      <arg><option>--version</option></arg>

      <arg>file ...</arg>
    </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1>
    <title>Description</title>

    <para><command>Dia</command> is used to create diagrams.  Dia has
    a number of basic tools, like lines and boxes but can also
    dynamically load <emphasis>sheets</emphasis>.  A sheet is a
    collection of tools that are used in a certain type of
    diagram.</para>

    <para>Most diagram objects in <command>Dia</command> have
    <emphasis>connection points</emphasis>.  Lines can be connected to
    these connection points and this way graph structures can be formed.
    When objects are moved or resized the connections will follow the
    objects.</para>

    <para>Diagrams drawn in <command>Dia</command> can be exported as
    PostScript.</para>
  </refsect1>

  <refsect1>
    <title>Options</title>

    <para><command>Dia</command> accepts the following options:</para>

    <variablelist>
      <varlistentry>
	<term><option>-c</option>
	  <option>--credits</option></term>
	<listitem>
	  <para>Display credits list and exit.</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>-e <replaceable>OUTPUT</replaceable></option>
	  <option>--export=<replaceable>OUTPUT</replaceable></option></term>
	<listitem>
	  <para>Export loaded file to OUTPUT and exit.</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>-h</option>
	  <option>--help</option></term>
	<listitem>
	  <para>Display a list of all commandline options.</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>-n</option>
	  <option>--nosplash</option></term>
	<listitem>
	  <para>Do not show the splash screen.</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>-s <replaceable>WxH</replaceable></option>
	  <option>--size=<replaceable>WxH</replaceable></option></term>
	<listitem>
	  <para>Export loaded file in decimal given width and/or
	  height.  It is allowed to only select width or height.
	  E.g. <option>--size=<replaceable>520x</replaceable></option>
	  exports an image that is 520 pixels wide, while
	  <option>--size=<replaceable>x900</replaceable></option>
	  exports an image of 900 pixels height.</para>

	  <note>
	    <para>This option is currently only implemented for the
	    PNG export filter.</para>
	  </note>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>-L <replaceable>LAYER,LAYER,...</replaceable></option>
	  <option>--show-layers=<replaceable>LAYER,LAYER,...</replaceable></option></term>
	<listitem>
	  <para>Only include specified layers when exporting. Layers can be
	  specified either as a layer name, the layer number or a numeric
	  range X-Y of layers. --show-layers=background,2-5 shows the layer
	  named background and layers 2-5, --show-layers=2- shows layers 2 and
	  up.</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>-t <replaceable>FORMAT</replaceable></option>
	  <option>--export-to-format=<replaceable>FORMAT</replaceable></option></term>
	<listitem>
	  <para>Export loaded file in FORMAT and exit.  Format are
	  described below.</para>
	</listitem>
      </varlistentry>
      <varlistentry>
	<term><option>-v</option>
	  <option>--version</option></term>
	<listitem>
	  <para>Display <command>dia</command> version and exit.</para>
	</listitem>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1>
    <title>Export Formats</title>

    <para>The following export formats are supported by
    <command>dia</command>.</para>

    <itemizedlist>
      <listitem>
	<para><literal>cgm</literal> (Computer Graphics Metafile, ISO
        8632)</para>
      </listitem>

      <listitem>
	<para><literal>dia</literal> (Native dia diagram)</para>
      </listitem>

      <listitem>
	<para><literal>dxf</literal> (Drawing Interchange File)</para>
      </listitem>

      <listitem>
        <para><literal>eps</literal>  or
	<literal>eps-builtin</literal> or <literal>eps-pango</literal>
	(Encapsulated PostScript)</para>

        <para>The format specifications <literal>eps</literal> and <literal>eps-pango</literal> both
	use the font renderer of the Pango library, while
        <literal>eps-builtin</literal> uses a dia specific font
        renderer.  If you have problems with Pango rendering,
        e.g. Unicode, try <literal>eps-builtin</literal>
	instead.</para>
      </listitem>

      <listitem>
	<para><literal>fig</literal> (XFig format)</para>
      </listitem>

      <listitem>
	<para><literal>mp</literal> (TeX MetaPost macros)</para>
      </listitem>

      <listitem>
	<para><literal>plt</literal> or <literal>hpgl</literal> (HP
	Graphics Language)</para>
      </listitem>

      <listitem>
	<para><literal>png</literal> (Portable Network
	Graphics)</para>
      </listitem>

      <listitem>
	<para><literal>shape</literal> (Dia Shape File)</para>
      </listitem>

      <listitem>
	<para><literal>svg</literal> (Scalable Vector Graphics)</para>
      </listitem>

      <listitem>
	<para><literal>tex</literal> (TeX PSTricks macros)</para>
      </listitem>

      <listitem>
	<para><literal>wpg</literal> (WordPerfect Graphics)</para>
      </listitem>

      <listitem arch="win32">
	<para><literal>wmf</literal> (Windows MetaFile)</para>
      </listitem>
    </itemizedlist>
  </refsect1>

  <refsect1>
    <title>Files</title>

    <para><command>dia</command> creates a directory
    <filename>.dia</filename> in the user&apos;s home, which contains
    different files to store user preferences.  To reset
    <command>dia</command> to it&apos;s default behaviour, just remove
    the respective file:</para>

    <itemizedlist>
      <listitem>
	<para><filename>defaults.dia</filename>: contains default
        values for elements (XML format).</para>
      </listitem>
      <listitem>
	<para><filename>diarc</filename>: keeps
        <command>dia</command> preferences (ASCII).</para>
      </listitem>
      <listitem>
	<para><filename>history</filename>: keeps the list of last
        edited diagrams (ASCII).</para>
      </listitem>
      <listitem>
	<para><filename>menurc</filename>: contains an automated
	accelerator map dump (Lisp).</para>
      </listitem>
      <listitem>
	<para><filename>persistence</filename>: contains GUI
	information, e.g. open windows (XML).</para>
      </listitem>
      <listitem>
	<para><filename>pluginrc</filename>: the list of loaded
	plugins (XML).</para>
      </listitem>
    </itemizedlist>
  </refsect1>

  <refsect1>
    <title>See Also</title>

    <para><ulink url="http://www.pango.org/">Pango</ulink></para>
    <para>X (1)</para>
    <para>xfig (1)</para>
    <para>inkscape (1)</para>
  </refsect1>

  <refsect1>
    <title>Copyright</title>

    <para>Copyright 1999 Alexander Larsson.</para>

    <para>Permission to use, copy, modify, and distribute this
    software and its documentation for any purpose and without fee is
    hereby granted, provided that the above copyright notice appear in
    all copies and that both that copyright notice and this permission
    notice appear in supporting documentation.</para>
  </refsect1>

  <refsect1>
    <title>Authors</title>

    <para><author><firstname>Alexander</firstname>
	<surname>Larsson</surname>
	<email>alla@lysator.liu.se</email></author></para>

    <para>This manual was written by
    <author><firstname>Fredrik</firstname>
	<surname>Hallenberg</surname>
	<email>hallon@lysator.liu.se</email></author>.</para>
  </refsect1>
