Skip to content

Note citations: first notes in core footnotes, then shortened notes and ibid. (Stages 2–3; Stage 1 shipped in #256) #243

Open

Description

@dknauss

Status (2026-11-09)

Stage 1 shipped in #256 (released in 1.19.0): the Cite rich-text format links to #ref-{id}, with short forms by style family, an optional locator saved as data-locator, and Update citations after a style change. This issue now tracks Stages 2 and 3, plus the Stage 1 back-links, which were not built. SPEC.md's "Future: In-Text Citation Integration" lists those and the other Stage 1 follow-ups (editor navigation, fuller short forms).

Why

Borges builds the bibliography only. Writers who cite in the text still type each in-text citation or footnote by hand, and the plugins Borges is compared with (CiteKit, TheLaTeXLab Citations & Bibliography) offer in-text citations. SPEC.md already plans this ("Future: In-Text Citation Integration"), and includes/styles.json already gives each style an inlineCitationMode: note for Chicago notes-bibliography and OSCOLA, parenthetical for the author-date styles, numeric for IEEE and Vancouver.

The Borges principles still apply: static output, no shortcodes, and nothing lost if the plugin is deactivated.

Stage 1: parenthetical and numeric in-text citations (shipped in #256)

The smaller job, and the one SPEC.md describes.

  • An inline rich-text format that cites a bibliography entry by its stable citation ID and saves as a plain link to #ref-{id}: (Smith 2024), [3].
  • Text formatted from the bibliography block's style; numbers follow the list order the block sets when it sorts.
  • Optional back-links from bibliography entries to where they are cited. (Not built yet; still open here.)
  • Saved as text plus a link, so it reads the same with the plugin off.

Stage 2: first-reference notes

For note styles (Chicago notes-bibliography, OSCOLA).

  • A command that inserts a WordPress core footnote whose text is the full note form of the citation, with an optional locator (page, chapter).
  • Core footnotes live in post metadata, outside the block. Borges writes plain formatted text there, so notes survive deactivation, and must keep them in step when the style changes or a source is edited (the reformat write route and wp borges reformat would need to cover notes too).

Stage 3: shortened notes and ibid.

Later references use the style's shortened note, and, where the style and the writer want it, ibid.

Blockers found

  1. No citation layouts. None of the nine bundled CSL styles has a <citation> element; they are bibliography-only. Each needs note or in-text forms written from its manual, like the bibliography layouts were.

  2. citeproc-php cannot tell note positions apart. In the bundled citeproc-php (src/Constraint/Position.php), ibid, ibid-with-locator and subsequent all use one test: was this item the last one cited? So:

    • a work cited earlier, but not in the previous note, fails the subsequent test and would print as a full first note again;
    • ibid and subsequent cannot be told apart;
    • near-note is not handled.

    Stage 3 needs either Borges to work out positions itself (first, subsequent, ibid., with or without locator, in note order) and render each form directly, or a fix upstream in pkp/citeproc-php. An upstream fix would also help Open Journal Systems and is a natural contribution to PKP, which now maintains the library.

Questions

  • Stage 1: rich-text format, or a small inline block? (A format keeps the text in the paragraph.)
  • Which bibliography block does a citation point to when a post has several?
  • Does Stage 2 require core footnotes (WordPress 6.3+), or should Borges also support themes and plugins that render footnotes their own way?
  • Should a locator be stored with the in-text citation, and in which CSL field?

Related: #242 (optional repeated-author marks in the bibliography).

Activity

  1. changed the title [-]In-text and note citations, in three stages (parenthetical/numeric, first notes, shortened notes and ibid.)[/-] [+]Note citations: first notes in core footnotes, then shortened notes and ibid. (Stages 2–3; Stage 1 shipped in #256)[/+] on Nov 9, 2026
  2. dknauss commented on Nov 9, 2026

    @dknauss
    OwnerAuthor

    Rescoped. #256 shipped Stage 1 and it's in 1.19.0. It answered two of the open questions: the citation is a rich-text format, and its locator is saved as data-locator on the link. Stage 1's back-links weren't built. From here on, this issue tracks those, Stage 2 (first notes in core footnotes), and Stage 3 (shortened notes and ibid.). Both blockers still stand: none of the bundled styles has a <citation> layout, and citeproc-php's position test can't tell ibid from subsequent. The body and title are updated to match.


    Generated by Claude Code

  3. dknauss commented on Nov 9, 2026

    @dknauss
    OwnerAuthor

    Consider this together with the roadmap entry "Note and footnote mode (to consider)" in .planning/ROADMAP.md (added in #264). That entry comes from a look at how ia.net handles notes: Markdown-style endnotes with doc-noteref, doc-endnotes, and doc-backlink roles, but no bibliography or structured data. It adds these to the plan here:

    • An optional bibliography. In note mode the bibliography block could be hidden or kept as a "Works cited" list, with the notes still carrying JSON-LD and COinS through the render-time enrichment.
    • Accessibility roles. role="doc-noteref" and doc-endnotes on notes, and role="doc-biblioref" on the Cite links, which have no role today. Adding doc-biblioref and the Stage 1 back-links in render-time filters could come first, without touching save().
    • Email and feed output for notes (includes/email-output.php).
    • How note numbers interact with numeric styles' [n].

    This issue stays the working plan. The roadmap entry now points here, and it uses the two blockers listed above (no <citation> layouts, and citeproc-php's position test).


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions