Latex Setup - 19 Oct 20

Recently ('bout 2 years tbh) I started writing my uni notes in latex, to make the process a little more 2020-like I decided to use Gitlab CI/CD.
This allows me to have my .tex file compiled whenever I push to my repo (if you push PDFs in you repo you are an horrible person, if you use github releases manually it's ok but you're not my bear-friend).

Enough talking, let's get down to business.

Here are three different container images:

Remember that texlive-* contains tlmgr so if a package is used only once it can just be installed adding tlmgr install <pkgname> in .gitlab-ci.yml

Speaking of .gitlab-ci.yml this is what I usually use.

    stage: build
        - git checkout master
        - curl -LOk
        - curl -O    
        - ./
        - latexmk -xelatex --shell-escape <file>.tex
        - <file>.pdf is a script to use gitinfo2 in manual mode, here you can find a raw version easy to curl.

You can check GitLab Docs to know where to find your compiled pdf.
Keeeping your repo private might be a good idea, if you want to have pdfs accessible by anyone I highly suggest to deploy your pdf using GitLab Pages adding the following to .gitlab-ci.yml.

    stage: deploy
        - mkdir public  
        - cp <file>.pdf public  
        - public

On my machine I install texlive-full python3-pygments and I use VSCode +LaTex Workshop with this config :

    "": [
        "name": "latexmk",
        "command": "latexmk",
        "args": [
    "[latex]": {
        "editor.rulers": [150],
        "editor.wordWrap": "wordWrapColumn",
        "editor.wrappingIndent": "same",
        "editor.wordWrapColumn": 150

You can find a bunch of useful files in this repo (also contains container images), if you need help and have a bunch of bear pics feel free to contact me.