dt-woods / word

Concatenate and parse Microsoft Word (.docx) files with style! A Pythonic method for splitting, merging, and styling MS Word docs.
3 stars 1 forks source link

Create the Style Manager #1

Closed dt-woods closed 3 years ago

dt-woods commented 3 years ago

The goal is to Read a .docx file with generic (built-in) styles and write a copy with custom styles preserving the original content (i.e., map one paragraph-level style to another).

Word comes with built-in styles like Normal, Heading 1, and List Bullet. Custom style definitions are stored in the styles.xml part of a .docx file package, whereas built-in style definitions are stored in the Word application itself and are not written to styles.xml until they are actually used.

Let's take a document that utilizes built-in styles and:

The challenge will be to preserve character styles (e.g., bold and italics), which are different from paragraph styles.