Skip to content

Instantly share code, notes, and snippets.

@freedomcat
Created July 20, 2011 14:08
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 freedomcat/1095020 to your computer and use it in GitHub Desktop.
Save freedomcat/1095020 to your computer and use it in GitHub Desktop.
自分用latex Makefile
#
# Makefile for latex
# Date: 2011/07/20
# Update:2011/07/22
# Authro:shino <shino@freedomcat.com>
#
DOC =talk
FIGDIR =./img
TEX =/usr/local/teTeX/bin/platex
DVIPDFM =/usr/local/teTeX/bin/dvipdfmx
PDFOPT =-f takao.map
.SUFFIXES:
.SUFFIXES: .tex .dvi .pdf .jpg .eps
# transration rules
.tex.dvi:
$(TEX) $<
$(TEX) $<
# command
all: $(DOC).dvi
$(DOC).dvi: $(DOC).tex
pdf:
$(DVIPDFM) $(PDFOPT) $(DOC).dvi
.jpg.eps:
convert $< eps2:$@
eps:$(FIGDIR)/*.jpg
make $(^:%.jpg=%.eps)
clean:
rm -f $(DOC).aux $(DOC).log $(DOC).toc $(DOC).dvi
rm -f $(DOC).pdf $(DOC).tex~ $(DOC).lof $(DOC).lot
rm -f $(DOC).out $(DOC).nav $(DOC).snm
cleanall: clean
rm -f $(FIGDIR)/*.eps
help:
@echo "\nusage: make [<target>]\n"
@echo "help:\t\tこのメッセージを表示する"
@echo "eps:\tEPS ファイル $(FIGDIR)/*.eps を作成する"
@echo "all:\t\tDVI ファイル $(DOC).dvi を作成する"
@echo "pdf:\t\tPDF ファイル $(DOC).pdf を作成する"
@echo "clean:\t\t一次ファイルを削除する"
@echo "cleanall:\t一次ファイル $(FIGDIR)/*.epsファイルを削除する"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment