LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Vladimir Volovich <[log in to unmask]>
Wed, 18 Jun 1997 15:01:58 +0400
text/plain (57 lines)

Werner Lemberg wrote:

> 1) you say
>     \DeclareTextSymbol{\RUSA}{T2}{"0C1}
>     \DeclareTextSymbol{\rusa}{T2}{"0E1}
> (repeating this for all other Russian characters); then you add all
> such-defined characters to \@uclclist so that \MakeUppercase and
> \MakeLowercase work -- \lowercase and \uppercase should *never* be used
> directly!

Thank you, I now think that my first approach with changing uccode and lccode
values foe russian letters in LCY encoding is not as good as I thought of it
some time ago... I changed Babel LCY support to the `canonical' LaTeX solutions,
and it works well (although slower than the simple approach; but this approach
is more general and more stable in a multilingual environment).
But what about sfcodes (and mathcodes) for russian letters?
May one safely change 'em (and restore) when doing language switching?

BTW, may be, the approach with \@uclclist could be changed to be more efficient?
I mean that for each \macros which represents some character (and which will appear
as an argument of \MakeUppercase or \MakeLowercase), one should define
two macroses -- \uc@macros and \lc@macros (which should expand to the
uppercase and lowercase form of \macros, respectively).
Then in the body of \MakeUppercase we should simply do \let\macros\uc@macros
(in a local group) for all \macroses which have corresponding \uc@macroses or \ls@macroses?
(we may provide a command, say, \DeclareUCLC{\macros}{\uc@macros}{\lc@macros},
which will add `\let\macros\uc@macros' to the body of some control sequence,
say, \do@uccase, and add `\let\macros\lc@macros' to the body of \do@lccase;
then it would be sufficient to execute \do@uccase in the body of \MakeUppercase.
This will do all necessary substitutions effectively).

>     \begingroup
>       \expandafter\toks@\expandafter{\@uclclist}%
>       \toks@\expandafter{\the\toks@
>         \rusa\RUSA\rusb\RUSB...}%
>       \expandafter\gdef\expandafter\@uclclist\expandafter{\the\toks@}
>     \endgroup

This could be simplified as follows:

> But the need for T2 is definitely here since 0x80-0xFF is not sufficient
> for all Cyrillic characters, and the characters in the range 0x00-0x7F
> *must* follow the default \lccode and \uccode values.

Why must they? :-) The above mentioned solutions should work here, too.
[although, it would be *very* inefficient and slow].

With best regards,