commit 5ffcc610baee7afa633fdc0ea412e3d6a8d78d04
parent 48e3293a0bc4d0f2c3013005290fa46bc622378c
Author: Matthew Flatt <mflatt@racket-lang.org>
Date: Tue, 29 Jul 2008 20:40:25 +0000
document ways to control Scribble TOC output
svn: r10972
original commit: c8318761c8fdfc4cbe305ffc1cc216fe16965f2f
Diffstat:
2 files changed, 16 insertions(+), 3 deletions(-)
diff --git 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
@@ -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