Skip to content

Instantly share code, notes, and snippets.

@nfaggian
Forked from tskrynnyk/Makefile
Created April 11, 2014 00:08
Show Gist options
  • Save nfaggian/10433524 to your computer and use it in GitHub Desktop.
Save nfaggian/10433524 to your computer and use it in GitHub Desktop.
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