summaryrefslogtreecommitdiffstats
path: root/.local
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2025-03-02 16:53:01 +0100
committerLuke Smith <luke@lukesmith.xyz>2025-03-02 16:53:01 +0100
commit331acfb5ca03db9a4a6440c2332ddff1552a2715 (patch)
treeff642b5a67e8d655ee918b707976a9b66fdfb3b1 /.local
parent15071db7fae30e1fa52851b8ebb772fc913b4780 (diff)
parent7d262506579f04e0a42fa82c049dc922b45b58f1 (diff)
downloadeibhear-331acfb5ca03db9a4a6440c2332ddff1552a2715.tar.gz
eibhear-331acfb5ca03db9a4a6440c2332ddff1552a2715.tar.zst
eibhear-331acfb5ca03db9a4a6440c2332ddff1552a2715.zip
Merge branch 'aartoni-feat/latexmk'
Diffstat (limited to '.local')
-rwxr-xr-x.local/bin/compiler14
-rwxr-xr-x.local/bin/texclear9
2 files changed, 1 insertions, 22 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
diff --git a/.local/bin/texclear b/.local/bin/texclear
deleted file mode 100755
index 6ad3c12..0000000
--- a/.local/bin/texclear
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-# Clears the build files of a LaTeX/XeLaTeX build.
-# I have vim run this file whenever I exit a .tex file.
-
-[ "${1##*.}" = "tex" ] && {
- find "$(dirname "${1}")" -regex '.*\(_minted.*\|.*\.\(4tc\|xref\|tmp\|pyc\|pyg\|pyo\|fls\|vrb\|fdb_latexmk\|bak\|swp\|aux\|log\|synctex\(busy\)\|lof\|lot\|maf\|idx\|mtc\|mtc0\|nav\|out\|snm\|toc\|bcf\|run\.xml\|synctex\.gz\|blg\|bbl\)\)' -delete
-} || printf "Provide a .tex file.\n"
-