From 7d3b042daf9c62be1947729fb8b65f3c12b271cf Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Tue, 4 Jun 2019 16:34:32 -0400 Subject: [PATCH] dox and -j rmd --- .local/bin/tools/compiler | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.local/bin/tools/compiler b/.local/bin/tools/compiler index 7d3bf1d9..f9e80bd6 100755 --- a/.local/bin/tools/compiler +++ b/.local/bin/tools/compiler @@ -1,10 +1,10 @@ #!/bin/sh + # This script will compile or run another finishing operation on a document. I # have this script run via vim. # -# Compiles .tex. groff (.mom, .ms), .rmd, .md. -# Opens .sent files as sent presentations. -# Runs scripts based on extention or shebang +# Compiles .tex. groff (.mom, .ms), .rmd, .md. Opens .sent files as sent +# presentations. Runs scripts based on extention or shebang file=$(readlink -f "$1") dir=$(dirname "$file") @@ -23,8 +23,9 @@ textype() { \ } case "$file" in - *\.ms) refer -PS -e "$file" | groff -me -ms -kejpt -T pdf > "$base".pdf ;; - *\.mom) refer -PS -e "$file" | groff -mom -kejpt -T pdf > "$base".pdf ;; + *\.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 ;; *\.tex) textype "$file" ;; *\.md) pandoc "$file" --pdf-engine=xelatex -o "$base".pdf ;;