1
1
mirror of https://github.com/sdiehl/wiwinwlh.git synced 2024-08-16 23:40:41 +03:00

Add a template for creating an epub file

Previously, the title, author and date weren't displayed and the table
of contents had an empty field.
This commit is contained in:
Daniel Taskoff 2016-06-25 12:08:35 +03:00
parent 4e2c7f9066
commit 3137020277
2 changed files with 7 additions and 1 deletions

View File

@ -3,6 +3,7 @@ IFORMAT = markdown
FLAGS = --standalone --toc --toc-depth=2 --highlight-style pygments
TEMPLATE = resources/page.tmpl
LTEMPLATE = resources/page.latex
ETEMPLATE = resources/page.epubt
STYLE = css/style.css
GHC=ghc
@ -21,7 +22,8 @@ includes: includes.hs
| sed '/<extensions>/r extensions.html' > $@
%.epub: %.md includes
./includes < $< | $(PANDOC) -f $(IFORMAT) -t epub $(FLAGS) -o $@
(cat $(ETEMPLATE); ./includes < $<) \
| $(PANDOC) -f $(IFORMAT) -t epub $(FLAGS) -o $@
%.pdf: %.md includes
./includes < $< | $(PANDOC) -c -s -f $(IFORMAT) --template $(LTEMPLATE) --latex-engine=xelatex $(FLAGS) -o $@

4
resources/page.epubt Normal file
View File

@ -0,0 +1,4 @@
% What I Wish I Knew When Learning Haskell (Version 2.3)
% Stephen Diehl
% March 2016