From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id QNccElRyFWVrWQEAG6o9tA:P1 (envelope-from ) for ; Thu, 28 Sep 2023 14:32:20 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id QNccElRyFWVrWQEAG6o9tA (envelope-from ) for ; Thu, 28 Sep 2023 14:32:20 +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 9D44638F7E for ; Thu, 28 Sep 2023 14:32:19 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=G5nuMWh7; 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=1695904340; 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=YaSElmT05kEK+0fvTKw4Uoo8DsMpIOSBIlhsV7V+/DY=; b=MHb7Gc/GABPleVYi6RYC4OGiiVRvLeCsetS+8Xj98ocP9zhdXOSe75da5xJscEClTSanry aIsyyHZNKwiA6EpevM6QBfgORNSGydiOmJie+c/dQynYHr4IvpF1B8j4ZeUfTEiodWRrvc sB0mpG2ZEnbxYkOQBbkMBEZdR2r3t5NiFEvd3C4Ym37pBX+TpKI1QcDd1iwaDMR4VpOnCR iSLX8+dcfW/WbaDvTy4I8qjc1TrofjZ8d28Gj5O6WOswmPVIqIOn55UIaXFw+Yzpko6yw5 DXLAsBC0ETxsp8KM13YsbLDpnrIRHv5d71IDg5rBJAChBXzvK/Th/kFbmhhYQA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1695904340; a=rsa-sha256; cv=none; b=KPApHyX2C0zrsEoqGcYjRCQ5ngNBcG8gfRKR/5hOHZ9INUZuz7oPEAW8Evya8O9D/pu5Rz 8VDMsCHETcznO2sXeZIZKPyDJFARLOEZ4bQ0Xa4gsJWO9gQ9LteNKbd/h3eTlbFVIGf+co 9Ms/4u7sp0Ni+WPoOcLCGpPc2X6TX2nD5Sm3OFZrWql3/EhNBh11nNZ7bvqqLy7S7f5UGk 3oXtoZxrGzrPWVSLyhg4EXHE4cHTCFrWkM6x2BEQtXYHrgS8MlwmPDINxtCqjcoqES6zrf 3kSsSgL97nTW5x12vTGQmzitRNyKbcFkvPyAdnI9H9EUIEcF/mpEf5zHctPnaA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=G5nuMWh7; 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 1qlqAs-0000nu-NA; Thu, 28 Sep 2023 08:31:22 -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 1qlqAq-0000nb-90 for emacs-orgmode@gnu.org; Thu, 28 Sep 2023 08:31:20 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qlqAn-0000rL-Pm for emacs-orgmode@gnu.org; Thu, 28 Sep 2023 08:31:19 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 1B27C240028 for ; Thu, 28 Sep 2023 14:31:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1695904274; bh=YaSElmT05kEK+0fvTKw4Uoo8DsMpIOSBIlhsV7V+/DY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=G5nuMWh7KKDlZG3XtnLig8iLKVMYulqMykaOD5zJFLMTavxpcMi+8OG7wq9H7vUpb N+OOMMRD7ikRYLuubC7Ua4O7/r3ar4rE0Rmpm8YsInYEcCVM33WkShKHSaXA55zfew vMZ8jKsTHM5UbEMv4wKk+N/b0lSMMCTtVpPG1WtKpeuTWOqSOPLSIXEiKE1fHCfXFv T0pUIrBYrRSKa/7FC1VJNo4hC7nBLx8gL5MT0zSPSL/CDqCMm5f9rLcDI7+vmCp+hg Bm0Dvs2Hu6i21xKsAomQtce6LBQd+DVgxxQFwTT444PhONmLgyHsCsHMi0wAssT5BB HefIa2VFj9i0Q== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4RxCWj3qlSz6v4S; Thu, 28 Sep 2023 14:31:13 +0200 (CEST) From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= To: Max Nikulin Cc: emacs-orgmode@gnu.org Subject: Re: [patch] ox-latex.el: Add `LATEX_PRE_HEADER' keyword In-Reply-To: (Max Nikulin's message of "Thu, 28 Sep 2023 17:07:41 +0700") References: <874jjuj8vu.fsf@posteo.net> <87pm2776qq.fsf@posteo.net> <875y3yytp4.fsf@posteo.net> <87r0ml3oax.fsf@tsdye.online> <87lecsvjdd.fsf@posteo.net> Date: Thu, 28 Sep 2023 12:31:11 +0000 Message-ID: <871qeiscmo.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, 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-Spam-Score: -6.97 X-Migadu-Spam-Score: -6.97 X-Migadu-Scanner: mx1.migadu.com X-Migadu-Queue-Id: 9D44638F7E X-TUID: +E0JsdDwAATf Max Nikulin writes: > LaTeX code may be inserted > - before \DocumentMetadata > - between \DocumentMetadata and \documentclass > - between \documentclass and preamble added by Org > - between Org preamble and \begin{document} The first two cases can be solved perfectly with LaTeX_pre_header, without having to complicate your life further. > Since ordering is important [...] Starting with \documentclass, the order is important in certain cases and not so important in others. And, anyway, you can always use a hook like \AtBegin... \AtEnd..., etc. And if users want to have complete control over the preamble (that is, everything before \begin{document}), they can always define a new class (in Org terminology) or write a preamble or a sty file in a separate Org document using org-babel and literary programming. In a job I'm doing now my preamble has 1736 lines. Writing it with org-babel is quite comfortable. In short, I think (IMHO) Org already has enough resources for those situations. > I consider \begin{filecontents*}{\jobname.xmpdata} as an acceptable > (but perhaps fragile) hack for LaTeX-first document. During export of > Org file, this file should be written directly with values from Org > metadata. I think I should insist on what I said in my previous message, with a copy/paste: The thing is that here it is not a question of whether something can be done in this way or in another better way. This is how a given package recommends doing it. If the user wants to use that specific package, she/he will have to follow these instructions. It's more. I am thinking, for example, of the case in which the user has to obtain a * tex file, not a PDF, because she/he is collaborating with more people who do not use Org, but do use that code in the * tex document. Apart from that, since any code (except \usepackage) is allowed before \documentclass, I think that the user should have the possibility (and the freedom) to enter in their *tex documents whatever they want in that place, including comments, luacode, shebangs, etc. --=20 Juan Manuel Mac=C3=ADas https://juanmanuelmacias.com https://lunotipia.juanmanuelmacias.com https://gnutas.juanmanuelmacias.com