LaTeX

Important

For automated builds of docker images on GitLab make sure to enable the ‘’Pipelines’’ in your repository. More on that [[cicd:gitlab:start|here]].

Setup

Create a new repository using one of the LaTeX templates in the GitLab group LaTeX-Utils:

git clone git@gitlab.ti.bfh.ch/my/repo.git
cd repo
git submodule add git@gitlab.ti.bfh.ch/latex-utils/template.git .template
ln -s .template/Makefile

GitLab

Add the .gitlab-ci.yml and create the document you wish to build. By adding following .gitlab-ci.yml to your repository, each commit will trigger a new build of the PDF:

.gitlab-ci.yml

image: registry.gitlab.ti.bfh.ch/latex-utils/texlive:latest

variables:
  GIT_SUBMODULE_STRATEGY: noraml

build:
  script:
    - MAINFILE=main.tex make document
  artifacts:
     paths:
       - "_output/*.pdf"
make example
git add .
git commit -m"inital commit"
git push

Local Build

Important

This requires docker. Make sure to install docker beforehand (How to install docker).

make example
sudo docker run \
    --rm \
    -v/home/<user>:/home/<user> \
    -t registry.gitlab.ti.bfh.ch/latex-utils/texlive \
    make "MAINFILE=mainfile.tex" -C <path_to_toplvl_dir> document