Created
December 12, 2011 20:57
-
-
Save cboettig/1469063 to your computer and use it in GitHub Desktop.
Makefile for Sweave documents to use nicer syntax highlighting
This file contains 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
RSCRIPT = Rscript | |
pdfclean: | |
rm -f *.pdf | |
clean: | |
rm -f index.html | |
rm -f *.tex *.bbl *.blg *.aux *.out *.log *.spl | |
all: pmc.pdf | |
pmc.pdf: pmc/pmc.Rnw | |
cp -f pmc/pmc.Rnw . | |
$(RSCRIPT) --vanilla -e "require(highlight); driver <- HighlightWeaveLatex(boxes = TRUE); Sweave( 'pmc.Rnw', driver = driver );" | |
# $(RSCRIPT) -e "tools::texi2dvi( 'pmc.tex', pdf = TRUE, clean = FALSE )" | |
# bibtex pmc | |
$(RSCRIPT) -e "tools::texi2dvi( 'pmc.tex', pdf = TRUE, clean = TRUE )" | |
# cp pmc/pmc-fake.Rnw pmc.Rnw | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment