docbook v4 Cheat Sheet

Modified: 01/07/2008

Here are some docbook markup tags that can be used frequently.

Bolded text.

<emphasis role="bold">bolded phrase</emphasis>

Italicized text.

<emphasis>italicized phrase</emphasis>

Directory filename.

<filename class="directory">sampledirname</filename>

A filename.

<filename>samplefilename</filename>

Bolded directory filename.

<emphasis role="bold"><filename class="directory">sampledirname</filename></emphasis>

Bolded filename.

<emphasis role="bold"><filename>samplefilename</filename></emphasis>

Make a "Note" box.

<note>
<para>
Some important note.
</para>
</note>

Make a "tip" box.

<tip>
<para>
A friendly tip.
</para>
</tip>

Here is a list of a few marked boxes you can use:

  • note
  • caution
  • important
  • tip
  • warning.

Make a literal layout. Also useful for forced line breaks.

<literallayout>I: Input
  O: Output
    A: Automated
</literallayout>

Make a literal layout using Monospaced text. Also useful for forced line breaks.

<literallayout class="monospaced">
I: Input
  O: Output
    A: Automated
</literallayout>

Program listing using CDATA.

<programlisting><![CDATA[
class Hello {}
]]></programlisting>

Program listing without CDATA.

<programlisting>
class Hello {}
</programlisting>

Itemized list.

<itemizedlist>
        <listitem>
        itme 1
        </listitem>
        <listitem>
        itme 2
        </listitem>
</itemizedlist>

Insert an image.

<mediaobject>
        <imageobject>
        <imagedata fileref="images/sampleimage.png"/>
        </imageobject>
</mediaobject>

Refer to a GUI button.

Click the <guibutton>Remove</guibutton> button.