initial commit
authorMart Lubbers <mart@martlubbers.net>
Thu, 2 Feb 2017 18:02:13 +0000 (19:02 +0100)
committerMart Lubbers <mart@martlubbers.net>
Thu, 2 Feb 2017 18:02:13 +0000 (19:02 +0100)
.gitignore [new file with mode: 0644]
Makefile [new file with mode: 0644]
thesis.bib [new file with mode: 0644]
thesis.pre [new file with mode: 0644]
thesis.tex [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..e8b9825
--- /dev/null
@@ -0,0 +1,4 @@
+*.aux
+*.pdf
+*.log
+*.fmt
diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..01c0562
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,30 @@
+DOCS:=thesis
+LATEX:=pdflatex
+BIBTEX:=bibtex
+BIBTEXFLAGS:=
+LATEXFLAGS:=-file-line-error -halt-on-error -no-shell-escape
+
+.PHONY: all clean
+.SECONDARY: $(addsuffix .fmt,$(DOCS))
+
+all: $(addsuffix .pdf,$(DOCS))
+
+%.fmt: %.pre
+       $(LATEX) $(LATEXFLAGS) -ini -jobname="$(basename $@)" "&$(LATEX) $<\dump"
+
+%.fmt: preamble.tex
+       $(LATEX) $(LATEXFLAGS) -ini -jobname="$(basename $@)" "&$(LATEX) $<\dump"
+
+%.pdf: %.mlog
+       grep -iFq 'Rerun to get' $< &&\
+               $(LATEX) $(LATEXFLAGS) $(basename $<) || true
+
+%.mlog: %.tex %.fmt $(wildcard *.bib)
+       $(LATEX) $(LATEXFLAGS) $<
+       grep -q '^\\bibdata{' $(basename $<).aux &&\
+               $(BIBTEX) $(BIBTEXFLAGS) $(basename $<) || true
+       $(LATEX) $(LATEXFLAGS) $< | tee $@
+
+clean:
+       $(RM) $(foreach DOC,$(DOCS),\
+               $(addprefix $(DOC).,aux log fmt toc bbl blg run.xml out pdf snm nav snm vrb))
diff --git a/thesis.bib b/thesis.bib
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/thesis.pre b/thesis.pre
new file mode 100644 (file)
index 0000000..f0acd01
--- /dev/null
@@ -0,0 +1,7 @@
+\documentclass[a4paper]{book}
+
+\usepackage{geometry}
+
+\title{...}
+\author{Mart Lubbers BSc.}
+\date{\today}
diff --git a/thesis.tex b/thesis.tex
new file mode 100644 (file)
index 0000000..f5737b5
--- /dev/null
@@ -0,0 +1,4 @@
+%&thesis
+\begin{document}
+Hello world!
+\end{document}