| DocBook: The Definitive Guide 2.0.17 (Alpha)

# figure

$Revision: 1666 $

$Date: 2002-06-12 07:19:37 -0400 (Wed, 12 Jun 2002) $

figure — A formal figure, generally an illustration, with a title

## Synopsis

### Content Model

    figure ::=
    (blockinfo?,
     (title,titleabbrev?),
     (literallayout|programlisting|programlistingco|screen|screenco|
      screenshot|synopsis|cmdsynopsis|funcsynopsis|classsynopsis|
      fieldsynopsis|constructorsynopsis|destructorsynopsis|
      methodsynopsis|address|blockquote|graphic|graphicco|mediaobject|
      mediaobjectco|informalequation|informalexample|informalfigure|
      informaltable|indexterm|beginpage|link|olink|ulink)+)

### Attributes

Common attributes

Name | Type | Default
floatstyle | CDATA | None
float | CDATA | "0"
pgwide | CDATA | None
label | CDATA | None

## Description

`Figure` is a formal example with a title. Figures often contain `Graphic`s, or other large, display elements. Frequently they are given IDs and referenced from the text with `XRef` or `Link`.

### Processing expectations

Formatted as a displayed block.

`Figure`s may contain multiple display elements. DocBook does not specify how these elements are to be presented with respect to one another.

DocBook does not specify the location of the figure within the final displayed flow of text; it may float or remain where it is located.

A list of figures may be generated at the beginning of a document.

### Parents

These elements contain figure: `answer`, `appendix`, `article`, `bibliodiv`, `bibliography`, `blockquote`, `callout`, `caution`, `chapter`, `constraintdef`, `glossary`, `glossdef`, `glossdiv`, `important`, `index`, `listitem`, `msgexplan`, `msgtext`, `note`, `para`, `partintro`, `preface`, `procedure`, `qandadiv`, `qandaset`, `question`, `refsect1`, `refsect2`, `refsect3`, `refsection`, `refsynopsisdiv`, `revdescription`, `sect1`, `sect2`, `sect3`, `sect4`, `sect5`, `section`, `setindex`, `sidebar`, `simplesect`, `step`, `taskprerequisites`, `taskrelated`, `tasksummary`, `tip`, `warning`.

### Children

The following elements occur in figure: `address`, `beginpage`, `blockinfo`, `blockquote`, `classsynopsis`, `cmdsynopsis`, `constructorsynopsis`, `destructorsynopsis`, `fieldsynopsis`, `funcsynopsis`, `graphic`, `graphicco`, `indexterm`, `informalequation`, `informalexample`, `informalfigure`, `informaltable`, `link`, `literallayout`, `mediaobject`, `mediaobjectco`, `methodsynopsis`, `olink`, `programlisting`, `programlistingco`, `screen`, `screenco`, `screenshot`, `synopsis`, `title`, `titleabbrev`, `ulink`.

## Attributes

float

  If `Float` has the value 1 (true), then the processing system is free to move the figure to a convenient location. (Where convenient location may be described in the style sheet or may be application dependent.) A value of 0 (false) indicates that the figure should be placed precisely where it occurs in the flow.

label

  `Label` specifies an identifying string for presentation purposes.

  Generally, an explicit `Label` attribute is used only if the processing system is incapable of generating the label automatically. If present, the `Label` is normative; it will used even if the processing system is capable of automatic labelling.

pgwide

  If `Pgwide` has the value 0 (false), then the `Figure` is rendered in the current text flow (with flow column width). A value of 1 (true) specifies that the figure should be rendered across the full text page.

## See Also

`equation`, `example`, `informalequation`, `informalexample`, `informalfigure`, `informaltable`, `table`.

## Examples

    <!DOCTYPE figure PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
              "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
    <figure><title>The Pythagorean Theorem Illustrated</title>
    <mediaobject>
      <imageobject>
        <imagedata fileref="figures/pythag.png"/>
      </imageobject>
      <textobject><phrase>An illustration of the Pythagorean Theorem</phrase></textobject>
    </mediaobject>
    </figure>

Figure 3. The Pythagorean Theorem Illustrated

For additional examples, see also `graphic`.

fieldsynopsis |  | filename

Copyright © 1999, 2000, 2001, 2002, 2003 O'Reilly & Associates, Inc. All rights reserved.