This is my way of creating a new scim table. It’s a simplified version of the description by Janusz Prusaczyk (you can find a recent copy of his description here and an older one here).
- Get the source from git for examples:
git clone https://github.com/scim-im/scim-tables.git
cd scim-tables/tables/[lang]/ and look for a table (file ending in
txt.in) that has a simple structure, but that you like when you use it (obviously, try and compare using scim).
- copy the table you like somewhere, and change:
- the UUID (create a new one using uuidgen)
- the SERIAL_NUMBER
- ICON (don’t use a source path but the real path:
ICON = /usr/share/scim/icons/[your_filename].png - create an icon using the others in that folder as examples)
- NAME.[lang_LANG] (check with locale -a)
- LANGUAGES [lang_LANG]
- change the part between BEGIN_TABLE and AND_TABLE. Simple structures have [input] [output] [(optional) frequency_number]
- check that the first line has SCIM_Generic_Table_Phrase_Library_TEXT (and not binary bla)
- save and copy as root the file to
/usr/share/scim/tables/[your_filename].bin. Note, that while the filename pretends to be a binary, it’s just plain text, easy to maintain.
- restart scim somehow (the only way that works for me is restarting X)
Your table should be in scim’s menu under the language you used, and work the same as the table you copied it from. To be clear: the only thing you do is edit a
txt.in source file, rename it to
bin, put it in
/usr/share/scim/tables, put an icon in
/usr/share/scim/icons/ and restart scim. You don’t compile. The bin file begins with SCIM_Generic_Table_Phrase_Library_TEXT and contains a regular path to the icon.
I find this much easier than compiling the source after each edit. Currently it works for me (on Slackware 14), but I don’t know that future versions will allow this too.
I’m working on tables to be able to make notes on Classical Chinese or modern Mandarin (from the perspective of someone who knows Japanese). It currently uses pinyin in a-z only (tones in -x -h suffixes). I’m going to add other input (example sono 其). If you want to you can try it out (I couldn’t find a regular table for pinyin input myself), see below. The table contains all the words in Cedict (113,230 words). Work in progress.
- for in
updated 2015年 7月 7日 火曜日 23:42:18 CEST (113,230 words).
- for in
/usr/share/scim/icons/ download kpb2.png
- restart scim, find KPB-2 in Chinese Traditional
- note: KPB-2 includes both pinyin no-tone-spelling and alternate tone spelling: pin2→pinx pin3→pinn (pi3→pii etc.) pin4→pinh; examples
zhehge 這個, zhongguox 中國.
Edits to be expected.