tripwire45 wrote:Any ideas?
It's not a big deal. It's easy to augment the language definition within your TeX to add any words you use that are missing. For example...
Code: Select all
\lstset{language=Matlab,
morekeywords={xlim,ylim,var,alpha,factorial,poissrnd,normpdf,normcdf,getfield},
morekeywords=[2]{on, off, interp},
morekeywords=[3]{my_function},
morecomment=[l][\color{blue}]{...}}
The first
morekeywords line adds MATLAB functions not included in the default set. The second line includes MATLAB function parameters. The third line has user-defined functions. The
morecomment turns text after line continuation (...) into a comment. Each line gets styled differently (and you can change those styles in a similar way).
See the
listings documentation for more information. In particular, check out the "Language definitions" section 3.2 for information on how to use
morekeywords,
morecomment, and
morestring. Of course, you can define your own new language entirely as well.
In the case of C#, nearly everything is going to be the same as C++ (or even Java), but there might be small differences. For example, C# has its own way of handling mutable class members (the keyword they use escapes me for a second). If you need such a construct, you can add it pretty easily.
And if worse comes to worst, everything is displayed but it's just not displayed as pretty as it could.