Wednesday, October 14, 2009

LaTeX, Unicode, Kile, TeXmaker, Ubuntu Gnome, and SCIM /SKIM

I run Ubuntu GNU/Linux, with the Gnome windows manager. Kile is the most sophisticated LaTeX editor under Linux at present, and TeXmaker is also very good and has the added advantage of being cross-platform.

TeXmaker installs easily with aptitude, but Kile asks for the whole TeXlive distribution to be downloaded as dependencies. This is fine, as far as it goes. But the TeXlive distributed through aptitude is terribly out of date (2007). So it's quite reasonable to get a more recent TeXlive from TUG and install that. But then Kile still wants to install the old 2007 one through aptitude, and everything gets mess. Luckily, it's possible to fool aptitude into thinking that it's TeXlive is already installed. So now you've got Kile and and up-to-date TeXlive. Great, you think.

Until you start trying to type Unicode (you are using XeLaTeX, aren't you?).

Under GNU/Linux, you can use SCIM and the m17n input method, especially the excellent sa-translit and sa-devnag keyboard handlers to enter Unicode roman transliteration or Devanagari very quickly and easily, rapidly swapping keyboards with ctrl-space. It's great.

But Kile and TeXmaker are written using the QT toolkit, like many applications that are written for the KDE environment rather than Gnome. This means that SCIM doesn't immediately work with them. Blast.

Okay, it's deeply buried on the net, but there is an answer to this too, and it works. It's here.

Hooray! Kile, TeXmaker, TeX Live 2008, Ubuntu 9.04, Gnome, SCIM, m17n, all working fine.

I have to say, though, this should all be much easier, and should be done through aptitude.

Footnote:
After installing or uninstalling other language-related stuff in Ubuntu, sometimes iBus stops working. This can be fixed by going to System/Administration/Language Support and making sure keyboard input method is set to "ibus". Sometimes this tool also installs parts of the language support that are missing.

Also, if your writing area still give the ibus message "no input window", it can be aanecessary to right-click your mouse, select "input methods" and set "ibus".