Main Content

mlreportgen.dom.LineSpacing Class

Namespace: mlreportgen.dom

Spacing between lines of paragraph

Description

Specifies the spacing between lines of a paragraph.

The mlreportgen.dom.LineSpacing class is a handle class.

Creation

Description

lineSpacingObj = LineSpacing specifies line spacing equal to the height of one line at the paragraph font size.

lineSpacingObj = LineSpacing(multiple) specifies a line spacing as a multiple of the paragraph text line height (for example, 1.5).

example

lineSpacingObj = LineSpacing(spacingHeight) specifies line spacing as a dimension, for example, "10pt".

lineSpacingObj = LineSpacing(spacingHeight,spacingType) specifies line spacing value and type.

Input Arguments

expand all

Scalar that specifies the line spacing relative to the paragraph text line height.

Height of line spacing, specified as character vector or string scalar that contains a number followed by an abbreviation for a unit of measurement. For example, "10px" specifies 10 pixels. Valid abbreviations are:

  • "px" — Pixels

  • "cm" — Centimeters

  • "in" — Inches

  • "mm" — Millimeters

  • "pc" — Picas

  • "pt" — Points

Type of line spacing, specified as one of these values:

  • "multiple" — Value is the spacing in terms of number of lines.

  • "exact" — Value is the exact size of the line spacing.

  • "atleast" — Value is the minimum size of the line spacing (applies only to Microsoft® Word)

Properties

expand all

Type of line spacing, specified as one of these values:

  • "multiple" — Value is the spacing in terms of number of lines.

  • "exact" — Value is the exact size of the line spacing.

  • "atleast" — Value is the minimum size of the line spacing

    Note

    This value only applies to Word.

Data Types: char | string

Height of line spacing depends on the value of the Type property, specified as a character vector or string scalar.

If Type is set to "multiple", Value is line spacing as a multiple of the paragraph text line height.

If Type is set to "exact" or "atleast", Value in the line spacing, specified as character vector or string scalar that contains a number followed by an abbreviation for a unit of measurement. For example, "10px" specifies 10 pixels. Valid abbreviations are:

  • "px" — Pixels

  • "cm" — Centimeters

  • "in" — Inches

  • "mm" — Millimeters

  • "pc" — Picas

  • "pt" — Points

Note

"atleast" applies only to Word.

Data Types: char | string

Tag, specified as a character vector or string scalar. The DOM API generates a session-unique tag as part of the creation of this object. The generated tag has the form CLASS:ID, where CLASS is the object class and ID is the value of the Id property of the object. Use this value to help identify where an issue occurs during document generation.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

Object identifier, specified as a character vector or string scalar. The DOM API generates a session-unique identifier when it creates the document element object.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

Examples

collapse all

p = Paragraph();
p.Style = {LineSpacing(1.5)};

Version History

Introduced in R2014b