Skip to main content

Parameters

The following tables summarize the parameters that can be sent to MathType GUI (JavaScript), Web services and library.

Global

Alignment properties

Key

Description

Values

Default

centerBaseline

Defines whether to add extra space to vertically center the image with the baseline. This property is only used when generating PNG images.

true, false

true

Style properties

Key

Description

Values

Default

globalStyles

Defines if the above parameters apply to the whole formula or to selected text only.

true, false

true

Note: The rest of this table assumes globalStyles is never modified and is always true (so changes in the other parameters apply to the whole formula). This parameter changes precisely that behavior.

fontFamily

Defines the font face family of the whole formula. The values are mapped to fonts installed on the server.

Arial, Times New Roman, Verdana, Tahoma, Courier New, STIX¹

Arial

color

Defines the color of the whole formula.

A color with the form #RGB or #RRGGBB

#000000 (black)

backgroundColor

Defines the background color of the whole formula.

The constant transparent or color with the form #XXXXXX

#ffffff (editor), transparent (PNG)

fontStyle

Defines the fontStyle of the whole formula.

normal: mi and mn are not italic. italic: mi and mn are italic. initial: mi elements with one letter are italic; mi with more than one letter are not italic, mn elements are not italic.

initial

fontSize

Defines the fontSize of the whole formula.

A size with the form XXpx

16px

display

Sets the display mode. The display mode inline means that the formula will appear in a paragraph with other text and it is important to be not very high. Block means that the formula will appear alone in a paragraph and we want it bigger for clarity.

inline, block

block

¹The font family is replaced by an equivalent one in linux (which must be installed in the server): Lucida Sans, FreeSerif, DejaVu LGC Sans, DejaVu LGC Sans and FreeMono, respectively.

Other properties

Key

Description

Values

Default

dpi

Defines the dpi's of the formula. This feature scales the formula with a factor of dpi/96.

A number.

96

metadpi

Use only on PNG output. Defines the dpi's meta information that is stored in an image.

A number.

96

embedfonts

Use only on SVG or EPS output. If true, the font used will be embedded in the output; the output will be bigger but will have the same shape for all clients. If not true, the output file will be smaller, but the shape of the formula will depend on the fonts the clients have installed. Not the whole font is embedded but only the subset of all used characters.

true, false

true

basepath

Use only on SVG output and embedfonts=false. The client's browser or SVG reader will ask the fonts of this path.

URL of the fonts folder. It can be absolute or relative to the MathType service.

resources/fonts

defaultStretchy

Whether the MathML of the parenthesis are interpreted as stretchy by default. For example whether <mo>(</mo> is equivalent to <mo stretchy="true">(</mo>. This attribute is useful for compatibility with other MathML engines.

true, false

false

Editor GUI

The following properties are used only with the MathType user interface and are ignored when calling the Web services or library.

Editor GUI properties

Key

Description

Values

Default

toolbar

Used to rearrange buttons in the toolbar.

general, quizzes, chemistry, evaluate, PARCC_Grade3_5, PARCC_Grade6_8, PARCC_Grade9_12, prototype, or a XML string. See Custom toolbar

general

toolbarHidden

Used to hide the toolbar.

true, false

false

fonts

List of items for the font selector.

JSON, both object and string. See Custom font list

reservedWords

The reserved words are the variables that are not italicized and represent usually functions (sin) or well-known constants (e).

List of reserved words separated by comma.

sin, cos, tan, log, ln

mml

The initial MathML content of the editor. Used to set the content at initialization time of the editor.

MathML

autoformat

Replaces some symbols from keyboard by their better looking counterparts. See list of replacements.

true, false

false

toolbarSize

Magnifies the toolbar and its elements by a factor.

1, 1.5, 2

1

detectHand

Sets whether or not Hand is shown in the editor

true, false

true

allowForceStretchy

Allows the user to set the stretchiness of any operator. By default only operators that can be stretched visually will show the 'Stretchy' button in the contextual tab; setting this value to true will display it for any operator. This is intended to be used only by publishers.

true, false

false

Regional properties

Key

Description

Values

Default

language

Language of the editor

See list of languages²

en

rtlLanguages

List of Right to Left languages. When the language parameter (see above) belongs to this list, formulas are edited right to left.

List of languages separated by a comma.

ar

ltrLanguages

Used to define Left to Right languages and to overwrite rtlLanguages. For example, if rtlLanguages is ar and ltrLanguages is ar_ma, all arabic languages are defined as RTL except arabic from Morocco.

List of languages separated by a comma.

ar_ma

arabicIndicLanguages

Used to define languages that use Arabic-Indic numerals³.

List of languages separated by a comma.

ar_eg, ar_sd, ar_sa

easternArabicIndicLanguages

Used to define languages that use Eastern Arabic-Indic numerals³.

List of languages separated by a comma.

fa, ps, ur

europeanLanguages

Used to define languages that use European numerals and overwrite arabicIndicLanguages and easternArabicIndicLanguages³.

List of languages separated by a comma.

See also the Arabic countries table.

²Locales are also supported (ar_sa) and, if the specified locale is not found, the generic language is used (in this case, ar).

³Numbers entered with keyboard are replaced by their equivalents in the numerals assigned to the current editor language.

Output values

When using the library to call the different services, some additional output values are returned.

Render service output values

Key

Description

Values

Default

baseline

The distance from the top of the formula to the baseline of the generated image.

A number.

16

width

The width in pixels of the generated image.

A number.

100

height

The height in pixels of the generated image.

A number.

24

Hand

The following tables summarize the parameters that can be sent to Hand.

Style properties

Key

Description

Values

Default

lineWidth

Defines the width of the handwriting

Size in pixels

3

lineColor

Defines the color of the handwriting

A color with the form #XXXXXX

#284283

previewZoom

Defines the size of the recognized math expression

Zoom factor

1.5

Other properties

Key

Description

Values

Default

detectHand

Sets whether or not Hand is shown in the editor

true, false

true

readOnly

Sets read-only mode (input and recognition disabled)

true, false

false

deletionGesture

Disables the deletion gesture

true, false

true

toolbarHidden

Sets whether the toolbar is displayed or not

true, false

false

recognitionDelay

Sets the time after the user stops writing to trigger the recognition of the input

Time in milliseconds

500

handPath

Defines the path of the Hand server components

Absolute path of the Hand server components

/hand

The following table describes the parameters that can be used in order to constrain the math expressions that the handwriting recognition engine is able to recognize. This parameter constraints has, in turn, two parameters.

Constraints

Key

Description

Values

Default

symbols

Defines the set of symbols to take into account

Array of strings, where each string encodes a symbol

no constraint

structure

Defines the set of structures to take into account

Array of strings, where each string represents a structure of math notation

no constraint