Skip to content

Instantly share code, notes, and snippets.

@hazelybell
Created May 21, 2015 14:25
Show Gist options
  • Save hazelybell/9eab4650f6fb9e2ef952 to your computer and use it in GitHub Desktop.
Save hazelybell/9eab4650f6fb9e2ef952 to your computer and use it in GitHub Desktop.
$(NAME).pdf: *.cls $(NAME).tex *.bib $(FIGS)
$(LATEX) $(LATEX_OPTS) $(NAME).tex
@if(grep "There were undefined references" $(NAME).log > /dev/null);\
then \
$(BIBTEX) $(NAME); \
$(LATEX) $(LATEX_OPTS) $(NAME).tex; \
fi
@if(grep "Rerun" $(NAME).log > /dev/null);\
then \
$(LATEX) $(LATEX_OPTS) $(NAME).tex;\
fi
dvips -j0 -Ppdf -Pbuiltin35 -G0 -z $(NAME).dvi
gs -q -dPDFA \
-dNOPAUSE -dBATCH -dSAFER -dPDFSETTINGS=/prepress \
-dAutoFilterColorImages=false \
-dAutoFilterGrayImages=false \
-dAutoFilterMonoImages=false \
-dColorImageFilter=/FlateEncode \
-dGrayImageFilter=/FlateEncode \
-dMonoImageFilter=/FlateEncode \
-sDEVICE=pdfwrite -sOutputFile=$(NAME).pdf \
-c .setpdfwrite \
-f $(NAME).ps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment