latex and listings : highlighting some parts of the code
- by Jérôme
I'm using Latex and the listings package to display some C++ code (with syntax highlighting) inside a document.
I need to highlight some parts of the code. This specific highlight has nothing to do with syntax highlighting, it's just some parts of the code I'd like to highlight so that the reader can focus on it.
I wish I could make some variable name, for instance, displaying in bold, and on a yellow background. Here is something I did with MSWord I'd like to reproduce with Latex (of course, not the red and green underlining) :
.
I haven't found a way to do it with the listings package. Is it possible ?