From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>
Received: from mp10.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 sB2PFlaDEGXlzQAAG6o9tA:P1
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Sun, 24 Sep 2023 20:43:34 +0200
Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by mp10.migadu.com with LMTPS
	id sB2PFlaDEGXlzQAAG6o9tA
	(envelope-from <emacs-orgmode-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Sun, 24 Sep 2023 20:43:34 +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 03A78305FC
	for <larch@yhetil.org>; Sun, 24 Sep 2023 20:43:33 +0200 (CEST)
Authentication-Results: aspmx1.migadu.com;
	dkim=none;
	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=fail reason="SPF not aligned (strict), No valid DKIM" header.from=posteo.net (policy=none)
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org;
	s=key1; t=1695581014;
	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;
	bh=2tvm8bUlZdTgnhE0Z21RAEkEA2xBp8NknHqR5g4G1gE=;
	b=omETplJKX/Ma+9W/WAca+R0WeevFMlyT9MjzylNEZHIiKbXIo5JPKuEjPeH49WiwiaJ5m7
	UmitvxoZr1pMem5vrEjW0rxOIqOuT8yiAWtPBZ3Ju9OnY8bEIr/sr7EQZiKa/mCYP4xT/s
	sv75OqllOTZc2l7Wqfq7m+Ij0S2ASCN6oUL4gQKZeH7hmUA4Z7BNG1kOyr7EMo72x9ceVm
	HkpUwJRCtdlrHJgevKLYIRVsYhEjrYSRVrjLCS1K91D0DPLu6roQexcRqZS+2EnVBZi5rg
	wOQmIPqlu3J5AeciEVITJx+gGNygQLHqWow8Fe9fGhe9bQk3+hGYF1ZwWocp4g==
ARC-Authentication-Results: i=1;
	aspmx1.migadu.com;
	dkim=none;
	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=fail reason="SPF not aligned (strict), No valid DKIM" header.from=posteo.net (policy=none)
ARC-Seal: i=1; s=key1; d=yhetil.org; t=1695581014; a=rsa-sha256; cv=none;
	b=mx0p0xEIezBcdWZwXPsaAvhnkr/R7f3sTIiCujYWxhLQtDk9yRMl892YVPwZQNwcaFO2bU
	qwzFxtXMIBmfR+x0CZkWdfRc/lJLgHTksLg6YAcHRyVoN1KFGazOecbINy31HWqPRwnQ/G
	+hHHAA65tqv/fAH7oseImaxhFKvXw5d27WHt8bPufW/3drLGBTaFqb2uVGvYaFQNLjHWw1
	sqCHqnvXWpkloOiu96pha2PFMLeYiBMu4+7AzLSx1YO4PdSBEH1o6kaJ12ZGWhjKvWlTOc
	VaO/0uTXSIkzvFH77clYv/HFyQ8K8xc58ZYKLQ4DQJuJPfKqN0z81UfW2NBLSw==
Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <emacs-orgmode-bounces@gnu.org>)
	id 1qkU4E-0008FR-PM; Sun, 24 Sep 2023 14:42:55 -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 <maciaschain@posteo.net>)
 id 1qkU4C-0008F2-82
 for emacs-orgmode@gnu.org; Sun, 24 Sep 2023 14:42:52 -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 <maciaschain@posteo.net>)
 id 1qkU49-0003Pm-Os
 for emacs-orgmode@gnu.org; Sun, 24 Sep 2023 14:42:51 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id 75ABC240103
 for <emacs-orgmode@gnu.org>; Sun, 24 Sep 2023 20:42:38 +0200 (CEST)
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4Rtvy56XMHz6v3V;
 Sun, 24 Sep 2023 20:42:37 +0200 (CEST)
From: =?utf-8?Q?Juan_Manuel_Mac=C3=ADas?= <maciaschain@posteo.net>
To: Max Nikulin <manikulin@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [patch] ox-latex.el: Add `LATEX_PRE_HEADER' keyword
In-Reply-To: <uekfti$qf9$1@ciao.gmane.io> (Max Nikulin's message of "Fri, 22
 Sep 2023 23:38:09 +0700")
References: <874jjuj8vu.fsf@posteo.net> <uekfti$qf9$1@ciao.gmane.io>
Date: Sun, 24 Sep 2023 18:42:37 +0000
Message-ID: <87pm2776qq.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: -41
X-Spam_score: -4.2
X-Spam_bar: ----
X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, 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." <emacs-orgmode.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-orgmode>,
 <mailto:emacs-orgmode-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/emacs-orgmode>
List-Post: <mailto:emacs-orgmode@gnu.org>
List-Help: <mailto:emacs-orgmode-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-orgmode>,
 <mailto:emacs-orgmode-request@gnu.org?subject=subscribe>
Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org
Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org
X-Migadu-Flow: FLOW_IN
X-Migadu-Country: US
X-Migadu-Spam-Score: -5.97
X-Migadu-Scanner: mx2.migadu.com
X-Migadu-Queue-Id: 03A78305FC
X-Spam-Score: -5.97
X-TUID: /IX1deMZHjq4

Max Nikulin writes:

> On 17/09/2023 01:00, Juan Manuel Mac=C3=ADas wrote:
>>=20
>> [1] A longer example to export to a pdf that has pdf-x compliance, with
>> the pdfx package:
>>=20
>> \providecommand{\pdfxopts}{x-1a}
>> \begin{filecontents*}{\jobname.xmpdata}
>>    \Title{Some Title}
>>    \Author{Author}
>>    \Language{es-ES}
>>    \Keywords{keywords}
>>    \Publisher{publisher}
>> \end{filecontents*}
>> \documentclass{...
>
> Perhaps you have in mind other cases, but I am unsure concerning this=20
> one. However I have tried only setting metadata for hyperref only, so I=20
> may miss some important aspects.
>
> First of all, I was unaware of .xmpdata and, trying to get more info, I=20
> have found hyperxmp that declares to reuse data from \hypersetup without=
=20
> extra files and without the requirement to add settings before=20
> \documentclass.

According to the pdfx package documentation
(https://www.ctan.org/pkg/pdfx), p. 6 (at the bottom of the page)/7:

---
Warning: The \jobname.xmpdata file may be included in the main document
source, within a {filecontents*} environment, provided this comes before
the \documentclass command, as follows[...]
---

> Do you need to add commands before \documentclass because you are using=20
> custom classes that loads a lot of packages, so there is no chance to=20
> specify various options after \documentclass, but before specific=20
> packages are loaded?

Apart from the previous case, there are other varied cases (as I
mentioned) in which it is necessary to put code before documentclass.
For example, the newpax package, to preserve the internal links of a pdf
included in the document, requires putting commands like
\DocumentMetadata{ } before documentclass.

--=20
Juan Manuel Mac=C3=ADas

https://juanmanuelmacias.com

https://lunotipia.juanmanuelmacias.com

https://gnutas.juanmanuelmacias.com