# programs JADE = jade # directory for PNG versions of equations FIGDIR = figures # other files DOC = sampler DSL = sample-both.dsl MATHSS = TeXMath.dsl HMATHSS = HTMLMath.dsl XMLDCL = /opt/jade/share/xml.dcl FO_XSL = /usr/share/sgml/docbook-xsl-1.59.1/fo/docbook.xsl all: pdf html # to make PDF from tex source, using DSSSL, run pdfjadetex 3 times pdf: $(DOC).sgml jadetex.cfg $(JADE) -t tex -d $(DSL)\#print $(DOC).sgml ./unescape_math.pl $(DOC).tex pdfjadetex $(DOC) pdfjadetex $(DOC) pdfjadetex $(DOC) # it works on XML too... xmlpdf: $(DOC).xml $(DSL) $(MATHSS) $(JADE) -t tex -d $(DSL)\#print $(XMLDCL) $(DOC).xml ./unescape_math.pl $(DOC).tex pdfjadetex $(DOC) pdfjadetex $(DOC) pdfjadetex $(DOC) # some might prefer using saxon and pdfxmltex... # (currently broken on my system) # altpdf: $(DOC).xml # saxon $(DOC).xml $(FO_XSL) \ # passivetex.extensions=1 tex.math.in.alt=latex > $(DOC).fo # pdfxmltex $(DOC).fo # pdfxmltex $(DOC).fo # to make HTML, make PNG images out of the equations and # process the SGML source with jade html: $(DOC).sgml $(DSL) $(HMATHSS) cd html_out && mkdir -p $(FIGDIR) && \ $(JADE) -t sgml -ihtml -V nochunks -d ../$(DSL)\#html \ ../$(DOC).sgml > $(DOC).html && \ ../texmath2png.pl equation-list.sgml # Or we can make html from the xml version of the sampler... althtml: $(DOC).xml $(DSL) $(HMATHSS) cd html_out && mkdir -p $(FIGDIR) && \ $(JADE) -t sgml -ihtml -V nochunks -d ../$(DSL)\#html \ $(XMLDCL) ../$(DOC).xml > $(DOC).html && \ ../texmath2png.pl equation-list.sgml clean: rm -f html_out/$(DOC).* $(DOC).tex $(DOC).pdf *.log *.out *.aux *.fo rm -f html_out/equation-list.sgml rm -rf html_out/$(FIGDIR)