Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change highlight colors in minted

I was setting up a nice environment to present my code in printed documentations. First I was using the lstlisting package for Latex but then I stumbled upon minted.

minted is really great, but is there a way to change the highlight colors?

Since minted uses the Pygments library, I assume Pygments is the key to the color, but I haven't found it yet.

Could anyone explain how it can be done or post a link that shows how it's done?

minted highlighted output

like image 1000
Maaalte Avatar asked Feb 01 '11 20:02

Maaalte


1 Answers

You want

\usemintedstyle{<name>}

where you can get <name> by doing

pygmentize -L styles

at the command prompt/terminal. For example, the minted documentation itself uses the trac style.

like image 76
Joseph Wright Avatar answered Sep 22 '22 03:09

Joseph Wright