Wolfgang Slany
Is there some way to *edit* a latex file (using xemacs?) containing both German umlauts etc. (directly, that is, using \usepackage[latin1]{inputenc} and seeing them as they are usually written, not as "a etc.) and Japanese characters at the same time?
I suggest to use UTF-8 for this purpose[1]. I'll explain in the next mail how to use UTF-8 for German and Japanese in LaTeX. In this mail, first some remarks about editors you can use to edit UTF-8 encoded files on SuSE Linux: Yes, you can use XEmacs for that purpose. To do that, you need to install the extension package mule-ucs-xemacs.rpm[2]. Then add (if (locate-library "un-define") (require 'un-define)) to your ~/.xemacs/init.el[3]. To specify UTF-8 encoding while loading a file into XEmacs use: C-x RET c utf-8 RET C-x C-f filename RET (With XEmacs you can also use 'C-u C-x C-f filename RET', but not with Emacs). If you don't want to type that all the time when loading the file, add a coding system cookie to the first line of the file: -*- coding: utf-8 -*-
Is there some other editor for linux that can do this? I would prefer xemacs, but if it does not work for some reason, we will settle for another one.
- GNU Emacs (needs mule-ucs.rpm).
- Vim
- yudit
- mined
- kedit (and other KDE editors)[4]
- probably there are others ...
Footnotes:
[1] There are other possibilities to use CJK-LaTeX with with German
and Japanese both written directly into the text, see the
documentation of cjk-enc.el:
/usr/share/doc/packages/cjk-latex/doc/cjk-enc.doc
(contained in cjk-latex.rpm). But if you use cjk-enc.el, you will have
your files encoded in an (X)Emacs specific mule encoding, which is
much less portable than UTF-8, for example you cannot edit your text
with other editors anymore if you use mule encoding. Using UTF-8 is
probably a much better idea.
[2] the updated XEmacs in
ftp://ftp.suse.com/pub/people/mfabian/8.0-i386/
already contain Mule-UCS, you don't need to install mule-ucs-xemacs
anymore if you are using these updated XEmacs packages. In that case
it is sufficient to have
(if (locate-library "un-define") (require 'un-define))
in your ~/.xemacs/init.el.
[3] if you are using the default ~/.xemacs/init.el on
SuSE Linux 8.0, you already have that.
[4] if you want to edit UTF-8 encoded files with kedit,
you have to start it with LC_CTYPE set to an UTF-8 locale, e.g.
LC_CTYPE=ja_JP.UTF-8 kedit
there is no option to select the encoding in kedit, you can only
select the encoding via LC_CTYPE when starting kedit. This is probably
true for the other KDE editors as well. Vim defaults to UTF-8 if you
start it in an UTF-8 locale, but you do not absolutely have to use an
UTF-8 locale to edit UTF-8 encoded files with Vim (see the Vim
documentation).
--
Mike Fabian