scribble/manual: add a #:key' argument to
deftech'
original commit: dfcf50e1651a6dbf4a3aec00868cb74de9538d88
This commit is contained in:
parent
3cbb1e4e0e
commit
b50c8a7f6a
|
@ -7,7 +7,8 @@
|
|||
|
||||
(provide/contract
|
||||
[deftech (() (#:normalize? any/c
|
||||
#:style? any/c)
|
||||
#:style? any/c
|
||||
#:key (or/c string? #f))
|
||||
#:rest (listof pre-content?) . ->* . element?)]
|
||||
[tech (()
|
||||
(#:doc (or/c module-path? false/c)
|
||||
|
@ -37,11 +38,14 @@
|
|||
[s (datum-intern-literal s)])
|
||||
(make-elem style c (list 'tech (doc-prefix doc prefix s)))))
|
||||
|
||||
(define (deftech #:style? [style? #t] #:normalize? [normalize? #t] . s)
|
||||
(define (deftech #:style? [style? #t]
|
||||
#:normalize? [normalize? #t]
|
||||
#:key [key #f]
|
||||
. s)
|
||||
(let* ([e (if style?
|
||||
(apply defterm s)
|
||||
(make-element #f (decode-content s)))]
|
||||
[t (*tech make-target-element #f #f #f (list e) #f normalize?)])
|
||||
[t (*tech make-target-element #f #f #f (list e) key normalize?)])
|
||||
(make-index-element #f
|
||||
(list t)
|
||||
(target-element-tag t)
|
||||
|
|
|
@ -1418,6 +1418,7 @@ Alias of @racket[hyperlink] for backward compatibility.}
|
|||
Alias of @racket[other-doc] for backward compatibility.}
|
||||
|
||||
@defproc[(deftech [pre-content pre-content?] ...
|
||||
[#:key key (or/c string? #f) #f]
|
||||
[#:normalize? normalize? any/c #t]
|
||||
[#:style? style? any/c #t]) element?]{
|
||||
|
||||
|
@ -1425,9 +1426,10 @@ Produces an element for the @tech{decode}d @racket[pre-content], and
|
|||
also defines a term that can be referenced elsewhere using
|
||||
@racket[tech].
|
||||
|
||||
The @racket[content->string] result of the @tech{decode}d
|
||||
@racket[pre-content] is used as a key for references; if
|
||||
@racket[normalize?] is true, then the string is normalized as follows:
|
||||
When @racket[key] is @racket[#f], the @racket[content->string] result
|
||||
of the @tech{decode}d @racket[pre-content] is used as a key for
|
||||
references. If @racket[normalize?] is true, then the key string is
|
||||
normalized as follows:
|
||||
|
||||
@itemize[
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user