scribble/base: add an #:indirect' option to
other-doc'
This commit is contained in:
parent
4d02168024
commit
6c78bb0563
|
@ -358,14 +358,14 @@ by three calls to @racket[read-line].
|
||||||
|
|
||||||
@section[#:tag "experimental-langs"]{Other Experimental Languages}
|
@section[#:tag "experimental-langs"]{Other Experimental Languages}
|
||||||
|
|
||||||
For information on @onscreen{Lazy Racket}, see @seclink["top" #:doc
|
For information on @onscreen{Lazy Racket}, see @other-doc['(lib
|
||||||
'(lib "lazy/lazy.scrbl") #:indirect? #t]{the Lazy Racket documentation}.
|
"lazy/lazy.scrbl") #:indirect "Lazy Racket"].
|
||||||
|
|
||||||
For information on @onscreen{FrTime}, see @seclink["top" #:doc '(lib
|
For information on @onscreen{FrTime}, see @other-doc['(lib
|
||||||
"frtime/scribblings/frtime.scrbl") #:indirect? #t]{the FrTime documentation}.
|
"frtime/scribblings/frtime.scrbl") #:indirect "FrTime"].
|
||||||
|
|
||||||
For information on @onscreen{Algol 60}, see @seclink["top" #:doc '(lib
|
For information on @onscreen{Algol 60}, see @other-doc['(lib
|
||||||
"algol60/algol60.scrbl") #:indirect? #t]{the Algol60 documentation}.
|
"algol60/algol60.scrbl") #:indirect "Algol 60"].
|
||||||
|
|
||||||
@; ----------------------------------------
|
@; ----------------------------------------
|
||||||
|
|
||||||
|
|
|
@ -535,13 +535,20 @@ the section hyperlink's resolution in HTML is potentially delayed; see
|
||||||
|
|
||||||
|
|
||||||
@defproc[(other-doc [module-path module-path?]
|
@defproc[(other-doc [module-path module-path?]
|
||||||
[#:underline? underline? any/c #t])
|
[#:underline? underline? any/c #t]
|
||||||
|
[#:indirect indirect (or/c #f content?) #f])
|
||||||
element?]{
|
element?]{
|
||||||
|
|
||||||
Like @racket[secref] for the document's implicit @racket["top"]
|
Like @racket[secref] for the document's implicit @racket["top"]
|
||||||
tag. Use this function to refer to a whole manual instead of
|
tag. Use this function to refer to a whole manual instead of
|
||||||
@racket[secref], in case a special style in the future is used for
|
@racket[secref], in case a special style in the future is used for
|
||||||
manual titles.}
|
manual titles.
|
||||||
|
|
||||||
|
If @racket[indirect] is not @racket[#f], then the link's resolution in
|
||||||
|
HTML can be delayed, like @racket[seclink] with @racket[#:indirect?
|
||||||
|
#t]. The @racket[indirect] content is prefixed with ``the'' and
|
||||||
|
suffixed with ``documentation'' to generate the rendered text of the
|
||||||
|
link.}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(elemtag [t (or/c tag? string?)] [pre-content pre-content?] ...) element?]{
|
@defproc[(elemtag [t (or/c tag? string?)] [pre-content pre-content?] ...) element?]{
|
||||||
|
|
|
@ -429,7 +429,8 @@
|
||||||
#:rest (listof pre-content?)
|
#:rest (listof pre-content?)
|
||||||
element?)]
|
element?)]
|
||||||
[other-doc (->* (module-path?)
|
[other-doc (->* (module-path?)
|
||||||
(#:underline? any/c)
|
(#:underline? any/c
|
||||||
|
#:indirect (or/c #f content?))
|
||||||
element?)])
|
element?)])
|
||||||
|
|
||||||
(define (elemtag t . body)
|
(define (elemtag t . body)
|
||||||
|
@ -465,8 +466,13 @@
|
||||||
(decode-content s)
|
(decode-content s)
|
||||||
`(part ,(doc-prefix doc prefix tag))))
|
`(part ,(doc-prefix doc prefix tag))))
|
||||||
|
|
||||||
(define (other-doc #:underline? [u? #t] doc)
|
(define (other-doc doc
|
||||||
(secref #:doc doc #:underline? u? "top"))
|
#:underline? [u? #t]
|
||||||
|
#:indirect [indirect #f])
|
||||||
|
(if indirect
|
||||||
|
(seclink "top" #:doc doc #:underline? u? #:indirect? #t
|
||||||
|
(list "the " indirect " documentation"))
|
||||||
|
(secref "top" #:doc doc #:underline? u?)))
|
||||||
|
|
||||||
;; ----------------------------------------
|
;; ----------------------------------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user