update makefile for epub

This commit is contained in:
Michele Guerini Rocco 2017-09-06 02:14:05 +02:00
parent 903af1a8bb
commit 489b0b1a7a
Signed by: rnhmjoj
GPG Key ID: 91BE884FBA4B591A

View File

@ -2,31 +2,18 @@ title = 'category-theory-for-programmers'
root = $(shell pwd)
src = $(root)/src
init = $(src)/init/cover.html $(src)/init/table.html $(src)/init/preface.html
chapters = $(shell find $(src)/part-* -name '*.html' | sort -V)
all: pdf epub
pdf:
cd $(src)/init; \
pandoc \
$(init) \
$(chapters) \
$(root)/opt/metadata.yaml \
--standalone \
--smart \
--number-sections \
-H $(root)/opt/tex \
--latex-engine=xelatex \
-o $(root)/$(title).pdf
epub:
cd $(src)/init; \
pandoc \
$(init) \
$(chapters) \
$(root)/opt/metadata.yaml \
--standalone \
--smart \
--number-sections \
book:
cd $(src)/init; \
pandoc \
$(src)/init/preface.html \
$(chapters) \
--smart \
--toc \
--number-section \
--epub-stylesheet=$(root)/pandoc/style.css \
--epub-cover-image=$(root)/pandoc/cover.png \
--epub-embed-font='$(src)/fonts/*.woff' \
-o $(root)/$(title).epub