emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch] ox-latex.el: Add `LATEX_PRE_HEADER' keyword


From: Juan Manuel Macías
Subject: [patch] ox-latex.el: Add `LATEX_PRE_HEADER' keyword
Date: Sat, 16 Sep 2023 18:00:37 +0000

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

Attachment: 0001-lisp-ox-latex.el-latex-Add-LATEX_PRE_HEADER-keyword.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]