From 5fe9cdf06ae86d024a985ba618149bcf6df35cee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20P=C3=A9pin?= Date: Tue, 5 Apr 2016 22:31:38 +0200 Subject: [PATCH] update makefile to workwith asciimath, add example --- Makefile | 12 +++++++----- asciimath | 2 +- notes.md | 13 ++++++------- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index f5c2354..4c73b03 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/asciimath b/asciimath index 00efad2..36146d2 160000 --- a/asciimath +++ b/asciimath @@ -1 +1 @@ -Subproject commit 00efad24740eebf51e80c2e5f1f8b8b642d5bb4a +Subproject commit 36146d2f796dccb07795b2b87a7c98a23e3d0f49 diff --git a/notes.md b/notes.md index f366418..65ebfe3 100644 --- a/notes.md +++ b/notes.md @@ -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 $$