TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am wondering if it's possible to add a bit code in latex, perhaps by using some kind of escape character, to mark parts of the minted environment that should be executed as regular latex code?

share|improve this question
do you mean similar to escapeinside from the listings package? – cmhughes Jan 18 '13 at 0:39
@cmhughes: Yes. Or some way of achieving the same goal in the minted environment, even if it doesn't involve escaped text. – Henry B. Jan 18 '13 at 0:51
minted has texcl and mathescape options which are used as their equivalents in listings. Are these enough for you? – hpesoj626 Jan 18 '13 at 0:52
Unfortunately these are only used in comments. I can't see an escapeinside equivalent in the manual. – hpesoj626 Jan 18 '13 at 1:02
@hpesoj626 I guess the problem is that minted leaves the parsing to another tool (Pygments), and this makes dropping out of the parser to do formatting 'hard'. – Joseph Wright Jan 18 '13 at 6:58

Short answer here is 'no': unlike listings, minted relies on Pygments for processing and it would come down to support in this tool. There is an open request for this ability, but it's been that way since 2010 despite a patch being provided.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.