Skip to content

book-theme: in-text citations render a hover card but no anchor link to the reference entry #72

Description

@mmcky

In-text citations ({cite}, {cite:p}, {cite:t}) render with a hover preview but are not wrapped in an anchor, so clicking a citation does not navigate to its entry in the per-chapter References list — even though the destination id already exists in the rendered page. Cross-references to equations / theorems, by contrast, do get an anchor and navigate correctly. Reported in QuantEcon/book-dp-public#29.

Evidence (book-dp2, qe-v8). In the same paragraph, an equation cross-reference navigates but the citation does not.

In-text citation — no <a href>, so the click is inert:

<cite class="" data-state="closed"><span class="hover-link">Bellman, 1957</span></cite>

Equation cross-reference — wrapped in an anchor that navigates:

<a href="#eq-fintroie" class="hover-link">(1.6)</a>

The destination exists in the rendered References list:

<… id="cite-bellman1957dynamic">Bellman, R. (1957). Dynamic programming …

Expected. Clicking an in-text citation scrolls to #cite-<key> in the References list — i.e. wrap the citation in <a href="#cite-<key>">, the way cross-references already are. The hover card can stay.

Actual. The citation is a <cite><span class="hover-link"> with no anchor, so the click does nothing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions