Skip to content

Instantly share code, notes, and snippets.

@nils-werner
Created October 16, 2013 19:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nils-werner/7013004 to your computer and use it in GitHub Desktop.
Save nils-werner/7013004 to your computer and use it in GitHub Desktop.
LaTeX build system
MAKEFLAGS += -j1
LATEXFLAGS += -interaction=batchmode
TEXPATH += .:./lib//:
.PHONY: document beispiel desktop preview images clean cleanall
document: thesis.pdf cover.pdf back.pdf
cover: cover.pdf
back: back.pdf
desktop: thesis.pdf
cp $< ~/Desktop/thesis-`date +'%y-%m-%d'`.pdf
preview: thesis.pdf
xdg-open $< &
clean:
- rm -f *.dvi *.ps *.log *.toc *.snm *.nav *.aux *.out *.bbl *.blg *.cb *.diff.tex *.lof *.lot *.lol *.cb2
cleanall: clean
- rm -f *.pdf
debug: LATEXFLAGS =
debug: cleanall thesis.pdf
thesis.pdf: makros.tex emptypage.tex declaration.tex abstract.tex abbreviations.tex formulasymbols.tex\
introduction.tex basics.tex estimation.tex results.tex conclusion.tex outlook.tex\
fig/%.eps: fig/%.svg
inkscape -E $@ $<
fig/%.pdf: fig/%.eps
epspdf $<
%.pdf: %.tex
TEXINPUTS=$(TEXPATH) pdflatex $(LATEXFLAGS) $<
bibtex $(<:.tex=) || true
TEXINPUTS=$(TEXPATH) pdflatex $(LATEXFLAGS) $<
TEXINPUTS=$(TEXPATH) pdflatex $(LATEXFLAGS) $<
{
"folders":
[
{
"path": ".",
"file_exclude_patterns": [
"*.sublime-workspace",
"*.dvi",
"*.cb2",
"*.ps",
"*.log",
"*.toc",
"*.snm",
"*.nav",
"*.aux",
"*.auxlock",
"*.out",
"*.pdf",
"*.blg",
"*.bbl",
"*.cb",
"*.lof",
"*.lot",
"*.lol"
]
}
],
"build_systems":
[
{
"selector": "text.tex.latex",
"name": "Latex",
"cmd": ["make"],
"variants": [
{
"name": "Preview",
"cmd": ["make", "preview"]
},
{
"name": "Debug",
"cmd": ["make", "cleanall", "debug"]
},
{
"name": "Clean",
"cmd": ["make", "cleanall"]
},
{
"name": "Force",
"cmd": ["make", "cleanall", "document"]
},
{
"name": "Desktop",
"cmd": ["make", "desktop"]
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment