Pedro Andres Aranda Gutierrez <[email protected]> writes: > attached is a patch that adds prepending lines before the LaTeX preamble. > This is something I needed to be able to use extended colour names in my > slides. > ... > +#+cindex: @samp{LATEX_HEADER_PRE}, keyword > +The LaTeX export backend prepends values from =LATEX_HEADER_PRE= > +keywords before the LaTeX preamble. Use this option when you want to > +set the values passed to packages included in the document class. For > +example, to use extended names for the ~xcolor~ package, use > + > +#+begin_example > +,#+LATEX_HEADER_PRE: \PassOptionsToPackage{dvipsnames}{xcolor} > +#+end_example
Conceptually, this feels like something that should be a part of #+LATEX_CLASS definition. `org-latex-classes', if modified, should allow similar features, if you need to add something before \documentclass line. Maybe we should instead allow an override for header string in org-latex-classes as a new keyword? -- Ihor Radchenko // yantar92, Org mode maintainer, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>
