Mailing List CyrTeX-en@vsu.ru Message #183
From: Vladimir Volovich <vvv@vsu.ru>
Sender: <vvv@video.uic.vsu.ru>
Subject: Re: Russian/Polish/German in one unicode document without explicit switching?
Date: Sun, 19 May 2002 15:09:42 +0400
To: Cyrillic TeX Users Group <CyrTeX-en@vsu.ru>
Dear Ruprecht,

sorry for late reply - did not see to email until now because of
misconfiguration in my MUA.

"RvW" == Ruprecht von Waldenfels writes:

 RvW> I would like to use three languages in one unicode document,
 RvW> preferably without switching explicitly, that is, not (as I have
 RvW> done before) go \russian âîò ïî-ðóññêèé \german Hür Dütsch
 RvW> \polish polska nie zginê³a

 RvW> but instead just switch languages using other unicode
 RvW> characters, that is just write Polsk¹ Dütschland ÐÔ.  (in
 RvW> Unicode)

 RvW> Since, after all, this is one of the ideas of unicode, I reckon
 RvW> this to be possible.

 RvW> I can't seem to figure how. Since this is surely not a very
 RvW> original question, maybe somewhere there is a easy,
 RvW> step-by-step, introduction somewhere, which you could point me
 RvW> to (I could actually even write one for dummies like myself once
 RvW> I know what to do).

 RvW> By the way, I use Tex Live 6b (9/2001) on a win98 machine.

 RvW> I've looked through all the documents I could find and tried out
 RvW> the unicode package (ucs) to no avail. I presume the solution to
 RvW> my problem is very simple - can you help me?

i can suggest you to try my utf-8 input encoding package which you can
get at CTAN:macros/latex/contrib/supported/t2/etc/utf-8/

you'll need to install 3 files into TeX inputs directory - e.g. into
 .../texmf/tex/latex/utf-8/
these 3 files are: utf-8.def, utfcyr.def, utflat.def

Then have a look at test-utf8.tex which is a test LaTeX file which
uses UTF-8 input encoding to typeset some words in
Czech, French, German, Polish, Russian, Slovak, Spanish, Turkish

The input encoding of the document is UTF-8, so you don't need to
switch between input encodings - letters in all languages are typeset
as transparently in one encoding.

But you still have to switch font encoding between cyrillic-based
input (T2A encoding or other T2*/X2 encodings) and latin-based input
(T1 encoding).

In the file test-utf8.tex, i use commands like
\fontencoding{T2A}\selectfont
\fontencoding{T1}\selectfont

but you can add definitions like
\def\setcyr{\fontencoding{T2A}\selectfont}
\def\setlat{\fontencoding{T1}\selectfont}

and use \setcyr and \setlat commands when you switch from latin-based
languages to cyrillic language. Still, all letters are visible at once
in your UTF-8 capable editor, and you don't need to switch input
encodings.

The ucs package also worked for me when i tested it, but utf-8 package
is simpler, smaller and chances are that it will work out of the box
for you.

Best,
v.

Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to Listmaster