Skip to content

Instantly share code, notes, and snippets.

@podgorskiy
Created September 27, 2020 15:12
Show Gist options
  • Save podgorskiy/9fdcf88be658e60dc3bee8ed3b22d848 to your computer and use it in GitHub Desktop.
Save podgorskiy/9fdcf88be658e60dc3bee8ed3b22d848 to your computer and use it in GitHub Desktop.
Makefile for LaTeX
TEX = max_print_line=10000 pdflatex -shell-escape -interaction=nonstopmode -file-line-error -halt-on-error
BIB = bibtex
VIEWER = evince
.PHONY: all view
view : rebuild
$(VIEWER) main.pdf &
rebuild: clean all
all : main.pdf
main.pdf : main.tex main.bbl main.blg
$(TEX) main.tex -draftmode
echo ************** FINAL **************
$(TEX) main.tex
main.bbl main.blg : references.bib main.aux
$(BIB) main
main.aux : main.tex
$(TEX) main.tex -draftmode
clean :
-rm -f *.aux main.out main.bbl main.blg main.pdf main.log main.lot main.lof main.toc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment