update makefile to workwith asciimath, add example

This commit is contained in:
Martin Pépin 2016-04-05 22:31:38 +02:00
parent 3a8ea1c022
commit 5fe9cdf06a
3 changed files with 14 additions and 13 deletions

View File

@ -1,17 +1,15 @@
SOURCES = $(wildcard *.md)
OUT = $(SOURCES:.md=.pdf)
HS_FILTERS_NAMES = nice-frac usual-fun
HS_FILTERS_NAMES =
PY_FILTERS_NAMES = pandoc-svg.py
EXT_FILTERS = pandoc-crossref
EXT_FILTERS = asciimath/pandoc-asciimath
HS_FILTERS = $(addprefix filters/, $(HS_FILTERS_NAMES))
PY_FILTERS = $(addprefix filters/, $(PY_FILTERS_NAMES))
FILTERS = $(PY_FILTERS) $(HS_FILTERS) $(EXT_FILTERS)
.SUFFIXES: .hs
all: $(HS_FILTERS) $(OUT)
all: $(HS_FILTERS) asciimath/pandoc-asciimath $(OUT)
$(OUT):
pandoc -S --toc -t latex $(basename $@).md $(addprefix --filter=, $(FILTERS)) -o $@
@ -19,11 +17,15 @@ $(OUT):
$(HS_FILTERS):
ghc --make $@.hs -o $@
asciimath/pandoc-asciimath:
(cd asciimath; make filter)
clean:
rm -f $(OUT)
rm -f $(addprefix filters/, $(HS_FILTERS))
find . -name "*.pandoc.pdf" -delete
deepclean: clean
(cd asciimath; make clean)
rm -f $(HS_FILTERS)
rm -f filters/*.hi filters/*.o

@ -1 +1 @@
Subproject commit 00efad24740eebf51e80c2e5f1f8b8b642d5bb4a
Subproject commit 36146d2f796dccb07795b2b87a7c98a23e3d0f49

View File

@ -1,13 +1,8 @@
---
# Metadata
title: %title%
author: Lucas Verney
title: Example
author: Martin Pépin
date: \today
# LaTeX headers
header-includes:
- \usepackage{dsfont}
- \usepackage{mathtools}
- \renewcommand{\arraystretch}{1.5}
# Pandoc-crossref options
cref: True
chapters: True
@ -15,3 +10,7 @@ chapters: True
\pagebreak
# Asciimath
Soit $n in NN$, alors on a
$$ sum_(k=1)^n k^3 = ((n(n+1))/2)^2 $$