Created
May 7, 2014 16:21
-
-
Save tynn/d8cdef9985bc08e3d64b to your computer and use it in GitHub Desktop.
Create pdf from tex files with the table of contents and other lists included, since pdflatex will be invoked twice. You'll only get the pdf, not any other output file.
This file contains 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 characters
#!/bin/sh | |
# 2014 CC0 http://creativecommons.org/publicdomain/zero/1.0/ | |
# Create pdf from tex files. | |
[ $# -lt 1 ] && echo Usage: $0 tex-file && exit 1 | |
OUT=/tmp/pdflatex+out | |
[ -d $OUT ] || mkdir $OUT | |
PL="pdflatex -file-line-error -halt-on-error -output-directory $OUT" | |
for file in "$@" | |
do [ -f "$file" ] && $PL -draftmode "$file" && $PL "$file" | |
done | |
mv $OUT/*.pdf . 2>/dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment