emacs-orgmode
[Top][All Lists]
Advanced

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

Re: How to export a single subtree but include document preamble?


From: Richard Stanton
Subject: Re: How to export a single subtree but include document preamble?
Date: Thu, 4 Apr 2024 11:32:45 -0700

On Apr 4, 2024, at 11:11 AM, Richard Stanton <rhstanton@berkeley.edu> wrote:

I don't know if this does what you want, but I use a ‘PROPERTIES’ drawer right below the subtree's headline and in that drawer, I put the following code:

:EXPORT_LATEX_HEADER_EXTRA: \input{latex-preamble.tex}

Scott Randby

Thanks for the suggestion!

It would still be nice (i.e., you wouldn’t have to do this for every section you ever want to export) to have a way of specifying a line that gets executed for EVERY (say) LaTeX export. Or else an option to do something like include everything in the file before the first section header.

That capability does (if you’re careful) seem to exist. In my case, I just had to replace

#+include: setup.org

with 

#+setupfile: setup.org

and now exporting includes the macro definitions in setup.org even when I’m only exporting a subtree.

reply via email to

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