Skip to content

Instantly share code, notes, and snippets.

@eiiches
Created June 24, 2011 16:34
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 eiiches/1045158 to your computer and use it in GitHub Desktop.
Save eiiches/1045158 to your computer and use it in GitHub Desktop.
Makefile for LaTeX
# vim: ft=make
TEX = platex
.SUFFIXES: .tex .dvi
.tex.dvi:
nkf -e $< | $(TEX) -no-parse-first-line -interaction=nonstopmode -shell-escape -jobname=$(basename $< .tex) /dev/stdin
nkf -e $< | $(TEX) -no-parse-first-line -interaction=nonstopmode -shell-escape -jobname=$(basename $< .tex) /dev/stdin
# .SUFFIXES: .dvi .pdf
# .dvi.pdf:
# dvipdfmx $<
.SUFFIXES: .dvi .ps
.dvi.ps:
dvips $<
.SUFFIXES: .ps .pdf
.ps.pdf:
ps2pdf $<
.SUFFIXES: .dvi .png
.dvi.png:
dvipng -D 1000 -T tight -bg Transparent -o $@ $<
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment