From 5ffcc610baee7afa633fdc0ea412e3d6a8d78d04 Mon Sep 17 00:00:00 2001 From: Matthew Flatt <mflatt@racket-lang.org> Date: Tue, 29 Jul 2008 20:40:25 +0000 Subject: [PATCH] document ways to control Scribble TOC output svn: r10972 original commit: c8318761c8fdfc4cbe305ffc1cc216fe16965f2f --- collects/scribblings/scribble/basic.scrbl | 13 ++++++++++--- collects/scribblings/scribble/struct.scrbl | 6 ++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/collects/scribblings/scribble/basic.scrbl b/collects/scribblings/scribble/basic.scrbl index 1ccdf871..0f55f83f 100644 --- a/collects/scribblings/scribble/basic.scrbl +++ b/collects/scribblings/scribble/basic.scrbl @@ -214,16 +214,23 @@ optional @scheme[tag] argument is used as the index section's tag.} @section{Tables of Contents} -@defproc[(table-of-contents) delayed-flow-element?]{ +@defproc[(table-of-contents) delayed-block?]{ Returns a delayed flow element that expands to a table of contents for the enclosing section. For LaTeX output, however, the table of contents currently spans the entire enclosing document.} -@defproc[(local-table-of-contents) delayed-flow-element?]{ +@defproc[(local-table-of-contents [#:style style any/c #f]) + delayed-block?]{ Returns a delayed flow element that may expand to a table of contents for the enclosing section, depending on the output type. For multi-page HTML output, the flow element is a table of contents; for -Latex output, the flow element is empty.} +Latex output, the flow element is empty. + +The meaning of the @scheme[style] argument depends on the output type, +but @scheme['immediate-only] normally creates a table of contents that +contains only immediate sub-sections of the enclosing section. See +also the @scheme['quiet] style of @scheme[part], which normally +suppresses sub-part entries in the table of contents.} diff --git a/collects/scribblings/scribble/struct.scrbl b/collects/scribblings/scribble/struct.scrbl index 48d4136d..07e10ec8 100644 --- a/collects/scribblings/scribble/struct.scrbl +++ b/collects/scribblings/scribble/struct.scrbl @@ -274,6 +274,12 @@ are as follows: @item{@scheme['hidden] --- the part title is not shown in rendered output.} + @item{@scheme['quiet] --- in HTML output and most other output modes, + hides entries for sub-parts of this part in a + @scheme[table-of-contents] or @scheme[local-table-of-contents] + listing except when those sub-parts are top-level entries in + the listing.} + @item{@scheme['no-toc] --- as a style for the main part of a document, causes the HTML output to not include a margin box for the main table of contents; the ``on this page'' box that