Fran Dieguez
frandieguez@gnome.org 2011.

# Ferramentas de construción

      O propósito das ferramentas de construción é xerar un documento en formato PDF, DVI ou PS

# Introdución

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

## Ordes de baixo nivel

Etiqueta | Orde
--- | ---
LaTeX → DVI | latex
LaTeX → PDF | pdflatex
DVI → PDF | dvipdf
DVI → PS | dvips
PS → PDF | ps2pdf
Bibliografía | bibtex
Índice | makeindex

Compilar un documento LaTeX pode involucrar a execución de varias ordes de baixo nivel, en certa orde e certo número de veces. Aquí ten un exemplo:

    $ 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, LaTeXila uses Latexmk.

# Exeuctar unha ferramenta de construción

Hai varios significados para executar unha ferramenta de construción:

Open the Build menu.

Use the buttons in the main toolbar.

Use o atallo de teclado: 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 construción ocultas

Por omisión, moitas das ferramentas de construción están agochadas, polo que non poden ser executadas, activadas ou configuradas, lea a sección .

# Configuración xeral

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.

Prema dúas veces sobre unha ferramenta de construción para abrir as súas propiedades.

# Traballos dunha ferramenta de construción

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:

A orde, que pode empregar posicionadores.

O postprocesador (vexa ).

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

# Postprocesador

The purpose of a post processor is to filter the command output and extract the useful information. Four post processors are available:

## no-output

A saída simplemente non se mostra

## all-output

Móstrase toda a saída, sen filtrar.

## latex

Filtra a saída das ordes latex ou pdflatex. Pode haber tres tipos de erros: erros críticos, avisos, e caixas incorrectas. Tamén hai algunha información útil: o tamaño do documento, o número de páxinas e o número de erros.

## latexmk

Usado pola orde latexmk. De forma interna, este postprocesador usa outros: latex e all-output.