Type chinese PinYin with tones

I am trying to write chinese characters and pinyin with indicated tones.

Setting up chinese Characters with pinyin input was failry easy. Just adding Chinese as a language and then Chinese - Simplified for the Keyboard Input.

But now I would also like to write the pinyin with tones to make Flashcards in Anki.

How can I enable this Input?

5

6 Answers

There are 3 ways to do it.

  1. By using a Compose key (AltGr), without need of changing English as the input language.

     AltGr + _ + [a] = ā AltGr + ' + [a] = á AltGr + c + [a] = ǎ AltGr + ` + [a] = à 

    In order to activate the Compose key, go to: Gnome Tweak Tool (Tweaks) -> Keyboard and Mouse -> Compose Key -> Right Alt.

  2. By using numbers as the tones:

     [a] + 1 = ā [a] + 2 = á [a] + 3 = ǎ [a] + 4 = à 

    Go to: Language Support -> Install/Remove Languages... -> Chinese Simplified -> Tick and Apply.

    After successful installation: Settings -> Region & Language -> Plus button

    -> Chinese (China) -> Chinese (hanyu pinyin (m17n)).

  3. With the suggestions commonly known from web translators.

    Follow the same steps, as described in the point 2). In the end choose:

    -> Chinese (China) -> Chinese (Intelligent Pinyin).

State for Ubuntu 18.04.4

Have you tried the pinyin-editor on chinesisch-lernen.org?

The input yan1 will automatically be changed to yān and similarly for the other tones. You can also enter several words in one go to get a whole paragraph in pinyin.

On the downside, the editor only works in that browser window. So you will have to type it there, then copy it and insert it where you want it. And, obviously, you will have to be connected to the internet.

I found three alternatives to this issue, personally I recommend the first one:

  • If you are using ibus:

    $ sudo apt-get install ibus-m17n

    And then select the "input method": Chinese – hanyu pinyin (m17n). Then you can write the vowel and the proper tone after it, so it gets converted: a3 -> ǎ.

  • If using scim: then you can select zh-pinyin as the input to convert pinyin tone numbers to accents:

  • If you need something quickly: use the Character map:

    $ /usr/bin/charmap

    After opening it, select the Latin charmap, there you will have all the possible pinyin tones for each vocal (from 1 to 4)

    pinyin in ubuntu charmap

I'm 2 years late, sorry for that, but maybe it helps people getting here through search. I've created a Pinyin Editor here that should pretty much be exactly what you're looking for. Hope this helps!

Here is an online Toned Pinyin input service (free) which allow 1-step input:

(1) go to

(2) Click on the Chn button under and to the left of the big editbox, so that it is in Western input mode.

(3) Hold down a vowel key (a, o, e, i, u, or v), then tap a number key (similar to using Shift key to enter letter). e.g., holding u, tap 2, produces ú; i.e., u + 2 --> ú.

(4) Likewise, e + 4 --> è; v + 4 --> ǜ. o + 3 --> ǒ. v + 5 --> ü.

*Note: 7,8,9,0 (corresponding to tone 1-4) can also be used for both-hand-typing convenience; e.g., to type ā, press a, then tap 7 on the right side of keyboard.

Documentation:

Chinese - hanyu pinyin (m17n) in ibus

The "ibus-m17n package" mentioned above did not work for me. I am in a VirtualBox Linux Mint 19.3 Virtual Machine running on Windows 10. I found "Rachel's Page", and went down to the section called "How to input Hànyǔ Pīnyīn with tones in Ibus?" I will quote,

"Sometimes, you don't want to enter 漢字 or 汉字; sometimes, you want to enter Hànyǔ Pīnyīn, the actual Latin script with tone marks. How do you do that under Ibus?

The method you want is called "Chinese - hanyu pinyin (m17n)" in the Input Method menu; the icon is ā with the other tone marks next to it. Once this is activated, it's quite easy to type Hànyǔ Pīnyīn with tone marks. Just type the spelling (for example, "han"), then type the number of the tone (for example, "4"). It instantly puts the tone mark over the appropriate vowel -- no additional keystrokes needed. If you want to enter ü (a u with umlauts), use the old "v" trick."

Works great!

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like