Files
klammertext/sks/link/link.k
T

47 lines
1.4 KiB
Plaintext
Raw Normal View History

@@@argtype section_link |
treat the link target as a section title, not an id.
If ^:section is present but does not have a value, the section title is in
the current file.
If ^:section has a value, then it is the basename (no directory; no
extension) of the file in the same document that contains the section with
that title.
:pattern [A-Za-z0-9_.-]+
:default false
:alone true
@@@
@@link.k target
:text
:footnote.bool false
:section.section_link
:nq.bool false
:code # xxx
:phrase # xxx
:dox # xxx
:doxanchor # xxx
:id # xxx
:
Links within documents and to external URLs.
With ^:section the target is a section title, matched with klammer markup
removed and whitespace collapsed to one space. Written alone, ^:section
means the section is in the current file; written with a value, the value is
the basename of the file of the same ^@document that has the section. A
section link is resolved when ^@document assembles its files, so one outside
a ^@document is an error, as is a title the file does not have, or has more
than once (give one heading an ^:id and link to that).
@@
@@link.html,tex,txt :: @eval link.Link(K) eval@ @@
@@target.k id :text : A link target within a document @@
@@target.html,tex :: @eval link.Target(K) eval@ @@
@@email.k name | domain :subject :body : An email with an mangled address for HTML @@
@@email.html,tex :: @eval link.Email(K) eval@ @@