diff --git a/pkgs/scribble-pkgs/scribble-doc/scribblings/scribble/base.scrbl b/pkgs/scribble-pkgs/scribble-doc/scribblings/scribble/base.scrbl index 43b7c1f0..2cf9a9b7 100644 --- a/pkgs/scribble-pkgs/scribble-doc/scribblings/scribble/base.scrbl +++ b/pkgs/scribble-pkgs/scribble-doc/scribblings/scribble/base.scrbl @@ -535,13 +535,20 @@ the section hyperlink's resolution in HTML is potentially delayed; see @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?]{ Like @racket[secref] for the document's implicit @racket["top"] 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 -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?]{ diff --git a/pkgs/scribble-pkgs/scribble-lib/scribble/base.rkt b/pkgs/scribble-pkgs/scribble-lib/scribble/base.rkt index 8715bc22..c7413c9e 100644 --- a/pkgs/scribble-pkgs/scribble-lib/scribble/base.rkt +++ b/pkgs/scribble-pkgs/scribble-lib/scribble/base.rkt @@ -429,7 +429,8 @@ #:rest (listof pre-content?) element?)] [other-doc (->* (module-path?) - (#:underline? any/c) + (#:underline? any/c + #:indirect (or/c #f content?)) element?)]) (define (elemtag t . body) @@ -465,8 +466,13 @@ (decode-content s) `(part ,(doc-prefix doc prefix tag)))) -(define (other-doc #:underline? [u? #t] doc) - (secref #:doc doc #:underline? u? "top")) +(define (other-doc doc + #: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?))) ;; ----------------------------------------