1
0
forked from GitHub/gf-rgl

Use Pandoc and introduce HTML template for synopsis

- Remove isLatex flag
- Plan to convert to Markdown and simply format
This commit is contained in:
John J. Camilleri
2018-11-09 09:08:30 +01:00
parent f70234b1da
commit ec9753e7b5
4 changed files with 157 additions and 29 deletions

View File

@@ -24,9 +24,23 @@ SRC_FILES=$(S)/abstract/Common.gf $(S)/abstract/Cat.gf $(S)/api/Constructors.gf
EXAMPLES_OUT=$(patsubst %,api-examples-%.txt,$(LANGS))
INCLUDES=synopsis-intro.txt categories-intro.txt categories-imagemap.html synopsis-additional.txt synopsis-browse.txt synopsis-example.txt
synopsis.html: MkSynopsis.hs MkExxTable.hs $(INCLUDES) $(EXAMPLES_OUT) $(SRC_FILES)
synopsis.txt: MkSynopsis.hs MkExxTable.hs $(INCLUDES) $(EXAMPLES_OUT) $(SRC_FILES)
runghc -i.. MkSynopsis.hs
TMP=tmp.html
synopsis.html: synopsis.txt
txt2tags --target=html --no-headers --quiet --toc --outfile=$@ --infile=$^
pandoc \
--from=html \
--to=html5 \
--standalone \
--template=_template.html \
--metadata='title:"GF Resource Grammar Library: Synopsis"' \
--variable='rel-root:../..' \
--output=$(TMP) \
$@
mv $(TMP) $@
categories.png: categories.dot
dot -Tpng $^ > $@