This commit is contained in:
Christine Dodrill 2020-11-12 12:13:24 -05:00
commit 7772a447d5
8 changed files with 1412 additions and 0 deletions

1
.envrc Normal file
View File

@ -0,0 +1 @@
eval "$(lorri direnv)"

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
out/*
!out/.gitkeep

0
out/.gitkeep Normal file
View File

11
shell.nix Normal file
View File

@ -0,0 +1,11 @@
let
pkgs = import <nixpkgs> { };
nur = import (builtins.fetchTarball
"https://github.com/nix-community/NUR/archive/master.tar.gz") {
inherit pkgs;
};
tex = with pkgs;
texlive.combine { inherit (texlive) scheme-medium bitter titlesec; };
in pkgs.mkShell {
buildInputs = with pkgs; [ calibre nur.repos.mic92.pandoc-bin tex ];
}

30
src/build.sh Executable file
View File

@ -0,0 +1,30 @@
#!/usr/bin/env bash
set -e
VERSION=0.3
FILES="
title.txt
index.md
"
pandoc \
-o ../out/the_source-${VERSION}.epub \
--toc \
--toc-depth=2 \
--wrap=preserve \
--epub-chapter-level=2 \
--resource-path=. \
$FILES
pandoc \
-o ../out/the_source-${VERSION}.pdf \
--include-in-header sectionpagebreak.tex \
--variable=subparagraph \
--toc \
--toc-depth=2 \
--pdf-engine xelatex \
--resource-path=. \
$FILES
ebook-convert ../out/the_source-${VERSION}.epub ../out/the_source-${VERSION}.mobi

1351
src/index.md Normal file

File diff suppressed because it is too large Load Diff

6
src/sectionpagebreak.tex Normal file
View File

@ -0,0 +1,6 @@
\usepackage{titlesec}
\titleclass{\section}{top}
\newcommand\sectionbreak{\clearpage}
\usepackage[width=4.25in, height=7.5in, top=1.0in, papersize={6in,9in}]{geometry}

11
src/title.txt Normal file
View File

@ -0,0 +1,11 @@
---
title: The Source
author: Christine Dodrill
rights: All Rights Reserved
language: en-US
documentclass: book
links-as-notes: true
toc-depth: 2
fontfamily: bitter
---