BaselineAlignment enumeration

BaselineAlignment enumeration

Specifies fonts vertical position on a line.

Members

NameDescription
TOPAligns along the top of each font.
CENTERAligns the center points of each font.
BASELINEAligns to the baseline of the paragraph.
BOTTOMAligns to the bottom of each font.
AUTOBaseline is adjusted automatically.

Examples

Shows how to set fonts vertical position on a line.

doc = aw.Document(MY_DIR + "Office math.docx")

format_ = doc.first_section.body.paragraphs[0].paragraph_format

if format_.baseline_alignment == aw.BaselineAlignment.AUTO:
    format_.baseline_alignment = aw.BaselineAlignment.TOP

doc.save(ARTIFACTS_DIR + "ParagraphFormat.ParagraphBaselineAlignment.docx")

See Also