MathObjects

A collection of math objects.

Methods:

[], add, anyItem, count, everyItem, firstItem, item, itemByID, itemByName, itemByRange, lastItem, middleItem, nextItem, previousItem, toSource

Property Listing

Property

Type

Access

Description

length

Number

readonly

The number of objects in the collection.

Method Listing

MathObject [] (index:Number)

Returns the MathObject with the specified index.

Parameter

Type

Description

index

Number

The index.

MathObject add (mathmlDescription:String, destinationPage:Page, destinationLayer:Layer, placePoint:Array of Number String, withProperties:Object)

Creates a new math object.

Parameter

Type

Description

mathmlDescription

String

The MathML description to create the SVG from. (Optional)

destinationPage

Page

The page on which to create the object. (Optional)

destinationLayer

Layer

The layer on which to create the Object. Uses active document layer by default (Optional)

placePoint

Array of Number

Array of String

The point where to place the object (only applicable if page is provided) (Optional)

withProperties

Object

Initial values for properties of the new MathObject (Optional)

MathObject anyItem ()

Returns any MathObject in the collection.

Number count ()

Displays the number of elements in the MathObject.

MathObject everyItem ()

Returns every MathObject in the collection.

MathObject firstItem ()

Returns the first MathObject in the collection.

MathObject item (index:Varies LongInteger String)

Returns the MathObject with the specified index or name.

Parameter

Type

Description

index

LongInteger

String

The index or name. Can accept: Long Integer or String.

MathObject itemByID (id:Number)

Returns the MathObject with the specified ID.

Parameter

Type

Description

id

Number

The ID.

MathObject itemByName (name:String)

Returns the MathObject with the specified name.

Parameter

Type

Description

name

String

The name.

MathObject itemByRange (from:Varies LongInteger MathObject String, to:Varies LongInteger MathObject String)

Returns the MathObjects within the specified range.

Parameter

Type

Description

from

LongInteger

MathObject

String

The MathObject, index, or name at the beginning of the range. Can accept: MathObject, Long Integer or String.

to

LongInteger

MathObject

String

The MathObject, index, or name at the end of the range. Can accept: MathObject, Long Integer or String.

MathObject lastItem ()

Returns the last MathObject in the collection.

MathObject middleItem ()

Returns the middle MathObject in the collection.

MathObject nextItem (obj:MathObject)

Returns the MathObject whose index follows the specified MathObject in the collection.

Parameter

Type

Description

obj

MathObject

The MathObject whose index comes before the desired MathObject.

MathObject previousItem (obj:MathObject)

Returns the MathObject with the index previous to the specified index.

Parameter

Type

Description

obj

MathObject

The index of the MathObject that follows the desired MathObject.

String toSource ()

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

Object of

Document.mathObjects

Rectangle.mathObjects