Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Pandoc PlusNew to Visual Studio Code? Get it now.
Pandoc Plus

Pandoc Plus

Valentin Barral

|
21 installs
| (0) | Free
Run Pandoc with configurable transformations from VS Code.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Pandoc Plus (VS Code)

Run Pandoc with configurable transformations directly from VS Code (quick pick of transformations, per-format args, file outputs, etc.).

Usage

  • Command Palette: Pandoc+: Transform
  • Or run a specific transformation by label: Pandoc+: Run Transformation with args: { "label": "PDF" }

Configuration

Open settings (JSON) and customize pandocPlus.transformations. Each key is a label shown in the quick pick. User values are merged with the built-in defaults.

Important: pandocArgs are passed directly to pandoc (no shell). Path shortcuts like ~ or $HOME are not expanded. Use absolute paths.

Example (Beamer with XeLaTeX):

"pandocPlus.transformations": {
  "Beamer Slides (PDF)": {
    "selector": [{ "language": "markdown" }],
    "from": { "markdown": "markdown" },
    "pandocArgs": ["-t", "beamer", "--pdf-engine=xelatex"],
    "outputExtension": "pdf",
    "outputLocal": true
  }
}

Key settings

  • pandocPlus.path: path to pandoc binary (or null to use PATH)
  • pandocPlus.transformations: mapping of label -> transformation config
  • pandocPlus.fileOutputFormats: formats treated as file outputs
  • pandocPlus.revealOutput: auto-open file outputs with OS
  • pandocPlus.workingDirectory: document, workspace, or none

Transformation fields

  • selector: VS Code document selector (string language id, object, or array)
  • from: pandoc input format (string) or mapping of language id -> format
  • pandocArgs: list of pandoc arguments
  • newBuffer: open output in a new editor (defaults true)
  • outputLanguage: VS Code language id for output buffer
  • outputExtension: override file extension for file outputs
  • outputLocal: write file output next to the source document
  • revealOutput: override global reveal behavior

Examples (settings.json)

Replace placeholder paths like /path/to/... with absolute paths on your machine.

"pandocPlus.transformations": {
  "Markdown (Pandoc)": {
    "selector": [{ "language": "html" }],
    "from": { "html": "html" },
    "pandocArgs": ["--to=markdown", "--wrap=none", "--atx-headers"],
    "newBuffer": true,
    "outputLanguage": "markdown"
  },

  "HTML 5": {
    "selector": [{ "language": "markdown" }],
    "from": { "markdown": "markdown" },
    "pandocArgs": [
      "--to=html5",
      "--no-highlight",
      "--standalone",
      "--mathjax=https://cdn.jsdelivr.net/npm/mathjax@4/tex-mml-chtml.js"
    ],
    "newBuffer": true,
    "outputLanguage": "html"
  },

  "PDF": {
    "selector": [{ "language": "markdown" }, { "language": "html" }],
    "from": { "markdown": "markdown", "html": "html" },
    "pandocArgs": ["-t", "pdf"],
    "outputExtension": "pdf",
    "outputLocal": true
  },

  "PDF - xelatex": {
    "selector": [{ "language": "markdown" }, { "language": "html" }],
    "from": { "markdown": "markdown", "html": "html" },
    "pandocArgs": ["--pdf-engine=xelatex", "-V", "block-headings=true", "-t", "pdf"],
    "outputExtension": "pdf",
    "outputLocal": true
  },

  "PDF - wkhtmltopdf": {
    "selector": [{ "language": "markdown" }, { "language": "html" }],
    "from": { "markdown": "markdown", "html": "html" },
    "pandocArgs": ["--pdf-engine=wkhtmltopdf", "-t", "pdf"],
    "outputExtension": "pdf",
    "outputLocal": true
  },

  "PDF - Eisvogel Theme": {
    "selector": [{ "language": "markdown" }, { "language": "html" }],
    "from": { "markdown": "markdown", "html": "html" },
    "pandocArgs": ["-t", "pdf", "--template=eisvogel", "--data-dir=/path/to/pandoc-data", "--listings"],
    "outputExtension": "pdf",
    "outputLocal": true
  },

  "Microsoft Word": {
    "selector": [{ "language": "markdown" }, { "language": "html" }],
    "from": { "markdown": "markdown", "html": "html" },
    "pandocArgs": ["-t", "docx"]
  },

  "PDF TOC (Narrow margins)": {
    "selector": [{ "language": "markdown" }, { "language": "html" }],
    "from": { "markdown": "markdown", "html": "html" },
    "pandocArgs": [
      "-V",
      "geometry:margin=1.25in",
      "-s",
      "--toc",
      "--number-sections",
      "--parse-raw",
      "-t",
      "pdf"
    ],
    "outputExtension": "pdf",
    "outputLocal": true
  },

  "PDF TOC": {
    "selector": [{ "language": "markdown" }, { "language": "html" }],
    "from": { "markdown": "markdown", "html": "html" },
    "pandocArgs": ["-s", "--toc", "--number-sections", "--parse-raw", "-t", "pdf"],
    "outputExtension": "pdf",
    "outputLocal": true
  },

  "HTML TOC": {
    "selector": [{ "language": "markdown" }],
    "from": { "markdown": "markdown" },
    "pandocArgs": ["--to=html5", "--no-highlight", "-s", "--toc"],
    "newBuffer": true,
    "outputLanguage": "html"
  },

  "Beamer Slides (PDF)": {
    "selector": [{ "language": "markdown" }, { "language": "html" }],
    "from": { "markdown": "markdown", "html": "html" },
    "pandocArgs": [
      "-t",
      "beamer",
      "--pdf-engine=pdflatex",
      "-V",
      "classoption=dvipsnames",
      "-V",
      "colorlinks",
      "-V",
      "linkcolor=blue",
      "-V",
      "urlcolor=blue"
    ],
    "outputExtension": "pdf",
    "outputLocal": true
  },

  "Beamer Slides (PDF) Xelatex": {
    "selector": [{ "language": "markdown" }, { "language": "html" }],
    "from": { "markdown": "markdown", "html": "html" },
    "pandocArgs": ["-t", "beamer", "--pdf-engine=xelatex"],
    "outputExtension": "pdf",
    "outputLocal": true
  },

  "Beamer Slides (LaTeX)": {
    "selector": [{ "language": "markdown" }, { "language": "html" }],
    "from": { "markdown": "markdown", "html": "html" },
    "pandocArgs": ["-t", "beamer"],
    "newBuffer": true,
    "outputLanguage": "latex"
  },

  "s5 Slides": {
    "selector": [{ "language": "markdown" }, { "language": "html" }],
    "from": { "markdown": "markdown", "html": "html" },
    "pandocArgs": ["-t", "slidy", "-s", "--self-contained"],
    "newBuffer": true,
    "outputLanguage": "html"
  }
}

Notes

  • If output is a file format (pdf, docx, etc.) and no -o is provided, the extension generates an output path.
  • The extension removes -t pdf/--to=pdf for compatibility with pandoc PDF output rules.
  • Use pandocArgs for any pandoc options (themes, templates, engines, etc.).

Resources

Pandoc template referenced in the examples (Eisvogel):

https://pandoc-templates.org/template/eisvogel/

Author

Valentin Barral

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft