-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
29 lines (21 loc) · 969 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Requires pandoc, available from http://johnmacfarlane.net/pandoc/
# If it is not in your PATH, specify its location here:
PANDOC= pandoc
MD_FILES= $(wildcard *.md)
pdf: main.tex tex_files
# Use --latex-engine to point to a PDFLaTeX engine if not accessible from path.
# pdflatex is available from http://www.tug.org/applications/pdftex/
$(PANDOC) main.tex -o csgso-manual.pdf --chapters -N --toc --toc-depth=2 \
-M documentclass="report" \
-M geometry="margin=1.25in" \
-M title="\Huge{\textbf{CS-GSO Manual of Operations}}" \
-M author="Computer Science Graduate Student Organization\\\\at the University of Pittsburgh" \
-M date="$(shell git log -1 --format='Compiled in PDF\LaTeX{} from commit \texttt{%h};\\\\\small{authored by %an <\texttt{%ae}>;\\\\dated \textbf{%aD}.}')"
tex_files: tex/ $(patsubst %.md,tex/%.tex,$(MD_FILES))
tex/:
mkdir -p tex
tex/%.tex: %.md
$(PANDOC) $*.md -o tex/$*.tex
clean:
rm -rf tex
.PHONY: pdf tex_files clean