From e845cb95590a1ebcbb142159663f170041eb8d10 Mon Sep 17 00:00:00 2001 From: Francois Lesueur Date: Wed, 2 Nov 2022 11:58:55 +0100 Subject: [PATCH] ajout gitignore et makefile --- .gitignore | 9 +++++++++ Makefile | 25 +++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1782876 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +output/ +*.aux +*.log +*.nav +*.out +*.pdf +*.snm +*.synctex.gz +*.toc diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..21b43a3 --- /dev/null +++ b/Makefile @@ -0,0 +1,25 @@ +OUTDIR= output +SRC= $(wildcard *.md) +PDF= $(addprefix $(OUTDIR)/,$(SRC:.md=.pdf)) +HTML= $(addprefix $(OUTDIR)/,$(SRC:.md=.html)) + + +all: $(PDF) $(HTML) + +pdf: $(PDF) + +html: $(HTML) + +directories: $(OUTDIR) + +$(OUTDIR): + mkdir $(OUTDIR) + +$(OUTDIR)/%.html: %.md $(OUTDIR) + pandoc --from=markdown+lists_without_preceding_blankline $< -o $@ -s + +$(OUTDIR)/%.pdf: $(OUTDIR)/%.html + wkhtmltopdf $< $@ + +clean: + \rm -rf *.html *.pdf $(OUTDIR)