47
Components of WordprocessingML Main Document Paragraphs & Rich Formatting Runs Run Content Tables Custom Markup Sections Styles Paragraph Character Numbering Table Document Defaults Fonts Numbering Headers/Footers Footnotes/Endnotes Glossary Document Annotations Comments Revisions Bookmarks Mail Merge Document Settings Web Settings Compatibility Settings Fields & Hyperlinks Odds & Ends (Textboxes, Subdocuments, Extensibility) Ecma/TC45/2006/058 (Rev.)

8 wordprocessing ml subject - numbering

Embed Size (px)

Citation preview

Page 1: 8   wordprocessing ml subject - numbering

Components of WordprocessingML• Main Document• Paragraphs & Rich Formatting

– Runs– Run Content

• Tables• Custom Markup• Sections• Styles

– Paragraph– Character– Numbering– Table– Document Defaults

• Fonts• Numbering• Headers/Footers• Footnotes/Endnotes• Glossary Document• Annotations

– Comments– Revisions– Bookmarks

• Mail Merge• Document Settings

– Web Settings– Compatibility Settings

• Fields & Hyperlinks• Odds & Ends (Textboxes, Subdocuments, Extensibility)

Ecma/TC45/2006/058 (Rev.)

Page 2: 8   wordprocessing ml subject - numbering

WordprocessingML - Numbering

Page 3: 8   wordprocessing ml subject - numbering

Numbering

• Numbering refers to characters (Arabic/Roman numerals, "bullets", text, etc.) in WordprocessingML which:1.Label individual paragraphs2.Reference a numbering definition3.Have a numbering level

• Both the bullets and the numbers on this slide are considered numbering in WordprocessingML

Page 4: 8   wordprocessing ml subject - numbering

Numbering Storage

• Within a WordprocessingML package, numbering information is stored in a unique part:– Target of an implicit relationship from the

document part– Relationship type:

http://schemas.openxmlformats.org/wordprocessingml/2006/numbering

– Content type: vnd-openxmlformats.officedocument.wordprocessingml-numbering+xml

Page 5: 8   wordprocessing ml subject - numbering

Numbering Definitions

• The specification of the presentation of a specific set of numbering is called a 'numbering definition'

• A numbering definition is supplied at two levels:• An abstract numbering definition• A numbering definition instance

• Their relationship is (essentially) that of an abstract and a derived class

Page 6: 8   wordprocessing ml subject - numbering

Abstract Numbering Definition

• An abstract numbering definition is the base for all numbering information in a WordprocessingML document– It is specified using the abstractNum element

– Like abstract classes, it cannot be referred to directly by paragraphs in the document

Page 7: 8   wordprocessing ml subject - numbering

Abstract Numbering Definition

• An abstract numbering definition defines two things:– Common numbering properties– Numbering levels

Page 8: 8   wordprocessing ml subject - numbering

Common Numbering Properties

• The following common properties are part of an abstract numbering definition:– Numbering ID (uniquely identifies a numbering

set)– Numbering type (single level, multi level, multi

level hybrid)– Numbering name– Numbering style reference(s)

Page 9: 8   wordprocessing ml subject - numbering

Common Numbering Properties

Common Properties

Page 10: 8   wordprocessing ml subject - numbering

Numbering Levels

