Ihor Radchenko writes: > I am trying to look into RTL language exports. > > I tried the following simple-minded Org file: > > #+title: Temp > #+LATEX_COMPILER: lualatex > > #+LANGUAGE: HE > > \begin{equation} > f(x) = \frac{8}{7} > \end{equation} > > #+begin_src python :exports code > for i in range(3): > print("hello") > #+end_src > > And exported to pdf (C-c C-e l o). > Surprisingly, the output is in English. > > Am I missing something?
You need to explicitly load babel or polyglossia: For polyglossia (`org-latex-guess-polyglossia-language'): #+LaTeX_Header: \usepackage[AUTO]{polyglossia} For babel (`org-latex-guess-babel-language'): #+LaTeX_Header: \usepackage[bidi=basic]{babel} #+LaTeX_Header: \babelprovide[import, main]{AUTO} There was a discussion in an old thread about the possibility of loading babel or polyglossia automatically (I think Maxim was in favor of it, and brought up some possibilities). The problem is that babel's syntax is somewhat more complex than polyglossia's, and admits many variants. Also in babel there are languages that are loaded using the new ini file system with the command \babelprovide. Currently, org-latex-guess-babel-language supports babelprovide, but you need to load the command explicitly: #+LaTeX_Header: \babelprovide[options]{AUTO} BTW I've noticed that the value of #+language is not case-agnostic. You should put "he". Should it be case-agnostic? In the previous implementation, when there were two language lists for babel and polyglossia, neither was it. Best regards, Juan Manuel