Created
January 24, 2016 19:27
-
-
Save quartorz/1952254c9d05ab464dfc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PANDOC_EXTENSIONS = ignore_line_breaks tex_math_dollars raw_tex latex_macros | |
PANDOC_FILTERS = pandoc-crossref | |
CHAPTERS = src/intro.tex src/example.tex | |
EMPTY := | |
SPACE = $(EMPTY) $(EMPTY) | |
PANDOC_FORMAT = markdown$(strip $(if $(PANDOC_EXTENSIONS),\ | |
+$(subst $(SPACE),+,$(PANDOC_EXTENSIONS)),)) | |
all: sotsuron.tex $(CHAPTERS) | |
platex -synctex=1 -kanji=utf8 -guess-input-enc sotsuron.tex | |
dvipdfmx sotsuron | |
clean: | |
rm *.aux *.dvi *.log *.out *.pdf *.synctex.gz *.toc src/*.tex | |
%.tex: %.md | |
pandoc -f $(PANDOC_FORMAT) -t latex $< -o $@\ | |
$(if $(PANDOC_FILTERS),\ | |
--filter $(subst $(SPACE), --filter ,$(PANDOC_FILTERS)),) \ | |
-M "crossrefYaml=pandoc-crossref.yaml" \ | |
-M "chapters=True" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment