Skip to content
/ xdp-docker Public template

Dockerfile for creating TeX Live distributions with Ubuntu 22.04

Notifications You must be signed in to change notification settings

Xerdi/xdp-docker

Repository files navigation

TeX Live - Docker

CTAN Version CTAN Version CTAN Version

Using Ubuntu 22.04 as operating system having a TeX Live distribution along with some other useful tools, which are required for some LaTeX packages.

This Docker image is being used by the following packages:

Prerequisites

To use one of the Docker images, Docker needs to be installed. Check the installation instructions to install Docker. Once you run Docker with an image specified, the image will get downloaded.

Usage

The following example would be applicable for most situations:

docker run --rm -i \
       --user="$(id -u):$(id -g)" \
       -v "$PWD":/build \
       -v "$HOME/texmf":/root/texmf \
       "maclotsen/texlive:latest" \
       "pdflatex main"

However, it’s still quite long and hard to remember. Therefore, it’s wise to alias this command, so you’d end up with something like xdpdocker pdflatex main.

#!/bin/bash
IMAGE=maclotsen/texlive:with-gf

exec docker run --rm -i \
  --user="$(id -u):$(id -g)" \
  -v "$PWD":/build \
  -v "$HOME/texmf":/root/texmf \
  "$IMAGE" "$@"

~/bin/xdpdocker

Notes on TDS

The image uses an alternated configuration of TEXMFDOTDIR. The main difference is that it also allows a thinner TDS variant, which follows the single layered projects' directory structure (see XDP Packaging Guidelines).

The definition of TEXMFDOTDIR for this Docker image is:

TEXMFDOTDIR = .;/build//

and could also be achieved on your local development environment by replacing /build with a directory containing all your LaTeX related repositories.

Here's an example of gitinfo-luas structure, which is compatible with the TEXMFDOTDIR structure (see misc/texmf.cnf):

gitinfo-lua
├── doc
│   ├── gitinfo-lua.pdf
│   ├── gitinfo-lua.tex
├── scripts
│   ├── gitinfo-lua.lua
│   ├── gitinfo-lua-cmd.lua
│   └── gitinfo-lua-recorder.lua
└── tex
    └── gitinfo-lua.sty

The main difference of this approach is that Lua files don't have to be placed in under scripts/lua, but can directly be placed under scripts instead. This also counts for TeX files. For example, gitinfo-lua.sty won't have to be placed in either one of the following subdirectories: luahblatex, luahbtex, lualatex, latex, luatex or generic. The TDS approach is cumbersome for package developers that like to test their software against alternative compilers, where TEXMFDOTDIR does not.

About

Dockerfile for creating TeX Live distributions with Ubuntu 22.04

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published