install and explain ci
This commit is contained in:
parent
d03fdb7158
commit
a14506a1ce
4 changed files with 24 additions and 0 deletions
11
.gitlab-ci.yml
Normal file
11
.gitlab-ci.yml
Normal file
|
@ -0,0 +1,11 @@
|
|||
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
.latexmkrc
Normal file
4
.latexmkrc
Normal file
|
@ -0,0 +1,4 @@
|
|||
# 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';
|
8
README
8
README
|
@ -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
|
||||
|
|
1
tex/.latexmkrc
Symbolic link
1
tex/.latexmkrc
Symbolic link
|
@ -0,0 +1 @@
|
|||
../.latexmkrc
|
Loading…
Reference in a new issue