artikel-vorlage/Makefile

44 lines
1.3 KiB
Makefile
Raw Normal View History

2014-09-15 12:33:35 +02:00
default: vorlage.pdf vorlage.html vorlage.docx
2014-09-12 15:13:21 +02:00
# Artikel-Vorlage für Pandoc (LaTeX und HTML)
TEMPLATE=informationspraxis-artikel-vorlage
LATEX_OPTIONS=--template $(TEMPLATE).tex
HTML_OPTIONS=--template $(TEMPLATE).html
# Einstellungen zum PDF-Seitenlayout.
# Grundlagen siehe <https://en.wikibooks.org/wiki/LaTeX/Page_Layout>
# und <http://johnmacfarlane.net/pandoc/demo/example9/templates.html>
LATEX_OPTIONS+=-V fontfamily=arev
LATEX_OPTIONS+=-V fontsize=12pt
LATEX_OPTIONS+=-V papersize=a4paper
LATEX_OPTIONS+=-V documentclass=article
LATEX_OPTIONS+=-V headheight=20mm -V headsep=10mm
LATEX_OPTIONS+=-V footskip=20mm
LATEX_OPTIONS+=-V top=30mm -V bottom=40mm -V left=25mm -V right=25mm
LATEX_OPTIONS+=-V endnotes=1
LATEX_OPTIONS+=-V lang=ngerman
LATEX_OPTIONS+=-V graphics=1
2014-09-12 14:36:30 +02:00
2014-09-12 15:13:21 +02:00
# Konvertierungsregeln von Markdown (Artikel) und YAML (Metadaten) nach HTML & PDF
2014-09-15 12:33:35 +02:00
.SUFFIXES: .md .html .tex .pdf .docx .odt
2014-09-12 15:13:21 +02:00
.PHONY: clean
2014-09-12 14:36:30 +02:00
.md.html:
2014-09-12 15:13:21 +02:00
cat $(patsubst %.md,%.yml,$<) $< | pandoc -s -S -t html5 $(HTML_OPTIONS) -o $@ -
2014-09-12 14:36:30 +02:00
.md.tex:
2014-09-12 15:13:21 +02:00
cat $(patsubst %.md,%.yml,$<) $< | pandoc -s -S $(LATEX_OPTIONS) -o $@ -
2014-09-12 14:36:30 +02:00
.md.pdf:
2014-09-12 15:13:21 +02:00
cat $(patsubst %.md,%.yml,$<) $< | pandoc -s -S $(LATEX_OPTIONS) -o $@ -
2014-09-15 12:33:35 +02:00
.md.docx:
cat $(patsubst %.md,%.yml,$<) $< | pandoc -s -S -o $@ -
2014-09-12 15:13:21 +02:00
clean:
2014-09-16 14:37:32 +02:00
rm -f *.log *.aux *.toc *.out
2014-09-12 15:13:21 +02:00