w:endnoteReference (Inline Endnote Reference)
Inline element placed in the main document body that creates a superscript reference mark linking to an endnote definition.
Parent elements
Description
w:endnoteReference is an inline run content element placed in the main document body. It renders as a superscript auto-numbered mark and links to the matching w:endnote in endnotes.xml via the shared w:id.
It is defined in ECMA-376 Part 1 §17.11.7.
w:endnoteReference is the endnote counterpart to w:footnoteReference.
Attributes
| Attribute | Type | Possible Values | Description |
|---|---|---|---|
w:id |
xsd:integer |
Positive integer | ID of the corresponding w:endnote element. Must match exactly. |
w:customMarkFollows |
ST_OnOff |
true, false, 1, 0 |
When true, the following run provides a custom mark character instead of the auto-generated number. |
Examples
<!-- In document.xml body -->
<w:p>
<w:r><w:t xml:space="preserve">Primary source</w:t></w:r>
<w:r>
<w:rPr><w:rStyle w:val="EndnoteReference"/></w:rPr>
<w:endnoteReference w:id="1"/>
</w:r>
<w:r><w:t> for this claim.</w:t></w:r>
</w:p>
using DocumentFormat.OpenXml.Wordprocessing;
var refRun = new Run();
refRun.AppendChild(new RunProperties(
new RunStyle { Val = "EndnoteReference" }
));
refRun.AppendChild(new EndnoteReference { Id = 1 });
paragraph.AppendChild(refRun);
Notes
- The
w:idmust exactly match aw:endnote w:idinendnotes.xml. A mismatch creates a broken reference. - Superscript formatting comes from the
EndnoteReferencecharacter style applied to the surrounding run. w:customMarkFollows="true"is used when the footnote/endnote uses a custom mark (e.g.*) instead of an auto-number.