Pro PHP- Patterns, Frameworks, Testing and More

(vip2019) #1

(^68) CHAPTER 6 ■ DOCUMENTATION AND CODING CONVENTIONS
Listing 6-9. DocBook chapter Tags




...



Chapter title
Exploring chapter title

...



...



The chapterinfo tag behaves pretty much in the same way as the bookinfo tag, with a few
exceptions. All chapters must have a title, and can optionally have a subtitle. The rest of the
chapter is made up of sections and paragraphs.

The section Element
The section element may include sect1 through sect5 tags, which can be used to create logical
sections for a chapter. The sect tags must be nested within one another, so a sect2 must have
sect1 as a parent, sect3 must have sect2 as a parent, and so on. Each sect element may contain
a title and any number of paragraphs or subsections up to sect5 depth. Listing 6-10 shows an
example of a section element.

Listing 6-10. DocBook section Tags

<chapter>
<sect1>
<title>Section 1 Title</title>
<para>Section one lead-in text</para>
<sect2>
<title>Subsection</title>
<para>.. .</para>
</sect2>
</sect1>
</chapter>

The para Element
The para element is somewhat more complex than the previously discussed elements. Listing 6-11
shows some of the options for a para element.

McArthur_819-9C06.fm Page 68 Friday, February 22, 2008 8:59 AM

Free download pdf