• The other part of an abstract numbering definition is the specification of one or more numbering levels– For example, this slide (although it's not

WordprocessingML) has three numbering levels• (I'm just here so we have three numbering levels)

• Each level defines a unique set of properties

Page 11: 8   wordprocessing ml subject - numbering

Numbering Levels

• It's important to note that 'levels' does not refer to the indentation of the numbered paragraphs– It's just arbitrary that the built-in numbering

definitions in Word are this way (as far as the format goes)

Page 12: 8   wordprocessing ml subject - numbering

Numbering Levels

• Example: Consider the following set of numbered paragraphs, each of a different numbering level:

• Ugly – yes. Perfectly valid – yes.

Page 13: 8   wordprocessing ml subject - numbering

Numbering Level Properties

• Each numbering level is defined by an lvl element

• Properties for a numbering level:– Starting number value– Number format code

• e.g. One vs. 1 vs. 1st

– Restart level• Which previous level should cause this level to restart

– Associated paragraph style

Page 14: 8   wordprocessing ml subject - numbering

Numbering Level Properties

• Properties for a numbering level (cont'd):– Legal numbering?

• Forces the numbering from previous levels to be displayed using Arabic numbers at this level (e.g. level 1 = ARTICLE III, level 2 = 3.1)

– Numbering suffix (tab/space/nothing)– Number format text

• Specifies both the static text and the level text• Syntax to specify level text: %#; # = level number

Page 15: 8   wordprocessing ml subject - numbering

Number Level Format Example

• Level 3 text example = "HELLO %3 %2)"• This would give us a static HELLO, the level 3

number, and the last level 2 number

Level two numberStatic "HELLO"

Page 16: 8   wordprocessing ml subject - numbering

Numbering Level Properties

• Properties for a numbering level (cont'd):– Reference to an image (for picture bullets)– Number justification (left/center/right)– Paragraph properties for this level– Run properties for the numbering value itself– Level number (zero-based)– Tentative property

• Specifies that the list level is unused and can be redefined without changing content

Page 17: 8   wordprocessing ml subject - numbering

Numbering Level Properties Example

Properties:Start at number 4Use number format 3 (Arabic)Link to Heading 1Legal NumberingLevel TextLeft justify numberParagraph propertiesRun properties

Page 18: 8   wordprocessing ml subject - numbering

Numbering Definition Instances

• A numbering definition instance is a specific version of a numbering format that can be referenced by paragraphs within the document

• It specifies two pieces of information:– Abstract numbering reference– Optional level overrides

Page 19: 8   wordprocessing ml subject - numbering

Numbering Definition Instance

• The abstract numbering definition reference is specified using the abstractNumId element– Specifies an abstract numbering definition to be

inherited by this numbering definition instance• One or more optional numbering level

overrides using the lvlOverride element– Specifies a set of optional override(s) applied on

top of the abstract numbering definition for this instance

Page 20: 8   wordprocessing ml subject - numbering

Abstract Numbering Definition Reference

Each numbering definition references an abstract numbering definition

Page 21: 8   wordprocessing ml subject - numbering

Level Overrides

• Level overrides can override:– The starting value for this level– The numbering for this level

Page 22: 8   wordprocessing ml subject - numbering

Level Overrides Example

Overrides list level 1

Page 23: 8   wordprocessing ml subject - numbering

Why this model?

• Good question!• Using the abstract/instance model:

– Optimizes use of numbering (not writing out redundant data if lists only slightly differ)

– Makes it easy for simple producers/consumers to change formatting across entire numbering sets• You don't have to create a new numbering definition,

just set overrides

Page 24: 8   wordprocessing ml subject - numbering

Applying Numbering to Paragraphs

• Numbered paragraphs are identified by the numPr element within the paragraph properties

Numbering properties

Page 25: 8   wordprocessing ml subject - numbering

Numbering Properties

• The numbering properties within a paragraph is specified with two properties:– Numbering definition instance reference– Numbering level reference

Page 26: 8   wordprocessing ml subject - numbering

Numbering Definition Instance Reference

• The numbering definition instance is specified using the numId element• This is a reference to a num element within the

numbering part, which specifies the numbering definition instance

Page 27: 8   wordprocessing ml subject - numbering

Numbering Level Reference

• The numbering level is specified using the ilvl element– Specifies the numbering level within the

referenced numbering definition instance

Page 28: 8   wordprocessing ml subject - numbering

Numbering Properties Example

The 0th level in numbering definition with ID =3

Page 29: 8   wordprocessing ml subject - numbering

Numbering Level and Restart

• Numbering levels are restarted when a previous paragraph from the same numbering definition uses the level specified by the lvlRestart element– If omitted, the level restarts after the previous

level

Page 30: 8   wordprocessing ml subject - numbering

Numbering Level and Restart Example

lvlRestart of 1

lvlRestart of 0

Page 31: 8   wordprocessing ml subject - numbering

Numbering Level and Restart

• Note that to get the restart, the paragraphs did not need to be contiguous– Paragraphs of other and/or no numbering could

have appeared

Page 32: 8   wordprocessing ml subject - numbering

The Complete Story

• In the document, paragraph properties specify a numPr element, which references a numbering definition instance– Via the numId element

• The numbering definition instance specifies an inherited abstract numbering definition – Via the abstractNumId element

• The numPr also specifies the list level for the paragraph via the ilvl element

Page 33: 8   wordprocessing ml subject - numbering

The Complete Story

Page 34: 8   wordprocessing ml subject - numbering

The Complete Story

This is where each list level would be defined

Page 35: 8   wordprocessing ml subject - numbering

Numbering Styles

• Numbering styles are styles which define the structure of a numbering format

• They are an index into a numbering format stored in the document

• The numbering style syntax is used to give the numbering format a persistent name, but otherwise does not affect the numbering definition

Page 36: 8   wordprocessing ml subject - numbering

Using a Numbering Style

• The document content refers to a numbering definition

• This in turn refers to an abstract numbering definition– So far, identical to any other numbered paragraph

Page 37: 8   wordprocessing ml subject - numbering

Using a Numbering Style

• At this point, the abstract numbering definition can be either of the following:• It simply references the numbering style's styleId

via numStyleLink• It references the numbering style’s abstract

numbering definition directly, which in turn references the numbering style’s styleId via styleLink

Page 38: 8   wordprocessing ml subject - numbering

Using a Numbering Style

• The numbering style itself always refers to its base numbering definition instance via a numPr

• This, in turn, always refers to the abstract numbering definition that defines the numbering style– As well, the abstract numbering definition uses

the styleLink element to specify that it is the numbering definition for the specified numbering style

Page 39: 8   wordprocessing ml subject - numbering

Numbering Style Example 1

• Exploring the first syntax, the numbering in the document references an abstract numbering definition that is simply referencing the numbering style via numStyleLink

Page 40: 8   wordprocessing ml subject - numbering

Numbering Style Example 1 (cont’d)

Note that this abstract numbering format defines nothing but a numbering style link

Page 41: 8   wordprocessing ml subject - numbering

Numbering Style Example 1 (cont'd)

Page 42: 8   wordprocessing ml subject - numbering
Page 43: 8   wordprocessing ml subject - numbering

Numbering Style Example 2

• Exploring the second syntax, the numbering in the document references an abstract numbering definition that is shared with the numbering style, and the abstract numbering definition then references the numbering style via styleLink

Page 44: 8   wordprocessing ml subject - numbering

Numbering Style Example 2 (cont’d)

Here, we’re referencing the backing abstract numbering definition directly…

Page 45: 8   wordprocessing ml subject - numbering

Numbering Style Example 2 (cont’d)

The styleLink then references us to the numbering style

Page 46: 8   wordprocessing ml subject - numbering
Page 47: 8   wordprocessing ml subject - numbering

DisclaimerThis presentation is for informational purposes only, and should not be relied upon as a substitute or replacement for Microsoft formal file format documentation, which is available at the following website: https://msdn.microsoft.com/en-us/library/cc313118(v=office.12).aspx. Any views or opinions presented in this material are solely those of the author and do not necessarily represent those of Microsoft. Microsoft disclaims all liability for mistakes or inaccuracies in this presentation.