Skip to content

Annotations

Josh Glazer edited this page Jun 11, 2026 · 4 revisions

Annotations

Syntax

{={identifier}annotated text=}
{={parent/child}annotated text=}
  • identifier — a plain label, e.g. {={note}this is important=}
  • parent/child — a two-level label, e.g. {={math/hot}key formula=}
  • Wildcards in style config: math/* matches any math/child annotation

Do not leave a space between the identifier and the text.

Examples

The function {={note}converges in O(n log n)=} for all inputs.
This approach {={math/hot}maximizes the posterior=} under the prior.
The sample statistic {={stats}is an unbiased estimator=} of the mean.

Live Preview rendering

In Live Preview and Reading View, the {={id} and =} delimiters are hidden automatically. Only the annotated text is shown, optionally styled with the colors and font size you configured.

In Source Mode, the full syntax is always visible.


Commands

Command Description
Show annotations sidebar Toggle the annotations sidebar open/closed
Apply identifier to selection Wrap selected text (or insert a blank annotation at cursor) with a chosen identifier
Apply last identifier to selection Re-apply the most recently used identifier
Toggle bracket/identifier visibility Show or hide the {={id} and =} delimiters in Live Preview and Reading View
Toggle bracket/identifier formatting Enable or disable custom colors on the bracket/identifier portion (Source Mode)
Toggle text formatting Enable or disable custom colors on the annotation text
Toggle citation visibility Show or hide citation markers {=/{key}/=} in Live Preview and Reading View
Insert citation Insert a BibTeX citation key immediately after an annotation (see Citations)

Annotations sidebar

Open via the message-square ribbon icon or the Show annotations sidebar command.

  • Lists every annotation in the vault, grouped by identifier
  • Each entry shows a text preview and the file + line number
  • Click any entry to open the file and jump to that annotation
  • Use Expand All / Collapse All buttons to show or hide all groups
  • Collapse state is preserved within a session

Styling identifiers

Settings UI mode

  1. Open Settings → Annotation Manager
  2. Under Add Identifier, type an identifier name (e.g. math/hot or stats) and click Add
  3. Set Font color, Background color, and/or Font size
  4. Changes apply immediately to all open editors

Wildcards — enter math/* to style all math/child annotations that don't have their own specific style. Specific identifiers always take precedence over wildcards.

Config file mode

Switch the Identifier style source dropdown to Config file, then specify a vault-relative path (default: OccConfig.md). Use the Create / update config file button to generate the file from your current settings.

The plugin auto-reloads styles when the file is saved (after an 8-second idle window to avoid interrupting edits).

Config file table format

| Identifier | Font Color | Background Color | Font Size | Bib File   | Example |
| ---------- | ---------- | ---------------- | --------- | ---------- | ------- |
| math/hot   | ff6b6b     | fff0f0           | 1.1em     | Math.bib   | ... |
| math/*     | 4ecdc4     |                  |           |            | ... |
| stats      | ffd93d     | fffbe6           |           | ToRead.bib | ... |
  • Column order must match exactly: Identifier, Font Color, Background Color, Font Size, Bib File, Example
  • Do not use the # prefix for hex colors — ff6b6b, not #ff6b6b
  • Leave a cell blank to inherit the default
  • Font size accepts any CSS value: 1.1em, 14px, 0.9rem, etc.
  • Bib File — optional .bib filename to associate with this identifier (see Citations)
  • The Example column is auto-generated by the Create / update config file button

Clone this wiki locally