Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Org-mode support RTL Languages like arabic

Does Org-mode support RTL Languages like arabic ?

The objective is to prepare and typeset a book in arabic script and export it as PDF for print.

like image 933
Ibn Saeed Avatar asked Sep 25 '22 19:09

Ibn Saeed


1 Answers

For a correct RTL display you can add the following snippet to your init file:

(defun set-bidi-env ()
  "interactive"
  (setq bidi-paragraph-direction 'nil))
(add-hook 'org-mode-hook 'set-bidi-env)

From Emacs Manual:

The variable bidi-paragraph-direction, if non-nil, disables the dynamic determination of the base direction, and instead forces all paragraphs in the buffer to have the direction specified by its buffer-local value. The value can be either right-to-left or left-to-right. Any other value is interpreted as nil.

As for pdf export, orgmode handles this using latex. Latex have a rich language support and you can easily makes this work. You can read more about that here.

like image 179
Sineau Avatar answered Oct 04 '22 07:10

Sineau