From: "D. C. Toedt" <dc@toedt.com>
To: emacs-orgmode@gnu.org
Subject: TOC local for specified heading and its subheadings (in HTML export)?
Date: Fri, 27 Nov 2015 06:02:11 -0600 [thread overview]
Message-ID: <CAGN11+1XS5hA8z8Y7AB7ckWy+TRdn5A6K2AP8FAg-1eHcRCY-g@mail.gmail.com> (raw)
[-- 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 --]
next reply other threads:[~2015-11-27 12:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-27 12:02 D. C. Toedt [this message]
2015-11-28 4:58 ` TOC local for specified heading and its subheadings (in HTML export)? 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAGN11+1XS5hA8z8Y7AB7ckWy+TRdn5A6K2AP8FAg-1eHcRCY-g@mail.gmail.com \
--to=dc@toedt.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).