Skip to content

A pandoc filter to use minted for typesetting code in the LaTeX mode

License

Notifications You must be signed in to change notification settings

megabyde/pandoc-minted

Repository files navigation

pandoc-minted

CI

Overview

A pandoc filter to use minted for typesetting code in the LaTeX and Beamer modes.

Requirements

Usage

Important

Ensure the LaTeX preamble loads minted by adding this to your Markdown YAML header:

---
header-includes:
  - \usepackage{minted}
---

Due to known issue with Pandoc's temporary file handling (see #4721), it is easiest to generate a TeX file first, then compile it:

# Generate the TeX file
pandoc example.md -s --filter ./pandoc_minted.py -o example.tex
# Compile with pdflatex (shell escape is required by minted)
pdflatex --shell-escape -interaction=batchmode example.tex
# Run a second time to resolve cross-references
pdflatex --shell-escape -interaction=batchmode example.tex

License

  • Portions of this project are derived from pandoc-minted by Nick Ulle, licensed under the ISC License.
  • Modifications and additions are licensed under the MIT License.

See the LICENSE file for details.

About

A pandoc filter to use minted for typesetting code in the LaTeX mode

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •