Skip to content

Citation Preview 1.2.0

Choose a tag to compare

@lyingTree lyingTree released this 22 Nov 07:52
· 2 commits to main since this release
3cfb351

Citation Preview 1.2.0

Hover over numeric citations such as [1–10] or [3,1–10,12] to view the corresponding references together in Obsidian Page preview. Groups are assembled locally from reference blocks in the same note.

Changes

  • Identify references directly from their ^ref-N and ^sref-N block IDs, without requiring a bibliography heading. References work under arbitrary headings or with no heading, including notes whose headings contain section numbers or entry counts.
  • Also support compact IDs such as ^ref1 and named sets such as ^ref-appendix-1. Unanchored numbered lists no longer create reference entries; existing plain citations need identifiable reference blocks.
  • Keep independent indexes for main and supplementary anchor prefixes, even when entries appear in different parts of a note. Resolve linked citations by their actual targets and expand ranges only within the selected reference set.
  • Separate previews and refreshes for groups with identical visible numbers but different reference targets. Check the exact rendered link targets so figure or equation links cannot consume a citation's preview.
  • Use the same local-link validation in Reading view and the editor, including relative and encoded note paths.
  • Preserve compact and spaced reference lists and multiline reference blocks. Retain ambiguity reporting when a plain numeric citation does not identify a unique reference set.
  • Add regression coverage and a copyable main/supplementary demonstration. Keep the plugin ID citation-range-preview and minimum Obsidian version 1.15.1.

Reference format

Reference blocks are identified by unique ^ref-N and ^sref-N block IDs in the same note. No particular bibliography heading is required. Use explicit links such as [1](<#^ref-1>) and [1](<#^sref-1>) to distinguish main and supplementary references with the same number. Compact forms (^ref1, ^sref1) and named sets such as ^ref-appendix-1 are also supported.

Compatibility: unanchored numbered lists no longer establish reference entries, regardless of their heading. Plain in-text citations still work when existing supported block IDs identify a unique reference set. Existing notes with ref / sref anchors need no content changes.

Validation

  • The production build, 171 automated tests across 8 test files, and lint validation passed. The main-branch build workflow passed.
  • The supplied Hocke note resolves 31 reference blocks and 45 citation groups. The supplied Runge note resolves 96 reference blocks (66 main and 30 supplementary) and 108 citation groups.
  • Both complete notes produce the same results after headings are renamed, headings are removed, and newlines are converted to CRLF.
  • The installation ZIP contains exactly main.js, manifest.json, and styles.css inside citation-range-preview/. Its files match the standalone assets byte for byte, and main.js matches a fresh in-memory production build.
  • 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.2.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 in Community plugins.

For an existing installation, replace main.js, manifest.json, and styles.css in that same folder and reload the plugin. Keep data.json to retain your settings. The plugin ID remains citation-range-preview; the minimum Obsidian version remains 1.15.1.

See README.md and CHANGELOG.md for formats, usage, and limitations.