From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id gGOuHQfp8mC8cQAAgWs5BA (envelope-from ) for ; Sat, 17 Jul 2021 16:28:23 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id GJhKGQfp8mAAMQAAbx9fmQ (envelope-from ) for ; Sat, 17 Jul 2021 14:28:23 +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 A830017890 for ; Sat, 17 Jul 2021 16:28:22 +0200 (CEST) Received: from localhost ([::1]:48328 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m4lIj-000864-OZ for larch@yhetil.org; Sat, 17 Jul 2021 10:28:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35608) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m4lI5-00085w-3X for emacs-orgmode@gnu.org; Sat, 17 Jul 2021 10:27:41 -0400 Received: from mout02.posteo.de ([185.67.36.66]:42511) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m4lI1-0007xP-RP for emacs-orgmode@gnu.org; Sat, 17 Jul 2021 10:27:40 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id D01DD240105 for ; Sat, 17 Jul 2021 16:27:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1626532050; bh=Dy9MkX9MPAcFokE6UBgWSSdCuhn3psAkm8SFMII0xVU=; h=From:To:Cc:Subject:Date:From; b=hnXl7KRaP1kRhE7AmxC+V2AWqnyWHQdIPYXqFrDzwbbq7zMEQLd/axqRqNAXQ217T fmf2sujcCUcocKsDE1Nmif1TaGn+wwl7cmH8e11GQxzZQLYXifdfyI1auq7mpy7fCu QcjxOZNHo9H29yA73yoN/ydmL1lo6gPX2E2OO7rtq+thFEgn5LKTpoF/l7CreC7S9N Rw818WDYRKScPtCPq274ObyXP47dfWYooHkodPCdl3bZIaQooApglYoS+AIXGleaZX XJQ+22nCOmj+0iNUHBaHiO0MaHURUPlvvM6gYbP5B90C0RKsxITTrhUe5In1qQ2PTF qntek9CdVMhtg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4GRr6V2cs7z9rxP; Sat, 17 Jul 2021 16:27:30 +0200 (CEST) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: Maxim Nikulin Subject: Re: org-mode export to (latex) PDF References: <5A0DCCA5-7B49-46CC-BD49-B5F0D46DA5B8@traduction-libre.org> <87pmvq8ef2.fsf@posteo.net> <87lf67tlgk.fsf@posteo.net> <87eebyds57.fsf@posteo.net> Date: Sat, 17 Jul 2021 14:27:29 +0000 In-Reply-To: (Maxim Nikulin's message of "Sat, 17 Jul 2021 19:35:57 +0700") Message-ID: <87h7gtm2we.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: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=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.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: orgmode 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=1626532102; 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=hMclXinNMQTYnDUjiQATGB7B03XibQnckNs8NeUDEfU=; b=tqfYLBxlG3+a0+mUen+dMLYPgfOV0dSkK4TLvcj/EhkHXnkPRzY0SMkrhGj0R5JjyELCAe HBrfnZOL/uO0Ctxv+7pFH6JPJKQmPUemK40nLIKRDxFfPGeoukV3lhER+b+QsZNXD1K+32 FUydHuIS8ewjQHOUaaocbnNMGMsL3aW4c2jEGD3Bg5e1Z70cdv8XAymhKNHT5u7fLPn+Qa 7kD5NcA/v3wE7/YX+XE2PQVM9vwd+hSTLiV6w4Z3RwmQp6SlQvmPaEGHzDASbtyr12wkEn a3hk/rOEzL+ppezU3Y/tgtJgA7eR65toOKBzeu91Y0ew0OdbxYcYmVxd0jWFYA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1626532102; a=rsa-sha256; cv=none; b=F7LHX5D6bLf8asgs7uvg5iAzmOrEoi2M0co/cuYiplf3KjdlbbsJlDTZsA8vX/EFcpeY+f bzOfitlAUVu/7K2xY9SwQG6QrJIfA2PCLQBtmmy9x5U0HOvF674tJQJSPmR9fS348wiA5d wesviQfmNvfrs/qbofrX+OU+hJG60O4mc/acU7kgI1j/rLpOYrSXT+Gt/fOVHsscLBAFjf W+NbaKQo4Beoqk4nFXMlUL/xxJCKiXu2Ok+39LOLf4/UDcjQjipB8ZUtsZ/gQdwBgqL55C JKnZfPpeni3U1NytiQqMuffipSU3/ZSn4em29UuufkTsIKTU9SMRwzWip0Wc3Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=hnXl7KRa; 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: -3.11 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=hnXl7KRa; dmarc=pass (policy=none) header.from=posteo.net; 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: A830017890 X-Spam-Score: -3.11 X-Migadu-Scanner: scn0.migadu.com X-TUID: l3o+Uco3e16r Hi Maxim, I think the problem is not the fact that I may be inclined towards book typesetting but that TeX itself and its workflow is inclined towards book typesetting. This fact is something that must be taken into account and that many LaTeX users sometimes forget. The concept of a 'fallback font' is still something exotic for the TeX working method, despite that LuaTeX can access TeX primitives using scripting in lua and can achieve things like that, at the cost of resources. For example, the fontspec package provides the conditional \IfFontExists{font}{True code}{False code} which consumes a lot of resources. Anyway, I would dare to recommend these two possibilities: a) If you want to define a list of fallback fonts for the LaTeX process, IMHO should be done org-centric with Elisp (something for pdfTeX, XeTeX and LuaTeX. I'm afraid this would be a lot of work and too much cholesterol for Org Mode, though). b) However, my preference is something that has already been comented in this thread: add to the documentation (or to Worg web site) a (not too long) list of recommended fonts for different languages: of course, fonts that are freely licensed and accessible to everyone. In any collaborative work in LaTeX I find it's much more simple to share an easily accessible and free (as in freedom) font than to add a list of fallback fonts to the documents via code (a true bloat for TeX). The LaTeX Font Catalogue includes lots of very good quality fonts. For example, TeX Live includes an excellent font with support for Greek, Cyrillic and Linguistics: Old Standard, originally designed by prof. Alexey Kryukov and currently maintained by Robert Alessi: https://www.ctan.org/pkg/oldstandard (I don't work on Cyrillic and I can not comment on that aspect: I use this font more for Greek; but it is often said that Old Standard is one of the best and most documented options to represent Cyrillic). Best regards, Juan Manuel=20 Maxim Nikulin writes: > On 17/07/2021 01:34, Juan Manuel Mac=C3=ADas wrote: >> Maxim Nikulin writes: >>=20 >>> I think that low level implementation in browser or in some underlying >>> library is much faster >>> >>>
>>>
LM Roman 12
>>>
abc =D0=B0=D0=B1=D0=B2= =E2=80=A6=D1=81
>>>
LM Roman 12, CMU Serif
>>>
abc =D0=B0= =D0=B1=D0=B2=E2=80=A6=D1=81
>>>
>> 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=20 > times in this thread that there is another case, namely routine quick > notes. Such documents have another balance concerning time required to=20 > get acceptable result. TeX takes responsibility for a lot of defaults > such as what spaces should be added around "=3D" and what ones around=20 > 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=20 > 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=20 > 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,=20 > 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=20 > 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=3Dharf;script=3Dsc;", > "file:/usr/lib/firefox/fonts/TwemojiMozilla.ttf:mode=3Dharf;" > }) > } > % TwemojiMozilla is not shown by viewers, visible in pdftotext > %"Noto Color Emoji:mode=3Dharf;" > % or > %"file:/usr/share/fonts/truetype/noto/NotoColorEmoji.ttf:mode=3Dhar= f;" > % % ! error: (file /usr/share/fonts/truetype/noto/NotoColorEmoji.ttf) > (ttf): loca > % table not found > % ! =3D=3D> Fatal error occurred, no output PDF file produced! > \setmainfont{CMU Serif}[RawFeature=3D{fallback=3Dseriffallback}] > > \directlua{luaotfload.add_fallback > ("sansfallback", > { > "Noto Sans CJK SC:mode=3Dharf;script=3Dsc;", > "file:/usr/lib/firefox/fonts/TwemojiMozilla.ttf:mode=3Dharf;" > }) > } > \setsansfont{CMU Sans Serif}[RawFeature=3D{fallback=3Dsansfallback}] > > \directlua{luaotfload.add_fallback > ("monofallback", > { > "Noto Sans Mono CJK SC:mode=3Dharf;script=3Dsc;", > "file:/usr/lib/firefox/fonts/TwemojiMozilla.ttf:mode=3Dharf;" > }) > } > \setmonofont{CMU Typewriter Text}[RawFeature=3D{fallback=3Dmonofallback}] > \begin{document} > Test=C2=B9 of superscript and =C2=BD fraction. > > \textbf{=C2=AB=D0=A2=D0=B5=D0=BE=D1=80=D0=B5=D0=BC=D0=B0=C2=BB.} \emph{= =D0=9F=D1=83=D1=81=D1=82=D1=8C} $=CE=B1 =E2=86=92 =E2=88=9E$ =D0=B8 $\beta = \to \infty$. > > \verb=3D=D0=9A=D0=B0=D1=82=D0=B5=D1=82=3D =D0=B8 \textsf{=D0=B3=D0=B8=D0= =BF=D0=BE=D1=82=D0=B5=D0=BD=D1=83=D0=B7=D0=B0}. > > =C3=85=C3=A5. Text Greek =CE=B1. > > Text utf8x =E2=89=A0 utf8 and math $utf8x =E2=89=A0 utf8$. > > Randomly chosen examples: "=E6=97=A5=E6=9C=AC", "=E5=A4=9A=E5=96=9D=E6=B0= =B4", "=F0=9F=93=9E". > > \verb=3DRandomly chosen examples: "=E6=97=A5=E6=9C=AC", "=E5=A4=9A=E5=96= =9D=E6=B0=B4", "=F0=9F=93=9E".=3D > \end{document} > >