Version: 4.2.1
11.7 Links
Inserts the hyperlinked title of the section tagged tag, but
aux-element items in the title content are omitted in the
hyperlink label.
If #:doc module-path is provided, the tag refers to
a tag with a prefix determined by module-path. When
setup-plt renders documentation, it automatically adds a tag
prefix to the document based on the source module. Thus, for example,
to refer to a section of the PLT Scheme reference,
module-path would be '(lib "scribblings/reference/reference.scrbl").
The #:tag-prefixes prefixes argument similarly supports
selecting a particular section as determined by a path of tag
prefixes. When a #:doc argument is provided, then
prefixes should trace a path of tag-prefixed subsections to
reach the tag section. When #:doc is not provided,
the prefixes path is relative to any enclosing section (i.e.,
the youngest ancestor that produces a match).
If underline? is #f, then the hyperlink is rendered
in HTML without an underline.
Like
secref, but the link label is the
decoded
pre-content instead of the target section’s name.
Like
secref for the document’s implicit
"top"
tag. Use this function to refer to a whole manual instead of
secref, in case a special style in the future is used for
manual titles.
The
decoded
pre-content is hyperlinked to the definition
of
id.
(link | | url | | | | | | | pre-content ... | | | | | | [ | #:underline? underline? | | | | | | | #:style style]) | | → | | element? |
|
url : string? |
pre-content : any/c |
underline? : any/c = #t |
style : any/c = (if underline? #f "plainlink") |
The
decoded
pre-content is hyperlinked to
url. If
style is not supplied, then
underline? determines how the link is rendered.
The tag t refers to the content form of
pre-content.
The
decoded
pre-content is hyperlinked to
t,
which is normally defined using
elemtag.
Produces an element for the
decoded
pre-content, and
also defines a term that can be referenced elsewhere using
tech.
The content->string result of the decoded
pre-content is used as a key for references, but normalized
as follows:
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.
Produces an element for the
decoded
pre-content, and
hyperlinks it to the definition of the content as established by
deftech. The content’s string form is normalized in the same
way as for
deftech. The
#:doc and
#:tag-prefixes arguments support cross-document and
section-specific references, like in
secref.
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.
Like
tech, but the link is not a quiet. For example, in HTML
output, a hyperlink underline appears even when the mouse is not over
the link.