Enrico Nicoletto
liverig@gmail.com 2013.

# Ferramentas de construção

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

# Introdução

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

## Comandos de baixo nível

Etiqueta | Comando
--- | ---
LaTeX → DVI | latex
LaTeX → PDF | pdflatex
DVI → PDF | dvipdf
DVI → PS | dvips
PS → PDF | ps2pdf
Bibliografia | bibtex
Index | makeindex

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:

    $ latex document.tex
    $ bibtex document.aux
    $ latex document.tex
    $ dvips -t a4 document.dvi
    $ ps2pdf document.ps

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 latex or pdflatex command must be called, and whether bibtex or makeindex is required. By default, GNOME LaTeX uses Latexmk.

# Executando uma ferramenta de construção

There are several means to execute a build tool:

Open the Build menu.

Use os botões da barra de ferramentas principal.

Use the shortcut: F2 → F11.

The build tool is executed on the currently opened file. If the file belongs to a project, it is executed on the project's main file.

## Ferramentas de construção ocultas

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 section.

# Configurações gerais

To configure the build tools, go to: Build Manage Build Tools

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.

Double-click on a build tool will open its properties.

# Trabalhos de uma ferramenta de construção

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:

The command, which can use placeholders.

The post processor (see ).

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ós-processadores

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:

## no-output

A saída simplesmente não é exibida.

## all-output

All the output is displayed, without filter.

## latex

Filter the output of the latex or pdflatex 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.

## latexmk

Used for the latexmk command. Internally, this post processor uses other ones: latex and all-output.