Created
January 1, 2019 02:12
-
-
Save vm-wylbur/b7ab1d16703789d2e251c48cad77305c to your computer and use it in GitHub Desktop.
create LaTeX from Rmd, using a Makefile, the HRDAG way
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
# | |
# Authors: PB | |
# Maintainers: PB | |
# Copyright: 2018, HRDAG, GPL v2 or later | |
# ============================================ | |
R_OPTS=--no-save --no-restore --no-init-file --no-site-file | |
KNITR="rmarkdown::render('$<', output_format='md_document', output_dir='output/')" | |
all: output/some-file.tex \ | |
output/some-file.tex: \ | |
src/some-file.Rmd | |
Rscript $(R_OPTS) -e $(KNITR) | |
pandoc -s output/some-file.md -t latex -o $@ | |
-rm output/some-file.md src/*html output/*html | |
# done. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment