6.3. 图片figure

例 6.4. 带标题的图片:figure


<figure xml:id="fg.figure_id"><title>图片的标题</title>
    <mediaobject>
        <imageobject role="html"><imagedata fileref="images/figure_id.png" align="left"   scalefit="0" width="100%" /></imageobject>
        <imageobject role="fo">  <imagedata fileref="images/figure_id.png" align="center" scalefit="1" width="100%"/></imageobject>
    </mediaobject>
</figure>

            


例 6.5. figure内包含2张mediaobject图片


    <figure id="fg.hid_use_page"><title>HID Usage page summary</title>
        <mediaobject>
            <imageobject role="html">
                <imagedata fileref="images/hid_use_page.gif" align="left" scalefit="0" width="100%" />
            </imageobject>
            <imageobject role="fo">
                <imagedata fileref="images/hid_use_page.gif" align="center" scalefit="1" width="100%"/>
            </imageobject>
        </mediaobject>
        <mediaobject>
            <imageobject role="html">
                <imagedata fileref="images/hid_use_page_2.gif" align="left" scalefit="0" width="100%" />
            </imageobject>
            <imageobject role="fo">
                <imagedata fileref="images/hid_use_page_2.gif" align="center" scalefit="1" width="100%"/>
            </imageobject>
        </mediaobject>
    </figure>

            


例 6.6. 不带标题的非正式的图片:informalfigure


    <informalfigure>
        <mediaobject>
            <imageobject role="html"><imagedata fileref="images/no_hl_fo_source.jpg" scalefit="0" width="100%" /></imageobject>
            <imageobject role="fo">  <imagedata fileref="images/no_hl_fo_source.jpg" scalefit="1" width="100%" /></imageobject>
        </mediaobject>
    </informalfigure>

            


在同一行内显示图片,之前docbook 4使用inlinegraphic

而根据Inline graphics,而现在docbook 5已废弃使用inlinegraphic ,改用inlinemediaobject。

例 6.7. 行内图片:inlinemediaobject


<para>右击cmd的左上角的图标
    <inlinemediaobject>
        <imageobject><imagedata fileref="images/windows/cmd/cmd_icon.png"/></imageobject>
        <textobject><phrase>cmd的图标</phrase></textobject>
    </inlinemediaobject>
    ,会出现对应的菜单:
</para>