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 UCbrNB4/zGI5IgEAbAwnHQ (envelope-from ) for ; Mon, 11 Jul 2022 17:17:50 +0200 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 cEXeNB4/zGKi8wAAauVa8A (envelope-from ) for ; Mon, 11 Jul 2022 17:17:50 +0200 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 59C331122 for ; Mon, 11 Jul 2022 17:17:50 +0200 (CEST) Received: from localhost ([::1]:55202 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oAvAT-0008AL-33 for larch@yhetil.org; Mon, 11 Jul 2022 11:17:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49486) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oAuKM-0007jn-6O for emacs-orgmode@gnu.org; Mon, 11 Jul 2022 10:23:58 -0400 Received: from mout01.posteo.de ([185.67.36.65]:37807) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oAuKJ-0000N8-Vc for emacs-orgmode@gnu.org; Mon, 11 Jul 2022 10:23:57 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 923DA240029 for ; Mon, 11 Jul 2022 16:23:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1657549433; bh=BRP/MarAa591F5JWXTaU8utle0O9kym2Ed2SQygfF54=; h=From:To:Cc:Subject:Date:From; b=L+UaJhPVXh5skMQ3z6GT/ulZtusR0GHAwQSAo2P2R6cOHF5iOlSA/qxmQvTas3tu8 EVXnCAR1RvDkayS7H3vak3P/SHESeyZ98d4Co5ii+VYtzvt6dB4FWbSaYUAB5sfUzO kY/1OUwtZsWNSGqdOnQhSXBulHyRRMKQGCMIAFJG65ygHP2GjXjighlzugUVqASaI0 7vi6J5QnFE7MIZ3osMLJgEm7zepK2418+oNRv9zdunxt8+1WHAvMP9IfmQrH9uU6/e dP7KGReUBFs0k7O7tG6sLZ5CBcIc+1IZPBDRn0Z3Fxw7UlqNR4+PAfe06w27ZzJ5y7 SjZy9XBAReviw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4LhR2c38nNz6tm9; Mon, 11 Jul 2022 16:23:52 +0200 (CEST) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: Max Nikulin Cc: orgmode Subject: Re: [possible patch] Basic fontspec code for LuaLaTeX and XelaTeX (was "LaTeX export: when is it more useful...") References: <87ilo7ztm3.fsf@posteo.net> <87ilo7tp78.fsf@tsdye.online> <87o7xy8t4g.fsf@posteo.net> <87a69i8ha1.fsf@posteo.net> <87tu7qnij4.fsf@posteo.net> <87r12ssonv.fsf_-_@posteo.net> Date: Mon, 11 Jul 2022 14:23:49 +0000 In-Reply-To: (Max Nikulin's message of "Mon, 11 Jul 2022 19:31:24 +0700") Message-ID: <87wncjg22y.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.65; envelope-from=maciaschain@posteo.net; helo=mout01.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1657552670; 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=nQlgLcxHkyqnkutVe9WxzJImz8TJpOCvyBhm7Y65aTY=; b=kP8VIWEaW2AJh16XScXuodHuElHe22LZpdWvkg9p4UBX2uhBzgVb/6vV45bNjIB5GVHl75 hiuq1LNN2bgaD5nlgZGMDNAPvfrbxWAe2VMPAavV69436aHqUGURgRz4b7NwywLlPmbMzs a4UYThoP7MZDc4i/L3mq2SGTClc3KeSnyXhGDSrLTXKt9EoFLhV/msGLCulSCVY92ZGDsr J9mLDKNbi+IDrMCqmGIEmryghD8bQuFwa8Mmpr81g7CLnqaupwIAqw3kMwcGEEUBQzwvyi JzV9znbndVMD+zUzpJyqazADVY1qJhL66mPYtE3MPJqUKddZ0ApHiANu5ZGCDQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1657552670; a=rsa-sha256; cv=none; b=t0Z3TuBXN6YQCaz8Ps9kotPaxqXDjOsGR1+3q5OdeXUMfIA8Yma/cK9nl6OafUsTR5DXuM KYGXGfFkp9f1mCwCmtE7MQQoGHi4u8J8MevtvQkr9UeLJ7CsuAjh+jt2CPSas7DGF6DKHS iYIUJgiH/LQggyQn6WszqgEqmyKHe8dqieeYCuh/SEv48VlEt90Uehe9fiHJGb9JbXemHS S/WpPH5kS5k+CFORH4W1OsxG0EyRgXYRK0y9R3sNBlnriEv3IXqw5P7zzs/nWxw7ReWmUJ xKtA1iO6DchLakR1FWvKqJ9NajsPcE1WohSTxGCzx621WpjODTTYInsAL9E2PA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=L+UaJhPV; 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.05 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=L+UaJhPV; 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: 59C331122 X-Spam-Score: -9.05 X-Migadu-Scanner: scn0.migadu.com X-TUID: Xr1U1cY29vRS Max Nikulin writes: >> \\relax >> \\else > > Is it the case of latex as the old engine with tex->dvi->ps workflow > besides new XeTeX and LuaTeX? However such engine is not used by Org. According to the iftex documentation (p. 2): \ifpdftex, \ifPDFTeX True if PDFTEX is in use (whether writing PDF or DVI), so this is true for documents processed with both the latex and pdflatex commands. So the code says: if pdfTeX is used, do nothing; else, add this (luatex and xetex related) code. >> \\usepackage{fontspec} >> \\usepackage{unicode-math} >> \\defaultfontfeatures{Scale=3DMatchLowercase} >> \\defaultfontfeatures[\\rmfamily]{Ligatures=3DTeX} >> \\setmainfont{%s} >> \\setsansfont{%s} >> \\setmonofont{%s} >> \\fi >> org-latex-fontspec-mainfont >> org-latex-fontspec-sansfont >> org-latex-fontspec-monofont) > > Too many variables to my taste. It can be single property list. If I > remember correctly, changing of mainfont requires setting of a > consistent font for mathematics, so more options may be required. Yes, that is true, sorry. I don't work with math. But: \setmathrm{=E2=9F=A8font name=E2=9F=A9} \setmathsf{=E2=9F=A8font name=E2=9F=A9} \setmathtt{=E2=9F=A8font name=E2=9F=A9} \setboldmathrm{=E2=9F=A8font name=E2=9F=A9} Now, weren't we talking about ensuring a minimum readability out of the box in case non-Latin characters are used? I assume that by default the mathematical notation is assured, although the default mathematical font may be typographically or aesthetically incompatible with the chosen text fonts. For example, Computer Modern and FreeSerif are antipodes in design. The first is a Didotian font and the second is a times style typeface. But I think that what is sought here is that certain (non latin) glyphs are represented in the PDF, beyond other typographical or aesthetic considerations. My idea here is that a) the user who doesn't want to mess with all these issues has a minimum of readability out of the box; b) the user who wants to have full control over the fontspec options has the possibility to do so; c) the user who does not want Org to write the preamble under any circumstances (that is, people like me), has the possibility of continuing doing so. > Finally, default value may be language-dependent or alternative font > set may be activated when non-latin characters are detected in the > document. If I had to choose between both options, I would prefer the second one. But don't you think it would be much simpler to ensure the readability of non-Latin characters (at least in a high percentage) by means of three default fonts (roman, sans, mono), and let the user who needs another font be able to choose it freely, simply by changing the value of those variables? Generally, users working with a certain non-Latin script are already used to using a certain font (I mean, they haven't suddenly teleported into the digital world), and they know perfectly well which fonts to use for their use case and their language. And for those users who are a bit more lost, a list of recommended fonts can be added to the documentation (many of which are already installed on their system or are included with TeX live). The other more extreme possibility is to default to GNU unifont (https://unifoundry.com/unifont/index.html). With this font I think the readability of almost everything is ensured (although it is a horrible font, but it is not the case here). Or Google's Noto Fonts (but I don't remember now what license terms those fonts are under). Best regards, Juan Manuel=20