emacs-orgmode
[Top][All Lists]
Advanced

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

How to export a single subtree but include document preamble?


From: Richard H. Stanton
Subject: How to export a single subtree but include document preamble?
Date: Wed, 3 Apr 2024 12:00:04 -0700

I just tried to export a single subtree from an org document to a PDF file:

1) Type  C-c C-e [org-export-dispatch]
2) C-s to narrow to subtree
3) l -> o to export to PDF via LaTeX

However, instead of exporting the portion of the file I want, I get the error 
message

Undefined Org macro: newline; aborting

That macro is defined in a setup file that is #+included at the top of the 
file, so exporting the entire file works fine.

I assume the problem is that when I export only one subtree, the setup file is 
not #+included, and I can see it sort of makes sense, but it would be nice if 
there were an option to include one or more lines from the preamble when 
exporting just a subtree, since otherwise exporting a subtree doesn’t actually 
work! Is there a simple way to do this?

Thanks.


reply via email to

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