4.2.7 Links
See also Links.
syntax
(racketlink id #:style style-expr pre-content ...)
(racketlink id pre-content ...)
id : identifier?
pre-content : pre-content?
syntax
(schemelink id pre-content ...)
procedure
(link url pre-content ... [ #:underline? underline? #:style style]) → element? url : string? pre-content : pre-content? underline? : any/c = #t
style : (or/c style? string? symbol? #f) = (if underline? #f "plainlink")
procedure
(other-manual module-path [ #:underline? underline?]) → element? module-path : module-path? underline? : any/c = #t
procedure
(deftech pre-content ... [ #:key key #:normalize? normalize? #:style style? #:index-extras index-extras]) → element? pre-content : pre-content? key : (or/c string? #f) = #f normalize? : any/c = #t style? : any/c = #t index-extras : desc-extras/c = (hash)
When key is #f, the content->string result of the decoded pre-content is used as a key for references. If normalize? is true, then the key string is normalized as follows:
The string is case-folded.
A trailing “ies” is replaced by “y”.
A trailing “s” is removed.
Consecutive hyphens and whitespaces are all replaced by a single space.
These normalization steps help support natural-language references that differ slightly from a defined form. For example, a definition of “bananas” can be referenced with a use of “banana”.
If style? is true, then defterm is used on pre-content.
The index-extras argument is propoagated to the generated index entry for the defined term via index-desc.
Changed in version 1.54 of package scribble-lib: Added the index-extras argument.
procedure
(tech pre-content ... [ #:key key #:normalize? normalize? #:doc module-path #:tag-prefixes prefixes #:indirect? indirect?]) → element? pre-content : pre-content? key : (or/c string? #f) = #f normalize? : any/c = #t module-path : (or/c module-path? #f) = #f prefixes : (or/c (listof string?) #f) = #f indirect? : any/c = #f
(tech #:doc '(lib "scribblings/reference/reference.scrbl") "blame object")
creates a link to blame object in The Racket Reference. If indirect? is not #f, the link’s resolution in HTML is potentially delayed; see 'indirect-link for link-element.
With the default style files, the hyperlink created by tech is somewhat quieter than most hyperlinks: the underline in HTML output is gray, instead of blue, and the term and underline turn blue only when the mouse is moved over the term.
In some cases, combining both natural-language uses of a term and proper linking can require some creativity, even with the normalization performed on the term. For example, if “bind” is defined, but a sentence uses the term “binding,” the latter can be linked to the former using @tech{bind}ing.
Changed in version 1.46 of package scribble-lib: Added #:indirect? argument.
procedure
(techlink pre-content ... [ #:key key #:normalize? normalize? #:doc module-path #:tag-prefixes prefixes #:indirect? indirect?]) → element? pre-content : pre-content? key : (or/c string? #f) = #f normalize? : any/c = #t module-path : (or/c module-path? #f) = #f prefixes : (or/c (listof string?) #f) = #f indirect? : any/c = #f
Changed in version 1.46 of package scribble-lib: Added #:indirect? argument.