How do I turn off syntax highlighting in minted?

Defining my DSL with a CFG and then a PEG; and the syntax highlighting is getting in the way.

  • Wow, looks like the pycon lexer does the trick…
    – A T
    Sep 3, 2013 at 7:00

2 Answers 2


There's a text lexer that highlights nothing.


I know this is an old question and G. Poore's answer was accepted long ago, however I leave this here in case it saves someone some time:

You could define the following command:

\newcommand{\txtmint}[1]{\mintinline[fontsize=\scriptsize, bgcolor=Gray]{text}{#1}}

Which you can just use as: \txtmint{some code without syntax highlighting}.

Within the [] in the definition of the command, you can specify any options you want. With these settings you get something like this:


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .