Makes compiler work correctly for letter and fplreport
This commit is contained in:
parent
b53bb217db
commit
c1dd29f84d
1 changed files with 19 additions and 2 deletions
21
bin/compiler
21
bin/compiler
|
@ -27,7 +27,23 @@ textype() { \
|
||||||
biber --input-directory "$dir" "$base" &&
|
biber --input-directory "$dir" "$base" &&
|
||||||
$command --output-directory="$dir" "$base" &&
|
$command --output-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() {
|
shebangtest() {
|
||||||
case "$shebang" in
|
case "$shebang" in
|
||||||
|
@ -42,7 +58,8 @@ case "$file" in
|
||||||
*\.rmd) echo "require(rmarkdown); render('$file')" | R -q --vanilla ;;
|
*\.rmd) echo "require(rmarkdown); render('$file')" | R -q --vanilla ;;
|
||||||
*\.tex|*\.latex) textype "$file" ;;
|
*\.tex|*\.latex) textype "$file" ;;
|
||||||
#*\.md) pandoc "$file" --pdf-engine=xelatex -o "$base".pdf ;;
|
#*\.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 ;;
|
*config.h) make && sudo make install ;;
|
||||||
*\.c) cc "$file" -o "$base" && "$base" ;;
|
*\.c) cc "$file" -o "$base" && "$base" ;;
|
||||||
*\.py) python "$file" ;;
|
*\.py) python "$file" ;;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue