mlreportgen.dom.Endnote Class
Namespace: mlreportgen.dom
Description
Use an object of the mlreportgen.dom.Endnote
class to include an endnote in a DOCX or
PDF report.
The mlreportgen.dom.Endnote
class is a handle
class.
Creation
Description
endnote = Endnote
creates a default endnote object.
creates an endnote object, and appends its children with the endnote
= Endnote(text
)Text
object created using the specified string.
creates an endnote object, and appends its children with the endnote
= Endnote(double
)Number
object created using the specified double value.
creates an endnote object, and appends the specified DOM object to its children.endnote
= Endnote(docElementObj
)
sets the endnote
= Endnote(___,customMark
)CustomMark
property to customMark
, in
addition to any combination of input arguments from previous syntaxes.
Input Arguments
text
— Text
object text
[]
(default) | character vector | string scalar
Text used to create a Text
object, specified as a character vector or string scalar.
Data Types: char
| string
double
— Number
object value
[]
(default) | numeric scalar
Value used to create a Number
object, specified as a numeric scalar.
Data Types: double
docElementObj
— Document element to include in endnote
[]
(default) | DOM object
Document Object Model (DOM) object to include in the endnote, specified as one of these DOM objects:
Properties
CustomMark
— Custom mark of this mlreportgen.dom.Endnote
object
''
(default) | character vector | string scalar
Custom mark of this mlreportgen.dom.Endnote
object, specified as a string scalar or
a character vector. The mark must be a maximum of 10 characters long. If this property is
empty, the mark of the first mlreportgen.dom.Endnote
object is "1"
,
incrementing for each additional mlreportgen.dom.Endnote
object.
Example: "A"
Attributes:
NonCopyable | true |
Data Types: char
| string
StyleName
— Style name of this mlreportgen.dom.Endnote
object
[]
(default) | character vector | string scalar
Style name, specified as a character vector or string scalar. The style name is the
name of a style specified in the style sheet of the document or document part to which
you append this object. The specified style defines the appearance of this object in the
output document unless overridden by the formats specified by the
Style
property of this element. To learn more about using style
sheets, see Use Style Sheet Styles.
Note
This style applies only to the endnote mark, not to the contents of the endnote.
Attributes:
NonCopyable | true |
Data Types: char
| string
Style
— Format specification for endnote mark
{}
(default) | array of format objects
Format specification for this endnote mark, specified as an array of format objects.
The formats specified by this property override corresponding formats specified by the
StyleName
property. The endnote ignores formats that do not apply
to this document element object.
Note
This style applies only to the endnote mark, not to the contents of the endnote.
Attributes:
NonCopyable | true |
Parent
— Parent of mlreportgen.dom.Endnote
object
document element object
Parent of mlreportgen.dom.Endnote
object, specified as a document element
object. A document element object must have only one parent.
Note
You must append Footnote
and Endnote
objects to
Paragraph
objects.
Attributes:
SetAccess | private |
NonCopyable | true |
Children
— Children of mlreportgen.dom.Endnote
object
array of document element objects
Children of mlreportgen.dom.Endnote
object, specified as an array of document
element objects. This property contains the document element objects appended using the
append
method.
Attributes:
SetAccess | private |
NonCopyable | true |
Tag
— Tag for mlreportgen.dom.Endnote
object
character vector | string scalar
Tag for the mlreportgen.dom.Endnote
object, specified as a character vector or
string scalar. The DOM API generates a session-unique tag as part of the creation of
this object. The generated tag has the form
CLASS:ID
, where
CLASS
is the object class and
ID
is the value of the
Id
property of the object. Specify your own tag value to help
you identify where to look when an issue occurs during document generation.
Attributes:
NonCopyable | true |
Data Types: char
| string
Id
— Object identifier for mlreportgen.dom.Endnote
object
character vector | string scalar
Object identifier for the mlreportgen.dom.Endnote
object, specified as a
character vector or string scalar. The DOM API generates a session-unique identifier
when it creates the document element object. You can specify your own value for
Id
.
Attributes:
NonCopyable | true |
Data Types: char
| string
Methods
Public Methods
Method | Purpose |
---|---|
append | Append content to endnote
|
clone | Create copy of this DOM element
Note Use this method to append the same content to different parts of a document. Do not attempt to add the same object to a document more than once. |
Examples
Add Endnotes to Report
You can add endnotes to DOCX and PDF reports.
Import the DOM API package so you do not have to use fully qualified class names.
import mlreportgen.dom.*;
Create a document.
d = Document("report","docx");
Open the document and add a paragraph.
open(d);
para = Paragraph("When work began on the Parthenon");
Create an endnote, and append it to the paragraph.
endnote = Endnote("The temple of Athena Parthenos, completed in 438 B.C., regarded as finest Doric temple"); append(para,endnote); append(para,", the Athenian empire was at the height of its power."); append(d,para); para = Paragraph("Second paragraph begins here");
Create an endnote, with a custom mark and append it to the paragraph.
endnote = Endnote("Second endnote text","A"); append(para,endnote); append(para,", some more text."); append(d,para);
Close and view the report.
close(d); rptview(d);
Version History
Introduced in R2024a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)