diff options
| author | Luke Smith <luke@lukesmith.xyz> | 2025-03-02 16:51:52 +0100 |
|---|---|---|
| committer | Luke Smith <luke@lukesmith.xyz> | 2025-03-02 16:51:52 +0100 |
| commit | 2ca3f80dd3e5c356c279c6088a29ae8751b4e4f7 (patch) | |
| tree | 4807b53a81eea467c67ff24af11dc5e70ebaa172 /.local/bin/compiler | |
| parent | 15071db7fae30e1fa52851b8ebb772fc913b4780 (diff) | |
| parent | f1c74050126755ca07299ed3438eccac3613812b (diff) | |
| download | eibhear-2ca3f80dd3e5c356c279c6088a29ae8751b4e4f7.tar.gz eibhear-2ca3f80dd3e5c356c279c6088a29ae8751b4e4f7.tar.zst eibhear-2ca3f80dd3e5c356c279c6088a29ae8751b4e4f7.zip | |
Merge branch 'feat/latexmk' of github.com:aartoni/dotfiles into aartoni-feat/latexmk
Diffstat (limited to '.local/bin/compiler')
| -rwxr-xr-x | .local/bin/compiler | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/.local/bin/compiler b/.local/bin/compiler index 214c98c..1c83910 100755 --- a/.local/bin/compiler +++ b/.local/bin/compiler @@ -6,9 +6,6 @@ # Compiles .tex. groff (.mom, .ms), .rmd, .md, .org. Opens .sent files as sent # presentations. Runs scripts based on extension or shebang. -# Note that .tex files which you wish to compile with XeLaTeX should have the -# string "xelatex" somewhere in a comment/command in the first 5 lines. - file="${1}" ext="${file##*.}" dir=${file%/*} @@ -40,15 +37,6 @@ case "${ext}" in sass) sassc -a "${file}" "${base}.css" ;; scad) openscad -o "${base}.stl" "${file}" ;; sent) setsid -f sent "${file}" 2> "/dev/null" ;; - tex) - textarget="$(getcomproot "${file}" || echo "${file}")" - command="pdflatex" - head -n5 "${textarget}" | grep -qi "xelatex" && command="xelatex" - ${command} --output-directory="${textarget%/*}" "${textarget%.*}" && - grep -qi addbibresource "${textarget}" && - biber --input-directory "${textarget%/*}" "${textarget%.*}" && - ${command} --output-directory="${textarget%/*}" "${textarget%.*}" && - ${command} --output-directory="${textarget%/*}" "${textarget%.*}" - ;; + tex) latexmk ;; *) sed -n '/^#!/s/^#!//p; q' "${file}" | xargs -r -I % "${file}" ;; esac |
