|
|
|||
![]() |
Department of Engineering |
| University of Cambridge > Engineering Department > computing help |
tw112:mk303:
cp /export/emacs/share/emacs/20.6/.emacs.japanese ~/.emacs
tw112:mk303:
cp /export/emacs/share/emacs/20.6/site-lisp/japanese.el ~
(The underlined part is what you are supposed to type) You need to do it only once.
Then, you start emacs by
tw112:mk303: emacs -fn r16 &
`-fn r16' specifies a font set which is suitable for Japanese. When started, emacs is in English mode. To type Japanese, you need to enter Japanese mode by pressing C-\ (this means `press and hold the Control key and type \). emacs then asks you which input mode you want to use. So type
Input method: japanese
You will notice that a Hiragana appears on the screen! Type C-\ to go back to English mode. You need to specify the language once in a session. So next time you type C-\, the input mode becomes Japanese mode without asking anything. However, you need to do the same when you start emacs again.
Now you can type Japanese using the Ro-maji input method. Let's try something like `My name is XXXX.' After confirming that you are in Japanese mode, you can first type watashino. Observe that the Japanese characters (Hiragana's, to be exact) you have typed are underlined. Hit the Return key to confirm them. It seems nonsense to confirm them, but it is important when inputting Kanji's. Continue and type namaeha. Then type your name. Now your name is shown in Hiragana's. To convert it into Katakana's, you need to type (the capital) K (before hitting the Return key). If you are happy, press the Return key. Then type desu. and the Return key to complete. If you hit the Space key before the Return key, what you have typed will be converted into Kanji's (sorry, but how to type Kanji's appropriately will not explained here). If you hit the Space key by mistake and want to change it back in Hiragana's, type (the capital) H.
If you want to convert confirmed Hiragana's into Katakana's, you first need to select them. Move your cursor on the beginning of the selection, then type C-[Space] . Then move your cursor to the end of the selection. Type M-x japanese-katakana-region (M-x means to press and release the Escape key and then to type x). You should be seeing Katakana's. Actually you do not have to type japanese-katakana-region in full. Type jap and then hit the space key, emacs completes the command up to japanese-. Now you only have to type ka and hit the space key twice to see the whole command.
| | computing help | |