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 oJjBHufO8mCJRgAAgWs5BA (envelope-from ) for ; Sat, 17 Jul 2021 14:36:55 +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 EFt/GufO8mBSZgAAB5/wlQ (envelope-from ) for ; Sat, 17 Jul 2021 12:36:55 +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 C0C191A543 for ; Sat, 17 Jul 2021 14:36:54 +0200 (CEST) Received: from localhost ([::1]:60524 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m4jYr-00038Y-3b for larch@yhetil.org; Sat, 17 Jul 2021 08:36:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51328) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m4jYB-00038P-O3 for emacs-orgmode@gnu.org; Sat, 17 Jul 2021 08:36:11 -0400 Received: from ciao.gmane.io ([116.202.254.214]:60204) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m4jY9-0002Sf-UK for emacs-orgmode@gnu.org; Sat, 17 Jul 2021 08:36:11 -0400 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1m4jY7-00067s-Ge for emacs-orgmode@gnu.org; Sat, 17 Jul 2021 14:36:07 +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: Sat, 17 Jul 2021 19:35:57 +0700 Message-ID: References: <5A0DCCA5-7B49-46CC-BD49-B5F0D46DA5B8@traduction-libre.org> <87pmvq8ef2.fsf@posteo.net> <87lf67tlgk.fsf@posteo.net> <87eebyds57.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: <87eebyds57.fsf@posteo.net> 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.249, 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=1626525414; 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=KHcPJsErFCBI5cEseTo6MtOQI+qQMBMAOokMYbpAHkE=; b=HV4ACTYWYBRRm6Zq5qY+VCfBVzYezJnMURyBBmlxPL/kvpKbOiyaVelJmsn1sV6DhEVnL4 N9fx1wjGrtm9F11O767iWugRE6run7lbr9MoMbU2h+GArhNesVEibQHKTJvToYLclWpvE0 Q2pa33dsGAzs7ntt+w2NBljFa0QuaSDMat2yfy6czweDQ55F9yNXKcdZph++sVIXqe3DU6 dp1m9E7phDPiSIaP35UtRr9C0l8yOXTYlGysLyGoZGPnFVxszKYqpNr9LVGx3rhP8XcL91 vPHZWymAiqKzTrVATDJSdF8G+PWMPVXdtoHpzA/dCFskQ47NxmBR7Or3Wio3yw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1626525414; a=rsa-sha256; cv=none; b=kHvRwnhI85cF1g8w9OHZdEh8La+MUKMvtph9AFPc6+bVf1O0lJhHO1KyJDg/VLdgOGlhO0 WT1TanAt5hRuGoOJvqC9LRBGxya7T/x9Sdkr2MpYiguguRqpu7qq1nScXmGznAju/P7oEK tQmNFQe4T4mbwfmESYCCvU++EjVzSlva1qtWiYfLMgMyB2Z0yRkM6rCYX90Gm+EL3A4kBZ eYsc7KbZqV3QZeTdCSf3pOgfagSEbFszheurrmQLQ27CD9dzXyivvIeOah4dZR+OVXL/Zt APHcoOkdp7m1dOL7HdaltO8BtIjJItroDhpLiOe68UhO4PNxdWZ5ToaAk8/pWQ== 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.81 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: C0C191A543 X-Spam-Score: -1.81 X-Migadu-Scanner: scn0.migadu.com X-TUID: dPyKRUDLVwiU On 17/07/2021 01:34, Juan Manuel Macías wrote: > Maxim Nikulin writes: > >> I think that low level implementation in browser or in some underlying >> library is much faster >> >>
>>
LM Roman 12
>>
abc абв…с
>>
LM Roman 12, CMU Serif
>>
abc абв…с
>>
> > They are two different scenarios: web publishing and book typesetting Juan Manuel, it seems you are too inclined to book typesetting. It is important case and it should be supported by org. I have repeated two times in this thread that there is another case, namely routine quick notes. Such documents have another balance concerning time required to get acceptable result. TeX takes responsibility for a lot of defaults such as what spaces should be added around "=" and what ones around right angle bracket. Users do not need to make decisions concerning such design details to get accurately typeset equations. At the age of custom charsets (often 8bit) and encodings the problem of multilingual texts was obvious. Unicode and UTF-8 alleviate many issues. It happened that Cyrillic is an edge case for Unicode TeX engines. Since ~2000 it works out of the box for LaTeX and PdfLaTeX. Last years I did not need to adjust config files and regenerate formats. Hyphenation, default fonts (OK, "apt install cm-super" to avoid rasterized fonts is a bit behind defaults though no manual config is required) just work. Each document needs a few universal lines to setup Russian. Some users may have specific style files but generally source documents are quite portable. Default fonts for LuaTeX and XeTeX do not include Cyrillic any more. Every user have to do a decision which fonts should be used even if one does not care concerning particular fonts. It increases probability to get a file with font configuration that is specific to Mac or Windows. I do not actively use characters from other Unicode planes, however sometimes I do it for fun. Getting them completely missing is less preferred than displaying them with low quality font. Specifying all fonts requires lengthy config, probably different for LuaTeX and XeTeX. At first it is necessary to realize which fonts are available for particular glyph. Finally it makes *source* document less portable. "font-family: 'LM Roman 12', 'CMU Serif'" above is a dumb example of what I consider relatively high-level config for routine documents that do not need to be handcrafted. Unavailable glyph or even font is not an error, it just causes lookup of candidates in the following items. For TeX maybe it is reasonable to consider fallback to complete set of fonts at ones (roman + mono + math) if such combination is available. > If I want to use the GFS Porson as italics from > another font, a Didot typeface for example, I can do this: If it is not a book or at the stage of early draft another scenario is possible. Text should just appear in the compiled document, particular font does not matter, its choice is postponed since text content has higher priority. Minimal setup in invaluable. At least with minimal examples I faced another issue: characters silently disappears, no warning is generated. Adding babel changes it, but I still believe that especially for documents with carefully chosen fonts. It is a serious hidden error to get "invalid char glyph" instead of all missed characters. > [1] If you want to have fallback fonts, you can also do it in > LuaTeX by adding some Lua code: > https://tex.stackexchange.com/questions/514940/define-fallback-font-for-missing-glyphs-in-lualatex Would you recommend such code as default for Org? Let's assume that some information concerning system fonts are available. I suspect, the accepted answer is not fool-proof. In addition, XeLaTeX requires something different. luaotfload provides fallback feature close to what I expect, however it is necessary to explicitly specify script that I would prefer to avoid. Moreover it significantly increases compilation time. Sometimes LuaLaTeX starts to eat CPU with no progress, emoji does not work for some reason. I am unsure concerning particular "Noto Sans CJK" since several ones are available. \documentclass{article} \usepackage{fontspec} \usepackage{unicode-math} \directlua{luaotfload.add_fallback ("seriffallback", { "Noto Serif CJK SC:mode=harf;script=sc;", "file:/usr/lib/firefox/fonts/TwemojiMozilla.ttf:mode=harf;" }) } % TwemojiMozilla is not shown by viewers, visible in pdftotext %"Noto Color Emoji:mode=harf;" % or %"file:/usr/share/fonts/truetype/noto/NotoColorEmoji.ttf:mode=harf;" % Fatal error occurred, no output PDF file produced! \setmainfont{CMU Serif}[RawFeature={fallback=seriffallback}] \directlua{luaotfload.add_fallback ("sansfallback", { "Noto Sans CJK SC:mode=harf;script=sc;", "file:/usr/lib/firefox/fonts/TwemojiMozilla.ttf:mode=harf;" }) } \setsansfont{CMU Sans Serif}[RawFeature={fallback=sansfallback}] \directlua{luaotfload.add_fallback ("monofallback", { "Noto Sans Mono CJK SC:mode=harf;script=sc;", "file:/usr/lib/firefox/fonts/TwemojiMozilla.ttf:mode=harf;" }) } \setmonofont{CMU Typewriter Text}[RawFeature={fallback=monofallback}] \begin{document} Test¹ of superscript and ½ fraction. \textbf{«Теорема».} \emph{Пусть} $α → ∞$ и $\beta \to \infty$. \verb=Катет= и \textsf{гипотенуза}. Åå. Text Greek α. Text utf8x ≠ utf8 and math $utf8x ≠ utf8$. Randomly chosen examples: "日本", "多喝水", "📞". \verb=Randomly chosen examples: "日本", "多喝水", "📞".= \end{document}