I have this LaTeX code that I want to typeset using listings:
\documentclass[paper=a4,fontsize=12pt,version=last]{scrlttr2}
I want to emphasize "scrlttr2" with a different format. How can it be done with listings?
|
I have this LaTeX code that I want to typeset using listings:
I want to emphasize "scrlttr2" with a different format. How can it be done with listings? |
|||
|
|
|
You must set
|
|||
|
|
|
You can also use one escaping character. I use ⠶ because it is not used in listings.
|
|||||||
|
|
More generally: if you want to emphasize everything between pairs of braces (and accounting for nested braces), you can define them as a special type of "comment". You can do this for other "spans" of characters which you would like to be typeset differently, such as math-mode elements.
Result:
The "interpretation" of these spans as somehow being "comments" is incidental; what matters is that it allows you to set the formatting. |
|||
|
|