From 2774d9fc67cd5d18fbc9b892fda9c05118272a7a Mon Sep 17 00:00:00 2001 From: Agathe Porte Date: Fri, 9 Feb 2018 13:32:31 +0100 Subject: Live compilation support --- .gitignore | 3 +++ Makefile | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index adc9640..49e926e 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,6 @@ *.out *.toc *.xdy +*.tns +*.pdf +*.dvi diff --git a/Makefile b/Makefile index 24dfd2d..48593ca 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # LaTeX basic Makefile # -# WTFPL, 2016 Agathe Porte (MicroJoe) +# WTFPL, 2016 - 2018 Agathe Porte (MicroJoe) # # Inspirated from # http://tex.stackexchange.com/questions/40738/how-to-properly-make-a-latex-project @@ -17,6 +17,10 @@ PRINC=src/main.tex # Main rule: Construct the PDF all: $(PDF) +# +# Live: automatic watch and build of the PDF file +live: $(PRINC) $(SOURCES) + source ~/.bashrc && latexmk -pvc -pdf -pdflatex="pdflatex -interaction=nonstopmode" -use-make $(PRINC) # Construct the PDF file from sources $(PDF): $(PRINC) $(SOURCES) @@ -45,4 +49,6 @@ clean: mrproper: clean @echo Removing all PDF files... @rm -f *.pdf + @echo Removing all DVI files... + @rm -f *.dvi @echo Done -- cgit v1.2.3