mike-fabian / ibus-typing-booster

ibus-typing-booster is a completion input method for faster typing
https://mike-fabian.github.io/ibus-typing-booster/
Other
233 stars 15 forks source link

Feature request: LaTeX commands in emoji search #248

Closed gjvnq closed 3 years ago

gjvnq commented 3 years ago

It would be pretty beneficial to be able to type <emoji> <\> <i> <i> <n> <t> <space> to get ∬ instead of <emoji> <i> <n> <t> <e> <g> <r> <a> <l> <space> <space> <right arrow> <enter>.

There is a good list of which LaTeX commands to Unicode code points from the unicode-math package: https://ctan.dcc.uchile.cl/macros/unicodetex/latex/unicode-math/unicode-math-table.tex

mike-fabian commented 3 years ago

I guess you know already

mike-fabian commented 3 years ago

But maybe you don’t know yet that you can add a t-math-latex input method in the setup tool?

This video below shows how it can be used:

https://user-images.githubusercontent.com/2330175/137860103-aafc4bdf-1216-4aba-888c-5b634e72d6d9.mp4

I selected the option “☑️ remember last used input method” in the video. At the end of the video I type Control+ArrowDown a few times, which switches between the two input methods, t-math-latex and NoIME. You can see in the preedit that this switches between “∀” and “forall”. And because of the option “☑️ remember last used input method”, the change of priority in the input methods is also remembered in the setup. Therefore, you can see the order of the input methods changing in the setup tool below.

mike-fabian commented 3 years ago

The file /usr/share/m17n/math-latex.mim contains the sequences currently defined. You can also display that file using the setup tool:

https://user-images.githubusercontent.com/2330175/137861491-0e5fd248-2235-4a91-a1e4-c7a1e1982787.mp4

mike-fabian commented 3 years ago

The file /usr/share/m17n/math-latex.mim is a bit short and doesn’t seem to contain all LaTeX symbols. So it might be useful to contribute to an update of that file.

gjvnq commented 3 years ago

I had tried but it wasn't working. I then did a quick look into the source and found very little mentioning latex and came to the wrong conclusion that the feature wasn't implemented instead of it just being a problem on my machine.