#------------------------------------------------------------------------- # Mon Feb 04 2002 13:25:59PM modified by: tjn # # "Makefile" -- my simple helper for generating LaTeX docs # (cuts down on the typeing, I run things a couple of times # and at times this may be too much, but it's ok on fast boxes.) # Note, you have to run standard docs thru twice (two-pass parse/compile) ;) # # Example usage (after setting DOC & DOCBASE values): # tjn[1]: $ make # # tjn[2]: $ make ps # # tjn[3]: $ make clean # tjn[4]: $ gv DOCBASE.ps # tjn[5]: $ make cleanall # # In step [4] we view the "mydoc.ps" file that was generated, # in the Ghostview postscript viewer. The [3] & [5] steps # get rid of the temp files (ie *.log, *.aux, etc.) and # target (ie *.ps,*.pdf) files. # # This doesn't deal with the figures, especially the 'html' target, # see comments for details. # # NOTE: All this does is run 'latex' & 'bibtex' against the LaTeX source # in the correct order to generate the output DVI file. Then # when you do a 'make ps' it will convert the DVI->Postscript. # #------------------------------------------------------------------------- # full filename (eg. hello.tex) DOC=quick_example.tex # base of the filename (eg. hello) DOCBASE=quick_example PWD=`pwd` # # The remainder shouldn't need changing. #------------------------------------------------------------------------- all: $(DOC) -@echo "Processing the LaTeX document ($(DOC))" -@latex $(DOC) -@latex $(DOC) -@bibtex $(DOCBASE) -@latex $(DOC) -@latex $(DOC) ps: -@echo "Creating PS file ($(DOCBASE).ps)" -@dvips $(DOCBASE).dvi -o $(DOCBASE).ps pdf: -@echo "Creating PDF ($(DOCBASE).pdf)" -@echo " NOTE: The 'pdflatex' cmd sometimes has problems with figures" pdflatex $(DOCBASE) # 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: bib2html -s plain $(PWD)/$(DOCBASE).bib $(DOCBASE)-bib.html tth -e2 $(DOCBASE) clean: rm -f *.aux *.bbl *.blg *.log *.dvi *.idx *.out cleanall: clean rm -f *.ps *.pdf *.html