⇦ Back

Tested on Windows 7 and Ubuntu 20.04

Install Pandoc

  • See here
  • Ubuntu: sudo apt-get install pandoc

Create a Pandoc Build System in Sublime Text

  • Create a new Sublime-Build file:
    • Sublime-Build files tell Sublime Text how you want to build a document when you hit Ctrl+B
    • Tools > Build System > New Build System…
    • In the “untitled.sublime-build” that appears, replace everything with
    {
        "shell_cmd": "pandoc -o \"$file.pdf\" \"$file\" && start SumatraPDF \"$file.pdf\"",
        "selector": "text.html.markdown",
    }
  • Save as Markdown to PDF.sublime-build
  • Tools > Build System > select “Automatic” to ensure Sublime picks your new Markdown build system
  • With a .md file open, hit Ctrl+B
  • You must have Sumatra PDF installed for this to work (https://www.sumatrapdfreader.org/free-pdf-reader.html)

⇦ Back