Next / Previous / Contents / TCC Help System / NM Tech homepage

10. Including graphic images

You can easily include images in a DocBook document. However, you may have to produce two different versions of some images so that they will look decent in both print and Web presentation.

10.1. Formal and informal figures

A formal figure is a graphic image presented with a title. For example, suppose you have scanned a photo and called the result lanai.jpg. Here is how you would include that photo as a formal figure:

<figure>
  <title>Lanai from the air</title>
  <mediaobject>
    <imageobject>
      <imagedata fileref="lanai.jpg"/>
    </imageobject>
  </mediaobject>
</figure>

An informal figure is just a figure without the title. To present the same graphic as an informal figure:

<informalfigure>
  <mediaobject>
    <imageobject>
      <imagedata fileref="lanai.jpg"/>
    </imageobject>
  </mediaobject>
</informalfigure>

If you want to change the displayed size of the image, add an attributes scale="P" to the imagedata element, where P is the percentage size, e.g., 33 for one-third size.

Here is an example of a 500x100-pixel panel from Pokey the Penguin shown first at half size (scale="50"), then at one-quarter size (scale="25").