#L2H=/usr/bin/latex2html  
#L2HOPT= -html_version 4.0
#L2HFRAME=-image_type gif -no_math -html_version 4.0,math,frame
L2HFRAME= -no_math -html_version 4.0,math,frame
LATEX=latex --interaction batchmode
PDFLATEX=pdflatex --interaction batchmode
DVIPS=dvips
DVIPSOPT= -Pamz -Pcmz -ta4
DVIPDF=dvipdfm
DVIPDFOPT= -p a4
L2H=htlatex
#L2HOPT= "xhtml,mathml,mathplayer,myt4ht,frames,2" " -cunihtf" "-cvalidate"
#L2HOPT= "myt4ht,xhtml,mathml,frames,3,html" " -cunihtf" "-cvalidate" 
L2HOPT= "myt4ht,xhtml,mathml,frames,3" " -cunihtf" "-cvalidate"
$L2HFINISH=./o

%.ps: %.tex
	$(LATEX) $< ; $(LATEX) $<
	$(DVIPS) $(DVIPSOPT) -o $@ $*


%.pdf: %.tex
	$(PDFLATEX) $< ; $(PDFLATEX) $<

%.html : %.ps
	rm -f Notes/*
	$(L2H)  $* $(L2HOPT)
	./fixhtml.pl
        ./rejig.pl
	rm *ml
	touch $@

dvifiles= Notes.dvi

pdffiles= Notes.pdf

htmlfiles= Notes.html

htmldirs= Notes

dvi: $(dvifiles)

print: $(dvifiles)
	dvips $?
	touch print

ps: $(psfiles)

pdf: $(pdffiles)

html: $(htmlfiles)

all: pdf ps html

tar:
	rm -f Notes/*.pl Notes*/.*.db
	tar -cvzf QM.tar.gz *.pdf $(htmldirs)

clean:	
	rm  -r *~ *.log *.dvi *.4* $(htmldirs)/* *.ps *.aux *.html *.png *.tmp


depend::
Notes.pdf:  Introduction.tex ClassicalMechanics.tex Schrodinger.tex \
Squarewell.tex InfiniteWell.tex Scattering.tex Harmonic1.tex \
Formal.tex Ladder.tex TimeDependent.tex 3D.tex
Notes.html: Introduction.tex ClassicalMechanics.tex Schrodinger.tex \
Squarewell.tex InfiniteWell.tex Scattering.tex Harmonic1.tex \
Formal.tex Ladder.tex TimeDependent.tex 3D.tex
Notes.dvi: Introduction.tex ClassicalMechanics.tex Schrodinger.tex \
Squarewell.tex InfiniteWell.tex Scattering.tex Harmonic1.tex \
Formal.tex Ladder.tex TimeDependent.tex 3D.tex
