https://github.com/xoolive/autopandoc
Visual Studio Code extension to run pandoc based on yaml header options
https://github.com/xoolive/autopandoc
Last synced: 9 months ago
JSON representation
Visual Studio Code extension to run pandoc based on yaml header options
- Host: GitHub
- URL: https://github.com/xoolive/autopandoc
- Owner: xoolive
- License: mit
- Created: 2024-05-23T15:39:10.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-15T09:37:26.000Z (about 2 years ago)
- Last Synced: 2025-03-15T10:12:40.466Z (over 1 year ago)
- Language: TypeScript
- Size: 43.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Changelog: CHANGELOG.md
- License: license.md
Awesome Lists containing this project
README
# autopandoc
[](https://marketplace.visualstudio.com/items?itemName=xoolive.autopandoc)

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:
```yaml
---
autopandoc: pandoc readme.md -o readme.pdf
---
```
or for slides, with beamer:
```yaml
---
autopandoc: pandoc slides.md -o slides.pdf -t beamer --pdf-engine=xelatex
---
```
Note: The command is executed from the folder containing the current file.
## Installation
You need to have [pandoc](https://pandoc.org) installed, with, if need be, the proper LaTeX compilers.
Then, look for extension `xoolive.autopandoc` (or run `ext install xoolive.autopandoc`)
## Development
Generate the template for VSCode extensions ([instructions](https://code.visualstudio.com/api/get-started/your-first-extension))
```sh
npm install --global yo generator-code
```
Compile locally:
```sh
npm run compile
```
Publish the extension ([instructions](https://code.visualstudio.com/api/working-with-extensions/publishing-extension))
```sh
npm install -g @vscode/vsce
vsce publish
```