Math Text Instruction Syntax

The math text instruction set offers advanced formatting of text in the map window. Math text instructions can be used to change the typeface, size, color, weight, and style of text on a character-by-character basis. Greek letters and mathematical symbols can be written in the map window using math text instructions. The math text instructions also allow for the detailed placement of characters and symbols; thus, superscripts, subscripts, and the superposition of characters are possible.


All text within the map window can be controlled by math text instructions. For example, text blocks can include math text instructions via the Text dialog. The worksheet cells used as pin map labels can contain math text instructions. In general, the clipboard can be used to cut and paste math text instructions.


Unless otherwise indicated, all math text instructions begin with a backslash ("\"), and end with a single space. For example, the instruction "\up50 " shifts the baseline of the text up 50 percent of the current text height. All characters from the beginning backslash through the ending single space are interpreted as instructions by the math text interpreter and are not included in the resulting label.


Each line in a text block starts with the default text properties such as typeface, size, color, and style. (Note that some typefaces, such as Symbol, do not support bold or italicized text.) A line of text within a text block uses the current properties until a math text instruction is encountered. All text following an instruction is modified according to the instruction. For example, if the typeface is changed in the middle of a text string, the text following the instruction uses the new typeface until the end of the line of text is reached or until another instruction affecting the typeface is encountered.


Math text instructions can also be encapsulated so they are not carried out over an entire line. A left curly brace ("{") instructs the math text system to remember all of the text properties in effect at that point. A right curly brace ("}") restores the properties to what they were at the matching left curly brace. This allows the insertion of special text in the middle of an otherwise uniform text block. The only instructions this does not apply to are text baseline instructions (\dnX and \upX), and the position instructions (\rpX and \spX). Curly braces can be nested.


To incorporate a backslash, right curly brace, or left curly brace as a text character in a text block, precede them with a backslash when entering the text string. For example, "\\" produces "\", and "\{" produces "{".


Instructions based on a percentage, such as font size, are cumulative. This means that a second percentage change within a text block is interpreted as a percentage of the first percentage change. For example, if the font is scaled by 50 percent, and later in the same text block the font is scaled by 50 percent again, the font size after the second percentage would be 25 percent of the original font size.


Math text instructions are not case sensitive except for typeface names. Typeface names must appear exactly as they are named, including capitalization.



\sp1 {\fs200 \ f"Symbol" \a229 \sp2 }{\rp1 \dn90 \fs75 i=1\rp1 \up220 n}\rp2 \up25 X\dn50 {\fs75 i}\up50 Y\dn50 {\fs75 i}\up50 = S{\dn50 {\fs75 XY}\up50 }