28

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.

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

2 Answers 2

51

There's a text lexer that highlights nothing.

1
0

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:

\usepackage[newfloat]{minted}
\usepackage[many]{tcolorbox}
\definecolor{Gray}{gray}{0.9}
\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:

minted

You must log in to answer this question.

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