summaryrefslogtreecommitdiffstats
path: root/.local/bin
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2022-08-19 11:46:38 -0400
committerLuke Smith <luke@lukesmith.xyz>2022-08-19 11:46:38 -0400
commit1a37b0bc99d71899ea243448a315e611b51bea2e (patch)
tree000760852e8126d2e10bfaa47080ed6f87c0c0fa /.local/bin
parent03bcbdb2efa8dbe0a0f7f198d58d3e3896618eb0 (diff)
parentd92287afe0d055319ad7e3df95732be72d693d09 (diff)
downloadeibhear-1a37b0bc99d71899ea243448a315e611b51bea2e.tar.gz
eibhear-1a37b0bc99d71899ea243448a315e611b51bea2e.tar.zst
eibhear-1a37b0bc99d71899ea243448a315e611b51bea2e.zip
Merge branch 'patch-2' of https://github.com/ssnailed/voidrice into ssnailed-patch-2
Diffstat (limited to '.local/bin')
-rwxr-xr-x.local/bin/compiler2
1 files changed, 2 insertions, 0 deletions
diff --git a/.local/bin/compiler b/.local/bin/compiler
index 67992be..85a0c58 100755
--- a/.local/bin/compiler
+++ b/.local/bin/compiler
@@ -18,6 +18,8 @@ cd "$dir" || exit 1
textype() { \
command="pdflatex"
+ texroot=$(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" &&
grep -qi addbibresource "$file" &&