The included files in this directory serve as test input and usage example for users of gokhlayeh/latex
.
eps/
main.tex
Very simple LaTeX document showcasing the use of PostScript graphics using thegraphicx
package.signal.eps
Demo PostScript graphic.
fontawesome5/
main.tex
Very simple LaTeX document demonstrating the use of FontAwesome icons. Very useful for composing Tikz illustrations.
gnuplot/
.latexmkrc
Configuration forlatexmk
, defining a custom rule to compile.gnuplot
files, generated by Tikz, into.table
files.main.tex
Very simple LaTeX document demonstrating how to render plots withgnuplot
. Note that Tikz's GNU plot feature relies either on--shell-escape
or an external builder. This example useslatexmk
to compile.gnuplot
files.
pdf2svg/
.latexmkrc
Configuration forlatexmk
users, which ensures thatpdflatex
is invoked with--shell-escape
.main.tex
Very simple LaTeXstandalone
document, rendering a Tikz image. The resulting PDF will be converted to SVG.
plantuml/
.latexmkrc
Configuration forlatexmk
users, which ensures thatlualatex
is invoked with--shell-escape
. Unlike the other documents this one must be compiled with source/build directory being the same (limitation of plantuml LaTeX package)!main.tex
Very simple LaTeX document showcasing the use of inline PlantUML code.
pythontex/
.latexmkrc
Configuration forlatexmk
users, which ensures that PythonTeX is ran on anypytxcode
in the build directory.main.tex
Very simple document showcasing the use of PythonTeX in a LaTeX document.
svg/
.latexmkrc
Configuration forlatexmk
users, which ensures thatpdflatex
is invoked with--shell-escape
.main.tex
Very simple LaTeX document renderingsignals.svg
.signals.svg
Demo SVG graphic.
Note: This setup (except plantuml/...
and pdf2svg/...
) expects to run with separate source/build directories. See latexmk
's -outdir=...
option.
The resulting PDF document should contain the expanded Python output.
When using Visual Studio Code and LaTeX Workshop ensure your .vscode/settings.json
contains the following:
{
// requires LaTeX Workshop extension (james-yu.latex-workshop)
"latex-workshop.docker.enabled": true,
"latex-workshop.docker.image.latex": "gokhlayeh/latex", // >= v2
"latex-workshop.latex.outDir": "%DIR%/build", // separate build artifacts from LaTeX source
}
Afterwards, simply open the main.tex
document in vscode and build it using LaTeX Workshop latexmk 🔃
recipe.
Compiling the example document by hand using gokhlayeh/latex
is simple:
git clone https://github.com/ChiefGokhlayeh/latex.git
cd latex/test
docker pull gokhlayeh/latex
docker run \
-t \
--rm \
-v "$(pwd):/workspace" \
-w '/workspace/pythontex' \
gokhlayeh/latex \
latexmk \
-outdir=build \
-pdf \
main.tex