The post Default Math Properties appeared first on Math in Office.

]]>You can change the default settings to suit your tastes or a publisher’s conventions. In the math ribbon (type Alt+= to insert a math zone and select the math ribbon tab), click on the Tools button over toward the left side of the ribbon. A dialog will be displayed that shows a variety of math properties along with buttons to access the math autocorrect and recognized-function dialogs.

The document default math properties in this dialog are described in a somewhat technical way in the math section of the RTF specification. The properties belong to the RTF {\mmathPr…} group. They are also children of the <mathPr> OMML element. In this post, I describe the properties in a less technical way. For easy reference to the RTF specification, the relevant RTF control word is listed in parentheses along with the corresponding ITextDocument property values. The dialog also has some options that are not document default math properties, such as “Copy MathML to the clipboard as plain text” instead of “Copy Linear Format to the clipboard as plain text.” Such options do not affect the layout of a document and hence are stored in the system registry rather than in the document.

The Word Equation/Conversions dialog gives a drop-down list of math fonts that can be used as the default math font for the document. Cambria Math and STIX Two Math MS are examples of math fonts. (RTF: \mmathFont*N*)

Specifies that nested fractions should be displayed such that the numerator and denominator are written in a script or script-script size instead of regular-text size. Specifically, characters in the outermost fraction’s numerator and denominator are displayed using the full text size, characters in a nested fraction are displayed in the script size (about 70% as large as the text size), and fractions nested inside a nested fraction are displayed in scriptscript size (about 60% as large as the text size). TeX uses this “small fraction” choice by default, but Word 2007 does not, basically because in all the physics books I’ve read I don’t remember seeing reduced sizes used in display math. But if you prefer them, you can change them. For in-line math expressions, small fractions are used. (RTF: \msmallFrac*N*; SetMathProperty—tomMathDispFracTeX)

By default, a line break occurs before the binary operator. That is, the binary operator is the first control word on the wrapped line. But you can change it so that a line break occurs after the operator (tomMathBrkBinAfter), or so that the operator is duplicated (tomMathBrkBinDup), that is, it appears at the end of the first line and at the start of the second. (RTF: \mbrkBin*N*; SetMathProperty)

If the minus operator (U+2212) coincides with a line break, by default the minus appears after the line break. But it can appear before and after the break (tomMathBrkBinSubMM) or a plus before the break and a minus after the break (tomMathBrkBinSubPM), or vice versa (tomMathBrkBinSubMP). (RTF: \mbrkBinSub*N*; SetMathProperty)

Limits of integrals in display-mode equations can be either centered above and below the integral or positioned just to the right of the integral. The default setting is to position the limits to the right of the operator (subscript/superscript). (RTF: \mintLim*N*; SetMathProperties—tomMathDispIntUnderOver)

Limits of summations, products, and other *n*-ary operators can be either centered above and below the *n*-ary operator, or positioned just to the right of the operator. The default setting is above and below the operator. (RTF: \mnaryLim*N*; SetMathProperties—tomMathDispNarySubSup)

In the United States, the differential d (ⅆ – U+2146) is almost always displayed as a math italic d, but in Europe, an upright d is standard. The latter choice emphasizes that the differential d is different from regular mathematical variables. Similarly, the Napierian logarithm base ⅇ (U+2147) and the imaginary unit ⅈ (square root of -1, U+2148) are displayed as math italic in the United States and upright in Europe. (RTF: \mdispDef*N*; SetMathProperties—tomMathDocDiffDefault, tomMathDocDiffUpright, tomMathDocDiffItalic, tomMathDocDiffOpenItalic).

Math object arguments may be optional, e.g., integral limits, or essential, e.g., numerator or denominator. To control what is displayed for empty arguments there are three possibilities: tomMathDocEmptyArgAuto, tomMathDocEmptyArgAlways (display ⬚), and tomMathDocEmptyArgNever. The first of these doesn’t display anything for optional arguments unless you use the arrow keys to move into the argument, at which point the ⬚ is displayed and you can enter math text. This setting is controlled by SetMathProperties() and isn’t persisted since it’s a UI property, not a document property. Note that if tomMathDocEmptyArgAlways is active, you can still display nothing by entering a zero-width space (U+200B).

Document properties to use the default math paragraph settings for equations, i.e., use values given by \mlMargin*N*, \mrMargin*N*, \mdefJc*N*, \mwrapIndent*N*, \mwrapRight*N*, etc., defined below. The default is to use the default math settings described below, but you can change it to use the text paragraph settings. (RTF: \mdispDef*N*; SetMathProperties—tomMathDispDef)

Document property for the left margin for math. Math margins are added to the paragraph settings for margins. (RTF: \mlMargin*N*; SetProperty—tomMathLMargin)

Right margin for math. (RTF: \mrMargin*N*; SetProperty—tomMathRMargin))

Document property for the default justification of displayed math zones. Individual equations can overrule the default setting. Displayed math zones can be left justified, right justified, centered, or centered as a group. When a displayed math zone is centered as a group, the equation(s) are ordinarily left aligned within a block, and the entire block is centered with respect to column margins. The user can use a context menu to align equations in more general ways, e.g., on the equal signs. (RTF: \mdefJc*N*; SetMathProperties—tomMathParaAlignCenterGroup, tomMathParaAlignCenter, tomMathParaAlignLeft, tomMathParaAlignRight)

Indent of wrapped line of an equation. The line or lines of a wrapped equation after the line break can either be indented by a specified amount from the left margin, or right-aligned. The default indent is 1”. (RTF: \mwrapIndent*N*; SetProperty—tomMathWrapIndent)

If enabled, right justify wrapped lines of an equation. If disabled, the line or lines of a wrapped equation after the line break are indented by **\mwrapIndent N** from the left margin. (RTF: \mwrapRight

(RTF: \mpreSp*N*; SetProperty—tomMathPreSpace).

(\RTF: mintraSp*N*; SetProperty—tomMathPostSpace).

(RTF: \minterSp*N*; SetProperty—tomMathIntraSpace).

(RTF: \mpostSp*N*; SetProperty—tomMathInterSpace).

The property tomMathZoneSurround (RTF: \mzSurround) inserts the spacing given by Value before and after math zones.

The Value argument for the property tomDocMathBuild can consist of any combination of the flags tomMathAutoCorrect, tomTeX, and tomMathAlphabetics. The flag tomMathAutoCorrect autocorrects using entries in the built-in math autocorrection list, which includes most standard TeX control words. The flag tomTeX uses [La]TeX build-up/down rules instead of UnicodeMath rules. The flag tomMathAlphabetics converts ASCII and lower-case Greek letters to math italic, math bold, and math bold-italic characters according to the UI bold and italic font settings. These values are used by math UI but are not persisted in file formats.

If a line break occurs at the invisible times (U+2063), ordinarily one would use the \times (× U+00D7) for a visible times character, but a raised dot is another possibility. This document property isn’t currently implemented.

MathML 4 introduces a new attribute called “intent”. This attribute allows you to disambiguate math notation. For example, it lets you specify whether a superscript is a power or an index. To reduce the number of places the intent attribute is needed, there is a set of document default intent values. With them, you only need the intent attribute when the instance differs from the default values.

Currently, MathML doesn’t formalize document defaults for math, but MathML math zones can inherit them from the host container, e.g., from HTML5. Such defaults are compatible with MathML and need to be stored outside the individual MathML <math> elements. In principle, MathML could have a new element <mdefaults> that contains the default properties. The container document would need to recognize this element and use the properties it contains. Making this a MathML element seems desirable since MathML is responsible for the needs of mathematics.

The post Default Math Properties appeared first on Math in Office.

]]>