A pandoc filter to use minted for typesetting code in the LaTeX and Beamer modes.
- LaTeX
- Python 3
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- 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.