paper-docxAPI referenceenum.style
WD_STYLE_TYPE
paper-docx 0.2.0 API reference
Specifies one of the four style types: paragraph, character, list, or table.
Example::
from docx import Document from docx.enum.style import WD_STYLE_TYPE
styles = Document().styles assert styles[0].type == WD_STYLE_TYPE.PARAGRAPH
MS API name: WdStyleType
http://msdn.microsoft.com/en-us/library/office/ff196870.aspx
Attributes
CHARACTER
attributeCHARACTER= (2, 'character', 'Character style.')Character style.
LIST
attributeLIST= (4, 'numbering', 'List style.')List style.
PARAGRAPH
attributePARAGRAPH= (1, 'paragraph', 'Paragraph style.')Paragraph style.
TABLE
attributeTABLE= (3, 'table', 'Table style.')Table style.
xml_value
attributexml_valuestr | NoneFunctions
from_xml
funcfrom_xml(xml_value: str | None) -> SelfEnumeration member corresponding to XML attribute value xml_value.
Example::
WD_PARAGRAPH_ALIGNMENT.from_xml("center") WD_PARAGRAPH_ALIGNMENT.CENTER
paramxml_valuestr | NoneReturns
typing_extensions.Selfto_xml
functo_xml(value: int | _T | None) -> str | NoneXML value of this enum member, generally an XML attribute value.
paramvalueint | _T | NoneReturns
str | None