MCPcopy Index your code
hub / github.com/python-openxml/python-docx / line_spacing

Method line_spacing

src/docx/text/parfmt.py:103–117  ·  view source on GitHub ↗

|float| or |Length| value specifying the space between baselines in successive lines of the paragraph. A value of |None| indicates line spacing is inherited from the style hierarchy. A float value, e.g. ``2.0`` or ``1.75``, indicates spacing is applied in multiples o

(self)

Source from the content-addressed store, hash-verified

101
102 @property
103 def line_spacing(self):
104 """|float| or |Length| value specifying the space between baselines in
105 successive lines of the paragraph.
106
107 A value of |None| indicates line spacing is inherited from the style hierarchy.
108 A float value, e.g. ``2.0`` or ``1.75``, indicates spacing is applied in
109 multiples of line heights. A |Length| value such as ``Pt(12)`` indicates spacing
110 is a fixed height. The |Pt| value class is a convenient way to apply line
111 spacing in units of points. Assigning |None| resets line spacing to inherit from
112 the style hierarchy.
113 """
114 pPr = self._element.pPr
115 if pPr is None:
116 return None
117 return self._line_spacing(pPr.spacing_line, pPr.spacing_lineRule)
118
119 @line_spacing.setter
120 def line_spacing(self, value):

Callers

nothing calls this directly

Calls 3

_line_spacingMethod · 0.95
EmuClass · 0.90
TwipsClass · 0.90

Tested by

no test coverage detected