From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id eHrWCdCI1WIxPwAAbAwnHQ (envelope-from ) for ; Mon, 18 Jul 2022 18:22:40 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id WOrgCdCI1WJFVgAA9RJhRA (envelope-from ) for ; Mon, 18 Jul 2022 18:22:40 +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 ABFF33D720 for ; Mon, 18 Jul 2022 18:22:39 +0200 (CEST) Received: from localhost ([::1]:52586 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oDTW2-0002xz-Re for larch@yhetil.org; Mon, 18 Jul 2022 12:22:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58154) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDTVP-0002wr-TW for emacs-orgmode@gnu.org; Mon, 18 Jul 2022 12:21:59 -0400 Received: from mout01.posteo.de ([185.67.36.65]:43133) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDTVN-0000iH-MP for emacs-orgmode@gnu.org; Mon, 18 Jul 2022 12:21:59 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 68088240028 for ; Mon, 18 Jul 2022 18:21:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1658161314; bh=hEZOeBiGWPC6J4tYNTfzZgLQrknCNCf2rxq2JVFdtiU=; h=From:To:Cc:Subject:Date:From; b=lJhmL69H1BivEk38zAzBAJUrB8la7SGQR2Nj1tSuma2x0Lhm2EntrvkOt34ybGmXl WDput0uW4wSCt2z99GO5WDsxOCf1FJx5COcTHzJNux3J43BHKefZ95MB2NWIZcApEf ptf59jql7kYGYEv2k1KNUxeBzxlnF2IUsyom0nLhiBTHCKyUgAjCLjgOdGPlskbcPT xlSEZmmLCEP/eG7OQXzrcUPwZJ//UU8gsygVoAZJw4zbOdxHoHn7Cgt9BWJLjFSGxC OoL4iyPChkowkHb6857ppfgWOBCgoIZ5kMod9/Ux3NdK0k3Zgd4dgBviNL2B/kQVBa 2L6i7hkybHSIA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4LmnKY5Ky3z9rxG; Mon, 18 Jul 2022 18:21:53 +0200 (CEST) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: Max Nikulin Cc: orgmode Subject: Re: [PATCH] ox-latex.el: Unify in one single list Babel and Polyglossia languages alists References: <87sfxiw2jp.fsf@posteo.net> <87czeduxnz.fsf@localhost> <87lesvlvos.fsf@posteo.net> <87bkto83n7.fsf@localhost> <87zgh7ssm1.fsf@posteo.net> <87y1wqhqcb.fsf@localhost> <87pmi2g18m.fsf@posteo.net> Date: Mon, 18 Jul 2022 16:21:51 +0000 In-Reply-To: (Max Nikulin's message of "Mon, 18 Jul 2022 22:37:20 +0700") Message-ID: <87k08av1b4.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=1658161359; 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=hEZOeBiGWPC6J4tYNTfzZgLQrknCNCf2rxq2JVFdtiU=; b=FBGXBMU5+HTZ2kKGVw0EiFJkmyGLgCmnKmcl2/YG+6j7MyXibz51SMotoj2ETUgRJskO1Y FSUoDSlr9I+3z1Xi3pg/P6ettD/qkM2J/m5AIw2dijQrP2bX37boN1xuB94jvspMuV2IXn Jezp5DJgox9CgespUAA7sEmTHdibauZnTBZmEjNv7KAYdnUEvQDB7r/EGKxkCsrz8EYhuD 4jZyz8dTVGW1bQIFN/zHR8b0aLRFvflu9x6yHPlyOl/sAAmxGuTS63PLyikDeWR65umMPM laGmgAXOqOtYIfUE2qsjkjdQFD49G7jm9N+NvWmiDHZNoZ4kfHk49P2WaGh8nw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1658161359; a=rsa-sha256; cv=none; b=eUpp4bxea8uAJlscGEZY8KSdmnqdHjVwBsl6rFpwnm3lwbiawAOSY4QvMONe+P49T8leO9 B0gS/FLTn5uRbpCWYqss7VSjhALNeTHqojR2iWymTG8feHOfxJk8WmRzxVr0iUH3bJuRvF Hg5qn3TD351OBv9j6b/cqAVU42WbuW8cpxEwb3tWnV4RRA9BHUgs/kcHIQldAQ2rzdF4SN 8TmrxOt7pBegLYgB+MvyjBmWpnhtqmzHVp8tFdiSEUT6Y9UKVqHrGOIOnXoNiSe6newMSK i7tO6jxvhxH11m6xhyTwkkCRhPzCS5Hqsxdn/IevDbzoHvwpfKLA/CMnulpvKw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=lJhmL69H; 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: -4.14 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=lJhmL69H; 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: ABFF33D720 X-Spam-Score: -4.14 X-Migadu-Scanner: scn1.migadu.com X-TUID: tj1OoNCfZyXY Max Nikulin writes: > On 18/07/2022 17:32, Juan Manuel Mac=C3=ADas wrote: >> For example, something like this: >> latex-lang: babel(sorbian) variant(upper) >> provide(hebrew:import,hyphenrules=3D+) options(bidi=3Ddefault), >> others(french,catalan) >> returns: >> \usepackage[french,catalan,uppersorbian,bidi=3Ddefault]{babel} >> \babelprovide[import,hyphenrules=3D+]{hebrew} > > I have never tried so complex babel configuration. Should "latex-lang" > options affect ox-latex in any way besides adding > \usepackage[...]{babel} and \babelprovide[...]{...}? If not, maybe it > is better to use I really think not. It's more of a way to have a more or less complete configuration of babel (including font options) in a single line and with a more org-centric syntax. The drawback is that the user would have to know in this case what he is putting, and know the babel options. > #+latex_header: \usepackage[french,catalan,uppersorbian,bidi=3Ddefault]{b= abel} > #+latex_header: \babelprovide[import,hyphenrules=3D+]{hebrew} That's what I would do as a user. I write all my preambles in pure LaTeX and don't let Org write anything before the \begin{document} :-) > directly and add default \usepackage[french]{babel} based on > "#+language:" only in the case when babel is not loaded through > "#+latex_header:". Currently such strategy is implemented for inputenc > or some other package. humm, what do you think about this idea?: If I'm not mistaken, the current behavior is as follows. If in the org document there is this: #+latex_header: \usepackage[english,french,AUTO]{babel} #+language: es it returns: \usepackage[english,french,spanish]{babel} But it could be extended to the new babel syntax, so that: #+latex_header: \usepackage[french,catalan,AUTO,bidi=3Ddefault]{babel} #+latex_header: \babelprovide[import,hyphenrules=3D+]{hebrew} #+language: es returns: \usepackage[french,catalan,spanish,bidi=3Ddefault]{babel} \babelprovide[import,hyphenrules=3D+]{hebrew} Or, if we want to load the main language via babelprovide (using an ini file instead of an ldf file): #+latex_header: \usepackage[french,catalan,spanish]{babel} #+latex_header: \babelprovide[main,import]{AUTO} #+language: ru returns: \usepackage[french,catalan,spanish]{babel} \babelprovide[main,import]{russian} (in this case french, catalan and spanish are the secondary languages) And this could be extended (in LuaTeX and XeTeX only) to the class options (which is a new babel feature): #+latex_class: article #+latex_class_options: [11pt,draft,AUTO] #+LaTeX_Header: \usepackage{babel} #+language: ru returns: \documentclass[11pt,draft,russian]{article} \usepackage{babel}