Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Syntax Summary 語法概要

Comments 註釋
Phrase Level Elements 短語級元素
Block Level Elements 塊級元素

A QuickBook document is composed of one or more blocks. An example of a block is the paragraph or a C++ code snippet. Some blocks have special mark-ups. Blocks, except code snippets which have their own grammar (C++ or Python), are composed of one or more phrases. A phrase can be a simple contiguous run of characters. Phrases can have special mark-ups. Marked up phrases can recursively contain other phrases, but cannot contain blocks. A terminal is a self contained block-level or phrase-level element that does not nest anything.
一 個 QuickBook 文檔由一個或多個塊組成。一個塊可以是一個段落或一個 C++ 代碼片斷。有些塊具有特殊的標記。除了代碼片斷具有它們自己的語法(C++ 或 Python)以外,其它的塊由一個或多個短語組成。一個短語可以是一個簡單的連續字符。短語可以有特定的標記。帶標記的短語可以遞歸包含其它短語,但不 可以包含塊。終結是一個沒有嵌入任何東西的自包含的塊級元素或短語級元素。

Blocks, in general, are delimited by two end-of-lines (the block terminator). Phrases in each block cannot contain a block terminator. This way, syntax errors such as un-matched closing brackets do not go haywire and corrupt anything past a single block.
通常,塊是由兩個換行符(塊結束符)分隔的。每個塊中的短語不能包含塊結束符。這樣,像不匹配的右括號這樣的語法錯誤就不會失控和影響單個塊之外的東西。

Can be placed anywhere.
註釋可以放在任何地方。

