<?xml version="1.0" encoding="utf-8" standalone="no"?>
<?xml-stylesheet type="text/xml" href="params.xsl"?>
<!-- vim: set ai tw=80 ts=3 sw=3: -->
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "
              http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY FDL SYSTEM "fdl-appendix.xml">
<!ENTITY FDLlink "<link linkend='fdl'>included</link>">
]>
<!-- =============Document Header ============================= -->
<book id="index" lang="eu">
  <bookinfo>
    <title>GTK-Doc aplikazioaren eskuliburua</title>
    <edition>1.24.1</edition>
    <abstract role="description"><para>GTK-Doc aplikazioaren erabilera azaltzen duen erabiltzaile-eskuliburua, garatzaileentzako argibideekin.</para></abstract>
    <authorgroup>
      <author><firstname>Chris</firstname> <surname>Lyttle</surname> <affiliation> <address> <email>chris@wilddev.net</email> </address> </affiliation></author>
      <author><firstname>Dan</firstname> <surname>Mueth</surname> <affiliation> <address> <email>d-mueth@uchicago.edu</email> </address> </affiliation></author>
      <author><firstname>Stefan</firstname> <surname>Sauer (Kost)</surname> <affiliation> <address> <email>ensonic@users.sf.net</email> </address> </affiliation></author>
    </authorgroup>
    <publisher role="maintainer"><publishername>GTK-Doc proiektua</publishername> <address><email>gtk-doc-list@gnome.org</email></address></publisher>
    <copyright><year>2000, 2005</year> <holder>Dan Mueth and Chris Lyttle</holder></copyright>
    <copyright><year>2007-2019</year> <holder>Stefan Sauer (Kost)</holder></copyright>

    <!-- translators: uncomment this:
    <copyright>
      <year>2000</year>
      <holder>ME-THE-TRANSLATOR (Latin translation)</holder>
    </copyright>
    -->

    <legalnotice>
      <para>Baimena ematen da dokumentu hau kopiatu, banatu eta/edo aldatzeko Free Software Foundation-ek argitaratutako <citetitle>GNU Dokumentazio Librearen Lizentziaren</citetitle> 1.1. bertsioan edo berriago batean ezarritako baldintzetan, atal aldaezinik gabe, aurreko azaleko testurik gabe eta atzeko azaleko testurik gabe. Lizentziaren kopia <link linkend="fdl">esteka honetan</link>.</para>
      <para>Enpresek beren produktu eta zerbitzuak bereizteko erabiltzen dituzten izen asko marka erregistratu gisa hartu behar dira. Izen horiek GNOMEren edozein agiritan agertzen direnean, eta GNOMEren Dokumentazio Proiektuko kideak marka komertzialak direla konturatzen direnean, izen horiek osorik maiuskulaz edo hasierako letra maiuskulaz idatzi dituzte.</para>
    </legalnotice>

    <revhistory>
      <revision><revnumber>1.33.0</revnumber> <date>2020ko urriaren 1a</date> <authorinitials>mc</authorinitials> <revremark>gtk4 version</revremark></revision>
      <revision><revnumber>1.32.1</revnumber> <date>2019ko abuztuaren 15a</date> <authorinitials>ss</authorinitials> <revremark>dev version</revremark></revision>
      <revision><revnumber>1.32</revnumber> <date>2019ko abuztuaren 15a</date> <authorinitials>ss</authorinitials> <revremark>hotfix release</revremark></revision>
      <revision><revnumber>1.31</revnumber> <date>05 Aug 2019ko abuztuaren 5a</date> <authorinitials>ss</authorinitials> <revremark>refactorings and more test coverage</revremark></revision>
      <revision><revnumber>1.30</revnumber> <date>2019ko maiatzaren 8a</date> <authorinitials>ss</authorinitials> <revremark>hotfix release</revremark></revision>
      <revision><revnumber>1.29</revnumber> <date>28 Aug 2018ko abuztuaren 28a</date> <authorinitials>ss</authorinitials> <revremark>bug fixes</revremark></revision>
      <revision><revnumber>1.28</revnumber> <date>2018ko martxoaren 14a</date> <authorinitials>ss</authorinitials> <revremark>bug fixes</revremark></revision>
      <revision><revnumber>1.27</revnumber> <date>2017ko abenduaren 7a</date> <authorinitials>ss</authorinitials> <revremark>Python atakaren doitze fina</revremark></revision>
      <revision><revnumber>1.26</revnumber> <date>2017ko abuztuaren 11</date> <authorinitials>ss</authorinitials> <revremark>tresna guztiak Perl/Bash lengoaietatik Python-era eraman dira</revremark></revision>
      <revision><revnumber>1.25</revnumber> <date>2016ko martxoaren 21a</date> <authorinitials>ss</authorinitials> <revremark>akatsen konponketa, proben garbiketa</revremark></revision>
      <revision><revnumber>1.24</revnumber> <date>2015eko maiatzaren 29a</date> <authorinitials>ss</authorinitials> <revremark>akats baten konponketa</revremark></revision>
      <revision><revnumber>1.23</revnumber> <date>2015eko maiatzaren 17a</date> <authorinitials>ss</authorinitials> <revremark>akats baten konponketa</revremark></revision>
      <revision><revnumber>1.22</revnumber> <date>2015eko maiatzaren 7a</date> <authorinitials>ss</authorinitials> <revremark>akatsen konponketa, eginbide zaharkituak kentzea</revremark></revision>
      <revision><revnumber>1.21</revnumber> <date>2014ko uztailaren 17a</date> <authorinitials>ss</authorinitials> <revremark>akatsen konponketa, eginbide zaharkituak kentzea</revremark></revision>
      <revision><revnumber>1.20</revnumber> <date>2014ko otsailaren 16a</date> <authorinitials>ss</authorinitials> <revremark>akatsen konponketa, markdown euskarria, estiloaren hobekuntzak</revremark></revision>
      <revision><revnumber>1.19</revnumber> <date>2013ko ekainaren 5a</date> <authorinitials>ss</authorinitials> <revremark>bug fixes</revremark></revision>
      <revision><revnumber>1.18</revnumber> <date>2011ko irailaren 14a</date> <authorinitials>ss</authorinitials> <revremark>akatsen konponketa, abiadura-hobekuntzak, markdown euskarria</revremark></revision>
      <revision><revnumber>1.17</revnumber> <date>2011ko otsailaren 26a</date> <authorinitials>sk</authorinitials> <revremark>akats larri baten konponketa</revremark></revision>
      <revision><revnumber>1.16</revnumber> <date>2011ko urtarrilaren 14a</date> <authorinitials>sk</authorinitials> <revremark>akatsen konponketa, diseinu-hobekuntzak</revremark></revision>
      <revision><revnumber>1.15</revnumber> <date>2010eko maiatzaren 21a</date> <authorinitials>sk</authorinitials> <revremark>akatsen eta erregresioen konponketa</revremark></revision>
      <revision><revnumber>1.14</revnumber> <date>2010eko martxoaren 28a</date> <authorinitials>sk</authorinitials> <revremark>akatsen konponketa eta errendimendu-hobekuntzak</revremark></revision>
      <revision><revnumber>1.13</revnumber> <date>18 December 2009ko abenduaren 18a</date> <authorinitials>sk</authorinitials> <revremark>banaketa-pakete hautsiaren eguneratzea</revremark></revision>
      <revision><revnumber>1.12</revnumber> <date>2009ko abenduaren 18a</date> <authorinitials>sk</authorinitials> <revremark>tresnen eginbide berriak eta akatsen konponketa</revremark></revision>
      <revision><revnumber>1.11</revnumber> <date>2008ko azaroaren 16a</date> <authorinitials>mal</authorinitials> <revremark>GNOME doc-utils migrazioa</revremark></revision>
    </revhistory>

  </bookinfo>

  <!-- ======== Chapter 1: Introduction ======================== -->

  <chapter id="introduction">
    <title>Sarrera</title>

    <para>Kapitulu hau GTK-Doc aplikazioaren sarrera da, zer den eta nola erabiltzen den azaltzen du orokorrean.</para>

    <sect1 id="whatisgtkdoc">
      <title>Zer da GTK-Doc?</title>

      <para>
        GTK-Doc is used to document C code. It is typically used to document the
        public API of libraries, such as GLib-based libraries, but it can also
        be used to document application code.
      </para>
    </sect1>

    <sect1 id="howdoesgtkdocwork">
      <title>Nola dabil GTK-Doc?</title>

      <para>
        GTK-Doc works by reading specially-formatted comment blocks placed
        inside the source files to document symbols such as functions, macros,
        structs, enums, etc. (though note that for most kind of symbols GTK-Doc
        will only document the symbols that are declared in header files; for
        example it won't produce output for static functions).
      </para>

      <para>
        GTK-Doc also reads template files where documentation can be added there
        as well.
      </para>

      <para>
        GTK-Doc consists of a number of programs, each performing a different
        step in the process.
      </para>

      <para>
        The main steps are:
      </para>

      <orderedlist>

        <listitem>
          <para><guilabel>Dokumentazioa idaztea.</guilabel> Egileak funtzio, makro, struct eta abarren dokumentazioarekin betetzen ditu iturburu-fitxategiak.</para>
        </listitem>

        <listitem>
          <para>
            <guilabel>Gathering information about the code.</guilabel>

            <application>gtkdoc-scan</application> scans the header files of the
            code looking for declarations of functions, macros, enums, structs,
            and unions. It creates the file
            <filename>&lt;module&gt;-decl-list.txt</filename> containing a list
            of the declarations, placing them into sections according to which
            header file they are in. On the first run this file is copied to
            <filename>&lt;module&gt;-sections.txt</filename>. The author can
            rearrange the sections, and the order of the declarations within
            them, to produce the final desired order. The second file it
            generates is <filename>&lt;module&gt;-decl.txt</filename>. This file
            contains the full declarations found by the scanner. If for some
            reason one would like some symbols to show up in the docs, where the
            full declaration cannot be found by the scanner or the declaration
            should appear differently, one can place entities similar to the
            ones in <filename>&lt;module&gt;-decl.txt</filename> into
            <filename>&lt;module&gt;-overrides.txt</filename>.
         </para>
         <para><application>gtkdoc-scangobj</application> edozein GObject azpiklaseri buruzko kontsultak dinamikoki gauzatzeko ere erabili daiteke. Objektu bakoitzak klase-hierarkian duen kokalekuari eta eskaintzen duen edozein GObject propietate eta seinaleri buruzko informazioa gordetzen du.</para>
         <para>
            <application>gtkdoc-scanobj</application> should not be used
            anymore. It was needed in the past when GObject was still GtkObject
            inside GTK.
         </para>
        </listitem>

        <listitem>
          <para>
            <guilabel>Generating the XML and HTML/PDF.</guilabel>

            <application>gtkdoc-mkdb</application> turns the template files into
            XML files in the <filename class="directory">xml/</filename>
            subdirectory. If the source code contains documentation for symbols,
            using the special comment blocks, it gets merged in here. If there
            are no tmpl files used it only reads docs from sources and
            introspection data.
          </para>
          <para><application>gtkdoc-mkhtml</application> aplikazioak XML fitxategiak HTML fitxategi bihurtzen ditu <filename class="directory">html/</filename> azpidirektorioan. Era berean, <application>gtkdoc-mkpdf</application> aplikazioak XML fitxategiak <filename>&lt;package&gt;.pdf</filename> deitutako PDF dokumentu bihurtzen ditu.</para>
          <para><filename class="directory">xml/</filename> eta <filename class="directory">html/</filename> direktorioetako fitxategiak gainidatzi egiten dira beti. Ez dira zuzenean editatu behar.</para>
        </listitem>

        <listitem>
          <para>
            <guilabel>Fixing up cross-references between documents.</guilabel>

            After installing the HTML files,
            <application>gtkdoc-fixxref</application> can be run to fix up any
            cross-references between separate documents. For example, the GTK
            documentation contains many cross-references to types documented in
            the GLib manual.
          </para>
          <para>
            When creating the source tarball for distribution,
            <application>gtkdoc-rebase</application> turns all external links
            into web-links. When installing distributed (pregenerated) docs the
            same application will try to turn links back to local links (where
            those docs are installed).
          </para>
        </listitem>
      </orderedlist>

    </sect1>

    <sect1 id="gettinggtkdoc">
      <title>GTK-Doc eskuratzea</title>

      <sect2 id="requirements">
        <title>Eskakizunak</title>
        <para><guilabel>python 2/3</guilabel> - script nagusiak Python lengoaian daude idatzita.</para>
        <para><guilabel>xsltproc</guilabel> - libxslt liburutegiaren xslt prozesatzailea <ulink url="http://xmlsoft.org/XSLT/" type="http">xmlsoft.org/XSLT/</ulink></para>
        <para><guilabel>docbook-xsl</guilabel> - docbook xsl estilo-orriak <ulink url="http://sourceforge.net/projects/docbook/files/docbook-xsl/" type="http">sourceforge.net/projects/docbook/files/docbook-xsl</ulink></para>
        <para>Hiru hauetako bat: <guilabel>source-highlight</guilabel>, <guilabel>highlight</guilabel> edo <guilabel>vim</guilabel> - aukerakoa - adibideen sintaxia nabarmentzeko erabiltzen da</para>
      </sect2>
    </sect1>

    <sect1 id="aboutgtkdoc">
      <title>GTK-Doc aplikazioari buruz</title>

      <para>
        Historically GTK-Doc was used to generate template files from the sources
        code. These template files could be used by developers to enter the
        API documentation. This approach was rather inconvenient because it
        required to keep the generated files under version control.
        Since GTK-Doc 1.9 it became possible to place all API information
        into source comments, which made the template support obsolete.
        In version 1.26 template support has been removed.
      </para>

      <para>(ZUZENTZEKO)</para>

      <para>(egileak, web orriak, posta-zerrendak, lizentzia, etorkizuneko planak, konparazioa antzeko beste sistema batzuekin.)</para>

    </sect1>

    <sect1 id="aboutthismanual">
      <title>Eskuliburu honi buruz</title>

      <para>(ZUZENTZEKO)</para>

      <para>(norentzat den, zer dagoen hemen, lizentzia)</para>

    </sect1>

  </chapter>

  <chapter id="settingup">
    <title>Proiektuaren konfigurazioa</title>

    <para>Kapitulu honetan, GTK-Doc zure proiektuan integratzeko eman behar diren urratsak deskribatu dira. GTK-DOC proiektu batean integratzeko, honakoak egin behar dira:</para>

    <itemizedlist>
      <listitem>
        <para>
          Preparation of the directory structure and creating required
          configuration files for your GTK-Doc documentation (see
          <link linkend="settingup_docfiles">
            Setting up a skeleton documentation</link>).
        </para>
      </listitem>
      <listitem>
        <para>
          Adjusting the build system to build your documentation using the
          GTK-Doc tools. Multiple build systems are supported, in
          this manual we describe how to integrate GTK-Doc with
          <link linkend="settingup_autotools">Autotools</link>,
          <link linkend="settingup_cmake">CMake</link>, and
          <link linkend="settingup_plain_makefiles">plain Makefiles</link>.
        </para>
      </listitem>
      <listitem>
        <para>GTK-Doc fitxategi espezifikoak bertsio-kontrolari gehitu eta zein fitxategiri ez ikusiarena egingo zaien erabaki  (ikus <link linkend="settingup_vcs">Integrazioa bertsio-kontrolerako sistemekin</link>).</para>
      </listitem>
    </itemizedlist>

    <para>
      The following sections assume we work on a project called
      <code>meep</code>.
      This project contains two packages (or modules),
      a library called <code>libmeep</code> and an end-user app
      called <code>meeper</code>.
    </para>

    <sect1 id="settingup_docfiles">
      <title>Dokumentuazioaren muina konfiguratzea</title>

      <para>
        A common convention is to place documentation into a folder called
        <code>docs</code> inside your top-level project directory.
        We usually distinguish between <emphasis>reference
        documentation</emphasis> intended for developers and an
        <emphasis>user manual</emphasis> intended for end-users.
        Again the convention is to have separate folders for both.
        We usually place the reference documentation in a folder named
        <code>reference</code> and the end-user manual in a folder named
        <code>help</code> as.

        According to the above convention the documentation for our
        <code>libmeep</code> package would be placed into:
        <code>docs/reference/libmeep</code>.

        For packages with just one library or application
        the documentation could also be placed directly into
        <code>docs/reference</code>.

        It is not mandatory to use the above convention, but if you
        choose to use a different directory structure you must adjust
        your build system configuration to match your directory
        structure.
      </para>

      <para>Hurrengo atalerako, gure <emphasis>meep</emphasis> proiektuaren direktorio-egiturak goiko konbentzioak darabiltzala onartuko dugu. <example>
          <title><emphasis>meep</emphasis> proiektuaren adibideko direktorio-egitura</title>
          <programlisting>
meep/
  docs/
    reference/  # erreferentziako dokumentazioa
      libmeep/
      meeper/
    help/       # aukerakoa: erabiltzailearen eskuliburua
      meeper/
  src/
    libmeep/
    meeper/
</programlisting>
        </example></para>
    </sect1>

    <sect1 id="settingup_autotools">
      <title>Integrazioa Autotools tresnarekin</title>
      <para>GTK-Doc autotools tresnetan oinarritutako eraikuntza-sistema batean integratzeko honako urratsak eman behar dira:</para>
      <itemizedlist>
        <listitem>
          <para>Ziurtatu <application>gtkdocize</application> aplikazioa behin exekutatzen dela <filename>configure</filename> script-aren aurretik. <filename>autogen.sh</filename> script bat badago, doitu hura GTK-Doc bilatu dezan eta gehitu <application>gtkdocize</application> aplikazioaren dei bat.</para>

          <para>
            The main purpose of <application>gtkdocize</application> is to
            make the <filename>gtk-doc.make</filename> Makefile and the
            <filename>gtk-doc.m4</filename> macro definition file available
            to the build system, either by copying or linking it
            into the project.
          </para>
        </listitem>
        <listitem>
          <para>
            Add the necessary <application>autoconf</application> macros to
            <filename>configure.ac</filename> to enable GTK-Doc in your build
            system to allow configuration of GTK-Doc via the generated
            <filename>configure</filename> script.
          </para>
          <para>
            Among others with registers the <code>--enable-gtk-doc</code>
            option with the <filename>configure</filename> script.
          </para>
        </listitem>
        <listitem>
          <para>
            Create an <application>automake</application> script for each
            application or library in your project. In the example used in this
            documentation this step applies to both <code>meeper</code> and
            <code>libmeep</code>.
          </para>
        </listitem>
      </itemizedlist>

      <para>
        In the following sections, we will perform the above steps in reverse
        order. We start with the <application>automake</application> scripts
        and work our way up to <filename>configure.ac</filename> and
        <filename>autogen.sh</filename>.
        Then we show how enable Gtk-Doc in the build system and
        how to build the documentation.
      </para>

      <sect2 id="settingup_automake">
        <title>Integrazioa automake tresnarekin</title>

        <para>
          First copy the <filename>Makefile.am</filename> from the
          <filename class="directory">examples</filename> sub-directory of the
          <ulink url="https://gitlab.gnome.org/GNOME/gtk-doc/raw/master/examples/Makefile.am">
            gtkdoc-sources</ulink>
          to your project's reference documentation directory (e.g.
          <filename class="directory">docs/reference/&lt;package&gt;</filename>).
          A local copy should be available under e.g.
          <filename>/usr/share/doc/gtk-doc-tools/examples/Makefile.am</filename>.
          If you have multiple packages repeat this for each one.
        </para>

        <note>
          <simpara>
            Do not forget to add each <filename>Makefile.am</filename>
            to the <function>AC_CONFIG_FILES</function> macro in
            <filename>configure.ac</filename>. For
            <filename>docs/reference/libmeep/Makefile.am</filename> you will
            need to add the entry
            <filename>docs/reference/libmeep/Makefile</filename>
            to <function>AC_CONFIG_FILES</function>.
          </simpara>
        </note>

        <example>
          <title>
            Example directory structure with <filename>Makefiles.am</filename>
          </title>
          <programlisting>
