2021-05-23 15:12:59 +02:00
|
|
|
entries := $(wildcard *.md)
|
|
|
|
|
|
|
|
target=wiki
|
|
|
|
exports= \
|
|
|
|
$(entries:.md=.html) \
|
|
|
|
# $(target).pdf \
|
|
|
|
|
|
|
|
VIMWIKI_DIR=/home/h/.wiki
|
|
|
|
|
|
|
|
all: $(exports)
|
|
|
|
|
|
|
|
%.html:%.md
|
2021-08-23 17:08:52 +02:00
|
|
|
pandoc \
|
2022-05-11 00:45:53 +02:00
|
|
|
-f markdown+latex_macros-yaml_metadata_block \
|
2021-08-23 17:08:52 +02:00
|
|
|
-t html5 \
|
|
|
|
-c pandoc.css \
|
|
|
|
--pdf-engine=xelatex \
|
|
|
|
--bibliography $(VIMWIKI_DIR)/references.bib \
|
|
|
|
--citeproc \
|
|
|
|
--resource-path=$(VIMWIKI_DIR)/img/ \
|
|
|
|
--lua-filter=$(VIMWIKI_DIR)/filters/html-links.lua \
|
2022-05-15 14:35:22 +02:00
|
|
|
--lua-filter=$(VIMWIKI_DIR)/lua-filters/diagram-generator/diagram-generator.lua \
|
|
|
|
--lua-filter=$(VIMWIKI_DIR)/lua-filters/lilypond/lilypond.lua \
|
2021-08-23 17:08:52 +02:00
|
|
|
--mathjax \
|
2021-12-31 12:45:29 +01:00
|
|
|
--extract-media=img \
|
2021-08-23 17:08:52 +02:00
|
|
|
--strip-comments \
|
2021-05-23 15:12:59 +02:00
|
|
|
-s -o $@ $<
|
|
|
|
|
|
|
|
$(target).pdf:$(entries)
|
|
|
|
pandoc \
|
2021-08-23 17:08:52 +02:00
|
|
|
-f markdown $(entries) \
|
|
|
|
--pdf-engine=xelatex \
|
2021-05-23 15:12:59 +02:00
|
|
|
--bibliography $(VIMWIKI_DIR)/references.bib \
|
2021-08-23 17:08:52 +02:00
|
|
|
--citeproc \
|
|
|
|
--table-of-contents \
|
2021-05-23 15:12:59 +02:00
|
|
|
-o $@
|
|
|
|
|
2021-08-23 17:08:52 +02:00
|
|
|
clean:
|
|
|
|
rm -f *.html
|
|
|
|
# rm wiki.pdf
|