Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/user/text.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ set to left, centered, right, or fully justified (aligned on both the left
and right sides) using values from the enumeration
:ref:`WdParagraphAlignment`::

>>> from docx.enum.text import WD_ALIGN_PARAGRAPH
>>> from docx.enum.text import WD_PARAGRAPH_ALIGNMENT
>>> document = Document()
>>> paragraph = document.add_paragraph()
>>> paragraph_format = paragraph.paragraph_format

>>> paragraph_format.alignment
None # indicating alignment is inherited from the style hierarchy
>>> paragraph_format.alignment = WD_ALIGN_PARAGRAPH.CENTER
>>> paragraph_format.alignment = WD_PARAGRAPH_ALIGNMENT.CENTER
>>> paragraph_format.alignment
CENTER (1)

Expand Down