rmakrdown fixes and .Rmd handler
This commit is contained in:
parent
ae0fadd673
commit
0b4ca15f02
2 changed files with 2 additions and 2 deletions
|
@ -26,7 +26,7 @@ case "$file" in
|
||||||
*\.ms) refer -PS -e "$file" | groff -me -ms -kept -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 ;;
|
*\.mom) refer -PS -e "$file" | groff -mom -kept -T pdf > "$base".pdf ;;
|
||||||
*\.[0-9]) refer -PS -e "$file" | groff -mandoc -T pdf > "$base".pdf ;;
|
*\.[0-9]) refer -PS -e "$file" | groff -mandoc -T pdf > "$base".pdf ;;
|
||||||
*\.rmd) echo "require(rmarkdown); rmarkdown::render('$file', quiet=TRUE)" | R -q --vanilla ;;
|
*\.[rR]md) Rscript -e "require(rmarkdown); rmarkdown::render('$file', quiet=TRUE)" ;;
|
||||||
*\.tex) textype "$file" ;;
|
*\.tex) textype "$file" ;;
|
||||||
*\.md) pandoc "$file" --pdf-engine=xelatex -o "$base".pdf ;;
|
*\.md) pandoc "$file" --pdf-engine=xelatex -o "$base".pdf ;;
|
||||||
*config.h) sudo make install ;;
|
*config.h) sudo make install ;;
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
basename="$(echo "$1" | sed 's/\.[^\/.]*$//')"
|
basename="$(echo "$1" | sed 's/\.[^\/.]*$//')"
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
*.tex|*.md|*.rmd|*.ms|*.me|*.mom) setsid "$READER" "$basename".pdf >/dev/null 2>&1 & ;;
|
*.tex|*.md|*.[rR]md|*.ms|*.me|*.mom) setsid "$READER" "$basename".pdf >/dev/null 2>&1 & ;;
|
||||||
*.[0-9]) setsid "$READER" "$basename".pdf >/dev/null 2>&1 & ;;
|
*.[0-9]) setsid "$READER" "$basename".pdf >/dev/null 2>&1 & ;;
|
||||||
*.html) setsid $BROWSER "$basename".html >/dev/null 2>&1 & ;;
|
*.html) setsid $BROWSER "$basename".html >/dev/null 2>&1 & ;;
|
||||||
*.sent) setsid sent "$1" >/dev/null 2>&1 & ;;
|
*.sent) setsid sent "$1" >/dev/null 2>&1 & ;;
|
||||||
|
|
Loading…
Reference in a new issue