Boost C++ Libraries

PrevUpHomeNext

Sections

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 [endsect] tag. ([/...] is a comment, described later).

Sections can be given an optional id:

[#quickbook.ref.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 a-Z, A-Z, 0-9 and _. 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".

The end of the section can also have an optional id, this is just used to check that it matches the opening of the section.

[section:matching Section with an id]

[/...]

[endsect:matching]

It won't match a generated id, only one that's explicitly specified, so this will be an error, even if quickbook generates the id generated for the section:

[section Generated]

[/...]

[endsect:generated]

Sections can nest, and that results in a hierarchy in the table of contents.


PrevUpHomeNext