meep/
  docs/
    reference/  # erreferentziako dokumentazioa
      libmeep/
        Makefile.am
      meeper/
        Makefile.am
    help/       # aukerakoa: erabiltzaile-eskuliburua
      meeper/
  src/
    libmeep/
    meeper/
</programlisting>
        </example>

        <para>
          Next, you need to customize the copied Makefiles
          and provide values for the various parameters in each
          <filename>Makefile.am</filename>.

          All settings have a comment above them that describes their purpose
          and how to customize the setting.

          Most settings are used to supply extra flags to the respective tools
          to which they apply. Every tool
          has a variable of the form <option>&lt;TOOLNAME&gt;_OPTIONS</option>
          (e.g. the tool <application>gtkdoc-mkhtml</application> has
          an option named <code>MKHTML_OPTIONS</code>).

          All the tools support <option>--help</option> to list the supported
          options.
        </para>

        <para>Hurrengo zerrendak aukerarik nabarmenenak azaltzen ditu. Begiratu <filename>Makefile.am</filename> adibidea aukera gehiago ezagutzeko. <itemizedlist>
            <listitem>
              <para><option>DOC_MODULE</option> aukera erabiltzen da dokumentatzen ari den paketearen izena emateko (adibidez <code>meeper</code> edo <code>libmeep</code>).</para>
            </listitem>
            <listitem>
              <para>
                <option>DOC_SOURCE_DIR</option>
                is used to specify the location
                of source directory which GTK-Doc searches for your API
                documentation. This will usually be
                <code>
                  DOC_SOURCE_DIR=$(top_srcdir)/src
                </code>
                or a sub-directory of that directory.
              </para>
            </listitem>

            <listitem>
              <para>
                <option>HFILE_GLOB</option>
                and
                <option>CFILE_GLOB</option>
                are used for dependencies. Each option take a file-glob (e.g.
                <code>HFILE_GLOB=$(top_srcdir)/src/*.c</code>).
                The documentation will be rebuilt if any of the matched files
                change.
              </para>
            </listitem>

            <listitem>
              <para>
                <option>EXTRA_HFILES</option>
                allows to specify extra header files
                to include when scanning for API documentation, which are not
                found under <code>DOC_SOURCE_DIR</code> (e.g. <code>
                EXTRA_HFILES=$(top_srcdir}/contrib/extra.h</code>).
              </para>
            </listitem>

            <listitem>
              <para>
                <option>IGNORE_HFILES</option>
                allows to specify header files
                or directories to ignore when scanning for API documentation.
                Use the basename of the file or directory (e.g. <code>
                IGNORE_HFILES=gtkdebug.h gtkintl.h private_code_folder</code>).
              </para>
            </listitem>

            <listitem>
              <para>
                <option>HTML_IMAGES</option>
                allows to specify images files which
                will be copied into the <filename>html/</filename> directory of
                the generated documentation.
                If your API documentation includes any images they need to be
                added to this
                option (e.g. <code>
                HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png</code>).
              </para>
            </listitem>

            <listitem>
              <para>
                <option>content_files</option>
                allows to specify extra files
                that are included by
                <code>$(DOC_MAIN_SGML_FILE)</code>
                (e.g. <code>
                content_files=running.xml building.xml changes-2.0.xml</code>).
              </para>
            </listitem>

            <listitem>
              <para>
                <option>expand_content_files</option>
                allows to specify files
                where <emphasis>gtk-doc abbreviations</emphasis> such as
                <code>#GtkWidget</code>
                are expanded (e.g. <code>
                expand_content_files=running.xml</code>).
              </para>
            </listitem>
          </itemizedlist></para>

      </sect2>

      <sect2 id="settingup_autoconf">
        <title>Integrazioa autoconf tresnarekin</title>

        <para>
          Integration with <application>autoconf</application> is very simple
          and includes one required step and an additional optional
          (but recommended) step.

          The first step is to add the <function>GTK_DOC_CHECK</function> macro
          to your <filename>configure.ac</filename> script. This registers
          several configure options to enable GTK-Doc and allows you
          to set default arguments for <application>gtkdocize</application>.
        </para>

        <warning>
          <simpara>
            Make sure that the <code>GTK_DOC_CHECK</code> macro is not indented.
            The macro must start at the beginning of the line and should not
            start with whitespace.
          </simpara>
        </warning>

        <para>
          The second step is to add the <code>AC_CONFIG_MACRO_DIR(m4)</code>
          to your <filename>configure.ac</filename>. This is not required
          but helps <application>gtkdocize</application> to automatically copy
          the macro definition (e.g <filename>gtk-doc.m4</filename>) which
          contains the <function>GTK_DOC_CHECK</function> macro to your
          project's macro directory. Without this, the GTK_DOC_CHECK macro
          might not be found and you would need to explicitly tell the
          <application>aclocal</application> tool where to find the macro
          definition file.
        </para>

        <para>
          <example><title>Gutxieneko integrazioa autoconf tresnarekin</title>
            <programlisting><![CDATA[
# recommended: set m4 directory
AC_CONFIG_MACRO_DIR(m4)
# optional: register gtk-doc in configure
GTK_DOC_CHECK([1.28])
]]></programlisting>
          </example>
        </para>

        <para>Goiko adibideak funtzionatzen du, baina horretarako garatzaile guztiek gtk-doc instalatuta eduki behar dute. Hobe da dokumentazioaren eraikuntza aukerakoa izan dadin, hurrengo adibidean erakusten den bezala: <example>
            <title>Integrazioa aukerako gtk-doc mendekotasunarekin</title>
            <programlisting><![CDATA[
m4_ifdef([GTK_DOC_CHECK], [
# recommended: set m4 directory
AC_CONFIG_MACRO_DIR(m4)
# optional: register gtk-doc in configure
GTK_DOC_CHECK([1.28])
],[
AM_CONDITIONAL([ENABLE_GTK_DOC], false)
])
]]></programlisting>
          </example></para>

        <para>
          The first argument is used to check for the Gtk-Doc version at
          configure time. The 2nd, optional argument is used by
          <application>gtkdocize</application>.
          The <symbol>GTK_DOC_CHECK</symbol> macro also adds several configure
          switches:
        </para>

        <orderedlist>
          <listitem><para>--with-html-dir=PATH : instalatutako dokumentuen bide-izena</para></listitem>
          <listitem><para>--enable-gtk-doc : erabili gtk-doc dokumentazioa eraikitzeko [lehenetsia=ez]</para></listitem>
          <listitem><para>--enable-gtk-doc-html : eraiki dokumentazioa HTML formatuan [lehenetsia=bai]</para></listitem>
          <listitem><para>--enable-gtk-doc-pdf : eraiki dokumentazioa PDF formatuan [lehenetsia=ez]</para></listitem>
        </orderedlist>

        <important>
          <para>
            GTK-Doc is disabled by default! Remember to pass the option
            <option>'--enable-gtk-doc'</option> to the next
            <filename>configure</filename> run. Otherwise pregenerated documentation is installed
            (which makes sense for users but not for developers).
          </para>
        </important>

        <para>
          After all changes to <filename>configure.ac</filename> are made,
          update the <filename>configure</filename> file. This can be done by
          re-running <code>autogen.sh</code>.
        </para>
      </sect2>

      <sect2 id="settingup_autogen">
        <title>Integrazioa autogen tresnarekin</title>

        <para>
          Most projects will have an <filename>autogen.sh</filename> script to
          setup the build infrastructure after the project was checked out from
          a version control system (such as git or svn). GTK-Doc comes with a
          script called <application>gtkdocize</application> which can be used
          to copy the necessary files needed by Gtk-Doc to the source directory.
        </para>

        <para>autoreconf, autoheader, automake edo autoconf aurretik exekutatu beharko litzateke.</para>

        <para>
          <example><title>gtkdocize exekutatzea autogen.sh script-etik</title>
            <programlisting>
gtkdocize || exit 1
</programlisting>
          </example>
        </para>

        <para>
          <example>
            <title>Conditionally run gtkdocize from autogen.sh</title>
            <programlisting>
GTKDOCIZE=$(which gtkdocize 2&gt;/dev/null)
if test $? -ne 0; then
  echo "Ez da gtk-doc euskarririk aurkitu. Ezin dituzu dokumentuak eraiki."
else
  $GTKDOCIZE || exit 1
fi
</programlisting>
          </example>
        </para>

        <para><application>gtkdocize</application> exekutatzean, <filename>gtk-doc.make</filename> zure proiektuaren errora (edo <option>--docdir</option> aukerarekin zehaztutako edozein direktoriora) kopiatzen du.</para>

        <para>
          <application>gtkdocize</application> checks your
          <filename>configure.ac</filename> script for
          the <function>GTK_DOC_CHECK</function> macro.
          The <function>GTK_DOC_CHECK</function> macro can be used to pass
          extra arguments to the <application>gtkdocize</application> script.
          the 2nd parameter in the <function>GTK_DOC_CHECK</function> macro.
        </para>

        <para>
          Alternatively, additional arguments can also be passed to
          <application>gtkdocize</application> via the
          <function>GTKDOCIZE_FLAGS</function> environment variable, or by
          directly specifying them to <application>gtkdocize</application>
          in <filename>autogen.sh</filename>.
        </para>

      </sect2>

      <sect2 id="settingup_firstrun">
        <title>GTK-Doc eraikitze-sistematik exekutatzea</title>

        <para>
          After the previous steps it's time to run the build. First we need to
          rerun <filename>autogen.sh</filename>. If this script runs configure
          for you, then give it the <option>--enable-gtk-doc</option> option.
          Otherwise manually run <filename>configure</filename> with this option
          afterwards.
        </para>
        <para>
          The first make run generates several additional files in the doc-directories.
          The important ones are:
          <filename>&lt;package&gt;.types</filename>,
          <filename>&lt;package&gt;-docs.xml</filename> (in the past .sgml),
          <filename>&lt;package&gt;-sections.txt</filename>.
        </para>
        <para>
          <example><title>Dokumentazioaren eraikitzea exekutatzea</title>
            <programlisting>
./autogen.sh --enable-gtk-doc
make
</programlisting>
          </example>
        </para>

        <para>
          Now you can point your browser to
          <filename>docs/reference/&lt;package&gt;/index.html</filename>.
          With this initial setup you will only see a very simple document.
          The next chapter will teach you how to add API documentation to your
          code via special comment blocks. The Chapter afterwards introduces
          <link linkend="metafiles">additional files</link> and shows how to
          edit the <link linkend="metafiles_master">master template</link> to
          add additional chapters and sections to your documentation files.
        </para>

      </sect2>

    </sect1>

    <sect1 id="settingup_cmake">
      <title>Integrazioa CMake eraikitze-sisemarekin</title>

      <para>
        GTK-Doc now provides a <filename>GtkDocConfig.cmake</filename> module
        (and the corresponding <filename>GtkDocConfigVersion.cmake</filename>
        module). This provides a <literal>gtk_doc_add_module</literal>
        command that you can set in your <filename>CMakeLists.txt</filename>
        file.
      </para>

      <para>Hurrengo adibideak komando hau nola erabili erakusten du. <example><title>GTK-Doc aplikazioa CMake-tik nola erabili erakusten duen adibidea</title>
          <programlisting><![CDATA[
find_package(GtkDoc 1.25 REQUIRED)

# Create the doc-libmeep target.
gtk_doc_add_module(
   libmeep ${CMAKE_SOURCE_DIR}/libmeep
      XML meep-docs.xml
      LIBRARIES libmeep
)

# Build doc-libmeep as part of the default target. Without this, you would
# have to explicitly run something like `make doc-libmeep` to build the docs.
add_custom_target(documentation ALL DEPENDS doc-libmeep)

# Install the docs. (This assumes you're using the GNUInstallDirs CMake module
# to set the CMAKE_INSTALL_DOCDIR variable correctly).
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/libmeep/html
        DESTINATION ${CMAKE_INSTALL_DOCDIR})
]]></programlisting>
        </example></para>
    </sect1>

    <sect1 id="settingup_plain_makefiles">
      <title>Integrazioa makefile soilekin edo beste eraikitze-sistema batzuekin</title>

      <para>
        In the case one does not want to use automake and therefore
        <filename>gtk-doc.mak</filename> one will need to call the gtkdoc tools
        in the right order in own makefiles (or other build tools).
      </para>

      <para>
        <example><title>Dokumentazioa eraikitzeko urratsak</title>
          <programlisting>
DOC_MODULE=meep
// sources have changed
gtkdoc-scan - module=$(DOC_MODULE) &lt;source-dir&gt;
gtkdoc-scangobj - module=$(DOC_MODULE)
gtkdoc-mkdb - module=$(DOC_MODULE) --output-format=xml --source-dir=&lt;source-dir&gt;
// xml files have changed
mkdir html
cd html &amp;&amp; gtkdoc-mkhtml $(DOC_MODULE) ../meep-docs.xml
gtkdoc-fixxref - module=$(DOC_MODULE) - module-dir=html
</programlisting>
        </example>
      </para>

      <para>
        One will need to look at the <filename>Makefile.am</filename> and
        <filename>gtk-doc.mak</filename> to pick the extra options needed.
      </para>
    </sect1>

    <sect1 id="settingup_vcs">
      <title>Integrazioa bertsioen kontroleko sistemekin</title>

      <para>
        As a rule of thumb, it's the files you edit which should go under
        version control. For typical projects it's these files:
        <filename>&lt;package&gt;.types</filename>,
        <filename>&lt;package&gt;-docs.xml</filename> (in the past .sgml),
        <filename>&lt;package&gt;-sections.txt</filename>,
        <filename>Makefile.am</filename>.
      </para>
      <para>
        Files in the <filename>xml/</filename> and <filename>html/</filename>
        directories should not go under version control. Neither should any of
        the <filename>.stamp</filename> files.
      </para>
    </sect1>

  </chapter>

  <chapter id="documenting">
    <title>Kodea dokumentatzea</title>

    <para>
      GTK-Doc uses source code comment with a special syntax for code documentation.
      Further it retrieves information about your project structure from other
      sources. During the next section you will find all information about the
      syntax of the comments.
    </para>

    <para>
      The GTK-Doc scanner can handle the majority of C headers fine. In the
      case of receiving warnings from the scanner that look like a special
      case, one can hint GTK-Doc to skip over them.
      <example><title>GTK-Doc comment block</title>
        <programlisting><![CDATA[
#ifndef __GTK_DOC_IGNORE__
/* unparseable code here */
#endif
]]></programlisting>
      </example>
    </para>

    <note>
      <title>Mugak</title>
      <para>Kontuan izan GTK-Doc aplikazioak <code>#ifndef(__GTK_DOC_IGNORE__)</code> onartzen duela baina ez <code>#if !defined(__GTK_DOC_IGNORE__)</code> edo beste konbinazio batzuk.</para>
    </note>

    <!--  -->

    <sect1 id="documenting_syntax">
      <title>Dokumentazio-iruzkinak</title>

      <para>'*' ikur batekin hasten den lerro anitzeko iruzkin batek GTK-Doc tresnek prozesatu behar duten dokumentazio-bloke bat markatzen du. <example><title>GTK-Doc iruzkin-blokea</title>
          <programlisting>
