add readlink to detected texroot
This commit is contained in:
parent
9bf6d1fd51
commit
11bfb7cb28
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ cd "$dir" || exit 1
|
||||||
|
|
||||||
textype() { \
|
textype() { \
|
||||||
command="pdflatex"
|
command="pdflatex"
|
||||||
texroot=$(grep -Poi "^ *% *\! *tex root *= *\w+(?:\.\w*)?" "$file" | cut -d "=" -f 2 | tr -d "[:blank:]")
|
texroot=$(readlink -f "$(grep -Poi "^ *% *\! *tex root *= *\w+(?:\.\w*)?" "$file" | cut -d "=" -f 2 | tr -d "[:blank:]")")
|
||||||
[ -n "$texroot" ] && base=$texroot && echo "Compiling from TeX root: $texroot"
|
[ -n "$texroot" ] && base=$texroot && echo "Compiling from TeX root: $texroot"
|
||||||
( head -n5 "$file" | grep -qi 'xelatex' ) && command="xelatex"
|
( head -n5 "$file" | grep -qi 'xelatex' ) && command="xelatex"
|
||||||
$command --output-directory="$dir" "$base" &&
|
$command --output-directory="$dir" "$base" &&
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue