diff --git a/Makefile b/Makefile index e44381f..37d78e2 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,10 @@ SUPPORT = chapauth.sty praise.tex STORIES = stories/*.tex ART = art/* +all: pdf epub +pdf: horrors2-book.pdf +epub: book.epub + horrors2-book.pdf: horrors2-book.ps ps2pdf $< $@ @@ -18,8 +22,22 @@ horrors2.pdf: horrors2.ltx $(SUPPORT) $(STORIES) $(ART) pdflatex $< pdflatex $< +horrors2.mdwn: horrors2.ltx $(STORIES) + ./toxhtml.py > $@ + +horrors2.xhtml: horrors2.mdwn head.xhtml foot.xhtml + cat head.xhtml > $@ + markdown $< >> $@ + cat foot.xhtml >> $@ + +book.epub: horrors2.xhtml + ./mkepub + + publish: horrors2.pdf cp horrors2.pdf horrors2.$(shell TZ=UTC date "+%Y-%m-%dT%H:%M:%SZ").pdf clean: rm -f *aux *dvi *log + rm -f horrors2.xhtml horrors2.mdwn book.epub + rm -f epub/art/* diff --git a/epub/AntykwaTorunska-Bold.otf b/epub/AntykwaTorunska-Bold.otf new file mode 100644 index 0000000..5273a43 Binary files /dev/null and b/epub/AntykwaTorunska-Bold.otf differ diff --git a/epub/AntykwaTorunska-Italic.otf b/epub/AntykwaTorunska-Italic.otf new file mode 100644 index 0000000..efb6fa7 Binary files /dev/null and b/epub/AntykwaTorunska-Italic.otf differ diff --git a/epub/AntykwaTorunska-Regular.otf b/epub/AntykwaTorunska-Regular.otf new file mode 100644 index 0000000..119df17 Binary files /dev/null and b/epub/AntykwaTorunska-Regular.otf differ diff --git a/epub/META-INF/container.xml b/epub/META-INF/container.xml new file mode 100644 index 0000000..492a78b --- /dev/null +++ b/epub/META-INF/container.xml @@ -0,0 +1,7 @@ + + + + + + diff --git a/epub/book.ncx b/epub/book.ncx new file mode 100644 index 0000000..7fd88ea --- /dev/null +++ b/epub/book.ncx @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + Horrors 2 + + + + + Chapter 1 + + + + + diff --git a/foot.xhtml b/foot.xhtml new file mode 100644 index 0000000..308b1d0 --- /dev/null +++ b/foot.xhtml @@ -0,0 +1,2 @@ + + diff --git a/head.xhtml b/head.xhtml new file mode 100644 index 0000000..cdbffec --- /dev/null +++ b/head.xhtml @@ -0,0 +1,11 @@ + + + + + Horrors 2 + + + + diff --git a/mkepub b/mkepub new file mode 100755 index 0000000..798bc67 --- /dev/null +++ b/mkepub @@ -0,0 +1,73 @@ +#! /bin/sh + +cat horrors2.xhtml > epub/book.xhtml +rm -rf epub/art +mkdir epub/art +cp art/*.png art/*.jpg epub/art +cp style.css epub/ + + + +cd epub +echo -n application/epub+zip > mimetype +cat >MANIFEST < content.opf < + + + Horrors 2 + en + Horrors2 + The Something Awful Forums + + + +EOF +find . -type f | sed 's#./##' | while read fn; do + b=$(basename $fn) + id=thing$count + count=$(expr $count + 1) + case "$b" in + META-INF/*|MANIFEST|mimetype|content.opf) + continue + ;; + book.xhtml) + id=book + type=application/xhtml+xml + ;; + *.css) + type=image/css + ;; + book.ncx) + id=ncx + ;; + *.png) + type=image/png + ;; + *.jpg) + type=image/jpeg + ;; + *.svg) + type=image/svg+xml + ;; + *.otf) + type=application/octet-stream + ;; + esac + echo "" >> content.opf + echo $fn >> MANIFEST +done +cat >> content.opf < + + + + + +EOF + +xargs zip -Xr9D ../book.epub < MANIFEST diff --git a/stories/Rummanging.Nebulous_C.tex b/stories/Rummanging.Nebulous_C.tex index a5469a2..8fb4d38 100644 --- a/stories/Rummanging.Nebulous_C.tex +++ b/stories/Rummanging.Nebulous_C.tex @@ -22,27 +22,27 @@ address book. -{\em ABE +{\em ABE} -CYNTHIA +{\em CYNTHIA} -MOM +{\em MOM} -PIZZA HUT +{\em PIZZA HUT} -DIRECTORIES +{\em DIRECTORIES} -INFO HOTLINE} +{\em INFO HOTLINE} diff --git a/stories/SummerGlaucoma.Bavarious_.tex b/stories/SummerGlaucoma.Bavarious_.tex index 7ba8246..fd7c65c 100644 --- a/stories/SummerGlaucoma.Bavarious_.tex +++ b/stories/SummerGlaucoma.Bavarious_.tex @@ -128,11 +128,7 @@ Awesome! {\em But confetti doesn't wear its hair in a blond, barretted -ponytail. - - - -Good Christ--} (he thought) +ponytail. Good Christ--} (he thought) diff --git a/stories/lucifer_chikken.The_Wareho.tex b/stories/lucifer_chikken.The_Wareho.tex index 07a245e..27c5dcd 100644 --- a/stories/lucifer_chikken.The_Wareho.tex +++ b/stories/lucifer_chikken.The_Wareho.tex @@ -180,4 +180,4 @@ Red lights whirled closer. Suddenly, I was sobbing. -\illustration{lucifer chikken}{Gun / Warehouse}{art/lucifer_chickken-gun_warehouse.png} +\illustration{lucifer chikken}{Gun / Warehouse}{art/lucifer_chikken-gun_warehouse.png} diff --git a/style.css b/style.css index f7bb35c..9b83cdc 100644 --- a/style.css +++ b/style.css @@ -1,3 +1,20 @@ +@font-face { + font-family: "Antykwa Torunska"; + src: url(AntykwaTorunska-Regular.otf); +} + +@font-face { + font-family: "Antykwa Torunska"; + font-style: italic; + src: url(AntykwaTorunska-Italic.otf); +} + +@font-face { + font-family: "Antykwa Torunska"; + font-weight: bold; + src: url(AntykwaTorunska-Bold.otf); +} + body { max-width: 40em; font-family: Antykwa Torunska; diff --git a/toxhtml.py b/toxhtml.py index 5ad7eea..9253d60 100755 --- a/toxhtml.py +++ b/toxhtml.py @@ -199,22 +199,5 @@ for l in f: if l.startswith('\\begin{document'): break -print(''' - - - - Horrors 2 - - - - -''') - for l in f: outline(l) - -print(''' - -''')