While I'm switching from minted
to listings
, I would like to ask you
for this comparison.
The following is what it comes to my mind till now:
minted
needs Pygments to work,listings
does not (this may be a flaw for beginners but an advantage for expert users)minted
has averbatim
style as default, inlistings
it has to be set (How can I make lstlisting look exactly like verbatim?)in
listings
is very easy to add a new keyword, inminted
is not (for beginners, at least, How to add custom C++ keywords to be recognized by Minted?)minted
, withsamepage
option, allows to have your code snippets not broken across pages, if you'd like to do the same inlistings
, you have to usetcolorbox
, or other tricks (Avoid page breaks in \lstlistings)listings
allows to use escape chars within a string,minted
does not (Minted escapeinside doesn't work within a string).
Eventually, which are the pros and cons of these two packages?
minted
needs to be run with-shell-escape
, depending on the situation this could be a con.minted
never really convincing, but that's a personal opinion.minted
, is, to quote pygments.org: "a wide range of over 300 languages and other text formats is supported"minted
defence, since till now it seems people preferslistings
, thank you!