ColumnGap Class

Matrix Column Gap.When the object is serialized out as xml, its qualified name is m:cGp.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Math.UnsignedShortType
        DocumentFormat.OpenXml.Math.ColumnGap

Namespace:  DocumentFormat.OpenXml.Math
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
Public Class ColumnGap _
    Inherits UnsignedShortType
'Usage
Dim instance As ColumnGap
public class ColumnGap : UnsignedShortType

Remarks

[ISO/IEC 29500-1 1st Edition]

22.1.2.18 cGp (Matrix Column Gap)

This element represents the (custom) column gap spacing information; the default value is0 (which corresponds to 1 em). This value is interpreted differently depending on the value of cGpRule (§22.1.2.19). cGp is not used unless the value of cGpRule is 3 or 4. When cGpRule is omitted, the default spacing between matrix columns is 1 em (a val attribute value of 0).

Whether the element is absent or present without the val attribute, the default of the val attribute is 0.

The cGp gap spacing (also referred to as “Column Gap” or “Gap Width”) is added to the cSp (Minimum Matrix Column Width) to determine the total Matrix Column Spacing (distance between the same edges of different columns). The following image depicts how cGp and cSp work together to define matrix column spacing in a 2x2 matrix:

DocumentFormat.OpenXml.Math.ColumnGap-image001

[Example: With a cGpRule value of 4, the matrix: has 3 ems of spacing between columns (3 ems = 6 * 0.5 ems). The matrix properties that demonstrate this element in use are:

<m:mPr>
<m:cGpRule  m:val="4"/>
<m:cGp  m:val="6"/>
<m:mcs>
<m:mc>
<m:mcPr>
        <m:count m:val="2"/>
<m:mcJc m:val="center"/>
</m:mcPr>
</m:mc>
</m:mcs>
</m:mPr>

end example]

See the documentation for cGpRule for more information about how cGp is interpreted for each value of cGpRule.

Parent Elements

mPr (§22.1.2.68)

Attributes

Description

val (Value)

Specifies the amount of space between columns of the parent element (for cGp/cSp) or rows (for rSp). The manner in which this value is determined depends on the setting of the rule of the parent element.

For cGp, if the rule is set to 3 (or "Exactly"), then the unit is interpreted as twips. If the rule is set to 4 (or "Multiple"), then the unit is interpreted as number of 0.5 em increments.

For cSp, this value is measured in twips. There is no corresponding cSpRule.

For rSp, if the rule is set to 3 (or "Exactly"), then the unit is interpreted as points. If the rule is set to 4 (or "Multiple"), then the unit is interpreted as half-lines.

The possible values for this attribute are defined by the ST_UnSignedInteger simple type (§22.1.3.14).

[Note: The W3C XML Schema definition of this element’s content model (CT_UnSignedInteger) is located in §A.6.1. end note]

© ISO/IEC29500: 2008.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

ColumnGap Members

DocumentFormat.OpenXml.Math Namespace