"D. C. Toedt" <d...@toedt.com> writes: > Hi all -- > > BACKGROUND: I've been using org-mode to develop the Common Draft annotated > collection of business contract clauses, in part for the law school course in > contract drafting that I > teach to third-year law students. I've been posting the collection as a > Creative Commons document at http://www.CommonDraft.org, and plan to expand > and maintain it. > > QUESTION: I'm currently using a single, multi-level table of contents (TOC) > at the beginning of the document. That ends up being a lot to scroll through > to get to the first > chapter. I'd like instead to have: > > * a one-level "master" TOC at the beginning of the document, listing and > linking to just the articles (in contracts, "articles" are the same as > "chapters" in books, that is, the > top-level sections); and > > * at the beginning of each article, a TOC listing and linking to the > subheadings within that article. >
It's not a pure org solution, but I'd go this way: o have each "article" in a separate org file - export each one to HTML (that can be scripted easily) - you get the article TOCs for free. o have a separate top-level org (or HTML) file that contains the TOC with pointers to the "articles". The production of this file can be scripted as well: get the #+TITLEs of each "article" file and turn them into links. The whole thing can be wrapped up in a Makefile to automate the process. Navigation (prev/next/top) may be a problem but it shouldn't be too hard either. -- Nick