# 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'
+TITLE="Hecho con Creative Commons"
+TEXLANG=spanish
+TEXLANGCODE=es
+
+#TITLE="Laget med Creative Commons"
+#TEXLANG=norsk
+#TEXLANGCODE=nb
+
+PANDOC_OPTS = --top-level-division=part -t docbook -f markdown+inline_notes+ascii_identifiers \
+ --variable 'author:Paul Stacey' --variable 'author:Sarah Hinchliff Pearson' \
+ --variable 'title:$(TITLE)'
# --top-level-diversion is not available in pandoc in Jessie
# PANDOC_OPTS = -t docbook -f markdown+inline_notes
-LANGS = es nl nb
+LANGS = de es nb nl pl
all: pdf
distclean: clean
rm -f $(SOURCE).md
-clean:
- rm -f $(SOURCE).pdf $(SOURCE).xml
for LANG in $(LANGS); do \
- rm -f $(SOURCE).$$LANG.pdf $(SOURCE).$$LANG.xml $(SOURCE).$$LANG.md ;\
+ rm -f $(SOURCE).$$LANG.md ;\
+ done
+clean:
+ for EXT in aux cb cb2 glo idx lof log tex toc xml pdf; do \
+ rm -f $(SOURCE).$$EXT ;\
+ for LANG in $(LANGS); do \
+ rm -f $(SOURCE).$$LANG.$$EXT ;\
+ done; \
done
$(SOURCE).md: $(SOURCE).odt fixup.rb
%.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/\[latin1\]\{inputenc\}/[utf8]{inputenc}\n\\usepackage[$(TEXLANG)]{babel}/; \
s/\\setcounter\{tocdepth\}.*/\\setcounter{tocdepth}{1}/; \
s/\\setcounter\{secnumdepth\}.*/\\setcounter{secnumdepth}{-1}/; \
s/\\caption\\end/\\caption{} \\end/; \
- s!\\maketitle!\\input{extra/es/cover.tex}!; \
+ s!\\maketitle!\\input{extra/$(TEXLANGCODE)/cover.tex}!; \
s/\\author\{and\}/\\author{Paul Stacey \\and Sarah Hinchliff Pearson}/; \
s/\\DBKinditem\{\\writtenby\}\{and\}/\\DBKinditem{\writtenby}{Paul Stacey and Sarah Hinchliff Pearson}/; \
s/\\listoffigures//; \