2014-09-13 TeX input method

Some time ago, someone on the Emacs mailing list asked about entering a letter not present on a (typical) keyboard. There are a few ways to do it, some at the OS level and some on the editor level. The usual Emacs way is C-x 8 " o to get ö etc. (Incidentally, there seems to be no analogous command for œ, which was asked in that question! Also, I strongly recommend hitting C-x 8 C-h and at least skimming through the results, and checking out C-x 8 RET.) I was a bit surprised, though, that nobody mentioned the TeX input method. Input methods are Emacs’ ways of entering “complicated” characters. (Many of them are designed to enter Chinese, Japanese or Korean languages.) In my setup, I have the TeX input method as the default (this can be achieved e.g. by putting (setq default-input-method "TeX") in your init.el). (Normally, you don’t have any input method turned on; C-\ toggles between no input method and your default one, and C-x RET C-\ sets the default one.) Now, typing \"o instead of C-x 8 " o is a small (but noticeable) gain. The real strength of the TeX input method is in typing math symbols. Try it yourself: not only \alpha (α), \beta (β) and other Greek letters work, but also all the Unicode goodness like \int (∫), \infty (∞), \in (∈), \subset (⊂), \aleph (ℵ), \heartsuit (♥) and lots of other ones. (Also, some sub- and superscripts work, like \aleph_0 (ℵ₀) or \pi r^2 (π r²).)

CategoryEnglish, CategoryBlog, CategoryEmacs, CategoryTeX