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 b509107bb3136276d5097f0a4b10ba774a622e34..008e70fbeb31f7c05cfbd6fcb9e34b82bf659bda 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 769af372ae3e8253b5fc0f66f7de1ac41cd70322..df2a99ee3a01fc7f6e6bc6201af77fd64cc33f93 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 $<