From a6934232f73466cfa3c84d01550631b73d3b47c3 Mon Sep 17 00:00:00 2001 From: Bryan Jenks Date: Thu, 19 Dec 2019 03:24:55 -0800 Subject: [PATCH] Improve and more efficient RMarkdown Compilation (#435) The `rmakrdown::` portion makes sure that no other functions mask render, and its calling it from the required rmarkdown package, and the addition of the quiet portion isnt redundant with the R -q flag, i tested script and in Vim it reduces how much text and verbose messaging comes from pandoc at the bottom to about 3 lines. --- .local/bin/compiler | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/compiler b/.local/bin/compiler index 201064e..4b5432f 100755 --- a/.local/bin/compiler +++ b/.local/bin/compiler @@ -26,7 +26,7 @@ case "$file" in *\.ms) refer -PS -e "$file" | groff -me -ms -kept -T pdf > "$base".pdf ;; *\.mom) refer -PS -e "$file" | groff -mom -kept -T pdf > "$base".pdf ;; *\.[0-9]) refer -PS -e "$file" | groff -mandoc -T pdf > "$base".pdf ;; - *\.rmd) echo "require(rmarkdown); render('$file')" | R -q --vanilla ;; + *\.rmd) echo "require(rmarkdown); rmarkdown::render('$file', quiet=TRUE)" | R -q --vanilla ;; *\.tex) textype "$file" ;; *\.md) pandoc "$file" --pdf-engine=xelatex -o "$base".pdf ;; *config.h) sudo make install ;;