`Frank Mittelbach' wrote
> > http://www.Uni-Mainz.DE/cgi-bin/ltxbugs2html?pr=babel/3046
> Johannes talkes about the difficulties in providing this, but is it really
> something one wants?
Well, when I brought up that issue, it was not pure theory.
I had a specific example at hand, a Russian colleague who needed
to write in Cyrillic/English/French. He writes English in ASCII input
encoding, French in ISO-Latin 1 and Russian in KOI8. Moreover,
he needs T1 for French (will also do for English) and X2 for Russian.
So, I set him up the following commands for English/Russian:
(inputenc2 is a variant of inputenc where you can switch the input encoding
within a paragraph; it is possible that there is a standard package
achieving this now)
> - except when using mule (or emacs) one doesn't (automatically) change input
> encodings when
> changing a language in the middle of the document.
Actually, my colleague uses emacs, but sees only one encoding at a time.
For instance, with a KOI8 setting, he won't see correctly French
accented letters. I have never been able to find out if it is
possible to have local 8 bit encodings within an emacs document.
It should be possible, though. Anyway, that's a different matter.
(I am not speaking of the MULE extensions, which alter your encoding.)
> i guess the only way to tie something like this to the language is as an
> offering, ie by default nothing is tied to a language but you have a mechanism
> to say that all switches to language X result in switching the inputenc to Y
> and give the user a chance to specify this in the preamble.
> and something similar for font encodings
> the problem with current babel is that for some language you have to do
> something and so it happens behind the scene but essentially it is not
> customiable (yet) and restoring state is not always as one would expect.
Yes, I had such a problem with differed layouts like the table of contents.
For instance, say you have a French, then a Russian section. If you write
switch encoding to French
switch encoding to Russian
you'll end up with `French' appearing in Cyrillic, because
the state at the end of the \tableofcontents is not restored.
You have to add an explicit change of encoding, for instance after
\tableofcontents, or at the end of your document.