19 lines
669 B
Makefile
19 lines
669 B
Makefile
LATEXMK := "latexmk -pvc"
|
|
|
|
build:
|
|
#!/usr/bin/env bash
|
|
ROOT="$PWD"
|
|
FILE=$(find . -type f \( -path './chapters/*' -name '*.tex' ! -name 'template.tex' \) -o -name 'thesis.tex' | sed 's|^\./||' | sort | fzf)
|
|
DIR=$(dirname "$FILE")
|
|
BASE=$(basename "$FILE" .tex)
|
|
kitty -e sh -c "cd '$DIR' && BIBINPUTS='$ROOT:' {{ LATEXMK }} -r '$ROOT/.latexmkrc' '$BASE.tex'" > /dev/null 2>&1 &
|
|
|
|
clean:
|
|
find . -type d \( -name build -o -name svg-inkscape -o -name .aux -o -name .out \) -exec rm -rf {} +
|
|
|
|
format:
|
|
lualatex -ini -jobname=thesis "&lualatex" mylatexformat.ltx thesis.tex
|
|
|
|
clean-format:
|
|
rm thesis.fmt thesis.log thesis.tex.bbl thesis.tex.blg
|