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:
parent
4e2c7f9066
commit
3137020277
4
Makefile
4
Makefile
@ -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
4
resources/page.epubt
Normal file
@ -0,0 +1,4 @@
|
||||
% What I Wish I Knew When Learning Haskell (Version 2.3)
|
||||
% Stephen Diehl
|
||||
% March 2016
|
||||
|
Loading…
Reference in New Issue
Block a user