1

I'm learning Chinese and I'm wondering if there is a way to input pinyin easily.

"pinyin" is a word with tone, like "qǐngwèn".

Is there a emacs minor mode for pinyin?

If there is not yet I'll try to write it. But I have only very little knowledge about emacs lisp.

Add info

I want to have pinyin input mode itself that can input tone marks easily. I don't need Chinese IME.

3
  • 1
    If you are not using Emacs as an operating system, there are implementations to use input method frameworks like fcitx in tty. If you are referring to inputting those accented characters, there may be some general methods (well, but not so straightforward as inputing qing3wen4 and get the thing you want I guess). P.S. I wanted to say US-intl, but it doesn't support all four tone markers… P.P.S. Emacs has a pinyin IM in its 25 Chinese IMs, if you are referring to something that gives you the corresponding 汉字 from pinyin. Commented Oct 29, 2015 at 4:22
  • Thanks for info. But I want to use emacs so that I can use the function also in osx and windows. (I may asked the question in wrong forum, but I thought it would be best to ask here about Emacs.)
    – ironsand
    Commented Oct 29, 2015 at 6:32
  • Have you found a good way to type pinyin characters in Emacs? I'm still searching. For the meantime I use pinyin.typeit.org to type pinyin and then copy and paste it to emacs. Commented Oct 11, 2019 at 10:08

3 Answers 3

1

Emacs has four pinyin input variants, the names start with chinese-py. You can set the input method with C-x enter \ or M-x set-input-method, and get a description with M-x describe-input-method.

I haven't used any of them, and haven't read all the descriptions, so I don't know the exact difference between the variants.

Edit

If you just want to input the diacritical marks above the vowels that are used in pinyin to indicate the tone, you can also use an input method. You type two letters for the vowel+mark you want. For example, the method latin-2-prefix has

'a -> á   `a -> à   ~a -> ă

More details with list-input-methods and the descriptions, as explained above.

However, as far as I know, there's no pre-defined input method that includes the macron ā, but you can define your own method, as explained in this stackexchange question.

1
  • ah, chinese-py is a Chinese IME using pinyin. I want to input a pinyin itself with tone marks. So these are different.
    – ironsand
    Commented Aug 19, 2017 at 6:31
1

chinese-sisheng input method allows writing tonal marks to produce good-looking pinyin like below:

ni3 -> nǐ
hao3 -> hǎo
nv3 -> nǚ
0

https://github.com/tumashu/pyim pyim is the best IME for now.

It's written in Lisp only. So you don't need any extra tools.

2
  • Thanks for reply, but this is a IME using pinyin. I want to have pinyin input mode that can easily add tone marks.
    – ironsand
    Commented Aug 19, 2017 at 6:33
  • You can raise a issue on pyim's web site. Technically it's not difficult.
    – chen bin
    Commented Aug 28, 2017 at 2:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .