4

I'm working on Debian Wheezy Linux. I've seen some posts using pinyin tone marks.

  • I was wondering if I can do that in Linux (Debian Wheezy).
  • How can I configure it?
3
  • Now there's an example AutoKey script to do this.
    – fzzylogic
    Aug 26, 2015 at 20:23
  • You can input Chinese in linux after ibux or fctix and a IME installed, but I suggest don't do that. These tools are very buggy. You will want to throw your machine to the window in 30 min,I have no doubt as a Chinese linux user .
    – sfy
    Aug 28, 2015 at 7:58
  • Now there's an ibus-tables template to do this.
    – fzzylogic
    Aug 31, 2015 at 10:19

3 Answers 3

2

You can install ibus and ibus-pinyin (there's also google pinyin but I personally prefer ibus-pinyin) or scim. Scim is more the historical software, but ibus is definitely better.

You will probably have to restart (!), but then there's about no configuration: at most, you learn the shortcuts to switch between input methods.

6
  • ibus does input pinyin tone marks, but at the same time I find ibus to be a big disappointment compared to pinyin IMEs on other platforms (but still a correct answer, so +1)
    – sqrtbottle
    Jul 5, 2015 at 13:22
  • I completely agree, Chinese input methods on Linux are really subpar, but that's simply because on the other side (Windows) some big companies invest dozens of engineers on having a good input method... Still does the job and to me far preferable to using Windows :)
    – vermillon
    Jul 5, 2015 at 22:55
  • @vermillion Actually, my configuration on linux works better than anything I’ve ever seen in windows. I use fcitx. All one needs to do is read the manual...
    – Philipp
    Aug 25, 2015 at 17:47
  • @vermillon Also, (assuming you know German, since you’re in that stackexchange) I suggest you take a look at Neo keyboard layout if you’re willing to sacrifice some time learning a new keyboard layout. It has great linux support and is optimized to easily provide all the symbols usually needed by programmers. As a side effect, you can also easily type tone marks etc.
    – Philipp
    Aug 25, 2015 at 17:51
  • @Philipp , I didn't say I was unhappy with my experience of the keyboard, just the Chinese input that was not really great compared to the quality of predictions I've seen on the other side. When it comes to non-Chinese keyboard, I use my own config with the symbols of the languages I use.
    – vermillon
    Aug 25, 2015 at 22:20
1

As mentioned by vermillion, various IME's include this functionality. But there are other ways of doing this.

One way could be with a script similar to this one for windows Autohotkey_L. However, Autohotkey is not available for Gnu/Linux, so this would need to be reworked. A good text expansion app for Gnu/Linux is AutoKey.

I made an example that can be imported to AutoKey. Since AutoKey supports auto capitalization with text expansion, i removed the case duplicates present in the above sample. Not tested extensively, but works-for-me (tm). I'm using Kubuntu 11.04 and installed the gtk version of AutoKey. From within AutoKey GUI, select File / Import to pull in this example.

Newer versions of AutoKey lack an import function. Import can be achieved by saving above example to /home/username/.config/autokey/autokey.json. Subsequently launching AutoKey results in import. Rename to avoid overwriting existing AutoKeys. Data from any compatible .json file will be merged with existing AutoKeys. Note that there are issues with AutoKey and Xubuntu 14.04.

Made an ibus-tables tone-marked pinyin entry method. Because ibus chinese IME on my system doesn't allow for tone marked pinyin entry.

Finally figured out that one needs to install ibus-m17n to get access to tone based pinyin entry under Chinese layout (sudo apt-get install ibus-m17n). This is better than the ibus-tables approach as it doesn't have the annoying pop-up window while typing pinyin.

ibus-m17n zh-pinyin.mim handles this well. However, whenever you type a v it puts a ü. Other than that you can type normally in English and switch to pinyin just by adding numbers. So i changed it by adding a fifth tone, the neutral tone. If v is typed, v is displayed. If u5 is typed (or u:) then ü is displayed. If you want this functionality, after backing up /usr/share/m17n/zh-pinyin.mim, place the above file in it's place and restart ibus.

Another approach, unfortunately restricted to working within LibreOffice or OpenOffice is to use a macro (scroll down to OpenOffice subtitle).

0

Try this to see if it's helpful:

https://eastasiastudent.net/china/mandarin/input-pinyin-tone-marks-ubuntu/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.