2015-01-06 18:09:41 +03:00
|
|
|
PANDOC = pandoc
|
|
|
|
IFORMAT = markdown
|
|
|
|
FLAGS = --standalone --toc --toc-depth=2 --mathjax --highlight-style pygments
|
|
|
|
TEMPLATE = page.tmpl
|
|
|
|
STYLE = css/style.css
|
2015-01-08 05:31:28 +03:00
|
|
|
FILTER = includes.hs
|
2015-01-06 18:09:41 +03:00
|
|
|
|
|
|
|
SRC = $(wildcard *.md)
|
|
|
|
OBJ = $(SRC:.md=.html)
|
|
|
|
|
|
|
|
all: $(OBJ) top
|
|
|
|
|
2015-01-08 05:31:28 +03:00
|
|
|
%.html: %.md $(FILTER)
|
|
|
|
$(PANDOC) -c $(STYLE) --filter ${FILTER} --template $(TEMPLATE) -s -f $(IFORMAT) -t html $(FLAGS) -o $@ $<
|
2015-01-06 18:09:41 +03:00
|
|
|
|
2015-01-08 05:31:28 +03:00
|
|
|
%.pdf: %.md $(FILTER)
|
|
|
|
$(PANDOC) --filter ${FILTER} -f $(IFORMAT) --latex-engine=xelatex $(FLAGS) -o $@ $<
|
2015-01-06 18:09:41 +03:00
|
|
|
|
2015-01-08 05:31:28 +03:00
|
|
|
pdf: $(FILTER)
|
|
|
|
$(PANDOC) --filter ${FILTER} -f $(IFORMAT) --latex-engine=xelatex $(FLAGS) -o WYAH.pdf 0*.md
|
2015-01-06 18:09:41 +03:00
|
|
|
|
2015-01-08 05:31:28 +03:00
|
|
|
top: $(FILTER)
|
|
|
|
$(PANDOC) -c $(STYLE) --filter ${FILTER} --template $(TEMPLATE) -s -f $(IFORMAT) -t html $(FLAGS) -o tutorial.html index.md
|
2015-01-06 18:09:41 +03:00
|
|
|
|
|
|
|
clean:
|
2015-01-08 05:31:28 +03:00
|
|
|
-rm *.html *.pdf
|