emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ian Barton <ian@wilkesley.net>
To: "D. C. Toedt" <dc@toedt.com>
Cc: ian@manor-farm.org, emacs-orgmode@gnu.org
Subject: Re: Tables of contents for individual sections wanted -- will donate
Date: Mon, 30 Jun 2014 21:19:30 +0100	[thread overview]
Message-ID: <21c424b19ffa56e34f91a3ce95964468@wilkesley.net> (raw)
In-Reply-To: <CAGN11+21Saq1yC3aE-eLWjSo7WUL8CKZ4L4vEnt2hFZd7ecUQA@mail.gmail.com>

On 2014-06-30 19:55, D. C. Toedt wrote:
> Thanks, Ian.  I've done things like that in the past, but it'd entail
> maintaining the TOC by hand, which I was hoping to avoid.  True, I'd
> be able to create the initial TOC using org-mode, followed by manually
> inserting jQuery calls.  But I'd have to manually edit the TOC every
> time I added a new chapter or section and every time I edited a
> heading title.  
> 

You can do it without editing the TOC manually. You use the <div> </div> 
of each level of the org headline css as a selector in jQuery. You then 
add a JS function to the DocumentReady function which does the jQuery 
expanding/collapsing. This can all be done as part of your org-mode 
document. I can knock up a simple example tomorrow if it's of interest.

Best wishes,

Ian.

  reply	other threads:[~2014-06-30 20:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-29 18:51 Tables of contents for individual sections wanted -- will donate D. C. Toedt
2014-06-30 18:40 ` Ian Barton
2014-06-30 18:55   ` D. C. Toedt
2014-06-30 20:19     ` Ian Barton [this message]
2014-07-01  2:45       ` D. C. Toedt
2014-07-01 13:10 ` Nick Dokos

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=21c424b19ffa56e34f91a3ce95964468@wilkesley.net \
    --to=ian@wilkesley.net \
    --cc=dc@toedt.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=ian@manor-farm.org \
    /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).