Skip to content

Instantly share code, notes, and snippets.

@vm-wylbur vm-wylbur/Makefile
Created Jan 1, 2019

Embed
What would you like to do?
create LaTeX from Rmd, using a Makefile, the HRDAG way
#
# 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
You can’t perform that action at this time.