[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] how to both :body-only t and :table-of-contents t
From: |
G. Jay Kerns |
Subject: |
Re: [O] how to both :body-only t and :table-of-contents t |
Date: |
Fri, 23 Sep 2011 07:32:56 -0400 |
Dear Jan
On Fri, Sep 23, 2011 at 3:51 AM, Jan Böcker <address@hidden> wrote:
>
> Hi Jay,
>
> I faced the same problem about a year ago.
> See this thread in the mailing list archive:
>
> http://thread.gmane.org/gmane.emacs.orgmode/24227
>
> The HTML exporter will refuse to include a TOC if body-only is t; the
> atom exporter and a "send HTML messages with Wanderlust" hack relied on
> that behaviour, which is why this was not changed in the official Org
> repository.
>
> You can either apply the one-line patch I included in the linked thread
> or ask Ian Barton about his solution using jQuery he mentioned at the
> end of that thread.
>
> HTH,
> Jan
>
Thanks; I was afraid it was going to be something like that, and am
appreciative that I don't need to reinvent this particular wheel. My
previous workaround was to export once with TOC, copy-paste the TOC
bit to the org-file in a #+BEGIN_HTML block, then export again with
:body-only t. But each run takes a couple of hours (another question
for another day), which is a pain, and not convenient should the
document structure change.
I noticed in the thread that Carsten mentioned writing a "hook" that
strips the other stuff. Don't have much experience writing hooks, but
there should be a way to write a custom publishing function just like
the current one which strips everything but the TOC. I'll use your
patch while I continue thinking about it.
Thanks again.
Jay