Created
January 1, 2019 02:12
Star
You must be signed in to star a gist
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