summaryrefslogtreecommitdiffstats
path: root/.local/bin/compiler
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/compiler')
-rwxr-xr-x.local/bin/compiler7
1 files changed, 4 insertions, 3 deletions
diff --git a/.local/bin/compiler b/.local/bin/compiler
index 7d3bf1d..dcf79f1 100755
--- a/.local/bin/compiler
+++ b/.local/bin/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")
@@ -25,6 +25,7 @@ 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 ;;
+ *\.[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 ;;