Skip to content

Instantly share code, notes, and snippets.

@tskrynnyk
Created June 26, 2011 11:34
Show Gist options
  • Save tskrynnyk/1047537 to your computer and use it in GitHub Desktop.
Save tskrynnyk/1047537 to your computer and use it in GitHub Desktop.
Pandoc makefile
PANDOC = pandoc
%.html: %.md style.css Makefile
$(PANDOC) -c style.css -s -f markdown -t html --standalone -o $@ $<
%.odt: %.md Makefile
$(PANDOC) --standalone -f markdown -t odt -o $@ $<
%.epub: %.md Makefile
$(PANDOC) -o $@ $<
%.pdf: %.md Makefile
$(PANDOC) --latex-engine xelatex \
-H ~/.pandoc/header/sectsty.tex \
-H ~/.pandoc/header/pl-section.tex \
-H ~/.pandoc/header/fancyhdr.tex \
-V lang=polish \
-V mainfont='Source Sans Pro' \
-V date='' \
-V fontsize='11pt' \
-o $@ $<
%.tex: %.md Makefile
$(PANDOC) --latex-engine xelatex \
-H ~/.pandoc/header/sectsty.tex \
-H ~/.pandoc/header/pl-section.tex \
-H ~/.pandoc/header/fancyhdr.tex \
-V lang=polish \
-V mainfont='Source Sans Pro' \
-V date='' \
-V fontsize='11pt' \
-o $@ $<
all: doc.html doc.odt doc.pdf
clean:
rm -f *.{html,odt,epub,pdf,tex}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment