On Sun, Nov 05, 2006 at 09:58:28AM +0100, Georg Baum wrote:

> Am Sonntag, 5. November 2006 00:19 schrieb Enrico Forestieri:
> > On Sat, Nov 04, 2006 at 11:27:49PM +0100, Abdelrazak Younes wrote:
> > 
> > > Enrico Forestieri wrote:
> > > > This is wrong because \catcode works on 8-bit numbers. Please, change
> > > > the 128 to 256.
> 
> It was from memory. Obviously I am becoming old :-(
> 
> > > Hum, as I understand it does not matter within our context if \catcode 
> > > works on 8 bits or not. This CatCode table is just here to classify 
> > > between the TeX catcodes, they are not really the catcode themselves 
> > > (except for the 128 first catcodes that is).
> > > 
> > > If you are sure that there is at least one catcode greater than 128 is 
> > > classified as something other than catOther, I'll do the change. But 
> > > from what I read about TeX catcode since then, I doubt it.
> > 
> > Maybe you are right as, from what I can see, only the catcode of '@' is
> > ever changed in the LyX sources. However, if proper support for catcodes
> > will be implemented, we should mimic what TeX does, and TeX can deal
> > with 256 characters and not 128 as the comment you added implies -- 
> please
> > change that. Quoting the very beginning of chapter 7 in the TeXbook:
> > 
> >   There are 256 characters that TeX might encounter at each step,
> >   in a file or in a line of text typed directly on your terminal.
> >   These 256 characters are classified into 16 categories numbered
> >   0 to 15.
> > 
> > I think that we should leave the 256, but if you and others don't agree,
> > then please also make the corresponding changes to texparser.C
> 
> Abdel is right that a table of 256 is not needed, since we never set the 
> catcode of any character above 256 to something else than 256, and we need 
> the if anyway. I have changed the comment accordingly, but if anybody else 
> prefers 256 I have no problem with that either.

I am trying to say that, currently, LyX is not correctly tracking catcodes
and if we want to improve on that, then we should maintain the 256.

As an example, try importing in LyX the attached valid latex file and you
will see what I mean. This is a bug, IMO.

-- 
Enrico

Attachment: test_active.tex
Description: TeX document

Reply via email to