w:footnoteReference (Inline Footnote Reference)
Inline element placed in the main document body that creates a superscript reference mark linking to a footnote definition.
Parent elements
Description
w:footnoteReference is an inline run content element placed in the main document body. It renders as a superscript auto-numbered mark (e.g. ¹) and links to the matching w:footnote in footnotes.xml via the shared w:id.
It is defined in ECMA-376 Part 1 §17.11.16.
Attributes
| Attribute | Type | Possible Values | Description |
|---|---|---|---|
w:id |
xsd:integer |
Positive integer | ID of the corresponding w:footnote element. Must match exactly. |
w:customMarkFollows |
ST_OnOff |
true, false, 1, 0 |
When true, the superscript mark is provided by a following run rather than auto-generated. |
Examples
<!-- In document.xml body -->
<w:p>
<w:r><w:t xml:space="preserve">See the specification</w:t></w:r>
<w:r>
<w:rPr><w:rStyle w:val="FootnoteReference"/></w:rPr>
<w:footnoteReference w:id="1"/>
</w:r>
<w:r><w:t> for details.</w:t></w:r>
</w:p>
using DocumentFormat.OpenXml.Wordprocessing;
var refRun = new Run();
refRun.AppendChild(new RunProperties(
new RunStyle { Val = "FootnoteReference" }
));
refRun.AppendChild(new FootnoteReference { Id = 1 });
paragraph.AppendChild(refRun);
Notes
- The
w:idmust exactly match aw:footnote w:idinfootnotes.xml. A mismatch causes an undefined reference. - The rendering of the superscript comes from the
FootnoteReferencecharacter style, not from the element itself. w:customMarkFollows="true"is used for custom footnote marks (e.g. a dagger symbol) where the next run provides the literal mark character.