On 28/09/2023 22:36, AW wrote:

The idea to have a LATEX_PRE_HEADER to insert `\DocumentMetadata{}` is exactly
what you need right now, if you export from orgmode to current LaTeX. With
`\DocumentMetadata{}` you can add most of the necessary xmp data -- and I
write most, because I'm using it on a daily basis, but haven't checked if
really everything is included yet.

The question is if Juan Manuel can use \DocumentMetadata instead of the pdfx package in his workflow.

However there is a common part of \DocumentMetadata and .xmpdata usage. Currently Org mode allows to specify a very limited subset of metadata through keywords

#+language: en
#+author: Me
#+title: Statement

The advantage is that the same data are used by all export backends: LaTeX, HTML, etc. Specifying \DocumentMetadata literally without substitutions from Org keywords may cause diverged values. That is why I proposed to consider some kind of templates.

Another issue is extended metadata. I would consider an approach similar to header arguments for source code blocks:

#+property: header-args :eval never-export
for all languages
#+property: header-args:elisp :exports both :eval yes
overrides for emacs-lisp

Perhaps it is not reasonable to require to specify all metadata through Org keywords and it may be more convenient to combine raw LaTeX code and fragments generated by Org

#+name: preamble
#+begin_src latex :exports none :noweb yes
  pdfstandard = a-2b

Access to keywords values during evaluation of source code blocks have to be implemented however.

Reply via email to