Skip to content

Phase A.2: High-level footnotes API — document.footnotes.add() #2

@loadfix

Description

@loadfix

Create the high-level API for adding footnotes. Depends on #1.

  • document.footnotes property (Footnotes collection)
  • document.footnotes.add(paragraph, run, text) — creates a footnote, inserts a w:footnoteReference in the specified run, returns a Footnote object
  • The footnoteReference run should use the FootnoteReference character style
  • Footnote object with .paragraphs, .footnote_id, .add_paragraph(text, style)
  • Footnotes collection is iterable and supports len()

Files: docx/footnotes.py, docx/document.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    agentTriggers the developer agentenhancementNew feature or requestops-approvedphase-aFootnotes & Endnotesproduct-approvedProduct agent approved for development

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions