Getting Started

TexLab is a cross-platform implementation of the Language Server Protocol for the LaTeX typesetting system. It aims to produce high quality code completion results by indexing your used packages as you type.

The server may be used with any editor that implements the Language Server Protocol. Please see the download page for all available editor extensions. If your editor is not listed, you need to configure it manually.

Installation

If your editor extension does not install the TexLab server automatically, you will need to install it manually. We provide precompiled binaries for Windows, Linux and macOS. Alternatively, you can build TexLab from source.

Requirements

For TexLab to work correctly, you will need to install a TeX distribution of choice. On Windows, you may need to install Microsoft Visual C++ Redistributable for Visual Studio 2015.

Usage

After installing an editor extension, you can simply start editing LaTeX files. All editing features work out-of-the-box over all files in the currently opened workspace.

Documents can be built by invoking the latex.build command or by enabling the latex.build.onSave feature. Hanging builds can be aborted with the latex.build.cancel command. By default, latexmk is used as build system. You can customize this by changing the settings in the latex.build section.

Example: Using tectonic

tectonic is an alternative to latexmk, built in Rust. You can quickly get started by changing .vscode/settings.json in your workspace to include the following:

{
    // See `tectonic --help` for the format
    "latex.build.executable": "tectonic",
    "latex.build.args": [
        // Input
        "%f",
        // Flags
        "--synctex",
        "--keep-logs",
        "--keep-intermediates",
        // Options
        // OPTIONAL: If you want a custom out directory,
        // uncomment the following line.
        //"--outdir out",
    ],
    // OPTIONAL: The extension needs to be configured 
    // to read the logs from the out directory as well.
    // "latex.build.outputDirectory": "out",
}