Every document must begin with a Document Info section, which looks something like this:
[article The Document Title [quickbook 1.5] [version 1.0] [id the_document_name] [copyright 2000 2002 2003 Joe Blow, Jane Doe] [authors [Blow, Joe] [Doe, Jane]] [license The document's license] [source-mode c++] ]
article is the document type. There are several possible document
types, most of these are based on docbook document elements. These are fully
described in DocBook: The Definitive
Boostbook also adds another document type
for documenting software libraries.
So the documentation for the 'foo' library might start:
[library Foo [quickbook 1.5] [id foo] [version 1.0] ]
The document info block has a few different types of attributes. They are all optional.
quickbook attribute declares the version of quickbook
the document is written for. In its absence, version 1.1 is assumed. It's
recommended that you use
[quickbook 1.5] which is the version
source-mode attribute sets the initial Source
Mode. If it is omitted, the default value of
will be used.
id specifies the id of the document element. If it isn't specified
the id is automatically generated from the title. This id is also used
to generate the nested ids.
lang specifies the document language. This is used by docbook
to localize the documentation. Note that Boostbook doesn't have any localization
support so if you use it to generate the reference documentation it will
be in English regardless.
It should be a language code drawn from ISO 639 (perhaps extended with a country code drawn from ISO 3166, as en-US).
dirname is used to specify the directory name of the library
in the repository. This is a boostbook extension so it's only valid for
library documentation blocks. It's used for some boostbook
functionality, but for pure quickbook documentation has no practical effect.
are optional information.
category are boostbook
attributes which are only valid for
If you use them for other document types, quickbook will warn about them,
but still use them, generating invalid markup, that's just ignored by the
Quickbook documents are structured using 'sections'. These are used to generate the table of contents, and, when generating html, to split the document into pages. This is optional but a good idea for all but the simplest of documents.
A sectioned document might look like:
[book Title [quickbook 1.5] ] [section First Section] [/...] [endsect] [section Second Section] [/...] [endsect]
Sections start with the
section tag, and end with the
[/...] is a comment, described
Sections can be given an optional id:
[section:id The Section Title]
id will be the filename of the generated section. If it is not
present, "The Section Title" will be normalized and become the
id. Valid characters are
_. All non-valid characters
are converted to underscore and all upper-case are converted to lower case.
Thus: "The Section Title" will be normalized to "the_section_title".
Sections can nest, and that results in a hierarchy in the table of contents.