Hi Jacob,

#+LATEX_HEADER: does work on export (when else would it work?)

I think I recall a space between the ":" and the LaTeX command is
needed. Do you have one?

For more ideas on how to have lengthy custom headers, see thread here:
https://lists.gnu.org/archive/html/emacs-orgmode/2014-06/msg00734.html
and links therein. There are three general approaches:

1) Make a custom class file and include that, either in your init file
or in the Org file.

2) From Aaron Ecay, put your header in a #+BEGIN_SRC latex section, and
then run a bit of lisp to export that section, and then include the
exported file in a #+LATEX_HEADER: \include{preamble}. This is the
approach I use.

,----
| #+begin_src emacs-lisp
|   (org-babel-goto-named-src-block "preamble")
|   (org-babel-tangle)
| #+end_src
| 
| #+name: preamble
| #+begin_src latex :tangle preamble.tex
|   % code goes here
| #+end_src
`----

3) Implement a patch or pester developers to create a third simpler
solution.

Good luck,

  -k.


* On 2014-07-27 at 21:00, Jacob Gerlach wrote:
> I have a lengthy command customization that I want to include in LaTeX
> export. Since it must appear in the preamble,
> #+BEGIN_LATEX
> ...
> #+END_LATEX
>
> didn't work. I had to prepend
> #+LATEX_HEADER:
> to each line in order to achieve my result.
>
> I found C-h v org-format-latex-header RET:
>
> "The document header used for processing LaTeX fragments..."
>
> But it seems that when the docstring says "fragments," it is not referring
> to exporting.
>
> Are there any customizations to do the same during export?
>
> Thanks,
> Jake


Reply via email to