[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] TOC local for specified heading and its subheadings (in HTML export)

From: D. C. Toedt
Subject: [O] TOC local for specified heading and its subheadings (in HTML export)?
Date: Fri, 27 Nov 2015 06:02:11 -0600

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
  :CUSTOM_ID: ConfAgrmt

** Parties; Effective Date

This Agreement is entered into as of November 27, 2015, between ABC Ltd. and XYZ Inc.

** Confidential Information

# ============= The next line is the desired feature: Generate a TOC list (with links) of all subheadings in the specified heading =====================
#+TOC: headlines 1 local ConfInfoClauses

** Notices

#+TOC: headlines 1 local NoticesClauses

* Signatures


ABC Ltd, by:

[Signature block]


XYZ Inc., by:

[Signature block]

* Confidential Information Clauses
  :CUSTOM_ID: ConfInfoClauses

** Confidential Information Definition
  :CUSTOM_ID: ConfInfoDefn

[text of clause]

** Confidentiality Obligation
  :CUSTOM_ID: ConfInfoOblig

[text of clause]

* Notices Clauses
  :CUSTOM_ID: NoticesClauses

​** Notices Must Be in Writing
  :CUSTOM_ID: NoticesWriting
​[text of clause]

** Notices by Email
  :CUSTOM_ID: NoticesEmail
​[text of clause]​

​I'd be happy to make a donation for this.

D. C. Toedt III 
(My last name is pronounced "Tate")
Attorney & arbitrator -- tech contracts & IP
Common Draft contract clauses & checklists, annotated
+1 (713) 364-6545   C: +1 (713) 516-8968

Unless expressly stated otherwise,
this message 
is not intended to serve
assent to an agreement or other document,
even if 
attached to this message.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]