Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
    
Welcome to TeX.SX! –  mafp May 23 '13 at 9:06
4  
Redefine \verbatim@font. E.g. \makeatletter \renewcommand\verbatim@font{\normalfont\ttfamily\color{blue}} \makeatother –  Ulrike Fischer May 23 '13 at 9:06
    
Thank you a lot! Works perfectly fine! –  Steffen May 23 '13 at 9:10

1 Answer 1

up vote 4 down vote accepted

Redefine \verbatim@font. E.g.

\makeatletter 
  \renewcommand\verbatim@font{\normalfont\ttfamily\color{blue}}
\makeatother
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.