Add dockerfiles and README.md

This commit is contained in:
Andreas Tsouchlos 2023-12-21 02:16:25 +01:00
parent 23a62869be
commit e141782b2b
5 changed files with 55 additions and 0 deletions

View File

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

33
README.md Normal file
View File

@ -0,0 +1,33 @@
# latex-common
Repository containing common latex code that can be shared across multiple projects.
## Usage
Put
```latex
\input{common.tex}
```
in your preamble. See the `examples` folder for usage examples.
## Build examples
### Build manually
```bash
$ latexmk example.tex
```
### Build using docker
1. Build docker image
```bash
$ docker build -f dockerfile/Dockerfile.alpine . -t latex-common
```
2. Build example
```bash
$ docker run --rm -v $PWD:$PWD -w $PWD `id -u`:`id -g` latex-common latexmk example.tex
```

View File

@ -0,0 +1,5 @@
FROM alpine:3.19
RUN apk update && apk upgrade
RUN apk add texlive
RUN apk add texmf-dist-pictures

View File

@ -0,0 +1,9 @@
FROM archlinux:latest
RUN pacman-key --init
RUN pacman-key --populate archlinux
RUN pacman -Sy archlinux-keyring --noconfirm && pacman -Su --noconfirm
# RUN pacman-key --refresh-keys
RUN pacman -Syu --noconfirm
RUN pacman -S perl texlive texlive-binextra texlive-pictures --noconfirm

View File

@ -0,0 +1,7 @@
FROM ubuntu:22.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt update -y && apt upgrade -y
RUN apt install neovim git -y
RUN apt install texlive latexmk texlive-pictures -y