diff options
author | Jonas Smedegaard <dr@jones.dk> | 2015-03-24 19:17:25 +0100 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2015-03-24 19:17:25 +0100 |
commit | 9ff8ab21d79e4d1d59de8cf76b6f77373499c35b (patch) | |
tree | 46b355e3b91353c8527bfcbc4f38daf194df5259 | |
parent | fa299ec2b25c0ce9e536e066eb4d817e9b3cebbb (diff) |
Support optional cover page, and add it to A4 flavor.
-rw-r--r-- | Makefile | 10 | ||||
-rw-r--r-- | template.tex | 7 |
2 files changed, 14 insertions, 3 deletions
@@ -40,18 +40,21 @@ args_latex += -V frontmatter=yes -V classoption=titlepage -V classoption=$(if $( #flavors = a4 book ebook flavors = a4 ebook args_a4 = -V papersize=a4paper -V fontsize=10pt -V classoption=oneside -args_a4 += -M isbn="978-90-823692-1-2" +args_a4 += -M isbn="978-90-823692-1-2" -V coverpage="$(stem)-a4-front.pdf" 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 args_ebook += -M isbn="978-90-823692-0-5" all: $(flavors:%=$(stem)-%.pdf) -download: get-$(stem).raw +download: get-$(stem).raw get-$(stem)-a4-front.pdf get-$(stem).raw: get-%: ./mediawiki-fetch $(source_baseurl) $(source_basename) $* +get-$(stem)-a4-front.pdf: get-%: + wget -O $* http://www.greens-efa.eu/fileadmin/dam/Documents/Studies/Ensuring-Utmost-Transparency--Piana-Oberg-Korff.pdf + $(stem).mw: $(stem).raw ./mediawiki-trim $< $@ ./mediawiki-blockquote $@ @@ -65,6 +68,7 @@ $(markdown_includes:.md=.tex): %.tex: %.md pandoc -f markdown -t latex --chapters -o $@ $< $(flavors:%=deps-%):: $(templates) $(includes) Makefile +deps-a4:: $(deps) $(stem)-a4-front.pdf $(flavors:%=$(stem)-%.pdf): $(stem)-%.pdf: $(stem).native $(deps-all) deps-% pandoc --standalone --no-tex-ligatures $(args_meta) $(args_latex) $(args_$*) -o $@ $< @@ -74,4 +78,4 @@ clean: rm -f $(includes) distclean: clean - rm -f $(stem:%=%.raw) + rm -f $(stem:%=%.raw) $(stem:%=%-a4-front.pdf) diff --git a/template.tex b/template.tex index 1e27603..72f1ab8 100644 --- a/template.tex +++ b/template.tex @@ -164,6 +164,10 @@ $else$ \newcommand{\EANisbn} $endif$ +$if(coverpage)$ +\usepackage{pdfpages} +$endif$ + $for(header-includes)$ $header-includes$ $endfor$ @@ -178,6 +182,9 @@ $endif$ $if(chapterstyle)$ % for documentclass memoir chapter headline styling \chapterstyle{$chapterstyle$} $endif$ +$if(coverpage)$ +\includepdf[pages={1}]{$coverpage$} +$endif$ $if(frontmatter)$ \frontmatter $endif$ |