Naveen Kumar (नवीन कुमार) (moebiuscurve) wrote,
Naveen Kumar (नवीन कुमार)
moebiuscurve

About ibus-table-mathwriter

This blogpost was long pending and is about ibus-table-mathwriter (earlier known as mathwriter), which I had first written for iiimf. Last year I ported it to ibus-table and did a major update in terms of mathematical symbols. Though it is not fully complete yet, it is in such a state that it can be used conveniently.

The ibus mathwriter table lists the key-map in the following form:
<key-sequence><space/tab><Unicode math symbol><space><frequency>

The <key-sequence> is the sequence a user enters in order to input <Unicode math symbol>. Since the table uses ibus-table engine, all partial inputs are look ahead and possible results are presented as possibilities.

Now either the user selects any one of these possibilities or either he continues to enter more characters from the sequence or writes the sequence completely. One good thing about this table is that there are mostly more than one way to enter a particular math symbol. Either a user can use a more descriptive key-sequence (almostequalto for entering ≈) or use logical shortcuts (~~ for entering ≈).

Words in descriptive key-sequences are either (partially or fully) separated by _ character or otherwise all words are merged together. For instance almost_equal_to, almost_equalto and almostequalto are equally valid for the value ≈ .

Whereas, Logical shortcuts are faster to input and sometimes very intuitive. It's a matter of getting used to them. They make use of the following three principles

1. Principle of lookalike: The characters can be formed with approximate lookalike input sequence.

2. Principle of rotational transform: Lookalike sequences are pre-fixed or post-fixed with |_ or _| or __ to rotate rest of the sequence (partially or fully) by 90 degrees or 180 degrees. Prefix rotates post-sequence, to lookalike, in anti-clockwise direction, while post-fix rotates pre-sequence, to lookalike, in clockwise direction.

3. Principle of lookalike input line/curve sequence : Though the character looks nothing like what is intended, the input sequence uses similar sequence of lines and curves in the actual shape (e.g benzene, ⏣, can be input as |/\|/\ or /\|/\| etc.).

However one rule common to these three principles is that all sequences can only be formed from the keys available on a standard keyboard.

For example in order to enter a ∠ (angle)character a user can either write angle directly or enter the key-sequence /_ . Since ibus-table does not allow = character in input sequence we have used -- wherever it is required. Here are some other examples in the form

<key-sequence><space/tab><Unicode math symbol>:

lookalike Examples:

angle_right ∟
angleright ∟
|_ ∟

_|_ ⟂

centimeter_square ㎠
centimeter_2 ㎠
centimetersquare ㎠
centimeter2 ㎠
centimeter^2 ㎠
cm2 ㎠
cm^2 ㎠

circle ◯
() ◯
O ◯
(+) ⨁
(-) ⊖
(-) ⦵
(-) θ
theta θ
(x) ⨂
(*) ⨂
(/) ⨸
(%) ⨸
(/) Ø

(+ ⨭
(x ⨴

(.) ⨀
(.) ◉
(o) ⨀
(o) ◉
(()) ⦾
(o) ⦾

emptyset Ø
nullset Ø
(/) Ø

Since we cannot have special logical shortcuts for ⫝̸, because nothing looks like it, we prefix |_ in the user input sequence (for anti-clockwise 90 degree rotation) (-\-, which then looks like what is intended. And hence the key-map becomes

|_(-\- ⫝̸
|_(-\ ⫝̸
|_(\- ⫝̸
|_E\- ⫝̸

while some other possibilities for the same,

forking ⫝̸
\|/ ⫝̸


or post-fix _| to -\-). And hence the key-map becomes

-\3_| ⫝̸
-\)_| ⫝̸
-\-)_| ⫝̸
\-)_| ⫝̸

similarly __ (two underscores) is pre-fixed/post-fixed to rotate some (partial or whole of) shortcut to 180 degrees, which is lookalike to some Unicode math symbol. For example:

thereexists ∃
__E ∃
!__E ∄
__U ⋂


more examples:

root4 ∜
fourthroot ∜
\4/- ∜

^2 ²
^( ⁽
^r ʳ

__C-- ⫆
-x- ⫘
__C-C ⫘
|_-3- ⫛

largelefttriangleoperator ⨞

<| ⨞
< <
<_ ≤


<- ⇐
<-/- ⪉
<) ⪦
<() ⩹


<. ⩹
?< ⩻
<< ⪡

log ㏒
ln ㏑

/_\ ⩟
/\_ ⩟
_/\ ⩟

/\\/ ⩙
\//\ ⩙
X ⩙


-\-/- ⩝
\-/ ⩝
-\/ ⩝
\/- ⩝
-\/- ⩝


||- ⫦
||-- ⫦
|-|- ⫦
|-|-- ⫦


+- ±
-+ ∓


/-\ ⨺
/x\ ⨻
/+\ ⨹

[.] ⚀
[..] ⚁
[:] ⚁
die3 ⚂
[.....] ⚄
[::.] ⚄
[:.:] ⚄

T| ⫪
|T ⫪

||-|| ⩎
||^-|| ⩎

benzene ⏣
|/\|/\ ⏣
/\|/\| ⏣
\|/\|/ ⏣
|/\|/\ ⏣
/\||\/ ⏣

|\ ⨡

I think, the above mentioned (random) examples would help to explain the concept behind ibus-table-mathwriter. Please accept my apologies for not being too rigorous currently. The application is experimental and still evolving. But I guess I have conveyed the idea behind it.

The ibus-table-mathwriter package is currently available as a part of ibus-table-others package on fedora. There is no user manual and you can use the key-map table to get used to the shortcut lookalike sequences.

Also, if I get some time, I will soon fork from ibus-table engine to make a specialized mathwriter table engine and enhance the concepts which would otherwise be not possible using current ibus-table engine.

Suggestions are welcome.

Links:
https://github.com/moebiuscurve/ibus-table-others
https://admin.fedoraproject.org/pkgdb/acls/name/ibus-table-others
Subscribe

  • Post a new comment

    Error

    Comments allowed for friends only

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 5 comments