Wiki source code of Convert a LaTeX Package to PDF

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

Show last authors
1 The only thing to install is Docker. The [[export menu>>doc:documentation.extensions.user.latex.export-page.WebHome]] offers no **PDF (LaTeX)** entry when the wiki has no [[PDF conversion>>doc:documentation.extensions.admin.latex.pdf-conversion.WebHome]] set up.
2
3 1. Unzip the package and put yourself at its root. Download the helper script of the [[blang/latex~-docker project>>https://github.com/blang/latex-docker]] next to ##index.tex##, and make it executable.(((
4 {{code language="bash"}}
5 wget https://raw.githubusercontent.com/blang/latex-docker/master/latexdockercmd.sh
6 chmod +x latexdockercmd.sh
7 {{/code}}
8 )))
9 1. 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>>doc:documentation.extensions.admin.latex.pdf-conversion.WebHome]].(((
10 {{code language="bash"}}
11 ./latexdockercmd.sh pdflatex -shell-escape index.tex
12 ./latexdockercmd.sh pdflatex -shell-escape index.tex
13 {{/code}}
14
15 {{image reference="generated-pdf-contents.png" size="large" alt="The table of contents of the generated PDF, filled in by the second pdflatex run"/}}
16 )))
17 1. 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.(((
18 {{image reference="generated-pdf-page.png" size="large" alt="A page of the generated index.pdf, showing an exported wiki page typeset by pdflatex"/}}
19 )))

Get Connected