Publish PDF as book format, add epub

This commit is contained in:
Matt Soucy 2018-11-03 17:31:44 -04:00
parent 13dd60986c
commit c9e6b6a8a7
6 changed files with 35 additions and 5 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
*.pdf
*.epub

View File

@ -1 +1,2 @@
Slannon
documentclass

16
.vscode/tasks.json vendored Normal file
View File

@ -0,0 +1,16 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "make",
"type": "shell",
"command": "make",
"group": {
"kind": "build",
"isDefault": true
}
}
]
}

View File

@ -1,5 +1,11 @@
Chapter 1
=========
---
title: Beyond the Veil
subtitle: Veil Saga, Book 1
author: Matthew Soucy
documentclass: book
---
#
"You shouldn't have done it."

3
Book-1/Chapter-2.md Normal file
View File

@ -0,0 +1,3 @@
#
Sphinx of black quartz, judge my vow.

View File

@ -1,11 +1,14 @@
chapter-sort = $(shell echo -e $(subst $(sp),'\n',$2) | sort $1 --key=1,1 -)
books : Book1.pdf
books : Book1.pdf Book1.epub
Book1.pdf : $(call chapter-sort,-n,$(wildcard Book-1/*.md))
pandoc $^ -o $@
Book1.epub : $(call chapter-sort,-n,$(wildcard Book-1/*.md))
pandoc $^ -o $@
clean:
rm -rf Book1.pdf