Created
May 28, 2018 04:03
-
-
Save keeferrourke/e740d420e55bc02ed48a5d80b4812de8 to your computer and use it in GitHub Desktop.
Revisions
-
keeferrourke revised this gist
May 28, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,7 @@ # the CC0 legalcode. if [ $# -eq 0 ]; then echo "usage: latexcompile FILE.tex [--open]" echo "cleanly compile LaTeX documents to PDF without cluttering the" \ working directory." exit 2 -
keeferrourke created this gist
May 28, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,34 @@ #!/bin/bash # # latexcompile # Keefer Rourke <[email protected]> # # To the extent possible under law, the person who associated CC0 with # latexcompile has waived all copyright and related or neighboring rights # to latexcompile. # # See <http://creativecommons.org/publicdomain/zero/1.0/> for a copy of # the CC0 legalcode. if [ $# -eq 0 ]; then echo "usage: latexcompile FILE.tex" echo "cleanly compile LaTeX documents to PDF without cluttering the" \ working directory." exit 2 fi BASE="${1%.*}" pdflatex $1 2>/dev/null 1>&2 if [ $? -ne 0 ]; then echo "Compilation error. Check log." exit 1 fi rm "$BASE.log" "$BASE.aux" "$BASE.out" if [ $2 == "--open" ] || [ $2 == "-o" ]; then xdg-open "$BASE.pdf" fi exit 0