<?xml version="1.0" encoding="utf-8"?>
<page xmlns="http://projectmallard.org/1.0/" xmlns:its="http://www.w3.org/2005/11/its" type="topic" id="build_tools" xml:lang="pt-BR">

<info>
  <link type="guide" xref="index"/>

    <mal:credit xmlns:mal="http://projectmallard.org/1.0/" type="translator copyright">
      <mal:name>Enrico Nicoletto</mal:name>
      <mal:email>liverig@gmail.com</mal:email>
      <mal:years>2013.</mal:years>
    </mal:credit>
  </info>

<title>Ferramentas de construção</title>

<synopsis>
  <p>O intuito das ferramentas de construção é o de criar documentos nos formatos PDF, DVI ou PS.</p>
</synopsis>

<links type="section"/>

<section id="overview">
  <title>Introdução</title>

  <p>Several different tools can be used for a document compilation. There are some
  low-level commands, and one higher-level tool: Latexmk.</p>

  <table rules="rowgroups">
    <title>Comandos de baixo nível</title>
    <thead>
      <tr>
        <td><p>Etiqueta</p></td>
        <td><p>Comando</p></td>
      </tr>
    </thead>
    <tbody its:translate="no">
      <tr>
        <td><p>LaTeX → DVI</p></td>
        <td><p><cmd>latex</cmd></p></td>
      </tr>
      <tr>
        <td><p>LaTeX → PDF</p></td>
        <td><p><cmd>pdflatex</cmd></p></td>
      </tr>
    </tbody>
    <tbody its:translate="no">
      <tr>
        <td><p>DVI → PDF</p></td>
        <td><p><cmd>dvipdf</cmd></p></td>
      </tr>
      <tr>
        <td><p>DVI → PS</p></td>
        <td><p><cmd>dvips</cmd></p></td>
      </tr>
      <tr>
        <td><p>PS → PDF</p></td>
        <td><p><cmd>ps2pdf</cmd></p></td>
      </tr>
    </tbody>
    <tbody>
      <tr>
        <td><p>Bibliografia</p></td>
        <td its:translate="no"><p><cmd>bibtex</cmd></p></td>
      </tr>
      <tr>
        <td><p>Index</p></td>
        <td its:translate="no"><p><cmd>makeindex</cmd></p></td>
      </tr>
    </tbody>
  </table>

  <p>Compiling a LaTeX document can involve to execute several low-level commands, in a
  certain order and a certain number of times. Here is an example:</p>
  <screen its:translate="no">
$ latex document.tex
$ bibtex document.aux
$ latex document.tex
$ dvips -t a4 document.dvi
$ ps2pdf document.ps</screen>

  <p>Using a higher-level tool such as Latexmk simplify a lot all this process,
  since only one command is required. Indeed, Latexmk can detect how many times the
  <cmd>latex</cmd> or <cmd>pdflatex</cmd> command must be called, and whether
  <cmd>bibtex</cmd> or <cmd>makeindex</cmd> is required. By default, GNOME LaTeX
  uses Latexmk.</p>
</section>

<section id="execute">
  <title>Executando uma ferramenta de construção</title>

  <p>There are several means to execute a build tool:</p>
  <list>
    <item><p>Open the <gui style="menu">Build</gui> menu.</p></item>
    <item><p>Use os botões da barra de ferramentas principal.</p></item>
    <item><p>Use the shortcut: <key>F2</key> → <key>F11</key>.</p></item>
  </list>

  <p>The build tool is executed on the currently opened file. If the file belongs to a
  <link xref="projects">project</link>, it is executed on the project's main file.</p>

  <note style="important">
    <title>Ferramentas de construção ocultas</title>
    <p>By default, a lot of build tools are hidden, so they can't be executed. To view
    the full list of build tools, activate or configure them, read the
    <link xref="#general_configuration"/> section.</p>
  </note>
</section>

<section id="general_configuration">
  <title>Configurações gerais</title>

  <p>
    To configure the build tools, go to:
    <guiseq>
      <gui style="menu">Build</gui>
      <gui style="menu">Manage Build Tools</gui>
    </guiseq>
  </p>

  <p>You will see the list of all the default build tools, and a second list
  with your personal build tools. There are check buttons to enable or disable
  them. When a build tool is disabled, it's not possible to execute it. You can
  perform some actions, like moving a tool up or down, open its properties,
  delete or copy it, create a new one, etc.</p>

  <note style="tip">
    <p>Double-click on a build tool will open its properties.</p>
  </note>
</section>

<section id="jobs">
  <title>Trabalhos de uma ferramenta de construção</title>

  <p>In the properties of a build tool, the tricky part is to configure the jobs.
  A build tool can execute several jobs. Each job contains two pieces of
  information:</p>
  <list>
    <item><p>The command, which can use placeholders.</p></item>
    <item><p>The post processor (see <link xref="#post-processors"/>).</p></item>
  </list>

  <p>When an error occurs during a job's execution, the execution of the build
  tool is aborted, so the next jobs are not launched.</p>
</section>

<section id="post-processors">
  <title>Pós-processadores</title>
  <p>O propósito de um pós-processador é o de filtrar a saída do comando e extrair suas informações úteis. Quatro pós-processadores estão disponíveis:</p>

  <terms>
    <item>
      <title its:translate="no">no-output</title>
      <p>A saída simplesmente não é exibida.</p>
    </item>
    <item>
      <title its:translate="no">all-output</title>
      <p>All the output is displayed, without filter.</p>
    </item>
    <item>
      <title its:translate="no">latex</title>
      <p>Filter the output of the <cmd>latex</cmd> or <cmd>pdflatex</cmd> commands.
      There can be three types of errors: critical errors, warnings, or bad boxes. There
      are also some other useful information: the size of the document, the number of
      pages, and the number of errors.</p>
    </item>
    <item>
      <title its:translate="no">latexmk</title>
      <p>Used for the <cmd>latexmk</cmd> command. Internally, this post processor uses
      other ones: <em>latex</em> and <em>all-output</em>.</p>
    </item>
  </terms>
</section>
</page>
