Skip to content

ineol/depygmentize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

depygmentize

It inlines the highlighted code from the minted package. The resulting tex file can be compiled without the shell-escape option. Which can be necessary if, for instance, the tex file must be compiled on the editor's servers.

Also it can greatly reduce compile times.

Usage

python3 depygmentize.py -i main.tex -o final.tex -l coq

looks for

\usepackage{minted}
\newminted{coq}{fontsize=\\footnotesize,mathescape}

and replaces all occurences of

\begin{coqcode}
...
\end{coqcode}

by the highlighting tex code generated by pygments.

Other options

-m x changes the name of the defined macro in \newminted{x}. By default it is the same as -l.

-p x changes the name of file that minted uses to define its macros. By default it is pygments_prelude.tex.

About

Use minted without --shell-escape

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages