blob: 46e1570f506f04e90131f4950411192f65b9249e (
plain)
- # expensive checks enabled: make -B flightcheck=1
- # Final document: make -B final=1
- stem = eut
- source_baseurl = http://euwiki.org/
- source_basename = EUT/2nd-edition
- citeproc_file = $(stem).bib
- templates = template.tex header.tex before.tex after.tex
- filters = ./pandoc-memoir ./pandoc-cs1 ./pandoc-todo
- filters += $(if $(citeproc_file),pandoc-citeproc)
- filters += ./pandoc-iri
- markdown_includes = copyright.md colophon.md
- includes += $(markdown_includes:.md=.tex)
- localfilters = $(filter ./%,$(filters))
- title = Ensuring utmost transparency
- subtitle = Free Software and Open Standards under the Rules of Procedure of the European Parliament
- env_filter += $(citeproc_file:%=PANDOC_CITEPROC_FILE=%)
- env_filter += $(if $(flightcheck),NETWORK_TESTS=1)
- args_filter += $(filters:%=--filter %)
- args_meta += $(citeproc_file:%=-M bibliography=%)
- args_meta += -V lang=english -V langoption=variant=british
- args_meta += -M title="$(title) - $(subtitle)"
- args_meta += -V title="$(title)"
- args_meta += -V subtitle="$(subtitle)"
- args_meta += -M author="Carlo Piana, Ulf Öberg"
- args_meta += -V author="Carlo Piana" -V author="Ulf Öberg"
- args_meta += -V date=""
- args_latex += --template=template.tex --latex-engine=xelatex
- args_latex += -H header.tex -B before.tex -A after.tex
- args_latex += -V mainfont="Lora" -V sansfont="Quattrocento Sans" -V monofont="Inconsolata"
- args_latex += -V documentclass=memoir -V pagestyle=plain -V headstyles=komalike -V chapterstyle=ell
- args_latex += -V frontmatter=yes -V classoption=titlepage -V classoption=$(if $(final),final,draft)
- flavors = a4 book ebook
- args_a4 = -V papersize=a4paper -V fontsize=10pt -V classoption=oneside
- args_book = -V papersize=b5paper -V fontsize=10pt -V classoption=twoside
- args_ebook = -V papersize=ebook -V fontsize=12pt -V classoption=oneside -V classoption=openany
- all: $(flavors:%=$(stem)-%.pdf)
- download:
- ./mediawiki-fetch $(source_baseurl) $(source_basename) $(stem).raw
- $(stem).mw: $(stem).raw
- ./mediawiki-trim $< $@
- ./mediawiki-blockquote $@
- ./mediawiki-uri-escape $@
- ./mediawiki-matter $@
- $(stem).native: $(stem).mw $(localfilters)
- $(env_filter) pandoc -f mediawiki $(args_meta) $(args_filter) -o $@ $<
- $(markdown_includes:.md=.tex): %.tex: %.md
- pandoc -f markdown -t latex --chapters -o $@ $<
- $(flavors:%=$(stem)-%.pdf): $(stem)-%.pdf: $(stem).native $(templates) $(includes)
- pandoc --standalone $(args_meta) $(args_latex) $(args_$*) -o $@ $<
- clean:
- rm -f $(foreach ext,native bib mw,$(stem:%=%.$(ext)))
- rm -f $(includes)
- distclean: clean
- rm -f $(stem:%=%.raw)
|