You can use this docker image locally to compile your LaTeX documents. Just map the directory with your files to the /thesis volume inside container and optionally set user ID to match you local user.
For user TUKE theses there is prepared Makefile with all needed settings and additional tools. Running it can be automated with the following script:
#!/usr/bin/env bash
docker container run --rm -it --user $(id -u):$(id -g) --volume .:/thesis kpituke/latex make "$@"
Save it as mkthesis.sh and make it executable with chmod +x mkthesis.sh. Then you can use it to compile printable version of your thesis with ./mkthesis.sh pdf, or watch and recompule ebook version with ./mkthesis.sh watch.
List of available targets can be displayed with ./mkthesis.sh help.
You can also use the image to compile your thesis with latexmk or other commands directly.
The image is based on Fedora because it allows to select individual TeXLive packages. It contains three base collections:
latexrecommended — recommended set of LaTeX packagesfontsrecommended — recommended set of LaTeX fontslangczechslovak — support for Slovak languageIt also includes following additional packages:
adjustbox — some utilities to adjust boxed contentbiblatex-iso690 — ISO690 styles for formatting BibLaTeX citationsdirtree – drawing directory treesglossaries — creating glossaries and lists of acronymsminted — colorful code syntax highlighting using Python Pygments librarymultirow — creating tabular cells spanning multiple rowspgfplots — creating normal/logarithmic plots in two and three dimensionssoul — letterspacing, underlining, highlightingstmaryrd — some additional mathematical symbolstcolorbox — colored and framed text boxestotalcount — typesetting total values of countersulem – underlining (for git-latexdiff)There are also some tools:
latexmk — fully automated LaTeX document generationmake — build automationtexcount — counting words in LaTeX documentschktex — checking LaTeX documents for common mistakesgit-latexdiff – visualizing differences between two document versions from Git historylatexpand – expanding \input and \include in LaTeX files (for git-latexdiff)If you need additional packages, you can list them in the packages file in the root of your project. Each package name should be on a separate line. The packages will be installed with dnf before the compilation.
texlive-multirow
texlive-beamer
Instead of RPM package names, you can specify name of LaTeX package (.sty) or class (.cls) file (apostrophes are required):
tex(multirow.sty)
tex(beamer.cls)
You can use this image to run CI jobs that would build PDF of your LaTeX document, so you can download it from the project page, but don't need to store it in the repository itself.
Use the following .gitlab-ci.yml file. You need to set name of your main TeX file in the MAIN_TEX_FILE variable. In some cases you may need to modify parameters passed to latexmk, for example, add -shell-escape if you use minted.
variables:
MAIN_TEX_FILE: name-of-main-tex-file-without-extension
pdf:
stage: build
image: git.kpi.fei.tuke.sk:4567/kpi/latex
before_script:
- /entrypoint.bash # Install packages specified in `packages` file
script:
- latexmk -pdf -interaction=nonstopmode $MAIN_TEX_FILE
artifacts:
paths:
- $MAIN_TEX_FILE.pdf
expire_in: 2 weeks
You can have a nice badge at the top of your Gitlab project page to access latest PDF of your document.
Go to the Settings → General → Badges and add badge with the following parameters:
download PDFhttps://git.kpi.fei.tuke.sk/%{project_path}/-/jobs/artifacts/%{default_branch}/raw/name-of-main-tex-file.pdf?job=pdfhttps://img.shields.io/badge/download-PDF-blue?logo=adobe-acrobat-readerDon't forget to change the name-of-main-tex-file in the link URL.
Content type
Image
Digest
sha256:d8de00aa3…
Size
373.3 MB
Last updated
about 1 year ago
docker pull kpituke/latex