leplusorg / docker-latex

A convenient way to run LaTeX on various platform using Docker (latexmk, pdflatex...).

Home Page:https://hub.docker.com/r/leplusorg/latex

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LaTeX

LaTeX Logo

A convenient way to run LaTeX on various platform using Docker (latexmk, pdflatex...).

Dockerfile Docker Build Docker Stars Docker Pulls Docker Version

Example

Assuming that you have a file foo.tex in your current working directory that you want to convert into a PDF foo.pdf:

Mac/Linux

docker run --rm -t --user="$(id -u):$(id -g)" --net=none -v "$(pwd):/tmp" leplusorg/latex latexmk -outdir=/tmp -pdf /tmp/foo.tex

Windows

In cmd:

docker run --rm -t --net=none -v "%cd%:/tmp" leplusorg/latex latexmk -outdir=/tmp -pdf /tmp/foo.tex

In PowerShell:

docker run --rm -t --net=none -v "${PWD}:/tmp" leplusorg/latex latexmk -outdir=/tmp -pdf /tmp/foo.tex

Help

To know more command-line options of latexmk:

docker run --rm --net=none leplusorg/latex latexmk -h

texlive vs texlive-full

Version 1 of this image was using the texlive-full debian package to include as much TeX Live packages pre-installed as possible. But the resulting docker image was over 4 GB making it slow to download and breaking some CI/CD disk limits (including the free tier of GitHub Actions that I use). To keep the image usable by as many people as possible, I decided with version 2 and above to switch to the default texlive package.

If you need more TeX Live packages, you have the following options:

  • use version 1 of this docker image (i.e. leplusorg/latex:1).
  • use the image this fork is based on (i.e. aergus/latex).

Request new tool

Please use this link (GitHub account required) to request that a new tool be added to the image. I am always interested in adding new capabilities to these images.

About

A convenient way to run LaTeX on various platform using Docker (latexmk, pdflatex...).

https://hub.docker.com/r/leplusorg/latex

License:Creative Commons Zero v1.0 Universal


Languages

Language:Dockerfile 100.0%