X-Git-Url: http://pere.pagekite.me/gitweb/text-madewithcc.git/blobdiff_plain/a4c073627da431bbbc06d4f6b876a8efc004d7d9..f262f0703d5201554311485e665ea8a13a659a57:/Makefile diff --git a/Makefile b/Makefile index 34418ba..5d83a65 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,8 @@ +# +# As of October 2017, I'm doing some Spanish-specific adjustments to +# this Makefile; they should be generalized... But I'm taking a step at a time :) +# -GW +# SOURCE=MadewithCreativeCommonsmostup-to-dateversion # Versioning: I'm using the date on which I got the source document @@ -5,9 +10,9 @@ SOURCE=MadewithCreativeCommonsmostup-to-dateversion # increase every time the generated Markdown is modified. VERSION=20170609-2 +PANDOC_OPTS = --top-level-division=part -t docbook -f markdown+inline_notes --variable 'author:Paul Stacey' --variable 'author:Sarah Hinchliff Pearson' --variable 'title:Hecho con Creative Commons' # --top-level-diversion is not available in pandoc in Jessie -PANDOCOPTS = --top-level-division=part -t docbook -f markdown+inline_notes -PANDOCOPTS = -t docbook -f markdown+inline_notes +# PANDOC_OPTS = -t docbook -f markdown+inline_notes LANGS = es nl nb @@ -44,11 +49,21 @@ $(SOURCE).es.md: $(SOURCE).md po/es/mwcc.po po4a-translate -f text -m $(SOURCE).md -p po/es/mwcc.po -l $@ -l $@ -L utf8 -M utf8 -k 20 %.xml: %.md - pandoc -s -o $@ $(PANDOCOPTS) $^ + pandoc -s -o $@ $(PANDOC_OPTS) $^ + perl -p -i -e 's/!DOCTYPE article/!DOCTYPE book/' $@ + perl -p -i -e 's!<(/?)article(info|)?>!<$$1book$$2>!' $@ pdf: $(SOURCE).pdf -%.pdf: %.xml - dblatex -b xetex $^ +%.pdf: %.tex + pdflatex $^ + pdflatex $^ + +%.tex: %.xml + dblatex -t tex -b xetex $^ + perl -p -i -e 's/\[latin1\]\{inputenc\}/[utf8]{inputenc}\n\\usepackage[spanish]{babel}/' $@ + perl -p -i -e 's/\\caption\\end/\\caption{} \\end/' $@ + perl -p -i -e 's/\\author\{and\}/\\author{Paul Stacey \\and Sarah Hinchliff Pearson}/' $@ + perl -p -i -e 's/\\DBKinditem\{\\writtenby\}\{and\}/\\DBKinditem{\writtenby}{Paul Stacey and Sarah Hinchliff Pearson}/' $@ XMLLINTOPTS = --nonet --noout --xinclude --postvalid lint: $(SOURCE).xml