emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Juan Manuel Macías" <maciaschain@posteo.net>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: [BUG] LaTeX export in non-English language [9.6-pre (release_9.5.5-1087-g620a96.dirty @ /home/yantar92/.emacs.d/straight/build/org/)]
Date: Thu, 10 Nov 2022 12:40:07 +0000	[thread overview]
Message-ID: <871qqbj848.fsf@posteo.net> (raw)
In-Reply-To: <87h6z7jq4o.fsf@localhost> (Ihor Radchenko's message of "Thu, 10 Nov 2022 06:11:03 +0000")

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
> \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 

  reply	other threads:[~2022-11-10 12:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-10  6:11 [BUG] LaTeX export in non-English language [9.6-pre (release_9.5.5-1087-g620a96.dirty @ /home/yantar92/.emacs.d/straight/build/org/)] Ihor Radchenko
2022-11-10 12:40 ` Juan Manuel Macías [this message]
2022-11-11  2:04   ` Ihor Radchenko
2022-11-11 15:08     ` Juan Manuel Macías
2022-11-13  4:09       ` Ihor Radchenko
2022-11-13 13:27         ` Juan Manuel Macías
2022-11-14  2:38           ` Ihor Radchenko
2022-11-14 22:25             ` Juan Manuel Macías
2022-11-15  2:46               ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871qqbj848.fsf@posteo.net \
    --to=maciaschain@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@posteo.net \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).