[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Including setupfile settings during subtree export (new exporter
From: |
Nicolas Goaziou |
Subject: |
Re: [O] Including setupfile settings during subtree export (new exporter) |
Date: |
Sat, 23 Mar 2013 23:08:54 +0100 |
John Hendy <address@hidden> writes:
>> At the moment, there's no way to override a #+setupfile: keyword
>> locally.
>
> I guess I don't understand the purpose of #+include, then. It seems we
> have only two options:
>
> 1) #+setupfile: Will apply to entire buffer as well as subtree
> exports. Cannot be overridden in subtrees.
>
> 2) #+include: Applies to entire buffer export only; does nothing for
> subtree exports.
#+INCLUDE: "file" replaces keyword with "file" contents. During subtree
export, replacement will happen if the keyword is located within the
subtree being exported.
#+SETUPFILE: "file" just reads Org keywords within "file". All Org
keywords are global, this one makes no exception.
In a nutshell, SETUPFILE should be used for Org set-up. INCLUDE is very
general and can be used to build complex documents. The fact that it
also copies Org keywords from "file" in the current buffer is merely
a side-effect.
> What's the preferred way to customize subtrees? Just add #+latex: or
> #+latex_header: options inside the subtree?
#+LATEX_HEADER: is also global. Use :EXPORT_LATEX_HEADER: in property
drawer instead.
> Going by the LaTeX export guide
> (http://orgmode.org/worg/org-tutorials/org-latex-export.html), I don't
> see recommendations for this. As a use case, perhaps I have a subtree
> with beamer-compatible markup (each subtree will fit on a slide), but
> that I might also include in the whole buffer, or perhaps a different
> css file for the whole buffer vs. the subtree.
>
> Can this be accomplished?
Off the top of my head, I think there's no direct way to do it. Though,
you can define a property :MY_SETUP: setupfile in the subtree and,
within `org-export-before-processing-hook', call a function:
- commenting every fSETUPFILE keyword
- adding #+SETUPFILE: setupfile at the beginning of the buffer.
It involves some (simple) elisp, though.
>>> Based on the above, should that line be removed from the Worg update
>>> guide? If so, I can do that.
>>
>> I think so.
>
> Will do.
Thank you.
Regards,
--
Nicolas Goaziou
- [O] Including setupfile settings during subtree export (new exporter), John Hendy, 2013/03/22
- Re: [O] Including setupfile settings during subtree export (new exporter), Nicolas Goaziou, 2013/03/22
- Re: [O] Including setupfile settings during subtree export (new exporter), John Hendy, 2013/03/22
- Re: [O] Including setupfile settings during subtree export (new exporter), Nicolas Goaziou, 2013/03/23
- Re: [O] Including setupfile settings during subtree export (new exporter), John Hendy, 2013/03/23
- Re: [O] Including setupfile settings during subtree export (new exporter), Nicolas Goaziou, 2013/03/23
- Re: [O] Including setupfile settings during subtree export (new exporter), John Hendy, 2013/03/23
- Re: [O] Including setupfile settings during subtree export (new exporter),
Nicolas Goaziou <=
- Re: [O] Including setupfile settings during subtree export (new exporter), John Hendy, 2013/03/23
- Re: [O] Including setupfile settings during subtree export (new exporter), Nicolas Goaziou, 2013/03/23
- Re: [O] Including setupfile settings during subtree export (new exporter), Mike McLean, 2013/03/24