Code

Add a simple Makefile snippet to simplify usage. master
authorSebastian Harl <sh@tokkee.org>
Sat, 4 Jun 2016 12:29:12 +0000 (14:29 +0200)
committerSebastian Harl <sh@tokkee.org>
Sat, 4 Jun 2016 12:29:12 +0000 (14:29 +0200)
Makefile
README.md
tokkeebeamer.mk [new file with mode: 0644]

index b509107..008e70f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,10 @@
+include tokkeebeamer.mk
+
 TEXMFHOME := $(shell kpsewhich -expand-var \$$TEXMFHOME)
 
 all: example.pdf
 
 example.pdf: example.tex *.sty *.dict tokkee_logo.* Makefile
-       # the default titlegraphic requires the presentation to be compiled twice
-       xelatex example.tex
-       xelatex example.tex
 
 clean:
        rm -f *.aux *.log *.nav *.out *.snm *.toc
index 769af37..df2a99e 100644 (file)
--- a/README.md
+++ b/README.md
@@ -7,6 +7,17 @@ slides. It may or may not be useful to anyone else …
 The files are provided under the terms of the 2-clause BSD license. See
 LICENSE for details.
 
+Usage
+-----
+
+The included tokkeebeamer.mk Makefile snippet makes it easy to use the package
+from arbitrary (sub)directories:
+
+    TOKKEEBEAMER = «(sub)directory»
+    include $(TOKKEEBEAMER)/tokkeebeamer.mk
+    
+    slides.pdf: slides.tex
+
 Required packages
 -----------------
 
diff --git a/tokkeebeamer.mk b/tokkeebeamer.mk
new file mode 100644 (file)
index 0000000..aa523bc
--- /dev/null
@@ -0,0 +1,5 @@
+TOKKEEBEAMER ?= .
+
+%.pdf: %.tex
+       TEXINPUTS=$(TOKKEEBEAMER):$$TEXINPUTS xelatex $<
+       TEXINPUTS=$(TOKKEEBEAMER):$$TEXINPUTS xelatex $<