Entering Unicode math symbols in GNOME
Many mathematicians and physicists are so used to using LaTeX that you find LaTeX code in emails and source code comments that scientists then “render” in their head. LaTeX code is not always very readable though and I find it quickly gets distracting as the argument you’re writing down becomes more complex.
Enter Unicode math symbols. Just as you can represent the letters from almost all alphabets on Earth in Unicode, it also supports tons of mathematical operators, arrows, symbols etc.. If you insert one of these characters into your favorite Unicode-aware editor, you’ll see the corresponding symbol immediately, without having to compile, as you would need to do with a LaTeX document.
Obviously, there’s no room on your keyboard for all of these symbols. That’s where the ibus input method really comes in handy. Motivated by the need to input characters from complex alphabets using a finite size keyboard, this method can also be used to insert math symbols into regular text documents. This software is installed by default in a standard Fedora installation and you can configure the input methods you want to use in the “Region and Language” section of the System Settings. There’s one math input method that is installed by default in Fedora, called “math-latex”. After you add it to your list of Input Sources, you can switch to this source using the Super+Space keyboard shortcut (the Super key is also known as the “Windows key”). Once it is selected, type on your keyboard “int”, et voila, the symbol “∫” will appear. Since this feature is not really documented, you’ll have to look into the file “/usr/share/m17n/math-latex.mim” to see what commands are supported and which key sequence corresponds to which symbol. Not so convenient.
Next up is the “mathwriter” input source, which improves upon the previous source. It is not installed by default, but can be added by installing the “ibus-table-mathwriter” package. You may need to restart (or execute “ibus restart”) after this in order for the newly installed source to appear in the settings. With mathwriter you can start typing LaTeX commands and it will show you a list of matching symbols as you type. Select the one you want with the cursors and hit the space bar.
Where can you make use of these features? You can use it in XeTeX to make your tex code more readable with the unicode-math package, or use it in the excellent rednotebook journal to improve your scientific notes.