forked from lgatto/spr
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (28 loc) · 896 Bytes
/
Makefile
File metadata and controls
39 lines (28 loc) · 896 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
setvars:
ifeq (${R_HOME},)
R_HOME= $(shell R RHOME)
endif
all: spr spr-4up.pdf fib fibonacci-4up.pdf spr.R fib.R rr
spr:
"$(R_HOME)/bin/R" --vanilla -e "library(knitr); knit2pdf('spr.Rnw');"
pdflatex spr.tex
fib:
"$(R_HOME)/bin/R" --vanilla -e "library(knitr); knit2pdf('fibonacci.Rnw');"
pdflatex fibonacci.tex
%-4up.pdf: %.pdf
pdfnup -q --nup 2x2 --suffix '4up' $<
spr.R:
R --vanilla -e 'Stangle("spr.Rnw")'
fib.R:
R --vanilla -e 'Stangle("fibonacci.Rnw")'
clean:
rm -f *.dvi *.aux *.log *.nav *.out *.snm *.toc *~ *vrb
rm -f */*~
rm -f rr.tex
rm -rf figure cache
rm -rf hist.pdf hist.png
rm -rf spr.tex rr.tex fibonacci.tex
rr.pdf: rr.md
pandoc -r markdown+simple_tables -t beamer --slide-level=2 --standalone -H rr-preamble.tex rr.md -o rr.pdf
rr.tex: rr.md
pandoc -r markdown+simple_tables -t beamer --slide-level=2 --standalone -H rr-preamble.tex rr.md -o rr.tex