/**
 * identifikatzailea:
 * dokumentazioa ...
 */
</programlisting>
        </example></para>

      <para>
        The 'identifier' is one line with the name of the item the comment is
        related to. The	syntax differs a little depending on the item.
        (TODO add table showing identifiers)
      </para>

      <para>
        The 'documentation' block is also different for each symbol type. Symbol
        types that get parameters such as functions or macros have the parameter
        description first followed by a blank line (just a '*').
        Afterwards follows the detailed description. All lines (outside program
        listings and CDATA sections) just containing a ' *' (blank-asterisk) are
        converted to paragraph breaks.
        If you don't want a paragraph break, change that into ' *  '
        (blank-asterisk-blank-blank). This is useful in preformatted text (code
        listings).
      </para>

      <tip>
        <para>Kodea dokumentatzean, erabili bi ikuspegi: <itemizedlist>
             <listitem>
               <para>Zer den: Klase edo funtzio baten izena zenbaitetan nahasgarria izan daiteke beste esperientzia bat duen jendearentzat.</para>
             </listitem>
             <listitem>
               <para>Zer egiten duen: Azaldu erabilera arruntenak. Erlazionatu beste APIekin.</para>
             </listitem>
           </itemizedlist></para>
      </tip>

      <para>
        One advantage of hyper-text over plain-text is the ability to have links
        in the document. Writing the correct markup for a link can be tedious
        though. GTK-Doc comes to help by providing several useful abbreviations.
        <itemizedlist>
          <listitem>
            <para>
              Use function() to refer to functions or macros which take arguments.
            </para>
          </listitem>
          <listitem>
            <para>
              Use @param to refer to parameters. Also use this when referring to
              parameters of other functions, related to the one being described.
            </para>
          </listitem>
          <listitem>
            <para>
              Use %constant to refer to a constant, e.g. %G_TRAVERSE_LEAFS.
            </para>
          </listitem>
          <listitem>
            <para>
              Use #symbol to refer to other types of symbol, e.g. structs and
              enums and macros which don't take arguments.
            </para>
          </listitem>
          <listitem>
            <para>
              Use #Object::signal to refer to a GObject signal.
            </para>
          </listitem>
          <listitem>
            <para>
              Use #Object:property to refer to a GObject property.
            </para>
          </listitem>
          <listitem>
            <para>
              Use #Struct.field to refer to a field inside a structure and
              #GObjectClass.foo_bar() to refer to a vmethod.
            </para>
          </listitem>
        </itemizedlist>
      </para>

      <tip>
        <para>
          If you need to use the special characters '&lt;', '&gt;', '()', '@',
          '%', or '#' in your documentation without GTK-Doc changing them you
          can use the XML entities "&amp;lt;", "&amp;gt;", "&amp;lpar;",
          "&amp;rpar;", "&amp;commat;", "&amp;percnt;" and "&amp;num;"
          respectively or escape them with a backslash '\'.
        </para>
      </tip>

      <para>
        DocBook can do more than just links. One can also have lists,
        examples, headings, and images. As of version 1.20, the
        preferred way is to use a subset of the basic text formatting
        syntax called
        <ulink url="http://daringfireball.net/projects/markdown/">Markdown</ulink>.
        On older GTK-Doc versions any documentation that includes
        Markdown will be rendered as is.  For example, list items will
        appear as lines starting with a dash.
      </para>

      <para>
        While markdown is now preferred one can mix both. One limitation here is
        that one can use docbook xml within markdown, but markdown within
        docbook xml is not supported.
      </para>

      <para>
        In older GTK-Doc releases, if you need support for additional
        formatting, you would need to enable the usage of docbook
        XML tags inside doc-comments by putting <option>--xml-mode</option>
        (or <option>--sgml-mode</option>) in the variable
        <symbol>MKDB_OPTIONS</symbol> inside <filename>Makefile.am</filename>.
      </para>

      <para>
        <example><title>GTK-Doc iruzkin-blokea Markdown erabiliz</title>
          <programlisting><![CDATA[
/**
 * identifier:
 *
 * documentation paragraph ...
 *
 * # Sub Heading #
 *
 * ## Second Sub Heading
 *
 * # Sub Heading With a Link Anchor # {#heading-two}
 *
 * more documentation:
 *
 * - list item 1
 *
 *   Paragraph inside a list item.
 *
 * - list item 2
 *
 * 1. numbered list item
 *
 * 2. another numbered list item
 *
 * Another paragraph. [A Link to the GNOME Website](http://www.gnome.org/)
 *
 * ![an inline image](plot-result.png)
 *
 * [A link to the heading anchor above][heading-two]
 *
 * A C-language example:
 * |[<!-- language="C" -->
 * GtkWidget *label = gtk_label_new ("Gorgeous!");
 * ]|
 */
]]></programlisting>
        </example>
      </para>

      <para>
        More examples of what markdown tags are supported can be found in the
        <ulink url="https://wiki.gnome.org/Projects/GTK/DocumentationSyntax/Markdown">GTK Documentation Markdown Syntax Reference</ulink>.
      </para>

      <tip>
        <para>
          As already mentioned earlier GTK-Doc is for documenting public API. Thus
          one cannot write documentation for static symbols. Nevertheless it is good
          to comment those symbols too. This helps other developers to understand
          your code.
          Therefore we recommend to comment these using normal comments (without the
          2nd '*' in the first line).
          If later the function needs to be made public, all one needs to do is to
          add another '*' in the comment block and insert the symbol name at the
          right place inside the sections file.
        </para>
      </tip>
    </sect1>

    <sect1 id="documenting_sections">
      <title>Atalak dokumentatzea</title>

      <para>
        Each section of the documentation contains information about one class
        or module. To introduce the component one can write a section block.
        The short description is also used inside the table of contents.
        All the @fields are optional.
      </para>

      <para>
        <example><title>Atalen iruzkin-blokea</title>
          <programlisting><![CDATA[
/**
 * SECTION:meepapp
 * @short_description: the application class
 * @title: Meep application
 * @section_id:
 * @see_also: #MeepSettings
 * @stability: Stable
 * @include: meep/app.h
 * @image: application.png
 *
 * The application class handles ...
 */
]]></programlisting>
        </example>
      </para>

      <variablelist>
        <varlistentry>
          <term>SECTION:&lt;name&gt;</term>
          <listitem>
            <para>
              The name links the section documentation to the respective part in
              the <filename>&lt;package&gt;-sections.txt</filename> file. The
              name given here should match the &lt;FILE&gt; tag in the
              <filename>&lt;package&gt;-sections.txt</filename> file.
            </para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>@short_description</term>
          <listitem>
            <para>Atala deskribatzen duen lerro bakarreko testua, geroago aurkibidean esteken ondoren eta atal-orriaren goiko aldean agertuko dena.</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>@title</term>
          <listitem>
            <para>
              The section title defaults to &lt;name&gt; from the SECTION
              declaration. It can be overridden with the @title field.
            </para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>@section_id</term>
          <listitem>
            <para>
              Overrides the use of title as a section identifier. For GObjects
              the &lt;title&gt; is used as a section_id and for other sections
              it is &lt;MODULE&gt;-&lt;title&gt;.
            </para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>@see_also</term>
          <listitem>
            <para>Atal honekin erlazioa duten ikurren zerrenda bat.</para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>@stability</term>
          <listitem>
            <para>API honek duen egonkortasun-mailaren deskribapen ez formala. Honako terminoetako bat erabiltzea gomendatzen dugu: <itemizedlist>
                <listitem>
                  <para>
                    Stable
                    - The intention of a Stable interface is to enable arbitrary
                    third parties to develop applications to these interfaces,
                    release them, and have confidence that they will run on all
                    minor releases of the product (after the one in which the
                    interface was introduced, and within the same major release).
                    Even at a major release, incompatible changes are expected
                    to be rare, and to have strong justifications.
                  </para>
                </listitem>
                <listitem>
                  <para>
                    Unstable
                    - Unstable interfaces are experimental or transitional.
                    They are typically used to give outside developers early
                    access to new or rapidly changing technology, or to provide
                    an interim solution to a problem where a more general
                    solution is anticipated.
                    No claims are made about either source or binary
                    compatibility from one minor release to the next.
                  </para>
                </listitem>
                <listitem>
                  <para>Pribatua - GNOMEren pilan bertan erabili daitekeen interfaze bat, amaierako erabiltzaileentzat dokumentatuta ez dagoena. Funtzio horiek modu zehatz eta dokumentatuetan soilik erabili behar dira.</para>
                </listitem>
                <listitem>
                  <para>Barnekoa - Modulu baten barnekoa den interfaze bat, amaierako erabiltzaileentzako dokumentaziorik behar ez duena. Dokumentatu gabe dauden funtzioak barne-erabilerarako direla onartzen da.</para>
                </listitem>
              </itemizedlist></para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>@include</term>
          <listitem>
            <para>
              The <literal>#include</literal> files to show in the section
              synopsis (a comma separated list), overriding the global
              value from the <link linkend="metafiles_sections">section
              file</link> or command line.  This item is optional.
            </para>
          </listitem>
        </varlistentry>
        <varlistentry>
          <term>@image</term>
          <listitem>
            <para>Atal honen erreferentzia-orriaren goiko aldean bistaratuko den irudia. Sarritan, klase baten itxura irudikatzen duen diagrama bat edo beste klase batzuekin duen erlazioen diagrama bat izaten da. Elementu hau aukerakoa da.</para>
          </listitem>
        </varlistentry>
      </variablelist>

      <tip>
        <para>
          To avoid unnecessary recompilation after doc-changes put the section
          docs into the c-source where possible.
        </para>
      </tip>

    </sect1>

    <sect1 id="documenting_symbols">
      <title>Ikurrak dokumentatzea</title>

      <para>
        Each symbol (function, macro, struct, enum, signal and property) is
        documented in a separate block. The block is best placed close to the
        definition of the symbols so that it is easy to keep them in sync.
        Thus functions are usually documented in the c-source and macros,
        structs and enums in the header file.
      </para>

      <sect2><title>Etiketa orokorrak</title>

        <para>Bertsio-informazioa gehitu diezaiekezu dokumentazio-elementu guztiei API bat noiz sortu zen adierazteko, edo zaharkitutzat noiz markatu zen adierazteko.</para>

        <variablelist><title>Bertsio-etiketak</title>
          <varlistentry><term>Noiztik:</term>
            <listitem>
              <para>Kodearen zein bertsiotik hasita APIa erabilgarri dagoen deskribatzen duen testua.</para>
            </listitem>
          </varlistentry>
          <varlistentry><term>Zaharkitua:</term>
            <listitem>
              <para>Funtzioa ez dela gehiagotan erabili behar adierazten duen paragrafoa. Deskribapenak irakurlea API berrira bideratu beharko luke.</para>
            </listitem>
          </varlistentry>
        </variablelist>

        <para>
          You can also add stability information to all documentation elements
          to indicate whether API stability is guaranteed for them for all
          future minor releases of the project.
        </para>

        <para>
          The default stability level for all documentation elements can be set
          by passing the <option>--default-stability</option> argument to
          <application>gtkdoc-mkdb</application> with one of the values below.
        </para>

        <variablelist><title>Egonkortasun-etiketak</title>
          <varlistentry><term>Egonkortasuna: Egonkorra</term>
            <listitem>
              <para>Markatu elementua egonkor gisa. Hori erabiltzen da proiektuaren etorkizuneko bertsio txikietan egonkorra izango diren API publikoetarako da.</para>
            </listitem>
          </varlistentry>
          <varlistentry><term>Egonkortasuna: Desegonkorra</term>
            <listitem>
              <para>Markatu elementua desegonkor gisa. Egonkortu baino lehen aurrebista gisa argitaratzen diren API publikoetarako da.</para>
            </listitem>
          </varlistentry>
          <varlistentry><term>Egonkortasuna: Pribatua</term>
            <listitem>
              <para>Markatu elementua pribatu gisa. Estu lotutako moduluekin erabili daitezkeen interfazeetarako da, ez dituztenak hirugarrenek erabili behar.</para>
            </listitem>
          </varlistentry>
        </variablelist>

        <example><title>Etiketa orokorrak</title>
          <programlisting><![CDATA[
/**
 * foo_get_bar:
 * @foo: some foo
 *
 * Retrieves @foo's bar.
 *
 * Returns: @foo's bar
 *
 * Since: 2.6
 * Deprecated: 2.12: Use foo_baz_get_bar() instead.
 */
Bar *
foo_get_bar(Foo *foo)
{
...
]]></programlisting>
        </example>
      </sect2>

      <sect2><title>Oharpenak</title>

        <para>
          Documentation blocks can contain annotation-tags. These tags will be
          rendered with tooltips describing their meaning. The tags are used by
          GObject Introspection to generate language bindings. A detailed list
          of the supported tags can be found in the
          <ulink url="https://gi.readthedocs.io/en/latest/annotations/giannotations.html" type="http">GObject Introspection documentation</ulink>.
        </para>

        <example><title>Oharpenak</title>
          <programlisting><![CDATA[
/**
 * foo_get_bar: (annotation)
 * @foo: (annotation): some foo
 *
 * Retrieves @foo's bar.
 *
 * Returns: (annotation): @foo's bar
 */
...
/**
 * foo_set_bar_using_the_frobnicator: (annotation) (another annotation)
 *                                    (and another annotation)
 * @foo: (annotation) (another annotation): some foo
 *
 * Sets bar on @foo.
 */
]]></programlisting>
        </example>
      </sect2>

      <sect2><title>Funtzio-iruzkinen blokea</title>

        <para>Gogoratu honakoa: <itemizedlist>
            <listitem>
              <para>
                Document whether returned objects, lists, strings, etc, should be
                freed/unrefed/released.
              </para>
            </listitem>
            <listitem>
              <para>Dokumentatu parametroak NULL izan daitezkeen, eta zer gertatzen den baldin badira.</para>
            </listitem>
            <listitem>
              <para>
                Mention interesting pre-conditions and post-conditions where appropriate.
              </para>
            </listitem>
          </itemizedlist></para>

        <para>Gtk-doc sistemak ulertzen du '_' ikurrarekin hasten diren ikur guztiak (makroak, funtzioak) pribatuak direla. Funtzio estatikotzat hartzen dira. </para>

        <example><title>Funtzio-iruzkinen blokea</title>
          <programlisting><![CDATA[
/**
 * function_name:
 * @par1:  description of parameter 1. These can extend over more than
 * one line.
 * @par2:  description of parameter 2
 * @...: a %NULL-terminated list of bars
 *
 * The function description goes here. You can use @par1 to refer to parameters
 * so that they are highlighted in the output. You can also use %constant
 * for constants, function_name2() for functions and #GtkWidget for links to
 * other declarations (which may be documented elsewhere).
 *
 * Returns: an integer.
 *
 * Since: 2.2
 * Deprecated: 2.18: Use other_function() instead.
 */
]]></programlisting>
        </example>

        <variablelist><title>Funtzio-etiketak</title>
          <varlistentry><term>Itzultzen du:</term>
            <listitem>
              <para>Itzulitako emaitza deskribatzen duen paragrafoa.</para>
            </listitem>
          </varlistentry>
          <varlistentry><term>@...:</term>
            <listitem>
              <para>
                In case the function has variadic arguments, you should use this
                tag (@Varargs: does also work for historic reasons).
              </para>
            </listitem>
          </varlistentry>
        </variablelist>

      </sect2>

      <sect2><title>Propietate-iruzkinen blokea</title>

        <example><title>Propietate-iruzkinen blokea</title>
          <programlisting>
/**
 * TrepetaBat:propietate-bat:
 *
 * Hemen propietate bat dokumentatu dezakezu.
 */
g_object_class_install_property (object_class, PROP_SOME_PROPERTY, ...);
</programlisting>
        </example>

      </sect2>

      <sect2><title>Seinale-iruzkinen blokea</title>

        <para>Gogoratu honakoa: <itemizedlist>
            <listitem>
              <para>Dokumentatu seinalea noiz igortzen den eta beste seinaleen aurretik ala ondoren igortzen den.</para>
            </listitem>
            <listitem>
              <para>Dokumentatu aplikazio batek zer egin behar duen seinale-maneiatzailean.</para>
            </listitem>
          </itemizedlist></para>

        <example><title>Seinale-iruzkinen blokea</title>
          <programlisting><![CDATA[
/**
 * FooWidget::foobarized:
 * @widget: the widget that received the signal
 * @foo: some foo
 * @bar: some bar
 *
 * The ::foobarized signal is emitted each time someone tries to foobarize @widget.
 */
foo_signals[FOOBARIZED] =
  g_signal_new ("foobarized",
                ...
]]></programlisting>
        </example>

      </sect2>

      <sect2><title>Struct comment block</title>
        <example><title>Struct comment block</title>
          <programlisting><![CDATA[
/**
 * FooWidget:
 * @bar: some #gboolean
 *
 * This is the best widget, ever.
 */
typedef struct _FooWidget {
  GtkWidget parent_instance;

  gboolean bar;
} FooWidget;
]]></programlisting>
        </example>

        <para>
          Use <code>/*&lt; private &gt;*/</code> before the private struct fields
          you want to hide. Use <code>/*&lt; public &gt;*/</code> for the reverse
          behaviour.
        </para>

        <para>
          If the first field is "g_iface", "parent_instance" or "parent_class"
          it will be considered private automatically and doesn't need to be
          mentioned in the comment block.
        </para>

        <para>
          Struct comment blocks can also be used for GObjects and GObjectClasses.
          It is usually a good idea to add a comment block for a class, if it has
          vmethods (as this is how they can be documented). For the GObject
          itself one can use the related section docs, having a separate block
          for the instance struct would be useful if the instance has public
          fields. One disadvantage here is that this creates two index entries
          of the same name (the structure and the section).
        </para>

      </sect2>

      <sect2><title>Enumerazioen iruzkin-blokea</title>
        <example><title>Enumerazioen iruzkin-blokea</title>
          <programlisting><![CDATA[
/**
 * Something:
 * @SOMETHING_FOO: something foo
 * @SOMETHING_BAR: something bar
 *
 * Enum values used for the thing, to specify the thing.
 */
typedef enum {
  SOMETHING_FOO,
  SOMETHING_BAR,
  /*< private >*/
  SOMETHING_COUNT
} Something;
]]></programlisting>
        </example>

        <para>
          Use <code>/*&lt; private &gt;*/</code> before the private enum values
          you want to hide. Use <code>/*&lt; public &gt;*/</code> for the reverse
          behaviour.
        </para>

      </sect2>
    </sect1>


    <sect1 id="documenting_inline_program">
      <title>Programa-dokumentazio integratua</title>
      <para>Programak eta haien komando-lerroko interfazeak dokumentazio integratuaren bidez dokumentatu daitezke.</para>

      <variablelist>
      <title>Etiketak</title>

      <varlistentry><term>PROGRAM</term>

      <listitem>
      <para>Programa-dokumentazio baten hasiera definitzen du.</para>
      </listitem>
      </varlistentry>

      <varlistentry>
      <term>@short_description:</term>
      <listitem>
      <para>Programaren deskribapen laburra definitzen du. (Aukerakoa)</para>
      </listitem>
      </varlistentry>

      <varlistentry>
      <term>@synopsis:</term>
      <listitem>
      <para>Programak hartu ditzakeen argumentuak edo argumentuen zerrenda definitzen du. (Aukerakoa)</para>
      </listitem>
      </varlistentry>

      <varlistentry>
      <term>@see_also:</term>
      <listitem>
      <para>Eskuliburuaren 'Ikus halaber' orri-atala. (Aukerakoa)</para>
      </listitem>
      </varlistentry>

      <varlistentry>
      <term>@arg:</term>
      <listitem>
      <para>Programari pasatutako argumentua(k) eta haien deskribapena. (Aukerakoa)</para>
      </listitem>
      </varlistentry>

      <varlistentry>
      <term>Deskribapena:</term>
      <listitem>
      <para>Programaren deskribapen luzeagoa.</para>
      </listitem>
      </varlistentry>

      <varlistentry>
      <term>Itzultzen du:</term>
      <listitem>
      <para>Zehaztu programak itzultzen d(it)uen balioa(k). (Aukerakoa)</para>
      </listitem>
      </varlistentry>

      </variablelist>

      <sect2>
        <title>Programa-dokumentazioaren adibidea.</title>
        <example><title>Programa-dokumentazioaren blokea</title>
        <programlisting><![CDATA[
/**
 * PROGRAM:test-program
 * @short_description: A test program
 * @synopsis: test-program [*OPTIONS*...] --arg1 *arg* *FILE*
 * @see_also: test(1)
 * @--arg1 *arg*: set arg1 to *arg*
 * @--arg2 *arg*: set arg2 to *arg*
 * @-v, --version: Print the version number
 * @-h, --help: Print the help message
 *
 * Long description of program.
 *
 * Returns: Zero on success, non-zero on failure
 */
int main(int argc, char *argv[])
{
	return 0;
}
]]></programlisting>
        </example>

      </sect2>
    </sect1>

    <sect1 id="documenting_docbook">
      <title>DocBook etiketa erabilgarriak</title>

      <para>
        Here are some DocBook tags which are most useful when documenting the
        code.
      </para>

      <para>
        To link to another section in the GTK docs:

        <informalexample>
          <programlisting><![CDATA[
<link linkend="glib-Hash-Tables">Hash Tables</link>
]]></programlisting>
        </informalexample>
        The linkend is the SGML/XML id on the top item of the page you want to link to.
        For most pages this is currently the part ("gtk", "gdk", "glib") and then
        the page title ("Hash Tables"). For widgets it is just the class name.
        Spaces and underscores are converted to '-' to conform to SGML/XML.
      </para>

      <para>Kanpoko funtzio bati, adibidez C funtzio estandar bati, erreferentzia egiteko: <informalexample>
          <programlisting>
&lt;function&gt;...&lt;/function&gt;
</programlisting>
        </informalexample></para>

      <para>
        To include example code:
        <informalexample>
          <programlisting><![CDATA[
<example>
  <title>Using a GHashTable.</title>
  <programlisting language="C">
      ...
  </programlisting>
</example>
]]></programlisting>
        </informalexample>
        or possibly this, for very short code fragments which don't need a title:
        <informalexample>
          <programlisting><![CDATA[
<informalexample>
  <programlisting language="C">
  ...
  </programlisting>
</informalexample>
]]></programlisting>
        </informalexample>
        In both cases, the language attribute is optional and is used as a hint
        to the syntax highlighting engine (pygments for html output).
        For the latter GTK-Doc also supports an abbreviation:
        <informalexample>
          <programlisting><![CDATA[
|[<!-- language="C" -->
  ...
]|
]]></programlisting>
        </informalexample>
      </para>

      <para>Buletdun zerrendak sartzeko: <informalexample>
          <programlisting>
&lt;itemizedlist&gt;
  &lt;listitem&gt;
    &lt;para&gt;
      ...
    &lt;/para&gt;
  &lt;/listitem&gt;
  &lt;listitem&gt;
    &lt;para&gt;
      ...
    &lt;/para&gt;
  &lt;/listitem&gt;
&lt;/itemizedlist&gt;
</programlisting>
        </informalexample></para>

      <para>
        To include a note which stands out from the text:
        <informalexample>
          <programlisting><![CDATA[
<note>
  <para>
    Make sure you free the data after use.
  </para>
</note>
]]></programlisting>
        </informalexample>
      </para>

      <para>Mota bati erreferentzia egiteko: <informalexample>
          <programlisting>
&lt;type&gt;sinatu gabeko karakterea&lt;/type&gt;
</programlisting>
        </informalexample></para>

      <para>Kanpoko egitura bati (ez GTK dokumentuetan deskribatutako bati) erreferentzia egiteko: <informalexample>
          <programlisting>
&lt;structname&gt;XFontStruct&lt;/structname&gt;
</programlisting>
        </informalexample></para>

      <para>Egitura baten eremu bati erreferentzia egiteko: <informalexample>
          <programlisting>
&lt;structfield&gt;len&lt;/structfield&gt;
</programlisting>
        </informalexample></para>

      <para>
        To refer to a class name, we could possibly use:
        <informalexample>
          <programlisting><![CDATA[
<classname>GtkWidget</classname>
]]></programlisting>
        </informalexample>
        but you'll probably be using #GtkWidget instead (to automatically create
        a link to the GtkWidget page - see <link linkend="documenting_syntax">the abbreviations</link>).
      </para>

      <para>Testua nabarmentzeko: <informalexample>
          <programlisting>
&lt;emphasis&gt;Hau garrantzitsua da&lt;/emphasis&gt;
</programlisting>
        </informalexample></para>

      <para>Fitxategi-izenetarako, erabili: <informalexample>
          <programlisting>
&lt;filename&gt;/home/user/documents&lt;/filename&gt;
</programlisting>
        </informalexample></para>

      <para>Teklei erreferentzia egiteko, erabili: <informalexample>
          <programlisting>
&lt;keycombo&gt;&lt;keycap&gt;Control&lt;/keycap&gt;&lt;keycap&gt;L&lt;/keycap&gt;&lt;/keycombo&gt;
</programlisting>
        </informalexample></para>

    </sect1>
  </chapter>

  <chapter id="metafiles">
    <title>Fitxategi gehigarriak betetzea</title>

    <para>
      There are a couple of extra files, that need to be maintained along with
      the inline source code comments:
      <filename>&lt;package&gt;.types</filename>,
      <filename>&lt;package&gt;-docs.xml</filename> (in the past .sgml),
      <filename>&lt;package&gt;-sections.txt</filename>.
    </para>

    <sect1 id="metafiles_types">
      <title>Moten fitxategia editatzea</title>

      <para>
        If your library or application includes GObjects, you want
        their signals, arguments/parameters and position in the hierarchy to be
        shown in the documentation. All you need to do, is to list the
        <function>xxx_get_type</function> functions together with their include
        inside the <filename>&lt;package&gt;.types</filename> file.
      </para>

      <para>
        <example><title>&lt;Pakete&gt;.moten adibideko fitxategia</title>
          <programlisting>
#include &lt;gtk/gtk.h&gt;

gtk_accel_label_get_type
gtk_adjustment_get_type
gtk_alignment_get_type
gtk_arrow_get_type
</programlisting>
        </example>
      </para>

      <para>
        Since GTK-Doc 1.8 <application>gtkdoc-scan</application> can generate this list for you.
        Just add "--rebuild-types" to SCAN_OPTIONS in <filename>Makefile.am</filename>. If you
        use this approach you should not dist the types file nor have it under version control.
      </para>

    </sect1>

    <sect1 id="metafiles_master">
      <title>Dokumentu maisua editatzea</title>

      <para>
        GTK-Doc produces documentation in DocBook SGML/XML. When processing the
        inline source comments, the GTK-Doc tools generate one documentation
        page per class or module as a separate file. The master document
        includes them and place them in an order.
      </para>

      <para>
        While GTK-Doc creates a template master document for you, later runs will
        not touch it again. This means that one can freely structure the
        documentation. That includes grouping pages and adding extra pages.
        GTK-Doc has now a test suite, where also the master-document is recreated from scratch.
        Its a good idea to look at this from time to time to see if there are
        some new goodies introduced there.
      </para>

      <tip>
        <para>
          Do not create tutorials as extra documents. Just write extra chapters.
          The benefit of directly embedding the tutorial for your library into
          the API documentation is that it is easy to link for the tutorial to
          symbol documentation. Apart chances are higher that the tutorial gets
          updates along with the library.
        </para>
      </tip>

      <para>Beraz, zein dira dokumentu maisuaren barruan aldatu behar diren gauzak? Hasteko, ezer gutxi. Badaude zenbait leku-marka (kortxete barruan dauden testuak), horiek zaindu behar dituzu.</para>

      <para>
        <example><title>Dokumentu maisuaren goiburua</title>
          <programlisting><![CDATA[
<bookinfo>
  <title>MODULENAME Reference Manual</title>
  <releaseinfo>
    for MODULENAME [VERSION]
    The latest version of this documentation can be found on-line at
    <ulink role="online-location" url="http://[SERVER]/MODULENAME/index.html">http://[SERVER]/MODULENAME/</ulink>.
  </releaseinfo>
</bookinfo>

<chapter>
  <title>[Insert title here]</title>
]]></programlisting>
        </example>
      </para>

      <para>Horrez gain, iruzkin modura sortzen diren aukerako elementu gutxi batzuk daude. Errepasatu horiek eta gaitu nahieran.</para>

      <para>
        <example><title>Dokumentu maisuaren aukerako atala</title>
          <programlisting>
  &lt;!-- gaitu hau gobject introskpekzio-oharrak erabiltzen dituzunean
  &lt;xi:include href="xml/annotation-glossary.xml"&gt;&lt;xi:fallback /&gt;&lt;/xi:include&gt;
  --&gt;
</programlisting>
        </example>
      </para>

      <para>
        Finally you need to add new section whenever you introduce one. The
        <link linkend="modernizing-gtk-doc-1-16">gtkdoc-check</link> tool will
        remind you of newly generated xml files that are not yet included into
        the doc.
      </para>

      <para>
        <example><title>Sortutako atalak sartzea</title>
          <programlisting>
  &lt;kapitulua&gt;
    &lt;izenburua&gt;nire liburutegia&lt;/title&gt;
      &lt;xi:include href="xml/object.xml"/&gt;
      ...
</programlisting>
        </example>
      </para>

    </sect1>

    <sect1 id="metafiles_sections">
      <title>Atalen fitxategia editatzea</title>

      <para>
        The section file is used to organise the documentation output by
        GTK-Doc. Here one specifies which symbol belongs to which module or
        class and control the visibility (public or private).
      </para>

      <para>
        The section file is a plain text file with tags delimiting sections.
        Blank lines are ignored and lines starting with a '#' are treated as
        comment lines.
      </para>

      <note>
        <para>
          While the tags make the file look like xml, it is not. Please do not
          close tags like &lt;SUBSECTION&gt;.
        </para>
      </note>

      <para>
        <example><title>Sortutako atalak sartzea</title>
          <programlisting><![CDATA[
<INCLUDE>libmeep/meep.h</INCLUDE>

<SECTION>
<FILE>meepapp</FILE>
<TITLE>MeepApp</TITLE>
MeepApp
<SUBSECTION Standard>
MEEP_APP
...
MeepAppClass
meep_app_get_type
</SECTION>
]]></programlisting>
        </example>
      </para>

      <para>
        The &lt;FILE&gt; ... &lt;/FILE&gt; tag is used to specify the file name,
        without any suffix. For example, using '&lt;FILE&gt;gnome-config&lt;/FILE&gt;'
        will result in the section declarations being output in the template
        file <filename>tmpl/gnome-config.sgml</filename>, which will be
        converted into the DocBook XML file <filename>xml/gnome-config.sgml</filename>
        or the DocBook XML file <filename>xml/gnome-config.xml</filename>.
        (The name of the HTML file is based on the module name and the section
        title, or for GObjects it is based on the GObjects class name converted
        to lower case).
      </para>

      <para>
        The &lt;TITLE&gt; ... &lt;/TITLE&gt; tag is used to specify the title of
        the section. It is only useful before the templates (if used) are
        initially created, since the title set in the template file overrides
        this. Also if one uses SECTION comment in the sources, this is obsolete.
      </para>

      <para>
        You can group items in the section by using the &lt;SUBSECTION&gt; tag.
        Currently it outputs a blank line between subsections in the synopsis
        section.
        You can also use &lt;SUBSECTION Standard&gt; for standard GObject
        declarations (e.g. the functions like g_object_get_type and macros like
        G_OBJECT(), G_IS_OBJECT() etc.).
        Currently these are left out of the documentation.
        You can also use &lt;SUBSECTION Private&gt; for private declarations
        which will not be output (it is a handy way to avoid warning messages
        about unused declarations).
        If your library contains private types which you don't want to appear in
        the object hierarchy and the list of implemented or required interfaces,
        add them to a Private subsection.
        Whether you would place GObject and GObjectClass like structs in public
        or Standard section depends if they have public entries (variables,
        vmethods).
      </para>

      <para>
        You can also use &lt;INCLUDE&gt; ... &lt;/INCLUDE&gt; to specify the
        #include files which are shown in the synopsis sections.
        It contains a comma-separate list of #include files, without the angle
        brackets. If you set it outside of any sections, it acts for all
        sections until the end of the file. If you set it within a section, it
        only applies to that section.
      </para>

    </sect1>

  </chapter>

  <chapter id="reports">
    <title>Emaitza kontrolatzea</title>

    <para>
      A GTK-Doc run generates report files inside the documentation directory.
      The generated files are named:
      <filename>&lt;package&gt;-undocumented.txt</filename>,
      <filename>&lt;package&gt;-undeclared.txt</filename> and
      <filename>&lt;package&gt;-unused.txt</filename>.
      All those are plain text files that can be viewed and postprocessed easily.
    </para>

    <para>
      The <filename>&lt;package&gt;-undocumented.txt</filename> file starts with
      the documentation coverage summary. Below are two sections divided by
      blank lines. The first section lists undocumented or incomplete symbols.
      The second section does the same for section docs. Incomplete entries are
      those, which have documentation, but where e.g. a new parameter has been
      added.
    </para>

    <para>
      The <filename>&lt;package&gt;-undeclared.txt</filename> file lists symbols
      given in the <filename>&lt;package&gt;-sections.txt</filename> but not
      found in the sources. Check if they have been removed or if they are
      misspelled.
    </para>

    <para>
      The <filename>&lt;package&gt;-unused.txt</filename> file lists symbol
      names, where the GTK-Doc scanner has found documentation, but does not
      know where to put it. This means that the symbol has not yet been added to
      the <filename>&lt;package&gt;-sections.txt</filename> file.
    </para>

    <tip>
      <para>
        Enable or add the <option>TESTS=$(GTKDOC_CHECK)</option> line in Makefile.am.
        If at least GTK-Doc 1.9 is installed, this will run sanity checks during
        <command>make check</command> run.
      </para>
    </tip>

    <para>
      One can also look at the files produced by the source code scanner:
      <filename>&lt;package&gt;-decl-list.txt</filename> and
      <filename>&lt;package&gt;-decl.txt</filename>. The first one can be
      compared with the section file if that is manually maintained. The second
      lists all declarations from the headers. If a symbol is missing one could
      check if this file contains it.
    </para>

    <para>
      If the project is GObject based, one can also look into the files produced
      by the object scanner:
      <filename>&lt;package&gt;.args.txt</filename>,
      <filename>&lt;package&gt;.hierarchy.txt</filename>,
      <filename>&lt;package&gt;.interfaces.txt</filename>,
      <filename>&lt;package&gt;.prerequisites.txt</filename> and
      <filename>&lt;package&gt;.signals.txt</filename>. If there are missing
      symbols in any of those, one can ask GTK-Doc to keep the intermediate
      scanner file for further analysis, by running it as
      <command>GTK_DOC_KEEP_INTERMEDIATE=1 make</command>.
    </para>
  </chapter>

  <chapter id="modernizing">
    <title>Dokumentazioa modernizatzea</title>

    <para>
      GTK-Doc has been around for quite some time. In this section we list new
      features together with the version since when it is available.
    </para>

    <sect1 id="modernizing-gtk-doc-1-9">
      <title>GTK-Doc 1.9</title>

      <para>
        When using xml instead of sgml, one can actually name the master
        document <filename>&lt;package&gt;-docs.xml</filename>.
      </para>

      <para>
        This version supports <option>SCAN_OPTIONS=--rebuild-sections</option>
        in <filename>Makefile.am</filename>. When this is enabled, the
        <filename>&lt;package&gt;-sections.txt</filename> is autogenerated and
        can be removed from the vcs. This only works nicely for projects that
        have a very regular structure (e.g. each .{c,h} pair will create new
        section). If one organize a project close to that updating a manually
        maintained section file can be as simple as running
        <code>meld &lt;package&gt;-decl-list.txt &lt;package&gt;-sections.txt</code>.
      </para>

      <para>
        Version 1.8 already introduced the syntax for documenting sections in
        the sources instead of the separate files under <filename class="directory">tmpl</filename>.
        This version adds options to switch the whole doc module to not use the
        extra tmpl build step at all, by using <option>--flavour no-tmpl</option>
        in <filename>configure.ac</filename>. If you don't have a <filename class="directory">tmpl</filename>
        checked into your source control system and haven't yet switched, just
        add the flag to <filename>configure.ac</filename> and you are done.
      </para>
    </sect1>

    <sect1 id="modernizing-gtk-doc-1-10">
      <title>GTK-Doc 1.10</title>

      <para>
        This version supports <option>SCAN_OPTIONS=--rebuild-types</option> in
        <filename>Makefile.am</filename>. When this is enabled, the
        <filename>&lt;package&gt;.types</filename> is autogenerated and can be
        removed from the vcs. When using this feature it is important to also
        setup the <varname>IGNORE_HFILES</varname> in
        <filename>Makefile.am</filename> for code that is build conditionally.
      </para>
    </sect1>

    <sect1 id="modernizing-gtk-doc-1-16">
      <title>GTK-Doc 1.16</title>

      <para>
        This version includes a new tool called gtkdoc-check. This tool can run
        a set of sanity checks on your documentation. It is enabled by adding
        these lines to the end of <filename>Makefile.am</filename>.
        <example><title>Enable gtkdoc-check</title>
          <programlisting><![CDATA[
if ENABLE_GTK_DOC
TESTS_ENVIRONMENT = \
  DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \
  SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir)
TESTS = $(GTKDOC_CHECK)
endif
]]></programlisting>
        </example>
      </para>
    </sect1>

    <sect1 id="modernizing-gtk-doc-1-20">
      <title>GTK-Doc 1.20</title>

      <para>
        Version 1.18 brought some initial markdown support. Using markdown in
        doc comments is less intrusive than writing docbook xml. This version
        improves a lot on this and add a lot more styles. The section that
        explains the <link linkend="documenting_syntax">comment syntax</link>
        has all the details.
      </para>
    </sect1>

    <sect1 id="modernizing-gtk-doc-1-25">
      <title>GTK-Doc 1.25</title>

      <para>
        The makefiles shipped with this version generate an entity file at <filename>xml/gtkdocentities.ent</filename>,
        containing entities for e.g. package_name and package_version. You can
        use this e.g. in the main xml file to avoid hardcoding the version
        number. Below is an example that shows how the entity file is included
        in the master template and how the entities are used.
        The entities can also be used in all
        generated files, GTK-Doc will use the same xml header in generated xml
        files.
        <example><title>Use pre-generated entities</title>
          <programlisting><![CDATA[
<?xml version="1.0"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
[
  <!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
  <!ENTITY % gtkdocentities SYSTEM "xml/gtkdocentities.ent">
  %gtkdocentities;
]>
<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
  <bookinfo>
    <title>&package_name; Reference Manual</title>
    <releaseinfo>
      for &package_string;.
      The latest version of this documentation can be found on-line at
      <ulink role="online-location" url="http://[SERVER]/&package_name;/index.html">http://[SERVER]/&package_name;/</ulink>.
    </releaseinfo>
  </bookinfo>
]]></programlisting>
        </example>
      </para>
    </sect1>
  </chapter>

  <chapter id="documenting-others">
    <title>Beste interfaze batzuk dokumentatzea</title>

    <para>
      So far we have been using GTK-Doc to document the API of code. The next
      sections contain suggestions how the tools can be used to document other
      interfaces too.
    </para>

    <sect1 id="commandline-interfaces">
      <title>Komando-lerroko aukerak eta man orriak</title>

      <para>
        As one can generate man pages for a docbook refentry as well, it sounds
        like a good idea to use it for that purpose. This way the interface is
        part of the reference and one gets the man-page for free.
      </para>

      <sect2 id="commandline-interfaces-file">
        <title>Dokumentatu tresna</title>

        <para>
          Create one refentry file per tool. Following
          <link linkend="settingup_docfiles">our example</link> we would call it
          <filename>meep/docs/reference/meeper/meep.xml</filename>. For the xml
          tags that should be used and can look at generated file in the xml
          subdirectory as well as examples e.g. in glib.
        </para>
      </sect2>

      <sect2 id="commandline-interfaces-configure">
        <title>Adding the extra configure check</title>

        <para>
          <example><title>Extra configure checks</title>
            <programlisting><![CDATA[
AC_ARG_ENABLE(man,
              [AC_HELP_STRING([--enable-man],
                              [regenerate man pages from Docbook [default=no]])],enable_man=yes,
              enable_man=no)

AC_PATH_PROG([XSLTPROC], [xsltproc])
AM_CONDITIONAL(ENABLE_MAN, test x$enable_man != xno)
]]></programlisting>
          </example>
        </para>
      </sect2>

      <sect2 id="commandline-interfaces-make">
        <title>Adding the extra makefile rules</title>

        <para>
          <example><title>Extra configure checks</title>
            <programlisting><![CDATA[
man_MANS = \
       meeper.1

if ENABLE_GTK_DOC
if ENABLE_MAN

%.1 : %.xml
        @XSLTPROC@ -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<

endif
endif

BUILT_EXTRA_DIST = $(man_MANS)
EXTRA_DIST += meep.xml
]]></programlisting>
          </example>
        </para>
      </sect2>
    </sect1>

    <sect1 id="dbus-interfaces">
      <title>DBus interfazeak</title>

      <para>
        (FIXME: http://hal.freedesktop.org/docs/DeviceKit/DeviceKit.html,
http://cgit.freedesktop.org/DeviceKit/DeviceKit/tree/doc/dbus)
      </para>
    </sect1>

  </chapter>

  <chapter id="faq">
    <title>Ohiko galderak</title>

    <segmentedlist>
      <?dbhtml list-presentation="list"?>
      <segtitle>Galdera</segtitle>
      <segtitle>Erantzuna</segtitle>
      <seglistitem>
        <seg>Klase-hierarkiarik ez.</seg>
        <seg>
          The objects <function>xxx_get_type()</function> function has not been
          entered into the <filename>&lt;package&gt;.types</filename> file.
        </seg>
      </seglistitem>
      <seglistitem>
        <seg>Klase-hierarkiarik ez oraindik.</seg>
        <seg>
          Missing or wrong naming in <filename>&lt;package&gt;-sections.txt</filename>
          file (see <ulink url="http://mail.gnome.org/archives/gtk-doc-list/2003-October/msg00006.html">explanation</ulink>).
        </seg>
      </seglistitem>
      <seglistitem>
        <seg>Ene, oraindik ez dago klase-hierarkiarik.</seg>
        <seg>
          Is the object name (name of the instance struct, e.g. <type>GtkWidget</type>)
          part of the normal section (don't put this into Standard or Private
          subsections).
        </seg>
      </seglistitem>
      <seglistitem>
        <seg>Ikur-indizerik ez.</seg>
        <seg>
          Does the <filename>&lt;package&gt;-docs.{xml,sgml}</filename> contain a
          index that xi:includes the generated index?
        </seg>
      </seglistitem>
      <seglistitem>
        <seg>Symbols are not linked to their doc-section.</seg>
        <seg>
          Is the doc-comment using the correct markup (added #,% or ())?
          Check if the gtkdoc-fixxref warns about unresolvable xrefs.
        </seg>
      </seglistitem>
      <seglistitem>
        <seg>Klase berri bat ez da agertzen dokumentuetan.</seg>
        <seg>
          Is the new page xi:included from
          <filename>&lt;package&gt;-docs.{xml,sgml}</filename>.
        </seg>
      </seglistitem>
      <seglistitem>
        <seg>Ikur berri bat ez da agertzen dokumentuetan.</seg>
        <seg>
          Is the doc-comment properly formatted. Check for spelling mistakes in
          the begin of the comment. Check if the gtkdoc-fixxref warns about
          unresolvable xrefs. Check if the symbol is correctly listed in the
          <filename>&lt;package&gt;-sections.txt</filename> in a public subsection.
        </seg>
      </seglistitem>
      <seglistitem>
        <seg>Mota bat falta da klaseen hierarkian.</seg>
        <seg>
          If the type is listed in <filename>&lt;package&gt;.hierarchy</filename>
          but not in <filename>xml/tree_index.sgml</filename> then double check
          that the type is correctly placed in the <filename>&lt;package&gt;-sections.txt</filename>.
          If the type instance (e.g. <type>GtkWidget</type>) is not listed or
          incidentally marked private it will not be shown.
        </seg>
      </seglistitem>
      <seglistitem>
        <seg>I get foldoc links for all gobject annotations.</seg>
        <seg>
          Check that <filename>xml/annotation-glossary.xml</filename> is
          xi:included from <filename>&lt;package&gt;-docs.{xml,sgml}</filename>.
        </seg>
      </seglistitem>

      <!-- gtk-doc warnings: -->
      <seglistitem>
        <seg>Parameter described in source code comment block but does not exist</seg>
        <seg>Check if the prototype in the header has different parameter names as in the source.</seg>
      </seglistitem>

      <!-- docbook warnings: -->
      <seglistitem>
        <seg>multiple "IDs" for constraint linkend: XYZ</seg>
        <seg>Symbol XYZ appears twice in <filename>&lt;package&gt;-sections.txt</filename> file.</seg>
      </seglistitem>
      <seglistitem>
        <seg>Element typename in namespace '' encountered in para, but no template matches.</seg>
        <seg/>
      </seglistitem>
    </segmentedlist>
  </chapter>

  <chapter id="contrib">
    <title>Tools related to gtk-doc</title>

    <para>
      GtkDocPlugin - a <ulink url="http://trac-hacks.org/wiki/GtkDocPlugin">Trac GTK-Doc</ulink>
      integration plugin, that adds API docs to a trac site and integrates with
      the trac search.
    </para>
    <para>
      Gtkdoc-depscan - a tool (part of gtk-doc) to check used API against since
      tags in the API to determine the minimum required version.
    </para>

  </chapter>

  <!-- ======== Appendix: FDL ================================== -->
  <!--  
     The GNU Free Documentation License 1.1 in DocBook
     Markup by Eric Baudais <baudais@okstate.edu>
     Maintained by the GNOME Documentation Project
     http://developer.gnome.org/projects/gdp
     Version: 1.0.1
     Last Modified: Nov 16, 2000
-->

<appendix id="fdl">
  <appendixinfo>
    <releaseinfo>1.1 bertsioa, 2000ko martxoa</releaseinfo>
    <copyright>
      <year>2000</year><holder>Free Software Foundation, Inc.</holder>
    </copyright>
    <legalnotice id="fdl-legalnotice">
      <para><address>Free Software Foundation, Inc. <street>51 Franklin Street, 
        Suite 330</street>, <city>Boston</city>, <state>MA</state>  
        <postcode>02110-1301</postcode>  <country>USA</country></address> Edonork egin eta banatu ditzake lizentzia-dokumentu honen kopia literalak, baina debekatuta dago dokumentuan aldaketak egitea.</para>
    </legalnotice>
  </appendixinfo>
  <title>GNU Dokumentazio librearen lizentzia</title>

  <sect1 id="fdl-preamble">
    <title>0.  AITZINSOLASA</title>
    <para>
      The purpose of this License is to make a manual, textbook, or
      other written document <quote>free</quote> in the sense of
      freedom: to assure everyone the effective freedom to copy and
      redistribute it, with or without modifying it, either
      commercially or noncommercially. Secondarily, this License
      preserves for the author and publisher a way to get credit for
      their work, while not being considered responsible for
      modifications made by others.
    </para>
    
    <para>
      This License is a kind of <quote>copyleft</quote>, which means
      that derivative works of the document must themselves be free in
      the same sense. It complements the GNU General Public License,
      which is a copyleft license designed for free software.
    </para>
    
    <para>Lizentzia hau software librearen eskuliburuentzat erabiltzeko diseinatu dugu, izan ere, software libreak dokumentazio librea behar baitu. Programa libre baten eskuliburuak software librearen askatasun berberak izan behar ditu. Baina lizentzia hau ez da software-eskuliburuentzat soilik; edozein testu-lanentzat erabil daiteke, zein gairi buruzkoa den eta liburu gisa inprimatua dagoen ala ez kontuan hartu gabe. Lizentzia hau batez ere gida edo erreferentzia izatea helburu duten lanentzat erabiltzea gomendatzen dugu.</para>
  </sect1>
  <sect1 id="fdl-section1">
    <title>1.  APLIKAGARRITASUNA ETA DEFINIZIOAK</title>
    <para id="fdl-document">
      This License applies to any manual or other work that contains a
      notice placed by the copyright holder saying it can be
      distributed under the terms of this License. The
      <quote>Document</quote>, below, refers to any such manual or
      work. Any member of the public is a licensee, and is addressed
      as <quote>you</quote>.
    </para>
    
    <para id="fdl-modified">
      A <quote>Modified Version</quote> of the Document means any work
      containing the Document or a portion of it, either copied
      verbatim, or with modifications and/or translated into another
      language.
    </para>
	
    <para id="fdl-secondary">
      A <quote>Secondary Section</quote> is a named appendix or a
      front-matter section of the <link linkend="fdl-document">Document</link> that deals exclusively
      with the relationship of the publishers or authors of the
      Document to the Document's overall subject (or to related
      matters) and contains nothing that could fall directly within
      that overall subject. (For example, if the Document is in part a
      textbook of mathematics, a Secondary Section may not explain any
      mathematics.)  The relationship could be a matter of historical
      connection with the subject or with related matters, or of
      legal, commercial, philosophical, ethical or political position
      regarding them.
    </para>

    <para id="fdl-invariant">
      The <quote>Invariant Sections</quote> are certain <link linkend="fdl-secondary"> Secondary Sections</link> whose titles
      are designated, as being those of Invariant Sections, in the
      notice that says that the <link linkend="fdl-document">Document</link> is released under this
      License.
    </para>
    
    <para id="fdl-cover-texts">
      The <quote>Cover Texts</quote> are certain short passages of
      text that are listed, as Front-Cover Texts or Back-Cover Texts,
      in the notice that says that the <link linkend="fdl-document">Document</link> is released under this
      License.
    </para>
	
    <para id="fdl-transparent">
      A <quote>Transparent</quote> copy of the <link linkend="fdl-document"> Document</link> means a machine-readable
      copy, represented in a format whose specification is available
      to the general public, whose contents can be viewed and edited
      directly and straightforwardly with generic text editors or (for
      images composed of pixels) generic paint programs or (for
      drawings) some widely available drawing editor, and that is
      suitable for input to text formatters or for automatic
      translation to a variety of formats suitable for input to text
      formatters. A copy made in an otherwise Transparent file format
      whose markup has been designed to thwart or discourage
      subsequent modification by readers is not Transparent.  A copy
      that is not <quote>Transparent</quote> is called
      <quote>Opaque</quote>.
    </para>
    
    <para>Kopia Gardenak egiteko erabil daitezkeen formatu egokien artean, honako hauek ditugu, besteak beste: markaketarik gabeko ASCII soila, Texinfo sarrera-formatua, LaTex sarrera-formatua, SGML edo XML jendeak erabiltzeko moduko DTDarekin, eta pertsonek aldatu ahal izateko diseinatutako HTML sinple eta estandarrarekiko egokitua. Formatu opakoen artean, berriz, honako hauek ditugu: PostScript, PDF, testu-prozesadore jabedunek soilik irakurri eta edita ditzaketen testu-formatu jabedunak, SGML edo XML bereziak (DTD eta/edo prozesatze-tresna erabilgarririk apenas dutenak), eta zenbait testu-prozesadorek irteerako emaitza gisa soilik makina bidez sortutako HTMLak.</para>
    
    <para id="fdl-title-page">
      The <quote>Title Page</quote> means, for a printed book, the
      title page itself, plus such following pages as are needed to
      hold, legibly, the material this License requires to appear in
      the title page. For works in formats which do not have any title
      page as such, <quote>Title Page</quote> means the text near the
      most prominent appearance of the work's title, preceding the
      beginning of the body of the text.
    </para>
  </sect1>
    
  <sect1 id="fdl-section2">
    <title>2. KOPIA LITERALAK</title>
    <para>
      You may copy and distribute the <link linkend="fdl-document">Document</link> in any medium, either
      commercially or noncommercially, provided that this License, the
      copyright notices, and the license notice saying this License
      applies to the Document are reproduced in all copies, and that
      you add no other conditions whatsoever to those of this
      License. You may not use technical measures to obstruct or
      control the reading or further copying of the copies you make or
      distribute. However, you may accept compensation in exchange for
      copies. If you distribute a large enough number of copies you
      must also follow the conditions in <link linkend="fdl-section3">section 3</link>.
    </para>
    
    <para>Goian azaldutako baldintza berdinen pean kopiak mailegutan ere utz ditzakezu, eta kopiak jendaurrean erakutsi ere bai.</para>
    </sect1>
    
  <sect1 id="fdl-section3">
    <title>3. KANTITATE HANDIAK KOPIATZEA</title>
    <para>
      If you publish printed copies of the <link linkend="fdl-document">Document</link> numbering more than 100,
      and the Document's license notice requires <link linkend="fdl-cover-texts">Cover Texts</link>, you must enclose
      the copies in covers that carry, clearly and legibly, all these
      Cover Texts: Front-Cover Texts on the front cover, and
      Back-Cover Texts on the back cover. Both covers must also
      clearly and legibly identify you as the publisher of these
      copies. The front cover must present the full title with all
      words of the title equally prominent and visible. You may add
      other material on the covers in addition. Copying with changes
      limited to the covers, as long as they preserve the title of the
      <link linkend="fdl-document">Document</link> and satisfy these
      conditions, can be treated as verbatim copying in other
      respects.
    </para>
    
    <para>Azaletan jarri beharreko testuak luzeegiak badira modu irakurgarrian ipintzeko, zerrendako lehenak jarri behar dituzu azalean bertan (sartzen diren guztiak), eta hurrengo orrietan jarraitu besteekin.</para>
    
    <para>
      If you publish or distribute <link linkend="fdl-transparent">Opaque</link> copies of the <link linkend="fdl-document">Document</link> numbering more than 100,
      you must either include a machine-readable <link linkend="fdl-transparent">Transparent</link> copy along with
      each Opaque copy, or state in or with each Opaque copy a
      publicly-accessible computer-network location containing a
      complete Transparent copy of the Document, free of added
      material, which the general network-using public has access to
      download anonymously at no charge using public-standard network
      protocols. If you use the latter option, you must take
      reasonably prudent steps, when you begin distribution of Opaque
      copies in quantity, to ensure that this Transparent copy will
      remain thus accessible at the stated location until at least one
      year after the last time you distribute an Opaque copy (directly
      or through your agents or retailers) of that edition to the
      public.
    </para>
    
    <para>
      It is requested, but not required, that you contact the authors
      of the <link linkend="fdl-document">Document</link> well before
      redistributing any large number of copies, to give them a chance
      to provide you with an updated version of the Document.
    </para>
    </sect1>
    
  <sect1 id="fdl-section4">
    <title>4. ALDAKETAK</title>
    <para>
      You may copy and distribute a <link linkend="fdl-modified">Modified Version</link> of the <link linkend="fdl-document">Document</link> under the conditions of
      sections <link linkend="fdl-section2">2</link> and <link linkend="fdl-section3">3</link> above, provided that you release
      the Modified Version under precisely this License, with the
      Modified Version filling the role of the Document, thus
      licensing distribution and modification of the Modified Version
      to whoever possesses a copy of it. In addition, you must do
      these things in the Modified Version:
    </para>
    
    <itemizedlist mark="opencircle">
      <listitem>
	<formalpara>
	  <title>A</title>
	  <para>
	    Use in the <link linkend="fdl-title-page">Title
	    Page</link> (and on the covers, if any) a title distinct
	    from that of the <link linkend="fdl-document">Document</link>, and from those of
	    previous versions (which should, if there were any, be
	    listed in the History section of the Document). You may
	    use the same title as a previous version if the original
	    publisher of that version gives permission.
	  </para>
	</formalpara>
      </listitem>
      
      <listitem>
	<formalpara>
	  <title>B</title>
	  <para>
	    List on the <link linkend="fdl-title-page">Title
	    Page</link>, as authors, one or more persons or entities
	    responsible for authorship of the modifications in the
	    <link linkend="fdl-modified">Modified Version</link>,
	    together with at least five of the principal authors of
	    the <link linkend="fdl-document">Document</link> (all of
	    its principal authors, if it has less than five).
	  </para>
	</formalpara>
      </listitem>
      
      <listitem>
	<formalpara>
	  <title>C</title>
	  <para>
	    State on the <link linkend="fdl-title-page">Title
	    Page</link> the name of the publisher of the <link linkend="fdl-modified">Modified Version</link>, as the
	    publisher.
	  </para>
	</formalpara>
      </listitem>
      
      <listitem>
	<formalpara>
	  <title>D</title>
	  <para>
	    Preserve all the copyright notices of the <link linkend="fdl-document">Document</link>.
	  </para>
	</formalpara>
      </listitem>
      
      <listitem>
	<formalpara>
	  <title>E</title>
	  <para>Zure aldaketei dagokien copyright-oharra gehitu behar duzu beste copyright-oharren ondoan.</para>
	</formalpara>
      </listitem>
      
      <listitem>
	<formalpara>
	  <title>F</title>
	  <para>
	    Include, immediately after the copyright notices, a
	    license notice giving the public permission to use the
	    <link linkend="fdl-modified">Modified Version</link> under
	    the terms of this License, in the form shown in the
	    Addendum below.
	  </para>
	</formalpara>
      </listitem>
      
      <listitem>
	<formalpara>
	  <title>G</title>
	  <para>
	    Preserve in that license notice the full lists of <link linkend="fdl-invariant"> Invariant Sections</link> and
	    required <link linkend="fdl-cover-texts">Cover
	    Texts</link> given in the <link linkend="fdl-document">Document's</link> license notice.
	  </para>
	</formalpara>
      </listitem>
      
      <listitem>
	<formalpara>
	  <title>H</title>
	  <para>Lizentzia honen kopia ere, aldaketarik gabe jarri behar duzu.</para>
	</formalpara>
      </listitem>
      
      <listitem>
	<formalpara>
	  <title>I</title>
	  <para>
	    Preserve the section entitled <quote>History</quote>, and
	    its title, and add to it an item stating at least the
	    title, year, new authors, and publisher of the <link linkend="fdl-modified">Modified Version</link> as given on
	    the <link linkend="fdl-title-page">Title Page</link>.  If
	    there is no section entitled <quote>History</quote> in the
	    <link linkend="fdl-document">Document</link>, create one
	    stating the title, year, authors, and publisher of the
	    Document as given on its Title Page, then add an item
	    describing the Modified Version as stated in the previous
	    sentence.
	  </para>
	</formalpara>
      </listitem>
      
      <listitem>
	<formalpara>
	  <title>J</title>
	  <para>
	    Preserve the network location, if any, given in the <link linkend="fdl-document">Document</link> for public access
	    to a <link linkend="fdl-transparent">Transparent</link>
	    copy of the Document, and likewise the network locations
	    given in the Document for previous versions it was based
	    on. These may be placed in the <quote>History</quote>
	    section.  You may omit a network location for a work that
	    was published at least four years before the Document
	    itself, or if the original publisher of the version it
	    refers to gives permission.
	  </para>
	</formalpara>
      </listitem>
      
      <listitem>
	<formalpara>
	  <title>K</title>
	  <para>
	    In any section entitled <quote>Acknowledgements</quote> or
	    <quote>Dedications</quote>, preserve the section's title,
	    and preserve in the section all the substance and tone of
	    each of the contributor acknowledgements and/or
	    dedications given therein.
	  </para>
	</formalpara>
      </listitem>
      
      <listitem>
	<formalpara>
	  <title>L</title>
	  <para>
	    Preserve all the <link linkend="fdl-invariant">Invariant
	    Sections</link> of the <link linkend="fdl-document">Document</link>, unaltered in their
	    text and in their titles.  Section numbers or the
	    equivalent are not considered part of the section titles.
	  </para>
	</formalpara>
      </listitem>
      
      <listitem>
	<formalpara>
	  <title>M</title>
	  <para>
	    Delete any section entitled
	    <quote>Endorsements</quote>. Such a section may not be
	    included in the <link linkend="fdl-modified">Modified
	    Version</link>.
	  </para>
	</formalpara>
      </listitem>
      
      <listitem>
	<formalpara>
	  <title>N</title>
	  <para>
	    Do not retitle any existing section as
	    <quote>Endorsements</quote> or to conflict in title with
	    any <link linkend="fdl-invariant">Invariant
	    Section</link>.
	  </para>
	</formalpara>
      </listitem>
    </itemizedlist>
    
    <para>
      If the <link linkend="fdl-modified">Modified Version</link>
      includes new front-matter sections or appendices that qualify as
      <link linkend="fdl-secondary">Secondary Sections</link> and
      contain no material copied from the Document, you may at your
      option designate some or all of these sections as invariant. To
      do this, add their titles to the list of <link linkend="fdl-invariant">Invariant Sections</link> in the
      Modified Version's license notice.  These titles must be
      distinct from any other section titles.
    </para>
    
    <para>
      You may add a section entitled <quote>Endorsements</quote>,
      provided it contains nothing but endorsements of your <link linkend="fdl-modified">Modified Version</link> by various
      parties--for example, statements of peer review or that the text
      has been approved by an organization as the authoritative
      definition of a standard.
    </para>
    
    <para>
      You may add a passage of up to five words as a <link linkend="fdl-cover-texts">Front-Cover Text</link>, and a passage
      of up to 25 words as a <link linkend="fdl-cover-texts">Back-Cover Text</link>, to the end of
      the list of <link linkend="fdl-cover-texts">Cover Texts</link>
      in the <link linkend="fdl-modified">Modified Version</link>.
      Only one passage of Front-Cover Text and one of Back-Cover Text
      may be added by (or through arrangements made by) any one
      entity. If the <link linkend="fdl-document">Document</link>
      already includes a cover text for the same cover, previously
      added by you or by arrangement made by the same entity you are
      acting on behalf of, you may not add another; but you may
      replace the old one, on explicit permission from the previous
      publisher that added the old one.
    </para>
    
    <para>
      The author(s) and publisher(s) of the <link linkend="fdl-document">Document</link> do not by this License
      give permission to use their names for publicity for or to
      assert or imply endorsement of any <link linkend="fdl-modified">Modified Version </link>.
    </para>
  </sect1>
    
  <sect1 id="fdl-section5">
    <title>5. DOKUMENTUAK KONBINATZEA</title>
    <para>
      You may combine the <link linkend="fdl-document">Document</link>
      with other documents released under this License, under the
      terms defined in <link linkend="fdl-section4">section 4</link>
      above for modified versions, provided that you include in the
      combination all of the <link linkend="fdl-invariant">Invariant
      Sections</link> of all of the original documents, unmodified,
      and list them all as Invariant Sections of your combined work in
      its license notice.
    </para>
    
    <para>
      The combined work need only contain one copy of this License,
      and multiple identical <link linkend="fdl-invariant">Invariant
      Sections</link> may be replaced with a single copy. If there are
      multiple Invariant Sections with the same name but different
      contents, make the title of each such section unique by adding
      at the end of it, in parentheses, the name of the original
      author or publisher of that section if known, or else a unique
      number. Make the same adjustment to the section titles in the
      list of Invariant Sections in the license notice of the combined
      work.
    </para>
    
    <para>
      In the combination, you must combine any sections entitled
      <quote>History</quote> in the various original documents,
      forming one section entitled <quote>History</quote>; likewise
      combine any sections entitled <quote>Acknowledgements</quote>,
      and any sections entitled <quote>Dedications</quote>.  You must
      delete all sections entitled <quote>Endorsements.</quote>
    </para>
    </sect1>
    
  <sect1 id="fdl-section6">
    <title>6. DOKUMENTU-BILDUMAK</title>
    <para>
      You may make a collection consisting of the <link linkend="fdl-document">Document</link> and other documents
      released under this License, and replace the individual copies
      of this License in the various documents with a single copy that
      is included in the collection, provided that you follow the
      rules of this License for verbatim copying of each of the
      documents in all other respects.
    </para>
    
    <para>Bilduma horretatik dokumentu bat atera eta banaka banatu dezakezu Lizentzia honen pean, baldin eta ateratako dokumentuari Lizentziaren kopia bat jartzen badiozu, eta kopia literalei dagokienez Lizentziaren beste alderdi guztiak betetzen badituzu.</para>
    </sect1>
    
  <sect1 id="fdl-section7">
    <title>7. LAN INDEPENDENTEAK GAINERATZEA</title>
    <para>
      A compilation of the <link linkend="fdl-document">Document</link> or its derivatives with
      other separate and independent documents or works, in or on a
      volume of a storage or distribution medium, does not as a whole
      count as a <link linkend="fdl-modified">Modified Version</link>
      of the Document, provided no compilation copyright is claimed
      for the compilation.  Such a compilation is called an
      <quote>aggregate</quote>, and this License does not apply to the
      other self-contained works thus compiled with the Document , on
      account of their being thus compiled, if they are not themselves
      derivative works of the Document.  If the <link linkend="fdl-cover-texts">Cover Text</link> requirement of <link linkend="fdl-section3">section 3</link> is applicable to these
      copies of the Document, then if the Document is less than one
      quarter of the entire aggregate, the Document's Cover Texts may
      be placed on covers that surround only the Document within the
      aggregate. Otherwise they must appear on covers around the whole
      aggregate.
    </para>
    </sect1>
    
  <sect1 id="fdl-section8">
    <title>8. ITZULPENA</title>
    <para>
      Translation is considered a kind of modification, so you may
      distribute translations of the <link linkend="fdl-document">Document</link> under the terms of <link linkend="fdl-section4">section 4</link>. Replacing <link linkend="fdl-invariant"> Invariant Sections</link> with
      translations requires special permission from their copyright
      holders, but you may include translations of some or all
      Invariant Sections in addition to the original versions of these
      Invariant Sections. You may include a translation of this
      License provided that you also include the original English
      version of this License. In case of a disagreement between the
      translation and the original English version of this License,
      the original English version will prevail.
    </para>
    </sect1>
    
  <sect1 id="fdl-section9">
    <title>9. AMAIERA</title>
    <para>
      You may not copy, modify, sublicense, or distribute the <link linkend="fdl-document">Document</link> except as expressly
      provided for under this License. Any other attempt to copy,
      modify, sublicense or distribute the Document is void, and will
      automatically terminate your rights under this License. However,
      parties who have received copies, or rights, from you under this
      License will not have their licenses terminated so long as such
      parties remain in full compliance.
    </para>
    </sect1>
    
  <sect1 id="fdl-section10">
    <title>10. LIZENTZIA HONEN ETORKIZUNEKO BERRIKUSPENAK</title>
    <para>
      The <ulink type="http" url="http://www.gnu.org/fsf/fsf.html">Free Software
      Foundation</ulink> may publish new, revised versions of the GNU
      Free Documentation License from time to time. Such new versions
      will be similar in spirit to the present version, but may differ
      in detail to address new problems or concerns. See <ulink type="http" url="http://www.gnu.org/copyleft">http://www.gnu.org/copyleft/</ulink>.
    </para>
    
    <para>
      Each version of the License is given a distinguishing version
      number. If the <link linkend="fdl-document">Document</link>
      specifies that a particular numbered version of this License
      <quote>or any later version</quote> applies to it, you have the
      option of following the terms and conditions either of that
      specified version or of any later version that has been
      published (not as a draft) by the Free Software Foundation. If
      the Document does not specify a version number of this License,
      you may choose any version ever published (not as a draft) by
      the Free Software Foundation.
    </para>
  </sect1>

  <sect1 id="fdl-using">
    <title>Eranskina</title>
    <para>Zuk idatzitako dokumentu batean Lizentzia hau erabiltzeko, jar ezazu Lizentziaren kopia bat dokumentuan, eta titulu-orriaren jarraian, berriz, copyrighta eta lizentzia-ohar hauek:</para>
    
    <blockquote>
      <para>Copyright URTEA ZURE IZENA.</para>
      <para>
	Permission is granted to copy, distribute and/or modify this
	document under the terms of the GNU Free Documentation
	License, Version 1.1 or any later version published by the
	Free Software Foundation; with the <link linkend="fdl-invariant">Invariant Sections</link> being LIST
	THEIR TITLES, with the <link linkend="fdl-cover-texts">Front-Cover Texts</link> being LIST,
	and with the <link linkend="fdl-cover-texts">Back-Cover
	Texts</link> being LIST.  A copy of the license is included in
	the section entitled <quote>GNU Free Documentation
	License</quote>.
      </para>
    </blockquote>
      
    <para>
      If you have no <link linkend="fdl-invariant">Invariant
      Sections</link>, write <quote>with no Invariant Sections</quote>
      instead of saying which ones are invariant.  If you have no
      <link linkend="fdl-cover-texts">Front-Cover Texts</link>, write
      <quote>no Front-Cover Texts</quote> instead of
      <quote>Front-Cover Texts being LIST</quote>; likewise for <link linkend="fdl-cover-texts">Back-Cover Texts</link>.
    </para>
    
    <para>
      If your document contains nontrivial examples of program code,
      we recommend releasing these examples in parallel under your
      choice of free software license, such as the <ulink type="http" url="http://www.gnu.org/copyleft/gpl.html"> GNU General Public
      License</ulink>, to permit their use in free software.
    </para>
  </sect1>
</appendix>  








</book>
