8 wordprocessing ml subject - numbering

Post on 12-Apr-2017

353 Views

Category:

Software

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

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.)

WordprocessingML - 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

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

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

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

Abstract Numbering Definition

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

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)

Common Numbering Properties

Common Properties

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

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)

Numbering Levels

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

• Ugly – yes. Perfectly valid – yes.

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

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

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"

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

Numbering Level Properties Example

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

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

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

Abstract Numbering Definition Reference

Each numbering definition references an abstract numbering definition

Level Overrides

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

Level Overrides Example

Overrides list level 1

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

Applying Numbering to Paragraphs

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

Numbering properties

Numbering Properties

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

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

Numbering Level Reference

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

referenced numbering definition instance

Numbering Properties Example

The 0th level in numbering definition with ID =3

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

Numbering Level and Restart Example

lvlRestart of 1

lvlRestart of 0

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

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

The Complete Story

The Complete Story

This is where each list level would be defined

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

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

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

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

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

Numbering Style Example 1 (cont’d)

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

Numbering Style Example 1 (cont'd)

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

Numbering Style Example 2 (cont’d)

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

Numbering Style Example 2 (cont’d)

The styleLink then references us to the numbering style

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.

top related