Wiki source code of Configuration Properties
Last modified by Vincent Massol on 2026/08/30 19:36
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | The LaTeX extension reads four properties, all of them from ##xwiki.properties## on the server, and all of them about [[PDF conversion>>doc:documentation.extensions.admin.latex.pdf-conversion.WebHome]]: 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. | ||
| 2 | |||
| 3 | |=Property|=What it sets|=Default | ||
| 4 | |##latex.pdf.export.hint##|Which converter compiles an exported package into a PDF: ##docker## or ##process##.|##docker## | ||
| 5 | |##latex.pdf.docker.imageName##|The image, name and tag, the Docker converter runs the compilation in.|##blang/latex:ubuntu## | ||
| 6 | |##latex.pdf.docker.commands##|The command line the Docker converter runs inside that container.|##pdflatex -shell-escape index.tex; pdflatex -shell-escape index.tex## | ||
| 7 | |##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 | ||
| 8 | |||
| 9 | 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. | ||
| 10 | |||
| 11 | == Choosing the Converter == | ||
| 12 | |||
| 13 | ##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>>doc:documentation.extensions.admin.latex.pdf-conversion.local-process.WebHome]] since it does not come with the exporter. | ||
| 14 | |||
| 15 | {{code language="none"}} | ||
| 16 | latex.pdf.export.hint=process | ||
| 17 | {{/code}} | ||
| 18 | |||
| 19 | == Docker Converter Properties == | ||
| 20 | |||
| 21 | ##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>>doc:documentation.extensions.admin.latex.pdf-conversion.WebHome]]. | ||
| 22 | |||
| 23 | {{code language="none"}} | ||
| 24 | latex.pdf.docker.imageName=blang/latex:ubuntu | ||
| 25 | latex.pdf.docker.commands=pdflatex -shell-escape index.tex; pdflatex -shell-escape index.tex | ||
| 26 | {{/code}} | ||
| 27 | |||
| 28 | The 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>>doc:documentation.extensions.admin.latex.pdf-conversion.WebHome]]. | ||
| 29 | |||
| 30 | == Local Process Converter Properties == | ||
| 31 | |||
| 32 | ##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. | ||
| 33 | |||
| 34 | {{code language="none"}} | ||
| 35 | latex.pdf.process.commands=pdflatex -shell-escape index.tex | ||
| 36 | latex.pdf.process.commands=pdflatex -shell-escape index.tex | ||
| 37 | {{/code}} | ||
| 38 | |||
| 39 | A 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. | ||
| 40 | |||
| 41 | The commands run in the directory holding the unzipped package, which is where ##index.tex## and, once they succeed, ##index.pdf## are. |