dfinke / vscode-pandoc

Visual Studio Code extension lets you render markdown to pdf, word doc or html with pandoc
125 stars 36 forks source link

vscode-pandoc

The vscode-pandoc Visual Studio Code extension lets you quickly render markdown files as a pdf, word document or html file.

Prerequisites

You need to install Pandoc - a universal document converter.

Usage

Two ways to run the extension. You need to have a markdown file open.

  1. press F1 on Windows (shift+cmd+P on Mac), type pandoc, press Enter
  2. Or - press the key chord ctrl+K then P (cmd+K then P on Mac)

Then choose from the list what document type you want to render and press enter (you can also type in the box rather than cursor around).

Enlarged version of the video.

Releases

Setting additional pandoc options

  1. choose 'Preference -> UserSettings'
  2. Find: pandoc in Default Settings
  3. Copy and paste
  4. to settings.json

example:

//-------- Pandoc Option Configuration --------

// pandoc .pdf output option template that you would like to use
"pandoc.pdfOptString": "",

// pandoc .docx output option template that you would like to use
"pandoc.docxOptString": "",

// pandoc .html output option template that you would like to use
"pandoc.htmlOptString": ""

Example: Setting for Japanese document

For more information please refer to the Pandoc User's Guide.