Pandoc

Info

Pandoc can be installed on Windows, macOS and Linux by following the instructions here.

A swiss-army knife to convert content between many file formats.

It allows for conversion between the following file formats:

  • PDF
  • Markup formats
  • HTML formats
  • Ebooks
  • XML formats
  • \TeX formats
  • Word processor formats
  • Interactive notebook formats and many more...

Demo: Converting from Markdown to HTML

We have a Markdown file demo.md in ~/Documents and we want to convert it into a HTML file with the HTML <title> tag 'Demo'.

  1. Open Command Prompt. Win+ R , cmd , Enter
  2. Navigate to ~/Documents. cd , Space, Documents, Enter
  3. Convert the Markdown file:
1
pandoc demo.md -f markdown -t html -s -o demo.html --metadata pagetitle="Demo"
  • -f markdown: Converts demo.md from a Markdown file.
  • -t html: Converts demo.md to a HTML file.
  • -s: Creates a standalone file.
  • -o demo.html: Put the output in the file demo.html.
  • --metadata pagetitle="Demo": demo.html will have the page title "Demo".