Skip to content
Snippets Groups Projects
Commit a14506a1 authored by Felix Hilsky's avatar Felix Hilsky
Browse files

install and explain ci

parent d03fdb71
No related branches found
No related tags found
No related merge requests found
image: mirisbowring/texlive_ctan_full:2019
compiling:
script:
# use settings from .latexmkrc
- latexmk
- mv out/main.pdf Felix-Hilsky-FANA-HA-SoSe2020.pdf
artifacts:
paths:
- "Felix-Hilsky-FANA-HA-SoSe2020.pdf"
expire_in: 40 weeks
# 4 = lualatex, do not know why this magic number, see CTAN repository with latexmkrc examples
$pdf_mode= 4 ;
@default_files = ('.maindir/tex/main.tex');
$out_dir = '.maindir/out';
......@@ -7,3 +7,11 @@ Man kann jede Datei im Ordner /tex einzeln kompilieren. Dafür sind einige Hürd
• \docStart und \docEnd hätten eigentlich ein environment sein sollen. Dabei gab es aber den Fehler, dass dieses Environment angeblich nicht beendet wurde bevor das Dokument mit \end{document} beendet wurde. Interessanterweise konnte ich den Fehler aber nicht zuverlässig reproduzieren, sondern nur bei Dateien, die keine weiteren eingefügt haben oder irgendeine andere irrelevante Eigenschaft haben.
• Die Datei tex/_TEMPLATE.tex beinhaltet die Dinge, die in jede (Unter-)datei, die auch alleine kompilieren soll, rein muss. Beim erstellen eines neuen Kapitels kopiert man also _TEMPLATE.tex.
• In order to have a clean repo without all the cluttering temporary latex files there exists the .latexmkrc file in the main directory and a symlink to it in the /tex directory. It specifies to put these files into /out, no matter where you are (thanks to .maindir) and to use lualatex.
• If you work with gitlab you can use the CI. For this there is the .gitlab-ci.yml file that tells gitlab to compile the main file and make it avaiable as an artifact. Then it is avaiable under the api link
https://your.gitlab.instance.de/api/v4/projects/your-project-id/jobs/artifacts/master/raw/main.pdf?job=compiling
You get the project id visible on the main page of your project. master is the branch you want to use for that continous compiling and compiling is the name of the job, specified in the .gitlab-ci.yml. main.pdf is the name of the file generated, specified via the main tex-file name and the .latexmkrc.
For example this gives:
https://gitlab.mn.tu-dresden.de/api/v4/projects/44/jobs/artifacts/master/raw/out/skript-numerik-sander.pdf?job=compiling
../.latexmkrc
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment