Merge pull request 'add makefile to build pdf' (#4) from makefile into master

This commit is contained in:
Stefan Haun 2020-04-13 22:03:03 +00:00
commit 84131ecd01
3 changed files with 35 additions and 0 deletions

View file

@ -0,0 +1,10 @@
.PHONY: clean
default: Aufnahmeantrag_aktiv.tex\
headfoot.tex
mkdir -p build
../latexdockercmd.sh pdflatex --output-directory=build Aufnahmeantrag_aktiv.tex
mv build/Aufnahmeantrag_aktiv.pdf .
clean:
rm -r build

View file

@ -1,2 +1,23 @@
# Mitgliederformulare
## Latex im Dockercontainer
- [Quelle](https://github.com/blang/latex-docker/)
- Docker Image ändern in latexdockercmd.sh
- derzeit das volle Ubuntu Image (~2.6GB)
### Aufruf
```bash
mkdir -p build
./latexdockercmd.sh pdflatex --output-directory=build <src>.tex
mv build <src>.pdf .
rm -r build
```
### Makefile
```bash
make
make clean
```

4
latexdockercmd.sh Executable file
View file

@ -0,0 +1,4 @@
#!/bin/sh
IMAGE=blang/latex:ubuntu
# IMAGE=blang/latex:ctanbasic
exec docker run --rm -i --user="$(id -u):$(id -g)" --net=none -v "$PWD":/data "$IMAGE" "$@"