Skip to content

Instantly share code, notes, and snippets.

@mono0x
Last active December 17, 2015 04:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mono0x/5552523 to your computer and use it in GitHub Desktop.
Save mono0x/5552523 to your computer and use it in GitHub Desktop.
LaTeX
TEX = master.tex
DVI = $(TEX:.tex=.dvi)
PDF = $(TEX:.tex=.pdf)
AUX = $(TEX:.tex=.aux)
TMP = $(TEX:.tex=.bbl) $(TEX:.tex=.blg) $(TEX:.tex=.log)
BIB = $(wildcard *.bib)
PRN = $(wildcard *.prn)
PNG = $(wildcard *.png)
JPG = $(wildcard *.jpg)
EPS = $(PRN:.prn=.eps) $(PNG:.png=.eps) $(JPG:.jpg=.eps)
.PHONY: all clean watch
all: $(PDF)
watch:
xdvi -watchfile 5 $(DVI)
clean:
rm -f $(PDF) $(DVI) $(AUX) $(EPS) $(TMP)
$(PDF): $(DVI)
dvipdfmx $<
$(DVI): $(TEX) $(BIB) $(EPS)
platex $<
pbibtex $(AUX)
platex $<
platex $<
%.eps: %.prn
epstool --copy -b $< $@
%.eps: %.png
convert $< eps2:$@
%.eps: %.jpg
convert $< eps2:$@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment