Skip to content

Citation Preview 1.3.0

Latest

Choose a tag to compare

@lyingTree lyingTree released this 22 Nov 08:48
165503f

Citation Preview 1.3.0

Display numeric citations as blue links and preview their references together in Obsidian Page preview. Explicit ref/sref links keep their exact targets; plain citations can use recognized reference lists without anchors.

Changes

  • Display resolved citations in blue, including brackets and separators, with an option to follow the theme's link color. Preserve existing links and native single-reference previews. Add navigation for visible plain-text citation numbers without rewriting the note.
  • Keep editor syntax and link destinations in their normal colors. Ordinary editor clicks place the cursor; modified clicks navigate.
  • Show a whole-group link such as [1-5](#^ref-1) in one preview: the specified reference above, a horizontal rule (---), and references 1-5 below. The existing link's click target stays unchanged.
  • Detect numbered bibliographies using structure and bibliographic evidence. Plain citations prefer the closest shared structural section, then source proximity. Missing entries are not borrowed from another list. Explicit ref and sref resolution remains independent of headings.
  • Add Citation Preview: Add missing reference anchors, a manually invoked command that inserts missing block IDs in the current note using one undoable transaction. It preserves existing IDs, avoids collisions and duplicate numbering, and adds nothing when repeated. Opening, previewing and navigating never add anchors automatically.
  • Add Show citations as links and Citation color settings. Keep the plugin ID citation-range-preview and minimum Obsidian version 1.15.1.

Using the anchor command

Open the note in an editor and run Citation Preview: Add missing reference anchors from the command palette. Assign your own shortcut under Settings → Hotkeys if desired. No default shortcut is reserved.

Validation

  • Production build and 232 automated tests across 11 files passed; ESLint reported no errors. The existing settings API deprecation warning remains.
  • Hocke: 31 reference blocks and 45 citation groups. Runge: 96 blocks and 108 groups (91 main, 17 supplementary). Original, renamed-heading, removed-heading and CRLF variants all resolve.
  • After removing anchors and converting citations to plain numbers, every group's reference content still matches the original explicit targets. The manual command adds 31/96 anchors, and a second run adds 0.
  • The installation ZIP contains exactly main.js, manifest.json and styles.css inside citation-range-preview/, matching the standalone assets byte for byte.
  • Tests cover real CodeMirror state, DOM preservation and host integration boundaries. Native desktop Obsidian visual verification was not performed in this environment.

Installation

Enable Obsidian's built-in Page preview core plugin. Extract citation-preview-1.3.0.zip into your vault configuration's plugins directory, usually <vault>/.obsidian/plugins/, keeping the internal folder name citation-range-preview. Then enable Citation Preview.

For an existing installation, replace main.js, manifest.json and styles.css in the same plugin folder and reload the plugin. Keep data.json to retain your settings.

See README.md and CHANGELOG.md for supported formats and limitations.