ColumnSpacing Class

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

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Math.TwipsMeasureType
        DocumentFormat.OpenXml.Math.ColumnSpacing

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

Syntax

'Declaration
Public Class ColumnSpacing _
    Inherits TwipsMeasureType
'Usage
Dim instance As ColumnSpacing
public class ColumnSpacing : TwipsMeasureType

Remarks

[ISO/IEC 29500-1 1st Edition]

22.1.2.22 cSp (Minimum Matrix Column Width)

This element specifies the minimum column width of a matrix. The actual column width of a matrix will be the greater of either the width of the column’s widest argument or cSp. This additional spacing can be added to enhance appearance. If this element is omitted, the default minimum column width is '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 value of cSp is interpreted as twips (a twip is 1/20th of a point). Therefore, a spacing of '1' point will be set by a cSp value of '20'. This is the only use for cSp. There is no corresponding cSpRule. The following image depicts how cGp and cSp work together to define matrix column spacing in a 2x2 matrix:

DocumentFormat.OpenXml.Math.ColumnSpacing-image001

[Example: The following XML specifies that there should never be fewer than 6 pts. (120 twips) between adjacent column edges of the matrix:

<m:mPr>
<m:cSp  m:val="120"/>
<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]

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

ColumnSpacing Members

DocumentFormat.OpenXml.Math Namespace