Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

API Reference

deixis-ref

References one or more annotations, retaining original marker styling and native fallback for ordinary labels.

Setup Required

Returns: content.

Task guide

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 none for 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) => content for the reference number. If auto, it inherits the note’s original marker style.
  • celibate-marker (str): The marker displayed for celibate notes.

Parameters

NameDefaultTypes
..targetsvariadicarguments
supplementautoauto, content, function, none
form"normal"str
marker-styleautoauto, 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 content or str, will be interpreted as deixis-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.