cv/RENDER.md

1.3 KiB

Rendering markdown to PDF

For documents I intend to distribute (such as this CV), I typically watch markdown files for changes in a couple tmux panes, rendering them to PDF. If the resulting CV is a bit staid, it makes up for it with version control on the CV's contents, and a good workflow. I haven't really automated it beyond this yet.

Pandoc uses LaTeX as an intermediate rendering step, and most of the variables passed to Pandoc below are for LaTeX's benefit: fonts, geometry, etc.

Prerequisites

Command

pandoc \
    -f gfm \
    -V fontfamily=merriweather \
    -V geometry:margin=0.8in \
    -V pagestyle:empty \
    -V fontfamilyoptions:light \
    -V linestretch:1.1 \
    README.md \
    -o cv_nicholas-warzin_2023.pdf

Explanation

  • -f gfm Assume README.md is written in GitHub-flavoured Markdown, ensuring consistent rendering as a PDF and as a repository's README.md
  • -V pagestyle:empty Drop page numbers

Formatting scratchpad

Use this for cover letters:

pandoc
-f gfm
input.md
-o output.pdf
-V fontfamily=merriweather
-V geometry:margin=0.8in
-V pagestyle:empty
-V fontfamilyoptions:light
-V linestretch:1.5