From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id EA0OL58G92RMogAA9RJhRA:P1 (envelope-from ) for ; Tue, 05 Sep 2023 12:44:47 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id EA0OL58G92RMogAA9RJhRA (envelope-from ) for ; Tue, 05 Sep 2023 12:44:47 +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 4297455B98 for ; Tue, 5 Sep 2023 12:44:47 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=QeoqeUAY; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1693910687; 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=nhJXuMt2bzJgLuJs5e3or/4WKs3iBSUJd0PffEZyhVw=; b=dbRE5iION+04nVd5Pz1QBk9TJnSA4TwnFCNMeduqrsP/GA2PE71G6F+kGeWAI8DQj2trqY FPE3wcuBqj/Ki0VjMQdZu7WSQA/Hk98UCG1GIF/Dc3sfKjhmdw+c6IBQ6NwZPuARsmwaE8 uCJLFVms0H3yU/Jp3bqeO1eB1Bl51gvo9M81Smo65OfFLJ/OGIG4BWMHk+HcqbTKZMU4gH B3sN6x0ODM0/mwvgiwzQswjBphvzVYrSW7hoWcB7/QKzgmK2AKfLzgcN9YdyIz/MLY6Yoq HhCVdCZsBDFl9Io1XdWJyWwukjAplTqg2bbt4+XzUi4VjWhuuvdoV41okxN/IA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1693910687; a=rsa-sha256; cv=none; b=WdrrhkQp6UumKXLf1lJHILpwOHBjlq6G6bf6BXeDtYOGSwkxzOirLJuFwpxPrQx8y5tSmc rNGo4+006T8HumyeDUAxgF9nCudN7hGsczC/ldJW3goLmP0VfcF6MwZWsPojoQqAdjfYeY 5wnCRoWx9xW1gweTkIMolnS9tfY9fEW5cpoEJppKV9HKEVyFqe2vT/wobJms3F9TggXrzY 87oXLQaM+zVcBNFFNGdlsLSSg2DoUI7+NWGHeLfmQgaQzUeUBs5plpVmj8TuZ4Y7b03Y8z wtkvdZKPlPDO4doddvT9nxMJfXMuRUzy0V3fphn0AahMEgPDEl3WpC1gqE3w+g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=QeoqeUAY; 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"; dmarc=pass (policy=none) header.from=posteo.net Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qdTXN-00056M-TP; Tue, 05 Sep 2023 06:44:01 -0400 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 1qdTXI-00055y-GI for emacs-orgmode@gnu.org; Tue, 05 Sep 2023 06:43:57 -0400 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 1qdTXD-0004Qh-Au for emacs-orgmode@gnu.org; Tue, 05 Sep 2023 06:43:56 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 01CF0240104 for ; Tue, 5 Sep 2023 12:43:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1693910627; bh=nhJXuMt2bzJgLuJs5e3or/4WKs3iBSUJd0PffEZyhVw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=QeoqeUAYQSy7RGcEKwxSYHwncmrHOPnuYr6c/1YyMxCKee9Rmwj8OQhNUltegode6 LAONN1Qazp8zT+c8WkeLnwavWHZ5iuXpzZu6Xwo3w2+7xayvKt+xYCY/qle3XocX32 HTZDxy6viXMV673AS9bKRaYDwH+7VMd36lmqyHbZP+9BMWoLDsOX6t+4Mu8LmooUgF Ou2Jw3V9yXygyBwScNa5mN8gjV0iDKNyW3fSUABGXe9UXQ4Y+gqSOUhPbeWsj+VUHh qdxqqzE+KVPHcjkkce8gPozMPjJ1Br4jNFTwnurkQz7ppHVxvxdnRRAlbaOVC4rnDg rJSgJbldgZdIg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Rg2DL1mPRz6tv5; Tue, 5 Sep 2023 12:43:46 +0200 (CEST) From: Ihor Radchenko To: Juan Manuel =?utf-8?Q?Mac=C3=ADas?= Cc: orgmode , Timothy Subject: Re: Fallback fonts in LaTeX export for non latin scripts In-Reply-To: <87bkehshni.fsf@posteo.net> References: <878r9t7x7y.fsf@posteo.net> <87wmxbvd60.fsf@localhost> <877cpb8mkd.fsf@posteo.net> <877cpatfol.fsf@localhost> <878r9ocl17.fsf@posteo.net> <87bkejoh4l.fsf@localhost> <87il8ra554.fsf@posteo.net> <87jzt6weae.fsf@localhost> <87bkehshni.fsf@posteo.net> Date: Tue, 05 Sep 2023 10:44:35 +0000 Message-ID: <87o7igvqzw.fsf@localhost> 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=yantar92@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_H5=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.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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx2.migadu.com X-Spam-Score: -9.44 X-Migadu-Queue-Id: 4297455B98 X-Migadu-Spam-Score: -9.44 X-TUID: 8/QAN1JbasoY Juan Manuel Mac=C3=ADas writes: >> The idea is to allow >> >> #+language: Austrian German, Greek >> as a valid specifier, in addition to >> >> #+language: de-at, el >> >> Then, across Org, we will make use of the standardized language >> abbreviations. > > In LaTeX, as I mentioned, things are complicated. There is Babel and > Polyglossia, and there is LuaTeX and XeTeX. In addition, there is also > pdfTeX, which is still the default engine and (to be honest) is the > engine used by a high percentage of LaTeX users. Although perhaps things > will change soon to the detriment of LuaTeX. Both babel and polyglossia > could be supported, but that means more work, more code, and more > complications. And we are not sure that polyglossia is no longer > maintained. After all, babel is the official LaTeX package for language > support, and polyglossia appeared at a time when babel had no support > for the new unicode engines. Now Babel supports all of that and is much > more powerful, but its interface has also grown in complexity. There is > the problem of the double syntax for loading languages: the old one, > which loads traditional ldf files, and the modern one (\babelprovide), > which loads languages using ini files. It is more powerful, with more > options, but has added more verbosity to babel. I have taken advantage > of \babelprovide, specifically its onchar=3Did fonts property, to > automatically apply fonts to non-Latin scripts. > ... > multilingual support that does not exist as such. It is more like font > support for non-Latin languages. And only in LaTeX, and specifically in > LuaLaTeX. Furthermore, the user could mix languages that in Babel are > loaded through ldf and others through ini files. For example, something > like this: > > #+language: spanish, english, french, russian > > in Babel it would be: > > \usepackage[english,french,spanish]{babel} > > and here we need babelprovide for the font (and load Russian via ini > file): > > \babelprovide[onchar=3Did fonts, import]{russian} > \babelfont[russian]{rm}[options]{somefont} > > Org would have to discern which name refers to a non-Latin language > (which wouldn't be complicated with the functionality you're working on) > and then apply the default font by adding a line with \babelprovide. > > Of course, English, French and Spanish can also be loaded via ini files: > > \babelprovide[main,import]{spanish} > \babelprovide[import]{french} > \babelprovide[import]{english} > > Even babel also supports: > > \usepackage[english,french,spanish,provide*=3D*]{babel} > > but in that line we cannot put Russian with onchar, etc. And then there > is pdfTeX, where only the classic babel syntax is allowed, without any > "*provide". Aren't we already handling this problem in `org-latex-make-preamble'? >> My idea was that >> >> #+language: ancientgreek russian arabic >> >> implies "use default font for arabic", unless #+latex_font is specified. > > This seems the most consistent to me for Org, but, as I mentioned in the > other email, I have some concerns. Currently, what we are talking about > is simply font support for non-Latin languages. If it is allowed, in the > current state of things, that #+language can accept a list of language > names, we can give the user a wrong perception of reality. That is: > In short, I find everything very confusing. I am not opposed to doing it > as you propose (in fact, it is the option I like the most, especially > when org is polyglot in the future), but I also want to warn of possible > complications. > > Therefore, since we are, for now, with fonts for non-Latin languages, I > think it should be made clear that the keyword is about fonts (and about > LuaLaTeX). Maybe through two keywords: > > #+lualatex_fonts_for: language(s) > #+lualatex_fonts[language(s)]: "font" options > > ? > > I think it's ugly, but I can't think of anything else. Maybe just #+lualatex_fonts[languages(s)]: default to force the default. > By the way, and as a side note, is it currently possible in Org to > define a keyword within :options-alist of the style #+foo[anything] or > would something like org-collect-keywords have to be modified? We will need to add things to `org-element-dual-keywords' and make sure that the code expects the keyword value to be a list, as returned by the parser. AFAIU, it should be enough. --=20 Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at