## LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

 Options: Use Forum View Use Monospaced Font Show Text Part by Default Condense Mail Headers Message: [<< First] [< Prev] [Next >] [Last >>] Topic: [<< First] [< Prev] [Next >] [Last >>] Author: [<< First] [< Prev] [Next >] [Last >>]

On Wed, 18 Jun 1997, Vladimir Volovich wrote:

> 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?

I think so. The only reason to be careful with lccodes is hyphenation.
AFAIK the effects of sfcodes will be applied immediately. Please correct
me if I'm wrong.

> 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).

Well, we shouldn't think about the internals of \@uclclist. A longer time
ago I proposed an interface like \AddLowerUpper to add something to this
list, but frankly, I can't remember what the LaTeX has answered, and until
today there is no such interface :-)

> >     \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:
> \expandafter\def\expandafter\@uclclist\expandafter{\@uclclist
> \CYRa\CYRA\CYRb\CYRB...}

Oh. But why should I use the simple solution if the complicated works
too? :-)

> > 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].

Hyphenation will fail if you mix, say, English and Russian in one
paragraph. After all expansion has been done some \char xxx' will be in
the stream, and TeX will check its \lccode value to find hyphenation
points. There is no possibility to escape.

Werner