[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-AUCTeX] 11.85; verbatim highlight problem
From: |
Ralf Hemmecke |
Subject: |
Re: [Bug-AUCTeX] 11.85; verbatim highlight problem |
Date: |
Sat, 22 May 2010 16:26:08 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100317 Lightning/1.0b1 Thunderbird/3.0.4 |
On 05/22/2010 03:38 PM, Ralf Angeli wrote:
> * Ralf Hemmecke (2010-05-21) writes:
>
>> My .emacs file is
>>
>> ---rhxBEGIN .emacs
>> (custom-set-variables
>> '(LaTeX-verbatim-environments (quote ("verbatim" "verbatim*"
>> "myverbatim")))
>> '(inhibit-startup-screen t))
>> (custom-set-faces)
>> ---rhxEND .emacs
>>
>> The highlighting in the file p.tex below is wrong.
>
> I don't see a problem with the CVS version of AUCTeX and I expect this
> to be the same with 11.86.
Does that help...
http://sites.google.com/site/hemmecke/emacs-auctex-verbatim-bug
And it is 11.85 in Ubuntu Lucid. Sorry, I first have to figure out how
to convince my emacs to load my local cvs-auctex-checkout instead of the
system-wide one. Any hints?
>> ---rhxBEGIN p.tex
>> \documentclass[a4paper]{article}
>> \usepackage{listings}
>> \lstnewenvironment{myverbatim}%
>> {\lstset{basicstyle=\scriptsize\ttfamily,gobble=2}}%
>> {}
>> \lstset{basicstyle=\scriptsize}
>> \begin{document}
>> Also put a % right after {verbatim} and look what happens
>> with the highlighting.
>> \begin{verbatim}
>
> IIRC it is unsafe to add stuff like a comment starter on the same line
> after \begin{verbatim}. Unfortunately I don't remember where I read
> this and what the exact issue was.
Why should that be unsafe? For auctex or for latex?
You've probably read that putting characters after an \end{verbatim}
might result in losing these characters in the latex output. But with a
% I want to ignore them anyway. (With \usepackage{verbatim} there is not
such a problem. Also \usepackage{listings} has a more robust way to
recognize the ending string.
Auctex should not interpret comment signs in verbatim environments.
Ralf
Well, I should put my last name, too. Otherwise other mailing list
readers get confused. But I'm so lazy. ;-)