bug-auctex
[Top][All Lists]
Advanced

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

Re: [Bug-AUCTeX] 2008-02-02; Highlighting verbatim environments gets con


From: Uwe Siart
Subject: Re: [Bug-AUCTeX] 2008-02-02; Highlighting verbatim environments gets confused
Date: Sun, 03 Feb 2008 19:29:24 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (windows-nt)

Ralf Angeli <address@hidden> writes:

> In April there was a problem report that stuff like
> {\small\begin{verbatim}
> foo
> \end{verbatim}}
> is not fontified as verbatim because the \begin statement was only found
> when preceded by whitespace or nothing.  This requirement for \begin was
> relaxed after the report, however, the same requirement is still in
> place for the \end statement.  (If you write something in the same line
> before the \end, a spurious newline is inserted in the typeset output.)
> So in your case the \begin{alltt} is found, but not the \end{alltt}.
>
> So there are two ways of solving this (apart from you changing your
> LaTeX file):

I'd be happy to do so if only I knew, how. Say, I want to define an
environment that is based on the {alltt} environment. If I push the
second argument of \newenvironment to the next line the problem remains
(because of the parens around \end{alltt}, I suppose).

The only solution I can see is to use \beginalltt and \endalltt in place
of \begin{alltt} and \end{alltt} during the definition of my {Enter}
environment. Would that be acceptable LaTeX style?

> 1) Relax the requirement for the \end statement and find such statements
>    without looking at text in the same line preceding it.
>
> 2) Revert the change made in April, i.e. find the \begin statement only
>    if it is only preceded by whitespace or nothing.
>
> I currently tend to do the latter because it would be the safer, more
> conservative option.

I can't give you qualified input here since I can't judge the possible
consequences of 1). Solution 2) means that there will be other stuff
that is not fontified correctly so it would just shift the problem
elsewhere, won't it?

-- 
Uwe




reply via email to

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