8

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?

b-m-f
  • 965
  • 2
  • 12
  • 22
  • why don't you just use the normal way of producing vowels with accents (like typing accent key and then the vowel you want)? and also, maybe you can press something like F10 to get romanized output? (i'm just guessing here from my experience with japanese input methods) – fifaltra Mar 31 '15 at 01:44
  • Well, there are 4 different tones in chinese. I can get roman output by pressing shift. No tones are there either though. – b-m-f Mar 31 '15 at 07:02
  • well, one slightly annoying workaround might be to directly input unicode codes, there is a list on wikipedia in the article about pinyin. Another way could be to just type with your normal keyboard layout with activated dead keys and use these keycombinations: http://wiki.linuxquestions.org/wiki/Accented_Characters, in addition to the normal accents that you would use for French for example. Hacek and Macron are probably what you're looking for. Just play around with keyboard layout, if yours is not reacting as expected. – fifaltra Mar 31 '15 at 15:39
  • and if you're using anki, you might be able to use the html codes which can also be found on wikipedia http://en.wikipedia.org/wiki/Macron etc.... Also Anki is supposed to be able to display the readings of Chinese, shouldn't that come out as pinyin? – fifaltra Mar 31 '15 at 15:55
  • Im already using Anki. Its really great. It even fills out cards automatically with a plugin for chinese, depending on the sign. Ill try out the method with Keyboard layout. Thanks. – b-m-f Mar 31 '15 at 16:56

6 Answers6

3

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

3

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: https://eastasiastudent.net/china/mandarin/input-pinyin-tone-marks-ubuntu/

  • 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

marcanuy
  • 596
1

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

http://www.chinesisch-lernen.org/werkzeuge/pinyin-editor.html

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.

0

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

(1) go to www.typingChinese.com/main.htm.

(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: http://www.typingchinese.com/TypingTonedPinyin.htm

HanWJ
  • 11
0

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

-1

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!

Thom Ives
  • 193
  • 1
  • 5