#lang scribble/doc @require[scribble/manual] @require["utils.ss"] @require[(for-syntax scheme/base)] @define-syntax[def-section-like (syntax-rules () [(_ id result/c x ...) (defproc (id [#:tag tag (or/c false/c string?) #f] [pre-content any/c] (... ...+)) result/c x ...)])] @define-syntax[def-elem-proc (syntax-rules () [(_ id x ...) (defproc (id [pre-content any/c] (... ...)) element? x ...)])] @define-syntax[def-style-proc (syntax-rules () [(_ id) @def-elem-proc[id]{Like @scheme[elem], but with style @scheme['id]}])] @title[#:tag "basic"]{Basic Document Forms} @declare-exporting[scribble/basic] The @filepath{basic.ss} libraryprovides functions and forms that can be used from code written either in Scheme or with @elem["@"] expressions. For example, the @scheme[title] and @scheme[italic] functions might be called from Scheme as @schemeblock[ (title #:tag "how-to" "How to Design " (italic "Great") " Programs") ] or with an @elem["@"] expression as @verbatim[ #<string] on the parsed @scheme[pre-content] list.} @defproc[(section-index [word string?] ...)]{ Creates a @scheme[part-index-decl] to be associated with the enclosing section by @scheme[decode]. The @scheme[word]s serve as both the keys and as the rendered forms of the keys.} @defproc[(index-section [#:tag tag (or/c false/c string?) "doc-index"])]{ Produces a section that shows the index the enclosing document. The optional @scheme[tag] argument is used as the index section's tag.} @; ------------------------------------------------------------------------ @section{Tables of Contents} @defproc[(table-of-contents) delayed-flow-element?]{ 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?]{ 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.}