Convert a LaTeX Package to PDF

Last modified by superadmin on 2026/11/25 21:27

Compile the ZIP of LaTeX sources into a PDF with pdflatex in a Docker container, when the wiki cannot or you want to edit it first.

Steps

The only thing to install is Docker. The export menu offers no PDF (LaTeX) entry when the wiki has no PDF conversion set up.

  1. Unzip the package and put yourself at its root. Download the helper script of the blang/latex-docker project next to index.tex, and make it executable.
    wget https://raw.githubusercontent.com/blang/latex-docker/master/latexdockercmd.sh
    chmod +x latexdockercmd.sh
  2. Compile index.tex by running the helper twice. A single run leaves the table of contents empty, for the reason the wiki's own PDF conversion also compiles twice.
    ./latexdockercmd.sh pdflatex -shell-escape index.tex
    ./latexdockercmd.sh pdflatex -shell-escape index.tex

    The table of contents of the generated PDF, filled in by the second pdflatex run

  3. Open index.pdf, next to index.tex at the root of the package. It holds the exported pages typeset, with their images and the table of contents in front of them.

    A page of the generated index.pdf, showing an exported wiki page typeset by pdflatex

FAQ

Can I compile the package without Docker?

Yes, any TeX distribution does. Run pdflatex -shell-escape index.tex twice from the root of the unzipped package. Code blocks are typeset with the minted package, which is what needs -shell-escape and a local Pygments installation.

Related

Get Connected