Specifies a line spacing format to be applied to a paragraph.
from docx.enum.text import WD_LINE_SPACING paragraph = document.add_paragraph() paragraph.line_spacing_rule = WD_LINE_SPACING.EXACTLY
- Space-and-a-half line spacing.
- Line spacing is always at least the specified amount. The amount is specified separately.
- Double spaced.
- Line spacing is exactly the specified amount. The amount is specified separately.
- Line spacing is specified as a multiple of line heights. Changing the font size will change the line spacing proportionately.
- Single spaced (default).