[Table of Contents] [docx version]

Error! No text of specified style in document.

anchor (Anchor for Floating DrawingML Object)

This element specifies that the DrawingML object located at this position in the document is a floating object. Within a WordprocessingML document, drawing objects can exist in two states:

Inline - The drawing object is in line with the text, and affects the line height and layout of its line (like a character glyph of similar size).

Floating - The drawing object is anchored within the text, but may be absolutely positioned in the document relative to the page.

When this element encapsulates the DrawingML object's information, then all child elements shall dictate the positioning of this object as a floating object on the page.

[Example: Consider a WordprocessingML document where the anchor for a floating DrawingML object shall be the first piece of run content within a paragraph. That paragraph's content would be specified as follows:

<w:p>
<w:r>
<w:drawing>
<wp:anchor … >

</wp:anchor>
</w:drawing>
</w:r>
</w:p>

The anchor element, when present as the child element of the drawing element, specifies that this DrawingML object shall be positioned as a floating object based on the values of its child elements. end example]

Parent Elements

drawing2.3.3.9)

 

Child Elements

Subclause

cNvGraphicFramePr (Common DrawingML Non-Visual Properties)

§5.5.2.4

docPr (Drawing Object Non-Visual Properties)

§5.5.2.5

effectExtent (Object Extents Including Effects)

§5.5.2.6

extent (Drawing Object Size)

§5.5.2.7

graphic (Graphic Object)

§5.1.2.1.16

positionH (Horizontal Positioning)

§5.5.2.10

positionV (Vertical Positioning)

§5.5.2.11

simplePos (Simple Positioning Coordinates)

§5.5.2.13

wrapNone (No Text Wrapping)

§5.5.2.15

wrapSquare (Square Wrapping)

§5.5.2.17

wrapThrough (Through Wrapping)

§5.5.2.18

wrapTight (Tight Wrapping)

§5.5.2.19

wrapTopAndBottom (Top and Bottom Wrapping)

§5.5.2.20

 

Attributes

Description

allowOverlap (Allow Objects to Overlap)

Specifies whether a DrawingML object which intersects another DrawingML object at display time shall be allowed to overlap the contents of the other DrawingML object. If a DrawingML object cannot overlap other DrawingML object, it shall be repositioned when displayed to prevent this overlap as needed.

 

If this element is omitted on a given DrawingML object, then overlap shall not be allowed between a DrawingML object which intersects another DrawingML object displayed at the same location.

 

[Example: Consider a document with two DrawingML objects which are allowed to overlap each other. This would be specified as follows within each object's anchor markup:

 

<wp:anchor allowOverlap="true" … >

</wp:anchor>

 

The allowOverlap attribute has a value of true, which specifies that this object shall be allowed to overlap other objects when it is displayed on the document. end example]

 

The possible values for this attribute are defined by the XML Schema boolean datatype.

behindDoc (Display Behind Document Text)

Specifies whether this floating DrawingML object shall be displayed behind the text of the document when the document is displayed. When a DrawingML object is displayed within a WordprocessingML document, that object may intersect with text in the document. This attribute shall determine whether the text or the object shall be rendered on top in case of overlapping.

 

If this attribute is omitted, then the parent DrawingML object shall be displayed in front of the text content of the document in cases of overlapping.

 

[Example: Consider a floating DrawingML object which shall be displayed above any text which it intersects within the document's content. This setting would be specified as follows:

 

<wp:anchor behindDoc="false" … >

</wp:anchor>

 

The behindDoc attribute has a value of false, which specifies that the DrawingML object is displayed above the text of the document in z-order. end example]

 

The possible values for this attribute are defined by the XML Schema boolean datatype.

distB (Distance From Text on Bottom Edge)

Specifies the minimum distance which shall be maintained between the bottom edge of this drawing object and any subsequent text within the document when this graphical object is displayed within the document's contents.

 

The distance shall be measured in EMUs (English Metric Units).

 

If this object is an inline object (i.e. has a parent element of inline), then this value shall not have any effect when displaying the object in line with text, but may be maintained and used if the object is subsequently changed to floating. If the wrapping element [Example: wrapThrough or wrapSquare end example] present as a child element also has a distance from text, then this value shall be ignored.

 

[Example: Consider a floating DrawingML object which shall have one-half of an inch of padding between its bottom edge and the nearest text. This setting would be specified as follows:

 

<wp:anchor distB="457200" … >

</wp:anchor>

 

The distB attribute specifies that the padding distance shall be 457200 EMUs or one-half of an inch. end example]

 

The possible values for this attribute are defined by the ST_WrapDistance simple type (§5.5.3.6).

distL (Distance From Text on Left Edge)

Specifies the minimum distance which shall be maintained between the left edge of this drawing object and any subsequent text within the document when this graphical object is displayed within the document's contents.

 

The distance shall be measured in EMUs (English Metric Units).

 

If this object is an inline object (i.e. has a parent element of inline), then this value shall not have any effect when displaying the object in line with text, but may be maintained and used if the object is subsequently changed to floating. If the wrapping element [Example: wrapThrough or wrapSquare end example] present as a child element also has a distance from text, then this value shall be ignored.

 

[Example: Consider a floating DrawingML object which shall have one-quarter of an inch of padding between its left edge and the nearest text. This setting would be specified as follows:

 

<wp:anchor distL="228600" … >

</wp:anchor>

 

The distL attribute specifies that the padding distance shall be 228600 EMUs or one-quarter of an inch. end example]

 

The possible values for this attribute are defined by the ST_WrapDistance simple type (§5.5.3.6).

distR (Distance From Text on Right Edge)

Specifies the minimum distance which shall be maintained between the right edge of this drawing object and any subsequent text within the document when this graphical object is displayed within the document's contents.

 

The distance shall be measured in EMUs (English Metric Units).

 

If this object is an inline object (i.e. has a parent element of inline), then this value shall not have any effect when displaying the object in line with text, but may be maintained and used if the object is subsequently changed to floating. If the wrapping element [Example: wrapThrough or wrapSquare end example] present as a child element also has a distance from text, then this value shall be ignored.

 

[Example: Consider a floating DrawingML object which shall have one-quarter of an inch of padding between its right edge and the nearest text. This setting would be specified as follows:

 

<wp:anchor distR="228600" … >

</wp:anchor>

 

The distR attribute specifies that the padding distance shall be 228600 EMUs or one-quarter of an inch. end example]

 

The possible values for this attribute are defined by the ST_WrapDistance simple type (§5.5.3.6).

distT (Distance From Text on Top Edge)

Specifies the minimum distance which shall be maintained between the top edge of this drawing object and any subsequent text within the document when this graphical object is displayed within the document's contents.

 

The distance shall be measured in EMUs (English Metric Units).

 

If this object is an inline object (i.e. has a parent element of inline), then this value shall not have any effect when displaying the object in line with text, but may be maintained and used if the object is subsequently changed to floating. If the wrapping element [Example: wrapThrough or wrapSquare end example] present as a child element also has a distance from text, then this value shall be ignored.

 

[Example: Consider a floating DrawingML object which shall have one-half of an inch of padding between its top edge and the nearest text. This setting would be specified as follows:

 

<wp:anchor distT="457200" … >

</wp:anchor>

 

The distT attribute specifies that the padding distance shall be 457200 EMUs or one-half of an inch. end example]

 

The possible values for this attribute are defined by the ST_WrapDistance simple type (§5.5.3.6).

hidden (Hidden)

Specifies whether this floating DrawingML object shall be displayed. When a DrawingML object is displayed within a WordprocessingML document, that object may be hidden (i.e. present, but not visible). This attribute shall determine whether the object shall be rendered or made hidden. [Note: An application may have settings which allow this object to be viewed. end note]

 

If this attribute is omitted, then the parent DrawingML object shall be displayed (i.e. not hidden).

 

[Example: Consider a floating DrawingML object which shall be hidden within the document's content. This setting would be specified as follows:

 

<wp:anchor hidden="true" … >

</wp:anchor>

 

The hidden attribute has a value of true, which specifies that the DrawingML object is hidden and not displayed when the document is displayed. end example]

 

The possible values for this attribute are defined by the XML Schema boolean datatype.

layoutInCell (Layout In Table Cell)

Specifies how this DrawingML object shall behave when its anchor is located in a table cell; and its specified position would cause it to intersect with a table cell displayed in the document. That behavior shall be as follows:

When this attribute has a value of true, then the object shall be positioned within the existing table cell, causing the cell to be resized as needed. This means that all positioning shall be relative to the cell and not the line on which the table appears.

When this attribute has a value of false, then the object shall be positioned as specified, but the table shall be resized and/or relocated within the document as needed to accommodate the object. This means that all positioning shall be relative to the line on which the table appears and not the cell in which the anchor is present.

 

If this attribute is omitted, then its default value shall be considered to be false.

 

[Example: Consider a DrawingML picture which shall be displayed in the center of the document. If the object is contained within a table and is defined as follows:

 

<wp:anchor layoutInCell="true" … >

</wp:anchor>

 

The layoutInCell attribute has a value of true, which specifies that the object can be placed within the cell if needed, for example:

 

 

If the layoutInCell attribute was now set to false, the object shall be laid out outside of the cell, causing the table to be repositioned:

 

end example]

 

The possible values for this attribute are defined by the XML Schema boolean datatype.

locked (Lock Anchor)

Specifies that the anchor location for this object shall not be modified at runtime when an application edits the contents of this document. [Guidance: An application might have automatic behaviors which reposition the anchor for a DrawingML object based on user interaction - for example, moving it from one page to another as needed. This element shall tell applications not to perform any such behaviors. end guidance]

 

If this attribute is omitted, then the anchor shall not be locked for the parent DrawingML object (i.e. a default value of false).

 

[Example: Consider a floating DrawingML object which shall have its anchor locked at the current location. This setting would be specified as follows:

 

<wp:anchor locked="true" … >

</wp:anchor>

 

The locked attribute has a value of true, which specifies that the DrawingML object's current anchor location shall not be changed by applications editing this content. end example]

 

The possible values for this attribute are defined by the XML Schema boolean datatype.

relativeHeight (Relative Z-Ordering Position)

Specifies the relative Z-ordering of all DrawingML objects in this document. Each floating DrawingML object shall have a Z-ordering value, which determines which object is displayed when any two objects intersect. Higher values shall indicate higher Z-order; lower values shall indicate lower Z-order.

 

This attribute shall only indicate the Z-order with respect to other objects in the document which have an identical behindDoc attribute value. All objects with a behindDoc value of false shall be displayed above elements with a value of true.

 

[Example: Consider two floating DrawingML objects as follows:

 

<wp:anchor relativeHeight="5" … >

</wp:anchor>

 

<wp:anchor relativeHeight="8" … >

</wp:anchor>

 

The relativeHeight attribute of the second object is 8, which specifies that the second DrawingML object shall be at a higher Z-order than the first and shall be displayed whenever the two overlap. end example]

 

The possible values for this attribute are defined by the XML Schema unsignedInt datatype.

simplePos (Page Positioning)

Specifies that this object shall be positioned using the positioning information in the simplePos child element (§5.5.2.13). This positioning, when specified, will position the object on the page by placing its top left point at the x-y coordinates specified by that element.

 

If this element is omitted, then this object shall not use the simple positioning information in the simplePos element, even when present.

[Example: Consider a floating DrawingML object which shall be positioned at the top left corner of the page using simple positioning. This setting would be specified as follows:

 

<wp:anchor simplePos="true" … >
<wp:simplePos x="0" y="0" />


</wp:anchor>

 

The simplePos attribute has a value of true, which specifies that the DrawingML object's current position shall be dictated by the simplePos element, and hence placed at 0,0. end example]

 

The possible values for this attribute are defined by the XML Schema boolean datatype.

The following XML Schema fragment defines the contents of this element:

<complexType name="CT_Anchor">

   <sequence>

   <element name="simplePos" type="a:CT_Point2D"/>

   <element name="positionH" type="CT_PosH"/>

   <element name="positionV" type="CT_PosV"/>

   <element name="extent" type="a:CT_PositiveSize2D"/>

   <element name="effectExtent" type="CT_EffectExtent" minOccurs="0"/>

   <group ref="EG_WrapType"/>

   <element name="docPr" type="a:CT_NonVisualDrawingProps" minOccurs="1" maxOccurs="1"/>

   <element name="cNvGraphicFramePr" type="a:CT_NonVisualGraphicFrameProperties" minOccurs="0" maxOccurs="1"/>

   <element ref="a:graphic" minOccurs="1" maxOccurs="1"/>

   </sequence>

   <attribute name="distT" type="ST_WrapDistance" use="optional"/>

   <attribute name="distB" type="ST_WrapDistance" use="optional"/>

   <attribute name="distL" type="ST_WrapDistance" use="optional"/>

   <attribute name="distR" type="ST_WrapDistance" use="optional"/>

   <attribute name="simplePos" type="xsd:boolean"/>

   <attribute name="relativeHeight" type="xsd:unsignedInt" use="required"/>

   <attribute name="behindDoc" type="xsd:boolean" use="required"/>

   <attribute name="locked" type="xsd:boolean" use="required"/>

   <attribute name="layoutInCell" type="xsd:boolean" use="required"/>

   <attribute name="hidden" type="xsd:boolean" use="optional"/>

   <attribute name="allowOverlap" type="xsd:boolean" use="required"/>

</complexType>