|
@ -431,6 +431,13 @@ check_knitr () { |
|
|
main="${main%\.*}.tex" |
|
|
main="${main%\.*}.tex" |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
check_org () { |
|
|
|
|
|
if test -z "$prepare_cmd"; then |
|
|
|
|
|
prepare_cmd="emacs --batch --eval \"(load \\\"~/.emacs\\\")\" \"$main\" -f org-latex-export-to-latex --kill" |
|
|
|
|
|
fi |
|
|
|
|
|
main="${main%\.*}.tex" |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
log_cmd () { |
|
|
log_cmd () { |
|
|
log=$1 |
|
|
log=$1 |
|
|
shift |
|
|
shift |
|
@ -459,17 +466,18 @@ if test -z "$main" ; then |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
if test ! -r "$main" ; then |
|
|
|
|
|
die "Cannot read $main." |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
ext=${main##*\.} |
|
|
ext=${main##*\.} |
|
|
case "$ext" in |
|
|
case "$ext" in |
|
|
Rnw) check_knitr ;; |
|
|
Rnw) check_knitr ;; |
|
|
Rtex) check_knitr ;; |
|
|
Rtex) check_knitr ;; |
|
|
|
|
|
org) check_org ;; |
|
|
*) ;; |
|
|
*) ;; |
|
|
esac |
|
|
esac |
|
|
|
|
|
|
|
|
if test ! -r "$main" ; then |
|
|
|
|
|
die "Cannot read $main." |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
verbose "Creating temporary directories" |
|
|
verbose "Creating temporary directories" |
|
|
|
|
|
|
|
|
git_prefix=$(git rev-parse --show-prefix) |
|
|
git_prefix=$(git rev-parse --show-prefix) |
|
|