A ton of @scheme*' ->
@racket*' and related updates.
Also, updates some of the mzlib files to point at `racket/*' libraries rather than to `scheme/*' ones. original commit: ac26fe75546b5182d78f18c2cd882f0f440849e2
This commit is contained in:
parent
ad8ba406ee
commit
0ed2447eb9
|
@ -66,7 +66,7 @@
|
||||||
(list (smaller (elemref '(chunk tag) #:underline? #f
|
(list (smaller (elemref '(chunk tag) #:underline? #f
|
||||||
str
|
str
|
||||||
rest ...))))
|
rest ...))))
|
||||||
(schemeblock expr ...))))))]))
|
(racketblock expr ...))))))]))
|
||||||
|
|
||||||
(define-syntax (chunkref stx)
|
(define-syntax (chunkref stx)
|
||||||
(syntax-case stx ()
|
(syntax-case stx ()
|
||||||
|
|
|
@ -218,9 +218,9 @@
|
||||||
(car content)))
|
(car content)))
|
||||||
spacer ":" spacer
|
spacer ":" spacer
|
||||||
(case kind
|
(case kind
|
||||||
[(class) (scheme class?)]
|
[(class) (racket class?)]
|
||||||
[(interface) (scheme interface?)]
|
[(interface) (racket interface?)]
|
||||||
[(mixin) (schemeblockelem (class? . -> . class?))])))))))
|
[(mixin) (racketblockelem (class? . -> . class?))])))))))
|
||||||
(if super
|
(if super
|
||||||
(list
|
(list
|
||||||
(list (make-flow
|
(list (make-flow
|
||||||
|
|
|
@ -55,21 +55,21 @@
|
||||||
stx
|
stx
|
||||||
id)))
|
id)))
|
||||||
(syntax->list #'(lit ...)))
|
(syntax->list #'(lit ...)))
|
||||||
#'(with-togetherable-scheme-variables
|
#'(with-togetherable-racket-variables
|
||||||
(lit ...)
|
(lit ...)
|
||||||
([form spec] [form spec1] ...
|
([form spec] [form spec1] ...
|
||||||
[non-term (non-term-id non-term-form ...)] ...)
|
[non-term (non-term-id non-term-form ...)] ...)
|
||||||
(*defforms (quote-syntax/loc defined-id)
|
(*defforms (quote-syntax/loc defined-id)
|
||||||
'(spec spec1 ...)
|
'(spec spec1 ...)
|
||||||
(list (lambda (x) (schemeblock0/form new-spec))
|
(list (lambda (x) (racketblock0/form new-spec))
|
||||||
(lambda (ignored) (schemeblock0/form spec1)) ...)
|
(lambda (ignored) (racketblock0/form spec1)) ...)
|
||||||
'((non-term-id non-term-form ...) ...)
|
'((non-term-id non-term-form ...) ...)
|
||||||
(list (list (lambda () (scheme non-term-id))
|
(list (list (lambda () (racket non-term-id))
|
||||||
(lambda () (schemeblock0/form non-term-form))
|
(lambda () (racketblock0/form non-term-form))
|
||||||
...)
|
...)
|
||||||
...)
|
...)
|
||||||
(list (list (lambda () (scheme contract-nonterm))
|
(list (list (lambda () (racket contract-nonterm))
|
||||||
(lambda () (schemeblock0 contract-expr)))
|
(lambda () (racketblock0 contract-expr)))
|
||||||
...)
|
...)
|
||||||
(lambda () (list desc ...)))))]
|
(lambda () (list desc ...)))))]
|
||||||
[(fm #:id defined-id #:literals (lit ...) [spec spec1 ...]
|
[(fm #:id defined-id #:literals (lit ...) [spec spec1 ...]
|
||||||
|
@ -156,14 +156,14 @@
|
||||||
stx
|
stx
|
||||||
id)))
|
id)))
|
||||||
(syntax->list #'(lit ...)))
|
(syntax->list #'(lit ...)))
|
||||||
#'(with-togetherable-scheme-variables
|
#'(with-togetherable-racket-variables
|
||||||
(lit ...)
|
(lit ...)
|
||||||
([form/none spec])
|
([form/none spec])
|
||||||
(*defforms #f
|
(*defforms #f
|
||||||
'(spec) (list (lambda (ignored) (schemeblock0/form spec)))
|
'(spec) (list (lambda (ignored) (racketblock0/form spec)))
|
||||||
null null
|
null null
|
||||||
(list (list (lambda () (scheme contract-id))
|
(list (list (lambda () (racket contract-id))
|
||||||
(lambda () (schemeblock0 contract-expr)))
|
(lambda () (racketblock0 contract-expr)))
|
||||||
...)
|
...)
|
||||||
(lambda () (list desc ...)))))]
|
(lambda () (list desc ...)))))]
|
||||||
[(fm #:literals (lit ...) spec desc ...)
|
[(fm #:literals (lit ...) spec desc ...)
|
||||||
|
@ -182,7 +182,7 @@
|
||||||
(define-syntax (defidform stx)
|
(define-syntax (defidform stx)
|
||||||
(syntax-case stx ()
|
(syntax-case stx ()
|
||||||
[(_ spec-id desc ...)
|
[(_ spec-id desc ...)
|
||||||
#'(with-togetherable-scheme-variables
|
#'(with-togetherable-racket-variables
|
||||||
()
|
()
|
||||||
()
|
()
|
||||||
(*defforms (quote-syntax/loc spec-id)
|
(*defforms (quote-syntax/loc spec-id)
|
||||||
|
@ -212,18 +212,18 @@
|
||||||
[(_ has-kw? #:literals (lit ...) spec ([non-term-id non-term-form ...] ...)
|
[(_ has-kw? #:literals (lit ...) spec ([non-term-id non-term-form ...] ...)
|
||||||
#:contracts ([contract-nonterm contract-expr] ...)
|
#:contracts ([contract-nonterm contract-expr] ...)
|
||||||
desc ...)
|
desc ...)
|
||||||
(with-scheme-variables
|
(with-racket-variables
|
||||||
(lit ...)
|
(lit ...)
|
||||||
([form/maybe (has-kw? spec)]
|
([form/maybe (has-kw? spec)]
|
||||||
[non-term (non-term-id non-term-form ...)] ...)
|
[non-term (non-term-id non-term-form ...)] ...)
|
||||||
(*specsubform 'spec '(lit ...) (lambda () (schemeblock0/form spec))
|
(*specsubform 'spec '(lit ...) (lambda () (racketblock0/form spec))
|
||||||
'((non-term-id non-term-form ...) ...)
|
'((non-term-id non-term-form ...) ...)
|
||||||
(list (list (lambda () (scheme non-term-id))
|
(list (list (lambda () (racket non-term-id))
|
||||||
(lambda () (schemeblock0/form non-term-form))
|
(lambda () (racketblock0/form non-term-form))
|
||||||
...)
|
...)
|
||||||
...)
|
...)
|
||||||
(list (list (lambda () (scheme contract-nonterm))
|
(list (list (lambda () (racket contract-nonterm))
|
||||||
(lambda () (schemeblock0 contract-expr)))
|
(lambda () (racketblock0 contract-expr)))
|
||||||
...)
|
...)
|
||||||
(lambda () (list desc ...))))]
|
(lambda () (list desc ...))))]
|
||||||
[(_ has-kw? #:literals (lit ...) spec ([non-term-id non-term-form ...] ...)
|
[(_ has-kw? #:literals (lit ...) spec ([non-term-id non-term-form ...] ...)
|
||||||
|
@ -272,7 +272,7 @@
|
||||||
desc ...)]))
|
desc ...)]))
|
||||||
|
|
||||||
(define-syntax-rule (specsubform/inline spec desc ...)
|
(define-syntax-rule (specsubform/inline spec desc ...)
|
||||||
(with-scheme-variables
|
(with-racket-variables
|
||||||
()
|
()
|
||||||
([form/maybe (#f spec)])
|
([form/maybe (#f spec)])
|
||||||
(*specsubform 'spec null #f null null null (lambda () (list desc ...)))))
|
(*specsubform 'spec null #f null null null (lambda () (list desc ...)))))
|
||||||
|
@ -280,26 +280,26 @@
|
||||||
(define-syntax racketgrammar
|
(define-syntax racketgrammar
|
||||||
(syntax-rules ()
|
(syntax-rules ()
|
||||||
[(_ #:literals (lit ...) id clause ...)
|
[(_ #:literals (lit ...) id clause ...)
|
||||||
(with-scheme-variables
|
(with-racket-variables
|
||||||
(lit ...)
|
(lit ...)
|
||||||
([non-term (id clause ...)])
|
([non-term (id clause ...)])
|
||||||
(*racketgrammar '(lit ...)
|
(*racketgrammar '(lit ...)
|
||||||
'(id clause ...)
|
'(id clause ...)
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(list (list (scheme id)
|
(list (list (racket id)
|
||||||
(schemeblock0/form clause) ...)))))]
|
(racketblock0/form clause) ...)))))]
|
||||||
[(_ id clause ...) (racketgrammar #:literals () id clause ...)]))
|
[(_ id clause ...) (racketgrammar #:literals () id clause ...)]))
|
||||||
|
|
||||||
(define-syntax racketgrammar*
|
(define-syntax racketgrammar*
|
||||||
(syntax-rules ()
|
(syntax-rules ()
|
||||||
[(_ #:literals (lit ...) [id clause ...] ...)
|
[(_ #:literals (lit ...) [id clause ...] ...)
|
||||||
(with-scheme-variables
|
(with-racket-variables
|
||||||
(lit ...)
|
(lit ...)
|
||||||
([non-term (id clause ...)] ...)
|
([non-term (id clause ...)] ...)
|
||||||
(*racketgrammar '(lit ...)
|
(*racketgrammar '(lit ...)
|
||||||
'(id ... clause ... ...)
|
'(id ... clause ... ...)
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(list (list (scheme id) (schemeblock0/form clause) ...)
|
(list (list (racket id) (racketblock0/form clause) ...)
|
||||||
...))))]
|
...))))]
|
||||||
[(_ [id clause ...] ...)
|
[(_ [id clause ...] ...)
|
||||||
(racketgrammar* #:literals () [id clause ...] ...)]))
|
(racketgrammar* #:literals () [id clause ...] ...)]))
|
||||||
|
@ -363,7 +363,7 @@
|
||||||
(list (let ([l (map (lambda (sub)
|
(list (let ([l (map (lambda (sub)
|
||||||
(map (lambda (f) (f)) sub))
|
(map (lambda (f) (f)) sub))
|
||||||
sub-procs)])
|
sub-procs)])
|
||||||
(*schemerawgrammars "specgrammar"
|
(*racketrawgrammars "specgrammar"
|
||||||
(map car l)
|
(map car l)
|
||||||
(map cdr l))))))))
|
(map cdr l))))))))
|
||||||
(make-contracts-table contract-procs)))
|
(make-contracts-table contract-procs)))
|
||||||
|
@ -391,13 +391,13 @@
|
||||||
(list (let ([l (map (lambda (sub)
|
(list (let ([l (map (lambda (sub)
|
||||||
(map (lambda (f) (f)) sub))
|
(map (lambda (f) (f)) sub))
|
||||||
sub-procs)])
|
sub-procs)])
|
||||||
(*schemerawgrammars "specgrammar"
|
(*racketrawgrammars "specgrammar"
|
||||||
(map car l)
|
(map car l)
|
||||||
(map cdr l))))))))
|
(map cdr l))))))))
|
||||||
(make-contracts-table contract-procs))))
|
(make-contracts-table contract-procs))))
|
||||||
(flow-paragraphs (decode-flow (content-thunk)))))))
|
(flow-paragraphs (decode-flow (content-thunk)))))))
|
||||||
|
|
||||||
(define (*schemerawgrammars style nonterms clauseses)
|
(define (*racketrawgrammars style nonterms clauseses)
|
||||||
(make-table
|
(make-table
|
||||||
`((valignment baseline baseline baseline baseline baseline)
|
`((valignment baseline baseline baseline baseline baseline)
|
||||||
(alignment right left center left left)
|
(alignment right left center left left)
|
||||||
|
@ -417,12 +417,12 @@
|
||||||
(cdr clauses))))
|
(cdr clauses))))
|
||||||
nonterms clauseses))))
|
nonterms clauseses))))
|
||||||
|
|
||||||
(define (*schemerawgrammar style nonterm clause1 . clauses)
|
(define (*racketrawgrammar style nonterm clause1 . clauses)
|
||||||
(*schemerawgrammars style (list nonterm) (list (cons clause1 clauses))))
|
(*racketrawgrammars style (list nonterm) (list (cons clause1 clauses))))
|
||||||
|
|
||||||
(define (*racketgrammar lits s-expr clauseses-thunk)
|
(define (*racketgrammar lits s-expr clauseses-thunk)
|
||||||
(let ([l (clauseses-thunk)])
|
(let ([l (clauseses-thunk)])
|
||||||
(*schemerawgrammars #f
|
(*racketrawgrammars #f
|
||||||
(map (lambda (x)
|
(map (lambda (x)
|
||||||
(make-element #f
|
(make-element #f
|
||||||
(list (hspace 2)
|
(list (hspace 2)
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
(define-syntax defmodule*/no-declare
|
(define-syntax defmodule*/no-declare
|
||||||
(syntax-rules ()
|
(syntax-rules ()
|
||||||
[(_ #:require-form req (name ...) . content)
|
[(_ #:require-form req (name ...) . content)
|
||||||
(*defmodule (list (schememodname name) ...)
|
(*defmodule (list (racketmodname name) ...)
|
||||||
#f
|
#f
|
||||||
#f
|
#f
|
||||||
(list . content)
|
(list . content)
|
||||||
|
@ -52,19 +52,30 @@
|
||||||
(define-syntax defmodulelang*/no-declare
|
(define-syntax defmodulelang*/no-declare
|
||||||
(syntax-rules ()
|
(syntax-rules ()
|
||||||
[(_ (lang ...) #:module-paths (modpath ...) . content)
|
[(_ (lang ...) #:module-paths (modpath ...) . content)
|
||||||
(*defmodule (list lang ...) (list (schememodname modpath) ...) #t (list . content) #f)]
|
(*defmodule (list lang ...)
|
||||||
|
(list (racketmodname modpath) ...)
|
||||||
|
#t (list . content) #f)]
|
||||||
[(_ (lang ...) . content)
|
[(_ (lang ...) . content)
|
||||||
(*defmodule (list (schememodname lang) ...) #f #t (list . content) #f)]))
|
(*defmodule (list (racketmodname lang) ...)
|
||||||
|
#f #t (list . content) #f)]))
|
||||||
|
|
||||||
(define-syntax defmodulelang*
|
(define-syntax defmodulelang*
|
||||||
(syntax-rules ()
|
(syntax-rules ()
|
||||||
[(_ (name ...) #:module-paths (modpath ...) #:use-sources (pname ...) . content)
|
[(_ (name ...) #:module-paths (modpath ...)
|
||||||
|
#:use-sources (pname ...)
|
||||||
|
. content)
|
||||||
(begin (declare-exporting modpath ... #:use-sources (pname ...))
|
(begin (declare-exporting modpath ... #:use-sources (pname ...))
|
||||||
(defmodulelang*/no-declare (name ...) #:module-paths (modpath ...) . content))]
|
(defmodulelang*/no-declare (name ...)
|
||||||
|
#:module-paths (modpath ...)
|
||||||
|
. content))]
|
||||||
[(_ (name ...) #:module-paths (modpath ...) . content)
|
[(_ (name ...) #:module-paths (modpath ...) . content)
|
||||||
(defmodulelang* (name ...) #:module-paths (modpath ...) #:use-sources () . content)]
|
(defmodulelang* (name ...)
|
||||||
|
#:module-paths (modpath ...)
|
||||||
|
#:use-sources () . content)]
|
||||||
[(_ (name ...) #:use-sources (pname ...) . content)
|
[(_ (name ...) #:use-sources (pname ...) . content)
|
||||||
(defmodulelang* ((schememodname name) ...) #:module-paths (name ...) #:use-sources (pname ...) . content)]
|
(defmodulelang* ((racketmodname name) ...)
|
||||||
|
#:module-paths (name ...)
|
||||||
|
#:use-sources (pname ...) . content)]
|
||||||
[(_ (name ...) . content)
|
[(_ (name ...) . content)
|
||||||
(defmodulelang* (name ...) #:use-sources () . content)]))
|
(defmodulelang* (name ...) #:use-sources () . content)]))
|
||||||
|
|
||||||
|
@ -76,7 +87,8 @@
|
||||||
(defmodulelang* (lang) . content)]))
|
(defmodulelang* (lang) . content)]))
|
||||||
|
|
||||||
(define-syntax-rule (defmodulereader*/no-declare (lang ...) . content)
|
(define-syntax-rule (defmodulereader*/no-declare (lang ...) . content)
|
||||||
(*defmodule (list (schememodname lang) ...) #f 'reader (list . content) #f))
|
(*defmodule (list (racketmodname lang) ...)
|
||||||
|
#f 'reader (list . content) #f))
|
||||||
|
|
||||||
(define-syntax defmodulereader*
|
(define-syntax defmodulereader*
|
||||||
(syntax-rules ()
|
(syntax-rules ()
|
||||||
|
@ -105,13 +117,13 @@
|
||||||
spacer
|
spacer
|
||||||
(case lang
|
(case lang
|
||||||
[(#f)
|
[(#f)
|
||||||
(list (scheme (#,req #,(make-defschememodname name modpath))))]
|
(list (racket (#,req #,(make-defracketmodname name modpath))))]
|
||||||
[(#t)
|
[(#t)
|
||||||
(list (hash-lang) spacer (make-defschememodname name modpath))]
|
(list (hash-lang) spacer (make-defracketmodname name modpath))]
|
||||||
[(reader)
|
[(reader)
|
||||||
(list (schememetafont "#reader") spacer (make-defschememodname name modpath))]
|
(list (racketmetafont "#reader") spacer (make-defracketmodname name modpath))]
|
||||||
[(just-lang)
|
[(just-lang)
|
||||||
(list (hash-lang) spacer (make-defschememodname name modpath))])))))))
|
(list (hash-lang) spacer (make-defracketmodname name modpath))])))))))
|
||||||
names
|
names
|
||||||
modpaths))
|
modpaths))
|
||||||
(append (map (lambda (modpath)
|
(append (map (lambda (modpath)
|
||||||
|
@ -119,7 +131,7 @@
|
||||||
modpaths)
|
modpaths)
|
||||||
(flow-paragraphs (decode-flow content)))))))
|
(flow-paragraphs (decode-flow content)))))))
|
||||||
|
|
||||||
(define (make-defschememodname mn mp)
|
(define (make-defracketmodname mn mp)
|
||||||
(let ([name-str (element->string mn)]
|
(let ([name-str (element->string mn)]
|
||||||
[path-str (element->string mp)])
|
[path-str (element->string mp)])
|
||||||
(make-index-element #f
|
(make-index-element #f
|
||||||
|
|
|
@ -34,26 +34,26 @@
|
||||||
(make-element meta-color (list "...+")))
|
(make-element meta-color (list "...+")))
|
||||||
|
|
||||||
(define (make-openers n)
|
(define (make-openers n)
|
||||||
(schemeparenfont
|
(racketparenfont
|
||||||
(case n [(1) "("] [(0) ""] [(2) "(("] [else (make-string n #\()])))
|
(case n [(1) "("] [(0) ""] [(2) "(("] [else (make-string n #\()])))
|
||||||
(define (make-closers n)
|
(define (make-closers n)
|
||||||
(schemeparenfont
|
(racketparenfont
|
||||||
(case n [(1) ")"] [(0) ""] [(2) "))"] [else (make-string n #\()])))
|
(case n [(1) ")"] [(0) ""] [(2) "))"] [else (make-string n #\()])))
|
||||||
|
|
||||||
(define-syntax (arg-contract stx)
|
(define-syntax (arg-contract stx)
|
||||||
(syntax-case stx (... ...+ _...superclass-args...)
|
(syntax-case stx (... ...+ _...superclass-args...)
|
||||||
[(_ [id contract])
|
[(_ [id contract])
|
||||||
(identifier? #'id)
|
(identifier? #'id)
|
||||||
#'(schemeblock0 contract)]
|
#'(racketblock0 contract)]
|
||||||
[(_ [id contract val])
|
[(_ [id contract val])
|
||||||
(identifier? #'id)
|
(identifier? #'id)
|
||||||
#'(schemeblock0 contract)]
|
#'(racketblock0 contract)]
|
||||||
[(_ [kw id contract])
|
[(_ [kw id contract])
|
||||||
(and (keyword? (syntax-e #'kw)) (identifier? #'id))
|
(and (keyword? (syntax-e #'kw)) (identifier? #'id))
|
||||||
#'(schemeblock0 contract)]
|
#'(racketblock0 contract)]
|
||||||
[(_ [kw id contract val])
|
[(_ [kw id contract val])
|
||||||
(and (keyword? (syntax-e #'kw)) (identifier? #'id))
|
(and (keyword? (syntax-e #'kw)) (identifier? #'id))
|
||||||
#'(schemeblock0 contract)]
|
#'(racketblock0 contract)]
|
||||||
[(_ (... ...)) #'#f]
|
[(_ (... ...)) #'#f]
|
||||||
[(_ (... ...+)) #'#f]
|
[(_ (... ...+)) #'#f]
|
||||||
[(_ _...superclass-args...) #'#f]
|
[(_ _...superclass-args...) #'#f]
|
||||||
|
@ -66,13 +66,13 @@
|
||||||
#'#f]
|
#'#f]
|
||||||
[(_ [id contract val])
|
[(_ [id contract val])
|
||||||
(identifier? #'id)
|
(identifier? #'id)
|
||||||
#'(schemeblock0 val)]
|
#'(racketblock0 val)]
|
||||||
[(_ [kw id contract])
|
[(_ [kw id contract])
|
||||||
(keyword? (syntax-e #'kw))
|
(keyword? (syntax-e #'kw))
|
||||||
#'#f]
|
#'#f]
|
||||||
[(_ [kw id contract val])
|
[(_ [kw id contract val])
|
||||||
(keyword? (syntax-e #'kw))
|
(keyword? (syntax-e #'kw))
|
||||||
#'(schemeblock0 val)]
|
#'(racketblock0 val)]
|
||||||
[_ #'#f]))
|
[_ #'#f]))
|
||||||
|
|
||||||
(define-syntax (extract-proc-id stx)
|
(define-syntax (extract-proc-id stx)
|
||||||
|
@ -105,12 +105,12 @@
|
||||||
(define-syntax (result-contract stx)
|
(define-syntax (result-contract stx)
|
||||||
(syntax-case stx (values)
|
(syntax-case stx (values)
|
||||||
[(_ (values c ...))
|
[(_ (values c ...))
|
||||||
#'(list (schemeblock0 c) ...)]
|
#'(list (racketblock0 c) ...)]
|
||||||
[(_ c)
|
[(_ c)
|
||||||
(if (string? (syntax-e #'c))
|
(if (string? (syntax-e #'c))
|
||||||
(raise-syntax-error 'defproc
|
(raise-syntax-error 'defproc
|
||||||
"expected a result contract, found a string" #'c)
|
"expected a result contract, found a string" #'c)
|
||||||
#'(schemeblock0 c))]))
|
#'(racketblock0 c))]))
|
||||||
|
|
||||||
(define-syntax-rule (defproc (id arg ...) result desc ...)
|
(define-syntax-rule (defproc (id arg ...) result desc ...)
|
||||||
(defproc* [[(id arg ...) result]] desc ...))
|
(defproc* [[(id arg ...) result]] desc ...))
|
||||||
|
@ -120,7 +120,7 @@
|
||||||
[(_ [[proto result] ...] desc ...)
|
[(_ [[proto result] ...] desc ...)
|
||||||
(defproc* #:mode procedure #:within #f [[proto result] ...] desc ...)]
|
(defproc* #:mode procedure #:within #f [[proto result] ...] desc ...)]
|
||||||
[(_ #:mode m #:within cl [[proto result] ...] desc ...)
|
[(_ #:mode m #:within cl [[proto result] ...] desc ...)
|
||||||
(with-togetherable-scheme-variables
|
(with-togetherable-racket-variables
|
||||||
()
|
()
|
||||||
([proc proto] ...)
|
([proc proto] ...)
|
||||||
(*defproc 'm (quote-syntax/loc cl)
|
(*defproc 'm (quote-syntax/loc cl)
|
||||||
|
@ -142,11 +142,11 @@
|
||||||
(if (arg-kw arg)
|
(if (arg-kw arg)
|
||||||
(if (eq? mode 'new)
|
(if (eq? mode 'new)
|
||||||
(make-element
|
(make-element
|
||||||
#f (list (schemeparenfont "[")
|
#f (list (racketparenfont "[")
|
||||||
(schemeidfont (keyword->string (arg-kw arg)))
|
(racketidfont (keyword->string (arg-kw arg)))
|
||||||
spacer
|
spacer
|
||||||
(to-element (make-var-id (arg-id arg)))
|
(to-element (make-var-id (arg-id arg)))
|
||||||
(schemeparenfont "]")))
|
(racketparenfont "]")))
|
||||||
(make-element
|
(make-element
|
||||||
#f (list (to-element (arg-kw arg))
|
#f (list (to-element (arg-kw arg))
|
||||||
spacer
|
spacer
|
||||||
|
@ -237,14 +237,14 @@
|
||||||
(define tagged
|
(define tagged
|
||||||
(cond
|
(cond
|
||||||
[(eq? mode 'new)
|
[(eq? mode 'new)
|
||||||
(make-element #f (list (scheme new) spacer (to-element within-id)))]
|
(make-element #f (list (racket new) spacer (to-element within-id)))]
|
||||||
[(eq? mode 'make)
|
[(eq? mode 'make)
|
||||||
(make-element
|
(make-element
|
||||||
#f (list (scheme make-object) spacer (to-element within-id)))]
|
#f (list (racket make-object) spacer (to-element within-id)))]
|
||||||
[(eq? mode 'send)
|
[(eq? mode 'send)
|
||||||
(make-element
|
(make-element
|
||||||
#f
|
#f
|
||||||
(list (scheme send) spacer
|
(list (racket send) spacer
|
||||||
(name-this-object (syntax-e within-id)) spacer
|
(name-this-object (syntax-e within-id)) spacer
|
||||||
(if first?
|
(if first?
|
||||||
(let* ([mname (extract-id prototype)]
|
(let* ([mname (extract-id prototype)]
|
||||||
|
@ -350,7 +350,7 @@
|
||||||
(append-map (lambda (arg)
|
(append-map (lambda (arg)
|
||||||
(list spacer ((arg->elem #t) arg)))
|
(list spacer ((arg->elem #t) arg)))
|
||||||
args))
|
args))
|
||||||
,(schemeparenfont ")"))))
|
,(racketparenfont ")"))))
|
||||||
(if result-next-line? null end))))
|
(if result-next-line? null end))))
|
||||||
;; The multi-line case:
|
;; The multi-line case:
|
||||||
(let ([not-end (if result-next-line?
|
(let ([not-end (if result-next-line?
|
||||||
|
@ -403,7 +403,7 @@
|
||||||
[(null? ((if dots-next? cddr cdr) args))
|
[(null? ((if dots-next? cddr cdr) args))
|
||||||
(make-element
|
(make-element
|
||||||
#f
|
#f
|
||||||
(list a next (schemeparenfont ")")))]
|
(list a next (racketparenfont ")")))]
|
||||||
[(equal? next "") a]
|
[(equal? next "") a]
|
||||||
[else
|
[else
|
||||||
(make-element #f (list a next))])))
|
(make-element #f (list a next))])))
|
||||||
|
@ -544,12 +544,12 @@
|
||||||
|
|
||||||
(define-syntax-rule (**defstruct name ([field field-contract] ...) immutable?
|
(define-syntax-rule (**defstruct name ([field field-contract] ...) immutable?
|
||||||
transparent? prefab? cname extra-cname? desc ...)
|
transparent? prefab? cname extra-cname? desc ...)
|
||||||
(with-togetherable-scheme-variables
|
(with-togetherable-racket-variables
|
||||||
()
|
()
|
||||||
()
|
()
|
||||||
(*defstruct (quote-syntax/loc name) 'name (quote-syntax/loc cname) extra-cname?
|
(*defstruct (quote-syntax/loc name) 'name (quote-syntax/loc cname) extra-cname?
|
||||||
'([field field-contract] ...)
|
'([field field-contract] ...)
|
||||||
(list (lambda () (schemeblock0 field-contract)) ...)
|
(list (lambda () (racketblock0 field-contract)) ...)
|
||||||
immutable? transparent? prefab? (lambda () (list desc ...)))))
|
immutable? transparent? prefab? (lambda () (list desc ...)))))
|
||||||
|
|
||||||
(define (*defstruct stx-id name alt-cname-id extra-cname?
|
(define (*defstruct stx-id name alt-cname-id extra-cname?
|
||||||
|
@ -640,7 +640,7 @@
|
||||||
(make-omitable-paragraph
|
(make-omitable-paragraph
|
||||||
(list
|
(list
|
||||||
(to-element
|
(to-element
|
||||||
`(,(scheme struct)
|
`(,(racket struct)
|
||||||
,the-name
|
,the-name
|
||||||
,(map field-view fields)))))
|
,(map field-view fields)))))
|
||||||
(let* ([one-right-column?
|
(let* ([one-right-column?
|
||||||
|
@ -658,8 +658,8 @@
|
||||||
(append
|
(append
|
||||||
(list (to-flow (make-element #f
|
(list (to-flow (make-element #f
|
||||||
(list
|
(list
|
||||||
(schemeparenfont "(")
|
(racketparenfont "(")
|
||||||
(scheme struct))))
|
(racket struct))))
|
||||||
flow-spacer)
|
flow-spacer)
|
||||||
(if one-right-column?
|
(if one-right-column?
|
||||||
(list (to-flow (make-element
|
(list (to-flow (make-element
|
||||||
|
@ -671,11 +671,11 @@
|
||||||
(if (and immutable?
|
(if (and immutable?
|
||||||
(not transparent?)
|
(not transparent?)
|
||||||
(not cname-id))
|
(not cname-id))
|
||||||
(list (schemeparenfont ")"))
|
(list (racketparenfont ")"))
|
||||||
null)))))
|
null)))))
|
||||||
(list (to-flow the-name)
|
(list (to-flow the-name)
|
||||||
(to-flow (make-element
|
(to-flow (make-element
|
||||||
#f (list spacer (schemeparenfont "("))))
|
#f (list spacer (racketparenfont "("))))
|
||||||
(to-flow (to-element (field-view (car fields))))))))
|
(to-flow (to-element (field-view (car fields))))))))
|
||||||
(if (short-width . < . max-proto-width)
|
(if (short-width . < . max-proto-width)
|
||||||
null
|
null
|
||||||
|
@ -692,7 +692,7 @@
|
||||||
(if (null? (cdr fields))
|
(if (null? (cdr fields))
|
||||||
(make-element
|
(make-element
|
||||||
#f
|
#f
|
||||||
(list e (schemeparenfont
|
(list e (racketparenfont
|
||||||
(if (and immutable?
|
(if (and immutable?
|
||||||
(not transparent?)
|
(not transparent?)
|
||||||
(not cname-id))
|
(not cname-id))
|
||||||
|
@ -712,7 +712,7 @@
|
||||||
(to-element cname-id))
|
(to-element cname-id))
|
||||||
(if (and immutable?
|
(if (and immutable?
|
||||||
(not transparent?))
|
(not transparent?))
|
||||||
(list (schemeparenfont ")"))
|
(list (racketparenfont ")"))
|
||||||
null))))))
|
null))))))
|
||||||
null)
|
null)
|
||||||
(cond
|
(cond
|
||||||
|
@ -724,13 +724,13 @@
|
||||||
(list (if prefab?
|
(list (if prefab?
|
||||||
(to-element '#:prefab)
|
(to-element '#:prefab)
|
||||||
(to-element '#:transparent))
|
(to-element '#:transparent))
|
||||||
(schemeparenfont ")"))))))]
|
(racketparenfont ")"))))))]
|
||||||
[(not immutable?)
|
[(not immutable?)
|
||||||
(list
|
(list
|
||||||
(a-right-column (to-flow (make-element
|
(a-right-column (to-flow (make-element
|
||||||
#f
|
#f
|
||||||
(list (to-element '#:mutable)
|
(list (to-element '#:mutable)
|
||||||
(schemeparenfont ")"))))))]
|
(racketparenfont ")"))))))]
|
||||||
[transparent?
|
[transparent?
|
||||||
(list
|
(list
|
||||||
(a-right-column (to-flow (make-element
|
(a-right-column (to-flow (make-element
|
||||||
|
@ -738,7 +738,7 @@
|
||||||
(list (if prefab?
|
(list (if prefab?
|
||||||
(to-element '#:prefab)
|
(to-element '#:prefab)
|
||||||
(to-element '#:transparent))
|
(to-element '#:transparent))
|
||||||
(schemeparenfont ")"))))))]
|
(racketparenfont ")"))))))]
|
||||||
[else null])))))))))
|
[else null])))))))))
|
||||||
(map (lambda (v field-contract)
|
(map (lambda (v field-contract)
|
||||||
(cond
|
(cond
|
||||||
|
@ -763,19 +763,19 @@
|
||||||
;; ----------------------------------------
|
;; ----------------------------------------
|
||||||
|
|
||||||
(define-syntax-rule (defthing id result desc ...)
|
(define-syntax-rule (defthing id result desc ...)
|
||||||
(with-togetherable-scheme-variables
|
(with-togetherable-racket-variables
|
||||||
()
|
()
|
||||||
()
|
()
|
||||||
(*defthing (list (quote-syntax/loc id)) (list 'id) #f
|
(*defthing (list (quote-syntax/loc id)) (list 'id) #f
|
||||||
(list (schemeblock0 result))
|
(list (racketblock0 result))
|
||||||
(lambda () (list desc ...)))))
|
(lambda () (list desc ...)))))
|
||||||
|
|
||||||
(define-syntax-rule (defthing* ([id result] ...) desc ...)
|
(define-syntax-rule (defthing* ([id result] ...) desc ...)
|
||||||
(with-togetherable-scheme-variables
|
(with-togetherable-racket-variables
|
||||||
()
|
()
|
||||||
()
|
()
|
||||||
(*defthing (list (quote-syntax/loc id) ...) (list 'id ...) #f
|
(*defthing (list (quote-syntax/loc id) ...) (list 'id ...) #f
|
||||||
(list (schemeblock0 result) ...)
|
(list (racketblock0 result) ...)
|
||||||
(lambda () (list desc ...)))))
|
(lambda () (list desc ...)))))
|
||||||
|
|
||||||
(define (*defthing stx-ids names form? result-contracts content-thunk
|
(define (*defthing stx-ids names form? result-contracts content-thunk
|
||||||
|
@ -887,7 +887,7 @@
|
||||||
(list content)
|
(list content)
|
||||||
tag
|
tag
|
||||||
(list name)
|
(list name)
|
||||||
(list (schemeidfont (make-element value-link-color
|
(list (racketidfont (make-element value-link-color
|
||||||
(list name))))
|
(list name))))
|
||||||
(with-exporting-libraries
|
(with-exporting-libraries
|
||||||
(lambda (libs)
|
(lambda (libs)
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
sigelem)
|
sigelem)
|
||||||
|
|
||||||
(define-syntax-rule (defsignature name (super ...) body ...)
|
(define-syntax-rule (defsignature name (super ...) body ...)
|
||||||
(with-togetherable-scheme-variables
|
(with-togetherable-racket-variables
|
||||||
()
|
()
|
||||||
()
|
()
|
||||||
(*defsignature (quote-syntax name)
|
(*defsignature (quote-syntax name)
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
#t)))
|
#t)))
|
||||||
|
|
||||||
(define-syntax-rule (defsignature/splice name (super ...) body ...)
|
(define-syntax-rule (defsignature/splice name (super ...) body ...)
|
||||||
(with-togetherable-scheme-variables
|
(with-togetherable-racket-variables
|
||||||
()
|
()
|
||||||
()
|
()
|
||||||
(*defsignature (quote-syntax name)
|
(*defsignature (quote-syntax name)
|
||||||
|
|
|
@ -15,16 +15,16 @@
|
||||||
(provide/contract
|
(provide/contract
|
||||||
[struct (box-splice splice) ([run list?])]) ; XXX ugly copying
|
[struct (box-splice splice) ([run list?])]) ; XXX ugly copying
|
||||||
(provide deftogether *deftogether
|
(provide deftogether *deftogether
|
||||||
with-scheme-variables
|
with-racket-variables
|
||||||
with-togetherable-scheme-variables)
|
with-togetherable-racket-variables)
|
||||||
|
|
||||||
(begin-for-syntax (define-struct deftogether-tag () #:omit-define-syntaxes))
|
(begin-for-syntax (define-struct deftogether-tag () #:omit-define-syntaxes))
|
||||||
|
|
||||||
(define-syntax (with-togetherable-scheme-variables stx)
|
(define-syntax (with-togetherable-racket-variables stx)
|
||||||
(syntax-case stx ()
|
(syntax-case stx ()
|
||||||
[(_ . rest)
|
[(_ . rest)
|
||||||
(let ([result (syntax/loc stx
|
(let ([result (syntax/loc stx
|
||||||
(with-togetherable-scheme-variables* . rest))]
|
(with-togetherable-racket-variables* . rest))]
|
||||||
[ctx (syntax-local-context)])
|
[ctx (syntax-local-context)])
|
||||||
(if (and (pair? ctx) (deftogether-tag? (car ctx)))
|
(if (and (pair? ctx) (deftogether-tag? (car ctx)))
|
||||||
;; Make it transparent, so deftogether is allowed to pull it apart
|
;; Make it transparent, so deftogether is allowed to pull it apart
|
||||||
|
@ -36,10 +36,10 @@
|
||||||
;; that we introduce later.
|
;; that we introduce later.
|
||||||
result))]))
|
result))]))
|
||||||
|
|
||||||
(define-syntax-rule (with-togetherable-scheme-variables* . rest)
|
(define-syntax-rule (with-togetherable-racket-variables* . rest)
|
||||||
(with-scheme-variables . rest))
|
(with-racket-variables . rest))
|
||||||
|
|
||||||
(define-syntax (with-scheme-variables stx)
|
(define-syntax (with-racket-variables stx)
|
||||||
(syntax-case stx ()
|
(syntax-case stx ()
|
||||||
[(_ lits ([kind s-exp] ...) body)
|
[(_ lits ([kind s-exp] ...) body)
|
||||||
(let ([ht (make-bound-identifier-mapping)]
|
(let ([ht (make-bound-identifier-mapping)]
|
||||||
|
@ -137,10 +137,10 @@
|
||||||
def
|
def
|
||||||
(list (make-deftogether-tag))
|
(list (make-deftogether-tag))
|
||||||
(cons
|
(cons
|
||||||
#'with-togetherable-scheme-variables*
|
#'with-togetherable-racket-variables*
|
||||||
(kernel-form-identifier-list)))])
|
(kernel-form-identifier-list)))])
|
||||||
(syntax-case exp-def (with-togetherable-scheme-variables*)
|
(syntax-case exp-def (with-togetherable-racket-variables*)
|
||||||
[(with-togetherable-scheme-variables* lits vars decl)
|
[(with-togetherable-racket-variables* lits vars decl)
|
||||||
exp-def]
|
exp-def]
|
||||||
[_
|
[_
|
||||||
(raise-syntax-error
|
(raise-syntax-error
|
||||||
|
@ -149,7 +149,7 @@
|
||||||
stx
|
stx
|
||||||
def)])))
|
def)])))
|
||||||
(syntax->list #'(def ...)))])
|
(syntax->list #'(def ...)))])
|
||||||
#'(with-togetherable-scheme-variables
|
#'(with-togetherable-racket-variables
|
||||||
(lit ... ...)
|
(lit ... ...)
|
||||||
(var ... ...)
|
(var ... ...)
|
||||||
(*deftogether (list decl ...) (lambda () (list . body)))))]))
|
(*deftogether (list decl ...) (lambda () (list . body)))))]))
|
||||||
|
|
|
@ -629,7 +629,7 @@ for Latex output (see @secref["extra-style"]). The following
|
||||||
|
|
||||||
Produces another block during the @tech{traverse pass}, eventually.
|
Produces another block during the @tech{traverse pass}, eventually.
|
||||||
|
|
||||||
The @scheme[traverse] procedure is called with @racket[_get] and
|
The @racket[traverse] procedure is called with @racket[_get] and
|
||||||
@racket[_set] procedures to get and set symbol-keyed information; the
|
@racket[_set] procedures to get and set symbol-keyed information; the
|
||||||
@racket[traverse] procedure should return either a @tech{block} (which
|
@racket[traverse] procedure should return either a @tech{block} (which
|
||||||
effectively takes the @racket[traverse-block]'s place) or a procedure
|
effectively takes the @racket[traverse-block]'s place) or a procedure
|
||||||
|
@ -640,10 +640,10 @@ All @racket[traverse-element] and @racket[traverse-block]s that have
|
||||||
not been replaced are forced in document order relative to each other
|
not been replaced are forced in document order relative to each other
|
||||||
during an iteration of the @tech{traverse pass}.
|
during an iteration of the @tech{traverse pass}.
|
||||||
|
|
||||||
The @racket[_get] procedure passed to @scheme[traverse] takes a symbol
|
The @racket[_get] procedure passed to @racket[traverse] takes a symbol
|
||||||
and any value to act as a default; it returns information registered
|
and any value to act as a default; it returns information registered
|
||||||
for the symbol or the given default if no value has been
|
for the symbol or the given default if no value has been
|
||||||
registered. The @racket[_set] procedure passed to @scheme[traverse]
|
registered. The @racket[_set] procedure passed to @racket[traverse]
|
||||||
takes a symbol and a value to registered for the symbol.
|
takes a symbol and a value to registered for the symbol.
|
||||||
|
|
||||||
@margin-note*{See also @racket[cond-block] in @racketmodname[scriblib/render-cond].}
|
@margin-note*{See also @racket[cond-block] in @racketmodname[scriblib/render-cond].}
|
||||||
|
@ -1204,7 +1204,7 @@ Produces the content that replaces @racket[e].}
|
||||||
|
|
||||||
Defined as
|
Defined as
|
||||||
|
|
||||||
@schemeblock[
|
@racketblock[
|
||||||
(recursive-contract
|
(recursive-contract
|
||||||
((symbol? any/c . -> . any/c)
|
((symbol? any/c . -> . any/c)
|
||||||
(symbol? any/c . -> . any)
|
(symbol? any/c . -> . any)
|
||||||
|
@ -1216,7 +1216,7 @@ Defined as
|
||||||
|
|
||||||
Defined as
|
Defined as
|
||||||
|
|
||||||
@schemeblock[
|
@racketblock[
|
||||||
(recursive-contract
|
(recursive-contract
|
||||||
((symbol? any/c . -> . any/c)
|
((symbol? any/c . -> . any/c)
|
||||||
(symbol? any/c . -> . any)
|
(symbol? any/c . -> . any)
|
||||||
|
|
|
@ -13,5 +13,5 @@ and this one:
|
||||||
|
|
||||||
that, when assembled, produce a complete program, in this case:
|
that, when assembled, produce a complete program, in this case:
|
||||||
|
|
||||||
@schemeblock[(define (f x)
|
@racketblock[(define (f x)
|
||||||
(* x x))]
|
(* x x))]
|
||||||
|
|
|
@ -3,6 +3,6 @@
|
||||||
|
|
||||||
@title{Racket Manual Format}
|
@title{Racket Manual Format}
|
||||||
|
|
||||||
The @schememodname[scribble/manual] language is a major component of
|
The @racketmodname[scribble/manual] language is a major component of
|
||||||
Scribble, and it is documented in its own chapter:
|
Scribble, and it is documented in its own chapter:
|
||||||
@secref["plt-manuals"].
|
@secref["plt-manuals"].
|
||||||
|
|
|
@ -11,31 +11,31 @@
|
||||||
|
|
||||||
@defform[(define-cite ~cite-id citet-id generate-bibliography-id)]{
|
@defform[(define-cite ~cite-id citet-id generate-bibliography-id)]{
|
||||||
|
|
||||||
Binds @scheme[~cite-id], @scheme[citet-id], and
|
Binds @racket[~cite-id], @racket[citet-id], and
|
||||||
@scheme[generate-bibliography-id], which share state to accumulate and
|
@racket[generate-bibliography-id], which share state to accumulate and
|
||||||
render citations.
|
render citations.
|
||||||
|
|
||||||
The function bound to @scheme[~cite-id] produces a citation referring
|
The function bound to @racket[~cite-id] produces a citation referring
|
||||||
to one or more bibliography entries with a preceding non-breaking
|
to one or more bibliography entries with a preceding non-breaking
|
||||||
space, by default sorting the entries to match the bibliography order.
|
space, by default sorting the entries to match the bibliography order.
|
||||||
It has the contract
|
It has the contract
|
||||||
|
|
||||||
@schemeblock[
|
@racketblock[
|
||||||
(->* (bib?) (#:sort? any/c) #:rest (listof bib?) element?)
|
(->* (bib?) (#:sort? any/c) #:rest (listof bib?) element?)
|
||||||
]
|
]
|
||||||
|
|
||||||
The function bound to @scheme[citet-id] generates an element suitable
|
The function bound to @racket[citet-id] generates an element suitable
|
||||||
for use as a noun---referring to a document or its author---for one
|
for use as a noun---referring to a document or its author---for one
|
||||||
or more bibliography entries which share an author. It has the contract
|
or more bibliography entries which share an author. It has the contract
|
||||||
|
|
||||||
@schemeblock[
|
@racketblock[
|
||||||
(->* (bib?) () #:rest (listof bib?) element?)
|
(->* (bib?) () #:rest (listof bib?) element?)
|
||||||
]
|
]
|
||||||
|
|
||||||
The function bound to @scheme[generate-bibliography-id] generates the
|
The function bound to @racket[generate-bibliography-id] generates the
|
||||||
section for the bibliography. It has the contract
|
section for the bibliography. It has the contract
|
||||||
|
|
||||||
@schemeblock[
|
@racketblock[
|
||||||
(->* () (#:tag string? #:sec-title string?) part?)
|
(->* () (#:tag string? #:sec-title string?) part?)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -46,8 +46,8 @@ and for @racket[#:sec-title] is @racket["Bibliography"].
|
||||||
|
|
||||||
@defproc[(bib? [v any/c]) boolean?]{
|
@defproc[(bib? [v any/c]) boolean?]{
|
||||||
|
|
||||||
Returns @scheme[#t] if @scheme[v] is a value produced by
|
Returns @racket[#t] if @racket[v] is a value produced by
|
||||||
@scheme[make-bib] or @scheme[in-bib], @scheme[#f] otherwise.}
|
@racket[make-bib] or @racket[in-bib], @racket[#f] otherwise.}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(make-bib [#:title title any/c]
|
@defproc[(make-bib [#:title title any/c]
|
||||||
|
@ -59,13 +59,13 @@ Returns @scheme[#t] if @scheme[v] is a value produced by
|
||||||
bib?]{
|
bib?]{
|
||||||
|
|
||||||
Produces a value that represents a document to cite. Except for
|
Produces a value that represents a document to cite. Except for
|
||||||
@scheme[is-book?] and @scheme[url], the arguments are used as
|
@racket[is-book?] and @racket[url], the arguments are used as
|
||||||
elements, except that @scheme[#f] means that the information is not
|
elements, except that @racket[#f] means that the information is not
|
||||||
supplied. Functions like @scheme[proceedings-location],
|
supplied. Functions like @racket[proceedings-location],
|
||||||
@scheme[author-name], and @scheme[authors] help produce elements in a
|
@racket[author-name], and @racket[authors] help produce elements in a
|
||||||
standard format.
|
standard format.
|
||||||
|
|
||||||
An element produced by a function like @scheme[author-name] tracks
|
An element produced by a function like @racket[author-name] tracks
|
||||||
first, last names, and name suffixes separately, so that names can be
|
first, last names, and name suffixes separately, so that names can be
|
||||||
ordered and rendered correctly. When a string is provided as an author
|
ordered and rendered correctly. When a string is provided as an author
|
||||||
name, the last non-empty sequence of alphabetic characters or
|
name, the last non-empty sequence of alphabetic characters or
|
||||||
|
@ -75,7 +75,7 @@ rest is treated as the first name.}
|
||||||
@defproc[(in-bib [orig bib?] [where string?]) bib?]{
|
@defproc[(in-bib [orig bib?] [where string?]) bib?]{
|
||||||
|
|
||||||
Extends a bib value so that the rendered citation is suffixed with
|
Extends a bib value so that the rendered citation is suffixed with
|
||||||
@scheme[where], which might be a page or chapter number.}
|
@racket[where], which might be a page or chapter number.}
|
||||||
|
|
||||||
@defproc[(proceedings-location [location any/c]
|
@defproc[(proceedings-location [location any/c]
|
||||||
[#:pages pages (or (list/c any/c any/c) #f) #f]
|
[#:pages pages (or (list/c any/c any/c) #f) #f]
|
||||||
|
@ -132,8 +132,8 @@ suffix (such as ``Jr.'').}
|
||||||
@defproc[(authors [name any/c] ...) element?]{
|
@defproc[(authors [name any/c] ...) element?]{
|
||||||
|
|
||||||
Combines multiple author elements into one, so that it is rendered and
|
Combines multiple author elements into one, so that it is rendered and
|
||||||
alphabetized appropriately. If a @scheme[name] is a string, it is
|
alphabetized appropriately. If a @racket[name] is a string, it is
|
||||||
parsed in the same way as by @scheme[make-bib].}
|
parsed in the same way as by @racket[make-bib].}
|
||||||
|
|
||||||
@defproc[(org-author-name [name any/c]) element?]{
|
@defproc[(org-author-name [name any/c]) element?]{
|
||||||
|
|
||||||
|
@ -143,11 +143,11 @@ as a bib-value author.}
|
||||||
@defproc[(other-authors) element?]{
|
@defproc[(other-authors) element?]{
|
||||||
|
|
||||||
Generates an element that is suitable for use as a ``others'' author.
|
Generates an element that is suitable for use as a ``others'' author.
|
||||||
When combined with another author element via @scheme[authors], the
|
When combined with another author element via @racket[authors], the
|
||||||
one created by @scheme[other-authors] renders as ``et al.''}
|
one created by @racket[other-authors] renders as ``et al.''}
|
||||||
|
|
||||||
@defproc[(editor [name name/c]) element?]{
|
@defproc[(editor [name name/c]) element?]{
|
||||||
|
|
||||||
Takes an author-name element and create one that represents the editor
|
Takes an author-name element and create one that represents the editor
|
||||||
of a collection. If a @scheme[name] is a string, it is parsed in the
|
of a collection. If a @racket[name] is a string, it is parsed in the
|
||||||
same way as by @scheme[make-bib].}
|
same way as by @racket[make-bib].}
|
||||||
|
|
|
@ -17,19 +17,19 @@ block?]
|
||||||
@defproc[(figure-here [tag string?] [caption content?] [pre-flow pre-flow?] ...) block?]
|
@defproc[(figure-here [tag string?] [caption content?] [pre-flow pre-flow?] ...) block?]
|
||||||
)]{
|
)]{
|
||||||
|
|
||||||
Creates a figure. The given @scheme[tag] is for use with
|
Creates a figure. The given @racket[tag] is for use with
|
||||||
@scheme[figure-ref] or @scheme[Figure-ref]. The @scheme[caption] is an
|
@racket[figure-ref] or @racket[Figure-ref]. The @racket[caption] is an
|
||||||
element. The @scheme[pre-flow] is decoded as a flow.
|
element. The @racket[pre-flow] is decoded as a flow.
|
||||||
|
|
||||||
For HTML output, the @scheme[figure] and @scheme[figure*] functions
|
For HTML output, the @racket[figure] and @racket[figure*] functions
|
||||||
center the figure content, while @scheme[figure**] allows the content
|
center the figure content, while @racket[figure**] allows the content
|
||||||
to be wider than the document body.
|
to be wider than the document body.
|
||||||
For two-column Latex output, @scheme[figure*] and @scheme[figure**]
|
For two-column Latex output, @racket[figure*] and @racket[figure**]
|
||||||
generate a figure that spans columns.
|
generate a figure that spans columns.
|
||||||
|
|
||||||
For Latex output, @scheme[figure-here] generates a figure to be included at
|
For Latex output, @racket[figure-here] generates a figure to be included at
|
||||||
the position in the output text where the @scheme[figure-here] occurs
|
the position in the output text where the @racket[figure-here] occurs
|
||||||
in the source text. For HTML output, all @scheme[figure] variants
|
in the source text. For HTML output, all @racket[figure] variants
|
||||||
place the figure where the use appears in the source text.}
|
place the figure where the use appears in the source text.}
|
||||||
|
|
||||||
|
|
||||||
|
@ -46,4 +46,4 @@ Generates a reference to a figure, capitalizing the word ``Figure''.}
|
||||||
@defproc[(Figure-target [tag string?]) element?]{
|
@defproc[(Figure-target [tag string?]) element?]{
|
||||||
|
|
||||||
Generates a new figure label. This function is normally not used
|
Generates a new figure label. This function is normally not used
|
||||||
directly, since it is used by @scheme[figure].}
|
directly, since it is used by @racket[figure].}
|
||||||
|
|
|
@ -4,11 +4,11 @@
|
||||||
@title[#:tag "gui-eval"]{Examples Using the GUI Toolbox}
|
@title[#:tag "gui-eval"]{Examples Using the GUI Toolbox}
|
||||||
|
|
||||||
@defmodule[scriblib/gui-eval]{The
|
@defmodule[scriblib/gui-eval]{The
|
||||||
@schememodname[scriblib/gui-eval] library support example
|
@racketmodname[scriblib/gui-eval] library support example
|
||||||
evaluations that use @schememodname[racket/gui] facilities (as opposed
|
evaluations that use @racketmodname[racket/gui] facilities (as opposed
|
||||||
to just @racketmodname[racket/draw]) to generate text and image results.}
|
to just @racketmodname[racket/draw]) to generate text and image results.}
|
||||||
|
|
||||||
The trick is that @schememodname[racket/gui] is not generally
|
The trick is that @racketmodname[racket/gui] is not generally
|
||||||
available when rendering documentation, because it requires a GUI
|
available when rendering documentation, because it requires a GUI
|
||||||
context. Text and image output is rendered to an image file when the
|
context. Text and image output is rendered to an image file when the
|
||||||
@envvar{MREVAL} environment variable is set, so run the enclosing
|
@envvar{MREVAL} environment variable is set, so run the enclosing
|
||||||
|
@ -33,13 +33,13 @@ generated image.
|
||||||
#:eval+opts the-eval get-predicate? get-render
|
#:eval+opts the-eval get-predicate? get-render
|
||||||
get-get-width get-get-height
|
get-get-width get-get-height
|
||||||
datum ...))]
|
datum ...))]
|
||||||
@defform*[((gui-schemeblock+eval datum ...)
|
@defform*[((gui-racketblock+eval datum ...)
|
||||||
(gui-schemeblock+eval
|
(gui-racketblock+eval
|
||||||
#:eval+opts the-eval get-predicate? get-render
|
#:eval+opts the-eval get-predicate? get-render
|
||||||
get-get-width get-get-height
|
get-get-width get-get-height
|
||||||
datum ...))]
|
datum ...))]
|
||||||
@defform*[((gui-schememod+eval datum ...)
|
@defform*[((gui-racketmod+eval datum ...)
|
||||||
(gui-schememod+eval
|
(gui-racketmod+eval
|
||||||
#:eval+opts the-eval get-predicate? get-render
|
#:eval+opts the-eval get-predicate? get-render
|
||||||
get-get-width get-get-height
|
get-get-width get-get-height
|
||||||
datum ...))]
|
datum ...))]
|
||||||
|
@ -56,25 +56,25 @@ generated image.
|
||||||
)]{
|
)]{
|
||||||
|
|
||||||
The first option of each of the above is
|
The first option of each of the above is
|
||||||
like @scheme[interaction], etc., but actually evaluating the forms
|
like @racket[interaction], etc., but actually evaluating the forms
|
||||||
only when the @envvar{MREVAL} environment variable is set, and then in
|
only when the @envvar{MREVAL} environment variable is set, and then in
|
||||||
an evaluator that is initialized with @schememodname[racket/gui/base]
|
an evaluator that is initialized with @racketmodname[racket/gui/base]
|
||||||
and @schememodname[slideshow].
|
and @racketmodname[slideshow].
|
||||||
|
|
||||||
The second option of each allows you to specify your own evaluator via
|
The second option of each allows you to specify your own evaluator via
|
||||||
the @scheme[the-eval] argument and then to specify four thunks that
|
the @racket[the-eval] argument and then to specify four thunks that
|
||||||
return functions for finding and rendering graphical objects:
|
return functions for finding and rendering graphical objects:
|
||||||
@itemize[
|
@itemize[
|
||||||
@item{@scheme[get-predicate? : (-> (-> any/c boolean?))]
|
@item{@racket[get-predicate? : (-> (-> any/c boolean?))]
|
||||||
Determines if a value is a graphical object (and thus handled by the other operations)}
|
Determines if a value is a graphical object (and thus handled by the other operations)}
|
||||||
@item{@scheme[get-render : (-> (-> any/c (is-a?/c dc<%>) number? number? void?))]
|
@item{@racket[get-render : (-> (-> any/c (is-a?/c dc<%>) number? number? void?))]
|
||||||
Draws a graphical object (only called if the predicate returned @scheme[#t]; the first
|
Draws a graphical object (only called if the predicate returned @racket[#t]; the first
|
||||||
argument will be the value for which the predicate holds).}
|
argument will be the value for which the predicate holds).}
|
||||||
@item{@scheme[get-get-width : (-> (-> any/c number?))]
|
@item{@racket[get-get-width : (-> (-> any/c number?))]
|
||||||
Gets the width of a graphical object (only called if the predicate returned @scheme[#t]; the first
|
Gets the width of a graphical object (only called if the predicate returned @racket[#t]; the first
|
||||||
argument will be the value for which the predicate holds).}
|
argument will be the value for which the predicate holds).}
|
||||||
@item{@scheme[get-get-height : (-> (-> any/c number?))]
|
@item{@racket[get-get-height : (-> (-> any/c number?))]
|
||||||
Gets the height of a graphical object (only called if the predicate returned @scheme[#t]; the first
|
Gets the height of a graphical object (only called if the predicate returned @racket[#t]; the first
|
||||||
argument will be the value for which the predicate holds).}
|
argument will be the value for which the predicate holds).}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user