diff options
author | Case Duckworth | 2015-03-27 15:40:42 -0700 |
---|---|---|
committer | Case Duckworth | 2015-03-27 15:40:42 -0700 |
commit | 643d9ceb308c206a6e572c7c555168ff0ca60bc1 (patch) | |
tree | 8878d45b3dcc5c894a21d4e379be0f7293c5d345 /makefile | |
parent | Change verse lines '$' -> '^| ' (diff) | |
download | autocento-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-- | makefile | 8 |
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 |
6 | TEXTs := $(wildcard *.txt) | 6 | TEXTs := $(wildcard *.txt) |
7 | 7 | ||
8 | VERSIFY = trunk/versify.exe | ||
9 | |||
8 | HTMLbl := index.html template.html index-txt.html | 10 | HTMLbl := index.html template.html index-txt.html |
9 | HTMLs := $(filter-out $(HTMLbl),$(patsubst %.txt,%.html,$(TEXTs))) | 11 | HTMLs := $(filter-out $(HTMLbl),$(patsubst %.txt,%.html,$(TEXTs))) |
10 | HTMopts = --template=template.html | 12 | HTMopts = --template=template.html |
13 | HTMopts+= --filter=$(VERSIFY) | ||
11 | HTMopts+= --smart --mathml --section-divs | 14 | HTMopts+= --smart --mathml --section-divs |
12 | 15 | ||
13 | HAPAXbl:= first-lines.river common-titles.river hapax.river | 16 | HAPAXbl:= first-lines.river common-titles.river hapax.river |
@@ -35,7 +38,7 @@ river : $(RIVERs) | |||
35 | lozenge : $(LOZENGE) | 38 | lozenge : $(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) |\ |