Unfortunately the built-in code highlighting for (La)TeX doesn't recognize and color math environments, such as
$M$
, \[ \exp(i z) = \cos(z) + i \,\sin(z) \]
or
Code: Select all
Code, edit and compile here:
\begin{align}\exp(z) := \sum_{n = 0}^{\infty} \frac{z^n}{n!}\end{align}
Notepad++ however provides for easily creating your own language definitions, which I did.
So this is my ad hoc definition for (La)TeX code highlighting, with emphasis on some math environments and certain keywords. For Code-Folding I'm using \section %\endsection.
To install this language definition, download and unzip "NuTeX.xml" and in Notepad++ menu select [Language > Define your language ... > Import].
Note that it isn't a complete or proper code lighting reflecting all of LaTeX grammar. It certainly features a good number of bugs and was tailored to my own personal use, but you're welcome to change it and then repost your version!
Happy coding!

