From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Barton Subject: Re: Tables of contents for individual sections wanted -- will donate Date: Mon, 30 Jun 2014 21:19:30 +0100 Message-ID: <21c424b19ffa56e34f91a3ce95964468@wilkesley.net> References: <53B1AF24.7010502@wilkesley.net> Reply-To: ian@manor-farm.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49440) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1i38-0001f8-Tz for emacs-orgmode@gnu.org; Mon, 30 Jun 2014 16:19:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X1i32-0007IG-Of for emacs-orgmode@gnu.org; Mon, 30 Jun 2014 16:19:38 -0400 Received: from mail2.wilkesley.net ([109.74.196.44]:60585 helo=li40-130.members.linode.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1i32-0007Hk-IT for emacs-orgmode@gnu.org; Mon, 30 Jun 2014 16:19:32 -0400 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "D. C. Toedt" Cc: ian@manor-farm.org, emacs-orgmode@gnu.org On 2014-06-30 19:55, D. C. Toedt wrote: > Thanks, Ian. =C2=A0I've done things like that in the past, but it'd ent= ail > maintaining the TOC by hand, which I was hoping to avoid. =C2=A0True, I= 'd > be able to create the initial TOC using org-mode, followed by manually > inserting jQuery calls. =C2=A0But I'd have to manually edit the TOC eve= ry > time I added a new chapter or section and every time I edited a > heading title. =C2=A0 >=20 You can do it without editing the TOC manually. You use the
=20 of each level of the org headline css as a selector in jQuery. You then=20 add a JS function to the DocumentReady function which does the jQuery=20 expanding/collapsing. This can all be done as part of your org-mode=20 document. I can knock up a simple example tomorrow if it's of interest. Best wishes, Ian.