forked from HoGentTIN/ilnx-slides
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
62 lines (47 loc) · 1.38 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
## Presentation makefile
OUTPUT := docs
# Directory for reveal.js
REVEAL_JS_DIR := $(OUTPUT)/reveal.js
# File name of the reveal.js tarball
REVEAL_JS_TAR := 3.4.0.tar.gz
# Download URL
REVEAL_JS_URL := https://github.com/hakimel/reveal.js/archive/$(REVEAL_JS_TAR)
STYLE := hogent
STYLE_FILE := $(REVEAL_JS_DIR)/css/theme/$(STYLE).css
## Presentation
$(OUTPUT)/index.html: besturingssystemen-linux.md $(REVEAL_JS_DIR) $(STYLE_FILE)
pandoc \
--standalone \
--to=revealjs \
--template=default.revealjs \
--variable=theme:hogent \
--highlight-style=haddock \
--output $@ $<
# Highlight styles: espresso or zenburn (not enough contrast in the others)
# Theme: black, moon, night
$(STYLE_FILE): $(STYLE).css
cp $(STYLE).css $(STYLE_FILE)
#$(OUTPUT)/img/*: img/*
# cp -r img/* $(OUTPUT)/img
## Download and install reveal.js locally
$(REVEAL_JS_DIR):
wget $(REVEAL_JS_URL)
tar xzf $(REVEAL_JS_TAR)
rm $(REVEAL_JS_TAR)
mv -T reveal.js* $(REVEAL_JS_DIR)
all: $(STYLE_FILE) $(OUTPUT)/index.html
handouts.pdf: basic-commands-el7.md.md
pandoc --variable mainfont="DejaVu Sans" \
--variable monofont="DejaVu Sans Mono" \
--variable fontsize=11pt \
--variable geometry:margin=1.5cm \
-f markdown $< \
--latex-engine=lualatex \
-o $@
## Cleanup
clean:
rm -f $(OUTPUT)/*.html
rm -f $(OUTPUT)/*.pdf
## Thorough cleanup (also removes reveal.js)
mrproper: clean
rm -rf $(REVEAL_JS_DIR)