I want to change the color of all verbatim text in an existing beamer presentation. How do I do this easily?

I know how to use colored verbatim text in general, and I found a lot of suggestions here either for defining colored verbatim environments, but this does not help me: the existing presentation uses plain \verb and verbatim- and semiverbatim-envrionments. It does not use fancyvrb or such. I do not want to go through the entire presentation (a whole lecture) and change every single verbatim command, just to change the color of the presented code fragments.

I would simply like verbatim text to have a different color, just like all math can be defined to have a different color to mark that it is math.


1 Answer 1


Redefine \verbatim@font. E.g.


You must log in to answer this question.

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