Repository navigation
Description
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 reformatwould 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
-
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. -
citeproc-php cannot tell note positions apart. In the bundled citeproc-php (
src/Constraint/Position.php),ibid,ibid-with-locatorandsubsequentall use one test: was this item the last one cited? So:- a work cited earlier, but not in the previous note, fails the
subsequenttest and would print as a full first note again; ibidandsubsequentcannot be told apart;near-noteis 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.
- a work cited earlier, but not in the previous note, fails the
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
[-]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)[/+]dknauss commentedon Nov 9, 2026
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-locatoron 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 tellibidfromsubsequent. The body and title are updated to match.Generated by Claude Code
dknauss commentedon Nov 9, 2026
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 withdoc-noteref,doc-endnotes, anddoc-backlinkroles, but no bibliography or structured data. It adds these to the plan here:role="doc-noteref"anddoc-endnoteson notes, androle="doc-biblioref"on the Cite links, which have no role today. Addingdoc-bibliorefand the Stage 1 back-links in render-time filters could come first, without touchingsave().includes/email-output.php).[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
docs: link the footnote-mode roadmap entry to #243 (#265)