aboutsummaryrefslogtreecommitdiff
path: root/mammoth/docx
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2014-09-27 17:21:48 +0100
committerMichael Williamson <mike@zwobble.org>2014-09-27 17:21:48 +0100
commit9fb300452f2e1734e531abde614b8513d0edd093 (patch)
tree380df590deb0efee43ae902107d47716d761033b /mammoth/docx
parentc8bfc778472b644d56a5694553bec8621159c4ce (diff)
Read vertical alignment from document.xml
Diffstat (limited to 'mammoth/docx')
-rw-r--r--mammoth/docx/document_xml.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/mammoth/docx/document_xml.py b/mammoth/docx/document_xml.py
index e909a86..cdc870a 100644
--- a/mammoth/docx/document_xml.py
+++ b/mammoth/docx/document_xml.py
@@ -70,7 +70,11 @@ def _create_reader(numbering, content_types, relationships, styles, footnote_ele
style_name = None
else:
style_name = styles.find_character_style_by_id(style_id).name
-
+
+ vertical_alignment = properties \
+ .find_child_or_null("w:vertAlign") \
+ .attributes.get("w:val")
+
is_bold = properties.find_child("w:b")
is_italic = properties.find_child("w:i")
is_underline = properties.find_child("w:u")
@@ -83,6 +87,7 @@ def _create_reader(numbering, content_types, relationships, styles, footnote_ele
is_bold=is_bold,
is_italic=is_italic,
is_underline=is_underline,
+ vertical_alignment=vertical_alignment,
))