#--------------------------------------------------------------------------- # "$Id: Makefile.extrapdf,v 1.1.1.1 2002/03/30 19:37:32 tjn Exp $ # # This is getting more complex, I've used online as well as Jeff's OSCAR # stuff to try and get this as automated as possible. The figures and PDF # stuff are currently my goal. Eventually, I'll look at the 'html' target. # see comments for details. # #--------------------------------------------------------------------------- # full filename (eg. hello.tex) DOC=overview.tex # base of the filename (eg. hello) DOCBASE=overview # list of the figures (which typically are converted to eps) FIG_FILES = \ figs/mgr-mon.fig \ figs/nodemgr.fig # My hack b/c I need the input filenames to the eps->pdf to have eps extentions FIG_PDF_FILES = \ figs/mgr-mon.eps \ figs/nodemgr.eps # setups the conversion from .fig --> .eps EPS_FIGURES = $(FIG_FILES:.fig=.eps) PDF_FIGURES = $(FIG_PDF_FILES:.eps=.pdf) PWD=`pwd` #-------------------------------------------------------------------------- default: -@echo "Try using 'make ps' or 'make pdf'" ps: eps_figures $(DOC) -@echo "Processing the LaTeX document ($(DOC))" -@latex $(DOC) -@latex $(DOC) -@bibtex $(DOCBASE) -@latex $(DOC) -@latex $(DOC) -@dvips $(DOCBASE).dvi -o $(DOCBASE).ps -@echo "Created PS file ($(DOCBASE).ps)" pdf: pdf_figures $(DOC) -@echo "Processing the LaTeX document ($(DOC))" pdflatex $(DOCBASE) bibtex $(DOCBASE) pdflatex $(DOCBASE) pdflatex $(DOCBASE) -@echo "Created PDF ($(DOCBASE).pdf)" -@echo " NOTE: The 'pdflatex' cmd sometimes has problems with figures" # BIB2HTML: convert the BibTeX file to an HTML file # TTH: converts the LaTeX file to an HTML page, # (convert the figs to *.jpg, use -e2 make them inline) # (-e1 makes a link to this file, and w/o either would just link to *.eps) html: $(DOC) -@echo "Processing the LaTeX document ($(DOC))" -@latex $(DOC) -@latex $(DOC) -@bibtex $(DOCBASE) -@latex $(DOC) -@latex $(DOC) bib2html -s plain $(PWD)/$(DOCBASE).bib $(DOCBASE)-bib.html tth -e2 $(DOCBASE) -@echo "Created HTML ($(DOCBASE).html), etc." -@echo " NOTE: There are some problems with my HTML target...good luck!" eps_figures: $(EPS_FIGURES) echo "EPS figures if firing..." pdf_figures: $(PDF_FIGURES) echo "PDF figures if firing..." #I snagged these b/c I need the fig2eps and eps2pdf stuff, otherwise...untested. # see also: http://www.dgp.toronto.edu/~mac/dgp/tex_to_pdf.html # and: http://www.cl.cam.ac.uk/~mgk25/publ-tips.html # .SUFFIXES: .eps .pdf .tif .gif .jpg .pbm .pgm .ppm .dvi .fig .ps .tex $(SUFFIXES) .tif.eps: tifftopnm $< | pnmtops -noturn > $@ .gif.eps: giftopnm $< | pnmtops -noturn > $@ .jpg.eps: djpeg $< | pnmtops -noturn > $@ .pbm.eps: pnmtops -noturn $< > $@ .pgm.eps: pnmtops -noturn $< > $@ .ppm.eps: pnmtops -noturn $< > $@ .dvi.ps: dvips $< .dvi.eps: dvips -E $< -o $@ .tex.dvi: tex $< .fig.eps: fig2dev -L eps -c -p dummy_arg -z Letter $< $@ .eps.pdf: cat $< | tr \\015 \\012 | epstopdf --filter > $@ clean: rm -f *.aux *.bbl *.blg *.log *.dvi *.idx *.out cleanall: clean rm -f *.ps *.pdf *.html reallycleanall: clean cleanall rm -f figs/*.eps figs/*.pdf