Last active
January 8, 2025 00:04
-
-
Save michaelfortunato/81a807f8b8b8206e8fcdae7d36c0f4fc to your computer and use it in GitHub Desktop.
Makefile for building TeX pdfs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This Makefile is to run commands. While justfiles are better purposed | |
# It is unlikely Make will go away and it works well enough for my needs. | |
TEX_FILE ?= main.tex | |
AUX_DIR := aux | |
.PHONY: pdf open clean | |
refresh: pdf reload | |
pdf: | |
docker run -v ".:/app" -w /app texlive/texlive:latest \ | |
latexmk -aux-directory=$(AUX_DIR) -pdf -synctex=true $(TEX_FILE) | |
open: pdf reload | |
sioyek $(shell basename $TEX_FILE).pdf | |
reload: | |
sioyek --execute-command reload | |
clean: | |
rm -rf $(AUX_DIR) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment