Rationale for this patch: in certain cases, in a LaTeX document, it is necessary to add code before the class declaration (\documentclass...). For example, commands like \PassOptionsToPackage, \DocumentMetadata{ }, etc.; or certain packages that should be loaded first using \RequirePackage{}; and other miscellaneous cases[1]. I think that by defining a new keyword `latex_pre_header', which behaves the same as latex_header but concatenated before the class, these situations can be resolved from Org. [1] A longer example to export to a pdf that has pdf-x compliance, with the pdfx package: \providecommand{\pdfxopts}{x-1a} \begin{filecontents*}{\jobname.xmpdata} \Title{Some Title} \Author{Author} \Language{es-ES} \Keywords{keywords} \Publisher{publisher} \end{filecontents*} \documentclass{... -- Juan Manuel MacĂ­as https://juanmanuelmacias.com https://lunotipia.juanmanuelmacias.com https://gnutas.juanmanuelmacias.com