emacs-orgmode
[Top][All Lists]
Advanced

[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
  :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

# ============= 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

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:

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

** Notices by Email
  :PROPERTIES:
  :CUSTOM_ID: NoticesEmail
  :END:
​[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
O:
+1 (713) 364-6545   C: +1 (713) 516-8968
​​
  

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.



reply via email to

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