[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

10. Internationalization

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.

10.1 Using AUCTeX with European Languages  
10.2 Japanese TeX  

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

10.1 Using AUCTeX with 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 latter, it has the advantage that the usual standard emacs word movement and case change commands will work.

With LaTeX2e, just add `\usepackage[latin1]{inputenc}'. Other languages than Western European ones will probably have other encoding needs.

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 (e.g. Emacs 21). The manner in which this is supported differs between Emacsen, so you need to take a look at your respective documentation.

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

Much like `iso-tex.el' but is bundled with Emacs 19.23 and later.

Similar package bundled with new versions of XEmacs.

a much more complete package for both Emacs and XEmacs that can also handle a lot of mathematical characters and input methods.

AUCTeX supports style files for several languages. Each style file may modify AUCTeX 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 `\usepackage[danish]{babel}'. This requires parsing to be enabled, see section 9. 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-cz-hook. Pressing " will insert `\uv{' and `}' depending on context.

Runs style hook TeX-language-dk-hook. Pressing " will insert `"`' and `"'' depending on context.

Runs style hook TeX-language-nl-hook.

Runs style hook TeX-language-de-hook. Gives `"' word syntax, makes the " key insert a literal `"', and pressing it twice will give you opening or closing german quotes (`"`' or `"''), if you have configured TeX-open-quote and TeX-close-quote accordingly. See section 4.1 Insertion of Quotes, Dollars, and Braces.

Runs style hook TeX-language-it-hook. Pressing " will insert `"<' (LaTeX-italian-open-quote) and `">' (LaTeX-italian-close-quote) depending on context.

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.

Runs style hook TeX-language-sk-hook. Pressing " will insert `\uv{' and `}' depending on context.

Runs style hook TeX-language-sv-hook. Pressing " will insert `"'.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

10.2 Japanese TeX

To write Japanese text with AUCTeX you need to have versions of TeX and Emacs that support Japanese. There exist at least two variants of TeX for Japanese text (jTeX and pTeX), and AUCTeX can be used with MULE supported Emacsen.

To install Japanese support for AUCTeX, copy `tex-jp.el' to AUCTeX installed directory. Next two commands will automatically install contributed files.

make contrib
make install-contrib

See `INSTALL' and `Makefile' for more information.

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 AUCTeX. None of the primary AUCTeX maintainers understand Japanese, so they can not help you.

If you usually use AUCTeX in Japanese, setting following variables is useful.

User Option: TeX-default-mode
Mode to enter for a new file when it can't be determined whether the file is plain TeX or LaTeX or what.

To use Japanese TeX always, set japanese command for example:

(setq TeX-default-mode 'japanese-latex-mode)

User Option: japanese-TeX-command-default
The default command for TeX-command in japanese TeX mode.

The default value is `jTeX'.

User Option: japanese-LaTeX-command-default
The default command for TeX-command in japanese LaTeX mode.

The default value is `jLaTeX'.

User Option: japanese-LaTeX-default-style
The default style/class when creating new japanese LaTeX document.

The default value is `j-article'.

See `tex-jp.el' for more information.

[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by XEmacs Webmaster on October, 2 2007 using texi2html