Paper Office
paper-docxAPI referenceenum.text

WD_UNDERLINE

paper-docx 0.2.0 API reference

Specifies the style of underline applied to a run of characters.

MS API name: WdUnderline

URL: http://msdn.microsoft.com/en-us/library/office/ff822388.aspx

Attributes

DASH

attributeDASH
= (7, 'dash', 'Dashes.')

Dashes.

DASH_HEAVY

attributeDASH_HEAVY
= (23, 'dashedHeavy', 'Heavy dashes.')

Heavy dashes.

DASH_LONG

attributeDASH_LONG
= (39, 'dashLong', 'Long dashes.')

Long dashes.

DASH_LONG_HEAVY

attributeDASH_LONG_HEAVY
= (55, 'dashLongHeavy', 'Long heavy dashes.')

Long heavy dashes.

DOTTED

attributeDOTTED
= (4, 'dotted', 'Dots.')

Dots.

DOTTED_HEAVY

attributeDOTTED_HEAVY
= (20, 'dottedHeavy', 'Heavy dots.')

Heavy dots.

DOT_DASH

attributeDOT_DASH
= (9, 'dotDash', 'Alternating dots and dashes.')

Alternating dots and dashes.

DOT_DASH_HEAVY

attributeDOT_DASH_HEAVY
= (25, 'dashDotHeavy', 'Alternating heavy dots and heavy dashes.')

Alternating heavy dots and heavy dashes.

DOT_DOT_DASH

attributeDOT_DOT_DASH
= (10, 'dotDotDash', 'An alternating dot-dot-dash pattern.')

An alternating dot-dot-dash pattern.

DOT_DOT_DASH_HEAVY

attributeDOT_DOT_DASH_HEAVY
= (26, 'dashDotDotHeavy', 'An alternating heavy dot-dot-dash pattern.')

An alternating heavy dot-dot-dash pattern.

DOUBLE

attributeDOUBLE
= (3, 'double', 'A double line.')

A double line.

INHERITED

attributeINHERITED
= (-1, None, 'Inherit underline setting from containing paragraph.')

Inherit underline setting from containing paragraph.

NONE

attributeNONE
= (0, 'none', 'No underline.\n\nThis setting overrides any inherited underline value, so can be used to remove underline from a run that inherits underlining from its containing paragraph. Note this is not the same as assigning |None| to Run.underline. |None| is a valid assignment value, but causes the run to inherit its underline value. Assigning `WD_UNDERLINE.NONE` causes underlining to be unconditionally turned off.')

No underline.

This setting overrides any inherited underline value, so can be used to remove underline from a run that inherits underlining from its containing paragraph. Note this is not the same as assigning None to Run.underline. None is a valid assignment value, but causes the run to inherit its underline value. Assigning WD_UNDERLINE.NONE causes underlining to be unconditionally turned off.

SINGLE

attributeSINGLE
= (1, 'single', 'A single line.\n\nNote that this setting is write-only in the sense that |True| (rather than `WD_UNDERLINE.SINGLE`) is returned for a run having this setting.')

A single line.

Note that this setting is write-only in the sense that True (rather than WD_UNDERLINE.SINGLE) is returned for a run having this setting.

THICK

attributeTHICK
= (6, 'thick', 'A single thick line.')

A single thick line.

WAVY

attributeWAVY
= (11, 'wave', 'A single wavy line.')

A single wavy line.

WAVY_DOUBLE

attributeWAVY_DOUBLE
= (43, 'wavyDouble', 'A double wavy line.')

A double wavy line.

WAVY_HEAVY

attributeWAVY_HEAVY
= (27, 'wavyHeavy', 'A heavy wavy line.')

A heavy wavy line.

WORDS

attributeWORDS
= (2, 'words', 'Underline individual words only.')

Underline individual words only.

xml_value

attributexml_valuestr | None

Functions

from_xml

funcfrom_xml(xml_value: str | None) -> Self

Enumeration member corresponding to XML attribute value xml_value.

Example::

WD_PARAGRAPH_ALIGNMENT.from_xml("center") WD_PARAGRAPH_ALIGNMENT.CENTER

paramxml_valuestr | None

Returns

typing_extensions.Self

to_xml

functo_xml(value: int | _T | None) -> str | None

XML value of this enum member, generally an XML attribute value.

paramvalueint | _T | None

Returns

str | None

On this page