API Reference
deixis-ref
References one or more annotations, retaining original marker styling and native fallback for ordinary labels.
Setup Required
Returns: content.
Example
deixis-ref(<detail>)
@detail uses the native bridge installed by setup. Repeated reference targets deduplicate; compatible numeric ranges can collapse. Explicit marker-style overrides formatting.
deixis-ref
deixis-ref(..targets, supplement: auto, form: "normal", marker-style: auto, celibate-marker: "?")
A styled, clickable cross-reference to a specific note.
- ..targets (arguments): The positional target label (e.g.,
<my-note>) to reference. - supplement (auto, content, function, none): The prefix, or a function receiving the selected note’s metadata element. Set to
nonefor just the number. - form (str):
"normal"for note markers or"page"for native page references to the selected destination. - marker-style (auto, function): A custom styling function
(string) => contentfor the reference number. Ifauto, it inherits the note’s original marker style. - celibate-marker (str): The marker displayed for celibate notes.
Parameters
| Name | Default | Types |
|---|---|---|
..targets | variadic | arguments |
supplement | auto | auto, content, function, none |
form | "normal" | str |
marker-style | auto | auto, function |
celibate-marker | "?" | str |
..targets
The positional target label (e.g., <my-note>) to reference.
//| sandbox-mode: "page"
Let's create some test notes
#deixis-margin-note(id: <note-a>)[Test note A.]
#deixis-margin-note(id: <note-b>)[Test note B.]
#deixis-margin-note(id: <note-c>)[Test note C.]
Single reference: #deixis-ref(<note-a>)
- Compatible automatic decimal markers are sorted; consecutive runs of three or more become ranges. Mixed counters, series, numbering rules, or styles retain the input order.
Multiple reference: #deixis-ref(<note-a>, <note-b>, <note-c>)
- The last positional argument, if of type
contentorstr, will be interpreted asdeixis-ref.supplement.
#deixis-ref(<note-b>)[Comment]
supplement
The prefix to display before the number (e.g., [Note]). Set to none for just the number.
#deixis-ref(<note-c>, supplement: [Todo])
A function receives the selected mark/body metadata element, as with native references. An unprinted standalone body supplies unlocated metadata.
form
"normal" displays note markers; "page" uses Typst’s page reference
formatting at the selected body/mark destination. An unprinted standalone
body has no destination and displays the celibate marker.
marker-style
A custom styling function (string) => content for the reference number. If auto, it inherits the note’s original marker style.
celibate-marker
The marker displayed for celibate notes.