I tend to use the minted
package for including code samples within my documents, which produces very nice output. However, because Pygments always produces a verbatim environment there's no way to inline the code if I need to discuss particular features of it. What is the best way to typeset inline code to go alongside code produced by minted
?
Using the listings
package just for \lstinline
is one option I've considered, but it seems a bit odd to use both minted
and listings
together. I've used listings
in the past, but (in my opinion and with the samples I've tried) I don't think the output is as nice as that produced with minted
. Are there any other means of producing inline code that I'm unaware of?
Best Answer
You can do it with
minted
if you are willing to patch it: