Chapter 3. My first chapter

Table of Contents

3.1. My first section within this chapter
3.2. My external section

The following lines show you the content of this (source)file including this paragraph.

<?xml version="1.0" encoding="utf-8"?> 1
<!-- jEdit buffer-local properties: -->2
<!-- :indentSize=2:noTabs=true: -->
<!-- :xml.root=docmaster.xml: -->
<chapter id="cpt.mychapter_1"> 3
 <title>My first chapter</title> 4
 <para>The following lines shows you the content of this (source)file
 including this paragraph.</para> 5
 
1

The general XML header.

2

Some jEdit properties set within a xml comment.

3

The start tag of our chapter. As an attribute we give that chapter an id, which we can use for referencing this chapter.

4

The title for this chapter.

5

Our first paragraph within this chapter.

The next listing shows you an example of the admonition possibilities of DocBook. I think there is nothing to explain here. Just see at the listing, and how the output looks like.

 <warning><para>Be careful, if it rains, you can get wet!</para></warning>
 <note><para>Don't know whether the warning is really necessary</para></note>
 <important><para>But this is very important</para></important>
 <tip><para>Give me a tip</para></tip>
[Warning]Warning

Be careful, if it rains, you can get wet!

[Note]Note

Don't know whether the warning is really necessary

[Important]Important

But this is very important

[Tip]Tip

Give me a tip

The next listing shows an example of an figure, and a crossreference to the figure.

 <para>The <xref linkend="fig.mysample_figure"/>
 show us a HAPPY NEW YEAR picture.</para> <figure id="fig.mysample_figure">
 <title>This is just a sample figure</title>
 <mediaobject>
 <imageobject>
 <imagedata align="center"
 fileref="img/en/docbook/new_year.png" format="PNG"/>
 </imageobject>
 </mediaobject>
 </figure>

The Figure 3.1, “This is just a sample figure” shows us a HAPPY NEW YEAR picture.

This is just a sample figure

Figure 3.1. This is just a sample figure

Now let's go into a new section, and how we can achive this.

 <sect1 id="sec.myfirst">
 <title>My first section within this chapter</title>
 <para>A simple paragraph within a section</para>

3.1. My first section within this chapter

A simple paragraph within a section

With the following we can something place into an index.

 <para>Something we put into the index. Lions are big cats
<indexterm><primary>Animal</primary><secondary>lion</secondary></indexterm>.</para>

Something we put into the index. Lions are big cats .

And now a list in which we incorporate some usefull tags.

<itemizedlist>
 <title>Some examples of the most important tags</title>
 <listitem>
 <para>To mark a filename <filename>MyFilename.txt</filename></para>
 </listitem>
 <listitem>
 <para>To mark a directory
 <filename class="directory">c:\this\is\the\path</filename></para>
 </listitem>
 <listitem>
 <para>To mark a database <database>MyDatabase</database></para>
 </listitem>
 <listitem>
 <para>A simple Link <ulink url="http://java.sun.com/products/jimi/#">
 </ulink></para>
 </listitem>
 <listitem>
 <para>A simple Link with a name
 <ulink url="http://java.sun.com/products/jimi/#">Jimi</ulink></para>
 </listitem>
 <listitem>
 <para>We make <emphasis>this</emphasis> italic</para>
 </listitem>
 <listitem>
 <para>If we want to show the user he/she should click on
 <guibutton>Next</guibutton></para>
 </listitem>
 <listitem>
 <para>You can see a simple table in <xref linkend="sec.mysecond"/></para>
 </listitem>
</itemizedlist>

Some examples of the most important tags

And now the end of this section and before the end of this chapter, there is again a entity for including a file. The next section then explains the content of the docbook/mg_sample_section.xml and gives some additional examples.

 </sect1>
 <!-- This will include a external section file -->
 &mg_sample_section;
</chapter>