You can use GitLab's continuous integration service to build your LaTeX projects. Detailed information is available here.

Our CI server may be deprecated in the future in favor of this service (because it seems like a decent one and running an own CI server needs a remarkable portion of the resources of our server).

Quick & Simple Configuration


  1. Host your repository on (or another GitLab instance which works with GitLab CI).
  2. Push a file called .gitlab-ci.yml to your repository with the following content:
      image: aergus/latex
        - latexmk -pdf my_file.tex
          - my_file.pdf
    where you should replace my_file with the name of your main TeX file (and add a directory path if needed).

Builds will appear in<namespace>/<repo name>/pipelines (or a similar URL if you are using another host). The PDF files will be in the "build artifacts" of each build.


After each push, GitLab will build your project using the configuration in .gitlab-ci.yml.

The configuration file above tells GitLab to create a clone of the Docker image aergus/latex and hence run latexmk in a "sandboxed" environment. In this configuration, your project will be built on a Debian system which has texlive-full (minus the documentation packages) installed. This means that all TeX packages included in Debian will be at your service and you will have to try hard to find a package which is unavailable.

Alternatively, you can also use the image tianon/latex which is based on Debian stable (and hence has in general older versions of TeX packages) and has a slightly larger image size (because it contains some documentation packages which are not needed for building LaTeX documents). It should be OK to use a decent-looking Docker configuration created by a random person as it cannot do anything to your files/repo/account/whatever. That's the point of a sandbox.

Home | List of Pages