[/ comment (no output generated) ]
[/ comments can be nested [/ some more here] ]
[/ Quickbook blocks can nest inside comments. [*Comment this out too!] ]
['italic], [*bold], [_underline], [^teletype], [-strikethrough]

will generate:
將生成:

italic, bold, underline, teletype, strikethrough

Like all non-terminal phrase level elements, this can of course be nested:
和所有非終結的短語級元素一樣,它當然可以被嵌入:

[*['bold-italic]]

will generate:
將生成:

bold-italic

When you want content that may or must be replaced by the user, use the syntax:
當你想讓某個內容可以或必須被用戶替換時,使用以下語法:

[~replacement]

This will generate:
這將生成:

replacement

["A question that sometimes drives me hazy: am I or are the others crazy?]--Einstein

will generate:
將生成:

A question that sometimes drives me hazy: am I or are the others crazy?」--Einstein

Note the proper left and right quote marks. Also, while you can simply use ordinary quote marks like "quoted", our quotation, above, will generate correct DocBook quotations (e.g. <quote>quoted</quote>).
留意其中正確的左右引用。另外,雖然你可以直接使用引號,像 "quoted",不過我們這裡的引用語將生成正確的 DocBook 引用語(如 <quote>quoted</quote>)。

Like all phrase elements, quotations may be nested. Example:
和所有短語元素一樣,引用語可以被嵌入。例如:

["Here's the rule for bargains: ["Do other men, for they would do you.] That's
the true business precept.]

will generate:
將生成:

Here's the rule for bargains: 『Do other men, for they would do you.』 That's the true business precept.

Simple markup for formatting text, common in many applications, is now supported:
在許多應用中常見的格式化文本的簡單標記,現在也可支持:

/italic/, *bold*, _underline_, =teletype=

will generate:
將生成:

italic, bold, underline, teletype

Unlike QuickBook's standard formatting scheme, the rules for simpler alternatives are much stricter [6] .
不像 QuickBook 的標準格式化方案,這裡的簡單格式化的規則更為嚴格[6]

  • Simple markups cannot nest. You can combine a simple markup with a nestable markup.
    簡單標記不可嵌入。你可以用可嵌入的標記來組成一個簡單標記。
  • Simple markups cannot contain any other form of quickbook markup.
    簡單標記不可包含其它形式的 quickbook 標記。
  • A non-space character must follow the leading markup
    開始標記必須後跟一個非空格字符。
  • A non-space character must precede the trailing markup
    結束標記前必須是一個非空格字符。
  • A space or a punctuation must follow the trailing markup
    結束標記後必須是空格或標點符號。
  • If the matching markup cannot be found within a block, the formatting will not be applied. This is to ensure that un-matched formatting markups, which can be a common mistake, does not corrupt anything past a single block. We do not want the rest of the document to be rendered bold just because we forgot a trailing '*'. A single block is terminated by two end of lines or the close bracket: ']'.
    如果在塊中不能找到匹配的標記,則不進行格式化。這是為了確保不匹配的格式化標記不會破壞單個塊之外的東西,這種錯誤是很常見的。我們不希望只是因為漏掉一個結束的 '*' 而使得文檔的剩餘部分都變成粗體的。單個塊以兩個換行符或右方括號 ']' 作為結束。
  • A line starting with the star will be interpreted as an unordered list. See Unordered lists.
    以星號開始的行將被解釋為一個無序號列表。請見 無序號列表

Table 28.1. More Formatting Samples
表 28.1. 更多的格式化示例

Markup 標記

Result 結果

*Bold*

Bold

*Is bold*

Is bold

* Not bold* *Not bold * * Not bold *

* Not bold* *Not bold * * Not bold *

This*Isn't*Bold (no bold)

This*Isn't*Bold (no bold)

(*Bold Inside*) (parenthesis not bold)

(Bold Inside) (parenthesis not bold)

*(Bold Outside)* (parenthesis bold)

(Bold Outside) (parenthesis bold)

3*4*5 = 60 (no bold)

3*4*5 = 60 (no bold)

3 * 4 * 5 = 60 (no bold)

3 * 4 * 5 = 60 (no bold)

3 *4* 5 = 60 (4 is bold)

3 4 5 = 60 (4 is bold)

*This is bold* this is not *but this is*

This is bold this is not but this is

*This is bold*.

This is bold.

*B*. (bold B)

B. (bold B)

['*Bold-Italic*]

Bold-Italic

*side-by*/-side/

side-by-side


As mentioned, simple markups cannot go past a single block. The text from "have" to "full" in the following paragraph will be rendered as bold:
如上所述,簡單標記不能跨越超過一個塊。以下段落中從 "have" 到 "full" 的文本將被顯示為粗體:

Baa baa black sheep, *have you any wool?
Yes sir, yes sir, three bags full!*
One for the master, one for the dame,
And one for the little boy who lives down the lane.

Baa baa black sheep, have you any wool? Yes sir, yes sir, three bags full! One for the master, one for the dame, And one for the little boy who lives down the lane.

But in the following paragraph, bold is not applied:
不過在下面這個段落中,則不會出現粗體:

Baa baa black sheep, *have you any wool?
Yes sir, yes sir, three bags full!
One for the master, one for the dame,
And one for the little boy who lives down the lane.

Baa baa black sheep, *have you any wool? Yes sir, yes sir, three bags full! One for the master, one for the dame, And one for the little boy who lives down the lane.

Inlining code in paragraphs is quite common when writing C++ documentation. We provide a very simple markup for this. For example, this:
段落中的內聯代碼在編寫C++文檔時非常常見。我們為此提供一個很簡單的標記。例如:

This text has inlined code `int main() { return 0; }` in it.

will generate:
將生成:

This text has inlined code int main() { return 0; } in it. 

The code will be syntax highlighted.
其中的代碼會被按語法進行著色。

[Note] Note 說明

We simply enclose the code with the tick: "`", not the single quote: "'". Note too that `some code` is preferred over [^some code].

我們只需將代碼用勾號 "`" 括起來,不是單引號 "'"。還要注意 `some code`[^some code] 更好。

Preformatted code simply starts with a space or a tab (See Code). However, such a simple syntax cannot be used as phrase elements in lists (See Ordered lists and Unordered lists), tables (See Tables), etc. Inline code (see above) can. The problem is, inline code does not allow formatting with newlines, spaces, and tabs. These are lost.
預格式化代碼以空格或製表符開始(見 代碼)。但是,這樣一個簡單的語法不能在列表(見 帶序號列表無序號列表)和表格(見 表格)等中作為短語元素使用。內聯代碼(見上)則可以。問題是,內聯代碼不允許對換行、空格和製表符進行格式化。它們會被丟失。

We provide a phrase level markup that is a mix between the two. By using the double-tick, instead of the single-tick, we are telling QuickBook to use preformatted blocks of code. Example:
我們提供了一個短語級標記來混合這兩者。通過使用雙勾號,不是單勾號,我們可以告知 QuickBook 使用預格式化的代碼塊。例如:

``
#include <iostream>

int main()
{
std::cout << "Hello, World!" << std::endl;
return 0;
}
``

will generate:
將生成:

#include <iostream>

int main()
{
    std::cout << "Hello, World!" << std::endl;
    return 0;
}

If a document contains more than one type of source code then the source mode may be changed dynamically as the document is processed. All QuickBook documents are initially in C++ mode by default, though an alternative initial value may be set in the Document section.
如果一個文檔包含一種以上的源代碼類型,那麼在文檔的處理期間,源模式可能會動態變化。所有 QuickBook 文檔缺省都被初始化為 C++ 模式,但是可以在 Document 節中設置其它初始值。

To change the source mode, use the [source-mode] markup, where source-mode is one of the supported modes. For example, this:
要改變源模式,請使用 [source-mode] 標記,其中 source-mode 為可支持的模式之一。例如:

Python's [python] `import` is rather like C++'s [c++] `#include`. A
C++ comment `// looks like this` whereas a Python comment [python]
`# looks like this`.

will generate:
將生成:

Python's import is rather like C++'s #include. A C++ comment // looks like this whereas a Python comment #looks like this.

Table 28.2. Supported Source Modes
表 28.2. 支持的源模式

Mode 模式

Source Mode Markup 源模式標記

C++

[c++]

Python

[python]


[Note] Note 說明

The source mode strings are lowercase.

源模式字符串是小寫的。

[br]
[Warning] Warning 警告

[br] is now deprecated. Blurbs, Admonitions and table cells (see Tables) may now contain paragraphs.

[br] 現在已不再使用。短評警告 和表格單元(見 表格)現在可以包含段落。

[#named_anchor]

A named anchor is a hook that can be referenced by a link elsewhere in the document. You can then reference an anchor with [link named_anchor Some link text]. See Anchor links, Section and Heading.
命名錨是一個可以通過鏈接引向文檔中任一地方的鉤子。你可以用 [link named_anchor Some link text] 來引用一個錨。請見 錨鏈接章節標題

[@http://www.boost.org this is [*boost's] website....]

will generate:
將生成:

this is boost's website....

URL links where the link text is the link itself is common. Example:
鏈接文本就是鏈接本身的 URL 鏈接是很常見的。例如:

see http://spirit.sourceforge.net/

so, when the text is absent in a link markup, the URL is assumed. Example:
因此,當一個鏈接標記中沒有文本時,就假定為 URL 本身。例如:

see [@http://spirit.sourceforge.net/]

will generate:
將生成:

see http://spirit.sourceforge.net/

You can link within a document using:
你可以用如下方式鏈接文檔的內部:

[link section_id.normalized_header_text The link text]

See sections Section and Heading for more info.
更多信息請見 章節標題

In addition, you can link internally to an XML refentry like:
此外,你也可以鏈接到內部的一個 XML 引用項,如:

[link xml.refentry The link text]

This gets converted into <link linkend="xml.refentry">The link text</link>.
這將被轉換為 <link linkend="xml.refentry">The link text</link>.

Like URLs, the link text is optional. If this is not present, the link text will automatically be the refentry. Example:
類似於 URLs,鏈接文本也是可選的。如果沒有給出,則鏈接文本自動設為引用項。例如:

[link xml.refentry]

This gets converted into <link linkend="xml.refentry">xml.refentry</link>.
將被轉換為 <link linkend="xml.refentry">xml.refentry</link>.

If you want to link to a function, class, member, enum, concept, global, or header in the reference section, you can use:
如果你想鏈接到參考章節中的某個函數、類、成員、枚舉、概念、全局變量或頭文件,你可以用:

[funcref fully::qualified::function_name The link text]
[classref fully::qualified::class_name The link text]
[memberref fully::qualified::member_name The link text]
[enumref fully::qualified::enum_name The link text]
[macroref MACRO_NAME The link text]
[conceptref ConceptName The link text]
[headerref path/to/header.hpp The link text]
[globalref fully::qualified::global The link text]

Again, the link text is optional. If this is not present, the link text will automatically be the function, class, member, enum, macro, concept, global, or header name. Example:
同樣,鏈接文本也是可選的。如果沒有給出,則鏈接文本將自動設為函數、類、成員、枚舉、宏、概念、全局變量或頭文件的名稱。例如:

[classref boost::bar::baz]

would have "boost::bar::baz" as the link text.
將以 "boost::bar::baz" 作為鏈接文本。

The escape mark-up is used when we don't want to do any processing.
當我們不想要任何處理時,應使用轉義標記。

'''
escape (no processing/formatting)
'''

Escaping allows us to pass XML markup to BoostBook or DocBook. For example:
轉義可以讓我們將 XML 標記傳遞給 BoostBookDocBook。例如:

'''
<emphasis role="bold">This is direct XML markup</emphasis>
'''

This is direct XML markup

[Important] Important 重點

Be careful when using the escape. The text must conform to BoostBook/DocBook syntax.

使用轉義時一定要小心。其文本必須符合 BoostBook/DocBook 語法。

The backslash may be used to escape a single punctuation character. The punctuation immediately after the backslash is passed without any processing. This is useful when we need to escape QuickBook punctuations such as [ and ]. For example, how do you escape the triple quote? Simple: \'\'\'
反斜槓可用於對單個標點符號進行轉義。緊跟在反斜槓之後的標點符號將不經處理直接傳遞。當我們需要對 QuickBook 的標點,如 [],進行轉義時,這非常有用。例如,你如何對三重引號進行轉義?很簡單:\'\'\'

\n has a special meaning. It is used to generate line breaks.
\n 具有特殊意義。它用於生成一個換行。

[Warning] Warning 警告

\n and [br] are now deprecated. Blurbs, Admonitions and table cells (see Tables) may now contain paragraphs.

\n[br] 現在已不再使用。短評警告 和表格單元(見 表格)現在可以包含段落。

The escaped space: \ also has a special meaning. The escaped space is removed from the output.
轉義的空格:\ 也具有特殊意義。轉義的空格會從輸出中刪除。

[$image.jpg]

As of version 1.3, QuickBook supports footnotes. Just put the text of the footnote in a [footnote] block, and the text will be put at the bottom of the current page. For example, this:
和版本 1.3 一樣,QuickBook 支持腳注。只要將腳注文本放在一個 [footnote] 塊中,這些文本就將被置於當前頁的底部。例如:

[footnote A sample footnote]

will generate this [7] .
將生成 [7] .

__a_macro_identifier__

See Macros for details.
詳見

[a_template_identifier]

See Templates for details.
詳見 模板

Like C++ #ifdef, you can generate phrases depending on the presence of a macro. Example:
類似於 C++ #ifdef,你可以根據某個宏是否出現來生成短語。例如:

[? __to_be__ To be or not to be]

Here, the phrase "To be or not to be" will only be generated if the macro symbol __to_be__ has been previously defined. The phrase above will not do anything since we haven't defined __to_be__. Now, let's define the symbol:
這裡,短語 "To be or not to be" 僅當宏符號 __to_be__ 在之前已定義時才會生成。由於我們沒有定義 __to_be__,所以以上短語將不會做任何事情。現在我們來定義這個符號:

[def __to_be__]

And try again:
再試一次:

To be or not to be

Yes! [8]
對了![8]

Every document must begin with a Document Info section, which should look like this:
每個文檔都必須以一個"文檔信息"節開始,如下:

[document-type The Document Title
[quickbook 1.3]
[version 1.0]
[id the_document_name]
[dirname the_document_dir]
[copyright 2000 2002 2003 Joe Blow, Jane Doe]
[purpose The document's reason for being]
[category The document's category]
[authors [Blow, Joe], [Doe, Jane]]
[license The document's license]
[source-mode source-type]
]

Where document-type is one of:
其中 document-type 為以下之一:

  • book
  • article
  • library
  • chapter
  • part
  • appendix
  • preface
  • qandadiv
  • qandaset
  • reference
  • set

quickbook 1.3 declares the version of quickbook the document is written for. In its absence, version 1.1 is assumed.
從 quickbook 1.3 起,要聲明縮寫本文檔的 quickbook 版本。如果沒有明確聲明,則假定為版本 1.1。

version, id, dirname, copyright, purpose, category, authors, license, last-revision and source-mode are optional information.
version, id, dirname, copyright, purpose, category, authors, license, last-revisionsource-mode 均為可選信息。

source-type is a lowercase string setting the initial Source Mode. If the source-mode field is omitted, a default value of c++ will be used.
source-type 是一個小寫字符串,用於設置初始的 源模式。如果 source-mode 域被省略,則使用缺省值 c++

Starting a new section is accomplished with:
以下為一個新章節的開始:

[section:id The Section Title]

where id is optional. 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". 
其中 id 是可選的。id 將成為生成章節的文件名。如果未給出,則將 "The Section Title" 規範化並作為 id。有效的字符為 a-Z, A-Z, 0-9_。所有無效的字符將被轉換為下劃線且所有大寫被轉為小寫。因此,"The Section Title" 將被規範化為 "the_section_title"。

End a section with:
以下結束一個章節:

[endsect]

Sections can nest, and that results in a hierarchy in the table of contents.
章節可以嵌套,其結果為分層表格中的內容。

You can include another XML file with:
你可以包含另一個 XML 文件:

[xinclude file.xml]

This is useful when file.xml has been generated by Doxygen and contains your reference section.
當 file.xml 已經由 Doxygen 生成且含有你的引用章節時,這非常有用。

Paragraphs start left-flushed and are terminated by two or more newlines. No markup is needed for paragraphs. QuickBook automatically detects paragraphs from the context. Block markups [section, endsect, h1, h2, h3, h4, h5, h6, blurb, (block-quote) ':', pre, def, table and include ] may also terminate a paragraph.
段落以左斜槓開始,以兩個或以上的換行符結束。段落不需要標記。QuickBook 自動從上下文中檢測段落。塊標記 [section, endsect, h1, h2, h3, h4, h5, h6, blurb, (block-quote) ':', pre, def, table 和 include ] 也都可以結束一個段落。

This is a new paragraph...

# One
# Two
# Three

will generate:
將生成:

  1. One
  2. Two
  3. Three

List hierarchies are supported. Example:
支持列表層次。例如:

# One
# Two
# Three
# Three.a
# Three.b
# Three.c
# Four
# Four.a
# Four.a.i
# Four.a.ii
# Five

will generate:
將生成:

  1. One
  2. Two
  3. Three
    1. Three.a
    2. Three.b
    3. Three.c
  4. Fourth
    1. Four.a
      1. Four.a.i
      2. Four.a.ii
  5. Five

Long lines will be wrapped appropriately. Example:
較長的行將被適當地自動換行。例如:

# A short item.
# A very long item. A very long item. A very long item.
A very long item. A very long item. A very long item.
A very long item. A very long item. A very long item.
A very long item. A very long item. A very long item.
A very long item. A very long item. A very long item.
# A short item.
  1. A short item.
  2. A very long item. A very long item. A very long item. A very long item. A very long item. A very long item. A very long item. A very long item. A very long item. A very long item. A very long item. A very long item. A very long item. A very long item. A very long item.
  3. A short item.
* First
* Second
* Third

will generate:
將生成:

  • First
  • Second
  • Third

Mixed lists (ordered and unordered) are supported. Example:
支持混合列表(有序號和無序號的)。例如:

# One
# Two
# Three
* Three.a
* Three.b
* Three.c
# Four

will generate:
將生成:

  1. One
  2. Two
  3. Three
    • Three.a
    • Three.b
    • Three.c
  4. Four

And...
還有...

# 1
* 1.a
# 1.a.1
# 1.a.2
* 1.b
# 2
* 2.a
* 2.b
# 2.b.1
# 2.b.2
* 2.b.2.a
* 2.b.2.b

will generate:
將生成:

  1. 1
    • 1.a
      1. 1.a.1
      2. 1.a.2
    • 1.b
  2. 2
    • 2.a
    • 2.b
      1. 2.b.1
      2. 2.b.2
        • 2.b.2.a
        • 2.b.2.b

Preformatted code starts with a space or a tab. The code will be syntax highlighted according to the current Source Mode:
預格式化的代碼以一個空格或製表符開始。代碼將根據當前的 源模式 按語法著色:

#include <iostream>

int main()
{
    // Sample code
std::cout << "Hello, World\n"; return 0; }

import cgi

def cookForHtml(text):
    '''"Cooks" the input text for HTML.'''

    return cgi.escape(text)

Macros that are already defined are expanded in source code. Example:
在源代碼中,已定義的宏將被展開。例如:

[def __array__ [@http://www.boost.org/doc/html/array/reference.html array]]
[def __boost__ [@http://www.boost.org/libs/libraries.htm boost]]

using __boost__::__array__;

Generates:
生成:

using boost::array;

Inside code, code blocks and inline code, QuickBook does not allow any markup to avoid conflicts with the target syntax (e.g. c++). In case you need to switch back to QuickBook markup inside code, you can do so using a language specific escape-back delimiter. In C++ and Python, the delimiter is the double tick (back-quote): "``" and "``". Example:
QuickBook 不允許在代碼、代碼塊和內聯代碼的內部使用任何標記,以避免與目標語法(如 c++)衝突。當你需要在代碼內部轉回到 QuickBook 標記時,你可以用一個與語言相關的 escape-back 分隔符來實現。在 C++ 和 Python 中,這個分隔符是雙勾號(反向引號):"``" 和 "``"。例如:

void ``[@http://en.wikipedia.org/wiki/Foo#Foo.2C_Bar_and_Baz foo]``()
{
}

Will generate:
將生成:

void foo()
{
}

When escaping from code to QuickBook, only phrase level markups are allowed. Block level markups like lists, tables etc. are not allowed.
從代碼轉義回 QuickBook 時,只允許使用短語級標記。塊級標記,如列表、表格等等,不允許使用。

Sometimes, you don't want some preformatted text to be parsed as C++. In such cases, use the [pre ... ] markup block.
有時,你不想按 C++ 的方式分析一些預格式化的文本。這時,請使用 [pre ... ] 標記塊。

[pre

Some *preformatted* text Some *preformatted* text

Some *preformatted* text Some *preformatted* text

Some *preformatted* text Some *preformatted* text

]

Spaces, tabs and newlines are rendered as-is. Unlike all quickbook block level markup, pre (and Code) are the only ones that allow multiple newlines. The markup above will generate:
空格、製表符和換行符照原樣處理。和所有 quickbook 塊級標記不同,pre (和 Code) 是唯一一個允許多個換行符的。以上標記將生成:

Some preformatted text                    Some preformatted text

Some preformatted text Some preformatted text

Some preformatted text Some preformatted text

Notice that unlike Code, phrase markup such as font style is still permitted inside pre blocks.
注意,和 Code 不同,像字體風格這樣的短語標記仍然允許在 pre 塊內部使用。

[:sometext...]

Indents the paragraph. This applies to one paragraph only.
縮入該段落。這只應用於一個段落。

[note This is a note]
[tip This is a tip]
[important This is important]
[caution This is a caution]
[warning This is a warning]

generates DocBook admonitions:
生成 DocBook 警告:

[Note] Note

This is a note

[Tip] Tip

This is a tip

[Important] Important

This is important

[Caution] Caution

This is a caution

[Warning] Warning

This is a warning

These are the only admonitions supported by DocBook. So, for example [information This is some information] is unlikely to produce the desired effect.
這些只是 DocBook 可支持的警告。因此,像 [information This is some information] 這樣,就不太可能得到所期望的效果。

[h1 Heading 1]
[h2 Heading 2]
[h3 Heading 3]
[h4 Heading 4]
[h5 Heading 5]
[h6 Heading 6]

Heading 1

Heading 2

Heading 3

Heading 4
Heading 5
Heading 6

Headings 1-3 [h1 h2 and h3] will automatically have anchors with normalized names with name="section_id.normalized_header_text" (i.e. 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. For example: Heading 1 in section Section 2 will be normalized to section_2.heading_1). You can use:
標題 1-3 [h1 h2 和 h3] 會自動帶有規範化名的錨,name="section_id.normalized_header_text" (即,有效字符為 a-z, A-Z, 0-9_。所有無效字符被轉換為下劃線,所有大寫轉為小寫。例如:Section 2 章節中的 Heading 1 將規範化為 section_2.heading_1)。你可以用:

[link section_id.normalized_header_text The link text]

to link to them. See Anchor links and Section for more info.
來鏈接到它們。詳見 錨鏈接章節

In cases when you don't want to care about the heading level (1 to 6), you can use the Generic Heading:
當你不想關心標題的級別(1 到 6)時,你可以使用 通用標題

[heading Heading]

The Generic Heading assumes the level, plus one, of the innermost section where it is placed. For example, if it is placed in the outermost section, then, it assumes h2.
通用標題 假定標題級別為它所在的最內層章節的級別加一。例如,如果它位於最外層的音節,則它假定為 h2.

Headings are often used as an alternative to sections. It is used particularly if you do not want to start a new section. In many cases, however, headings in a particular section is just flat. Example:
標題通常被作為章節的另一種形式來使用。如果你不想開始一個新章節,那麼就要特殊的用法。不過在多數情況下,在特定章節中的標題是平的。例如:

[section A]
[h2 X]
[h2 Y]
[h2 Z]
[endsect]

Here we use h2 assuming that section A is the outermost level. If it is placed in an inner level, you'll have to use h3, h4, etc. depending on where the section is. In general, it is the section level plus one. It is rather tedious, however, to scan the section level everytime. If you rewrite the example above as shown below, this will be automatic:
這裡我們假定章節 A 是最外層的,所以使用了 h2。如果它是在較裡面的層,那麼你就必須根據所在的章節使用 h3, h4, 等等。通常是章節的級別加一。但是,每次都要確定章節的級別是很煩瑣的。如果你按以下方式重寫上述例子,那麼就可以自動判斷級別了:

[section A]
[heading X]
[heading Y]
[heading Z]
[endsect]

They work well regardless where you place them. You can rearrange sections at will without any extra work to ensure correct heading levels. In fact, with section and heading, you have all you need. h1..h6 becomes redundant. h1..h6 might be deprecated in the future.
無論你把它們放在哪裡,都可以正確工作。你可以重新整理各個章節,無需額外的工作來確保正確的標題級別。事實上,你所需要的就是 sectionheadingh1..h6 都成了多餘的了。h1..h6 有可能在以後被建議不再使用。

[def macro_identifier some text]

When a macro is defined, the identifier replaces the text anywhere in the file, in paragraphs, in markups, etc. macro_identifier is a string of non- white space characters except ']'. A macro may not follow an alphabetic character or the underscore. The replacement text can be any phrase (even marked up). Example:
在定義了一個宏以後,在文件、段落、標記等中的標識符將被替換為相應文本。macro_identifier 是一個由 ']' 以外的非空字符組成的字符串。宏不能跟在字母或下劃線之後。替換的文本可以是任意短語(甚至是帶標記的)。例如:

[def sf_logo [$http://sourceforge.net/sflogo.php?group_id=28447&type=1]]
sf_logo

Now everywhere the sf_logo is placed, the picture will be inlined.
現在,無論 sf_logo 被放在哪裡,都會內聯相應的圖片。

[Tip] Tip 提示

It's a good idea to use macro identifiers that are distinguishable. For instance, in this document, macro identifiers have two leading and trailing underscores (e.g. __spirit__). The reason is to avoid unwanted macro replacement.

使用可辨識的宏標識符是一個好方法。例如,在這個文檔中,所有宏標識符都具是以兩個下劃線開頭,以兩個下劃線結束(如 __spirit__)。其原因是為了避免不必要的宏替換。

Links (URLS) and images are good candidates for macros. 1) They tend to change a lot. It is a good idea to place all links and images in one place near the top to make it easy to make changes. 2) The syntax is not pretty. It's easier to read and write, e.g. __spirit__ than [@http://spirit.sourceforge.net Spirit].
鏈接(URLS)和圖像最適合於用宏。1) 它們常常會變。一個好方法是,將所有鏈接和圖像放在文檔頭附近,這樣更易於修改。2) 它們的語法不太美觀。使用宏可以更易於讀寫,如 __spirit__[@http://spirit.sourceforge.net Spirit] 相比。

Some more examples:
更多例子:

[def :-)            [$theme/smiley.png]]
[def __spirit__ [@http://spirit.sourceforge.net Spirit]]

(See Images and Links)
(見 圖像鏈接)

Invoking these macros:
調用以下宏:

Hi __spirit__  :-)

will generate this:
將生成:

Hi Spirit smiley

Quickbook has some predefined macros that you can already use.
Quickbook 有一些預定義的宏,你可以直接使用。

Table 28.3. Predefined Macros
表 28.3. 預定義宏

Macro 宏

Meaning 含義

Example 例子

__DATE__

Today's date 今天的日期

2008-Nov-02

__TIME__

The current time 當前時間

08:07:56 AM

__FILENAME__

Quickbook source filename

Quickbook 源文件名

/home/beman/snapshot/posix/tools/quickbook/doc/quickbook.qbk


Templates provide a more versatile text substitution mechanism. Templates come in handy when you need to create parameterizable, multi-line, boilerplate text that you specify once and expand many times. Templates accept one or more arguments. These arguments act like place-holders for text replacement. Unlike simple macros, which are limited to phrase level markup, templates can contain block level markup (e.g. paragraphs, code blocks and tables).
模板提供了一個更為通用的文字替代機制。當你需要創建可參數化的、多行的、一次給定多次展開的樣板文本時,可以使用模板。模板可接受一個或多個參數。這些參數類似於文本替換中的佔位符。與普通的宏只局限於在短語級標記不同,模板可以包含塊級標記(如段落、代碼塊和表格)。

Example template:
示例模板:

[template person[name age what]

Hi, my name is [name]. I am [age] years old. I am a [what].

]
Template Identifier 模板標識符

Template identifiers can either consist of:
模板標識符可以包含:

  • An initial alphabetic character or the underscore, followed by zero or more alphanumeric characters or the underscore. This is similar to your typical C/C++ identifier.
    以字母或下劃線開頭,後跟零個或多個字母、數字或下劃線。類似於典型的 C/C++ 標識符。
  • A single character punctuation (a non-alphanumeric printable character)
    單字符標點(非字母數字的可打印字符)
Formal Template Arguments 模板形參

Template formal arguments are identifiers consisting of an initial alphabetic character or the underscore, followed by zero or more alphanumeric characters or the underscore. This is similar to your typical C/C++ identifier.
模板形參是以字母或下劃線開頭,後跟零個或多個字母、數字或下劃線的標識符。它類似於典型的 C/C++ 標識符。

A template formal argument temporarily hides a template of the same name at the point where the template is expanded. Note that the body of the person template above refers to name age and what as [name] [age] and [what]. name age and what are actually templates that exist in the duration of the template call.
模板形參在 模板被展開 的地方臨時性地隱藏了一個同名的模板。注意,前面的 person 模板體中分別以 [name] [age][what] 來引用 name agewhatname agewhat 實際上是在模板調用期間的模板。

Template Body 模板體

The template body can be just about any QuickBook block or phrase. There are actually two forms. Templates may be phrase or block level. Phrase templates are of the form:
模板體可以是幾乎任意的 QuickBook 塊或短語。實際上有兩種形式。模板可以是短語級或塊級的。短語模板形如:

[template sample[arg1 arg2...argN] replacement text... ]

Block templates are of the form:
塊模板形如:

[template sample[arg1 arg2...argN]
replacement text...
]

The basic rule is as follows: if a newline immediately follows the argument list, then it is a block template, otherwise, it is a phrase template. Phrase templates are typically expanded as part of phrases. Like macros, block level elements are not allowed in phrase templates. 
基本規則如下:如果參數列表後緊跟一個換行,則為塊模板,否則為短語模板。短語模板通常被展開為短語的一部分。與宏類似,塊級元素不允許出現在短語模板中。

Template Expansion 模板的展開

You expand a template this way:
你可以用以下方式展開一個模板:

[template_identifier arg1..arg2..arg3]

At template expansion, you supply the actual arguments. The template will be expanded with your supplied arguments. Example:
在模板展開時,你要提供實參。模板將以你提供的參數來展開。例如:

[person James Bond..39..Spy]
[person Santa Clause..87..Big Red Fatso]

Which will expand to:
將被展開為:

Hi, my name is James Bond. I am 39 years old. I am a Spy.

Hi, my name is Santa Clause. I am 87 years old. I am a Big Red Fatso.

[Caution] Caution 警告

A word of caution: Templates are recursive. A template can call another template or even itself, directly or indirectly. There are no control structures in QuickBook (yet) so this will always mean infinite recursion. QuickBook can detect this situation and report an error if recursion exceeds a certain limit.

小心:模板是遞歸的。一個模板可以直接或間接地調用其它模板甚至它本身。在 QuickBook 中(還)沒有控制的結構,所以這基本上會是無限的遞歸。QuickBook 可以檢測出這種情況,並在遞歸超出某個特定限值後報告一個錯誤。

Each actual argument can be a word, a text fragment or just about any QuickBook phrase. Arguments are separated by the double dot ".." and terminated by the close parenthesis.
每個實參都可以是一個單詞、一段文本或幾乎任意的 QuickBook 短語。參數以雙點 ".." 分隔,並以右括號結束。

Nullary Templates 無參模板

Nullary templates look and act like simple macros. Example:
無參模板的外觀和行為都與簡單的宏相似。例如:

[template alpha[]'''&#945;''']
[template beta[]'''&#946;''']

Expanding:
展開:

Some squigles...[*[alpha][beta]]

We have:
將得到:

Some squiggles...αβ

The difference with macros are
它與宏的區別在於:

  • The explicit template expansion syntax. This is an advantage because, now, we don't have to use obscure naming conventions like double underscores (e.g. __alpha__) to avoid unwanted macro replacement.
    明確的 模板展開語法。這是一個優點,因為現在我們不再需要使用模糊的命名習慣,如雙下劃線(如 __alpha__),來避免不必要的宏替換。
  • The template is expanded at the point where it is invoked. A macro is expanded immediately at its point of declaration. This is subtle and can cause a slight difference in behavior especially if you refer to other macros and templates in the body.
    模板是在調用的地方展開。而宏是在聲明的地方展開。這是很微妙的,並且會導致行為上的些許差異,特別是當你在模板體內引用其它宏或模板時。

The empty brackets after the template identifier (alpha[]) indicates no arguments. If the template body does not look like a template argument list, we can elide the empty brackets. Example:
模板標識符後的空括號(alpha[])表示沒有參數。如果模板體看起來不像一個模板參數列表,那麼我們可省略這個空括號。例如:

[template aristotle_quote Aristotle: [*['Education is the best provision
for the journey to old age.]]]

Expanding:
展開:

Here's a quote from [aristotle_quote].

We have:
將得到:

Here's a quote from Aristotle: Education is the best provision for the journey to old age..

The disadvantage is that you can't avoid the space between the template identifier, aristotle_quote, and the template body "Aristotle...". This space will be part of the template body. If that space is unwanted, use empty brackets or use the space escape: "\ ". Example:
缺點是,你不能消除模板標識符 aristotle_quote 和模板體 "Aristotle..." 之間的空格。這個空格是模板體的一部分。如果這個空格是不想要的,請使用空括號或空格轉義:"\ "。例如:

[template tag\ _tag]

Then expanding:
現在展開:

`struct` x[tag];

We have:
將得到:

struct x_tag;

You have a couple of ways to do it. I personally prefer the explicit empty brackets, though.
你有多個方法來實現它。但是,我個人更喜歡明確的空括號。

Simple Arguments 簡單參數

As mentioned, arguments are separated by the double dot "..". If there are less arguments passed than expected, QuickBook attempts to break the last argument into two or more arguments following this logic:
如前所述,參數是用雙點號 ".." 來分隔的。如果傳入的實參少於所期望的數量,QuickBook 將嘗試按以下邏輯將最後一個實參分為兩個或以上的參數:

  • Break the last argument into two, at the first space found ('', '\n', \t' or '\r').
    將最後一個實參在第一個空格處('', '\n', \t' 或 '\r')一分為二。
  • Repeat until there are enough arguments or if there are no more spaces found (in which case, an error is reported).
    重複以上操作,直到得到足夠多的參數,或再無空格(此時將報告一個錯誤)為止。

For example:
例如:

[template simple[a b c d] [a][b][c][d]]
[simple w x y z]

will produce:
將產生:

wxyz

"w x y z" is initially treated as a single argument because we didn't supply any ".." separators. However, since simple expects 4 arguments, "w x y z" is broken down iteratively (applying the logic above) until we have "w", "x", "y" and "z".
開始時,"w x y z" 被視為一個參數,因為我們沒有使用 ".." 分隔符。但是,由於 simple 期望有4個參數,所以 "w x y z" 被逐次破開(按以上邏輯),直至我們得到 "w", "x", "y" 和 "z" 為止。

QuickBook only tries to get the arguments it needs. For example:
QuickBook 只會嘗試到得到所需的參數為止。例如:

[simple w x y z trail]

will produce:
將產生:

wxyz trail

The arguments being: "w", "x", "y" and "z trail".
參數為:"w", "x", "y" 和 "z trail".

It should be obvious now that for simple arguments with no spaces, we can get by without separating the arguments with ".." separators. It is possible to combine ".." separators with the argument passing simplification presented above. Example:
現在很顯然,對於不帶空格的簡單參數,我們可以無需使用 ".." 分隔符帶分隔參數。也可以結合 ".." 分隔符來傳遞參數,以簡化前面的例子。例如:

[simple what do you think ..m a n?]

will produce:
將產生:

what do you think man?

Punctuation Templates 標點模板

With templates, one of our objectives is to allow us to rewrite QuickBook in QuickBook (as a qbk library). For that to happen, we need to accommodate single character punctuation templates which are fairly common in QuickBook. You might have noticed that single character punctuations are allowed as template identifiers. Example:
對於模板,我們的目標之一是可以用 QuickBook 來重寫 QuickBook (類似於一個 qbk 庫)。為此,我們需要提供單字符標點模板,這在 QuickBook 中是很常見的。你可能已留意到,單字符標點可以被用作為 模板標識符。例如:

[template ![bar] <hey>[bar]</hey>]

Now, expanding this:
現在,展開以下:

[!baz]

We will have:
我們將得到:

<hey>baz</hey>
[blurb :-) [*An eye catching advertisement or note...]

__spirit__ is an object-oriented recursive-descent parser generator framework
implemented using template meta-programming techniques. Expression templates
allow us to approximate the syntax of Extended Backus-Normal Form (EBNF)
completely in C++.
]

will generate this:
將生成:

[Note] Note 備註

Prefer admonitions wherever appropriate.
在適當的時候應優先使用 警告。 

[table A Simple Table
[[Heading 1] [Heading 2] [Heading 3]]
[[R0-C0] [R0-C1] [R0-C2]]
[[R1-C0] [R1-C1] [R1-C2]]
[[R2-C0] [R2-C1] [R2-C2]]
]

will generate:
將生成:

Table 28.4. A Simple Table

Heading 1

Heading 2

Heading 3

R0-C0

R0-C1

R0-C2

R2-C0

R2-C1

R2-C2

R3-C0

R3-C1

R3-C2


The table title is optional. The first row of the table is automatically treated as the table header; that is, it is wrapped in <thead>...</thead> XML tags. Note that unlike the original QuickDoc, the columns are nested in [ cells... ]. The syntax is free-format and allows big cells to be formatted nicely. Example:
表格的標題是可選的。表格的第一行被自動視為表頭;即它將被包在 <thead>...</thead> XML 標籤中。注意,與原始的 QuickDoc 不同,列是嵌在 [ cells... ] 中的。語法是自由格式的,這樣較大的單元可以被格式化得更漂亮。例如:

[table Table with fat cells
[[Heading 1] [Heading 2]]
[
[Row 0, Col 0: a small cell]
[
Row 0, Col 1: a big fat cell with paragraphs

Boost provides free peer-reviewed portable C++ source libraries.

We emphasize libraries that work well with the C++ Standard Library.
Boost libraries are intended to be widely useful, and usable across
a broad spectrum of applications. The Boost license encourages both
commercial and non-commercial use.
]
]
[
[Row 1, Col 0: a small cell]
[Row 1, Col 1: a small cell]
]
]

and thus:
可得到:

Table 28.5. Table with fat cells

Heading 1

Heading 2

Row 0, Col 0: a small cell

Row 0, Col 1: a big fat cell with paragraphs

Boost provides free peer-reviewed portable C++ source libraries.

We emphasize libraries that work well with the C++ Standard Library. Boost libraries are intended to be widely useful, and usable across a broad spectrum of applications. The Boost license encourages both commercial and non-commercial use.

Row 1, Col 0: a small cell

Row 1, Col 1: a small cell


Here's how to have preformatted blocks of code in a table cell:
以下是如何將預格式化的代碼塊放入一個表格單元中:

[table Table with code
[[Comment] [Code]]
[
[My first program]
[``
#include <iostream>

int main()
{
std::cout << "Hello, World!" << std::endl;
return 0;
}
``]
]
]

Table 28.6. Table with code

Comment

Code

My first program

#include <iostream>

int main()
{
    std::cout << "Hello, World!" << std::endl;
    return 0;
}


[variablelist A Variable List
[[term 1] [The definition of term 1]]
[[term 2] [The definition of term 2]]
[[term 3] [
The definition of term 3.

Definitions may contain paragraphs.
]]
]

will generate:
將生成:

A Variable List

term 1

The definition of term 1

term 2

The definition of term 2

term 3

The definition of term 3.

Definitions may contain paragraphs.

The rules for variable lists are the same as for tables, except that only 2 "columns" are allowed. The first column contains the terms, and the second column contains the definitions. Those familiar with HTML will recognize this as a "definition list". 
變量列表的規則與表格相同,除了它只允許2個"列"。第一列包含術語,第二列包含定義。在 HTML 中與之類似的是 "定義列表"。

You can include one QuickBook file from another. The syntax is simply:
你可以在一個 QuickBook 文件中包含另一個。語法很簡單:

[include someother.qbk]

The included file will be processed as if it had been cut and pasted into the current document, with the following exceptions:
被包含的文件在處理時就像被剪切並粘貼到當前文檔中,除了以下例外的情況:

  • The __FILENAME__ predefined macro will reflect the name of the file currently being processed.
    __FILENAME__ 預定義宏表示的是當前正在處理的文件名。
  • Any macros defined in the included file are scoped to that file.
    在被包含文件中定義的所有宏均定域於該文件。

The [include] directive lets you specify a document id to use for the included file. When this id is not explicitly specified, the id defaults to the filename ("someother", in the example above). You can specify the id like this:
指示符 [include] 讓你指定一個文檔 id,用於被包含文件。在未明確指定該 id 時,id 缺省為文件名(在上例中即為 "someother")。你可以像以下這樣指定 id:

[include:someid someother.qbk]

All auto-generated anchors will use the document id as a unique prefix. So for instance, if there is a top section in someother.qbk named "Intro", the named anchor for that section will be "someid.intro", and you can link to it with [link someid.intro The Intro].
所有自動生成的錨都會將文檔 id 用作為唯一的前綴。所以在上例中,如果在 someother.qbk 中有一個名為 "Intro" 的頂層章節,則該章節的命名錨為 "someid.intro",你可以用 [link someid.intro The Intro] 來鏈接到它。

When documenting code, you'd surely need to present code from actual source files. While it is possible to copy some code and paste them in your QuickBook file, doing so is error prone and the extracted code in the documentation tends to get out of sync with the actual code as the code evolves. The problem, as always, is that once documentation is written, the tendency is for the docs to languish in the archives without maintenance.
在對代碼進行文檔化時,你肯定需要給出來自於實際源文件的代碼。雖然可以複製一些代碼並粘貼到你的 QuickBook 文件中,但是這樣做是很容易出錯的,並且隨著代碼的演變,從文檔中提取的代碼將會與實際代碼失去同步。一旦文檔寫好之後,這個問題始終是文檔維護的一種煎熬。

QuickBook's import facility provides a nice solution.
QuickBook 的導入機制提供了更好的解決方法。

Example 示例

You can effortlessly import code snippets from source code into your QuickBook. The following illustrates how this is done:
你可以毫不費力地從源代碼導入一些代碼片斷到你的 QuickBook 中。以下示範了如何做到這一點:

[import ../test/stub.cpp]
[foo]
[bar]

The first line:
第一行:

[import ../test/stub.cpp]

collects specially marked-up code snippets from stub.cpp and places them in your QuickBook file as virtual templates. Each of the specially marked-up code snippets has a name (e.g. foo and bar in the example above). This shall be the template identifier for that particular code snippet. The second and third line above does the actual template expansion:
stub.cpp 中收集特定的帶標記的代碼片斷,並將它們作為虛擬模板放在你的 QuickBook 文件中。每一個特定的帶標記代碼片斷都有一個名字(如上例中的 foobar)。該名字將作為相應代碼片斷的模板標識符。第二行和第三行進行實際的模板展開:

[foo]
[bar]

And the result is:
結果為:

This is the foo function.

This description can have paragraphs...

  • lists
  • etc.

And any quickbook block markup.

std::string foo()
{
    // return 'em, foo man!
return "foo"; }

This is the bar function

std::string bar()
{
    // return 'em, bar man!
return "bar"; }

Some trailing text here

Code Snippet Markup 代碼片斷標記

Note how the code snippets in stub.cpp get marked up. We use distinguishable comments following the form:
注意 stub.cpp 中的代碼片斷是如何進行標記的。我們使用以下格式的特殊註釋:

//[id
some code here //]

The first comment line above initiates a named code-snippet. This prefix will not be visible in quickbook. The entire code-snippet in between //[id and //] will be inserted as a template in quickbook with name id. The comment //] ends a code-snippet This too will not be visible in quickbook.
第一行註釋為一個命名代碼片斷的開始。該前綴在 quickbook 中是不可見的。在 //[id//] 之間的整個代碼片斷將被作為一個名為 id 的模板插入到 quickbook 中。註釋 //] 用於結束一個代碼片斷。它也是在 quickbook 中不可見的。

Special Comments 專用註釋

Special comments of the form:
專用註釋格式如下:

//` some [*quickbook] markup here

and:
和:

/*` some [*quickbook] markup here */

will be parsed by QuickBook. This can contain quickbook blocks (e.g. sections, paragraphs, tables, etc). In the first case, the initial slash-slash, tick and white-space shall be ignored. In the second, the initial slash-star-tick and the final star-slash shall be ignored.
它們將由 QuickBook 進行分析。它可以包含 quickbook (如:章節、段落、表格等)。在第一種格式中,開始的雙斜槓、勾號和空白都將被忽略。在第二種格式中,開始的斜槓-星號-勾號和結尾的星號-斜槓都將被忽略。

Special comments of the form:
以下格式的專用註釋:

/*<- this C++ comment will be ignored ->*/

or

/*<-*/ "this c++ code  will be ignored" /*->*/

or

//<-
private: int some_member; //->

can be used to inhibit code from passing through to quickbook. All text between the delimeters will simply be ignored.
可用於阻止其中的代碼傳遞給 quickbook。在分隔符之間的所有文本均被忽略。

Callouts 標注

Special comments of the form:
以下格式的專用註釋:

/*< some [*quickbook] markup here >*/

will be regarded as callouts. These will be collected, numbered and rendered as a "callout bug" (a small icon with a number). After the whole snippet is parsed, the callout list is generated. See Callouts for details. Example:
將被視作為標注。它將被收集、編號並處理為"標注圖標" (一個帶有數字的小圖標)。在整個片斷分析完後,將生成 callout 列表。詳情請見 Callouts。例如:

std::string foo_bar() 1
{
    return "foo-bar"; 2
}

1

The Mythical FooBar. See Foobar for details

2

return 'em, foo-bar man!

This is the actual code:
實際代碼是:

//[ foo_bar
std::string foo_bar() /*< The /Mythical/ FooBar.
See [@http://en.wikipedia.org/wiki/Foobar Foobar for details] >*/
{ return "foo-bar"; /*< return 'em, foo-bar man! >*/ } //]

The callouts bugs are placed exactly where the special callout comment is situated. It can be anywhere in the code. The bugs can be rather obtrusive, however. They get in the way of the clarity of the code. Another special callout comment style is available:
標注圖標被放置在專用標注註釋出現的地方。它可以在代碼中的任何位置。不過這些圖標真的很礙眼。它們妨礙了代碼的清晰性。這時可以用另一種專用的標注註釋風格:

/*<< some [*quickbook] markup here >>*/

This is the line-oriented version of the callout. With this, the "bug" is placed at the very left of the code block, away from the actual code. By placing it at the far left, the code is rendered un-obscured. Example:
這是面向行的標注。使用此標注,"圖標"將被放置在代碼塊的最左邊,遠離實際代碼。通過將它放在最左邊,代碼變得更清晰了。例如:

class x
{
public:

    1x() : n(0)
    {
    }

    2~x()
    {
    }

    3int get() const
    {
        return n; 
} 4void set(int n_) { n = n_; } };

1

Constructor

2

Destructor

3

Get the n member variable

4

Set the n member variable

See the actual code here: ../../tools/quickbook/test/stub.cpp
實際代碼請見:../../tools/quickbook/test/stub.cpp



[6] Thanks to David Barrett, author of Qwiki, for sharing these samples and teaching me these obscure formatting rules. I wasn't sure at all if Spirit, being more or less a formal EBNF parser, can handle the context sensitivity and ambiguity.

[7] A sample footnote

[8] Conditional Generation makes quickbook turing complete.


PrevUpHomeNext