From b2b8b324afa1b99653da54001b17e6b732685197 Mon Sep 17 00:00:00 2001 From: Wen Kokke Date: Tue, 16 Jun 2020 16:10:10 +0100 Subject: [PATCH] Moved epub-specific files to epub folder. --- Makefile | 14 ++++++++------ .../default-code-class.lua | 0 include-files.lua => epub/include-files.lua | 0 index_epub.md => epub/index.md | 0 epub.css => epub/main.css | 14 +++++++++++++- 5 files changed, 21 insertions(+), 7 deletions(-) rename default-code-class.lua => epub/default-code-class.lua (100%) rename include-files.lua => epub/include-files.lua (100%) rename index_epub.md => epub/index.md (100%) rename epub.css => epub/main.css (75%) diff --git a/Makefile b/Makefile index aa270096..347738c7 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ SHELL := /usr/bin/env bash AGDA := $(shell find . -type f -and \( -path '*/src/*' -or -path '*/courses/*' \) -and -name '*.lagda.md') AGDAI := $(shell find . -type f -and \( -path '*/src/*' -or -path '*/courses/*' \) -and -name '*.agdai') -LUA := $(shell find . -name '*.lua') +LUA := $(shell find . -type f -and -path '*/epub/*' -and -name '*.lua') MARKDOWN := $(subst courses/,out/,$(subst src/,out/,$(subst .lagda.md,.md,$(AGDA)))) PLFA_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) @@ -54,18 +54,20 @@ out/: epub: out/plfa.epub -out/plfa.epub: out/ $(AGDA) $(LUA) epub.css +out/plfa.epub: out/ $(AGDA) $(LUA) epub/main.css pandoc --strip-comments \ - --css=epub.css \ + --css=epub/main.css \ --epub-embed-font='assets/fonts/mononoki.woff' \ - --lua-filter include-files.lua \ - --lua-filter default-code-class.lua -M default-code-class=agda \ + --epub-embed-font='assets/fonts/FreeMono.woff' \ + --epub-embed-font='assets/fonts/DejaVuSansMono.woff' \ + --lua-filter epub/include-files.lua \ + --lua-filter epub/default-code-class.lua -M default-code-class=agda \ --standalone \ --fail-if-warnings \ --toc --toc-depth=2 \ --epub-chapter-level=2 \ -o "$@" \ - index_epub.md + epub/index.md diff --git a/default-code-class.lua b/epub/default-code-class.lua similarity index 100% rename from default-code-class.lua rename to epub/default-code-class.lua diff --git a/include-files.lua b/epub/include-files.lua similarity index 100% rename from include-files.lua rename to epub/include-files.lua diff --git a/index_epub.md b/epub/index.md similarity index 100% rename from index_epub.md rename to epub/index.md diff --git a/epub.css b/epub/main.css similarity index 75% rename from epub.css rename to epub/main.css index 82a71b6f..d82bc875 100644 --- a/epub.css +++ b/epub/main.css @@ -6,8 +6,20 @@ font-style: normal; src: url('../fonts/mononoki.woff'); } +@font-face { + font-family: 'FreeMono'; + font-weight: normal; + font-style: normal; + src: url('../fonts/FreeMono.woff'); +} +@font-face { + font-family: 'DejaVuSansMono'; + font-weight: normal; + font-style: normal; + src: url('../fonts/DejaVuSansMono.woff'); +} body { margin: 5%; text-align: justify; font-size: medium; } -code { font-family: 'mononoki', monospace; } +code { font-family: 'mononoki', 'FreeMono', 'DejaVuSansMono', monospace; } h1, h2, h3, h4, h5, h6 { text-align: left; } nav#toc ol, nav#landmarks ol { padding: 0; margin-left: 1em; } nav#toc ol li, nav#landmarks ol li { list-style-type: none; margin: 0; padding: 0; }