update: prepare english chapters

This commit is contained in:
Changkun Ou
2019-06-05 16:02:57 +02:00
parent 4a3889cfca
commit 589f417a1b
17 changed files with 109 additions and 221 deletions

View File

@@ -1,20 +1,23 @@
title = 'C++11/14/17 On the Fly'
filename = 'modern-cpp-tutorial'
outputname='modern-cpp-tutorial'
revision = $(shell git describe --always --tags)
all: pdf
all: revision pdf
revision:
@echo '% Autogenerated, do not edit' > revision.tex
@echo '\\newcommand{\\revision}{'$(revision)'}' >> revision.tex
pdf: markdown
@echo "Compiling PDF file..."
@pandoc -s $(filename).md -o $(outputname).pdf \
@pandoc -f markdown+smart -s $(filename).md -o $(filename).pdf \
--title-prefix $(title) \
--listings -H meta/cpp-listings.tex \
--template=meta/template.tex \
--normalize \
--smart \
--latex-engine=`which xelatex`
--pdf-engine=`which xelatex`
@echo "Done."
@rm *.md
@rm *.md revision.tex
markdown:
@echo "Copy markdown files..."
@@ -23,6 +26,6 @@ markdown:
@python3 aggregator.py
clean:
rm -rf *.md *.pdf
rm -rf revision.tex *.md *.pdf
.PHONY: markdown pdf clean