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

Publishes a geometric anchor at its declaration; padding expands bounds around that anchor.

Setup Required

Returns: content.

Task guide

Example

deixis-pin(<anchor>, padding: 0pt)

Default “text” padding follows local text metrics. Percentages have no pin-size basis. Scope namespaces pins independently of note/block identities.

deixis-pin

deixis-pin(name, scope: none, padding: "text", extra-data: (:))

Manually drops an invisible, named geometric anchor (a "pin") into the document flow.

Pins are the coordinate anchors that deixis-region-mark uses to draw its highlights. Initialize with deixis-setup-notes before producing document pins. They can also be used as anchor coordinates for deixis-inset-note-body and deixis-margin-note-body.

  • name (str, label): A pin name, global unless scope is supplied; strings and labels with the same spelling are equivalent.
  • scope (none, str, label, location): Optional namespace; native locations isolate reusable instances.
  • padding (str, length, dictionary, none): Geometric expansion around the point; "text" is an em-based baseline approximation. Adds no layout space.
  • extra-data (dictionary): Custom metadata; name, scope, padding, dx, dy, type, and hidden are reserved.

Parameters

NameDefaultTypes
namerequiredstr, label
scopenonenone, str, label, location
padding"text"str, length, dictionary, none, auto
extra-data(:)dictionary

name

A string/label name within scope (document-wide by default). Both spellings normalize to the same name. Repeated names contribute multiple occurrences; scoped targets select them with a name/scope record.

scope

Optional namespace, independent of note/counter scopes. Use a native location such as here() to isolate each reusable component instance.

padding

The mathematical padding around the pin.

  • Accepts length or dictionary.
#place(center + horizon, deixis-pin("test-padding", padding: 5pt))
#deixis-region-mark(pins: ("test-padding",))
  • "text" uses top 0.9em, bottom 0.2em, and horizontal 0.1em. This is a baseline approximation, not a glyph bounding box. none/auto mean zero.
  • Signed lengths preserve their sign. Percentages have no pin-size basis.
The library was filled with the #deixis-pin("susurrus-l", padding: "text")susurrus#deixis-pin("susurrus-r", padding: "text") of turning pages.
#deixis-region-mark(pins: ("susurrus-l", "susurrus-r"))

extra-data

Custom metadata. name, scope, padding, dx, dy, type, and hidden are reserved.