I am using the listings package.
According to the manual, this setting will put in the appropriate format the code between /*+ and */ and between /*- and */.
\lstset{
morecomment=[s][\color{blue}]{/*+}{*/},
morecomment=[s][\color{red}]{/*-}{*/}
}
The strings /*+, /*-, */ will still appear, which is desirable sometimes.
How can I do remove the delimiters from the rendered code? (I don't want the delimiter strings to be echoed in the listings).
[is]instead of[s]. Theistands for invisible. – Hood Chatham Aug 22 '18 at 21:20imakes the whole content disappear. – alfC Aug 22 '18 at 21:22\lstset{moredelim=[is][\ttfamily]{|}{|}}– alfC Aug 22 '18 at 21:24