Saturday, May 12, 2018

Compile latex sources with docker container

Someone maintains a great source over here:
https://hub.docker.com/r/blang/latex/

Comprehensive instructions are also available on the same web page.

Essentially, you will have to do:

# Change to your project
cd my_latex_project

# Download the command wrapper and make it executable
wget https://raw.githubusercontent.com/blang/latex-docker/master/latexdockercmd.sh
chmod +x latexdockercmd.sh

# Optional: Change the version (see above, default blang/latex:ubuntu)
edit ./latexdockercmd.sh

# Or use latexmk (best option)
./latexdockercmd.sh latexmk -cd -f -interaction=batchmode -pdf main.tex

No comments: