add readlink to detected texroot
This commit is contained in:
parent
9bf6d1fd51
commit
11bfb7cb28
|
@ -18,7 +18,7 @@ cd "$dir" || exit 1
|
|||
|
||||
textype() { \
|
||||
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"
|
||||
( head -n5 "$file" | grep -qi 'xelatex' ) && command="xelatex"
|
||||
$command --output-directory="$dir" "$base" &&
|
||||
|
|
Loading…
Reference in New Issue