How can I display the %
character with minted without it being considered a comment? If I write \minted{%}
the rest of the line is considered a comment, and if I write \minted{\%}
minted displays both characters: \%
Thanks.
If I use \mintinline[style=bw]{c}{%}
it is displayed well. However if I use the command that I defined: \newcommand{\mintbw}[1]{\mintinline[style=bw]{c}{#1}}
and write \mintbw{%}
the %
character is considered a comment.
Problem solved! Thanks.
Best Answer
Just use the
minted
environment, not the\minted
command, which is 'possible', but will not provide what is requested.Of course, the correct language must be specified, e.g.
TeX
orphp
(if I am remembering correctly), where%
is a comment character.