-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (30 loc) · 934 Bytes
/
Copy pathMakefile
File metadata and controls
42 lines (30 loc) · 934 Bytes
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
BASE = resume
PDFOUT = $(BASE).pdf
HTMLOUT = $(BASE).html
TXTOUT = $(BASE).txt
RSTINCLUDE = utils.rst
LATEXSTYLE = mystyle.tex
CSSSTYLE = resume.css
PDF = pdflatex
RST2LATEX = rst2latex
RST2HTML = rst2html
HTMLLINKCSS = --link-stylesheet
RSTHTMLOPTS = --stylesheet=$(CSSSTYLE) --strip-comments
RSTLATEXOPTS= --stylesheet=$(LATEXSTYLE) \
--table-style=nolines \
--use-latex-docinfo \
--strip-comments
PDFOPTS =
all: $(PDFOUT) $(HTMLOUT) $(TXTOUT)
%.pdf: %.tex $(LATEXSTYLE)
$(PDF) $(PDFOPTS) $<
$(RM) $@
$(PDF) $(PDFOPTS) $<
%.html: %.rst $(RSTINCLUDE)
perl -ple '$$_ .= <> if /^\d{4}/; chomp;' $< | $(RST2HTML) $(RSTHTMLOPTS) $(HTMLLINKCSS) > $@
%.txt: %.rst plaintext.sh
./plaintext.sh < $< > $@
%.tex: %.rst $(RSTINCLUDE)
$(RST2LATEX) $(RSTLATEXOPTS) $< $@
sed -i 's/LaTeX/\\latex{}/g;s/TeX/\\TeX{}/g' $@
# sed -ri 's/\b[A-Z]{3,}\b/\\textsc{\L\0}/g' $@