Makes compiler work correctly for letter and fplreport

Jonathan Hodgson 6 years ago
parent da8e136aae
commit 782795779b
  1. 21
      bin/compiler

@ -27,7 +27,23 @@ textype() { \
biber --input-directory "$dir" "$base" &&
$command --output-directory="$dir" "$base" &&
$command --output-directory="$dir" "$base"
}
}
mdtype() {\
type="${2:-default}"
case "$type" in
"letter")
pandoc --template template-letter.tex "$file" -o "${base}.pdf"
;;
"fplreport")
pandoc --template fellowship.latex --pdf-engine=xelatex "$file" -o "${base}.pdf"
;;
*)
pandoc "$file" -o "${base}.pdf"
;;
esac
}
shebangtest() {
case "$shebang" in
@ -42,7 +58,8 @@ case "$file" in
*\.rmd) echo "require(rmarkdown); render('$file')" | R -q --vanilla ;;
*\.tex|*\.latex) textype "$file" ;;
#*\.md) pandoc "$file" --pdf-engine=xelatex -o "$base".pdf ;;
*\.md) pandoc "$file" -o "$base".pdf ;;
#*\.md) pandoc "$file" -o "$base".pdf ;;
*\.md) mdtype "$file" "$2" ;;
*config.h) make && sudo make install ;;
*\.c) cc "$file" -o "$base" && "$base" ;;
*\.py) python "$file" ;;

Loading…
Cancel
Save