These parts hold what applies to the whole document: how it is edited and laid out, which fonts it asks for, and the theme its colours and fonts draw on.
settings.xml
word/settings.xml has the root w:settings.
| Element | Meaning |
|---|---|
w:zoom | The zoom Word shows: w:percent. |
w:trackRevisions | Tracking of changes is on. |
w:documentProtection | Editing restrictions: w:edit (readOnly, comments, trackedChanges, forms), w:enforcement, and a password hash. This restricts editing in Word; it does not encrypt the file. |
w:defaultTabStop | The spacing of default tab stops, in twips. |
w:evenAndOddHeaders | Different headers on even and odd pages. |
w:updateFields | Update the fields when the document is opened. |
w:attachedTemplate | The template, by relationship ID. The relationship is often external. |
w:footnotePr, w:endnotePr | Note properties for the document, and which notes are the separators. |
w:compat | Compatibility settings, below. |
w:rsids | The list of editing sessions, used by the w:rsid… attributes. |
w:docVars | Named strings stored with the document: w:docVar. |
w:themeFontLang, w:clrSchemeMapping | Which theme fonts and colours apply to what. |
w:decimalSymbol, w:listSeparator | The characters to use in fields and calculations. |
Compatibility mode
w:compat holds settings that keep the layout of older documents. In files
from Word 2010 onwards, one of them says which version of Word’s rules apply:
<w:compat>
<w:compatSetting w:name="compatibilityMode"
w:uri="http://schemas.microsoft.com/office/word" w:val="15"/>
</w:compat>
| Value | Rules of |
|---|---|
| 12 | Word 2007 |
| 14 | Word 2010 |
| 15 | Word 2013 and later |
webSettings.xml
word/webSettings.xml holds settings for saving as a web page, such as
w:optimizeForBrowser and w:allowPNG, and the HTML division
information of documents that came from a web page.
The font table
word/fontTable.xml describes each font the document uses, so that another
computer can find a match. It does not hold the fonts themselves.
<w:font w:name="Calibri">
<w:panose1 w:val="020F0502020204030204"/>
<w:charset w:val="00"/>
<w:family w:val="swiss"/>
<w:pitch w:val="variable"/>
</w:font>
| Child element | Meaning |
|---|---|
w:altName | Another name for the font. |
w:panose1 | The PANOSE classification, used to find similar fonts. |
w:charset | The character set. |
w:family | roman, swiss, modern, script, decorative or auto. |
w:pitch | variable, fixed or default. |
w:sig | Unicode and code page signature of the font. |
w:embedRegular, w:embedBold, w:embedItalic, w:embedBoldItalic | An embedded font: a relationship ID and a w:fontKey. |
An embedded font is an .odttf part in word/fonts/, which is a
font file with its first 32 bytes XOR-ed with the key.
The theme
word/theme/theme1.xml, reached by the theme relationship, is a
DrawingML part with the root a:theme and a:themeElements:
| Element | Holds |
|---|---|
a:clrScheme | The colours: dk1, lt1, dk2, lt2, accent1 to accent6, hlink, folHlink. |
a:fontScheme | Heading and body fonts: a:majorFont and a:minorFont, with a typeface for each script. |
a:fmtScheme | Line, fill and effect styles for shapes. |
Styles refer to these through attributes such as w:themeColor and
w:asciiTheme, so changing the theme changes the document’s look.