Set up build system

This commit is contained in:
Andreas Tsouchlos 2025-03-04 09:26:49 +01:00
parent 5dca53926f
commit 3963fe0992
5 changed files with 52 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
build/

3
.latexmkrc Normal file
View File

@ -0,0 +1,3 @@
$pdflatex="pdflatex -shell-escape -interaction=nonstopmode -synctex=1 %O %S";
$out_dir = 'build';
$pdf_mode = 1;

14
Dockerfile Normal file
View File

@ -0,0 +1,14 @@
FROM alpine:3.19
RUN apk update && apk upgrade
RUN apk add make texlive texmf-dist-pictures
RUN apk add texmf-dist-publishers texmf-dist-science texmf-dist-fontsextra texmf-dist-latexextra
RUN apk add biber texmf-dist-bibtexextra
# The 'bbm' package insists on generating stuff in the home directory. In
# order to guarantee access to the home directory no matter the user the
# docker container is run with, create a temporary one anyone can write to
RUN mkdir /tmp/home
RUN chmod -R 777 /tmp/home
ENV HOME=/tmp/home

11
Makefile Normal file
View File

@ -0,0 +1,11 @@
all: build_folder paper.pdf
build_folder:
mkdir -p build/build
paper.pdf: paper.tex
latexmk -pdf paper.tex
clean:
rm -rf build

View File

@ -0,0 +1,23 @@
# KIT Library Hydration Study
Latex sources for a paper on the behavior of students at the KIT library with
regard to their water bottle refilling habits.
## Build
### Build manually
```bash
$ make
```
### Build using docker
1. Build docker image
```bash
$ docker build -f Dockerfile . -t bib-paper
```
2. Build examples
```bash
$ docker run --rm -v $PWD:$PWD -w $PWD -u `id -u`:`id -g` bib-paper make
```