Configuration Properties
Reference
The LaTeX extension reads four properties, all of them from xwiki.properties on the server, and all of them about PDF conversion: exporting to LaTeX itself needs no configuration. There is no administration section to set them in, and the file is read when XWiki starts, so a change takes effect only after a restart.
| Property | What it sets | Default |
|---|---|---|
| latex.pdf.export.hint | Which converter compiles an exported package into a PDF: docker or process. | docker |
| latex.pdf.docker.imageName | The image, name and tag, the Docker converter runs the compilation in. | blang/latex:ubuntu |
| latex.pdf.docker.commands | The command line the Docker converter runs inside that container. | pdflatex -shell-escape index.tex; pdflatex -shell-escape index.tex |
| latex.pdf.process.commands | The command lines the local process converter runs on the server, one property declaration per command. | pdflatex -shell-escape index.tex, declared twice |
A property you leave out, or comment out, uses its default. The two docker properties are read only when the Docker converter is the one selected, and the process one only when the local process converter is.
Choosing the Converter
latex.pdf.export.hint names the converter the PDF (LaTeX) export entry goes through. It takes docker, which is the default and needs no declaration, or process, which also requires the local process converter to be installed since it does not come with the exporter.
latex.pdf.export.hint=processDocker Converter Properties
latex.pdf.docker.commands holds a single command line, which the converter runs through a shell inside the container. Several commands can therefore be chained with ;, which is exactly what the default does to compile twice.
latex.pdf.docker.imageName=blang/latex:ubuntu
latex.pdf.docker.commands=pdflatex -shell-escape index.tex; pdflatex -shell-escape index.texThe exported package is copied into the container as /data, so the commands compile index.tex in the working directory the image itself defines. An image put in place of the default has to bring a LaTeX distribution and use /data as its working directory, as blang/latex:ubuntu does, and is pulled the first time an export needs it.
Local Process Converter Properties
latex.pdf.process.commands is a list, and it is written by declaring the property once per line — the name repeated, not values separated by commas. Each line is one command, run in turn.
latex.pdf.process.commands=pdflatex -shell-escape index.tex
latex.pdf.process.commands=pdflatex -shell-escape index.texA line is run directly, with no shell around it, so ;, pipes and redirections are not interpreted: chaining the way the Docker property does would fail. That is why the default compiles twice by declaring the same command on two lines.
The commands run in the directory holding the unzipped package, which is where index.tex and, once they succeed, index.pdf are.