MathPhantom

MathPhantom class

Represents a phantom math object (<m:phant>) that affects the layout of its child element without necessarily displaying it. A phantom can hide its base expression while preserving its width, height, or depth to align formulas or reserve space. Visibility and geometry behavior are controlled by properties such as Show, ZeroWid, ZeroAsc, ZeroDesc, and Transp.

MathPhantom

NameDescription
MathPhantom(MathFunction)Initializes a new instance of the MathPhantom class using the specified base math element.

Parameters:

NameTypeDescription
elementMathFunctionThe base IMathElement whose visibility and layout will be controlled by the phantom. This element defines the content that may be hidden or shown, while still affecting the geometric alignment of the surrounding math. The phantom element is used to reserve or suppress the visual space of its base expression without necessarily displaying it. It corresponds to the OMML element {@code <m:phant>}.

Returns: MathPhantom


MathPhantom

NameDescription
MathPhantom(MathBorderBox)Initializes a new instance of the MathPhantom class using the specified base math element.

Parameters:

NameTypeDescription
elementMathBorderBoxThe base IMathElement whose visibility and layout will be controlled by the phantom. This element defines the content that may be hidden or shown, while still affecting the geometric alignment of the surrounding math. The phantom element is used to reserve or suppress the visual space of its base expression without necessarily displaying it. It corresponds to the OMML element {@code <m:phant>}.

Returns: MathPhantom


MathPhantom

NameDescription
MathPhantom(MathBox)Initializes a new instance of the MathPhantom class using the specified base math element.

Parameters:

NameTypeDescription
elementMathBoxThe base IMathElement whose visibility and layout will be controlled by the phantom. This element defines the content that may be hidden or shown, while still affecting the geometric alignment of the surrounding math. The phantom element is used to reserve or suppress the visual space of its base expression without necessarily displaying it. It corresponds to the OMML element {@code <m:phant>}.

Returns: MathPhantom


MathPhantom

NameDescription
MathPhantom(MathSubscriptElement)Initializes a new instance of the MathPhantom class using the specified base math element.

Parameters:

NameTypeDescription
elementMathSubscriptElementThe base IMathElement whose visibility and layout will be controlled by the phantom. This element defines the content that may be hidden or shown, while still affecting the geometric alignment of the surrounding math. The phantom element is used to reserve or suppress the visual space of its base expression without necessarily displaying it. It corresponds to the OMML element {@code <m:phant>}.

Returns: MathPhantom


MathPhantom

NameDescription
MathPhantom(MathRightSubSuperscriptElement)Initializes a new instance of the MathPhantom class using the specified base math element.

Parameters:

NameTypeDescription
elementMathRightSubSuperscriptElementThe base IMathElement whose visibility and layout will be controlled by the phantom. This element defines the content that may be hidden or shown, while still affecting the geometric alignment of the surrounding math. The phantom element is used to reserve or suppress the visual space of its base expression without necessarily displaying it. It corresponds to the OMML element {@code <m:phant>}.

Returns: MathPhantom


MathPhantom

NameDescription
MathPhantom(MathAccent)Initializes a new instance of the MathPhantom class using the specified base math element.

Parameters:

NameTypeDescription
elementMathAccentThe base IMathElement whose visibility and layout will be controlled by the phantom. This element defines the content that may be hidden or shown, while still affecting the geometric alignment of the surrounding math. The phantom element is used to reserve or suppress the visual space of its base expression without necessarily displaying it. It corresponds to the OMML element {@code <m:phant>}.

Returns: MathPhantom


MathPhantom

NameDescription
MathPhantom(MathNaryOperator)Initializes a new instance of the MathPhantom class using the specified base math element.

Parameters:

NameTypeDescription
elementMathNaryOperatorThe base IMathElement whose visibility and layout will be controlled by the phantom. This element defines the content that may be hidden or shown, while still affecting the geometric alignment of the surrounding math. The phantom element is used to reserve or suppress the visual space of its base expression without necessarily displaying it. It corresponds to the OMML element {@code <m:phant>}.

