From 685cbc9a9845c81d09afd692d3f2677c94ed8fdd Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 11 Apr 2008 02:07:15 +0000 Subject: [PATCH] doc updates svn: r9250 original commit: 2b27ed487215867bc1aa371a27ecb53ccbc336b2 --- collects/scribblings/scribble/basic.scrbl | 18 +++++++++++++++++- collects/scribblings/scribble/struct.scrbl | 10 +++++++--- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/collects/scribblings/scribble/basic.scrbl b/collects/scribblings/scribble/basic.scrbl index fffdda27..c2bff39a 100644 --- a/collects/scribblings/scribble/basic.scrbl +++ b/collects/scribblings/scribble/basic.scrbl @@ -1,12 +1,15 @@ #lang scribble/doc @(require scribble/manual "utils.ss" - (for-syntax scheme/base)) + (for-syntax scheme/base) + (for-label setup/main-collects)) @(define-syntax def-section-like (syntax-rules () [(_ id result/c x ...) (defproc (id [#:tag tag (or/c false/c string?) #f] + [#:tag-prefix tag-prefix (or/c false/c string? module-path?) #f] + [#:style style any/c #f] [pre-content any/c] (... ...+)) result/c x ...)])) @@ -51,6 +54,7 @@ have @schememodname[scribble/manual]). @section{Document Structure} @defproc[(title [#:tag tag (or/c false/c string?) #f] + [#:tag-prefix tag-prefix (or/c false/c string? module-path?) #f] [#:style style any/c #f] [#:version vers (or/c string? false/c) #f] [pre-content any/c] ...+) @@ -68,6 +72,11 @@ separate pages in multi-page HTML output. A style of @scheme['index] indicates an index section whose body is rendered in two columns for Latex output. +The @scheme[tag-prefix] argument is propagated to the generated +structure (see @secref["tags"]). If @scheme[tag-prefix] is a module +path, it is converted to a string using +@scheme[module-path-prefix->string]. + The @scheme[vers] argument is propagated to the @scheme[title-decl] structure. @@ -117,6 +126,13 @@ Returns @scheme[#t] if @scheme[v] is an item produced by visible to the enclosing context). Since this form expands to @scheme[require], it must be used in a module or top-level context.} +@defproc[(module-path-prefix->string [mod-path module-path?]) + string?]{ + +Converts a module path to a string by resolving it to a path, and +using @scheme[path->main-collects-relative].} + + @; ------------------------------------------------------------------------ @section{Text Styles} diff --git a/collects/scribblings/scribble/struct.scrbl b/collects/scribblings/scribble/struct.scrbl index 18632576..1626cdad 100644 --- a/collects/scribblings/scribble/struct.scrbl +++ b/collects/scribblings/scribble/struct.scrbl @@ -1,7 +1,8 @@ #lang scribble/doc @(require scribble/manual "utils.ss" - (for-label scribble/manual-struct)) + (for-label scribble/manual-struct + setup/main-collects)) @title[#:tag "struct"]{Structures And Processing} @@ -512,10 +513,13 @@ Used as a style for an @scheme[element]. The @scheme[style] at this layer is a style for the hyperlink.} -@defstruct[image-file ([path path-string?] +@defstruct[image-file ([path (or/c path-string? + (cons/c 'collects (listof bytes?)))] [scale real?])]{ -Used as a style for an @scheme[element].} +Used as a style for an @scheme[element] to inline an image. The +@scheme[path] field can be a result of +@scheme[path->main-collects-relative].} @defproc[(block? [v any/c]) boolean?]{