From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 KOLtKv3wcGOGQwEAbAwnHQ (envelope-from ) for ; Sun, 13 Nov 2022 14:28:29 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id ECwSKv3wcGNWCwEAG6o9tA (envelope-from ) for ; Sun, 13 Nov 2022 14:28:29 +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 347AF9298 for ; Sun, 13 Nov 2022 14:28:29 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ouD1L-0000xB-3k; Sun, 13 Nov 2022 08:27:35 -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 1ouD1J-0000wv-MC for emacs-orgmode@gnu.org; Sun, 13 Nov 2022 08:27:33 -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 1ouD1G-0004Gv-2D for emacs-orgmode@gnu.org; Sun, 13 Nov 2022 08:27:33 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id E0199240101 for ; Sun, 13 Nov 2022 14:27:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1668346047; bh=xxSRQzqWnMo7GAGPB8kTLX/kLz4cQ75kNHboRLSboxs=; h=From:To:Cc:Subject:Date:From; b=Aqn5YdbShOp7WY+dJy4B50M8M06U4pTQv3irERaxUtrYzHizQbSZZoxCSIhFN5EHR uSDBSJEdZJpKNN6Khuk9bS5TNZEHVhvWUODstx6R+zy7gpYlb/npjS+/OsJ2gutiWC NB921uIKRZJiGJkA2tHEnqEYrU19xubliPzdcL/gEZO4yjlWKAat1/2CsT2ZpEEoOs /kSuqd99/0vuVAM4H2SIfisy5QAkvdKBiCJzs0KOI025paWHw+FyviRL4w2BpB2HLu w5SQKZXc09vavRz+vEvPzlpogJ+QPYJci35Bku/TkTEszGVDk3UCQkStMPeCMhRcMq h2+iYGeCR1IzA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4N9Csp346fz9rxG; Sun, 13 Nov 2022 14:27:26 +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> Date: Sun, 13 Nov 2022 13:27:23 +0000 In-Reply-To: <87r0y78pi2.fsf@localhost> (Ihor Radchenko's message of "Sun, 13 Nov 2022 04:09:09 +0000") Message-ID: <87bkpb6l38.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.66; envelope-from=maciaschain@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, 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=1668346109; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=iOiFLruUpmzEjmXgaZHzfHyYQek6MOIGl8zOhU2QXO0=; b=kvPpk6tqQo9WmCdxH3JgbbOaemPu3kuF2sW2VNWFLD8yuhvAMlhaR7hgdG+AfqSHg5hViZ 4iXxfgVTqg1VZhnOagivGMYVAt/rIBsu2AuMVozCLHuiq/yCleWthwLkHlMh8dyVm6q8QX Kwgz1umpknzYG4SY0trdI5csFVfWTF01NJPc0SB0eUNnsvHb4bWrL6t8tFNKY3Cmz9Vgb3 xSTLrm7L1/Hunx8EzqFy7bxswB6Ii/eBTZg7AhS9+DgHAa4mR60P1MIrfzlrdz1ZuGihpV KwrBepIE47yqGiczmBgnxFgWN7ntMB4A34CTayhxSr5WuaGKecZx8qhKhBvfaA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1668346109; a=rsa-sha256; cv=none; b=MJhg+8Ls0bxYrbvgZM9Mb6+Eo2xPzKgnKud2KMQLDboBpqEweu98/mgI6bySQW7TldTQkP +DcBj/PvEUQnG9014/lEktZaLuARaJ7PTULsoXvaYJV//O7abM8CDPMiN3ShqUGGFyK/5i 4RrIy6s31D0ulJiP/38Q6QmOTt0tXGRLeG8sviRT9NccebPbzeFYBgCNblYcQkLcnnHNxq zagadtDPxNRqvYBLHzLz7OWoa7r5QJ4AhC++o0OltDh2B9KB07bwsh1LkuBWdY5XWiUvvy ivHO33Cq2da6ij9jPD28oG2SowUsbOXW1YvPTB0wqL3deASmbGfFhZjyFGCEoQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Aqn5YdbS; 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: -3.85 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=Aqn5YdbS; 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: 347AF9298 X-Spam-Score: -3.85 X-Migadu-Scanner: scn0.migadu.com X-TUID: Uuz35ypJNos9 Ihor Radchenko writes: > On Gentoo, the required package is dev-texlive/texlive-langarabic. > > However, installing the package is not yet enough! > > With the same file, I am getting missing font errors: > > Setting \if@calendar@hebrew > (/usr/share/texmf-dist/tex/latex/polyglossia/babel-hebrewalph.def)) (./bu= g.aux > > ! Package polyglossia Error: The current latin font does not contain the= "Hebr > ew" script! > (polyglossia) Please define \hebrewfont with \newfontfamil= y comm > and. hmm, yes, I forgot to mention it before... It is necessary to load a font that has support for Hebrew script, via fontspec package, otherwise it will return an error, both with Polyglossia and with Babel. It should be added: \usepackage{fontspec} \setmainfont{FreeSerif} FreeSerif would work, if we do the test with otfinfo: =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 otfinfo -s /path/to/FreeSerif.ttf =E2=94=82=20 =E2=94=82 DFLT Default =E2=94=82 arab Arabic =E2=94=82 beng Bengali =E2=94=82 bng2 Bengali v.2 =E2=94=82 copt Coptic =E2=94=82 cyrl Cyrillic =E2=94=82 dev2 Devanagari v.2 =E2=94=82 glag Glagolitic =E2=94=82 goth Gothic =E2=94=82 grek Greek =E2=94=82 hano Hanunoo =E2=94=82 hebr Hebrew =E2=94=82 latn Latin =E2=94=82 latn.NLD Latin/Dutch =E2=94=82 latn.TRK Latin/Turkish =E2=94=82 mlym Malayalam =E2=94=82 taml Tamil =E2=94=82 thai Thai =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 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. In LuaTeX you can define fallback fonts at a low level, using luaotfload, for example: =E2=94=8C=E2=94=80=E2=94=80=E2=94=80=E2=94=80 =E2=94=82 \directlua =E2=94=82 {luaotfload.add_fallback =E2=94=82 ("myfallback", =E2=94=82 { =E2=94=82 "freeserif:mode=3Dharf;script=3Dgrek", =E2=94=82 "freeserif:mode=3Dharf;script=3Dcyrl", =E2=94=82 "freeserif:mode=3Dharf;script=3Darab", =E2=94=82 "freeserif:mode=3Dharf;script=3Dhebr", =E2=94=82 } =E2=94=82 ) =E2=94=82 } =E2=94=82=20 =E2=94=82 \setmainfont{latinmodernroman}[RawFeature=3D{fallback=3Dmyfallbac= k}] =E2=94=94=E2=94=80=E2=94=80=E2=94=80=E2=94=80 In the example above, it is defined Free Serif as fallback font for Cyrillic, Greek, Arabic and Hebrew scripts. And HarfBuzz is used as the OpenType rendering engine. As an example, it is valid, although it is still a typographical aberration, since Free Serif and Latin Modern are incompatible by design. But that is already an aesthetic issue :-)=20 I think that doing something similar in Org would be a bit complicated, since it would be necessary to guess what languages and scripts are used in each document. But a number of basic variables like =E2=80=99defaultromanfont=E2=80=99, =E2=80=99defaultmonofont=E2=80=99, etc.= could be enough. But leaving the possibility for the user with advanced knowledge of LuaTeX or XeTeX to have full control, since the configuration of fonts and languages can become very complex and extensive in multilingual documents. [1] My admiration for Donald Knuth is limitless, but in the case of the Computern Modern font I think Knuth (IMHO) was not inspired. It is a font with many design flaws, difficult to read on the screen. I understand that it is hard to get rid of such a TeX hallmark as Computern Modern, but it would be necessary, especially now that TeX can use truetype and opentype fonts and metafont has been obsolete. The CM font is also the reason why many people who have never used LaTeX think that all LaTeX documents look alike. =20