From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id OGirNkBs8GB9bAAAgWs5BA (envelope-from ) for ; Thu, 15 Jul 2021 19:11:28 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id wEmEMEBs8GBKfQAAB5/wlQ (envelope-from ) for ; Thu, 15 Jul 2021 17:11:28 +0000 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 4E078FA9C for ; Thu, 15 Jul 2021 19:11:28 +0200 (CEST) Received: from localhost ([::1]:37992 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m44tT-000220-AB for larch@yhetil.org; Thu, 15 Jul 2021 13:11:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60506) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m44sa-00021e-S8 for emacs-orgmode@gnu.org; Thu, 15 Jul 2021 13:10:32 -0400 Received: from ciao.gmane.io ([116.202.254.214]:35196) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m44sZ-0005ZN-6G for emacs-orgmode@gnu.org; Thu, 15 Jul 2021 13:10:32 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1m44sW-0002e0-AJ for emacs-orgmode@gnu.org; Thu, 15 Jul 2021 19:10:28 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Maxim Nikulin Subject: Re: org-mode export to (latex) PDF Date: Fri, 16 Jul 2021 00:10:19 +0700 Message-ID: References: <5A0DCCA5-7B49-46CC-BD49-B5F0D46DA5B8@traduction-libre.org> <87pmvq8ef2.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 In-Reply-To: Content-Language: en-US Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 28 X-Spam_score: 2.8 X-Spam_bar: ++ X-Spam_report: (2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, NICE_REPLY_A=-0.001, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1626369088; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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; bh=zXGyha3uUOtjOU7/Z0FsyT8wU6g9dz+oXDEOad16WCc=; b=ZSWCa9+b88cbFRg3cr0OZpReQ2wEIsTz4jjYVWOITbBEr54cIsFCyPDt75g6lFp32ZedEw +nxe8+hioLb2P3yGGC+rnQsbj9MT9dgj24NmKwIXHbnHWyutjeN5YW6Vxbg5I3pA43Cd1F oA/U6zBGNa2p6jeyXDQ45zus/znypLo9QDWkcB7mtGWW5Z0JYa9hz6/QX21I94hbT2sQSS oJ2wEBnNuIC7wdFz7qMcU0O2LgazsMHfd42psaO8CSaM5edt0N1Yh68vSR2UB8a4Uwesp9 kAd3hLOLOG7yNVENydzrHudcFVED5ekQn6N5cw6oui0Omq2MkUz8ctOehPoFqQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1626369088; a=rsa-sha256; cv=none; b=huNexdf3UL0j28vuLdCT/r3l+c89UHh+1FTvoTLCyAyEVqCladOC99aCzVIiAeknHznAhY L0LB42FEp1vu8GPMbHdJgVkC9+esJ4HFrdaL9byUxqFYSLW60Wu7AddFGlz9zd2aXcSl08 Xg29gSZlgZ2u9LgQtRGbw7LS1mz8+C1d21AyJ5Ah6iyMsn5F+/8UaX61FgWv0TPdAWFA2g jaLSLAT60OQeFKP00O31prWMUQFxOaRADI+vwl1TxDxaScu/008WYNFEW/VpoXpRG/fxn7 Jz2TR5tnDWDT+nYjU4Te9W+4DOHDSVNCdDSMwv3Gw85nD73cT/KmrIEWay6IPQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -1.80 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 4E078FA9C X-Spam-Score: -1.80 X-Migadu-Scanner: scn0.migadu.com X-TUID: rVLfwTWqVv09 On 15/07/2021 02:05, Stefan Nobis wrote: > Maxim Nikulin writes: > >> There are cm-super fonts for at least of 15 years. > > There are many tradeoffs in many aspects. No single font pleases > everyone. So you want to say: Your requirements are more > important/common/stylish/whatever that the requirements of other > people? I hope, it is possible to make Org export to PDF working out of the box for more people. Surprisingly Unicode TeX engines besides alleviating of some limitations of earlier implementation bring new burden. I see no problem to fix support of Cyrillic in PdfTeX. I have not realized if it can be done for LuaTeX or XeTeX despite original expectation that support of Unicode means that there should be no problem for any character of any script. I started to discuss Russian because it is a language for which most of problems are apparent for me. Perhaps a similar approach can be used for other scripts. Before UTF-8 became wide spread on Linux, there were guides how to enable support of Cyrillic in e.g. Netscape Navigator. Now such problems are forgotten. Is it achievable for TeX? In CSS it is possible to specify a list of fonts and a glyph is taken from the first font where it is present. Despite particular fonts have limited coverage, I see wide range of Unicode characters on web pages, that is why I am almost sure that system font libraries combine fonts. Do Unicode TeX engines support such combination of fonts? Is it efficient enough to be used by default? Is it possible to write reasonably complete config for such purpose? It is preferable to have such config as a LaTeX style file, but it may be implemented in Org code as well. There are two quite distinct cases: documents with carefully chosen fonts (e.g. a book) and everyday notes when particular font is not so important. For the former case a glyph taken from wrong font is a serious error. For the latter one, likely even low quality font is significantly better than a missed character. I think, both cases should be supported however. > [unicode-math] >> Thank you for the hint. Do you think Org should use it by default? >> Are there any caveats? > > Yes, unicode-math should be seen as must have for lualatex and xelatex > (if math is used). As far as I know there are no downsides and it > should be part of the default packages (but only for lualatex and > xelatex, not for pdflatex). Maybe it is possible to scan the document for presence of character from specific category, range, etc., to avoid overhead when the package is not necessary. >> Is it possible to detect lualatex and xelatex in runtime? > > Yes, that is possible. The LaTeX package iftex provides macros to > execute commands based on the running engine (see > https://www.ctan.org/pkg/iftex?lang=en). I mean detection if LuaLaTeX or XeLaTeX is usable from Org code. The intention is to minimize customization required before successful export. Ideally Org should guess reasonable configuration form content of the document and available external tools (and maybe freeze it by adding properties to the document to make next compilations faster). Certainly user should have a way to force fixed values by disabling autoconfiguration as a whole or only for particular settings. >> Is it possible to provide reasonable defaults for fonts? > > I do not think so. You want Cyrillic. But what about Japanese, > Chinese, Devanagari, Tamil, Arabic etc? I doubt that there exists a > single font that supports all these scripts satisfactorily. I hope, single font is not necessary since other applications can show all scripts simultaneously. Of course, my example was not complete, feel free to extend it, e.g. Randomly chosen examples: "日本", "多喝水", "📞".