Skip to content

Commit

Permalink
Add a Makefile to generate PDFs, and a README for instructions
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
stellarhopper committed Jan 13, 2022
1 parent 9781957 commit a8b66fe
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
PANDOC := pandoc
PANDOC_OPTS += --pdf-engine=xelatex
PANDOC_OPTS += -V geometry:"top=2cm, bottom=2cm, left=2.5cm, right=2.5cm"
PANDOC_OPTS += -V mainfont="DroidSans"
PANDOC_OPTS += -V urlcolor=RoyalBlue
PANDOC_OPTS += --include-in-header=template.tex

SRCS := $(shell find . -type f \( ! -iname "README*" \) -name '*.md')
OBJS := $(patsubst %.md,%.pdf,$(SRCS))

all: $(OBJS)

%.pdf: %.md
$(PANDOC) $(PANDOC_OPTS) -o $@ $<

clean:
rm -f *.pdf
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### Building PDFs
* Install prerequisites:
* dnf install pandoc texlive texlive-xetex texlive-ulem
* `make -j` to make everything, or
* `make <desired_file.pdf>` to make a specific pdf.
3 changes: 3 additions & 0 deletions template.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\let\oldrule=\rule
\renewcommand{\rule}[1]{\oldrule{\linewidth}}
\pagenumbering{gobble}

0 comments on commit a8b66fe

Please sign in to comment.