I am trying to color only certain words within a verbatim environment. I know how to color the entire verbatim or certain lines, but what I need is a little different: if a line contains 2 words, I only want one of the two to be colored but wouldn't know how to do that.
I post what I tried, but with no success (I am using the color package):
Code: Select all
{\color{red} {string1}} string2 string3
Thank you very much in advance
All the best
cfd