Received: from webgate.proteosys.de (mail.proteosys-ag.com [62.225.9.49]) by lucy.proteosys (8.11.0/8.9.3/SuSE Linux 8.9.3-0.1) with ESMTP id f0VM1N726914 for ; Wed, 31 Jan 2001 23:01:23 +0100 Received: by webgate.proteosys.de (8.11.0/8.11.0) with ESMTP id f0VM28700773 . for ; Wed, 31 Jan 2001 23:02:12 +0100 MIME-Version: 1.0 Received: from mail.Uni-Mainz.DE (mailserver1.zdv.Uni-Mainz.DE [134.93.8.30]) by mailgate1.zdv.Uni-Mainz.DE (8.11.0/8.10.2) with ESMTP id f0VM1IM07141 for ; Wed, 31 Jan 2001 23:01:18 +0100 (MET) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C08BD1.595BFB80" Received: from mailgate1.zdv.Uni-Mainz.DE (mailgate1.zdv.Uni-Mainz.DE [134.93.8.56]) by mail.Uni-Mainz.DE (8.9.3/8.9.3) with ESMTP id XAA08728 for ; Wed, 31 Jan 2001 23:01:17 +0100 (MET) X-MimeOLE: Produced By Microsoft Exchange V6.5 Received: from mail.listserv.gmd.de (mail.listserv.gmd.de [192.88.97.5]) by mailgate1.zdv.Uni-Mainz.DE (8.11.0/8.10.2) with ESMTP id f0VM1GM07135 for ; Wed, 31 Jan 2001 23:01:17 +0100 (MET) Received: from mail.listserv.gmd.de (192.88.97.5) by mail.listserv.gmd.de (LSMTP for OpenVMS v1.1a) with SMTP id <14.2BFB416F@mail.listserv.gmd.de>; Wed, 31 Jan 2001 23:01:13 +0100 Received: from RELAY.URZ.UNI-HEIDELBERG.DE by RELAY.URZ.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 1.8b) with spool id 486442 for LATEX-L@RELAY.URZ.UNI-HEIDELBERG.DE; Wed, 31 Jan 2001 23:00:14 +0100 Received: from ix.urz.uni-heidelberg.de (mail.urz.uni-heidelberg.de [129.206.119.234]) by relay.urz.uni-heidelberg.de (8.8.8/8.8.8) with ESMTP id XAA28960 for ; Wed, 31 Jan 2001 23:00:12 +0100 (MET) Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by ix.urz.uni-heidelberg.de (8.8.8/8.8.8) with ESMTP id XAA16576 for ; Wed, 31 Jan 2001 23:00:12 +0100 Received: from lorraine.loria.fr (lorraine.loria.fr [152.81.1.17]) by relay.uni-heidelberg.de (8.10.2+Sun/8.10.2) with ESMTP id f0VM0Dp15601 for ; Wed, 31 Jan 2001 23:00:13 +0100 (MET) Received: from bar.loria.fr (bar.loria.fr [152.81.2.13]) by lorraine.loria.fr (8.9.3/8.9.3/8.9.3/JCG-DG) with ESMTP id XAA22628; Wed, 31 Jan 2001 23:00:11 +0100 (MET) Received: (from roegel@localhost) by bar.loria.fr (8.9.3/8.9.3/8.9.3-client/JCG) id XAA09346; Wed, 31 Jan 2001 23:00:11 +0100 (MET) In-Reply-To: <14968.34118.306909.315983@istrati.zdv.uni-mainz.de> from "Frank Mittelbach" at Jan 31, 2001 10:36:06 PM Return-Path: X-Mailer: ELM [version 2.5 PL2] Content-class: urn:content-classes:message Subject: Re: default inputenc/fontenc tight to language Date: Wed, 31 Jan 2001 23:00:11 +0100 Message-ID: <200101312200.XAA09346@bar.loria.fr> X-MS-Has-Attach: X-MS-TNEF-Correlator: From: "Denis B. Roegel" Sender: "Mailing list for the LaTeX3 project" To: "Multiple recipients of list LATEX-L" Reply-To: "Mailing list for the LaTeX3 project" Status: R X-Status: X-Keywords: X-UID: 3689 This is a multi-part message in MIME format. ------_=_NextPart_001_01C08BD1.595BFB80 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable `Frank Mittelbach' wrote > > > http://www.Uni-Mainz.DE/cgi-bin/ltxbugs2html?pr=3Dbabel/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: = \newcommand{\langue}[3]{\inputencoding{#2}\renewcommand\latinencoding{#3}= % \fontencoding{#3}\selectfont \selectlanguage{#1}} \newcommand{\anglais}{\langue{english}{ascii}{OT1}} \newcommand{\russe}{\langue{russian}{koi8-r}{X2}} \usepackage[X2,OT1]{fontenc} \usepackage[koi8-r,ascii]{inputenc2} \usepackage[russian,english]{babel} (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 \tableofcontents \section{French} switch encoding to Russian \section{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. Denis ------_=_NextPart_001_01C08BD1.595BFB80 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Re: default inputenc/fontenc tight to language

`Frank Mittelbach' wrote
>
>    > htt= p://www.Uni-Mainz.DE/cgi-bin/ltxbugs2html?pr=3Dbabel/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:

  = \newcommand{\langue}[3]{\inputencoding{#2}\renewcommand\latinencoding{#3}= %
          &nbs= p;            = ;   \fontencoding{#3}\selectfont
          &nbs= p;            = ;   \selectlanguage{#1}}
  = \newcommand{\anglais}{\langue{english}{ascii}{OT1}}
  = \newcommand{\russe}{\langue{russian}{koi8-r}{X2}}
  \usepackage[X2,OT1]{fontenc}
  \usepackage[koi8-r,ascii]{inputenc2}
  \usepackage[russian,english]{babel}

(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

  \tableofcontents

  \section{French}

  switch encoding to Russian

  \section{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.

Denis

------_=_NextPart_001_01C08BD1.595BFB80--