Permalink
Browse files

added tex source build

the tex source can be useful for diagnosing build/render errors
in the PDF.
  • Loading branch information...
iainmcgin committed Mar 2, 2013
1 parent cd6c6d1 commit ab8f966f098ae207e2ab94e8dfe2ed0d45253eb3
Showing with 18 additions and 1 deletion.
  1. +18 −1 Makefile
View
@@ -16,7 +16,7 @@ MD_SOURCES := 01-title.md \
BUILD_DIR := build
-.PHONY: dirs all html pdf epub md clean
+.PHONY: dirs all html pdf tex epub md clean
all: html pdf epub md
@@ -32,6 +32,9 @@ html: $(BUILD_DIR)/ScalaReference.html
pdf: $(BUILD_DIR)/ScalaReference.pdf
+tex: $(BUILD_DIR)/ScalaReference.tex
+
+
epub: $(BUILD_DIR)/ScalaReference.epub
@@ -66,6 +69,20 @@ $(BUILD_DIR)/ScalaReference.pdf: Scala.bib $(BUILD_DIR)/ScalaReference.md
-o build/ScalaReference.pdf \
build/ScalaReference.md
+$(BUILD_DIR)/ScalaReference.tex: Scala.bib $(BUILD_DIR)/ScalaReference.md
+ @echo "building LaTeX source to $(BUILD_DIR)/ScalaReference.tex"
+ @pandoc -f markdown \
+ --standalone \
+ --toc \
+ --chapters \
+ --number-sections \
+ --bibliography=Scala.bib \
+ --self-contained \
+ --latex-engine=xelatex \
+ --template=resources/scala-ref-template.latex \
+ -o build/ScalaReference.tex \
+ build/ScalaReference.md
+
$(BUILD_DIR)/ScalaReference.html: Scala.bib $(BUILD_DIR)/ScalaReference.md
@echo "building HTML spec to $(BUILD_DIR)/ScalaReference.html"

0 comments on commit ab8f966

Please sign in to comment.