While I'm switching from
listings, I would like to ask you
for this comparison.
The following is what it comes to my mind till now:
mintedneeds Pygments to work,
listingsdoes not (this may be a flaw for beginners but an advantage for expert users)
verbatimstyle as default, in
listingsit has to be set (How can I make lstlisting look exactly like verbatim?)
listingsis very easy to add a new keyword, in
mintedis not (for beginners, at least, How to add custom C++ keywords to be recognized by Minted?)
samepageoption, allows to have your code snippets not broken across pages, if you'd like to do the same in
listings, you have to use
tcolorbox, or other tricks (Avoid page breaks in \lstlistings)
listingsallows to use escape chars within a string,
minteddoes not (Minted escapeinside doesn't work within a string).
Eventually, which are the pros and cons of these two packages?