How to configure R Markdown to use Latex Package Minted

92 views Asked by At

I would like to use the latex package "Minted" with R Markdown but I am running into R Studio external package configuration issues.

Documentation for the Latex Minted Package can be found here:

https://tug.ctan.org/macros/latex/contrib/minted/minted.pdf

In order to use this package - there is a tinytex shell escape requirement:

This is required in the R Markdown (preamble) to allow for a shell escape:

knitr::opts_chunk$set(echo = TRUE)
options(tinytex.engine_args = '-shell-escape')

But I obtain this R-Studio console error:

! Package minted Error: You must have `pygmentize' installed to use this package. 
! system returned with code 256

I have Pygments installed in several stand alone Python Environments.

I am not sure how to configure the Pygments Python environment to support R Studio.

Any help would be appreciated greatly.

See above problem statement for description of what has been tried

0

There are 0 answers