“章节”指的是将文档组织成单独的章节,每个章节都有一个标题、一些文本以及可能的子章节。每个章节在 BoostBook 中通过 <section> 元素描述。一个介绍性章节可能看起来像这样
<section id="any.intro"> <title>Introduction</title> <para>Introduction to a library...</para> <section> <title>A Subsection</title> <para>Subsection information...</para> </section> </section>
<section> 元素包含所有逻辑上应该分组在该章节中的信息。章节的标题放在 <title> 元素中,任何段落、程序、列表、表格或子章节都可以在该章节中出现。<section> 元素的 id
属性为每个章节提供一个唯一的 ID,以便以后可以识别它进行链接。建议所有 ID 都以库的短名称开头,后跟一个句点,这样库之间的 ID 就不会冲突。