Markdown To Pdf With Pandoc And Miktex (Windows)

Pavol Kutaj
1 min readJul 17, 2021

--

The aim of this tutorial🔍 is to go through the steps needed to convert markdown into pdf using pandoc and miktex.

1. install pandoc with chocholatey

choco install pandoc

2. install miktex for pdf engine

pandoc -V geometry:"top=2cm, bottom=1.5cm, left=2cm, right=2cm" -f markdown-implicit_figures -o <output_name>.pdf <input_name>.md

3. remove page numbering

  • add the following at the top of the markdown file
\pagenumbering{gobble}

4. resize images

  • when merging add { width=70% } after the image link to have
  • the following is a link_attribute of latex
![2021-01-20](../assets/2021-01-20-3.jpg){ width=70% }

5. adding the title

  • I want to start the section with a larger title
  • add the following to the top of the merged markdown file to have 01–2021 as the section title
% 01-2021

6. change fonts

pandoc -V fontfamily:Alegreya -V geometry:"top=2cm, bottom=1.5cm, left=2cm, right=2cm" -f markdown-implicit_figures -o <output_name>.pdf <input_name>.md

7. link colors

pandoc -V colorlinks=true -V linkcolor=teal -V urlcolor=teal -V toccolor=gray -V geometry:"top=2cm, bottom=1.5cm, left=2cm, right=2cm" -f markdown-implicit_figures -o cv.pdf index.markdown

7. sources

--

--

No responses yet