6 LaTeX Compiling

6.1 Setting Compilation rules
6.2 Handling dependencies in compilation
6.3 Compiling multiple times
6.4 Customizing the compiler output
6.5 Compiling parts of a file
6.6 Load log file after external compilation

This functionality, available via the TeX-Suite menu, provides various tools to compile and debug LaTeX files from within Vim.

If you are using commonly used LaTeX tools, then you should be all set as soon as you download and install Latex-Suite. In order to compile a LaTeX file, simply press \ll while editing the file. This runs latex on the current file and displays the errors in a |quickfix-window| below the file being edited. You can then scroll through the errors and press <enter> to be taken to the location of the corresponding error. Along with the errors being listed in the quickfix window, the corresponding log file is also opened in |preview| mode beneath the quickfix window. It is scrolled automatically to keep in sync with the error being viewed in the quickfix window. You will be automatically taken to the location of the first error/warning unless you set the g:Tex_GotoError variable to 0.

Latex-Suite also supports compiling LaTeX into formats other than DVI. By default, Latex-Suite supports PDF and PS formats. In order to choose a format other than DVI, use the TTarget command or the TeX-Suite > Target Format menu item. This will ask you to type in the name of the target format you want to compile to. If a rule has been defined for the format (as described in the next section), then Latex-Suite will switch to that format.

Trying to choose a format for which no rule has been defined will result in Latex-Suite displaying a warning message without taking any action.

If you are using a multiple file project and need to compile a master file while editing other files, then Latex-Suite provides a way to specify the file to be compiled as described in latex-master-file.