When you try to align your paragraph with the
WD_PARAGRAPH_ALIGNMENT
from docx.enum.text, you may like to set the
yourparagraph.alignment
as
WD_PARAGRAPH_ALIGNMENT.JUSTIFY
or *.LEFT, *.RIGHT, or even *.DISTRIBUTED.
Be careful to separate your run with a new paragraph as
yourdocument.add_paragraph().
Otherwise, the document will take the run you are setting as in the SAME paragraph even if separated with the `enter's as
'\n'.
本文介绍如何使用docx.enum.text中的WD_PARAGRAPH_ALIGNMENT进行段落对齐,包括左对齐、右对齐、两端对齐及分散对齐等操作。同时提醒在设置段落时要注意使用add_paragraph()来区分不同段落,避免因
导致的段落合并问题。

2074

被折叠的 条评论
为什么被折叠?



