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.

A T
  • 4,093

2 Answers2

51

There's a text lexer that highlights nothing.

G. Poore
  • 12,417
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

Clerni
  • 177