Wednesday, 4 September 2013

Emacs syntax highlighting for custom LaTeX comment environment

Emacs syntax highlighting for custom LaTeX comment environment

I have defined a custom comment environment (through \usepackage{verbatim}):
\newenvironment{customComment}[1]
{
\noindent{\textsc{Commented bloc}: #1}}
\comment}
Commented block
{\endcomment}
What I want to do is to highlight the content of the
\begin...\end{customComment} either:
as an already existing environment (font-lock-comment-face maybe but
haven't found any working example); or
through a complete font/background etc. customization.
Already tried the defvar... solution from here and (for a similar command
this time) this example.
Would be great if you found a solution that only needs editing the .emacs
or adding a.el` (I've got a load of these customComments).

No comments:

Post a Comment