Hello,
I am trying to syntax highlight the contents of certain environments.
Following the suggestion of a long-ago post on this list
(http://article.gmane.org/gmane.emacs.auctex.general/2875/match=font+lock+environment),
I tried the following to highlight the contents of an environment
called problem:
(add-hook 'LaTeX-mode-hook
(lambda ()
(font-lock-add-keywords
'latex-mode
'(("\\\\begin{problem}\\(\\(.\\|\n\\)+?\\)\\\\end{problem}" 1
'font-latex-sectioning-5-face)
))
))
This works fine most of the time, but if the text inside the problem
environment contains % or $, then none of the text in the environment
is highlighted. How do I fix this?
Thanks,
Janet
_______________________________________________
auctex mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/auctex