PandocAssist
"PandocAssist" is a plugin for pandoc.
It lets you render markdown files as a PDF, ppt document, word document, or html file.
Prerequisites
You need to install Pandoc - a universal document converter.
Alternatively you may set the useDocker
option to true and the extension runs Pandoc in a container using the latest official pandoc/latex image. This could result in a delay the first time it runs, or after an update to the container while it pulls down the new image.
Usage
When you open a markdown file, you'll see a icon in right.
Releases
- August 21st, 2023
- Package updates
- Read me updates
Setting additional pandoc options
Find pandoc
in settings.json and add the options you want to use. For example:
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": "",
// path to the pandoc executable. By default gets from PATH variable
"pandoc.executable": ""
// enable running pandoc in a docker container
"pandoc.useDocker": "true"
You can set options for each output format.
default: $ pandoc inFile.md -o outFile.{pdf|word|html}
For example, for Japanese documents.
PDF
"pandoc.pdfOptString": "--pdf-engine=lualatex -V documentclass=ltjarticle -V geometry:a4paper -V geometry:margin=2.5cm -V geometry:nohead",
--pdf-engine=lualatex
: need to create a Japanese PDF
-V documentclass=ltjarticle
: need to create a Japanese PDF
-V geometry:a4paper -V geometry:margin=2.5cm -V geometry:nohead"
: geometory options
Word(docx)
pandoc.docxOptString": "",
- It will work even if you do not set the options.
HTML5
"pandoc.htmlOptString": "-s -t html5"
-s
: produce a standalone document
-t html5
: HTML5 output format
For more information please refer to the Pandoc User's Guide.