dfinke / vscode-pandoc

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

add custom format feature #33

Closed fredericbarrau closed 6 months ago

fredericbarrau commented 5 years ago

Add a (limited) custom format feature, as required in #17

For the end user, this is trivially done by adding options in the extension's configuration :

For adding custom output formats, just add pandoc.<format>OptString keys in your settings, with the proper pandoc options:

// This will add an "epub" output format to vscode-pandoc
"pandoc.epubOptString": "-t epub"

This is not really flexible: for instance, it is not possible to have several formats for PDF (one with TOC, one with different font, etc). On the other hand, this allows to remain compatible with the previous versions of the extension.

I also added a few formats to the extension: mediawiki, odt, textile.

Fred