I really enjoy writing bidirectional text in org-mode using Emacs as it supports the rt-to-left direction out of the box. However, when it comes to org tables alignment things become very unorganized.
I have this setup in my
init.el file for correct RTL display in org file taken from this post:
(defun set-bidi-env () "interactive" (setq bidi-paragraph-direction 'nil)) (add-hook 'org-mode-hook 'set-bidi-env)
MWE with a table in English vs Arabic to show the difference
* Tables in English (no alignment problems) | No | Name | Tel | Rate | Result | |----+----------------+-----------------+-------+--------| | 1 | John Doe | +1-541-754-3010 | 34.99 | Fail | | 2 | Johnson Kirton | +1-541-754-3010 | 55.89 | Pass | | 3 | Debbie Cannon | +1-541-754-3456 | 66.45 | Pass | * Tables in Arabic (problems with alignment) | رقم | الاسم | الهاتف | المعدل | النتيجة | |-----+---------------+-----------------+--------+---------| | ١ | جون دو | +1-541-754-3010 | ٣٤.٩٩ | فشل | | ٢ | جونسون كيرتون | +1-541-754-3010 | ٥٥.٨٩ | نجاح | | ٣ | ديبي كانون | +1-541-754-3456 | ٦٦.٤٥ | نجاح | * And this text in English after the tables * وهذا نص باللغة العربية بعد ادراج الجداول
See the alignment in the Arabic table below how it is different from that of the table in English as ugly to neat. Is there any fix to get it right?
Using an Arabic monospaced font (Kawkab Mono) as kindly suggested by @Do didn't solve the problem.
Not a Duplicate
A similar issue has been reported for Japanese here, but the solutions presented there didn't help solve my problem. Changing the font to "Inconsolata-12" for example didn't change anything in the table alignment, this could be only applicable to the Japanese characters but not to Arabic ones. Neither font type nor size did improve the appearance of the alignment. The second solution in the same post, to my understanding (article in Chinese) is to try out specific pair sizes for English and the SECOND language but as I said, changing font size didn't work for me.
Another Monospaced Font
Droid Sans Mono did improve the appearance but it didn't solve it completely and in a larger table the bad alignment would be much worse. I ran out of ways to seek a TYPICAL monospaced Arabic font that will fix it. I wonder if such a font does exist!!