From: Gunnar Wolf Date: Fri, 13 Oct 2017 17:39:26 +0000 (-0500) Subject: Playing with the document generation - Focusing in Spanish right now X-Git-Tag: es-printed~712 X-Git-Url: https://pere.pagekite.me/gitweb/text-madewithcc.git/commitdiff_plain/bf7124d9edb54b1f5bbbb0c6bb0a0ae2bb8e187d Playing with the document generation - Focusing in Spanish right now --- diff --git a/Makefile b/Makefile index 34418ba..358acb7 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,20 @@ $(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}/' $@ XMLLINTOPTS = --nonet --noout --xinclude --postvalid lint: $(SOURCE).xml