Returns: MathPhantom


MathPhantom

NameDescription
MathPhantom(MathSuperscriptElement)Initializes a new instance of the MathPhantom class using the specified base math element.

Parameters:

NameTypeDescription
elementMathSuperscriptElementThe base IMathElement whose visibility and layout will be controlled by the phantom. This element defines the content that may be hidden or shown, while still affecting the geometric alignment of the surrounding math. The phantom element is used to reserve or suppress the visual space of its base expression without necessarily displaying it. It corresponds to the OMML element {@code <m:phant>}.

Returns: MathPhantom


MathPhantom

NameDescription
MathPhantom(MathDelimiter)Initializes a new instance of the MathPhantom class using the specified base math element.

Parameters:

NameTypeDescription
elementMathDelimiterThe base IMathElement whose visibility and layout will be controlled by the phantom. This element defines the content that may be hidden or shown, while still affecting the geometric alignment of the surrounding math. The phantom element is used to reserve or suppress the visual space of its base expression without necessarily displaying it. It corresponds to the OMML element {@code <m:phant>}.

Returns: MathPhantom


MathPhantom

NameDescription
MathPhantom(MathLeftSubSuperscriptElement)Initializes a new instance of the MathPhantom class using the specified base math element.

Parameters:

NameTypeDescription
elementMathLeftSubSuperscriptElementThe base IMathElement whose visibility and layout will be controlled by the phantom. This element defines the content that may be hidden or shown, while still affecting the geometric alignment of the surrounding math. The phantom element is used to reserve or suppress the visual space of its base expression without necessarily displaying it. It corresponds to the OMML element {@code <m:phant>}.

Returns: MathPhantom


MathPhantom

NameDescription
MathPhantom(MathLimit)Initializes a new instance of the MathPhantom class using the specified base math element.

Parameters:

NameTypeDescription
elementMathLimitThe base IMathElement whose visibility and layout will be controlled by the phantom. This element defines the content that may be hidden or shown, while still affecting the geometric alignment of the surrounding math. The phantom element is used to reserve or suppress the visual space of its base expression without necessarily displaying it. It corresponds to the OMML element {@code <m:phant>}.

Returns: MathPhantom


MathPhantom

NameDescription
MathPhantom(MathPhantom)Initializes a new instance of the MathPhantom class using the specified base math element.

Parameters:

NameTypeDescription
elementMathPhantomThe base IMathElement whose visibility and layout will be controlled by the phantom. This element defines the content that may be hidden or shown, while still affecting the geometric alignment of the surrounding math. The phantom element is used to reserve or suppress the visual space of its base expression without necessarily displaying it. It corresponds to the OMML element {@code <m:phant>}.

Returns: MathPhantom


MathPhantom

NameDescription
MathPhantom(MathBlock)Initializes a new instance of the MathPhantom class using the specified base math element.

Parameters:

NameTypeDescription
elementMathBlockThe base IMathElement whose visibility and layout will be controlled by the phantom. This element defines the content that may be hidden or shown, while still affecting the geometric alignment of the surrounding math. The phantom element is used to reserve or suppress the visual space of its base expression without necessarily displaying it. It corresponds to the OMML element {@code <m:phant>}.

Returns: MathPhantom


MathPhantom

NameDescription
MathPhantom(BaseScript)Initializes a new instance of the MathPhantom class using the specified base math element.

Parameters:

NameTypeDescription
elementBaseScriptThe base IMathElement whose visibility and layout will be controlled by the phantom. This element defines the content that may be hidden or shown, while still affecting the geometric alignment of the surrounding math. The phantom element is used to reserve or suppress the visual space of its base expression without necessarily displaying it. It corresponds to the OMML element {@code <m:phant>}.

Returns: MathPhantom


MathPhantom

