This is a very basic and preliminary extension for Visual Code which is activated for any open Markdown file.
The extension parses the autopandoc
entry in the YAML header and runs it on the autopandoc: Run Pandoc
command, or with the Ctrl+P P
(⌘+P P
on Mac OS) shortcut
Example:
---
autopandoc: pandoc readme.md -o readme.pdf
---
or for slides, with beamer:
---
autopandoc: pandoc slides.md -o slides.pdf -t beamer --pdf-engine=xelatex
---
Note: The command is executed from the folder containing the current file.
You need to have pandoc installed, with, if need be, the proper LaTeX compilers.
Then, look for extension xoolive.autopandoc
(or run ext install xoolive.autopandoc
)
Generate the template for VSCode extensions (instructions)
npm install --global yo generator-code
Compile locally:
npm run compile
Publish the extension (instructions)
npm install -g @vscode/vsce
vsce publish