[NTG-pdftex] Adding a \cscode

Javier Múgica de Rivera javier at digi21.net
Mon Oct 23 21:11:48 CEST 2006

This is a copy of a message I sent to the Latex3 list some time before and I got no answer (something not rare in that list). So I post it here, where it also belongs.

There have been in the past many discussions about how to create a really
multilingual program. One of the points was to allow typeseting control sequences (cs) in
Russian (say), but we cannot simply make the \catcode equal to 11
because then the character would be transparently passed to the dvi
(ie., the font), which only works if input and output encondings match.
Can we simply add in pdftex a \cscode? Such a \cscode would be equal to 1 or 0, 
accordingly to whether the characert is allowed in the name of a cs or not 
(more precisely, a character with \cscode 0 would make the previous one the last 
of the cs, or if it is the first one it would be the only one in the name of the cs). 
In Latex, the setting of the cscodes would be done when selecting the input encoding.

In order not to break tons of existing code, we should still allow catcode 11 characters to 
form control names. Thus, whenever now we have (approximately, I have not yet read the sources)


we change it with

if(catcode=11 or cscode=1)	%If cscode=1 then, even if catcode=active, the character works as a letter when building the name of a control word

We initialy set all cscodes equal to 0, so for the existing code nothing changes, while form now on we will be able to type control sequences with our alphabet (cyrilic, greek, ...), even if those characters are active ones.

Javier A.

More information about the ntg-pdftex mailing list