NameDescription
MathPhantom(MathElementBase)Initializes a new instance of the MathPhantom class using the specified base math element.

Parameters:

NameTypeDescription
elementMathElementBaseThe base IMathElement whose visibility and layout will be controlled by the phantom. This element defines the content that may be hidden or shown, while still affecting the geometric alignment of the surrounding math. The phantom element is used to reserve or suppress the visual space of its base expression without necessarily displaying it. It corresponds to the OMML element {@code <m:phant>}.

Returns: MathPhantom


MathPhantom

NameDescription
MathPhantom(MathMatrix)Initializes a new instance of the MathPhantom class using the specified base math element.

Parameters:

NameTypeDescription
elementMathMatrixThe base IMathElement whose visibility and layout will be controlled by the phantom. This element defines the content that may be hidden or shown, while still affecting the geometric alignment of the surrounding math. The phantom element is used to reserve or suppress the visual space of its base expression without necessarily displaying it. It corresponds to the OMML element {@code <m:phant>}.

Returns: MathPhantom


MathPhantom

NameDescription
MathPhantom(MathRadical)Initializes a new instance of the MathPhantom class using the specified base math element.

Parameters:

NameTypeDescription
elementMathRadicalThe base IMathElement whose visibility and layout will be controlled by the phantom. This element defines the content that may be hidden or shown, while still affecting the geometric alignment of the surrounding math. The phantom element is used to reserve or suppress the visual space of its base expression without necessarily displaying it. It corresponds to the OMML element {@code <m:phant>}.

Returns: MathPhantom


MathPhantom

NameDescription
MathPhantom(MathGroupingCharacter)Initializes a new instance of the MathPhantom class using the specified base math element.

Parameters:

NameTypeDescription
elementMathGroupingCharacterThe base IMathElement whose visibility and layout will be controlled by the phantom. This element defines the content that may be hidden or shown, while still affecting the geometric alignment of the surrounding math. The phantom element is used to reserve or suppress the visual space of its base expression without necessarily displaying it. It corresponds to the OMML element {@code <m:phant>}.

Returns: MathPhantom


MathPhantom

NameDescription
MathPhantom(MathFraction)Initializes a new instance of the MathPhantom class using the specified base math element.

Parameters:

NameTypeDescription
elementMathFractionThe base IMathElement whose visibility and layout will be controlled by the phantom. This element defines the content that may be hidden or shown, while still affecting the geometric alignment of the surrounding math. The phantom element is used to reserve or suppress the visual space of its base expression without necessarily displaying it. It corresponds to the OMML element {@code <m:phant>}.

Returns: MathPhantom


MathPhantom

NameDescription
MathPhantom(MathArray)Initializes a new instance of the MathPhantom class using the specified base math element.

Parameters:

NameTypeDescription
elementMathArrayThe base IMathElement whose visibility and layout will be controlled by the phantom. This element defines the content that may be hidden or shown, while still affecting the geometric alignment of the surrounding math. The phantom element is used to reserve or suppress the visual space of its base expression without necessarily displaying it. It corresponds to the OMML element {@code <m:phant>}.

Returns: MathPhantom


MathPhantom

NameDescription
MathPhantom(MathBar)Initializes a new instance of the MathPhantom class using the specified base math element.

Parameters:

NameTypeDescription
elementMathBarThe base IMathElement whose visibility and layout will be controlled by the phantom. This element defines the content that may be hidden or shown, while still affecting the geometric alignment of the surrounding math. The phantom element is used to reserve or suppress the visual space of its base expression without necessarily displaying it. It corresponds to the OMML element {@code <m:phant>}.

Returns: MathPhantom


MathPhantom

NameDescription
MathPhantom(MathematicalText)Initializes a new instance of the MathPhantom class using the specified base math element.

Parameters:

