update makefile for epub
This commit is contained in:
parent
903af1a8bb
commit
489b0b1a7a
37
makefile
37
makefile
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user