[caption id="" align="aligncentre" width="109" caption="Pinyin Tone Chart"][/caption]
As I'm very interested in communicating in Mandarin Chinese, my studies are centred on Pinyin rather than traditional or simplified Chinese characters. To help me write and display Pinyin tones on my laptop and not just in the (real) notepad I've been using, I'd been meaning to get this done for a little while, so with a few hours to use this Sunday it was time to get this sorted. I'm really pleased with the results and decided to share my experiences. This is all working on my Ubuntu Hardy/8.04 laptop and likely to on most modern Linux/Gnome systems. These are the pinyin packages I have installed.
- Pinyin character set
This article showed me how to add the tones "āáăàēéĕèīíĭìōóŏòūúŭùǖǘǚǜ" to the character palette (add it to your panel if needed) and select them from the list. Note that if you subsequently remove the applet from the panel, your custom additions are lost. The screenshot here is from my desktop shows the dialogs open and how the character palette panel should look at the end (click the image to enlarge). Now that I can get Pinyin tonal characters into any app, I wanted to find a very easy & quick way to do this in my favorite editor vim.
[caption id="" align="alignright" width="178" caption=""][/caption]
- Pinyin shortcuts in vim
This turned out to be easy peasy, but I needed a something to start me off and this excellent doc helped me out. After realising that all I needed to do was (a) check a vim pinyin keymap existed on my system and (b) give all my vim sessions access to it, by appending "set keymap=pinyin" to my ~/.vimrc
[[email protected] pinyin]$ locate vim | grep pinyin
- example, keyboard shortcut
Since my laptop screen has a high resolution (1920x1200) and my fonts are pretty small, I'd expected reading the tones was going to be tricky so I utilised a large font gnome-terminal profile I made for presentations over VideoConferencing, and adapted an icon to open my Pinyin notepad file (as the screenshot below shows) and also set a keyboard shortcut "<ctrl><alt>p", so now it's super-quick to reopen the file in a very easy to read format. Incidentally I used metacity in gconf-editor to set a custom command via "/apps/metacity/keybinding_commands" and then to call it via "/apps/metacity/global_keybindings".