Main Content

mlreportgen.dom.EndnoteOptions Class

Namespace: mlreportgen.dom

Specify endnote options of a document or document section

Since R2024a

Description

The Document Object Model (DOM) API uses the mlreportgen.dom.EndnoteOptions class as the default value for the EndnoteOptions property of document and page layout objects. Set the properties of those mlreportgen.dom.EndnoteOptions objects to specify the footnote options of documents and document page layout sections. You do not need to create instances of this class yourself. If you specify the EndnoteOptions property for both a section and the document that contains it, the EndnoteOptions property of the section will take precedence. The document uses the default value if any property of mlreportgen.dom.EndnoteOptions is empty.

Note

You can use the mlreportgen.dom.EndnoteOptions class with DOCX and PDF documents.

The mlreportgen.dom.EndnoteOptions class is a handle class.

Class Attributes

HandleCompatible
true

For information on class attributes, see Class Attributes.

Properties

expand all

Endnote mark numbering type, specified as one of these valid numbering types:

  • "decimal"

  • "upperRoman"

  • "lowerRoman" (default)

  • "upperLetter"

  • "lowerLetter"

  • "chicago"

Note

Numbering types are case insensitive.

Attributes:

NonCopyable
true

Data Types: char | string

Start value of endnote mark numbering, specified as a positive integer. If you specify a value that contains a decimal, the class rounds down the value to the nearest integer

Example: 1

Attributes:

NonCopyable
true

Data Types: double

Where to restart endnote numbering, specified as one of these options:

  • "continuous" (default) — Endnote numbering continues iteratively without restarting.

  • "eachSect"— Endnote numbering restarts at the beginning of each new section of the document.

Attributes:

NonCopyable
true

Data Types: char | string

Location of endnotes in the document or section, specified as "docEnd" or "sectEnd". The location can be either the end of the document, "docEnd", or the end of each section, "sectEnd".

Attributes:

NonCopyable
true

Data Types: char | string

Tag for mlreportgen.dom.EndnoteOptions 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

Object identifier for mlreportgen.dom.EndnoteOptions 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

Examples

collapse all

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");

Set document-wide endnote options.

d.EndnoteOptions.NumberingType = "upperLetter";
d.EndnoteOptions.NumberingStartValue = 2;

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 a second endnote and append it to the paragraph.

endnote = Endnote("Second endnote text");
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