emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Richard Stanton <rhstanton@berkeley.edu>
To: emacs-orgmode@gnu.org
Cc: srandby@gmail.com
Subject: Re: How to export a single subtree but include document preamble?
Date: Thu, 4 Apr 2024 11:32:45 -0700	[thread overview]
Message-ID: <9111AA5D-0CD2-4317-9FE2-CDEDA2561477@berkeley.edu> (raw)
In-Reply-To: <8A1DD68F-1F73-458A-B4AB-4479BDA76882@berkeley.edu>

[-- Attachment #1: Type: text/plain, Size: 962 bytes --]

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 <http://setup.org/>

with 

#+setupfile: setup.org

and now exporting includes the macro definitions in setup.org <http://setup.org/> even when I’m only exporting a subtree.

[-- Attachment #2: Type: text/html, Size: 1733 bytes --]

  reply	other threads:[~2024-04-04 18:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-04 18:11 How to export a single subtree but include document preamble? Richard Stanton
2024-04-04 18:32 ` Richard Stanton [this message]
2024-04-04 18:42 ` Scott Randby
  -- strict thread matches above, loose matches on Subject: below --
2024-04-03 19:00 Richard H. Stanton
2024-04-03 21:13 ` Scott Randby

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9111AA5D-0CD2-4317-9FE2-CDEDA2561477@berkeley.edu \
    --to=rhstanton@berkeley.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=srandby@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).