emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* TOC local for specified heading and its subheadings (in HTML export)?
@ 2015-11-27 12:02 D. C. Toedt
  2015-11-28  4:58 ` Sacha Chua
  0 siblings, 1 reply; 6+ messages in thread
From: D. C. Toedt @ 2015-11-27 12:02 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2759 bytes --]

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 <https://en.wikipedia.org/wiki/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
<http://www.CommonDraft.org>, 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 <http://www.CommonDraft.org> contract clauses & checklists,
annotated
O: +1 (713) 364-6545   C: +1 (713) 516-8968
​​

dc@toedt.com    @dctoedt <https://twitter.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.

[-- Attachment #2: Type: text/html, Size: 12712 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-11-30  0:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-27 12:02 TOC local for specified heading and its subheadings (in HTML export)? D. C. Toedt
2015-11-28  4:58 ` Sacha Chua
2015-11-28 17:37   ` Sacha Chua
2015-11-28 19:16   ` Rasmus
2015-11-29 13:05     ` Nicolas Goaziou
2015-11-30  0:46     ` Sacha Chua

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).