Go to the first, previous, next, last section, table of contents.


There are several problems associated with editing non-English TeX with GNU Emacs. Modern versions of GNU Emacs and TeX are usable for European (Latin, Cyrillic, Greek) based languages, but special versions of TeX and Emacs are needed for Korean, Japanese, and Chinese.

Using AUC TeX for European languages.

First you will need a way to write non-ASCII characters. You can either use macros, or teach TeX about the ISO character sets. I prefer the later, it has the advantage that the usual the standard emacs word movement and case change commands will work.

With LaTeX2e, just add `\usepackage[latin1]{inputenc}'. With older LaTeX versions, try:

Support for ISO 8859 Latin 1. Available by ftp from the host ftp.uni-stuttgart.de as `/pub/tex/macros/latex/contrib/misc/isolatin1.sty'.
Support for ISO 8859 Latin 2. Available by ftp from the host ftp.uni-stuttgart.de as `/pub/tex/macros/latex/contrib/latin2.sty'.

To be able to display non-ASCII characters you will need an appropriate font and a version of GNU Emacs capable of displaying 8-bit characters. I believe all emacs versions except plain Emacs 18 are capable of this. For GNU Emacs 19, see section `European Display' in The GNU Emacs Editor. Other relevant packages are:

Supports lots of different 7-bit and 8-bit character sets for GNU Emacs 19. Mostly useful if you have seldomly used character sets, or need to use different character set for keyboard, buffer, and display. An overkill if you just need ISO 8859 Latin 1. Currently in alpha test, but available by ftp from the host ftp.iesd.auc.dk in `/packages/auctex/'. To get dead keys for TeX, install remap and insert the following in your `.emacs' or `site-start.el' file.
(require 'remap)

(defvar all-dead-keys "~'`^"
  "Dead keys used by remap")

(remap-define-map "Dead Key"
  (apply 'append (mapcar 'remap-dead-map all-dead-keys)))

(remap-define-map "TeX Dead Key"
  (remap-map "Dead Key" (remap-add "Ascii" "~TeX")))

(setq remap-setup-alist
      '(("7-bit"  "Raw"          "L1" "US" "Ctrl" "~TeX")
        ("8-bit"  "Raw"          "L1" "L1" "Ctrl" "Raw")
        ("Dead/7" "Dead Key"     "L1" "US" "Ctrl" "~TeX")
        ("Dead/8" "Dead Key"     "L1" "L1" "Ctrl" "Raw")
        ("TeX"    "TeX Dead Key" "L1" "US" "Ctrl" "Raw")))
You can now enable TeX dead keys with
M-x remap-setup-choose RET TeX RET

A compromise is to use use an European character set when editing the file, and convert to TeX macros when reading and writing the files.

This file automatically converts between ISO 8859 Latin 1 encoding and LaTeX encodings of West European characters. It is available by ftp from aida.intellektik.informatik.th-darmstadt.de in the directory `/pub/gene/Emacs'.
Much like `iso-tex.el' but is bundled with Emacs 19.23 and later.
Similar package bundled with new versions of XEmacs.

AUC TeX supports style files for several languages. Each style file may modify some AUC TeX to better support the language, and will run a language specific hook that will allow you to for example change ispell dictionary, or run code to change the keyboard remapping. The following will for example choose a Danish dictionary for documents including the `dk.sty' file. This requires parsing to be enabled, see section Automatic Parsing of TeX files..

(add-hook 'TeX-language-dk-hook
          (function (lambda () (ispell-change-dictionary "danish"))))

The following style files are recognized.

Runs style hook TeX-language-dk-hook.
Runs style hook TeX-language-nl-hook.
Runs style hook TeX-language-de-hook. Gives `"' word syntax and makes the " key insert a literal `"'.
Runs style hook TeX-language-pl-hook. Gives `"' word syntax and makes the " key insert a literal `"'. Pressing " twice will insert `"<' or `">' depending on context.

Japanese TeX

To write Japanese text with AUC TeX you need to have versions of TeX and Emacs that support Japanese. There exist at least two variants of TeX for Japanese text, and AUC TeX can be used with both, as well as with the two Japanese-aware Emacses, NEMACS and MULE.

To use the Japanese TeX variants, simply enter japanese-tex-mode, japanese-latex-mode, or japanese-slitex-mode, and everything should work. If not, send mail to Shinji Kobayashi (`<koba@flab.fujitsu.co.jp>', who kindly donated the code for supporting Japanese in AUC TeX. None of the primary AUC TeX maintainers understand Japanese, so they can not help you.

Go to the first, previous, next, last section, table of contents.