[luatex] \catcodetable0

Manuel Pégourié-Gonnard mpg at elzevir.fr
Sat Mar 27 10:54:50 CET 2010


Hi,

Heiko Oberdiek a écrit :
> On Sat, Mar 27, 2010 at 01:58:22AM +0100, Manuel Pégourié-Gonnard wrote:
> 
>> Sorry if I'm missing something obvious, but I fail to understand the
>> behaviour of \catcodetable0. Consider the following test file.
>>
>> \catcodetable0\relax
>> \showthe\catcode64
>> \catcode64 11
>> \catcodetable0\relax
>> \showthe\catcode64
>> \initcatcodetable1
>> \catcodetable1\relax
>> \showthe\catcode64
>> \bye
>>
>> The "output" is 12, 11, 12 (LuaTeX from trunk). I would expect 12, 12, 12
>> \(the catcodetable0 statement should override the preceding \catcode
>> assignment, as does the later \catcodetable1).
> 
> The \catcode assignment has changed catcode
> table 0 (until the current group is closed).

That's what I misunderstood. It thought the catcode tables could only be
modified (globally) by \initcatcodetable and \savecatcodetable.

> And the following \catcodetable0 has nothing to do,
> because the current table is already table 0.
> 
Right. For some reason I thought that \catcode modifies only the "current set of
catcodes" which would be an object different from the "current catcode table".

So, to sum up, a catcode table can be modified:
- locally, when it is active, using \catcode,
- globally, when it is active, using \global\catcode,
- globally, when it is not active, using \savecatcodetable,
- globally, when it has never been used before, using \initcatcodetable.

I previously missed the first two options. Am I still missing something?

Thanks,
Manuel.



More information about the luatex mailing list