Deutsch   English   Français   Italiano  
<m2czke1grl.fsf@pc40.home>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!news.mixmin.net!aioe.org!news.gegeweb.eu!gegeweb.org!.POSTED.arennes-656-1-313-215.w109-218.abo.wanadoo.fr!not-for-mail
From: =?utf-8?Q?Vincent_Bela=C3=AFche?= <vincent.belaiche@gmail.com>
Newsgroups: fr.comp.text.tex
Subject: Re: =?utf-8?Q?=C3=89crire?= un document avec plusieur codage
 =?utf-8?Q?=E2=80=A6?=
Date: Wed, 26 Jan 2022 19:41:34 +0100
Organization: Gegeweb News Server
Message-ID: <m2czke1grl.fsf@pc40.home>
References: <m2r18v1w5j.fsf@pc40.home> <18ycx59f6johh.dlg@nililand.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Injection-Info: news.gegeweb.eu; posting-account="vbelaiche@orange.local"; posting-host="arennes-656-1-313-215.w109-218.abo.wanadoo.fr:109.218.81.215";
	logging-data="75609"; mail-complaints-to="abuse@gegeweb.eu"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin)
Cancel-Lock: sha1:s7/eSKyF5mWp+YWrkFF2DYD6Wys= sha256:qDDPB/h8G5QF3ca6PSC3OCvBpWHDJwG54nA+kIkXsYY=
Bytes: 2985
Lines: 71

Ulrike Fischer <news3@nililand.de> writes:

> Am Tue, 25 Jan 2022 19:56:56 +0100 schrieb Vincent Bela=C3=AFche:
>
>
>> J'essaie d'=C3=A9crire un document qui pour le plus gros est en latin-9,=
 mais
>> quand lequel j'ins=C3=A8re un fichier qui est en utf-8 et qui comprend
>> plusieurs rubriques.
>>=20

[...]

>
> ...
>
> (both \inputencoding are needed to force a real switch)=20

Merci Ulrike,

Voici un truc qui marche (test=C3=A9)

fichier principal (en latin-9) =3D=20
--------8<-----------8<-----------8<-----------8<-----------8<-------
% !TEX encoding =3D IsoLatin9
\documentclass{article}
\usepackage[utf8,latin9]{inputenc}
\begin{document}
\tableofcontents
\inputencoding{utf8}
\inputencoding{latin9}

\section{En fran=C3=A7ais}
tr=C3=A2l=C3=A2l=C3=A2

\inputencoding{utf8}\addtocontents{toc}{\protect\inputencoding{utf8}}
\input le-vilain-doc-en-utf8
\clearpage
\inputencoding{latin9}\addtocontents{toc}{\protect\inputencoding{latin9}}

\section{Encore en fran=C3=A7ais}
tr=C3=A2l=C3=A2l=C3=A2

\end{document}
% Local Variables:
% coding: latin-9
% End:
--------8<-----------8<-----------8<-----------8<-----------8<-------

Fichier inclus le-vilain-doc-en-utf8.tex (en UTF-8):
--------8<-----------8<-----------8<-----------8<-----------8<-------
% !TEX encoding =3D UTF-8
\section{Tr=C3=A2l=C3=A2l=C3=A2}

C'est de l'UTF-8 o=C3=B9 dans l'=C3=AEle un tr=C3=A9sor.

% Local Variables:
% coding: utf-8
% End:
--------8<-----------8<-----------8<-----------8<-----------8<-------

En plus du double \inputencoding apr=C3=A8s \tableofcontents mentionn=C3=A9=
 par
Ulrike, il faut un \clearpage apr=C3=A8s l'inclusion, sinon le titre de la
rubrique du fichier inclus s'affiche comme =C2=AB=C2=A02 Tr=C3=83=C2=A2l=C3=
=83=C2=A2l=C3=83=C2=A2=C2=A0=C2=BB.

M'enfin bref, tout ceci est bien casse-gueule =E2=80=A6

  V.

--=20