Main Content

mlreportgen.dom.FootnoteOptions Class

Namespace: mlreportgen.dom

Specify footnote options of a document or document section

Since R2024a

Description

The Document Object Model (DOM) API uses the mlreportgen.dom.FootnoteOptions class as the default value for the FootnoteOptions property of document and page layout objects. Set the properties of those mlreportgen.dom.FootnoteOptions 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 FootnoteOptions property for both a section and the document that contains it, the FootnoteOptions property of the section will take precedence. The document uses the default value if any property of mlreportgen.dom.FootnoteOptions is empty.

Note

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

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

Class Attributes

HandleCompatible
true

For information on class attributes, see Class Attributes.

Properties

expand all

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

  • "decimal" (default)

  • "upperRoman"

  • "lowerRoman"

  • "upperLetter"

  • "lowerLetter"

  • "chicago"

Attributes:

NonCopyable
true

Data Types: char | string

Start value of footnote 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 footnote 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.

  • "eachPage" DOCX only— Endnote numbering restarts at the beginning of each new page of the document.

Attributes:

NonCopyable
true

Data Types: char | string

Location of footnotes, specified as "pageBottom" or "beneathText". The location can be either the bottom of the page, "pageBottom", or at the end of the text on the page, "beneathText" (DOCX only).

Attributes:

NonCopyable
true

Data Types: char | string

Tag for the mlreportgen.dom.FootnoteOptions 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 the mlreportgen.dom.FootnoteOptions 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 footnotes 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 footnote options.

d.FootnoteOptions.NumberingType = "lowerRoman";
d.FootnoteOptions.NumberingStartValue = 2;

Create a footnote and append it to the paragraph.

footnote = Footnote("The temple of Athena Parthenos, completed in 438 B.C., regarded as finest Doric temple");
append(para,footnote);
append(para,", the Athenian empire was at the height of its power.");
append(d,para);

para = Paragraph("Second paragraph begins here");

Create a second footnote and append it to the paragraph.

footnote = Footnote("Second footnote text");
append(para,footnote);
append(para,", some more text.");
append(d,para);

Close and view the report.

close(d);
rptview(d);

Version History

Introduced in R2024a