We're creating a fresh archive because the history for our old chapter includes API keys, data files, and other material we can't share.
35 lines
529 B
Makefile
35 lines
529 B
Makefile
#!/usr/bin/make
|
|
|
|
all: $(patsubst %.Rnw,%.pdf,$(wildcard *.Rnw))
|
|
pdf: all
|
|
|
|
%.tex: %.Rnw
|
|
#python3 ../code/LDA/make_latex_files.py
|
|
Rscript -e "library(knitr); knit('$<')"
|
|
|
|
%.pdf: %.tex vc
|
|
grep -v -e '^.usepackage.longtable.$$' $<| sponge $<
|
|
latexmk -f -pdf $<
|
|
|
|
clean:
|
|
latexmk -C *.tex
|
|
rm -f *.tmp
|
|
rm -f *.tex
|
|
rm -rf figure/
|
|
rm -f *.bbl
|
|
rm -rf cache/
|
|
rm -rf *.run.xml
|
|
rm -f vc
|
|
|
|
viewpdf: all
|
|
evince *.pdf
|
|
|
|
spell:
|
|
aspell -c -t --tex-check-comments -b text.tex
|
|
|
|
vc:
|
|
resources/vc-git
|
|
|
|
.PHONY: clean all
|
|
.PRECIOUS: %.tex
|