emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Include lengthy LaTeX in export preamble


From: Jacob Gerlach
Subject: Re: [O] Include lengthy LaTeX in export preamble
Date: Sun, 27 Jul 2014 22:19:23 -0400

On Sun, Jul 27, 2014 at 10:08 PM, Ken Mankoff <address@hidden> wrote:
Hi Jacob,

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

Agreed. If I said otherwise it was a mistake.

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
`----

This looks handy. Thanks!

My elisp ability is minimal, but if someone can point me towards where I would look to try to create an export analogue to org-format-latex-header, I would at least take a look and try to come up with a patch.

Thanks,
Jake

reply via email to

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