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".

4 comments:

  1. There is also Kubuntu with KDE as standard window manager. It might have been easier with that.

    ReplyDelete
  2. I know Linus himself has favoured KDE, but I prefer Gnome. But also, I did install and try KDE (you can have both installed on the same machine). The QT toolkit and QT scim/skim bridge has to be installed even under KDE, otherwise you have exactly the same trouble.

    ReplyDelete
  3. If you run ibus alone, under Ubuntu 9.10, and don't have scim, then text entry under QT applications still won't work. You have to have the following:

    If you haven't already added your locale to /etc/scim/global do that now.

    * Run the command 'locale' in your terminal, and copy the locale name after LANG=
    * Edit the file /etc/scim/global:

    gksudo gedit /etc/scim/global

    * And add your locale name to the line /supportedUnicodeLocales = list using comma, for example:

    /SupportedUnicodeLocales = fr_FR.UTF-8,en_US.UTF-8

    ReplyDelete
  4. Guys, I can't get XeLatex working in my Fedora 12 ? Any tips to make it work.

    ReplyDelete