Files
klammertext/sks/link/link.k
T
ackandClaude Fable 5.1 f4dcdf3ffd @link :section links to a section by its heading, with an alone value (from dev 831455f36fcd)
A section link names the TEXT of a heading: :section alone means the current
file, a value names the file of the same @document that has it. Resolved by
@document at assembly in html and tex; errors for a missing file, a missing
title, a doubled title and a link outside a @document. The Markdown
converter reads a Markdown anchor as a section link to the heading its slug
names. Also from dev: the converter's four silent defects fixed and --chapter
(9ae2c4cd), and the engine's alone-value error text.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-12 20:55:39 +02:00

48 lines
1.4 KiB
Plaintext
Executable File

@@@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@ @@