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 wIVvHfM13WL90gAAbAwnHQ (envelope-from ) for ; Sun, 24 Jul 2022 14:07:15 +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 0MVWHfM13WJfpwAA9RJhRA (envelope-from ) for ; Sun, 24 Jul 2022 14:07:15 +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 2F31B17302 for ; Sun, 24 Jul 2022 14:07:15 +0200 (CEST) Received: from localhost ([::1]:40092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFaOA-0004nF-8N for larch@yhetil.org; Sun, 24 Jul 2022 08:07:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54010) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFaN6-0004lz-SV for emacs-orgmode@gnu.org; Sun, 24 Jul 2022 08:06:08 -0400 Received: from mout01.posteo.de ([185.67.36.65]:45899) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFaN3-0005iH-8d for emacs-orgmode@gnu.org; Sun, 24 Jul 2022 08:06:08 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 4BD45240029 for ; Sun, 24 Jul 2022 14:06:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1658664363; bh=rDjVJ1OZl8od6wq+U4urvKRDfQx+585Pj+ayqjYqk1o=; h=From:To:Cc:Subject:Date:From; b=IMGWTampjW9EVg3uUoPpB0u3R2N+UhRxzReqfQkrN4auvUUJa+Y/n2zAh2W31nS1s YQ8YeA07Y2Z74n8A8fWXsDhHEV8Lbmc9ItIV+dxSXK+51P2r2eNcrgCuHMHNE/XvYn YlWTbSy6d71f+kU92lcrR3t3oRye4jVT3MnFNslmxkDxBOvuKHP/w74CeONRoke5zm 0dcNxdntPKtI3SDJKcPBtsCal7ih1u0d6b/BaphLzP5qyoM3bk4nLYm8Qn6sCvPysc +QtZu9niEef6hHg7DpQPCgPZrRJFlsVWiMtpgSM0NW3SOPLqix67iOtl8Rygy0imYP a1jaEurm3LXhQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4LrMMZ2Bjtz9rxQ; Sun, 24 Jul 2022 14:06:02 +0200 (CEST) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: Ihor Radchenko Cc: orgmode , Maxim Nikulin Subject: Improvements in the default LaTeX preamble: templates? (was: [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> <87v8rtno2j.fsf@posteo.net> <87h73c527u.fsf@posteo.net> <87mtd3a2uw.fsf@posteo.net> <87wnc6wk3n.fsf@posteo.net> <87v8rp48i5.fsf@posteo.net> <87r12d44ws.fsf@posteo.net> <8735erpx6z.fsf_-_@posteo.net> Date: Sun, 24 Jul 2022 12:06:00 +0000 In-Reply-To: <8735erpx6z.fsf_-_@posteo.net> ("Juan Manuel =?utf-8?Q?Mac?= =?utf-8?Q?=C3=ADas=22's?= message of "Sat, 23 Jul 2022 19:15:32 +0200") Message-ID: <87tu76k95j.fsf_-_@posteo.net> MIME-Version: 1.0 Content-Type: text/plain 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=1658664435; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=6Zb/SPkGv4HN2htw1wUWQ2A++Rn1LlWi8dzmwa0cguE=; b=lrVItsgSfm2OLc8NXUK7Yqj0OTirM8UltyJCu4PJqnakjZC2a+eNSgJcfe+DUbTIp4iJu1 IbTk6trtRtbKfJxESjFpuAul/KkKw6ajGrkwtmA6uPeV6NLvz1rfy7/BMyyN4//qq5zpUy EAYSNSW1qEaUF/euPP5T3DocMFUyspohvkJ1b1gq6kxSNEQmtQn6Vv52heGvPj75I4hybV Bkmypg3/42XKgkhfcIH66tGBBg+06o3uqWUgbWrViDaRJ+O98ay49/zTjViAWwD/8Q5ixr oCwtwdrD+q5xilNakSu7BO9uhPp6Hy+bpuIMtpPSwBeDRnfdmoVSUlQr2kr5cQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1658664435; a=rsa-sha256; cv=none; b=ZTcOpOzINNNCOCHSYs4Sfnb6CWvqQQYSGNd5Qzv1agfiUlPL7tM3b/BBJuy/4JgiI+s3dH UANuICBPPnr1rtZwSNaE+pmmOhwM+qZPJ20oRCr6m3UVCpSf/9qLk3yuLOo6ToEYFXis0R gc2dg2NgSHgf24TKHtNhNBvqANvGXohUx8mQ+4l/G/hDf0l6T4DdtJItynW5b2Fzoia5wZ d+zkW0pefauLLvhD6Izah0//LCcj4EldsOuvaDtReio/1b1eU2XNUSafCAuSchUIY7tnAV 418gPAVFkUUfJxQertFO7zWElFIf4tKcafIZU/Vlp3JV5ZUeIY/R36bo08ZkRg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=IMGWTamp; 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: -5.93 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=IMGWTamp; 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: 2F31B17302 X-Spam-Score: -5.93 X-Migadu-Scanner: scn0.migadu.com X-TUID: cClJRHtWoO5c Ihor Radchenko writes: > Adding things like paper size is a much more debatable topic. > Considering the number of expected developments in this area, including > the earlier discussion on XeLaTeX/LuaTeX and preamble generation by TEC, > adding the new specific defaults will need to be a subject of extensive > discussion and testing. I do not see much point delaying this patch, > which provides an immediate improvement in the codebase, until we > complete all that. I agree that adding more elements to the standard preamble is a complex matter. LaTeX is already horribly complex and multiple, and it is difficult to satisfy all kinds of users with a standard code. It occurred to me that an alternative to modifying Org's code in this regard could be to have some kind of "LaTeX template library". I think Pandoc has something similar too, if I remember correctly. Those templates could be on Org or provided by third parties somewhere else, like Worg. In Org, we also have a great system for creating LaTeX documents templates, which is the org-latex-classes list. A large number of elements could be defined in a 'single' class for any type of document. Some time ago I shared here a function I wrote (it's a bit raw and little tested) to be able to convert a LaTeX document (the preamble) into a lisp expression to be added to org-latex-classes: https://list.orgmode.org/87czgly8x8.fsf@posteo.net/ On the one hand Org would offer a more or less basic preamble out of the box and on the other hand there could be a "org-latex-classes library" (extensible by users) that would support a multitude of LaTeX document types or users. This would include preamble types with a bunch of components: page layout, fonts, lua code, custom LaTeX commands, custom lua functions, article types, book types, etc. It would suffice to add: #+latex_class: foo and the magic is done. Best regards, Juan Manuel