summaryrefslogtreecommitdiffstats
path: root/local/bin/build-latex.sh
diff options
context:
space:
mode:
authorMitsuo Tokumori <[email protected]>2023-11-24 00:44:34 -0500
committerMitsuo Tokumori <[email protected]>2023-11-24 00:44:34 -0500
commitdbf6639677796336bdb345efb70736d29c44f60f (patch)
treee8427d394fe51939b43b28f9cb01c863451406df /local/bin/build-latex.sh
parent6e515b6902c537e742c2408783459e6a0ad10fa0 (diff)
downloaddotfiles-dbf6639677796336bdb345efb70736d29c44f60f.tar.gz
dotfiles-dbf6639677796336bdb345efb70736d29c44f60f.tar.bz2
dotfiles-dbf6639677796336bdb345efb70736d29c44f60f.zip
Add my bash scripts
Diffstat (limited to 'local/bin/build-latex.sh')
-rwxr-xr-xlocal/bin/build-latex.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/local/bin/build-latex.sh b/local/bin/build-latex.sh
new file mode 100755
index 0000000..7048246
--- /dev/null
+++ b/local/bin/build-latex.sh
@@ -0,0 +1,21 @@
+# Build single latex file using xelatex
+
+if [ $# -ne 1 ]; then
+ echo "Usage: $(basename "$0") FILE"
+ exit 1
+fi
+
+cleanup() {
+ # cleanup of auxiliary files
+ rm -f *.aux *.fls *.fdb_latexmk
+ # rm *.log
+}
+
+xelatex $1 || exit # Initial compilation
+#bibtex # Bibliography tool
+#xelatex $1 || exit # Incorporate bibliography changes
+xelatex $1 || exit # Fix cross-references
+#xelatex $1 || exit # 4th run just to be safe
+cleanup
+echo "## Mispelled words:"
+pdftotext "${1%.tex}.pdf" - | hunspell -d en_US -i utf-8 -a | sort | uniq