unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* AucTeX fontifying: mishandling $ within \verb argument and verbatim environment.
@ 2002-11-08 11:35 Adam
  2002-11-08 20:47 ` Michael J Downes
  0 siblings, 1 reply; 6+ messages in thread
From: Adam @ 2002-11-08 11:35 UTC (permalink / raw)


For example

...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?

I'm using GNU Emacs 21.1.1, AucTeX 10.0g, on Mandrake 8.2 Linux.

-- 
Thanks,
Adam

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: AucTeX fontifying: mishandling $ within \verb argument and verbatim environment.
  2002-11-08 11:35 AucTeX fontifying: mishandling $ within \verb argument and verbatim environment Adam
@ 2002-11-08 20:47 ` Michael J Downes
  2002-11-09  1:10   ` Peter S Galbraith
       [not found]   ` <mailman.1036805218.32603.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 6+ messages in thread
From: Michael J Downes @ 2002-11-08 20:47 UTC (permalink / raw)


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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: AucTeX fontifying: mishandling $ within \verb argument and verbatim environment.
  2002-11-08 20:47 ` Michael J Downes
@ 2002-11-09  1:10   ` Peter S Galbraith
       [not found]   ` <mailman.1036805218.32603.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 6+ messages in thread
From: Peter S Galbraith @ 2002-11-09  1:10 UTC (permalink / raw)


Michael J Downes <epsmjd@ams.org> wrote:

> 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

I wouldn't know how to fix the \verb problem (I don't even know thta
LaTeX command and don't have a LaTeX book close-by), but without that
line the \vertabim is handled correctly by font-latex.el

Peter

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: AucTeX fontifying: mishandling $ within \verb argument and verbatim environment.
       [not found]   ` <mailman.1036805218.32603.help-gnu-emacs@gnu.org>
@ 2002-11-14 15:51     ` Michael J Downes
  2002-11-15  0:54       ` Peter S Galbraith
  0 siblings, 1 reply; 6+ messages in thread
From: Michael J Downes @ 2002-11-14 15:51 UTC (permalink / raw)


Peter S Galbraith <p.galbraith@globetrotter.net> writes:

> I wouldn't know how to fix the \verb problem (I don't even know thta
> LaTeX command and don't have a LaTeX book close-by), but without that
> line the \vertabim is handled correctly by font-latex.el

Thanks for the tip. I had downloaded a copy of
font-latex.el some time ago, "Version: 0.500 (23 Sep 97)", but
after fetching version 0.800 from http://people.debian.org/~psg/ I did
find that the handling of {verbatim} sections was better.

Because the \verb command does require some special syntax (LaTeX book,
Section C.6.4), handling it properly would probably not be altogether
straightforward.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: AucTeX fontifying: mishandling $ within \verb argument and verbatim environment.
  2002-11-14 15:51     ` Michael J Downes
@ 2002-11-15  0:54       ` Peter S Galbraith
  0 siblings, 0 replies; 6+ messages in thread
From: Peter S Galbraith @ 2002-11-15  0:54 UTC (permalink / raw)


Michael J Downes <epsmjd@ams.org> wrote:

> Peter S Galbraith <p.galbraith@globetrotter.net> writes:
> 
> > I wouldn't know how to fix the \verb problem (I don't even know thta
> > LaTeX command and don't have a LaTeX book close-by), but without that
> > line the \vertabim is handled correctly by font-latex.el
> 
> Thanks for the tip. I had downloaded a copy of
> font-latex.el some time ago, "Version: 0.500 (23 Sep 97)", but
> after fetching version 0.800 from http://people.debian.org/~psg/ I did
> find that the handling of {verbatim} sections was better.

Good stuff.  It could be renamed V1.0.  It's stable now.
You said you use AucTeX.  font-latex is distributed with it so you won't
have to keep peeking at my web page for more recent versions.

> Because the \verb command does require some special syntax (LaTeX book,
> Section C.6.4), handling it properly would probably not be altogether
> straightforward.

I must admit I haven't looked into it, but if you say so.

Thanks,
Peter

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: AucTeX fontifying: mishandling $ within \verb argument and verbatim environment.
@ 2003-01-21 19:45 Adam
  0 siblings, 0 replies; 6+ messages in thread
From: Adam @ 2003-01-21 19:45 UTC (permalink / raw)


(Late follow-up to <OjNy9.125$__7.1465715@news-text.cableinet.net>)


On Friday 08 November 2002 11:35, Adam wrote:

> For example
> 
> ...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?
> 
> I'm using GNU Emacs 21.1.1, AucTeX 10.0g, on Mandrake 8.2 Linux.

I think this must have been a bug in that particular version of AucTeX. I 
used to use an earlier version at work, which did not have that problem. 
I've recently upgraded to 11.13 at home and at work and this problem no 
longer occurs.

-- Adam

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-01-21 19:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-08 11:35 AucTeX fontifying: mishandling $ within \verb argument and verbatim environment Adam
2002-11-08 20:47 ` Michael J Downes
2002-11-09  1:10   ` Peter S Galbraith
     [not found]   ` <mailman.1036805218.32603.help-gnu-emacs@gnu.org>
2002-11-14 15:51     ` Michael J Downes
2002-11-15  0:54       ` Peter S Galbraith
  -- strict thread matches above, loose matches on Subject: below --
2003-01-21 19:45 Adam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).