mirror of
https://github.com/sdiehl/wiwinwlh.git
synced 2024-10-26 20:57:32 +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
|
FLAGS = --standalone --toc --toc-depth=2 --highlight-style pygments
|
||||||
TEMPLATE = resources/page.tmpl
|
TEMPLATE = resources/page.tmpl
|
||||||
LTEMPLATE = resources/page.latex
|
LTEMPLATE = resources/page.latex
|
||||||
|
ETEMPLATE = resources/page.epubt
|
||||||
STYLE = css/style.css
|
STYLE = css/style.css
|
||||||
GHC=ghc
|
GHC=ghc
|
||||||
|
|
||||||
@ -21,7 +22,8 @@ includes: includes.hs
|
|||||||
| sed '/<extensions>/r extensions.html' > $@
|
| sed '/<extensions>/r extensions.html' > $@
|
||||||
|
|
||||||
%.epub: %.md includes
|
%.epub: %.md includes
|
||||||
./includes < $< | $(PANDOC) -f $(IFORMAT) -t epub $(FLAGS) -o $@
|
(cat $(ETEMPLATE); ./includes < $<) \
|
||||||
|
| $(PANDOC) -f $(IFORMAT) -t epub $(FLAGS) -o $@
|
||||||
|
|
||||||
%.pdf: %.md includes
|
%.pdf: %.md includes
|
||||||
./includes < $< | $(PANDOC) -c -s -f $(IFORMAT) --template $(LTEMPLATE) --latex-engine=xelatex $(FLAGS) -o $@
|
./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