From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id UA4CHUPTcmPHBQAAbAwnHQ (envelope-from ) for ; Tue, 15 Nov 2022 00:46:11 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id GEcBHUPTcmMz+gAA9RJhRA (envelope-from ) for ; Tue, 15 Nov 2022 00:46:11 +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 287E13BD12 for ; Tue, 15 Nov 2022 00:46:11 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ouifE-0005bf-SM; Mon, 14 Nov 2022 18:14:53 -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 1ouidy-0001X6-DZ for emacs-orgmode@gnu.org; Mon, 14 Nov 2022 18:13:34 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ouhtc-0007p0-GW for emacs-orgmode@gnu.org; Mon, 14 Nov 2022 17:25:43 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id D5497240028 for ; Mon, 14 Nov 2022 23:25:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1668464736; bh=//Y3D+NZ1IZv1A7ci8qk2zOWLRO/j7B6mJkbfRpobac=; h=From:To:Cc:Subject:Date:From; b=KzDQfFOqg7+kpfVstl+KdSQfQCf6Q8Pj5G45DK+z+WbhW9sQzVrQ4IKENqQqx1tJ7 JtL2ztCrTUp3A/WTFPJvHJWUJaIP6EBSoj+wiH147oTKRIWNB4kN6YpdjtkLFs92bj kWXfoUE1Ho8sVChvUH5lDCMNVJh4jgW7T6p44DzuJ5jSyvf08mbqyVNg3tNzBrBoVT RsYOQ/pvCTdWkGlGa9bms8leFBFxE2TNSJv0ioWifi/noy8tGgQfDbU/ahzB4dBjHL hOxisgJRUZBMjNxwWb3OFDif6caTusiKgyPIgAua1cuM+1RQA41WpDr6XxbZnQxs0W P5HbNP5U7Ov5Q== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NB3mJ0r4kz6tnh; Mon, 14 Nov 2022 23:25:33 +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> <871qqbj848.fsf@posteo.net> <87v8nm9rgb.fsf@localhost> <875yflr0jr.fsf@posteo.net> <87r0y78pi2.fsf@localhost> <87bkpb6l38.fsf@posteo.net> <87y1sefefs.fsf@localhost> Date: Mon, 14 Nov 2022 22:25:29 +0000 In-Reply-To: <87y1sefefs.fsf@localhost> (Ihor Radchenko's message of "Mon, 14 Nov 2022 02:38:31 +0000") Message-ID: <87sfil897q.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=maciaschain@posteo.net; helo=mout01.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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=1668469571; 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=SpMyWEeZ65bw7ckLlgr4nwEjiyzxikGrXBB7GbZswsU=; b=k41sLfUGrmIZMqYq7BX5fnKL28Z8JkiyBsqrpjrzpeyXyO9nH5LAuTPb6mP+W7g+e0xuM/ Q1PND6E2l7I+RgOdYFT2gE3II0gNdEa5FD3u3q4xME6loOusJnGglLeS2aFJJkubgrMvgO 7Rmu+wMnpHD6Y9HX6uUiSdSnemcB5wx9mAZsSv0fU5NneX1+h+hadUQo5OWW9m9amVNlBy ApNZDr6DNXYETzALdgq8MuwbYORJbsDrODxpGDU74f3BOb8Lebiwmhd6dqK0YUgk/8uewi 37Srl4ere0zQeLLA3FVj/9TaqT3r6HEOxT8Ovcn+7F0cE+MhRSUcJg4wp26LRg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1668469571; a=rsa-sha256; cv=none; b=E2saco1Xf04fvG8Fzo01lI1Tp5NEdoEo3UohyAmoNEJ3t8gYO7T9hK/bWVXb3siOedx2VH 7pwIEjdMFLGnvVbFGkw5wTZtfJlQpH2ptnA/zyEJI4zB++19X3CI3mt07ENoGh+7oToPG4 2DdqHBigusVbN/HQRGRzJN7v/LlMpkp2adS+7Tv0/v5oiJFDzBCeVBDF/ywk2unm+0NJDP 0eGodplzezfCVo0A9slezlFKCLrtxrE4xfxq6uoLPnAqI0NelaqDFytXeCVYanIQ1G8DLu 4wH6WHL2zLdvgXUvwzHbWwrNtaSJliNkTpmghuRMKKIEzhEbr1v7tYHoGE4T1w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=KzDQfFOq; 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: -9.14 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=KzDQfFOq; 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: 287E13BD12 X-Spam-Score: -9.14 X-Migadu-Scanner: scn0.migadu.com X-TUID: 8SFkHIi0UlbT Ihor Radchenko writes: > However, the PDF (see the attached) is erroneous: > 1. Title "Temp" is written RTL > 2. Year and date (numbers!) are written RTL > 3. The python code is written RTL!! > > Just the equation is rendered LTR as expected and the ordinary Hebrew > text is rendered RTL. I'd say that's expected behavior. Note that if you declare Hebrew as the main language, the LaTeX classes (in this case article.cls) will put whatever is necessary in Hebrew and use the Hebrew (and RTL) typographic rules where necessary, and that includes the title, the date, and the various literal strings as the table of contents, figure counters, captions, etc. To use Hebrew in another context, it would have to be declared as a secondary language. The latest versions of Babel allow you to associate languages to scripts when it comes to non-Latin alphabets (Cyrillic, Greek, Arabic, etc.), and also to associate fonts. In this way it would not be necessary to indicate the language explicitly by means of a \selectlanguage{} or \foreignlanguage{}{}. For example, suppose that my document has Spanish as its main language, but I also add parts in Hebrew, which would be automatically recognized by Babel, by putting this: #+LaTeX_Header: \usepackage{fontspec} #+LaTeX_Header: \setmainfont{FreeSerif} #+LaTeX_Header: \usepackage[AUTO,bidi=basic]{babel} #+LaTeX_Header: \babelprovide[onchar=ids,import]{hebrew} #+language: es (...And curiously I just realized with this example that it is necessary to fix `org-latex-guess-babel-language', because in the current state it returns an error if a string other than AUTO is put as argument of babelprovide. I'll open another thread to submit a patch to fix that). >> The use of the fontspec package (https://www.ctan.org/pkg/fontspec) is >> ubiquitous in LuaTeX or XeTeX as long as one wants to have control >> over fonts and use extended languages and characters. LuaTeX and XeTeX >> use by default (for debatable historical reasons[1]) a Unicode variant >> of the Computern Modern font, which has limited language coverage. I >> remember that it was commented in a previous thread the possibility of >> offering (for example, through a series of variables), a minimum >> coverage of fonts to ensure that the documents, at least, are compiled >> well and are readable. The user could redefine those variables to use >> their preferred fonts. Or have the option that this part of the >> preamble is not created, to have full control. I remember that I >> proposed this, but there were other interesting proposals. For >> example, Timothy commented on the possibility of using fontsets. > > I hope that it can be implemented some day. > For now, we should detail important things, like setting suitable font, > in the manual. Perhaps a FONTS item could be added in "LaTeX specific export settings"? Best regards, Juan Manuel