7.1. Including Images

If you plan on including images in your HOWTOs, you can now do this, as LinuxDoc didn't support images. Here's a sample way of including an image in your HOWTOS:


<figure>
   <title>LyX screen shot</title>
   <mediaobject>
      <imageobject>
         <imagedata fileref="lyx_screenshot.eps" format="eps">
      </imageobject>
      <imageobject>
         <imagedata fileref="lyx_screenshot.jpg" format="jpg">
      </imageobject>
      <textobject>
         <phrase>Screen shot of the LyX document processing program</phrase>
      </textobject>
   </mediaobject>
</figure>

This is a better way than using <graphic> for two reasons. First, <graphic> will be removed in DocBook 5.0 in favor of the <mediaobject> tag. So you may as well get started with the right way now. Second, <mediaobject> allows for different kinds of media based on what the output is. In this example, the first <imageobject> is an encapsulated PostScript(eps) file for use with formats derived from TeX such as DVI, PS, and PDF. The second <imageobject> is a JPEG image for visual display, mostly for HTML output. The <textobject> is presented if the output doesn't support graphics (TXT). Think of it as an HTML <alt> tag.