I would like to highlight any expression made of letters and that starts with one @. The use of moredelim=*[s][\color{blue}]{@}{\ }
works only in case like @name
is followed by one space. The following code nearly works except that I do not want the parenthesis to be colored in case like @decorator(x=3, y='some text')
because that is @decorator(
which is caught.
moredelim=[s][\bfseries\color{gray}]{@}{\ },
moredelim=[s][\bfseries\color{gray}]{@}{(},
The use of moredelim=[s][\bfseries\color{gray}]{@}{(}
is not a good solution because the search is done on several lines... :-(
^@.*?
But how is this a tex question? Do you want LaTeX to do this as it compiles? – Ariel Apr 11 '12 at 16:38listings
is one LaTeX package. – projetmbc Apr 11 '12 at 16:49