summary refs log tree commit diff stats
path: root/makefile
diff options
context:
space:
mode:
authorCase Duckworth2015-03-27 15:40:42 -0700
committerCase Duckworth2015-03-27 15:40:42 -0700
commit643d9ceb308c206a6e572c7c555168ff0ca60bc1 (patch)
tree8878d45b3dcc5c894a21d4e379be0f7293c5d345 /makefile
parentChange verse lines '$' -> '^| ' (diff)
downloadautocento-643d9ceb308c206a6e572c7c555168ff0ca60bc1.tar.gz
autocento-643d9ceb308c206a6e572c7c555168ff0ca60bc1.zip
Fix #5: Verse typesetting
Thanks to the pandoc-discussion thread at
<https://groups.google.com/forum/#!topic/pandoc-discuss/_JnTJnsSK3k>,
line breaks in verse have been converted to <span class="line">s,
which enables the CSS to style them with hanging indents, given
a too-small viewport.  This commit also includes a makefile edit to
reflect this change, and the Haskell source and executable of the
pandoc filter.
Diffstat (limited to 'makefile')
-rw-r--r--makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/makefile b/makefile index 768b342..26b067f 100644 --- a/makefile +++ b/makefile
@@ -5,9 +5,12 @@
5# Define directories, file lists, and options 5# Define directories, file lists, and options
6TEXTs := $(wildcard *.txt) 6TEXTs := $(wildcard *.txt)
7 7
8VERSIFY = trunk/versify.exe
9
8HTMLbl := index.html template.html index-txt.html 10HTMLbl := index.html template.html index-txt.html
9HTMLs := $(filter-out $(HTMLbl),$(patsubst %.txt,%.html,$(TEXTs))) 11HTMLs := $(filter-out $(HTMLbl),$(patsubst %.txt,%.html,$(TEXTs)))
10HTMopts = --template=template.html 12HTMopts = --template=template.html
13HTMopts+= --filter=$(VERSIFY)
11HTMopts+= --smart --mathml --section-divs 14HTMopts+= --smart --mathml --section-divs
12 15
13HAPAXbl:= first-lines.river common-titles.river hapax.river 16HAPAXbl:= first-lines.river common-titles.river hapax.river
@@ -35,7 +38,7 @@ river : $(RIVERs)
35lozenge : $(LOZENGE) 38lozenge : $(LOZENGE)
36 39
37# Generic rule for HTML targets and Markdown sources 40# Generic rule for HTML targets and Markdown sources
38%.html : %.txt template.html 41%.html : %.txt template.html $(VERSIFY)
39 pandoc $< -f markdown -t html5 $(HTMopts) -o $@ 42 pandoc $< -f markdown -t html5 $(HTMopts) -o $@
40 43
41# Generic rule for RIVER targets and Markdown sources 44# Generic rule for RIVER targets and Markdown sources
@@ -45,6 +48,9 @@ lozenge : $(LOZENGE)
45 -e "s/[^][A-Za-z0-9\/\"':.-]/ /g" $< |\ 48 -e "s/[^][A-Za-z0-9\/\"':.-]/ /g" $< |\
46 pandoc - -f markdown -t $(RIVERer) -o $@ 49 pandoc - -f markdown -t $(RIVERer) -o $@
47 50
51$(VERSIFY) : trunk/versify.hs
52 ghc --make trunk/versify.hs
53
48$(LOZENGE) : $(HTMLs) 54$(LOZENGE) : $(HTMLs)
49 @echo "Updating lozenge.js..." 55 @echo "Updating lozenge.js..."
50 @list=`echo $(HTMLs) |\ 56 @list=`echo $(HTMLs) |\