From mboxrd@z Thu Jan 1 00:00:00 1970 From: "D. C. Toedt" Subject: TOC local for specified heading and its subheadings (in HTML export)? Date: Fri, 27 Nov 2015 06:02:11 -0600 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a1141b87284a7af05258478c5 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45380) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a2Hjv-0002mS-0k for emacs-orgmode@gnu.org; Fri, 27 Nov 2015 07:03:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a2Hjo-00041u-HI for emacs-orgmode@gnu.org; Fri, 27 Nov 2015 07:02:58 -0500 Received: from mail-oi0-x232.google.com ([2607:f8b0:4003:c06::232]:33461) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a2Hjo-00041k-A2 for emacs-orgmode@gnu.org; Fri, 27 Nov 2015 07:02:52 -0500 Received: by oixx65 with SMTP id x65so60692157oix.0 for ; Fri, 27 Nov 2015 04:02:51 -0800 (PST) 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: emacs-orgmode@gnu.org --001a1141b87284a7af05258478c5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable The #+TOC: headlines [n] local feature is really useful; I use it a lot. How easy would it be to do a macro to generate a similar table of contents for the subheadings of an arbitrary specified heading? That would be an alternative to transclusion , allowing re-use of text but with links instead of the actual text. For UX purposes this will sometimes be preferable to actual transclusion, e.g., with Angular.js. I'm not even a cargo-cult programmer in elisp and wouldn't have the level of skill to do this myself without spending a lot of time. EXAMPLE: In the Common Draft contract form file , I'd like to add a Model Confidentiality Agreement, a Model Software Development Agreement, a Model Consulting Services Agreement, etc. Each of these model agreements would include several TOC-style lists of clauses under various other headings, as shown in the following hypothetical file excerpt: * Model Confidentiality Agreement :PROPERTIES: :CUSTOM_ID: ConfAgrmt :END: ** Parties; Effective Date This Agreement is entered into as of November 27, 2015, between ABC Ltd. and XYZ Inc. ** Confidential Information # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D The next line is the desired feat= ure: Generate a TOC list (with links) of all subheadings in the specified heading =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D #+TOC: headlines 1 local ConfInfoClauses ** Notices #+TOC: headlines 1 local NoticesClauses * Signatures AGREED: ABC Ltd, by: [Signature block] AGREED: XYZ Inc., by: [Signature block] * Confidential Information Clauses :PROPERTIES: :CUSTOM_ID: ConfInfoClauses :END: ** Confidential Information Definition :PROPERTIES: :CUSTOM_ID: ConfInfoDefn :END: [text of clause] ** Confidentiality Obligation :PROPERTIES: :CUSTOM_ID: ConfInfoOblig :END: [text of clause] * Notices Clauses :PROPERTIES: :CUSTOM_ID: NoticesClauses :END: =E2=80=8B** Notices Must Be in Writing :PROPERTIES: :CUSTOM_ID: NoticesWriting :END: =E2=80=8B =E2=80=8B[text of clause] ** Notices by Email :PROPERTIES: :CUSTOM_ID: NoticesEmail :END: =E2=80=8B =E2=80=8B[text of clause]=E2=80=8B =E2=80=8BI'd be happy to make a donation for this. =E2=80=8B D. C. Toedt III *(My last name is pronounced "Tate")* Attorney & arbitrator -- tech contracts & IP Common Draft contract clauses & checklists, annotated O: +1 (713) 364-6545 C: +1 (713) 516-8968 =E2=80=8B=E2=80=8B dc@toedt.com @dctoedt www.OnContracts.com/About Unless expressly stated otherwise, this message is not intended to serve as assent to an agreement or other document, even if attached to this message. --001a1141b87284a7af05258478c5 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
The #+TOC: headlines [n] local feature = is really useful; I use it a lot.=C2=A0 How easy would it be to do a macro = to generate a similar table of contents for the subheadings of an arbitrary= specified heading?=C2=A0 That would be an alternative to transclusion, allowing=C2=A0re-us= e of text but with links instead of the actual text.=C2=A0 For UX purposes = this will sometimes be preferable to actual transclusion, e.g., with Angula= r.js.=C2=A0 I'm not even a cargo-cult programmer in elisp and wouldn= 9;t have the level of skill to do this myself without spending a lot of tim= e.








=
** Confidential Information Definition
=C2=A0 :PROPERTIES:
=C2=A0 :CUSTOM_ID: ConfInfoDefn
=C2=A0 :END:

[text of clause]
** Confidentiality Obligation
=C2=A0 :PROPERTIES:
=C2=A0 :CUSTOM_ID: ConfInfoOblig
=C2=A0 :END:

<= div class=3D"gmail_default" style=3D"font-family:arial,helvetica,sans-serif= ;font-size:small">
[text of clause]

<= div class=3D"gmail_default" style=3D"font-family:arial,helvetica,sans-serif= ;font-size:small">
* Notices Clauses
=
<= div dir=3D"ltr">
=C2=A0 :PROPERTIES:
=C2=A0 :CUSTOM_ID: NoticesClauses
=C2=A0 :END:
=E2=80=8B** Notices Must Be in Writing
=
=C2=A0 :PROPERTIES:
=C2=A0 :CUSTOM_ID: NoticesWriting
= =C2=A0 :END:
=E2=80=8B
=E2= =80=8B[text of clause]

** Notices by Email
=C2=A0 :PROPERTIES:
=C2=A0 :CUSTOM_ID:= NoticesEmail
=C2=A0 :END:
=E2=80=8B
=
=E2=80=8B[text of clause]=E2=80=8B

=
= =E2=80=8BI'd be happy to make a donation for this.
<= /div>

=E2=80=8B


D. C. Toedt III=C2=A0
(My last name = is pronounced "Tate")
Attorn= ey & arbitrator -- tech contracts & IP
Common Draft=C2=A0contract clauses &= ; checklists, annotated
O:
+1 (713) 364-6545<= span style=3D"font-family:arial,helvetica,sans-serif;font-size:x-small">=C2= =A0 =C2=A0C: +1= (713) 516-8968
=E2=80=8B=E2=80=8B
=C2=A0=C2=A0

Unless expressly stated otherwise, this message=C2=A0is not intended=C2=A0to serve
as
assent to an agreement=C2=A0or other document,
even if=C2=A0
attached to this message.


--001a1141b87284a7af05258478c5--