Skip to content

Commit 299d871

Browse files
committed
Add a Makefile to generate PDFs, and a README for instructions
Add a Makefile that uses pandoc to generate PDFs from any .md files present in the repo. Add a README detailing how to use it. Signed-off-by: Vishal Verma <[email protected]>
1 parent 9781957 commit 299d871

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

Makefile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
PANDOC := pandoc
2+
PANDOC_OPTS += --pdf-engine=xelatex
3+
PANDOC_OPTS += -V geometry:"top=2cm, bottom=2cm, left=2.5cm, right=2.5cm"
4+
PANDOC_OPTS += -V mainfont="DroidSans"
5+
PANDOC_OPTS += -V urlcolor=RoyalBlue
6+
PANDOC_OPTS += --include-in-header=template.tex
7+
8+
SRCS := $(shell find . -type f \( ! -iname "README*" \) -name '*.md')
9+
OBJS := $(patsubst %.md,%.pdf,$(SRCS))
10+
11+
all: $(OBJS)
12+
13+
%.pdf: %.md
14+
$(PANDOC) $(PANDOC_OPTS) -o $@ $<
15+
16+
clean:
17+
rm -f *.pdf

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
### Building PDFs
2+
* Install prerequisites:
3+
* dnf install pandoc texlive texlive-xetex texlive-ulem
4+
* `make -j` to make everything, or
5+
* `make <desired_file.pdf>` to make a specific pdf.

0 commit comments

Comments
 (0)