commit 788660a9f1a5f299f757aa84685372161919339c
parent 61db9850c1bc90fb2225731927a14bdbf79e8bbb
Author: Matthew Flatt <mflatt@racket-lang.org>
Date: Mon, 28 Jan 2008 21:54:02 +0000
setup-plt scribbling
svn: r8451
original commit: 68ae5ace16a40c0ea1bb4d5ed010d8c64fa3972a
Diffstat:
5 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/collects/scribble/basic.ss b/collects/scribble/basic.ss
@@ -87,12 +87,15 @@
(provide itemize item item?)
-(define (itemize . items)
+(define (itemize #:style [style #f] . items)
(let ([items (filter (lambda (v) (not (whitespace? v))) items)])
(for ([v items])
(unless (an-item? v)
(error 'itemize "expected an item, found something else: ~e" v)))
- (make-itemization (map an-item-flow items))))
+ (let ([flows (map an-item-flow items)])
+ (if style
+ (make-styled-itemization flows style)
+ (make-itemization flows)))))
(define-struct an-item (flow))
(define (item? x) (an-item? x))
diff --git a/collects/scribble/html-render.ss b/collects/scribble/html-render.ss
@@ -576,6 +576,10 @@
(define/override (render-itemization t part ri)
`((ul
+ ,@(if (and (styled-itemization? t)
+ (string? (styled-itemization-style t)))
+ `(((class ,(styled-itemization-style t))))
+ null)
,@(map (lambda (flow)
`(li ,@(render-flow flow part ri)))
(itemization-flows t)))))
diff --git a/collects/scribble/manual.ss b/collects/scribble/manual.ss
@@ -1144,8 +1144,11 @@
tag)))
(car content)))
(annote-exporting-library
- (to-element (make-just-context (extract-id prototype)
- stx-id))))])]
+ (let ([sig (current-signature)])
+ (if sig
+ (*sig-elem (sig-id sig) (extract-id prototype))
+ (to-element (make-just-context (extract-id prototype)
+ stx-id))))))])]
[(flat-size) (+ (prototype-size args + +)
(prototype-depth prototype)
(element-width tagged))]
diff --git a/collects/scribble/scribble.css b/collects/scribble/scribble.css
@@ -441,6 +441,11 @@ i {
margin-right: 0.3em;
}
+.compact li p {
+ margin: 0 0 0 0;
+ padding: 0 0 0 0;
+}
+
/* A hack, inserted to break some Scheme ids: */
.mywbr {
width: 0;
diff --git a/collects/scribble/struct.ss b/collects/scribble/struct.ss
@@ -153,6 +153,7 @@
[(auxiliary-table table) ()]
[delayed-flow-element ([resolve (any/c part? resolve-info? . -> . flow-element?)])]
[itemization ([flows (listof flow?)])]
+ [(styled-itemization itemization) ([style any/c])]
[blockquote ([style any/c]
[paragraphs (listof flow-element?)])]
;; content = list of elements