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:
gitinfo-lua
(GitHub|CTAN)lua-placeholders
(GitHub|CTAN)regulatory
(GitHub|CTAN)fmtcount
(GitHub|CTAN)luakeys
(GitHub|CTAN)
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.
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
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-lua
s 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.