[texhax] Typing Chinese with plain TeX

Reinhard Kotucha reinhard.kotucha at web.de
Sun Sep 5 03:11:00 CEST 2004

>>>>> "Rodolfo" == Rodolfo Medina <romeomedina at libero.it> writes:

    > Now I'm doing other trials.  When Emacs loads a file containig
    > chinese characters, e.g. the file 'math1gb.tex' featured in
    > ChiTeX distribution, those characters are not displayed, and I
    > get something like:

    > ¼òµ¥ÊýѧÎļþ

    > . This happens even if I have switched to chinese input method.
    > How can the problem be worked out?

Maybe I'm wrong, but I suppose that you can't change the encoding
after the file has been loaded.

The only way to tell emacs which encoding should be used is to do that
at the beginning of the file.

For Vietnamese, for instance, I prepare a file like this:

% -*- mode: LaTeX; coding: viscii -*-

% Local Variables:
% eval: (set-language-environment "Vietnamese")
% eval: (set-input-method "vietnamese-viqr")
% eval: (set-buffer-file-coding-system 'viscii)
% End:

Then I save this file to disk and load it again.  The comments are
evaluated when the file is loaded.

Then I can type Vietnamese text quite conveniently and it is displayed

Of course, you must have installed the east asian fonts.  You can
verify this by typing 

       M-x view-hello-file

in emacs.

M-x means that you should press the x while having the Meta key
(usually Alt on Linux systems) pressed.

Note that the "% Local Variables:" section is at the end of the file.

Maybe all this is much too inconvenient but it works for me.  You
could ask at the newsgroup gnu.emacs.help whether there is a more
convenient way.


Reinhard Kotucha			              Phone: +49-511-4592165
Marschnerstr. 25
D-30167 Hannover	                      mailto:reinhard.kotucha at web.de
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.

More information about the texhax mailing list