summaryrefslogtreecommitdiff
path: root/ar/.local/bin/compiler
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-01-29 13:09:03 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-01-29 13:09:03 +0900
commita3a3138a63849667d286a7eedd712ebe1646f313 (patch)
treea4002adaea4772e7fc9550500b08d0d37286ecd6 /ar/.local/bin/compiler
parent994aae6685c755d202b81de6068e968faec87ab5 (diff)
modified core/keymaps.lua, modified plugins/goyo.lua, modified bin/compiler
Diffstat (limited to 'ar/.local/bin/compiler')
-rwxr-xr-xar/.local/bin/compiler14
1 files changed, 8 insertions, 6 deletions
diff --git a/ar/.local/bin/compiler b/ar/.local/bin/compiler
index 32004c2..147dda9 100755
--- a/ar/.local/bin/compiler
+++ b/ar/.local/bin/compiler
@@ -27,7 +27,7 @@ textype() {
errorfmt="-file-line-error"
# ( sed 5q "$file" | grep -i -q 'xelatex' ) && command="xelatex"
secdir="$(dirname "$dir")"
- cd "$secdir"
+ cd "$secdir" || exit
if [ -f "${secdir}/Notes.tex" ]; then
echo "${secdir}/Notes.tex"
$command $errorfmt --output-directory="$secdir" "${secdir}/Notes.tex"
@@ -77,11 +77,13 @@ case "$file" in
*\.java) javac "$file" && echo "${base##*/}" | xargs java ;;
*\.js) node "$file" ;;
*\.m) octave "$file" ;;
-*\.md) [ -x "$(command -v lowdown)" ] &&
- lowdown --parse-no-intraemph "${file}" -Tms | groff -mpdfmark -ms -kept -T pdf >"${base}.pdf" ||
- [ -x "$(command -v groffdown)" ] &&
- groffdown -i "${file}" | groff -T pdf >"${base}.pdf" ||
- pandoc -t ms --highlight-style="kate" -s -o "${base}.pdf" "${file}" ;;
+*\.md)
+ { [ -x "$(command -v lowdown)" ] && [ -x "$(command -v groff)" ]; } &&
+ lowdown --parse-no-intraemph "${file}" -Tms | groff -mpdfmark -ms -kept -T pdf >"${base}.pdf" ||
+ { [ -x "$(command -v groffdown)" ] && [ -x "$(command -v groff)" ]; } &&
+ groffdown -i "${file}" | groff -T pdf >"${base}.pdf" ||
+ pandoc -t ms --highlight-style="kate" -s -o "${base}.pdf" "${file}"
+ ;;
*\.me) groff -Gktes -b -w w -me -T ps "$file" | ps2pdf - >"$base".pdf ;;
*\.mm) groff -Gktes -b -w w -mm -mpic -T ps "$file" | ps2pdf - >"$base".pdf ;;
*\.mom) pdfroff -pktes -b -wall -mom -mpdfmark "$file" >"$base".pdf ;;