1
0
Fork 0

add readlink to detected texroot

This commit is contained in:
Luca Bilke 2022-08-15 15:08:31 +02:00
parent 9bf6d1fd51
commit 11bfb7cb28
1 changed files with 1 additions and 1 deletions

View File

@ -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" &&