Footnotes and Endnotes

Footnotes and Endnotes

Aspose.Words FOSS for .NET represents footnotes and endnotes with a single Footnote node class distinguished by its FootnoteType property, alongside separate numbering-options and separator classes in the Aspose.Words.Notes namespace.


Reading Footnote and Endnote Content

Footnote is a composite story node — like Body or a table cell, it contains Paragraphs and Tables — that holds the text of one footnote or endnote. Its FootnoteType property (a FootnoteType enum value, Footnote or Endnote) distinguishes which kind it is. ReferenceMark returns the configured reference mark character, ActualReferenceMark returns the mark actually rendered (accounting for automatic numbering), and IsAuto reports whether the mark is auto-numbered. ParentParagraph locates the paragraph in the main document body where the footnote or endnote reference occurs. GetText() extracts the plain-text content of the footnote, mirroring the method available on other story-level nodes.


Configuring Numbering and Position

Numbering and placement behavior are controlled separately for footnotes and endnotes through FootnoteOptions and EndnoteOptions, both implementing the shared IFootnoteOptions interface. FootnoteOptions.Position (a FootnotePosition value — BottomOfPage or BeneathText) and EndnoteOptions.Position (an EndnotePosition value — EndOfSection or EndOfDocument) control where each type is placed. Both expose NumberStyle, StartNumber, and RestartRule (a FootnoteNumberingRule value — Continuous, RestartSection, RestartPage, or Default) to control the numbering sequence. FootnoteOptions additionally exposes Columns, for laying out footnotes at the bottom of the page in multiple columns.


Footnote and Endnote Separators

FootnoteSeparator is a story node holding the content Word draws between the main document body and its footnotes/endnotes — the short horizontal line by default, but it can contain any paragraph content. Its SeparatorType property (a FootnoteSeparatorType value) distinguishes the six separator roles Word defines: FootnoteSeparator, FootnoteContinuationSeparator, FootnoteContinuationNotice, and the endnote equivalents. FootnoteSeparatorCollection provides typed access to all separator nodes in a document via GetByFootnoteSeparatorType(FootnoteSeparatorType).


Tips and Best Practices

  • Check Footnote.FootnoteType before assuming a Footnote node is a footnote — the same class represents both footnotes and endnotes.
  • Use ActualReferenceMark rather than ReferenceMark when you need the mark as it will actually render, since auto-numbered marks differ from the configured mark character.
  • Configure FootnoteOptions and EndnoteOptions before adding footnote/endnote content so numbering rules apply consistently from the first note.
  • FootnoteSeparator content is rarely customized — most documents rely on Word’s default separator — but it is fully accessible if a document requires a custom continuation notice.

Common Issues

IssueCauseFix
Footnote and endnote confused in processing logicBoth use the same Footnote classBranch on Footnote.FootnoteType
Reference mark text doesn’t match rendered outputUsed ReferenceMark instead of ActualReferenceMarkRead ActualReferenceMark for the as-rendered mark
Numbering restarts unexpectedly per page/sectionRestartRule set to RestartPage or RestartSectionSet RestartRule to Continuous for document-wide numbering
Footnote columns ignored at bottom of pageFootnoteOptions.Columns not setSet Columns explicitly on FootnoteOptions

FAQ

How do I tell a footnote apart from an endnote in code?

Check the FootnoteType property on the Footnote object — it returns FootnoteType.Footnote or FootnoteType.Endnote.

Can footnotes and endnotes have different numbering rules?

Yes — FootnoteOptions and EndnoteOptions are configured independently, each with its own Position, NumberStyle, StartNumber, and RestartRule.

What is FootnoteSeparator used for?

It represents the content Word inserts to visually separate the main document body from its footnotes or endnotes, and the notice shown when a footnote continues onto the next page.

Does Footnote support tables inside the note?

Yes — Footnote exposes a Tables property alongside Paragraphs, since it is a composite story node like the main document body.


API Reference Summary

Class / MethodDescription
FootnoteContainer node for one footnote or endnote’s content
FootnoteTypeEnum: Footnote, Endnote
FootnoteOptionsFootnote numbering and position settings for a document/section
EndnoteOptionsEndnote numbering and position settings for a document/section
FootnotePosition / EndnotePositionEnums for placement (BottomOfPage/BeneathText, EndOfSection/EndOfDocument)
FootnoteNumberingRuleEnum controlling when numbering restarts
FootnoteSeparatorStory node for the footnote/endnote separator content
FootnoteSeparatorCollectionTyped access to all FootnoteSeparator nodes
FootnoteSeparatorTypeEnum identifying which of the six separator roles a node represents

See Also