docx_plus.notes.read¶
Read footnotes and endnotes from a document. Each result is paired with
the paragraph index of its reference marker so callers can locate where
the note is referenced. Reserved entries (separator and continuation
separator, ids -1 and 0) are filtered out before results are
returned.
docx_plus.notes.read ¶
Read footnotes / endnotes from a document.
Each note is paired with the paragraph index of its reference marker in the body so callers can locate where the note is referenced.
This module imports only from docx_plus.core (SPEC §9.1).
NoteContent
dataclass
¶
A footnote or endnote with its body text and reference location.
Attributes:
| Name | Type | Description |
|---|---|---|
note_id |
int
|
The |
text |
str
|
The note body text. Reserved separator entries (ids
|
paragraph_index |
int
|
Zero-based index (within |
read_footnotes ¶
Return every user-authored footnote in doc.
Reserved entries (separator and continuation separator, ids -1
and 0) are filtered out.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
doc
|
Document
|
The python-docx :class: |
required |
Returns:
| Name | Type | Description |
|---|---|---|
One |
list[NoteContent]
|
class: |
list[NoteContent]
|
the document has no footnotes part. |
Source code in docx_plus/notes/read.py
read_endnotes ¶
Return every user-authored endnote in doc.
Same contract as :func:read_footnotes.