From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id kLbEJnbxbGOpoQAAbAwnHQ (envelope-from ) for ; Thu, 10 Nov 2022 13:41:26 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id SErYJnbxbGMcgAAAauVa8A (envelope-from ) for ; Thu, 10 Nov 2022 13:41:26 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 20A831119F for ; Thu, 10 Nov 2022 13:41:25 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ot6rC-0001BV-VT; Thu, 10 Nov 2022 07:40:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ot6r2-0001B7-9S for emacs-orgmode@gnu.org; Thu, 10 Nov 2022 07:40:24 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ot6qs-0005zP-B9 for emacs-orgmode@gnu.org; Thu, 10 Nov 2022 07:40:22 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id CD239240103 for ; Thu, 10 Nov 2022 13:40:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1668084011; bh=SyMXLx6aPv8LAwhLUCjJ05HsU9ZJ3aPyHd8KJJv86/Y=; h=From:To:Cc:Subject:Date:From; b=hjDMnrCtnRdhGnCkwTJHokJHWsJOY3BigEXZ+a3fW07dl99zsIKnowlYIh9hlWyAE soTcjwHXCsD3edPl1wof4PMzqy48CtLWPXoqIkRmJ2VUgcZJsGbRSKsi4jx2mNPVQk JfAM0G59etm57Dz8wr9SPX8OYVPmYPX6GF/56cwXgnqxleJTilpldqafT7BIxSiLrV LvPCmVPznpD+zionENYwoi3an4AMF2brWsFdcsVNeTmKO07szJUC3Eo8ObO+5VReCl 4ThDj9XPc+a5wSmw4YVIBl3WHKOaB/goG0mrZdY5gzr1peA23m8Bx/4O2ddvL3rZqz NdjnutvwQzyZA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4N7Lyg0FTCz6tqB; Thu, 10 Nov 2022 13:40:09 +0100 (CET) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: Ihor Radchenko 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/)] References: <87h6z7jq4o.fsf@localhost> Date: Thu, 10 Nov 2022 12:40:07 +0000 In-Reply-To: <87h6z7jq4o.fsf@localhost> (Ihor Radchenko's message of "Thu, 10 Nov 2022 06:11:03 +0000") Message-ID: <871qqbj848.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=maciaschain@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, T_SPF_HELO_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1668084086; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=gcZwu8kiG2xZFiiDsP1kfloMenah8pExegqZlLqmWjU=; b=UxlkDFUyjB5kybZHGJ+ZYSV/g6VMpbOCxz+obvMoz4RaD4RjPBnLmpsTpK94zWPY5B8MVq K+OcoSxbUwMz6BD62290FwLNzDveo8c5jsDFI3ldy/ixbyO0I0HZXVoZe9LkOtbhaQpUzR 4fAmlXhVlYsBC1RTSi9AU542Dv16+TAwkbGR6JHHysqq3VtxGwmnxJWJQa2OJABMVQbwXK FWNPkkA/IklLvPkBS2UrSiKjpczV/JFKDPI+hb3ayUphe4byd3thNn2p4PLb27nRNnq097 VUaUV55f/SQDLoKjcvExkAwjDKVUfkEScaMcFy4RPGTddlWw4mW4yPAMFSZuQA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1668084086; a=rsa-sha256; cv=none; b=V2thlqOtmtTlPTRNtotT9Ki4suP+pWcCxf38P26QrCtp2q1JdshMb6VZRmOcaqTDBTdqgb Xe8DQT7B59iWE/YvCHNxaCpTs52S/ody9b79R+l6ciAQTO8DP2CFaGoCl/VTMdU4yCnjLE G2h2Cy7cokA//iIgjA4JyIL0dv6OykoxQUTv9aBHwXqRJzdNBBPSywqTRYssbWXpOD9F2H i1PDX1B0gjLotAkk8mMkYfgTV3f2sS8IZ7i3dGK6aEtRjAMe7DejBw7t9X9SQVOhlxopz0 JBivqHQUghnrTBWGLpmwsz7vji6ZyGkwaNsgPpmmuixDZRNAGy40QI5cf/YU2A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=hjDMnrCt; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -7.52 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=hjDMnrCt; dmarc=pass (policy=none) header.from=posteo.net; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 20A831119F X-Spam-Score: -7.52 X-Migadu-Scanner: scn0.migadu.com X-TUID: emU1P6RD+c+d 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