However, if I try to do the same with Devanagari script (itrans inscript), table columns don't get aligned properly.
Use valign
from GNU ELPA.
From the blurb
This package provides visual alignment for Org Mode, Markdown and table.el tables on GUI Emacs. It can properly align tables containing variable-pitch font, CJK characters and images. Meanwhile, the text-based alignment generated by Org mode (or Markdown mode) is left untouched.
For the sake of demonstration, this is what I did
Install
valign
withM-x pacakge-refresh-contents
andM-x package-install RET valign RET
Add the following to your init file (or
eval
it)
(add-hook 'org-mode-hook #'valign-mode)
- Copy your
devanagari
table to anorg
file.
| क | ख | ग | घ | ङ |
| च | छ | ज | झ | ञ |
| ट | ठ | ड | ढ | ण |
| त | थ | द | ध | न |
| प | फ | ब | भ | म |
Do
M-x revert-buffer
when in aboveorg
bufferMission accomplished.
What you see below is the screenshot of before and after valign
is activated.
valign
is turned off when the table size exceeds a specific threshold. So, if you are tables are big bump the value of valign-max-table-size
.
For the sake of record, and if you haven't already noticed ... You DO NOT need to do all the jugglery with fonts and their widths suggested in the other responses. This is because the valign
library measures pixel-width when doing alignment.