Notify on pdf compilation
Watching a pdf render from org-mode generated tex files is an exercise in futility. A simple watchexec command with a notifier is much nicer.
1watchexec \
2 -e tex -e bib \
3 -- \
4 sh -c '
5 # Main source file – change this if you compile a different document.
6 src="rgDraft_I.tex"
7 pdf="${src%.tex}.pdf"
8
9 # Run Tectonic with shell‑escape enabled.
10 if tectonic -X compile -Z shell-escape "$src"; then
11 notify-send \
12 -u normal \
13 -i document-save \
14 "✅ TeX compiled" \
15 "$pdf ready"
16 else
17 notify-send \
18 -u critical \
19 -i document-save-as \
20 "❌ TeX compilation failed" \
21 "Check terminal for error messages"
22 fi
23 '
Could become a more full fleged script later.
Comments
