Skip to content

Instantly share code, notes, and snippets.

@tklam
Created July 27, 2015 13:57
Show Gist options
  • Save tklam/240f7bf64fa5c042f17b to your computer and use it in GitHub Desktop.
Save tklam/240f7bf64fa5c042f17b to your computer and use it in GitHub Desktop.
compile Latex and Bibtex sources into a pdf
#!/bin/sh
source=`basename $1 .tex`
rm *.bbl}
latex ${source} && bibtex ${source} && latex ${source} && latex ${source}
dvips -t letter ${source}.dvi
ps2pdf -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dMaxSubsetPct=100 \
-dSubsetFonts=true -dEmbedAllFonts=true ${source}.ps
rm ${source}.ps ${source}.out ${source}.log ${source}.aux ${source}.dvi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment