<caption>
(Single Caption Type Definition)
This element specifies the contents and positioning for captions which may be used to automatically label objects in a WordprocessingML document. A caption is a string that labels an object included in a WordprocessingML document, and typically consists of a string plus a field which numbers this item within a collection of similar objects.
In this diagram, the table contained in the WordprocessingML document has been labeled by inserting a caption below the table consisting of the string Table
followed by a field whose result is a decimal number. The settings which automatically produced this form of caption are specified using the following WordprocessingML fragment:
<w:captions> <w:caption w:name="Table" w:pos="below" w:numFmt="decimal" /> </w:captions>
The <caption>
element specifies the parameters for the resulting caption to be used to automatically label content within the WordprocessingML document. Specifically, the @name
and @numFmt
attributes specify that captions of this type inserted in the given WordprocessingML document shall consist of the string Table
followed by an incrementing decimal number field. In addition, the @pos
attribute specifies that these captions shall be placed below the object they are used to label.
WordprocessingML is designed such that the <caption>
element may be used in conjunction with applications to provide a dynamic captioning experience. In other words, an application may use the WordprocessingML in the example above to automatically insert a caption consisting of the string Table
followed by an incrementing decimal number field below tables when tables are inserted into a WordprocessingML document as defined by the <autoCaption>
element (§2.15.1.7). ]
Parent Elements |
---|
|
Attributes |
Description |
||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Specifies whether or not to display numbering associated with the most recent chapter heading in the WordprocessingML document within the caption field. A chapter heading is a paragraph of text within a WordprocessingML document that is formatted with a style that has been specified by the Only a style with its If this attribute is omitted, then chapter numbers shall not be included in the resulting caption. This diagram depicts a WordprocessingML document containing two chapters, each containing two tables labeled with captions. The Heading 2 style has been associated with chapter headings and applied to the strings: Specifically, the style used to demarcate chapters, is the style with a <w:caption w:name="Table" w:pos="below" w:chapNum="true" w:heading="2" w:numFmt="upperCase" w:sep="8212" /> The This can be seen in that the captions in Chapter 1 contain a The possible values for this attribute are defined by the ST_OnOff simple type (§2.18.67). |
||||||||||||||||||||||||
|
Specifies the given style that is used to demarcate chapter headings in a document. This value is used to link the chapter headings with paragraphs with a
If this attribute is omitted, then its value shall be assumed to be This diagram depicts a WordprocessingML document containing two chapters, each containing two tables labeled with captions. The Heading 2 style has been associated with chapter headings and applied to the strings: Specifically, the style used to demarcate chapter headings is the style with its <w:caption w:name="Table" w:pos="below" w:chapNum="On" w:heading="2" w:numFmt="upperCase" w:sep="8212" /> In other words, the WordprocessingML above may be used to label tables inserted in a given WordprocessingML document generated by an application with a caption consisting of: the string The possible values for this attribute are defined by the ST_DecimalNumber simple type (§2.18.16). |
||||||||||||||||||||||||
|
Specifies the literal string component of this caption. This value is used as follows:
In this diagram, the table contained in the WordprocessingML document has been labeled by inserting a caption below the table consisting of the string <w:caption w:name="Table" w:pos="below" w:numFmt="decimal" /> Specifically, the The possible values for this attribute are defined by the ST_String simple type (§2.18.89). |
||||||||||||||||||||||||
|
Specifies if the string specified in the name attribute shall be included in the resulting caption when it is automatically added to the document. If set to true, then the label text in the name attribute is omitted when adding the caption. If this attribute is omitted, then the name shall be added to the caption. In this diagram, the table contained in the WordprocessingML document has been labeled by inserting a caption below the table consisting of only a decimal number. This caption format is specified using the following WordprocessingML: <w:caption w:name="Custom" w:pos="below" w:noLabel="true" w:numFmt="decimal" /> Here, the The possible values for this attribute are defined by the ST_OnOff simple type (§2.18.67). |
||||||||||||||||||||||||
|
Specifies the format of the numbering which shall be included in an automatically generated caption to specify the index of this item in that collection (within the current chapter if If this attribute is omitted, then its default value shall be assumed to be In this example, the table contained in the WordprocessingML document has been labeled by inserting a caption below the table consisting of only a decimal number. This caption format is specified using the following WordprocessingML: <w:caption w:name="Custom" w:pos="below" w:noLabel="true" w:numFmt="decimal" /> Here, the The possible values for this attribute are defined by the ST_NumberFormat simple type (§2.18.66). |
||||||||||||||||||||||||
|
Specifies how an automatically inserted caption shall be positioned relative to the object that it is captioning. If this attribute is omitted, then the default value shall be In this diagram, the table contained in the WordprocessingML document has been labeled by inserting a caption below the table consisting of the string This caption format is specified using the following WordprocessingML: <w:caption w:name="Table" w:pos="below" w:numFmt="decimal" /> The The possible values for this attribute are defined by the ST_CaptionPos simple type (§2.18.8). |
||||||||||||||||||||||||
|
Specifies the character which shall be used to separate the chapter number used in this caption from the caption item numbering. A caption format consists of three components:
When the latter two items are both present, they are delimited using the chapter separator specified by this attribute. If this attribute is omitted, then its default value shall be This diagram depicts a WordprocessingML document containing two chapters, each containing two tables labeled with captions. The Heading 2 style has been associated with chapter headings and applied to the strings: Specifically, the style used to demarcate chapter headings is the style with a <w:caption w:name="Table" w:pos="below" w:chapNum="On" w:heading="2" w:numFmt="upperCase" w:sep="hyphen" /> The The possible values for this attribute are defined by the ST_ChapterSep simple type (§2.18.9). |
The following XML Schema fragment defines the contents of this element:
<complexType name="CT_Caption">
<attribute name="name" type="ST_String" use="required"/>
<attribute name="pos" type="ST_CaptionPos" use="optional"/>
<attribute name="chapNum" type="ST_OnOff" use="optional"/>
<attribute name="heading" type="ST_DecimalNumber" use="optional"/>
<attribute name="noLabel" type="ST_OnOff" use="optional"/>
<attribute name="numFmt" type="ST_NumberFormat" use="optional"/>
<attribute name="sep" type="ST_ChapterSep" use="optional"/>
</complexType>