NameTypeDescription
elementMathematicalTextThe base IMathElement whose visibility and layout will be controlled by the phantom. This element defines the content that may be hidden or shown, while still affecting the geometric alignment of the surrounding math. The phantom element is used to reserve or suppress the visual space of its base expression without necessarily displaying it. It corresponds to the OMML element {@code <m:phant>}.

Returns: MathPhantom


getBase

NameDescription
getBase ()Base argument

Returns: MathFunction, MathBorderBox, MathBox, MathSubscriptElement, MathRightSubSuperscriptElement, MathAccent, MathNaryOperator, MathSuperscriptElement, MathDelimiter, MathLeftSubSuperscriptElement, MathLimit, MathPhantom, MathBlock, BaseScript, MathElementBase, MathMatrix, MathRadical, MathGroupingCharacter, MathFraction, MathArray, MathBar, MathematicalText


getChildren

NameDescription
getChildren ()Get children elements

Returns: MathFunction, MathBorderBox, MathBox, MathSubscriptElement, MathRightSubSuperscriptElement, MathAccent, MathNaryOperator, MathSuperscriptElement, MathDelimiter, MathLeftSubSuperscriptElement, MathLimit, MathPhantom, MathBlock, BaseScript, MathElementBase, MathMatrix, MathRadical, MathGroupingCharacter, MathFraction, MathArray, MathBar, MathematicalText


getShow

NameDescription
getShow ()Gets or sets a value indicating whether the base element is displayed. When false, the base element is hidden but may still occupy space depending on other phantom settings. Corresponds to the OMML attribute m:show.

Returns: boolean


getTransp

NameDescription
getTransp ()Gets or sets a value indicating whether the phantom is transparent for class-based spacing rules. When true, operators and symbols inside the phantom still affect mathematical spacing around the phantom (as if visible). When false, class-based spacing is ignored. Corresponds to the OMML attribute m:transp.

Returns: boolean


getZeroAsc

NameDescription
getZeroAsc ()Gets or sets a value indicating whether the ascent (height above baseline) of the base element should be treated as zero. When true, the phantom does not raise the baseline of the surrounding math line. Corresponds to the OMML attribute m:zeroAsc.

Returns: boolean


getZeroDesc

NameDescription
getZeroDesc ()Gets or sets a value indicating whether the descent (depth below baseline) of the base element should be treated as zero. When true, the phantom does not lower the baseline of the surrounding math line. Corresponds to the OMML attribute m:zeroDesc.

Returns: boolean


getZeroWidth

NameDescription
getZeroWidth ()Gets or sets a value indicating whether the width of the base element should be treated as zero. When true, the phantom does not reserve horizontal space for its base. Corresponds to the OMML attribute m:zeroWid.

Returns: boolean


setShow

NameDescription
setShow (boolean)Gets or sets a value indicating whether the base element is displayed. When false, the base element is hidden but may still occupy space depending on other phantom settings. Corresponds to the OMML attribute m:show.

setTransp

NameDescription
setTransp (boolean)Gets or sets a value indicating whether the phantom is transparent for class-based spacing rules. When true, operators and symbols inside the phantom still affect mathematical spacing around the phantom (as if visible). When false, class-based spacing is ignored. Corresponds to the OMML attribute m:transp.

setZeroAsc

NameDescription
setZeroAsc (boolean)Gets or sets a value indicating whether the ascent (height above baseline) of the base element should be treated as zero. When true, the phantom does not raise the baseline of the surrounding math line. Corresponds to the OMML attribute m:zeroAsc.

setZeroDesc

NameDescription
setZeroDesc (boolean)Gets or sets a value indicating whether the descent (depth below baseline) of the base element should be treated as zero. When true, the phantom does not lower the baseline of the surrounding math line. Corresponds to the OMML attribute m:zeroDesc.

setZeroWidth

NameDescription
setZeroWidth (boolean)Gets or sets a value indicating whether the width of the base element should be treated as zero. When true, the phantom does not reserve horizontal space for its base. Corresponds to the OMML attribute m:zeroWid.