Uday S Reddy <[email protected]> writes:

Hi Uday,

> I am wondering if there is a way to get AucTeX to fontify the LaTeX
> commands inside the math.  Right now, I get everything inside math in
> one uniform color.

Well, currently there a functions `font-latex-match-math-env' and
`font-latex-match-math-envII' that are used by font-lock for fontifying
every math content in math environments in `font-latex-math-face', and
also a math-command class in `font-latex-built-in-keyword-classes' for
fontifying math content in macros such as \ensuremath{\frac{1}{2}} [uh,
the latter doesn't seem to work for me now...].

So basically with

  (defun font-latex-match-math-env (limit)
    nil)

you'd omit math-face fontification of \[ ... \] and \( ... \), and with

  (defun font-latex-match-math-envII (limit)
    nil)

you'd omit the math-face fontification for math environments like
eqnarray etc (see `font-latex-math-environments').  Then the macros in
\[ ... \] and the environments are fontified with the usual macro face.

However, $$ ... $$ is hard-coded, but you can remove its matcher using
`font-lock-remove-keywords' if you like.

Bye,
Tassilo


_______________________________________________
auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex

Reply via email to