Commit 9c86415c authored by Klemens Schüppert's avatar Klemens Schüppert
Browse files

Added howto use info in README.md

parent d4016543
Pipeline #27382 passed with stage
in 2 minutes and 45 seconds
# Docker PDF compiler
Docker image to compile our PDF files on git.uibk.ac.at
Docker image to compile our PDF projects on GitLab.
It can be accessed via GitLab [docker registry](https://git.uibk.ac.at/exphys/qos/cqed/docker-pdf-compiler/container_registry)
at docker.uibk.ac.at:443/exphys/qos/cqed/docker-pdf-compiler .
## Howto use
The main application for this project is
to provide the docker image
which is able to compile a pdf file automatically on GitLab by a CI/CD job.
However,
it is also useful to run this image on your local computer.
### CI/CD usage
You should activate the CI/CD function on GitLab.
To configure the automatic pdf compilation after a push,
a file named ".gitlab-ci.yml" needs to be in the root folder of the project
wit the following content:
```
compile_pdf:
image: docker.uibk.ac.at:443/exphys/qos/cqed/docker-pdf-compiler
variables:
- $foldername = '<path to paper>'
- $papername = '<name of paper>'
script:
- cd $foldername/
- compile $papername.tex
artifacts:
paths:
- $foldername/$papername.pdf
```
You should adjust <path to paper> and <name of paper>
(actually name of tex file without ".tex").
### Commandline usage
To save time (and probably hard disk space),
you could use this docker image for pdf compilation on your computer.
For a complete compilation of an PDF file with references,
includes pdflatex twice, bibtext, and pdflatex again,
you need to type the following command in the corresponding folder (<path to paper>):
```
docker run -v `pwd`:`pwd` -w `pwd` --user=$UID --name compile_pdf --rm -it docker.uibk.ac.at:443/exphys/qos/cqed/docker-pdf-compiler compile <name of paper>
```
For pdflatex/bibtex only, you replace compile with the desired command (here pdflatex):
```
docker run -v `pwd`:`pwd` -w `pwd` --user=$UID --name compile_pdf --rm -it docker.uibk.ac.at:443/exphys/qos/cqed/docker-pdf-compiler pdflatex <name of paper>
```
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment