help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AucTeX fontifying: mishandling $ within \verb argument and verbatim


From: Michael J Downes
Subject: Re: AucTeX fontifying: mishandling $ within \verb argument and verbatim environment.
Date: 8 Nov 2002 12:47:27 -0800

Adam <a24061@void.yahoo.void.com> writes:

> ...in your \verb!$PATH! blah blah
> blah
> \begin{verbatim}
> $ passwd
> Changing password for USERID
> (current) UNIX password: 
> New password: 
> Retype new password: 
> passwd: all authentication tokens updated successfully
> $ logout
> \end{verbatim}
> blah
> blah
> 
> Everything from PATH through {verbatim} and from logout onward is colored 
> as if in math mode. Anyone know how to fix this?

A workaround that I sometimes use is

  \newcommand{\ignore}[1]{}

  ...in your \verb!$PATH!\ignore$ blah blah

But since that just makes the problem a little less annoying, I also
started working some time ago on a better fontifier for LaTeX files. A
really ambitious one, in fact---I am currently pondering whether it
might be possible to handle even things like

  \newcommand{\beq}{\begin{equation}}
  \newcommand{\eeq}{\end{equation}}
  ...
  \beq
  some math here
  \eeq

But since this doesn't fall within the scope of what the standard
font-lock machinery can handle, there's a lot of work involved and
(alas) I don't expect to have a releasable version any time soon.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]