InDesign2026
API 21.5.1.73
Object

MathObject

A math object.

Hierarchy

Rectangle

MathObject

Properties

NameType AccessDescription
Number read/write The font size (in points) for Math objects
Number[] read/write RGB Color applied on the math object specified in 0-255 range.
String | Swatch | NothingEnum
read/write The swatch used for math object color. Also accepts swatch name.(RGB, CMYK, LAB and HSB swatches supported.). Can return: Swatch or NothingEnum enumerator. Can also accept: String.
EventListeners<EventListener> readonly A collection of event listeners.
Events<Event> readonly A collection of events.
Number readonly The unique ID of the MathObject.
Number readonly The index of the MathObject within its containing object.
Boolean readonly Is the SVG Object a MathML object.
Boolean readonly Returns true if the object specifier resolves to valid objects.
String read/write A property that can be set to any string.
String read/write MathML Description of the SVG Object. Returns empty string if not a MathML Object.
String read/write The name of the MathObject; this is an alias to the MathObject's label property.
Rectangle readonly The parent of the MathObject (a Rectangle).
Object read/write A property that allows setting of several properties at the same time.
Number 0–100 read/write The percent of the base color. (Range: 0 to 100)

Events

NameDescription
Dispatched after a MathObject is placed. This event bubbles. This event is not cancelable.
Dispatched before a MathObject is placed. This event bubbles. This event is cancelable.

Methods

→ EventListener

Adds an event listener.

eventType String The event type.
handler File | JavaScriptFunction The event handler. Can accept: File or JavaScript Function.
captures? Boolean This parameter is obsolete.
→ String

Gets the label value associated with the specified key.

key String The key.
→ MathObject[]

Resolves the object specifier, creating an array of object references.

→ void

Sets the label to the value associated with the specified key.

key String The key.
value String The value.
→ Boolean

Removes the event listener.

eventType String The registered event type.
handler File | JavaScriptFunction The registered event handler. Can accept: File or JavaScript Function.
captures? Boolean This parameter is obsolete.
→ String

Generates a string which, if executed, will return the MathObject.

→ String

Retrieves the object specifier.

Object of 3

Properties elsewhere that hold a MathObject.

Parameter of 3

Method parameters that accept a MathObject.

Return 14

Methods that return a MathObject.