X-Git-Url: https://pere.pagekite.me/gitweb/text-free-culture-lessig.git/blobdiff_plain/dad43cc96694bbc6b75ef2ff749893ef2e3cea2c..10b074280090a128a2be11328823951a147e60b6:/Makefile?ds=inline diff --git a/Makefile b/Makefile index 76dfdc4..878d03b 100644 --- a/Makefile +++ b/Makefile @@ -10,8 +10,8 @@ url = http://www.sslug.dk/~chlor/lessig/freeculture.sgml.2004-04-01.gz # titlepage, openany, draft, fleqn, leqno # -P latex.class.options=a5paper DBLATEX = dblatex \ - -T db2latex \ - --backend=xetex \ + -T simple \ + --indexstyle=myindexstyle.ist \ --param lingua=nb \ --xsl-user=data/user_param.xsl \ --xsl-user=data/xetex_param.xsl \ @@ -53,25 +53,43 @@ pdf: freeculture.nb.pdf freeculture.pdf epub: freeculture.nb.epub html: freeculture.html freeculture.nb.html -%.pdf: %.xml $(IMAGES) $(PDF_XSLT) -# $(DBLATEX) $< - -# Alternative processing path to dblatex is to use xmlto using fop to -# create PDF like this. The PDF output (visual design) is better, but -# the footnote handling is worse and images are missing. -# xmlto --noautosize \ -# -x data/stylesheet-fo.xsl \ -# --with-fop pdf $< - -# Third alternative is to use xsltproc and fop directly, as -# recommended by . -# This include images, but the index refs and footnote handling is -# broken. - xsltproc \ - --output $(subst .pdf,.fo,$@) \ - data/stylesheet-fo.xsl \ - $< - fop -c data/fop-params.xconf -fo $(subst .pdf,.fo,$@) -pdf $@ +%.pdf: %.xml $(IMAGES) $(PDF_XSLT) Makefile +# Possible pipelines: +# +# dblatex: +# This converts the docbook content to latex and leave it to latex +# to format it. +# +# xmlto: +# Alternative processing path to dblatex is to use xmlto using fop +# to create PDF like this. The PDF output (visual design) is +# better, but the footnote handling is worse and images are missing. +# +# docbook-xsl: +# Third alternative is to use xsltproc and fop directly, as +# recommended by . +# This include images, but the index refs and footnote handling +# is broken. + + pipeline=dblatex; \ + echo "Using $$pipeline pipeline" ; \ + case "$$pipeline" in \ + dblatex) \ + $(DBLATEX) $< ; \ + ;; \ + xmlto) \ + xmlto --noautosize \ + -x data/stylesheet-fo.xsl \ + --with-fop pdf $< ; \ + ;; \ + docbook-xsl) \ + xsltproc \ + --output $(subst .pdf,.fo,$@) \ + data/stylesheet-fo.xsl \ + $< ; \ + fop -c data/fop-params.xconf -fo $(subst .pdf,.fo,$@) -pdf $@ ; \ + ;; \ + esac pdf-compare: freeculture.xml $(IMAGES) dblatex -o freeculture-dblatex.pdf freeculture.xml @@ -108,7 +126,7 @@ freeculture.pot: freeculture.xml -f docbook -m $^ > $@.new && mv $@.new $@ stats: update-stats progress.png -update-stats: freeculture.nb.po +update-stats: freeculture.nb.po lint.nb ( \ printf "%s " $$(date +"%Y-%m-%dT%H%M") ; \ msgfmt -o /dev/null --statistics freeculture.nb.po 2>&1 \