However, if I try to do the same with Devanagari script (itrans inscript), table columns don't get aligned properly.
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
M-x pacakge-refresh-contents and
M-x package-install RET valign RET
Add the following to your init file (or
(add-hook 'org-mode-hook #'valign-mode)
- Copy your
devanagari table to an
| क | ख | ग | घ | ङ |
| च | छ | ज | झ | ञ |
| ट | ठ | ड | ढ | ण |
| त | थ | द | ध | न |
| प | फ | ब | भ | म |
M-x revert-buffer when in above
What you see below is the screenshot of before and after
valign is activated.
valign is disabled when the table size exceeds a specific threshold. So, if you happen to notice that some of your tables are mis-aligned, even when
valign-mode is ON, then you may have to configure
valign-max-table-size to a higher value.
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.