Skip to content

Commit

Permalink
Migrate to latexmk
Browse files Browse the repository at this point in the history
  • Loading branch information
anishathalye committed Feb 17, 2020
1 parent 8b3f8f9 commit 2947ffe
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 29 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@
*.toc
*.nav
*.vrb
*.fdb_latexmk
*.fls
2 changes: 2 additions & 0 deletions .latexmkrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
$bibtex_use = 2;
$clean_ext = "nav snm vrb";
34 changes: 5 additions & 29 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,33 +1,9 @@
BUILD := \
p \
p-notes \
.PHONY: main clean FORCE

main: p.pdf p-notes.pdf

DEPS := \
beamerthemeauriga.sty \
beamercolorthemeauriga.sty \
presentation.tex \
$(shell find slides -name '*.tex') \


LATEX := lualatex

LATEXOPTS := -interaction nonstopmode

TARGETS := $(patsubst %, %.pdf, $(BUILD))

# phony targets

all: $(TARGETS)
%.pdf: FORCE
latexmk -pdflatex='lualatex -interaction nonstopmode' -pdf $(patsubst %.pdf,%.tex,$@)

clean:
rm -rf *.pdf *.aux *.bbl *.blg *.log *.nav *.out *.snm *.toc *.vrb

.PHONY: all clean

# main targets

%.pdf: %.tex $(DEPS)
$(eval SRC_$@ = $(patsubst %.tex, %, $<))
$(LATEX) $(LATEXOPTS) $(SRC_$@)
$(LATEX) $(LATEXOPTS) $(SRC_$@)
latexmk -pdf -C

0 comments on commit 2947ffe

Please sign in to comment.