summaryrefslogtreecommitdiffstats
path: root/src/boost/tools/quickbook/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/boost/tools/quickbook/test')
-rw-r--r--src/boost/tools/quickbook/test/Jamfile.v2173
-rw-r--r--src/boost/tools/quickbook/test/anchor-1_1.gold145
-rw-r--r--src/boost/tools/quickbook/test/anchor-1_1.gold-html205
-rw-r--r--src/boost/tools/quickbook/test/anchor-1_1.quickbook80
-rw-r--r--src/boost/tools/quickbook/test/anchor-1_6.gold151
-rw-r--r--src/boost/tools/quickbook/test/anchor-1_6.gold-html216
-rw-r--r--src/boost/tools/quickbook/test/anchor-1_6.quickbook88
-rw-r--r--src/boost/tools/quickbook/test/anchor-1_7.gold151
-rw-r--r--src/boost/tools/quickbook/test/anchor-1_7.gold-html217
-rw-r--r--src/boost/tools/quickbook/test/anchor-1_7.quickbook97
-rw-r--r--src/boost/tools/quickbook/test/blocks-1_5.gold111
-rw-r--r--src/boost/tools/quickbook/test/blocks-1_5.gold-html119
-rw-r--r--src/boost/tools/quickbook/test/blocks-1_5.quickbook46
-rw-r--r--src/boost/tools/quickbook/test/callouts-1_5.gold241
-rw-r--r--src/boost/tools/quickbook/test/callouts-1_5.gold-html276
-rw-r--r--src/boost/tools/quickbook/test/callouts-1_5.quickbook51
-rw-r--r--src/boost/tools/quickbook/test/callouts-1_7.gold249
-rw-r--r--src/boost/tools/quickbook/test/callouts-1_7.gold-html302
-rw-r--r--src/boost/tools/quickbook/test/callouts-1_7.quickbook73
-rw-r--r--src/boost/tools/quickbook/test/callouts.cpp52
-rw-r--r--src/boost/tools/quickbook/test/code-1_1.gold52
-rw-r--r--src/boost/tools/quickbook/test/code-1_1.gold-html91
-rw-r--r--src/boost/tools/quickbook/test/code-1_1.quickbook51
-rw-r--r--src/boost/tools/quickbook/test/code-1_5.gold37
-rw-r--r--src/boost/tools/quickbook/test/code-1_5.gold-html39
-rw-r--r--src/boost/tools/quickbook/test/code-1_5.quickbook29
-rw-r--r--src/boost/tools/quickbook/test/code_cpp-1_5.gold40
-rw-r--r--src/boost/tools/quickbook/test/code_cpp-1_5.gold-html43
-rw-r--r--src/boost/tools/quickbook/test/code_cpp-1_5.quickbook34
-rw-r--r--src/boost/tools/quickbook/test/code_cpp_mismatched_escape-1_4-fail.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/code_python-1_5.gold10
-rw-r--r--src/boost/tools/quickbook/test/code_python-1_5.gold-html13
-rw-r--r--src/boost/tools/quickbook/test/code_python-1_5.quickbook8
-rw-r--r--src/boost/tools/quickbook/test/code_python_mismatched_escape-1_4-fail.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/code_snippet-1_1.gold22
-rw-r--r--src/boost/tools/quickbook/test/code_snippet-1_1.gold-html39
-rw-r--r--src/boost/tools/quickbook/test/code_snippet-1_1.quickbook12
-rw-r--r--src/boost/tools/quickbook/test/code_teletype-1_5.gold12
-rw-r--r--src/boost/tools/quickbook/test/code_teletype-1_5.gold-html29
-rw-r--r--src/boost/tools/quickbook/test/code_teletype-1_5.quickbook13
-rw-r--r--src/boost/tools/quickbook/test/code_unclosed_block-1_6-fail.quickbook4
-rw-r--r--src/boost/tools/quickbook/test/command-line/Jamfile.v228
-rw-r--r--src/boost/tools/quickbook/test/command-line/basic-1_6.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/command-line/error-fail.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/command-line/error1.quickbook3
-rw-r--r--src/boost/tools/quickbook/test/command-line/error2.quickbook7
-rw-r--r--src/boost/tools/quickbook/test/command_line_macro-1_1.gold12
-rw-r--r--src/boost/tools/quickbook/test/command_line_macro-1_1.gold-html15
-rw-r--r--src/boost/tools/quickbook/test/command_line_macro-1_1.quickbook10
-rw-r--r--src/boost/tools/quickbook/test/cond_phrase-1_5.gold15
-rw-r--r--src/boost/tools/quickbook/test/cond_phrase-1_5.gold-html18
-rw-r--r--src/boost/tools/quickbook/test/cond_phrase-1_5.quickbook12
-rw-r--r--src/boost/tools/quickbook/test/cond_phrase-1_7.gold21
-rw-r--r--src/boost/tools/quickbook/test/cond_phrase-1_7.gold-html24
-rw-r--r--src/boost/tools/quickbook/test/cond_phrase-1_7.quickbook20
-rw-r--r--src/boost/tools/quickbook/test/doc-info/Jamfile.v238
-rw-r--r--src/boost/tools/quickbook/test/doc-info/author1.gold13
-rw-r--r--src/boost/tools/quickbook/test/doc-info/author1.gold-html14
-rw-r--r--src/boost/tools/quickbook/test/doc-info/author1.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/doc-info/author2.gold19
-rw-r--r--src/boost/tools/quickbook/test/doc-info/author2.gold-html20
-rw-r--r--src/boost/tools/quickbook/test/doc-info/author2.quickbook4
-rw-r--r--src/boost/tools/quickbook/test/doc-info/copyright-fail1.quickbook4
-rw-r--r--src/boost/tools/quickbook/test/doc-info/copyright-fail2.quickbook6
-rw-r--r--src/boost/tools/quickbook/test/doc-info/copyright1.gold17
-rw-r--r--src/boost/tools/quickbook/test/doc-info/copyright1.gold-html18
-rw-r--r--src/boost/tools/quickbook/test/doc-info/copyright1.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/doc-info/duplicates-1.1.gold35
-rw-r--r--src/boost/tools/quickbook/test/doc-info/duplicates-1.1.gold-html31
-rw-r--r--src/boost/tools/quickbook/test/doc-info/duplicates-1.1.quickbook23
-rw-r--r--src/boost/tools/quickbook/test/doc-info/duplicates-1.5.gold32
-rw-r--r--src/boost/tools/quickbook/test/doc-info/duplicates-1.5.gold-html28
-rw-r--r--src/boost/tools/quickbook/test/doc-info/duplicates-1.5.quickbook27
-rw-r--r--src/boost/tools/quickbook/test/doc-info/empty-attributes.gold19
-rw-r--r--src/boost/tools/quickbook/test/doc-info/empty-attributes.gold-html19
-rw-r--r--src/boost/tools/quickbook/test/doc-info/empty-attributes.quickbook16
-rw-r--r--src/boost/tools/quickbook/test/doc-info/empty_title-1_1.gold10
-rw-r--r--src/boost/tools/quickbook/test/doc-info/empty_title-1_1.gold-html26
-rw-r--r--src/boost/tools/quickbook/test/doc-info/empty_title-1_1.quickbook8
-rw-r--r--src/boost/tools/quickbook/test/doc-info/empty_title-1_5.gold10
-rw-r--r--src/boost/tools/quickbook/test/doc-info/empty_title-1_5.gold-html26
-rw-r--r--src/boost/tools/quickbook/test/doc-info/empty_title-1_5.quickbook7
-rw-r--r--src/boost/tools/quickbook/test/doc-info/empty_title-1_6.gold4
-rw-r--r--src/boost/tools/quickbook/test/doc-info/empty_title-1_6.gold-html6
-rw-r--r--src/boost/tools/quickbook/test/doc-info/empty_title-1_6.quickbook1
-rw-r--r--src/boost/tools/quickbook/test/doc-info/encode-1.5.gold26
-rw-r--r--src/boost/tools/quickbook/test/doc-info/encode-1.5.gold-html20
-rw-r--r--src/boost/tools/quickbook/test/doc-info/encode-1.5.quickbook14
-rw-r--r--src/boost/tools/quickbook/test/doc-info/escape-1.6.gold24
-rw-r--r--src/boost/tools/quickbook/test/doc-info/escape-1.6.gold-html20
-rw-r--r--src/boost/tools/quickbook/test/doc-info/escape-1.6.quickbook12
-rw-r--r--src/boost/tools/quickbook/test/doc-info/escaped_attributes1-1_7.gold16
-rw-r--r--src/boost/tools/quickbook/test/doc-info/escaped_attributes1-1_7.gold-html17
-rw-r--r--src/boost/tools/quickbook/test/doc-info/escaped_attributes1-1_7.quickbook11
-rw-r--r--src/boost/tools/quickbook/test/doc-info/escaped_attributes2-1_7.gold12
-rw-r--r--src/boost/tools/quickbook/test/doc-info/escaped_attributes2-1_7.gold-html14
-rw-r--r--src/boost/tools/quickbook/test/doc-info/escaped_attributes2-1_7.quickbook10
-rw-r--r--src/boost/tools/quickbook/test/doc-info/id1-1.5.gold27
-rw-r--r--src/boost/tools/quickbook/test/doc-info/id1-1.5.gold-html86
-rw-r--r--src/boost/tools/quickbook/test/doc-info/id1-1.5.quickbook21
-rw-r--r--src/boost/tools/quickbook/test/doc-info/id1-docinfo-no-id.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/doc-info/id1-no-docinfo.quickbook2
-rw-r--r--src/boost/tools/quickbook/test/doc-info/macros1-1_5.gold11
-rw-r--r--src/boost/tools/quickbook/test/doc-info/macros1-1_5.gold-html9
-rw-r--r--src/boost/tools/quickbook/test/doc-info/macros1-1_5.quickbook6
-rw-r--r--src/boost/tools/quickbook/test/doc-info/macros1-1_6.gold8
-rw-r--r--src/boost/tools/quickbook/test/doc-info/macros1-1_6.gold-html24
-rw-r--r--src/boost/tools/quickbook/test/doc-info/macros1-1_6.quickbook7
-rw-r--r--src/boost/tools/quickbook/test/doc-info/macros1-inc_1_6.quickbook4
-rw-r--r--src/boost/tools/quickbook/test/doc-info/missing_doc_info-1_6-fail.quickbook3
-rw-r--r--src/boost/tools/quickbook/test/doc-info/source-mode-1.4.gold33
-rw-r--r--src/boost/tools/quickbook/test/doc-info/source-mode-1.4.gold-html31
-rw-r--r--src/boost/tools/quickbook/test/doc-info/source-mode-1.4.quickbook17
-rw-r--r--src/boost/tools/quickbook/test/doc-info/source-mode-1.5.gold38
-rw-r--r--src/boost/tools/quickbook/test/doc-info/source-mode-1.5.gold-html37
-rw-r--r--src/boost/tools/quickbook/test/doc-info/source-mode-1.5.quickbook21
-rw-r--r--src/boost/tools/quickbook/test/doc-info/source-mode-1.6.gold42
-rw-r--r--src/boost/tools/quickbook/test/doc-info/source-mode-1.6.gold-html60
-rw-r--r--src/boost/tools/quickbook/test/doc-info/source-mode-1.6.quickbook21
-rw-r--r--src/boost/tools/quickbook/test/doc-info/source-mode-cpp-include.quickbook4
-rw-r--r--src/boost/tools/quickbook/test/doc-info/source-mode-python-include.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/doc-info/source-mode-teletype-include.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_1.gold9
-rw-r--r--src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_1.gold-html26
-rw-r--r--src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_1.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_6.gold9
-rw-r--r--src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_6.gold-html26
-rw-r--r--src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_6.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/elements-1_5.gold18
-rw-r--r--src/boost/tools/quickbook/test/elements-1_5.quickbook13
-rw-r--r--src/boost/tools/quickbook/test/elements-1_6.gold40
-rw-r--r--src/boost/tools/quickbook/test/elements-1_6.gold-html44
-rw-r--r--src/boost/tools/quickbook/test/elements-1_6.quickbook21
-rw-r--r--src/boost/tools/quickbook/test/empty-inc.quickbook0
-rw-r--r--src/boost/tools/quickbook/test/endsect-unopened-1_7-fail.quickbook6
-rw-r--r--src/boost/tools/quickbook/test/endsect-wrong-id-1_4-fail.quickbook6
-rw-r--r--src/boost/tools/quickbook/test/endsect-wrong-id-1_7-fail.quickbook6
-rw-r--r--src/boost/tools/quickbook/test/escape-1_1.gold32
-rw-r--r--src/boost/tools/quickbook/test/escape-1_1.gold-html48
-rw-r--r--src/boost/tools/quickbook/test/escape-1_1.quickbook34
-rw-r--r--src/boost/tools/quickbook/test/escape-1_6.gold32
-rw-r--r--src/boost/tools/quickbook/test/escape-1_6.gold-html48
-rw-r--r--src/boost/tools/quickbook/test/escape-1_6.quickbook35
-rw-r--r--src/boost/tools/quickbook/test/escape-mismatched-1_5-fail.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/footnotes-1_7.gold31
-rw-r--r--src/boost/tools/quickbook/test/footnotes-1_7.gold-html80
-rw-r--r--src/boost/tools/quickbook/test/footnotes-1_7.quickbook16
-rw-r--r--src/boost/tools/quickbook/test/heading-1_1.gold76
-rw-r--r--src/boost/tools/quickbook/test/heading-1_1.gold-html100
-rw-r--r--src/boost/tools/quickbook/test/heading-1_1.quickbook55
-rw-r--r--src/boost/tools/quickbook/test/heading-1_3.gold24
-rw-r--r--src/boost/tools/quickbook/test/heading-1_3.gold-html27
-rw-r--r--src/boost/tools/quickbook/test/heading-1_3.quickbook16
-rw-r--r--src/boost/tools/quickbook/test/heading-1_5.gold87
-rw-r--r--src/boost/tools/quickbook/test/heading-1_5.gold-html100
-rw-r--r--src/boost/tools/quickbook/test/heading-1_5.quickbook57
-rw-r--r--src/boost/tools/quickbook/test/heading-1_6.gold109
-rw-r--r--src/boost/tools/quickbook/test/heading-1_6.gold-html139
-rw-r--r--src/boost/tools/quickbook/test/heading-1_6.quickbook80
-rw-r--r--src/boost/tools/quickbook/test/heading-1_7.gold113
-rw-r--r--src/boost/tools/quickbook/test/heading-1_7.gold-html142
-rw-r--r--src/boost/tools/quickbook/test/heading-1_7.quickbook83
-rw-r--r--src/boost/tools/quickbook/test/heading_unclosed-1_4-fail.quickbook3
-rw-r--r--src/boost/tools/quickbook/test/hr-1_5.gold34
-rw-r--r--src/boost/tools/quickbook/test/hr-1_5.gold-html45
-rw-r--r--src/boost/tools/quickbook/test/hr-1_5.quickbook27
-rw-r--r--src/boost/tools/quickbook/test/hr-1_6.gold39
-rw-r--r--src/boost/tools/quickbook/test/hr-1_6.gold-html49
-rw-r--r--src/boost/tools/quickbook/test/hr-1_6.quickbook26
-rw-r--r--src/boost/tools/quickbook/test/html/images/open_clipart_library_logo.svg143
-rw-r--r--src/boost/tools/quickbook/test/identifier-1_5.gold610
-rw-r--r--src/boost/tools/quickbook/test/identifier-1_5.gold-html421
-rw-r--r--src/boost/tools/quickbook/test/identifier-1_5.quickbook148
-rw-r--r--src/boost/tools/quickbook/test/identifier-1_6.gold609
-rw-r--r--src/boost/tools/quickbook/test/identifier-1_6.gold-html421
-rw-r--r--src/boost/tools/quickbook/test/identifier-1_6.quickbook148
-rw-r--r--src/boost/tools/quickbook/test/image-1_5.gold64
-rw-r--r--src/boost/tools/quickbook/test/image-1_5.gold-html26
-rw-r--r--src/boost/tools/quickbook/test/image-1_5.quickbook19
-rw-r--r--src/boost/tools/quickbook/test/image-1_6.gold51
-rw-r--r--src/boost/tools/quickbook/test/image-1_6.gold-html32
-rw-r--r--src/boost/tools/quickbook/test/image-1_6.quickbook23
-rw-r--r--src/boost/tools/quickbook/test/import-1_1-fail.quickbook8
-rw-r--r--src/boost/tools/quickbook/test/include-1_1-fail.quickbook8
-rw-r--r--src/boost/tools/quickbook/test/include-1_5.gold30
-rw-r--r--src/boost/tools/quickbook/test/include-1_5.gold-html61
-rw-r--r--src/boost/tools/quickbook/test/include-1_5.quickbook17
-rw-r--r--src/boost/tools/quickbook/test/include-1_6.gold30
-rw-r--r--src/boost/tools/quickbook/test/include-1_6.gold-html61
-rw-r--r--src/boost/tools/quickbook/test/include-1_6.quickbook15
-rw-r--r--src/boost/tools/quickbook/test/include-1_7.gold36
-rw-r--r--src/boost/tools/quickbook/test/include-1_7.gold-html74
-rw-r--r--src/boost/tools/quickbook/test/include-1_7.quickbook18
-rw-r--r--src/boost/tools/quickbook/test/include-inc-1_5.quickbook6
-rw-r--r--src/boost/tools/quickbook/test/include-inc.quickbook9
-rw-r--r--src/boost/tools/quickbook/test/include/Jamfile.v248
-rw-r--r--src/boost/tools/quickbook/test/include/code-import.gold138
-rw-r--r--src/boost/tools/quickbook/test/include/code-import.gold-html148
-rw-r--r--src/boost/tools/quickbook/test/include/code-import.quickbook13
-rw-r--r--src/boost/tools/quickbook/test/include/code-include.gold50
-rw-r--r--src/boost/tools/quickbook/test/include/code-include.gold-html55
-rw-r--r--src/boost/tools/quickbook/test/include/code-include.quickbook16
-rw-r--r--src/boost/tools/quickbook/test/include/compatibility-1_1.gold362
-rw-r--r--src/boost/tools/quickbook/test/include/compatibility-1_1.gold-html424
-rw-r--r--src/boost/tools/quickbook/test/include/compatibility-1_1.quickbook18
-rw-r--r--src/boost/tools/quickbook/test/include/compatibility-1_5.gold362
-rw-r--r--src/boost/tools/quickbook/test/include/compatibility-1_5.gold-html424
-rw-r--r--src/boost/tools/quickbook/test/include/compatibility-1_5.quickbook18
-rw-r--r--src/boost/tools/quickbook/test/include/compatibility-1_6.gold362
-rw-r--r--src/boost/tools/quickbook/test/include/compatibility-1_6.gold-html424
-rw-r--r--src/boost/tools/quickbook/test/include/compatibility-1_6.quickbook17
-rw-r--r--src/boost/tools/quickbook/test/include/compatibility-inc.quickbook31
-rw-r--r--src/boost/tools/quickbook/test/include/compatibility-inc_1_1.quickbook33
-rw-r--r--src/boost/tools/quickbook/test/include/compatibility-inc_1_5.quickbook33
-rw-r--r--src/boost/tools/quickbook/test/include/compatibility-inc_1_6.quickbook33
-rw-r--r--src/boost/tools/quickbook/test/include/doc-title1-1.5.gold27
-rw-r--r--src/boost/tools/quickbook/test/include/doc-title1-1.5.gold-html30
-rw-r--r--src/boost/tools/quickbook/test/include/doc-title1-1.5.quickbook27
-rw-r--r--src/boost/tools/quickbook/test/include/doc-title1-inc1.quickbook1
-rw-r--r--src/boost/tools/quickbook/test/include/doc-title1-inc2.quickbook4
-rw-r--r--src/boost/tools/quickbook/test/include/doc-title1-inc3.quickbook1
-rw-r--r--src/boost/tools/quickbook/test/include/doc-title1a-1.5.gold26
-rw-r--r--src/boost/tools/quickbook/test/include/doc-title1a-1.5.gold-html30
-rw-r--r--src/boost/tools/quickbook/test/include/doc-title1a-1.5.quickbook20
-rw-r--r--src/boost/tools/quickbook/test/include/filename-1_7.gold46
-rw-r--r--src/boost/tools/quickbook/test/include/filename-1_7.gold-html45
-rw-r--r--src/boost/tools/quickbook/test/include/filename-1_7.quickbook21
-rw-r--r--src/boost/tools/quickbook/test/include/filename-path.gold18
-rw-r--r--src/boost/tools/quickbook/test/include/filename-path.gold-html21
-rw-r--r--src/boost/tools/quickbook/test/include/filename-path.quickbook9
-rw-r--r--src/boost/tools/quickbook/test/include/filename.gold18
-rw-r--r--src/boost/tools/quickbook/test/include/filename.gold-html21
-rw-r--r--src/boost/tools/quickbook/test/include/filename.quickbook9
-rw-r--r--src/boost/tools/quickbook/test/include/filename_include2.quickbook1
-rw-r--r--src/boost/tools/quickbook/test/include/filename_path-1_7.gold18
-rw-r--r--src/boost/tools/quickbook/test/include/filename_path-1_7.gold-html21
-rw-r--r--src/boost/tools/quickbook/test/include/filename_path-1_7.quickbook7
-rw-r--r--src/boost/tools/quickbook/test/include/glob-1_7.gold41
-rw-r--r--src/boost/tools/quickbook/test/include/glob-1_7.gold-html94
-rw-r--r--src/boost/tools/quickbook/test/include/glob-1_7.quickbook39
-rw-r--r--src/boost/tools/quickbook/test/include/glob1/a.qbk1
-rw-r--r--src/boost/tools/quickbook/test/include/glob1/glob1-1/b.qbk1
-rw-r--r--src/boost/tools/quickbook/test/include/glob2/a.qbk3
-rw-r--r--src/boost/tools/quickbook/test/include/glob2/glob2-1/b.qbk1
-rw-r--r--src/boost/tools/quickbook/test/include/import-basic-1.6.gold11
-rw-r--r--src/boost/tools/quickbook/test/include/import-basic-1.6.gold-html15
-rw-r--r--src/boost/tools/quickbook/test/include/import-basic-1.6.quickbook12
-rw-r--r--src/boost/tools/quickbook/test/include/import-basic-inc1.quickbook4
-rw-r--r--src/boost/tools/quickbook/test/include/import-basic-inc2.quickbook10
-rw-r--r--src/boost/tools/quickbook/test/include/in_section-1_5.gold88
-rw-r--r--src/boost/tools/quickbook/test/include/in_section-1_5.gold-html120
-rw-r--r--src/boost/tools/quickbook/test/include/in_section-1_5.quickbook16
-rw-r--r--src/boost/tools/quickbook/test/include/in_section-1_6.gold108
-rw-r--r--src/boost/tools/quickbook/test/include/in_section-1_6.gold-html238
-rw-r--r--src/boost/tools/quickbook/test/include/in_section-1_6.quickbook16
-rw-r--r--src/boost/tools/quickbook/test/include/in_section-inc1.quickbook13
-rw-r--r--src/boost/tools/quickbook/test/include/in_section-inc2.quickbook14
-rw-r--r--src/boost/tools/quickbook/test/include/include-id-1.5.gold26
-rw-r--r--src/boost/tools/quickbook/test/include/include-id-1.5.gold-html27
-rw-r--r--src/boost/tools/quickbook/test/include/include-id-1.5.quickbook10
-rw-r--r--src/boost/tools/quickbook/test/include/include-id-1.6.gold36
-rw-r--r--src/boost/tools/quickbook/test/include/include-id-1.6.gold-html66
-rw-r--r--src/boost/tools/quickbook/test/include/include-id-1.6.quickbook10
-rw-r--r--src/boost/tools/quickbook/test/include/include-id-inc1.quickbook1
-rw-r--r--src/boost/tools/quickbook/test/include/include-id-inc2.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/include/include-id-inc3.quickbook6
-rw-r--r--src/boost/tools/quickbook/test/include/include_id_unbalanced-1_6.gold59
-rw-r--r--src/boost/tools/quickbook/test/include/include_id_unbalanced-1_6.gold-html89
-rw-r--r--src/boost/tools/quickbook/test/include/include_id_unbalanced-1_6.quickbook19
-rw-r--r--src/boost/tools/quickbook/test/include/include_id_unbalanced-inc1.quickbook4
-rw-r--r--src/boost/tools/quickbook/test/include/include_id_unbalanced-inc1a.quickbook3
-rw-r--r--src/boost/tools/quickbook/test/include/include_id_unbalanced-inc2.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/include/include_id_unbalanced-inc2a.quickbook3
-rw-r--r--src/boost/tools/quickbook/test/include/macros-1.5.gold39
-rw-r--r--src/boost/tools/quickbook/test/include/macros-1.5.gold-html42
-rw-r--r--src/boost/tools/quickbook/test/include/macros-1.5.quickbook13
-rw-r--r--src/boost/tools/quickbook/test/include/macros-1.6.gold66
-rw-r--r--src/boost/tools/quickbook/test/include/macros-1.6.gold-html69
-rw-r--r--src/boost/tools/quickbook/test/include/macros-1.6.quickbook21
-rw-r--r--src/boost/tools/quickbook/test/include/macros-inc1.quickbook15
-rw-r--r--src/boost/tools/quickbook/test/include/nested_compatibility-1_5.gold48
-rw-r--r--src/boost/tools/quickbook/test/include/nested_compatibility-1_5.gold-html76
-rw-r--r--src/boost/tools/quickbook/test/include/nested_compatibility-1_5.quickbook12
-rw-r--r--src/boost/tools/quickbook/test/include/nested_compatibility-1_6.gold48
-rw-r--r--src/boost/tools/quickbook/test/include/nested_compatibility-1_6.gold-html76
-rw-r--r--src/boost/tools/quickbook/test/include/nested_compatibility-1_6.quickbook12
-rw-r--r--src/boost/tools/quickbook/test/include/nested_compatibility-inc-1_5.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/include/nested_compatibility-inc-1_6.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/include/section-fail1.quickbook6
-rw-r--r--src/boost/tools/quickbook/test/include/section-fail2.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/include/section-inc1.quickbook1
-rw-r--r--src/boost/tools/quickbook/test/include/section-inc2.quickbook1
-rw-r--r--src/boost/tools/quickbook/test/include/section-unclosed.gold10
-rw-r--r--src/boost/tools/quickbook/test/include/section-unclosed.gold-html26
-rw-r--r--src/boost/tools/quickbook/test/include/section-unclosed.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/include/section.gold10
-rw-r--r--src/boost/tools/quickbook/test/include/section.gold-html26
-rw-r--r--src/boost/tools/quickbook/test/include/section.quickbook6
-rw-r--r--src/boost/tools/quickbook/test/include/source_mode-1_5.gold9
-rw-r--r--src/boost/tools/quickbook/test/include/source_mode-1_5.gold-html12
-rw-r--r--src/boost/tools/quickbook/test/include/source_mode-1_5.quickbook4
-rw-r--r--src/boost/tools/quickbook/test/include/source_mode-1_6.gold13
-rw-r--r--src/boost/tools/quickbook/test/include/source_mode-1_6.gold-html27
-rw-r--r--src/boost/tools/quickbook/test/include/source_mode-1_6.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/include/source_mode-inc1.quickbook3
-rw-r--r--src/boost/tools/quickbook/test/include/source_mode-inc2.quickbook3
-rw-r--r--src/boost/tools/quickbook/test/include/sub/filename_include1.quickbook3
-rw-r--r--src/boost/tools/quickbook/test/include/template_include-1_7.gold12
-rw-r--r--src/boost/tools/quickbook/test/include/template_include-1_7.gold-html14
-rw-r--r--src/boost/tools/quickbook/test/include/template_include-1_7.quickbook8
-rw-r--r--src/boost/tools/quickbook/test/include/templates-1.5.gold12
-rw-r--r--src/boost/tools/quickbook/test/include/templates-1.5.gold-html15
-rw-r--r--src/boost/tools/quickbook/test/include/templates-1.5.quickbook7
-rw-r--r--src/boost/tools/quickbook/test/include/templates-1.6.gold15
-rw-r--r--src/boost/tools/quickbook/test/include/templates-1.6.gold-html18
-rw-r--r--src/boost/tools/quickbook/test/include/templates-1.6.quickbook11
-rw-r--r--src/boost/tools/quickbook/test/include/templates-inc1.quickbook4
-rw-r--r--src/boost/tools/quickbook/test/include2-1_6.gold22
-rw-r--r--src/boost/tools/quickbook/test/include2-1_6.gold-html50
-rw-r--r--src/boost/tools/quickbook/test/include2-1_6.quickbook8
-rw-r--r--src/boost/tools/quickbook/test/include_invalid_path1-1_7-fail.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/include_invalid_path2-1_7-fail.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/include_invalid_path3-1_7-fail.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/include_unicode_glob-1_7-fail.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/include_win_path-1_6-fail.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/link-1_1.gold45
-rw-r--r--src/boost/tools/quickbook/test/link-1_1.gold-html68
-rw-r--r--src/boost/tools/quickbook/test/link-1_1.quickbook48
-rw-r--r--src/boost/tools/quickbook/test/link-1_6.gold49
-rw-r--r--src/boost/tools/quickbook/test/link-1_6.gold-html71
-rw-r--r--src/boost/tools/quickbook/test/link-1_6.quickbook52
-rw-r--r--src/boost/tools/quickbook/test/link-1_7-fail.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/link-1_7-fail2.quickbook6
-rw-r--r--src/boost/tools/quickbook/test/link-1_7.gold56
-rw-r--r--src/boost/tools/quickbook/test/link-1_7.gold-html84
-rw-r--r--src/boost/tools/quickbook/test/link-1_7.quickbook61
-rw-r--r--src/boost/tools/quickbook/test/list_test-1_5.gold402
-rw-r--r--src/boost/tools/quickbook/test/list_test-1_5.gold-html432
-rw-r--r--src/boost/tools/quickbook/test/list_test-1_5.quickbook108
-rw-r--r--src/boost/tools/quickbook/test/list_test-1_6-fail.quickbook46
-rw-r--r--src/boost/tools/quickbook/test/list_test-1_6.gold450
-rw-r--r--src/boost/tools/quickbook/test/list_test-1_6.gold-html480
-rw-r--r--src/boost/tools/quickbook/test/list_test-1_6.quickbook120
-rw-r--r--src/boost/tools/quickbook/test/list_test-1_7-fail1.quickbook9
-rw-r--r--src/boost/tools/quickbook/test/list_test-1_7.gold479
-rw-r--r--src/boost/tools/quickbook/test/list_test-1_7.gold-html507
-rw-r--r--src/boost/tools/quickbook/test/list_test-1_7.quickbook134
-rw-r--r--src/boost/tools/quickbook/test/macro-1_5.gold26
-rw-r--r--src/boost/tools/quickbook/test/macro-1_5.gold-html30
-rw-r--r--src/boost/tools/quickbook/test/macro-1_5.quickbook34
-rw-r--r--src/boost/tools/quickbook/test/macro-1_6.gold26
-rw-r--r--src/boost/tools/quickbook/test/macro-1_6.gold-html30
-rw-r--r--src/boost/tools/quickbook/test/macro-1_6.quickbook34
-rw-r--r--src/boost/tools/quickbook/test/mismatched_brackets-1_1-fail.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/mismatched_brackets1-1_1.gold12
-rw-r--r--src/boost/tools/quickbook/test/mismatched_brackets1-1_1.gold-html15
-rw-r--r--src/boost/tools/quickbook/test/mismatched_brackets1-1_1.quickbook7
-rw-r--r--src/boost/tools/quickbook/test/mismatched_brackets1-1_7.quickbook8
-rw-r--r--src/boost/tools/quickbook/test/mismatched_brackets2-1_1.gold9
-rw-r--r--src/boost/tools/quickbook/test/mismatched_brackets2-1_1.gold-html12
-rw-r--r--src/boost/tools/quickbook/test/mismatched_brackets2-1_1.quickbook7
-rw-r--r--src/boost/tools/quickbook/test/mismatched_brackets3-1_1.gold12
-rw-r--r--src/boost/tools/quickbook/test/mismatched_brackets3-1_1.gold-html29
-rw-r--r--src/boost/tools/quickbook/test/mismatched_brackets3-1_1.quickbook6
-rw-r--r--src/boost/tools/quickbook/test/newline-1_1.gold24
-rw-r--r--src/boost/tools/quickbook/test/newline-1_1.gold-html27
-rw-r--r--src/boost/tools/quickbook/test/newline-1_1.quickbook10
-rw-r--r--src/boost/tools/quickbook/test/para_test-1_5.gold75
-rw-r--r--src/boost/tools/quickbook/test/para_test-1_5.gold-html97
-rw-r--r--src/boost/tools/quickbook/test/para_test-1_5.quickbook81
-rw-r--r--src/boost/tools/quickbook/test/post_process-fail.quickbook3
-rw-r--r--src/boost/tools/quickbook/test/preformatted-1_1.gold40
-rw-r--r--src/boost/tools/quickbook/test/preformatted-1_1.gold-html58
-rw-r--r--src/boost/tools/quickbook/test/preformatted-1_1.quickbook32
-rw-r--r--src/boost/tools/quickbook/test/preformatted-1_6.gold40
-rw-r--r--src/boost/tools/quickbook/test/preformatted-1_6.gold-html58
-rw-r--r--src/boost/tools/quickbook/test/preformatted-1_6.quickbook33
-rw-r--r--src/boost/tools/quickbook/test/python/include_glob.qbk11
-rw-r--r--src/boost/tools/quickbook/test/python/include_glob_deps.txt6
-rw-r--r--src/boost/tools/quickbook/test/python/include_glob_locs.txt9
-rw-r--r--src/boost/tools/quickbook/test/python/include_path.qbk12
-rw-r--r--src/boost/tools/quickbook/test/python/include_path_deps.txt6
-rw-r--r--src/boost/tools/quickbook/test/python/include_path_locs.txt9
-rw-r--r--src/boost/tools/quickbook/test/python/missing_relative.qbk14
-rw-r--r--src/boost/tools/quickbook/test/python/missing_relative_deps.txt4
-rw-r--r--src/boost/tools/quickbook/test/python/missing_relative_locs.txt7
-rw-r--r--src/boost/tools/quickbook/test/python/run_tests.py191
-rw-r--r--src/boost/tools/quickbook/test/python/simple.qbk23
-rw-r--r--src/boost/tools/quickbook/test/python/simple.xml36
-rw-r--r--src/boost/tools/quickbook/test/python/simple_custom_pretty_print.xml42
-rw-r--r--src/boost/tools/quickbook/test/python/simple_no_pretty_print.xml36
-rw-r--r--src/boost/tools/quickbook/test/python/simple_no_self_linked.xml36
-rw-r--r--src/boost/tools/quickbook/test/python/sub1/a.qbk9
-rw-r--r--src/boost/tools/quickbook/test/python/sub2/b.qbk9
-rw-r--r--src/boost/tools/quickbook/test/python/svg_missing.qbk11
-rw-r--r--src/boost/tools/quickbook/test/python/svg_missing_deps.txt4
-rw-r--r--src/boost/tools/quickbook/test/python/svg_missing_locs.txt5
-rw-r--r--src/boost/tools/quickbook/test/quickbook-testing.jam185
-rw-r--r--src/boost/tools/quickbook/test/quickbook_manual-1_4.gold3945
-rw-r--r--src/boost/tools/quickbook/test/quickbook_manual-1_4.gold-html4177
-rw-r--r--src/boost/tools/quickbook/test/quickbook_manual-1_4.quickbook1981
-rw-r--r--src/boost/tools/quickbook/test/regen-gold.sh47
-rw-r--r--src/boost/tools/quickbook/test/role-1_6.gold9
-rw-r--r--src/boost/tools/quickbook/test/role-1_6.gold-html12
-rw-r--r--src/boost/tools/quickbook/test/role-1_6.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/role-1_7-fail.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/role-1_7.gold13
-rw-r--r--src/boost/tools/quickbook/test/role-1_7.gold-html16
-rw-r--r--src/boost/tools/quickbook/test/role-1_7.quickbook13
-rw-r--r--src/boost/tools/quickbook/test/section-1_4.gold20
-rw-r--r--src/boost/tools/quickbook/test/section-1_4.gold-html58
-rw-r--r--src/boost/tools/quickbook/test/section-1_4.quickbook12
-rw-r--r--src/boost/tools/quickbook/test/section-1_5-unclosed.gold10
-rw-r--r--src/boost/tools/quickbook/test/section-1_5-unclosed.gold-html27
-rw-r--r--src/boost/tools/quickbook/test/section-1_5-unclosed.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/section-1_5.gold19
-rw-r--r--src/boost/tools/quickbook/test/section-1_5.gold-html57
-rw-r--r--src/boost/tools/quickbook/test/section-1_5.quickbook12
-rw-r--r--src/boost/tools/quickbook/test/section-1_7.gold32
-rw-r--r--src/boost/tools/quickbook/test/section-1_7.gold-html100
-rw-r--r--src/boost/tools/quickbook/test/section-1_7.quickbook23
-rw-r--r--src/boost/tools/quickbook/test/simple_markup-1_5.gold58
-rw-r--r--src/boost/tools/quickbook/test/simple_markup-1_5.gold-html75
-rw-r--r--src/boost/tools/quickbook/test/simple_markup-1_5.quickbook42
-rw-r--r--src/boost/tools/quickbook/test/snippets/Jamfile.v218
-rw-r--r--src/boost/tools/quickbook/test/snippets/pass_thru.cpp33
-rw-r--r--src/boost/tools/quickbook/test/snippets/pass_thru.gold35
-rw-r--r--src/boost/tools/quickbook/test/snippets/pass_thru.gold-html38
-rw-r--r--src/boost/tools/quickbook/test/snippets/pass_thru.py13
-rw-r--r--src/boost/tools/quickbook/test/snippets/pass_thru.quickbook12
-rw-r--r--src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.gold10
-rw-r--r--src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.gold-html13
-rw-r--r--src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.quickbook8
-rw-r--r--src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_6-fail.quickbook7
-rw-r--r--src/boost/tools/quickbook/test/snippets/unbalanced_snippet1.cpp11
-rw-r--r--src/boost/tools/quickbook/test/snippets/unbalanced_snippet2-1_6-fail.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/snippets/unbalanced_snippet2.cpp9
-rw-r--r--src/boost/tools/quickbook/test/source_mode-1_7.gold63
-rw-r--r--src/boost/tools/quickbook/test/source_mode-1_7.gold-html80
-rw-r--r--src/boost/tools/quickbook/test/source_mode-1_7.quickbook24
-rw-r--r--src/boost/tools/quickbook/test/src/text_diff.cpp96
-rw-r--r--src/boost/tools/quickbook/test/stray_close_bracket-1_1.gold9
-rw-r--r--src/boost/tools/quickbook/test/stray_close_bracket-1_1.gold-html12
-rw-r--r--src/boost/tools/quickbook/test/stray_close_bracket-1_1.quickbook3
-rw-r--r--src/boost/tools/quickbook/test/stray_close_bracket-1_7-fail.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/stub.c32
-rw-r--r--src/boost/tools/quickbook/test/stub.cpp86
-rw-r--r--src/boost/tools/quickbook/test/stub.py27
-rw-r--r--src/boost/tools/quickbook/test/svg-1_1.gold18
-rw-r--r--src/boost/tools/quickbook/test/svg-1_1.gold-html14
-rw-r--r--src/boost/tools/quickbook/test/svg-1_1.quickbook4
-rw-r--r--src/boost/tools/quickbook/test/table-1_3.gold351
-rw-r--r--src/boost/tools/quickbook/test/table-1_3.gold-html368
-rw-r--r--src/boost/tools/quickbook/test/table-1_3.quickbook113
-rw-r--r--src/boost/tools/quickbook/test/table-1_5.gold442
-rw-r--r--src/boost/tools/quickbook/test/table-1_5.gold-html459
-rw-r--r--src/boost/tools/quickbook/test/table-1_5.quickbook133
-rw-r--r--src/boost/tools/quickbook/test/table-1_6.gold478
-rw-r--r--src/boost/tools/quickbook/test/table-1_6.gold-html496
-rw-r--r--src/boost/tools/quickbook/test/table-1_6.quickbook134
-rw-r--r--src/boost/tools/quickbook/test/table-1_7.gold520
-rw-r--r--src/boost/tools/quickbook/test/table-1_7.gold-html538
-rw-r--r--src/boost/tools/quickbook/test/table-1_7.quickbook151
-rw-r--r--src/boost/tools/quickbook/test/template_arguments1-1_1-fail.quickbook10
-rw-r--r--src/boost/tools/quickbook/test/template_arguments1-1_5-fail.quickbook11
-rw-r--r--src/boost/tools/quickbook/test/template_arguments2-1_1-fail.quickbook10
-rw-r--r--src/boost/tools/quickbook/test/template_arguments2-1_5-fail.quickbook6
-rw-r--r--src/boost/tools/quickbook/test/template_arguments3-1_1-fail.quickbook10
-rw-r--r--src/boost/tools/quickbook/test/template_arguments3-1_5-fail.quickbook11
-rw-r--r--src/boost/tools/quickbook/test/template_section-1_5.gold22
-rw-r--r--src/boost/tools/quickbook/test/template_section-1_5.gold-html38
-rw-r--r--src/boost/tools/quickbook/test/template_section-1_5.quickbook20
-rw-r--r--src/boost/tools/quickbook/test/template_section1-1_5-fail.quickbook9
-rw-r--r--src/boost/tools/quickbook/test/template_section2-1_5-fail.quickbook10
-rw-r--r--src/boost/tools/quickbook/test/template_section3-1_5-fail.quickbook9
-rw-r--r--src/boost/tools/quickbook/test/templates-1_3.gold192
-rw-r--r--src/boost/tools/quickbook/test/templates-1_3.gold-html240
-rw-r--r--src/boost/tools/quickbook/test/templates-1_3.quickbook216
-rw-r--r--src/boost/tools/quickbook/test/templates-1_4.gold28
-rw-r--r--src/boost/tools/quickbook/test/templates-1_4.gold-html45
-rw-r--r--src/boost/tools/quickbook/test/templates-1_4.quickbook53
-rw-r--r--src/boost/tools/quickbook/test/templates-1_5.gold239
-rw-r--r--src/boost/tools/quickbook/test/templates-1_5.gold-html308
-rw-r--r--src/boost/tools/quickbook/test/templates-1_5.quickbook297
-rw-r--r--src/boost/tools/quickbook/test/templates-1_6-fail1.quickbook8
-rw-r--r--src/boost/tools/quickbook/test/templates-1_6.gold257
-rw-r--r--src/boost/tools/quickbook/test/templates-1_6.gold-html332
-rw-r--r--src/boost/tools/quickbook/test/templates-1_6.quickbook313
-rw-r--r--src/boost/tools/quickbook/test/templates-1_7-fail1.quickbook12
-rw-r--r--src/boost/tools/quickbook/test/templates-1_7-fail2.quickbook11
-rw-r--r--src/boost/tools/quickbook/test/templates-1_7.gold302
-rw-r--r--src/boost/tools/quickbook/test/templates-1_7.gold-html377
-rw-r--r--src/boost/tools/quickbook/test/templates-1_7.quickbook322
-rw-r--r--src/boost/tools/quickbook/test/unicode_escape-1_5.gold156
-rw-r--r--src/boost/tools/quickbook/test/unicode_escape-1_5.gold-html159
-rw-r--r--src/boost/tools/quickbook/test/unicode_escape-1_5.quickbook37
-rw-r--r--src/boost/tools/quickbook/test/unit/Jamfile.v231
-rw-r--r--src/boost/tools/quickbook/test/unit/cleanup_test.cpp80
-rw-r--r--src/boost/tools/quickbook/test/unit/glob_test.cpp163
-rw-r--r--src/boost/tools/quickbook/test/unit/path_test.cpp189
-rw-r--r--src/boost/tools/quickbook/test/unit/post_process_test.cpp27
-rw-r--r--src/boost/tools/quickbook/test/unit/source_map_test.cpp444
-rw-r--r--src/boost/tools/quickbook/test/unit/symbols_find_null.cpp36
-rw-r--r--src/boost/tools/quickbook/test/unit/symbols_tests.cpp374
-rw-r--r--src/boost/tools/quickbook/test/unit/utils_test.cpp67
-rw-r--r--src/boost/tools/quickbook/test/unit/values_test.cpp128
-rw-r--r--src/boost/tools/quickbook/test/unmatched_element-1_5.gold12
-rw-r--r--src/boost/tools/quickbook/test/unmatched_element-1_5.gold-html15
-rw-r--r--src/boost/tools/quickbook/test/unmatched_element-1_5.quickbook12
-rw-r--r--src/boost/tools/quickbook/test/unmatched_element-1_6.gold12
-rw-r--r--src/boost/tools/quickbook/test/unmatched_element-1_6.gold-html15
-rw-r--r--src/boost/tools/quickbook/test/unmatched_element-1_6.quickbook12
-rw-r--r--src/boost/tools/quickbook/test/utf16be_bom-1_5-fail.quickbookbin0 -> 664 bytes
-rw-r--r--src/boost/tools/quickbook/test/utf16le_bom-1_5-fail.quickbookbin0 -> 664 bytes
-rw-r--r--src/boost/tools/quickbook/test/utf8-1_5.gold130
-rw-r--r--src/boost/tools/quickbook/test/utf8-1_5.gold-html134
-rw-r--r--src/boost/tools/quickbook/test/utf8-1_5.quickbook30
-rw-r--r--src/boost/tools/quickbook/test/utf8_bom-1_5.gold130
-rw-r--r--src/boost/tools/quickbook/test/utf8_bom-1_5.gold-html134
-rw-r--r--src/boost/tools/quickbook/test/utf8_bom-1_5.quickbook30
-rw-r--r--src/boost/tools/quickbook/test/variablelist-1_5-fail.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/variablelist-1_5.gold107
-rw-r--r--src/boost/tools/quickbook/test/variablelist-1_5.gold-html103
-rw-r--r--src/boost/tools/quickbook/test/variablelist-1_5.quickbook30
-rw-r--r--src/boost/tools/quickbook/test/version-0_1-fail.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/version-1_8-fail.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/version-2_0-fail.quickbook5
-rw-r--r--src/boost/tools/quickbook/test/versions/Jamfile.v219
-rw-r--r--src/boost/tools/quickbook/test/versions/invalid_macro-1_6.gold36
-rw-r--r--src/boost/tools/quickbook/test/versions/invalid_macro-1_6.gold-html39
-rw-r--r--src/boost/tools/quickbook/test/versions/invalid_macro-1_6.quickbook14
-rw-r--r--src/boost/tools/quickbook/test/versions/invalid_macro-inc-1_1.quickbook7
-rw-r--r--src/boost/tools/quickbook/test/versions/templates-inc-1_1.quickbook15
-rw-r--r--src/boost/tools/quickbook/test/versions/templates-inc-1_4.quickbook20
-rw-r--r--src/boost/tools/quickbook/test/versions/templates-inc-1_5.quickbook19
-rw-r--r--src/boost/tools/quickbook/test/versions/versions-1_6.gold114
-rw-r--r--src/boost/tools/quickbook/test/versions/versions-1_6.gold-html239
-rw-r--r--src/boost/tools/quickbook/test/versions/versions-1_6.quickbook26
-rw-r--r--src/boost/tools/quickbook/test/xinclude/Jamfile.v231
-rw-r--r--src/boost/tools/quickbook/test/xinclude/sub/boost-no-inspect2
-rw-r--r--src/boost/tools/quickbook/test/xinclude/sub/stub.xml0
-rw-r--r--src/boost/tools/quickbook/test/xinclude/xinclude-1_1-alt.gold9
-rw-r--r--src/boost/tools/quickbook/test/xinclude/xinclude-1_1-alt.gold-html9
-rw-r--r--src/boost/tools/quickbook/test/xinclude/xinclude-1_1-alt2.gold9
-rw-r--r--src/boost/tools/quickbook/test/xinclude/xinclude-1_1.gold9
-rw-r--r--src/boost/tools/quickbook/test/xinclude/xinclude-1_1.gold-html9
-rw-r--r--src/boost/tools/quickbook/test/xinclude/xinclude-1_1.quickbook6
-rw-r--r--src/boost/tools/quickbook/test/xinclude/xmlbase-1_6-fail.quickbook4
-rw-r--r--src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6-alt.gold10
-rw-r--r--src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6-alt.gold-html9
-rw-r--r--src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6-alt2.gold10
-rw-r--r--src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6.gold10
-rw-r--r--src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6.gold-html9
-rw-r--r--src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6.quickbook9
-rw-r--r--src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6-alt.gold10
-rw-r--r--src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6-alt.gold-html9
-rw-r--r--src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6-alt2.gold10
-rw-r--r--src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6.gold10
-rw-r--r--src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6.gold-html9
-rw-r--r--src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6.quickbook9
-rw-r--r--src/boost/tools/quickbook/test/xml_escape-1_2.gold42
-rw-r--r--src/boost/tools/quickbook/test/xml_escape-1_2.gold-html54
-rw-r--r--src/boost/tools/quickbook/test/xml_escape-1_2.quickbook14
-rw-r--r--src/boost/tools/quickbook/test/xml_escape-1_5.gold43
-rw-r--r--src/boost/tools/quickbook/test/xml_escape-1_5.gold-html54
-rw-r--r--src/boost/tools/quickbook/test/xml_escape-1_5.quickbook14
566 files changed, 44145 insertions, 0 deletions
diff --git a/src/boost/tools/quickbook/test/Jamfile.v2 b/src/boost/tools/quickbook/test/Jamfile.v2
new file mode 100644
index 000000000..c0d543f59
--- /dev/null
+++ b/src/boost/tools/quickbook/test/Jamfile.v2
@@ -0,0 +1,173 @@
+#
+# Copyright (c) 2005 João Abecasis
+#
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+#
+
+project quickbook/test
+ : requirements
+ <toolset>msvc:<debug-symbols>off
+ <cxxstd>98:<build>no
+ <cxxstd>03:<build>no
+ ;
+
+build-project doc-info ;
+build-project unit ;
+build-project command-line ;
+build-project snippets ;
+build-project "include" ;
+build-project versions ;
+build-project xinclude ;
+
+import quickbook-testing : quickbook-test quickbook-error-test ;
+
+test-suite quickbook.test :
+ [ quickbook-test anchor-1_1 ]
+ [ quickbook-test anchor-1_6 ]
+ [ quickbook-test anchor-1_7 ]
+ [ quickbook-test blocks-1_5 ]
+ [ quickbook-test callouts-1_5 ]
+ [ quickbook-test callouts-1_7 ]
+ [ quickbook-test code-1_1 ]
+ [ quickbook-test code-1_5 ]
+ [ quickbook-test code_cpp-1_5 ]
+ [ quickbook-error-test code_cpp_mismatched_escape-1_4-fail ]
+ [ quickbook-test code_python-1_5 ]
+ [ quickbook-error-test code_python_mismatched_escape-1_4-fail ]
+ [ quickbook-test code_snippet-1_1 ]
+ [ quickbook-test code_teletype-1_5 ]
+ [ quickbook-error-test code_unclosed_block-1_6-fail ]
+ [ quickbook-test command_line_macro-1_1 : : :
+ <quickbook-test-define>__macro__=*bold*
+ <quickbook-test-define>__empty__ ]
+ [ quickbook-error-test command_line_macro-1_1-invalid :
+ command_line_macro-1_1.quickbook :
+ <testing.arg>-Dsomething[] ]
+ [ quickbook-test cond_phrase-1_5 ]
+ [ quickbook-test cond_phrase-1_7 ]
+ # TODO: This test generates invalid boostbook, so it breaks when generating html
+ # [ quickbook-test elements-1_5 ]
+ [ quickbook-test elements-1_6 ]
+ [ quickbook-error-test endsect-wrong-id-1_4-fail ]
+ [ quickbook-error-test endsect-wrong-id-1_7-fail ]
+ [ quickbook-error-test endsect-unopened-1_7-fail ]
+ [ quickbook-test escape-1_1 ]
+ [ quickbook-test escape-1_6 ]
+ [ quickbook-error-test escape-mismatched-1_5-fail ]
+ [ quickbook-test footnotes-1_7 ]
+ [ quickbook-test heading-1_1 ]
+ [ quickbook-test heading-1_3 ]
+ [ quickbook-test heading-1_5 ]
+ [ quickbook-test heading-1_6 ]
+ [ quickbook-test heading-1_7 ]
+ [ quickbook-error-test heading_unclosed-1_4-fail ]
+ [ quickbook-test hr-1_5 ]
+ [ quickbook-test hr-1_6 ]
+ [ quickbook-test identifier-1_5 ]
+ [ quickbook-test identifier-1_6 ]
+ [ quickbook-test image-1_5 ]
+ [ quickbook-test image-1_6 ]
+ [ quickbook-error-test import-1_1-fail ]
+ [ quickbook-error-test include-1_1-fail ]
+ [ quickbook-test include-1_5 ]
+ [ quickbook-test include-1_6 ]
+ [ quickbook-test include-1_7 ]
+ [ quickbook-test include2-1_6 ]
+ [ quickbook-error-test include_win_path-1_6-fail ]
+ [ quickbook-error-test include_invalid_path1-1_7-fail ]
+ [ quickbook-error-test include_invalid_path2-1_7-fail ]
+ [ quickbook-error-test include_invalid_path3-1_7-fail ]
+ [ quickbook-error-test include_unicode_glob-1_7-fail ]
+ [ quickbook-test link-1_1 ]
+ [ quickbook-test link-1_6 ]
+ [ quickbook-test link-1_7 ]
+ [ quickbook-error-test link-1_7-fail ]
+ [ quickbook-error-test link-1_7-fail2 ]
+ [ quickbook-test list_test-1_5 ]
+ [ quickbook-test list_test-1_6 ]
+ [ quickbook-error-test list_test-1_6-fail ]
+ [ quickbook-test list_test-1_7 ]
+ [ quickbook-error-test list_test-1_7-fail1 ]
+ [ quickbook-test macro-1_5 ]
+ [ quickbook-test macro-1_6 ]
+ [ quickbook-error-test mismatched_brackets-1_1-fail ]
+ [ quickbook-test mismatched_brackets1-1_1 ]
+ [ quickbook-test mismatched_brackets2-1_1 ]
+ [ quickbook-test mismatched_brackets3-1_1 ]
+ [ quickbook-error-test mismatched_brackets1-1_1-strict-fail :
+ mismatched_brackets1-1_1.quickbook : <testing.arg>--strict ]
+ [ quickbook-error-test mismatched_brackets2-1_1-strict-fail :
+ mismatched_brackets2-1_1.quickbook : <testing.arg>--strict ]
+ [ quickbook-error-test mismatched_brackets3-1_1-strict-fail :
+ mismatched_brackets3-1_1.quickbook : <testing.arg>--strict ]
+ [ quickbook-error-test mismatched_brackets1-1_7-strict-fail :
+ mismatched_brackets1-1_1.quickbook : <testing.arg>--strict ]
+ [ quickbook-test newline-1_1 ]
+ [ quickbook-test para_test-1_5 ]
+ [ quickbook-error-test post_process-fail ]
+ [ quickbook-test preformatted-1_1 ]
+ [ quickbook-test preformatted-1_6 ]
+ [ quickbook-test role-1_6 ]
+ [ quickbook-test role-1_7 ]
+ [ quickbook-error-test role-1_7-fail ]
+ [ quickbook-test section-1_4 ]
+ [ quickbook-test section-1_5-unclosed ]
+ [ quickbook-test section-1_5 ]
+ [ quickbook-error-test section-1_5-unclosed-strict-fail :
+ section-1_5-unclosed : <testing.arg>--strict ]
+ [ quickbook-test section-1_5-strict :
+ section-1_5.quickbook : : <testing.arg>--strict ]
+ [ quickbook-test section-1_7 ]
+ [ quickbook-test simple_markup-1_5 ]
+ [ quickbook-test source_mode-1_7 ]
+ [ quickbook-test stray_close_bracket-1_1 ]
+ [ quickbook-error-test stray_close_bracket-1_1-strict-fail :
+ stray_close_bracket-1_1.quickbook :
+ <testing.arg>--strict ]
+ [ quickbook-error-test stray_close_bracket-1_7-fail ]
+ [ quickbook-test svg-1_1 ]
+ [ quickbook-test table-1_3 ]
+ [ quickbook-test table-1_5 ]
+ [ quickbook-test table-1_6 ]
+ [ quickbook-test table-1_7 ]
+ [ quickbook-error-test template_arguments1-1_1-fail ]
+ [ quickbook-error-test template_arguments1-1_5-fail ]
+ [ quickbook-error-test template_arguments2-1_1-fail ]
+ [ quickbook-error-test template_arguments2-1_5-fail ]
+ [ quickbook-error-test template_arguments3-1_1-fail ]
+ [ quickbook-error-test template_arguments3-1_5-fail ]
+ [ quickbook-test template_section-1_5 ]
+ [ quickbook-error-test template_section1-1_5-fail ]
+ [ quickbook-error-test template_section2-1_5-fail ]
+ [ quickbook-error-test template_section3-1_5-fail ]
+ [ quickbook-test templates-1_3 ]
+ [ quickbook-test templates-1_4 ]
+ [ quickbook-test templates-1_5 ]
+ [ quickbook-test templates-1_6 ]
+ [ quickbook-error-test templates-1_6-fail1 ]
+ [ quickbook-test templates-1_7 ]
+ [ quickbook-error-test templates-1_7-fail1 ]
+ [ quickbook-error-test templates-1_7-fail2 ]
+ [ quickbook-test unicode_escape-1_5 ]
+ [ quickbook-test unmatched_element-1_5 ]
+ [ quickbook-test unmatched_element-1_6 ]
+ [ quickbook-error-test utf16be_bom-1_5-fail ]
+ [ quickbook-error-test utf16le_bom-1_5-fail ]
+ [ quickbook-test utf8-1_5 ]
+ [ quickbook-test utf8_bom-1_5 ]
+ [ quickbook-error-test variablelist-1_5-fail ]
+ [ quickbook-test variablelist-1_5 ]
+ [ quickbook-error-test version-0_1-fail ]
+ [ quickbook-error-test version-1_8-fail ]
+ [ quickbook-error-test version-2_0-fail ]
+ [ quickbook-test xml_escape-1_2 ]
+ [ quickbook-test xml_escape-1_5 ]
+
+ [ quickbook-test quickbook_manual-1_4 ]
+ ;
+
+# for `b2 quick` in status
+alias quick : quickbook_manual-1_4 ;
+explicit quick ;
diff --git a/src/boost/tools/quickbook/test/anchor-1_1.gold b/src/boost/tools/quickbook/test/anchor-1_1.gold
new file mode 100644
index 000000000..e0b820971
--- /dev/null
+++ b/src/boost/tools/quickbook/test/anchor-1_1.gold
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="anchor_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Anchor Test</title>
+ <section id="anchor_test.anchors">
+ <title>Anchors</title>
+ <para>
+ <anchor id="a1"/>A paragraph containing several anchors. <anchor id="a2"/>We
+ want to make sure they appear in the correct place. <anchor id="a3"/>
+ </para>
+ <bridgehead renderas="sect3" id="anchor_test.anchors.h0">
+ <phrase id="anchor_test.anchors.this_heading_shouldn_t_pick_up_the_previous_anchor"/><link
+ linkend="anchor_test.anchors.this_heading_shouldn_t_pick_up_the_previous_anchor">This
+ heading shouldn't pick up the previous anchor</link>
+ </bridgehead>
+ <anchor id="a4"/>
+ <bridgehead renderas="sect3" id="anchor_test.anchors.h1">
+ <phrase id="anchor_test.anchors.this_heading_should_pick_up_the_previous_anchor"/><link
+ linkend="anchor_test.anchors.this_heading_should_pick_up_the_previous_anchor">This
+ heading should pick up the previous anchor</link>
+ </bridgehead>
+ <anchor id="a5"/>
+ <bridgehead renderas="sect3" id="anchor_test.anchors.h2">
+ <phrase id="anchor_test.anchors.and_this_one"/><link linkend="anchor_test.anchors.and_this_one">And
+ this one</link>
+ </bridgehead>
+ <anchor id="a6"/>
+ <bridgehead renderas="sect3" id="anchor_test.anchors.h3">
+ <phrase id="anchor_test.anchors.also_this_one"/><link linkend="anchor_test.anchors.also_this_one">Also
+ this one</link>
+ </bridgehead>
+ <anchor id="a7"/>
+ <bridgehead renderas="sect3" id="anchors.finally_this">
+ Finally this
+ </bridgehead>
+ <anchor id="a8"/>
+ </section>
+ <section id="anchor_test.section_anchor">
+ <title><anchor id="a9"/>Section Anchor</title>
+ <section id="anchor_test.nested_section">
+ <title><anchor id="a10"/>Nested Section</title>
+ </section>
+ <anchor id="a11"/>
+ </section>
+ <section id="anchor_test.conditional_section_anchor">
+ <title><anchor id="a12"/>Conditional Section Anchor</title>
+ </section>
+ <section id="anchor_test.lists">
+ <title>Lists</title> <anchor id="a14"/>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Item 1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Item 2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Nested List <anchor id="a15"/>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Nested Item 1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Nested Item 2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <anchor id="a16"/>Nested Item 3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Item 3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="anchor_test.anchors_in_templates">
+ <title>Anchors in templates</title>
+ <para>
+ <anchor id="t1"/>Some text.
+ </para>
+ <para>
+ <anchor id="t2"/>Text content
+ </para>
+ </section>
+ <section id="anchor_test.anchors_in_syntax_highlighted_code">
+ <title>Anchors in syntax highlighted code</title>
+<programlisting><phrase role="keyword">int</phrase> <anchor id="s1"/><phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase>
+</programlisting>
+ </section>
+ <section id="anchor_test.nested_anchors">
+ <title>Nested anchors</title>
+ <table frame="all" id="anchor_test.nested_anchors.t0">
+ <title>Table with anchors</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <anchor id="table1"/>Cell 1
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <anchor id="table2"/>Cell 2
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Cell 3<anchor id="table3"/>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/anchor-1_1.gold-html b/src/boost/tools/quickbook/test/anchor-1_1.gold-html
new file mode 100644
index 000000000..e6610d417
--- /dev/null
+++ b/src/boost/tools/quickbook/test/anchor-1_1.gold-html
@@ -0,0 +1,205 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Anchor Test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#anchor_test.anchors">Anchors</a>
+ </li>
+ <li>
+ <a href="#anchor_test.section_anchor"><span></span>Section Anchor</a>
+ </li>
+ <li>
+ <a href="#anchor_test.conditional_section_anchor"><span></span>Conditional
+ Section Anchor</a>
+ </li>
+ <li>
+ <a href="#anchor_test.lists">Lists</a>
+ </li>
+ <li>
+ <a href="#anchor_test.anchors_in_templates">Anchors in templates</a>
+ </li>
+ <li>
+ <a href="#anchor_test.anchors_in_syntax_highlighted_code">Anchors in syntax
+ highlighted code</a>
+ </li>
+ <li>
+ <a href="#anchor_test.nested_anchors">Nested anchors</a>
+ </li>
+ </ul>
+ </div>
+ <div id="anchor_test.anchors">
+ <h3>
+ Anchors
+ </h3>
+ <div id="anchor_test.anchors">
+ <p>
+ <span id="a1"></span>A paragraph containing several anchors. <span id="a2"></span>We
+ want to make sure they appear in the correct place. <span id="a3"></span>
+ </p>
+ <h3 id="anchor_test.anchors.this_heading_shouldn_t_pick_up_the_previous_anchor">
+ This heading shouldn't pick up the previous anchor
+ </h3>
+ <span id="a4"></span>
+ <h3 id="anchor_test.anchors.this_heading_should_pick_up_the_previous_anchor">
+ This heading should pick up the previous anchor
+ </h3>
+ <span id="a5"></span>
+ <h3 id="anchor_test.anchors.and_this_one">
+ And this one
+ </h3>
+ <span id="a6"></span>
+ <h3 id="anchor_test.anchors.also_this_one">
+ Also this one
+ </h3>
+ <span id="a7"></span>
+ <h3 id="anchors.finally_this">
+ Finally this
+ </h3>
+ <span id="a8"></span>
+ </div>
+ </div>
+ <div id="anchor_test.section_anchor">
+ <h3>
+ <span id="a9"></span>Section Anchor
+ </h3>
+ <div id="anchor_test.section_anchor">
+ <span id="a11"></span>
+ </div>
+ <div id="anchor_test.nested_section">
+ <h3>
+ <span id="a10"></span>Nested Section
+ </h3>
+ <div id="anchor_test.nested_section">
+ </div>
+ </div>
+ </div>
+ <div id="anchor_test.conditional_section_anchor">
+ <h3>
+ <span id="a12"></span>Conditional Section Anchor
+ </h3>
+ <div id="anchor_test.conditional_section_anchor">
+ </div>
+ </div>
+ <div id="anchor_test.lists">
+ <h3>
+ Lists
+ </h3>
+ <div id="anchor_test.lists">
+ <span id="a14"></span>
+ <ul>
+ <li>
+ <div>
+ Item 1
+ </div>
+ </li>
+ <li>
+ <div>
+ Item 2
+ </div>
+ </li>
+ <li>
+ <div>
+ Nested List <span id="a15"></span>
+ <ul>
+ <li>
+ <div>
+ Nested Item 1
+ </div>
+ </li>
+ <li>
+ <div>
+ Nested Item 2
+ </div>
+ </li>
+ <li>
+ <div>
+ <span id="a16"></span>Nested Item 3
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ Item 3
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div id="anchor_test.anchors_in_templates">
+ <h3>
+ Anchors in templates
+ </h3>
+ <div id="anchor_test.anchors_in_templates">
+ <p>
+ <span id="t1"></span>Some text.
+ </p>
+ <p>
+ <span id="t2"></span>Text content
+ </p>
+ </div>
+ </div>
+ <div id="anchor_test.anchors_in_syntax_highlighted_code">
+ <h3>
+ Anchors in syntax highlighted code
+ </h3>
+ <div id="anchor_test.anchors_in_syntax_highlighted_code">
+<pre class="programlisting"><span class="keyword">int</span> <span id="s1"></span><span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span>
+</pre>
+ </div>
+ </div>
+ <div id="anchor_test.nested_anchors">
+ <h3>
+ Nested anchors
+ </h3>
+ <div id="anchor_test.nested_anchors">
+ <div id="anchor_test.nested_anchors.t0" class="table">
+ <table>
+ <caption>Table with anchors</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ <span id="table1"></span>Cell 1
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <span id="table2"></span>Cell 2
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ Cell 3<span id="table3"></span>
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/anchor-1_1.quickbook b/src/boost/tools/quickbook/test/anchor-1_1.quickbook
new file mode 100644
index 000000000..0e8934ee0
--- /dev/null
+++ b/src/boost/tools/quickbook/test/anchor-1_1.quickbook
@@ -0,0 +1,80 @@
+[article Anchor Test]
+
+[section Anchors]
+
+[#a1] A paragraph containing several anchors. [#a2] We want to make sure
+they appear in the correct place. [#a3]
+
+[heading This heading shouldn't pick up the previous anchor]
+
+[#a4]
+
+[heading This heading should pick up the previous anchor]
+
+[#a5]
+[heading And this one]
+
+[#a6][heading Also this one]
+
+[#a7][h3 Finally this]
+
+[#a8]
+
+[endsect]
+
+[#a9]
+[section Section Anchor]
+[#a10][section Nested Section]
+[endsect]
+[/ This anchor is invalid, I'm not sure what to do with it]
+[#a11]
+[endsect]
+
+[#a12][?__not_defined__ #a13]
+[section Conditional Section Anchor]
+[endsect]
+
+[section Lists]
+
+[#a14]
+* Item 1
+* Item 2
+* Nested List
+ [#a15]
+ * Nested Item 1
+ * Nested Item 2
+ * [#a16] Nested Item 3
+* Item 3
+
+[endsect]
+
+[section Anchors in templates]
+
+[template anchor1[][#t1]]
+[template para[] Text content]
+
+[anchor1]
+
+Some text.
+
+[#t2]
+
+[para]
+
+[endsect]
+
+[section Anchors in syntax highlighted code]
+
+ int ``[#s1]``main() {}
+
+[endsect]
+
+[section Nested anchors]
+
+[table Table with anchors
+ [[Heading]]
+ [[[#table1]Cell 1]]
+ [[[#table2] Cell 2]]
+ [[Cell 3[#table3]]]
+]
+[endsect]
diff --git a/src/boost/tools/quickbook/test/anchor-1_6.gold b/src/boost/tools/quickbook/test/anchor-1_6.gold
new file mode 100644
index 000000000..5d056f2db
--- /dev/null
+++ b/src/boost/tools/quickbook/test/anchor-1_6.gold
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="anchor_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Anchor Test</title>
+ <section id="anchor_test.anchors">
+ <title><link linkend="anchor_test.anchors">Anchors</link></title>
+ <para>
+ <anchor id="a1"/>A paragraph containing several anchors. <anchor id="a2"/>We
+ want to make sure they appear in the correct place. <anchor id="a3"/>
+ </para>
+ <bridgehead renderas="sect3" id="anchor_test.anchors.h0">
+ <phrase id="anchor_test.anchors.this_heading_shouldn_t_pick_up_t"/><link linkend="anchor_test.anchors.this_heading_shouldn_t_pick_up_t">This
+ heading shouldn't pick up the previous anchor</link>
+ </bridgehead>
+ <anchor id="a4"/>
+ <bridgehead renderas="sect3" id="anchor_test.anchors.h1">
+ <phrase id="anchor_test.anchors.this_heading_should_pick_up_the_"/><link linkend="anchor_test.anchors.this_heading_should_pick_up_the_">This
+ heading should pick up the previous anchor</link>
+ </bridgehead>
+ <anchor id="a5"/>
+ <bridgehead renderas="sect3" id="anchor_test.anchors.h2">
+ <phrase id="anchor_test.anchors.and_this_one"/><link linkend="anchor_test.anchors.and_this_one">And
+ this one</link>
+ </bridgehead>
+ <anchor id="a6"/>
+ <bridgehead renderas="sect3" id="anchor_test.anchors.h3">
+ <phrase id="anchor_test.anchors.also_this_one"/><link linkend="anchor_test.anchors.also_this_one">Also
+ this one</link>
+ </bridgehead>
+ <anchor id="a7"/>
+ <bridgehead renderas="sect3" id="anchor_test.anchors.h4">
+ <phrase id="anchor_test.anchors.finally_this"/><link linkend="anchor_test.anchors.finally_this">Finally
+ this</link>
+ </bridgehead>
+ <anchor id="a8"/>
+ </section>
+ <section id="anchor_test.section_anchor">
+ <title><anchor id="a9"/><link linkend="anchor_test.section_anchor">Section Anchor</link></title>
+ <section id="anchor_test.section_anchor.nested_section">
+ <title><anchor id="a10"/><link linkend="anchor_test.section_anchor.nested_section">Nested
+ Section</link></title>
+ </section>
+ <anchor id="a11"/>
+ </section>
+ <section id="anchor_test.conditional_section_anchor">
+ <title><anchor id="a12"/><link linkend="anchor_test.conditional_section_anchor">Conditional
+ Section Anchor</link></title>
+ </section>
+ <section id="anchor_test.lists">
+ <title><link linkend="anchor_test.lists">Lists</link></title> <anchor id="a14"/>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Item 1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Item 2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Nested List <anchor id="a15"/>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Nested Item 1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Nested Item 2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <anchor id="a16"/>Nested Item 3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Item 3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="anchor_test.anchors_in_templates">
+ <title><link linkend="anchor_test.anchors_in_templates">Anchors in templates</link></title>
+ <para>
+ <anchor id="t1"/>Some text.
+ </para>
+ <para>
+ <anchor id="t2"/>Text content
+ </para>
+ </section>
+ <section id="anchor_test.anchors_in_syntax_highlighted_co">
+ <title><link linkend="anchor_test.anchors_in_syntax_highlighted_co">Anchors in
+ syntax highlighted code</link></title>
+<programlisting><phrase role="keyword">int</phrase> <anchor id="s1"/><phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase>
+</programlisting>
+ </section>
+ <section id="anchor_test.nested_anchors">
+ <title><link linkend="anchor_test.nested_anchors">Nested anchors</link></title>
+ <table frame="all" id="anchor_test.nested_anchors.table_with_anchors">
+ <title>Table with anchors</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <anchor id="table1"/>Cell 1
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <anchor id="table2"/>Cell 2
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Cell 3<anchor id="table3"/>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="anchor_test.anchors_with_escapes">
+ <title><link linkend="anchor_test.anchors_with_escapes">Anchors with escapes</link></title>
+ <anchor id="[oddid]"/>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/anchor-1_6.gold-html b/src/boost/tools/quickbook/test/anchor-1_6.gold-html
new file mode 100644
index 000000000..001b275f5
--- /dev/null
+++ b/src/boost/tools/quickbook/test/anchor-1_6.gold-html
@@ -0,0 +1,216 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Anchor Test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#anchor_test.anchors">Anchors</a>
+ </li>
+ <li>
+ <a href="#anchor_test.section_anchor"><span></span>Section Anchor</a>
+ </li>
+ <li>
+ <a href="#anchor_test.conditional_section_anchor"><span></span>Conditional
+ Section Anchor</a>
+ </li>
+ <li>
+ <a href="#anchor_test.lists">Lists</a>
+ </li>
+ <li>
+ <a href="#anchor_test.anchors_in_templates">Anchors in templates</a>
+ </li>
+ <li>
+ <a href="#anchor_test.anchors_in_syntax_highlighted_co">Anchors in syntax
+ highlighted code</a>
+ </li>
+ <li>
+ <a href="#anchor_test.nested_anchors">Nested anchors</a>
+ </li>
+ <li>
+ <a href="#anchor_test.anchors_with_escapes">Anchors with escapes</a>
+ </li>
+ </ul>
+ </div>
+ <div id="anchor_test.anchors">
+ <h3>
+ Anchors
+ </h3>
+ <div id="anchor_test.anchors">
+ <p>
+ <span id="a1"></span>A paragraph containing several anchors. <span id="a2"></span>We
+ want to make sure they appear in the correct place. <span id="a3"></span>
+ </p>
+ <h3 id="anchor_test.anchors.this_heading_shouldn_t_pick_up_t">
+ This heading shouldn't pick up the previous anchor
+ </h3>
+ <span id="a4"></span>
+ <h3 id="anchor_test.anchors.this_heading_should_pick_up_the_">
+ This heading should pick up the previous anchor
+ </h3>
+ <span id="a5"></span>
+ <h3 id="anchor_test.anchors.and_this_one">
+ And this one
+ </h3>
+ <span id="a6"></span>
+ <h3 id="anchor_test.anchors.also_this_one">
+ Also this one
+ </h3>
+ <span id="a7"></span>
+ <h3 id="anchor_test.anchors.finally_this">
+ Finally this
+ </h3>
+ <span id="a8"></span>
+ </div>
+ </div>
+ <div id="anchor_test.section_anchor">
+ <h3>
+ <span id="a9"></span>Section Anchor
+ </h3>
+ <div id="anchor_test.section_anchor">
+ <span id="a11"></span>
+ </div>
+ <div id="anchor_test.section_anchor.nested_section">
+ <h3>
+ <span id="a10"></span>Nested Section
+ </h3>
+ <div id="anchor_test.section_anchor.nested_section">
+ </div>
+ </div>
+ </div>
+ <div id="anchor_test.conditional_section_anchor">
+ <h3>
+ <span id="a12"></span>Conditional Section Anchor
+ </h3>
+ <div id="anchor_test.conditional_section_anchor">
+ </div>
+ </div>
+ <div id="anchor_test.lists">
+ <h3>
+ Lists
+ </h3>
+ <div id="anchor_test.lists">
+ <span id="a14"></span>
+ <ul>
+ <li>
+ <div>
+ Item 1
+ </div>
+ </li>
+ <li>
+ <div>
+ Item 2
+ </div>
+ </li>
+ <li>
+ <div>
+ Nested List <span id="a15"></span>
+ <ul>
+ <li>
+ <div>
+ Nested Item 1
+ </div>
+ </li>
+ <li>
+ <div>
+ Nested Item 2
+ </div>
+ </li>
+ <li>
+ <div>
+ <span id="a16"></span>Nested Item 3
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ Item 3
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div id="anchor_test.anchors_in_templates">
+ <h3>
+ Anchors in templates
+ </h3>
+ <div id="anchor_test.anchors_in_templates">
+ <p>
+ <span id="t1"></span>Some text.
+ </p>
+ <p>
+ <span id="t2"></span>Text content
+ </p>
+ </div>
+ </div>
+ <div id="anchor_test.anchors_in_syntax_highlighted_co">
+ <h3>
+ Anchors in syntax highlighted code
+ </h3>
+ <div id="anchor_test.anchors_in_syntax_highlighted_co">
+<pre class="programlisting"><span class="keyword">int</span> <span id="s1"></span><span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span>
+</pre>
+ </div>
+ </div>
+ <div id="anchor_test.nested_anchors">
+ <h3>
+ Nested anchors
+ </h3>
+ <div id="anchor_test.nested_anchors">
+ <div id="anchor_test.nested_anchors.table_with_anchors" class="table">
+ <table>
+ <caption>Table with anchors</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ <span id="table1"></span>Cell 1
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <span id="table2"></span>Cell 2
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ Cell 3<span id="table3"></span>
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div id="anchor_test.anchors_with_escapes">
+ <h3>
+ Anchors with escapes
+ </h3>
+ <div id="anchor_test.anchors_with_escapes">
+ <span id="[oddid]"></span>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/anchor-1_6.quickbook b/src/boost/tools/quickbook/test/anchor-1_6.quickbook
new file mode 100644
index 000000000..8d4a7b34e
--- /dev/null
+++ b/src/boost/tools/quickbook/test/anchor-1_6.quickbook
@@ -0,0 +1,88 @@
+[article Anchor Test
+[quickbook 1.6]
+]
+
+[section Anchors]
+
+[#a1] A paragraph containing several anchors. [#a2] We want to make sure
+they appear in the correct place. [#a3]
+
+[heading This heading shouldn't pick up the previous anchor]
+
+[#a4]
+
+[heading This heading should pick up the previous anchor]
+
+[#a5]
+[heading And this one]
+
+[#a6][heading Also this one]
+
+[#a7][h3 Finally this]
+
+[#a8]
+
+[endsect]
+
+[#a9]
+[section Section Anchor]
+[#a10][section Nested Section]
+[endsect]
+[/ This anchor is invalid, I'm not sure what to do with it]
+[#a11]
+[endsect]
+
+[#a12][?__not_defined__ #a13]
+[section Conditional Section Anchor]
+[endsect]
+
+[section Lists]
+
+[#a14]
+* Item 1
+* Item 2
+* Nested List
+ [#a15]
+ * Nested Item 1
+ * Nested Item 2
+ * [#a16] Nested Item 3
+* Item 3
+
+[endsect]
+
+[section Anchors in templates]
+
+[template anchor1[][#t1]]
+[template para[] Text content]
+
+[anchor1]
+
+Some text.
+
+[#t2]
+
+[para]
+
+[endsect]
+
+[section Anchors in syntax highlighted code]
+
+ int ``[#s1]``main() {}
+
+[endsect]
+
+[section Nested anchors]
+
+[table Table with anchors
+ [[Heading]]
+ [[[#table1]Cell 1]]
+ [[[#table2] Cell 2]]
+ [[Cell 3[#table3]]]
+]
+[endsect]
+
+[section Anchors with escapes]
+
+[#\[oddid\]]
+
+[endsect] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/anchor-1_7.gold b/src/boost/tools/quickbook/test/anchor-1_7.gold
new file mode 100644
index 000000000..71e22458d
--- /dev/null
+++ b/src/boost/tools/quickbook/test/anchor-1_7.gold
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="anchor_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Anchor Test</title>
+ <section id="anchor_test.anchors">
+ <title><link linkend="anchor_test.anchors">Anchors</link></title>
+ <para>
+ <anchor id="a1"/>A paragraph containing several anchors. <anchor id="a2"/>We
+ want to make sure they appear in the correct place. <anchor id="a3"/>
+ </para>
+ <bridgehead renderas="sect3" id="anchor_test.anchors.h0">
+ <phrase id="anchor_test.anchors.this_heading_shouldn_t_pick_up_t"/><link linkend="anchor_test.anchors.this_heading_shouldn_t_pick_up_t">This
+ heading shouldn't pick up the previous anchor</link>
+ </bridgehead>
+ <anchor id="a4"/>
+ <bridgehead renderas="sect3" id="anchor_test.anchors.h1">
+ <phrase id="anchor_test.anchors.this_heading_should_pick_up_the_"/><link linkend="anchor_test.anchors.this_heading_should_pick_up_the_">This
+ heading should pick up the previous anchor</link>
+ </bridgehead>
+ <anchor id="a5"/>
+ <bridgehead renderas="sect3" id="anchor_test.anchors.h2">
+ <phrase id="anchor_test.anchors.and_this_one"/><link linkend="anchor_test.anchors.and_this_one">And
+ this one</link>
+ </bridgehead>
+ <anchor id="a6"/>
+ <bridgehead renderas="sect3" id="anchor_test.anchors.h3">
+ <phrase id="anchor_test.anchors.also_this_one"/><link linkend="anchor_test.anchors.also_this_one">Also
+ this one</link>
+ </bridgehead>
+ <anchor id="a7"/>
+ <bridgehead renderas="sect3" id="anchor_test.anchors.h4">
+ <phrase id="anchor_test.anchors.finally_this"/><link linkend="anchor_test.anchors.finally_this">Finally
+ this</link>
+ </bridgehead>
+ <anchor id="a8"/>
+ </section>
+ <section id="anchor_test.section_anchor">
+ <title><anchor id="a9"/><link linkend="anchor_test.section_anchor">Section Anchor</link></title>
+ <section id="anchor_test.section_anchor.nested_section">
+ <title><anchor id="a10"/><link linkend="anchor_test.section_anchor.nested_section">Nested
+ Section</link></title>
+ </section>
+ <anchor id="a11"/>
+ </section>
+ <section id="anchor_test.conditional_section_anchor">
+ <title><anchor id="a12"/><link linkend="anchor_test.conditional_section_anchor">Conditional
+ Section Anchor</link></title>
+ </section>
+ <section id="anchor_test.lists">
+ <title><link linkend="anchor_test.lists">Lists</link></title> <anchor id="a14"/>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Item 1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Item 2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Nested List <anchor id="a15"/>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Nested Item 1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Nested Item 2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <anchor id="a16"/>Nested Item 3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Item 3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="anchor_test.anchors_in_templates">
+ <title><link linkend="anchor_test.anchors_in_templates">Anchors in templates</link></title>
+ <para>
+ <anchor id="t1"/>Some text.
+ </para>
+ <para>
+ <anchor id="t2"/>Text content
+ </para>
+ </section>
+ <section id="anchor_test.anchors_in_syntax_highlighted_co">
+ <title><link linkend="anchor_test.anchors_in_syntax_highlighted_co">Anchors in
+ syntax highlighted code</link></title>
+<programlisting><phrase role="keyword">int</phrase> <anchor id="s1"/><phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase>
+</programlisting>
+ </section>
+ <section id="anchor_test.nested_anchors">
+ <title><link linkend="anchor_test.nested_anchors">Nested anchors</link></title>
+ <table frame="all" id="anchor_test.nested_anchors.table_with_anchors">
+ <title>Table with anchors</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <anchor id="table1"/>Cell 1
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <anchor id="table2"/>Cell 2
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Cell 3<anchor id="table3"/>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="anchor_test.templates">
+ <title><link linkend="anchor_test.templates">Anchors with templates</link></title>
+ <anchor id="anchor1"/><anchor id="anchor2"/><anchor id="x1y"/><anchor id="x12y"/>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/anchor-1_7.gold-html b/src/boost/tools/quickbook/test/anchor-1_7.gold-html
new file mode 100644
index 000000000..890eb5191
--- /dev/null
+++ b/src/boost/tools/quickbook/test/anchor-1_7.gold-html
@@ -0,0 +1,217 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Anchor Test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#anchor_test.anchors">Anchors</a>
+ </li>
+ <li>
+ <a href="#anchor_test.section_anchor"><span></span>Section Anchor</a>
+ </li>
+ <li>
+ <a href="#anchor_test.conditional_section_anchor"><span></span>Conditional
+ Section Anchor</a>
+ </li>
+ <li>
+ <a href="#anchor_test.lists">Lists</a>
+ </li>
+ <li>
+ <a href="#anchor_test.anchors_in_templates">Anchors in templates</a>
+ </li>
+ <li>
+ <a href="#anchor_test.anchors_in_syntax_highlighted_co">Anchors in syntax
+ highlighted code</a>
+ </li>
+ <li>
+ <a href="#anchor_test.nested_anchors">Nested anchors</a>
+ </li>
+ <li>
+ <a href="#anchor_test.templates">Anchors with templates</a>
+ </li>
+ </ul>
+ </div>
+ <div id="anchor_test.anchors">
+ <h3>
+ Anchors
+ </h3>
+ <div id="anchor_test.anchors">
+ <p>
+ <span id="a1"></span>A paragraph containing several anchors. <span id="a2"></span>We
+ want to make sure they appear in the correct place. <span id="a3"></span>
+ </p>
+ <h3 id="anchor_test.anchors.this_heading_shouldn_t_pick_up_t">
+ This heading shouldn't pick up the previous anchor
+ </h3>
+ <span id="a4"></span>
+ <h3 id="anchor_test.anchors.this_heading_should_pick_up_the_">
+ This heading should pick up the previous anchor
+ </h3>
+ <span id="a5"></span>
+ <h3 id="anchor_test.anchors.and_this_one">
+ And this one
+ </h3>
+ <span id="a6"></span>
+ <h3 id="anchor_test.anchors.also_this_one">
+ Also this one
+ </h3>
+ <span id="a7"></span>
+ <h3 id="anchor_test.anchors.finally_this">
+ Finally this
+ </h3>
+ <span id="a8"></span>
+ </div>
+ </div>
+ <div id="anchor_test.section_anchor">
+ <h3>
+ <span id="a9"></span>Section Anchor
+ </h3>
+ <div id="anchor_test.section_anchor">
+ <span id="a11"></span>
+ </div>
+ <div id="anchor_test.section_anchor.nested_section">
+ <h3>
+ <span id="a10"></span>Nested Section
+ </h3>
+ <div id="anchor_test.section_anchor.nested_section">
+ </div>
+ </div>
+ </div>
+ <div id="anchor_test.conditional_section_anchor">
+ <h3>
+ <span id="a12"></span>Conditional Section Anchor
+ </h3>
+ <div id="anchor_test.conditional_section_anchor">
+ </div>
+ </div>
+ <div id="anchor_test.lists">
+ <h3>
+ Lists
+ </h3>
+ <div id="anchor_test.lists">
+ <span id="a14"></span>
+ <ul>
+ <li>
+ <div>
+ Item 1
+ </div>
+ </li>
+ <li>
+ <div>
+ Item 2
+ </div>
+ </li>
+ <li>
+ <div>
+ Nested List <span id="a15"></span>
+ <ul>
+ <li>
+ <div>
+ Nested Item 1
+ </div>
+ </li>
+ <li>
+ <div>
+ Nested Item 2
+ </div>
+ </li>
+ <li>
+ <div>
+ <span id="a16"></span>Nested Item 3
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ Item 3
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div id="anchor_test.anchors_in_templates">
+ <h3>
+ Anchors in templates
+ </h3>
+ <div id="anchor_test.anchors_in_templates">
+ <p>
+ <span id="t1"></span>Some text.
+ </p>
+ <p>
+ <span id="t2"></span>Text content
+ </p>
+ </div>
+ </div>
+ <div id="anchor_test.anchors_in_syntax_highlighted_co">
+ <h3>
+ Anchors in syntax highlighted code
+ </h3>
+ <div id="anchor_test.anchors_in_syntax_highlighted_co">
+<pre class="programlisting"><span class="keyword">int</span> <span id="s1"></span><span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span>
+</pre>
+ </div>
+ </div>
+ <div id="anchor_test.nested_anchors">
+ <h3>
+ Nested anchors
+ </h3>
+ <div id="anchor_test.nested_anchors">
+ <div id="anchor_test.nested_anchors.table_with_anchors" class="table">
+ <table>
+ <caption>Table with anchors</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ <span id="table1"></span>Cell 1
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <span id="table2"></span>Cell 2
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ Cell 3<span id="table3"></span>
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div id="anchor_test.templates">
+ <h3>
+ Anchors with templates
+ </h3>
+ <div id="anchor_test.templates">
+ <span id="anchor1"></span><span id="anchor2"></span><span id="x1y"></span><span
+ id="x12y"></span>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/anchor-1_7.quickbook b/src/boost/tools/quickbook/test/anchor-1_7.quickbook
new file mode 100644
index 000000000..f2b5c13db
--- /dev/null
+++ b/src/boost/tools/quickbook/test/anchor-1_7.quickbook
@@ -0,0 +1,97 @@
+[article Anchor Test
+[quickbook 1.7]
+]
+
+[section Anchors]
+
+[#a1] A paragraph containing several anchors. [#a2] We want to make sure
+they appear in the correct place. [#a3]
+
+[heading This heading shouldn't pick up the previous anchor]
+
+[#a4]
+
+[heading This heading should pick up the previous anchor]
+
+[#a5]
+[heading And this one]
+
+[#a6][heading Also this one]
+
+[#a7][h3 Finally this]
+
+[#a8]
+
+[endsect]
+
+[#a9]
+[section Section Anchor]
+[#a10][section Nested Section]
+[endsect]
+[/ This anchor is invalid, I'm not sure what to do with it]
+[#a11]
+[endsect]
+
+[#a12][?__not_defined__ #a13]
+[section Conditional Section Anchor]
+[endsect]
+
+[section Lists]
+
+[#a14]
+* Item 1
+* Item 2
+* Nested List
+ [#a15]
+ * Nested Item 1
+ * Nested Item 2
+ * [#a16] Nested Item 3
+* Item 3
+
+[endsect]
+
+[section Anchors in templates]
+
+[template anchor1[][#t1]]
+[template para[] Text content]
+
+[anchor1]
+
+Some text.
+
+[#t2]
+
+[para]
+
+[endsect]
+
+[section Anchors in syntax highlighted code]
+
+ int ``[#s1]``main() {}
+
+[endsect]
+
+[section Nested anchors]
+
+[table Table with anchors
+ [[Heading]]
+ [[[#table1]Cell 1]]
+ [[[#table2] Cell 2]]
+ [[Cell 3[#table3]]]
+]
+[endsect]
+
+[section:templates Anchors with templates]
+
+[template a1 anchor1]
+[template a2 anchor2]
+
+[#[a1]]
+[#[a2]]
+
+[template anchor[name] [#x[name]y]]
+
+[anchor 1]
+[anchor 12]
+
+[endsect] [/ templates]
diff --git a/src/boost/tools/quickbook/test/blocks-1_5.gold b/src/boost/tools/quickbook/test/blocks-1_5.gold
new file mode 100644
index 000000000..2d7370be6
--- /dev/null
+++ b/src/boost/tools/quickbook/test/blocks-1_5.gold
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="various_blocks" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Various blocks</title>
+ <bridgehead renderas="sect2" id="various_blocks.h0">
+ <phrase id="various_blocks.blockquotes"/><link linkend="various_blocks.blockquotes">Blockquotes</link>
+ </bridgehead>
+ <para>
+ Here's a blockquote:
+ </para>
+ <blockquote>
+ <para>
+ Blockquote.
+ </para>
+ </blockquote>
+ <para>
+ And another:
+ </para>
+ <blockquote>
+ <para>
+ Blockquote first paragraph.
+ </para>
+ <para>
+ Blockquote second paragraph.
+ </para>
+ </blockquote>
+ <bridgehead renderas="sect2" id="various_blocks.h1">
+ <phrase id="various_blocks.admonitions"/><link linkend="various_blocks.admonitions">Admonitions</link>
+ </bridgehead>
+ <warning>
+ <para>
+ Warning
+ </para>
+ </warning>
+ <caution>
+ <para>
+ Caution
+ </para>
+ </caution>
+ <important>
+ <para>
+ Important
+ </para>
+ </important>
+ <note>
+ <para>
+ Note
+ </para>
+ </note>
+ <tip>
+ <para>
+ Tip
+ </para>
+ </tip>
+ <warning>
+ <para>
+ Warning first paragraph.
+ </para>
+ <para>
+ Warning second paragraph.
+ </para>
+ </warning>
+ <bridgehead renderas="sect2" id="various_blocks.h2">
+ <phrase id="various_blocks.blurb"/><link linkend="various_blocks.blurb">Blurb</link>
+ </bridgehead>
+ <sidebar role="blurb">
+ <para>
+ Blurb
+ </para>
+ </sidebar>
+ <bridgehead renderas="sect2" id="various_blocks.h3">
+ <phrase id="various_blocks.inline_blocks"/><link linkend="various_blocks.inline_blocks">Inline
+ blocks</link>
+ </bridgehead>
+ <blockquote>
+ <para>
+ Blockquote containing a footnote<footnote id="various_blocks.f0">
+ <para>
+ Here it is!
+ </para>
+ </footnote>.
+ </para>
+ </blockquote>
+ <para>
+ [tipping point]
+ </para>
+ <para>
+ Multiple paragraphs because of the inline blocks.
+ </para>
+ <warning>
+ <para>
+ Warning
+ </para>
+ </warning>
+ <para>
+ This line should appear as a separate paragraph.
+ </para>
+ <warning>
+ <para>
+ Warning
+ </para>
+ </warning>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ This should be a list item because it's preceded by block markup.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+</article>
diff --git a/src/boost/tools/quickbook/test/blocks-1_5.gold-html b/src/boost/tools/quickbook/test/blocks-1_5.gold-html
new file mode 100644
index 000000000..c60436487
--- /dev/null
+++ b/src/boost/tools/quickbook/test/blocks-1_5.gold-html
@@ -0,0 +1,119 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Various blocks
+ </h3>
+ <h2 id="various_blocks.blockquotes">
+ Blockquotes
+ </h2>
+ <p>
+ Here's a blockquote:
+ </p>
+ <blockquote>
+ <p>
+ Blockquote.
+ </p>
+ </blockquote>
+ <p>
+ And another:
+ </p>
+ <blockquote>
+ <p>
+ Blockquote first paragraph.
+ </p>
+ <p>
+ Blockquote second paragraph.
+ </p>
+ </blockquote>
+ <h2 id="various_blocks.admonitions">
+ Admonitions
+ </h2>
+ <div class="warning">
+ <p>
+ Warning
+ </p>
+ </div>
+ <div class="caution">
+ <p>
+ Caution
+ </p>
+ </div>
+ <div class="important">
+ <p>
+ Important
+ </p>
+ </div>
+ <div class="note">
+ <p>
+ Note
+ </p>
+ </div>
+ <div class="tip">
+ <p>
+ Tip
+ </p>
+ </div>
+ <div class="warning">
+ <p>
+ Warning first paragraph.
+ </p>
+ <p>
+ Warning second paragraph.
+ </p>
+ </div>
+ <h2 id="various_blocks.blurb">
+ Blurb
+ </h2>
+ <div class="blurb">
+ <p>
+ Blurb
+ </p>
+ </div>
+ <h2 id="various_blocks.inline_blocks">
+ Inline blocks
+ </h2>
+ <blockquote>
+ <p>
+ Blockquote containing a footnote<a id="various_blocks.f0" href="#footnote-1"><sup
+ class="footnote">[1]</sup></a>.
+ </p>
+ </blockquote>
+ <p>
+ [tipping point]
+ </p>
+ <p>
+ Multiple paragraphs because of the inline blocks.
+ </p>
+ <div class="warning">
+ <p>
+ Warning
+ </p>
+ </div>
+ <p>
+ This line should appear as a separate paragraph.
+ </p>
+ <div class="warning">
+ <p>
+ Warning
+ </p>
+ </div>
+ <ul>
+ <li>
+ <div>
+ This should be a list item because it's preceded by block markup.
+ </div>
+ </li>
+ </ul>
+ <div class="footnotes">
+ <br/>
+ <hr/>
+ <div id="footnote-1" class="footnote">
+ <p>
+ <a href="#various_blocks.f0"><sup>[1]</sup></a> Here it is!
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/blocks-1_5.quickbook b/src/boost/tools/quickbook/test/blocks-1_5.quickbook
new file mode 100644
index 000000000..2632a0fd6
--- /dev/null
+++ b/src/boost/tools/quickbook/test/blocks-1_5.quickbook
@@ -0,0 +1,46 @@
+[article Various blocks
+[quickbook 1.5]
+]
+
+[heading Blockquotes]
+
+Here's a blockquote:
+
+[:Blockquote.]
+
+And another:
+
+[:
+Blockquote first paragraph.
+
+Blockquote second paragraph.
+]
+
+[heading Admonitions]
+
+[warning Warning]
+[caution Caution]
+[important Important]
+[note Note]
+[tip Tip]
+
+[warning Warning first paragraph.
+
+Warning second paragraph.]
+
+[heading Blurb]
+
+[blurb Blurb]
+
+[heading Inline blocks]
+
+[: Blockquote containing a footnote[footnote Here it is!].]
+
+[/ Unfortunately footnotes currently can't contain blocks.]
+
+[/ Quickbook shouldn't think that this is a tip]
+[tipping point]
+
+Multiple paragraphs because of the inline blocks. [warning Warning] This
+line should appear as a separate paragraph.[warning Warning]
+* This should be a list item because it's preceded by block markup. \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/callouts-1_5.gold b/src/boost/tools/quickbook/test/callouts-1_5.gold
new file mode 100644
index 000000000..5b66c9933
--- /dev/null
+++ b/src/boost/tools/quickbook/test/callouts-1_5.gold
@@ -0,0 +1,241 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="callout_tests" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Callout Tests</title>
+ <para>
+ Example 1:
+ </para>
+ <para>
+ Now we can define a function that simulates an ordinary six-sided die.
+ </para>
+ <para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.c0" linkends="callout_tests.c1" />
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ <calloutlist>
+ <callout arearefs="callout_tests.c0" id="callout_tests.c1">
+ <para>
+ create a uniform_int distribution
+ </para>
+ </callout>
+ </calloutlist>
+ <para>
+ Example 2:
+ </para>
+ <para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <co id="callout_tests.c2" linkends="callout_tests.c3" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ <calloutlist>
+ <callout arearefs="callout_tests.c2" id="callout_tests.c3">
+ <important>
+ <para>
+ test
+ </para>
+ </important>
+ </callout>
+ </calloutlist>
+ <para>
+ Example 3:
+ </para>
+ <para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <co id="callout_tests.c4" linkends="callout_tests.c5" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ <calloutlist>
+ <callout arearefs="callout_tests.c4" id="callout_tests.c5">
+ <important>
+ <para>
+ test
+ </para>
+ </important>
+ </callout>
+ </calloutlist>
+ <para>
+ Example 3 (again!):
+ </para>
+ <para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <co id="callout_tests.c6" linkends="callout_tests.c7" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ <calloutlist>
+ <callout arearefs="callout_tests.c6" id="callout_tests.c7">
+ <important>
+ <para>
+ test
+ </para>
+ </important>
+ </callout>
+ </calloutlist>
+ <para>
+ Example 4:
+ </para>
+ <para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <co id="callout_tests.c8" linkends="callout_tests.c9" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
+ <co id="callout_tests.c10" linkends="callout_tests.c11" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.c12" linkends="callout_tests.c13" />
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ <calloutlist>
+ <callout arearefs="callout_tests.c8" id="callout_tests.c9">
+ <para>
+ callout 1
+ </para>
+ </callout>
+ <callout arearefs="callout_tests.c10" id="callout_tests.c11">
+ <para>
+ callout 2
+ </para>
+ </callout>
+ <callout arearefs="callout_tests.c12" id="callout_tests.c13">
+ <para>
+ create a uniform_int distribution
+ </para>
+ </callout>
+ </calloutlist>
+ <para>
+<programlisting><co id="callout_tests.c14" linkends="callout_tests.c15" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.c16" linkends="callout_tests.c17" />
+</programlisting>
+ </para>
+ <calloutlist>
+ <callout arearefs="callout_tests.c14" id="callout_tests.c15">
+ <para>
+ callout 2
+ </para>
+ </callout>
+ <callout arearefs="callout_tests.c16" id="callout_tests.c17">
+ <para>
+ create a uniform_int distribution
+ </para>
+ </callout>
+ </calloutlist>
+ <section id="callout_tests.test_section">
+ <title><link linkend="callout_tests.test_section">Try callouts in a section</link></title>
+ <para>
+ Example 1:
+ </para>
+ <para>
+ Now we can define a function that simulates an ordinary six-sided die.
+ </para>
+ <para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.test_section.c0" linkends="callout_tests.test_section.c1" />
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ <calloutlist>
+ <callout arearefs="callout_tests.test_section.c0" id="callout_tests.test_section.c1">
+ <para>
+ create a uniform_int distribution
+ </para>
+ </callout>
+ </calloutlist>
+ <para>
+ Example 2:
+ </para>
+ <para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <co id="callout_tests.test_section.c2" linkends="callout_tests.test_section.c3" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ <calloutlist>
+ <callout arearefs="callout_tests.test_section.c2" id="callout_tests.test_section.c3">
+ <important>
+ <para>
+ test
+ </para>
+ </important>
+ </callout>
+ </calloutlist>
+ <para>
+ Example 3:
+ </para>
+ <para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <co id="callout_tests.test_section.c4" linkends="callout_tests.test_section.c5" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ <calloutlist>
+ <callout arearefs="callout_tests.test_section.c4" id="callout_tests.test_section.c5">
+ <important>
+ <para>
+ test
+ </para>
+ </important>
+ </callout>
+ </calloutlist>
+ <para>
+ Example 3 (again!):
+ </para>
+ <para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <co id="callout_tests.test_section.c6" linkends="callout_tests.test_section.c7" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ <calloutlist>
+ <callout arearefs="callout_tests.test_section.c6" id="callout_tests.test_section.c7">
+ <important>
+ <para>
+ test
+ </para>
+ </important>
+ </callout>
+ </calloutlist>
+ <para>
+ Example 4:
+ </para>
+ <para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <co id="callout_tests.test_section.c8" linkends="callout_tests.test_section.c9" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
+ <co id="callout_tests.test_section.c10" linkends="callout_tests.test_section.c11" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.test_section.c12" linkends="callout_tests.test_section.c13" />
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ <calloutlist>
+ <callout arearefs="callout_tests.test_section.c8" id="callout_tests.test_section.c9">
+ <para>
+ callout 1
+ </para>
+ </callout>
+ <callout arearefs="callout_tests.test_section.c10" id="callout_tests.test_section.c11">
+ <para>
+ callout 2
+ </para>
+ </callout>
+ <callout arearefs="callout_tests.test_section.c12" id="callout_tests.test_section.c13">
+ <para>
+ create a uniform_int distribution
+ </para>
+ </callout>
+ </calloutlist>
+ <para>
+<programlisting><co id="callout_tests.test_section.c14" linkends="callout_tests.test_section.c15" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.test_section.c16" linkends="callout_tests.test_section.c17" />
+</programlisting>
+ </para>
+ <calloutlist>
+ <callout arearefs="callout_tests.test_section.c14" id="callout_tests.test_section.c15">
+ <para>
+ callout 2
+ </para>
+ </callout>
+ <callout arearefs="callout_tests.test_section.c16" id="callout_tests.test_section.c17">
+ <para>
+ create a uniform_int distribution
+ </para>
+ </callout>
+ </calloutlist>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/callouts-1_5.gold-html b/src/boost/tools/quickbook/test/callouts-1_5.gold-html
new file mode 100644
index 000000000..17319559b
--- /dev/null
+++ b/src/boost/tools/quickbook/test/callouts-1_5.gold-html
@@ -0,0 +1,276 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Callout Tests
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#callout_tests.test_section">Try callouts in a section</a>
+ </li>
+ </ul>
+ </div>
+ <p>
+ Example 1:
+ </p>
+ <p>
+ Now we can define a function that simulates an ordinary six-sided die.
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="identifier">dist</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">6</span><span class="special">);</span> <a href="#callout_tests.c1">(1)</a>
+<span class="special">}</span>
+</pre>
+ </p>
+ <div>
+ <div id="callout_tests.c1">
+ <a href="#callout_tests.c0">(1)</a>
+ <p>
+ create a uniform_int distribution
+ </p>
+ </div>
+ </div>
+ <p>
+ Example 2:
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <a href="#callout_tests.c3">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variate_generator</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mt19937</span><span class="special">&amp;,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">die</span><span class="special">(</span><span class="identifier">gen</span><span class="special">,</span> <span class="identifier">dist</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+ </p>
+ <div>
+ <div id="callout_tests.c3">
+ <a href="#callout_tests.c2">(1)</a>
+ <div class="important">
+ <p>
+ test
+ </p>
+ </div>
+ </div>
+ </div>
+ <p>
+ Example 3:
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <a href="#callout_tests.c5">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variate_generator</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mt19937</span><span class="special">&amp;,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">die</span><span class="special">(</span><span class="identifier">gen</span><span class="special">,</span> <span class="identifier">dist</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+ </p>
+ <div>
+ <div id="callout_tests.c5">
+ <a href="#callout_tests.c4">(1)</a>
+ <div class="important">
+ <p>
+ test
+ </p>
+ </div>
+ </div>
+ </div>
+ <p>
+ Example 3 (again!):
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <a href="#callout_tests.c7">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variate_generator</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mt19937</span><span class="special">&amp;,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">die</span><span class="special">(</span><span class="identifier">gen</span><span class="special">,</span> <span class="identifier">dist</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+ </p>
+ <div>
+ <div id="callout_tests.c7">
+ <a href="#callout_tests.c6">(1)</a>
+ <div class="important">
+ <p>
+ test
+ </p>
+ </div>
+ </div>
+ </div>
+ <p>
+ Example 4:
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <a href="#callout_tests.c9">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variate_generator</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mt19937</span><span class="special">&amp;,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">die</span><span class="special">(</span><span class="identifier">gen</span><span class="special">,</span> <span class="identifier">dist</span><span class="special">);</span>
+ <a href="#callout_tests.c11">(2)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="identifier">dist</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">6</span><span class="special">);</span> <a href="#callout_tests.c13">(3)</a>
+<span class="special">}</span>
+</pre>
+ </p>
+ <div>
+ <div id="callout_tests.c9">
+ <a href="#callout_tests.c8">(1)</a>
+ <p>
+ callout 1
+ </p>
+ </div>
+ <div id="callout_tests.c11">
+ <a href="#callout_tests.c10">(2)</a>
+ <p>
+ callout 2
+ </p>
+ </div>
+ <div id="callout_tests.c13">
+ <a href="#callout_tests.c12">(3)</a>
+ <p>
+ create a uniform_int distribution
+ </p>
+ </div>
+ </div>
+ <p>
+<pre class="programlisting"><a href="#callout_tests.c15">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="identifier">dist</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">6</span><span class="special">);</span> <a href="#callout_tests.c17">(2)</a>
+</pre>
+ </p>
+ <div>
+ <div id="callout_tests.c15">
+ <a href="#callout_tests.c14">(1)</a>
+ <p>
+ callout 2
+ </p>
+ </div>
+ <div id="callout_tests.c17">
+ <a href="#callout_tests.c16">(2)</a>
+ <p>
+ create a uniform_int distribution
+ </p>
+ </div>
+ </div>
+ <div id="callout_tests.test_section">
+ <h3>
+ Try callouts in a section
+ </h3>
+ <div id="callout_tests.test_section">
+ <p>
+ Example 1:
+ </p>
+ <p>
+ Now we can define a function that simulates an ordinary six-sided die.
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="identifier">dist</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">6</span><span class="special">);</span> <a href="#callout_tests.test_section.c1">(1)</a>
+<span class="special">}</span>
+</pre>
+ </p>
+ <div>
+ <div id="callout_tests.test_section.c1">
+ <a href="#callout_tests.test_section.c0">(1)</a>
+ <p>
+ create a uniform_int distribution
+ </p>
+ </div>
+ </div>
+ <p>
+ Example 2:
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <a href="#callout_tests.test_section.c3">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variate_generator</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mt19937</span><span class="special">&amp;,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">die</span><span class="special">(</span><span class="identifier">gen</span><span class="special">,</span> <span class="identifier">dist</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+ </p>
+ <div>
+ <div id="callout_tests.test_section.c3">
+ <a href="#callout_tests.test_section.c2">(1)</a>
+ <div class="important">
+ <p>
+ test
+ </p>
+ </div>
+ </div>
+ </div>
+ <p>
+ Example 3:
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <a href="#callout_tests.test_section.c5">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variate_generator</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mt19937</span><span class="special">&amp;,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">die</span><span class="special">(</span><span class="identifier">gen</span><span class="special">,</span> <span class="identifier">dist</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+ </p>
+ <div>
+ <div id="callout_tests.test_section.c5">
+ <a href="#callout_tests.test_section.c4">(1)</a>
+ <div class="important">
+ <p>
+ test
+ </p>
+ </div>
+ </div>
+ </div>
+ <p>
+ Example 3 (again!):
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <a href="#callout_tests.test_section.c7">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variate_generator</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mt19937</span><span class="special">&amp;,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">die</span><span class="special">(</span><span class="identifier">gen</span><span class="special">,</span> <span class="identifier">dist</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+ </p>
+ <div>
+ <div id="callout_tests.test_section.c7">
+ <a href="#callout_tests.test_section.c6">(1)</a>
+ <div class="important">
+ <p>
+ test
+ </p>
+ </div>
+ </div>
+ </div>
+ <p>
+ Example 4:
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <a href="#callout_tests.test_section.c9">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variate_generator</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mt19937</span><span class="special">&amp;,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">die</span><span class="special">(</span><span class="identifier">gen</span><span class="special">,</span> <span class="identifier">dist</span><span class="special">);</span>
+ <a href="#callout_tests.test_section.c11">(2)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="identifier">dist</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">6</span><span class="special">);</span> <a href="#callout_tests.test_section.c13">(3)</a>
+<span class="special">}</span>
+</pre>
+ </p>
+ <div>
+ <div id="callout_tests.test_section.c9">
+ <a href="#callout_tests.test_section.c8">(1)</a>
+ <p>
+ callout 1
+ </p>
+ </div>
+ <div id="callout_tests.test_section.c11">
+ <a href="#callout_tests.test_section.c10">(2)</a>
+ <p>
+ callout 2
+ </p>
+ </div>
+ <div id="callout_tests.test_section.c13">
+ <a href="#callout_tests.test_section.c12">(3)</a>
+ <p>
+ create a uniform_int distribution
+ </p>
+ </div>
+ </div>
+ <p>
+<pre class="programlisting"><a href="#callout_tests.test_section.c15">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="identifier">dist</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">6</span><span class="special">);</span> <a href="#callout_tests.test_section.c17">(2)</a>
+</pre>
+ </p>
+ <div>
+ <div id="callout_tests.test_section.c15">
+ <a href="#callout_tests.test_section.c14">(1)</a>
+ <p>
+ callout 2
+ </p>
+ </div>
+ <div id="callout_tests.test_section.c17">
+ <a href="#callout_tests.test_section.c16">(2)</a>
+ <p>
+ create a uniform_int distribution
+ </p>
+ </div>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/callouts-1_5.quickbook b/src/boost/tools/quickbook/test/callouts-1_5.quickbook
new file mode 100644
index 000000000..b17e90489
--- /dev/null
+++ b/src/boost/tools/quickbook/test/callouts-1_5.quickbook
@@ -0,0 +1,51 @@
+[article Callout Tests
+ [quickbook 1.5]
+]
+
+[import callouts.cpp]
+
+Example 1:
+
+[example1]
+
+Example 2:
+
+[example2]
+
+Example 3:
+
+[example3]
+
+Example 3 (again!):
+
+[example3]
+
+Example 4:
+
+[example4]
+[example4a]
+
+[section:test_section Try callouts in a section]
+
+Example 1:
+
+[example1]
+
+Example 2:
+
+[example2]
+
+Example 3:
+
+[example3]
+
+Example 3 (again!):
+
+[example3]
+
+Example 4:
+
+[example4]
+[example4a]
+
+[endsect] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/callouts-1_7.gold b/src/boost/tools/quickbook/test/callouts-1_7.gold
new file mode 100644
index 000000000..5d2c2d154
--- /dev/null
+++ b/src/boost/tools/quickbook/test/callouts-1_7.gold
@@ -0,0 +1,249 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="callout_tests" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Callout Tests</title>
+ <para>
+ Example 1:
+ </para>
+ <para>
+ Now we can define a function that simulates an ordinary six-sided die.
+ </para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.c0" linkends="callout_tests.c1" />
+<phrase role="special">}</phrase>
+</programlisting>
+ <calloutlist>
+ <callout arearefs="callout_tests.c0" id="callout_tests.c1">
+ <para>
+ create a uniform_int distribution
+ </para>
+ </callout>
+ </calloutlist>
+ <para>
+ Example 2:
+ </para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <co id="callout_tests.c2" linkends="callout_tests.c3" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ <calloutlist>
+ <callout arearefs="callout_tests.c2" id="callout_tests.c3">
+ <important>
+ <para>
+ test
+ </para>
+ </important>
+ </callout>
+ </calloutlist>
+ <para>
+ Example 3:
+ </para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <co id="callout_tests.c4" linkends="callout_tests.c5" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ <calloutlist>
+ <callout arearefs="callout_tests.c4" id="callout_tests.c5">
+ <important>
+ <para>
+ test
+ </para>
+ </important>
+ </callout>
+ </calloutlist>
+ <para>
+ Example 3 (again!):
+ </para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <co id="callout_tests.c6" linkends="callout_tests.c7" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ <calloutlist>
+ <callout arearefs="callout_tests.c6" id="callout_tests.c7">
+ <important>
+ <para>
+ test
+ </para>
+ </important>
+ </callout>
+ </calloutlist>
+ <para>
+ Example 4:
+ </para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <co id="callout_tests.c8" linkends="callout_tests.c9" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
+ <co id="callout_tests.c10" linkends="callout_tests.c11" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.c12" linkends="callout_tests.c13" />
+<phrase role="special">}</phrase>
+</programlisting>
+ <calloutlist>
+ <callout arearefs="callout_tests.c8" id="callout_tests.c9">
+ <para>
+ callout 1
+ </para>
+ </callout>
+ <callout arearefs="callout_tests.c10" id="callout_tests.c11">
+ <para>
+ callout 2
+ </para>
+ </callout>
+ <callout arearefs="callout_tests.c12" id="callout_tests.c13">
+ <para>
+ create a uniform_int distribution
+ </para>
+ </callout>
+ </calloutlist>
+<programlisting><co id="callout_tests.c14" linkends="callout_tests.c15" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.c16" linkends="callout_tests.c17" />
+</programlisting>
+ <calloutlist>
+ <callout arearefs="callout_tests.c14" id="callout_tests.c15">
+ <para>
+ callout 2
+ </para>
+ </callout>
+ <callout arearefs="callout_tests.c16" id="callout_tests.c17">
+ <para>
+ create a uniform_int distribution
+ </para>
+ </callout>
+ </calloutlist>
+ <section id="callout_tests.test_section">
+ <title><link linkend="callout_tests.test_section">Try callouts in a section</link></title>
+ <para>
+ Example 1:
+ </para>
+ <para>
+ Now we can define a function that simulates an ordinary six-sided die.
+ </para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.test_section.c0" linkends="callout_tests.test_section.c1" />
+<phrase role="special">}</phrase>
+</programlisting>
+ <calloutlist>
+ <callout arearefs="callout_tests.test_section.c0" id="callout_tests.test_section.c1">
+ <para>
+ create a uniform_int distribution
+ </para>
+ </callout>
+ </calloutlist>
+ <para>
+ Example 2:
+ </para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <co id="callout_tests.test_section.c2" linkends="callout_tests.test_section.c3" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ <calloutlist>
+ <callout arearefs="callout_tests.test_section.c2" id="callout_tests.test_section.c3">
+ <important>
+ <para>
+ test
+ </para>
+ </important>
+ </callout>
+ </calloutlist>
+ <para>
+ Example 3:
+ </para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <co id="callout_tests.test_section.c4" linkends="callout_tests.test_section.c5" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ <calloutlist>
+ <callout arearefs="callout_tests.test_section.c4" id="callout_tests.test_section.c5">
+ <important>
+ <para>
+ test
+ </para>
+ </important>
+ </callout>
+ </calloutlist>
+ <para>
+ Example 3 (again!):
+ </para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <co id="callout_tests.test_section.c6" linkends="callout_tests.test_section.c7" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ <calloutlist>
+ <callout arearefs="callout_tests.test_section.c6" id="callout_tests.test_section.c7">
+ <important>
+ <para>
+ test
+ </para>
+ </important>
+ </callout>
+ </calloutlist>
+ <para>
+ Example 4:
+ </para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <co id="callout_tests.test_section.c8" linkends="callout_tests.test_section.c9" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
+ <co id="callout_tests.test_section.c10" linkends="callout_tests.test_section.c11" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.test_section.c12" linkends="callout_tests.test_section.c13" />
+<phrase role="special">}</phrase>
+</programlisting>
+ <calloutlist>
+ <callout arearefs="callout_tests.test_section.c8" id="callout_tests.test_section.c9">
+ <para>
+ callout 1
+ </para>
+ </callout>
+ <callout arearefs="callout_tests.test_section.c10" id="callout_tests.test_section.c11">
+ <para>
+ callout 2
+ </para>
+ </callout>
+ <callout arearefs="callout_tests.test_section.c12" id="callout_tests.test_section.c13">
+ <para>
+ create a uniform_int distribution
+ </para>
+ </callout>
+ </calloutlist>
+<programlisting><co id="callout_tests.test_section.c14" linkends="callout_tests.test_section.c15" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.test_section.c16" linkends="callout_tests.test_section.c17" />
+</programlisting>
+ <calloutlist>
+ <callout arearefs="callout_tests.test_section.c14" id="callout_tests.test_section.c15">
+ <para>
+ callout 2
+ </para>
+ </callout>
+ <callout arearefs="callout_tests.test_section.c16" id="callout_tests.test_section.c17">
+ <para>
+ create a uniform_int distribution
+ </para>
+ </callout>
+ </calloutlist>
+ </section>
+ <section id="callout_tests.blocks">
+ <title><link linkend="callout_tests.blocks">Callouts in code blocks</link></title>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.blocks.c0" linkends="callout_tests.blocks.c1" />
+<phrase role="special">}</phrase>
+</programlisting>
+ <calloutlist>
+ <callout arearefs="callout_tests.blocks.c0" id="callout_tests.blocks.c1">
+ <para>
+ create a uniform_int distribution
+ </para>
+ </callout>
+ </calloutlist>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <co id="callout_tests.blocks.c2" linkends="callout_tests.blocks.c3" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ <calloutlist>
+ <callout arearefs="callout_tests.blocks.c2" id="callout_tests.blocks.c3">
+ <important>
+ <para>
+ test
+ </para>
+ </important>
+ </callout>
+ </calloutlist>
+ <para>
+ <code><phrase role="comment">/*&lt; This shouldn't be a callout &gt;*/</phrase></code>
+ </para>
+ <para>Silly test<co linkends="silly-callout"/></para>
+<calloutlist><callout id="silly-callout"><para>silly</para></callout></calloutlist>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/callouts-1_7.gold-html b/src/boost/tools/quickbook/test/callouts-1_7.gold-html
new file mode 100644
index 000000000..4ca439bb2
--- /dev/null
+++ b/src/boost/tools/quickbook/test/callouts-1_7.gold-html
@@ -0,0 +1,302 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Callout Tests
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#callout_tests.test_section">Try callouts in a section</a>
+ </li>
+ <li>
+ <a href="#callout_tests.blocks">Callouts in code blocks</a>
+ </li>
+ </ul>
+ </div>
+ <p>
+ Example 1:
+ </p>
+ <p>
+ Now we can define a function that simulates an ordinary six-sided die.
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="identifier">dist</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">6</span><span class="special">);</span> <a href="#callout_tests.c1">(1)</a>
+<span class="special">}</span>
+</pre>
+ <div>
+ <div id="callout_tests.c1">
+ <a href="#callout_tests.c0">(1)</a>
+ <p>
+ create a uniform_int distribution
+ </p>
+ </div>
+ </div>
+ <p>
+ Example 2:
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <a href="#callout_tests.c3">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variate_generator</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mt19937</span><span class="special">&amp;,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">die</span><span class="special">(</span><span class="identifier">gen</span><span class="special">,</span> <span class="identifier">dist</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+ <div>
+ <div id="callout_tests.c3">
+ <a href="#callout_tests.c2">(1)</a>
+ <div class="important">
+ <p>
+ test
+ </p>
+ </div>
+ </div>
+ </div>
+ <p>
+ Example 3:
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <a href="#callout_tests.c5">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variate_generator</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mt19937</span><span class="special">&amp;,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">die</span><span class="special">(</span><span class="identifier">gen</span><span class="special">,</span> <span class="identifier">dist</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+ <div>
+ <div id="callout_tests.c5">
+ <a href="#callout_tests.c4">(1)</a>
+ <div class="important">
+ <p>
+ test
+ </p>
+ </div>
+ </div>
+ </div>
+ <p>
+ Example 3 (again!):
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <a href="#callout_tests.c7">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variate_generator</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mt19937</span><span class="special">&amp;,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">die</span><span class="special">(</span><span class="identifier">gen</span><span class="special">,</span> <span class="identifier">dist</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+ <div>
+ <div id="callout_tests.c7">
+ <a href="#callout_tests.c6">(1)</a>
+ <div class="important">
+ <p>
+ test
+ </p>
+ </div>
+ </div>
+ </div>
+ <p>
+ Example 4:
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <a href="#callout_tests.c9">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variate_generator</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mt19937</span><span class="special">&amp;,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">die</span><span class="special">(</span><span class="identifier">gen</span><span class="special">,</span> <span class="identifier">dist</span><span class="special">);</span>
+ <a href="#callout_tests.c11">(2)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="identifier">dist</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">6</span><span class="special">);</span> <a href="#callout_tests.c13">(3)</a>
+<span class="special">}</span>
+</pre>
+ <div>
+ <div id="callout_tests.c9">
+ <a href="#callout_tests.c8">(1)</a>
+ <p>
+ callout 1
+ </p>
+ </div>
+ <div id="callout_tests.c11">
+ <a href="#callout_tests.c10">(2)</a>
+ <p>
+ callout 2
+ </p>
+ </div>
+ <div id="callout_tests.c13">
+ <a href="#callout_tests.c12">(3)</a>
+ <p>
+ create a uniform_int distribution
+ </p>
+ </div>
+ </div>
+<pre class="programlisting"><a href="#callout_tests.c15">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="identifier">dist</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">6</span><span class="special">);</span> <a href="#callout_tests.c17">(2)</a>
+</pre>
+ <div>
+ <div id="callout_tests.c15">
+ <a href="#callout_tests.c14">(1)</a>
+ <p>
+ callout 2
+ </p>
+ </div>
+ <div id="callout_tests.c17">
+ <a href="#callout_tests.c16">(2)</a>
+ <p>
+ create a uniform_int distribution
+ </p>
+ </div>
+ </div>
+ <div id="callout_tests.test_section">
+ <h3>
+ Try callouts in a section
+ </h3>
+ <div id="callout_tests.test_section">
+ <p>
+ Example 1:
+ </p>
+ <p>
+ Now we can define a function that simulates an ordinary six-sided die.
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="identifier">dist</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">6</span><span class="special">);</span> <a href="#callout_tests.test_section.c1">(1)</a>
+<span class="special">}</span>
+</pre>
+ <div>
+ <div id="callout_tests.test_section.c1">
+ <a href="#callout_tests.test_section.c0">(1)</a>
+ <p>
+ create a uniform_int distribution
+ </p>
+ </div>
+ </div>
+ <p>
+ Example 2:
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <a href="#callout_tests.test_section.c3">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variate_generator</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mt19937</span><span class="special">&amp;,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">die</span><span class="special">(</span><span class="identifier">gen</span><span class="special">,</span> <span class="identifier">dist</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+ <div>
+ <div id="callout_tests.test_section.c3">
+ <a href="#callout_tests.test_section.c2">(1)</a>
+ <div class="important">
+ <p>
+ test
+ </p>
+ </div>
+ </div>
+ </div>
+ <p>
+ Example 3:
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <a href="#callout_tests.test_section.c5">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variate_generator</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mt19937</span><span class="special">&amp;,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">die</span><span class="special">(</span><span class="identifier">gen</span><span class="special">,</span> <span class="identifier">dist</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+ <div>
+ <div id="callout_tests.test_section.c5">
+ <a href="#callout_tests.test_section.c4">(1)</a>
+ <div class="important">
+ <p>
+ test
+ </p>
+ </div>
+ </div>
+ </div>
+ <p>
+ Example 3 (again!):
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <a href="#callout_tests.test_section.c7">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variate_generator</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mt19937</span><span class="special">&amp;,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">die</span><span class="special">(</span><span class="identifier">gen</span><span class="special">,</span> <span class="identifier">dist</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+ <div>
+ <div id="callout_tests.test_section.c7">
+ <a href="#callout_tests.test_section.c6">(1)</a>
+ <div class="important">
+ <p>
+ test
+ </p>
+ </div>
+ </div>
+ </div>
+ <p>
+ Example 4:
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <a href="#callout_tests.test_section.c9">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variate_generator</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mt19937</span><span class="special">&amp;,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">die</span><span class="special">(</span><span class="identifier">gen</span><span class="special">,</span> <span class="identifier">dist</span><span class="special">);</span>
+ <a href="#callout_tests.test_section.c11">(2)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="identifier">dist</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">6</span><span class="special">);</span> <a href="#callout_tests.test_section.c13">(3)</a>
+<span class="special">}</span>
+</pre>
+ <div>
+ <div id="callout_tests.test_section.c9">
+ <a href="#callout_tests.test_section.c8">(1)</a>
+ <p>
+ callout 1
+ </p>
+ </div>
+ <div id="callout_tests.test_section.c11">
+ <a href="#callout_tests.test_section.c10">(2)</a>
+ <p>
+ callout 2
+ </p>
+ </div>
+ <div id="callout_tests.test_section.c13">
+ <a href="#callout_tests.test_section.c12">(3)</a>
+ <p>
+ create a uniform_int distribution
+ </p>
+ </div>
+ </div>
+<pre class="programlisting"><a href="#callout_tests.test_section.c15">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="identifier">dist</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">6</span><span class="special">);</span> <a href="#callout_tests.test_section.c17">(2)</a>
+</pre>
+ <div>
+ <div id="callout_tests.test_section.c15">
+ <a href="#callout_tests.test_section.c14">(1)</a>
+ <p>
+ callout 2
+ </p>
+ </div>
+ <div id="callout_tests.test_section.c17">
+ <a href="#callout_tests.test_section.c16">(2)</a>
+ <p>
+ create a uniform_int distribution
+ </p>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="callout_tests.blocks">
+ <h3>
+ Callouts in code blocks
+ </h3>
+ <div id="callout_tests.blocks">
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="identifier">dist</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="number">6</span><span class="special">);</span> <a href="#callout_tests.blocks.c1">(1)</a>
+<span class="special">}</span>
+</pre>
+ <div>
+ <div id="callout_tests.blocks.c1">
+ <a href="#callout_tests.blocks.c0">(1)</a>
+ <p>
+ create a uniform_int distribution
+ </p>
+ </div>
+ </div>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">roll_die</span><span class="special">()</span> <span class="special">{</span>
+ <a href="#callout_tests.blocks.c3">(1)</a><span class="identifier">boost</span><span class="special">::</span><span class="identifier">variate_generator</span><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">mt19937</span><span class="special">&amp;,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">uniform_int</span><span class="special">&lt;&gt;</span> <span class="special">&gt;</span> <span class="identifier">die</span><span class="special">(</span><span class="identifier">gen</span><span class="special">,</span> <span class="identifier">dist</span><span class="special">);</span>
+<span class="special">}</span>
+</pre>
+ <div>
+ <div id="callout_tests.blocks.c3">
+ <a href="#callout_tests.blocks.c2">(1)</a>
+ <div class="important">
+ <p>
+ test
+ </p>
+ </div>
+ </div>
+ </div>
+ <p>
+ <code><span class="comment">/*&lt; This shouldn't be a callout &gt;*/</span></code>
+ </p>
+ <p>
+ Silly test<a href="#silly-callout">(1)</a>
+ </p>
+ <div>
+ <div id="silly-callout">
+ (1)
+ <p>
+ silly
+ </p>
+ </div>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/callouts-1_7.quickbook b/src/boost/tools/quickbook/test/callouts-1_7.quickbook
new file mode 100644
index 000000000..5361ba900
--- /dev/null
+++ b/src/boost/tools/quickbook/test/callouts-1_7.quickbook
@@ -0,0 +1,73 @@
+[article Callout Tests
+ [quickbook 1.7]
+]
+
+[import callouts.cpp]
+
+Example 1:
+
+[example1]
+
+Example 2:
+
+[example2]
+
+Example 3:
+
+[example3]
+
+Example 3 (again!):
+
+[example3]
+
+Example 4:
+
+[example4]
+[example4a]
+
+[section:test_section Try callouts in a section]
+
+Example 1:
+
+[example1]
+
+Example 2:
+
+[example2]
+
+Example 3:
+
+[example3]
+
+Example 3 (again!):
+
+[example3]
+
+Example 4:
+
+[example4]
+[example4a]
+
+[endsect]
+
+[section:blocks Callouts in code blocks]
+
+ int roll_die() {
+ boost::uniform_int<> dist(1, 6); /*< create a uniform_int distribution >*/
+ }
+
+```
+int roll_die() {
+ /*<< [important test] >>*/
+ boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist);
+}
+```
+
+`/*< This shouldn't be a callout >*/`
+
+[block'''
+<para>Silly test<co linkends="silly-callout"/></para>
+<calloutlist><callout id="silly-callout"><para>silly</para></callout></calloutlist>
+''']
+
+[endsect]
diff --git a/src/boost/tools/quickbook/test/callouts.cpp b/src/boost/tools/quickbook/test/callouts.cpp
new file mode 100644
index 000000000..8506a93f1
--- /dev/null
+++ b/src/boost/tools/quickbook/test/callouts.cpp
@@ -0,0 +1,52 @@
+
+// Copyright 2009 Daniel James.
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or move at http://www.boost.org/LICENSE_1_0.txt)
+
+// clang-format off
+
+/*< This shouldn't be used. >*/
+
+//[ example1
+
+/*`
+ Now we can define a function that simulates an ordinary
+ six-sided die.
+*/
+int roll_die() {
+ boost::uniform_int<> dist(1, 6); /*< create a uniform_int distribution >*/
+}
+
+//]
+
+//[ example2
+
+int roll_die() {
+ /*<< [important test] >>*/
+ boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist);
+}
+
+//]
+
+//[ example3
+
+int roll_die() {
+ /*<< [important test]
+ >>*/
+ boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist);
+}
+
+//]
+
+//[ example4
+
+int roll_die() {
+ /*<< callout 1 >>*/
+ boost::variate_generator<boost::mt19937&, boost::uniform_int<> > die(gen, dist);
+//[ example4a
+ /*<< callout 2 >>*/
+ boost::uniform_int<> dist(1, 6); /*< create a uniform_int distribution >*/
+//]
+}
+
+//]
diff --git a/src/boost/tools/quickbook/test/code-1_1.gold b/src/boost/tools/quickbook/test/code-1_1.gold
new file mode 100644
index 000000000..d7382593b
--- /dev/null
+++ b/src/boost/tools/quickbook/test/code-1_1.gold
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="code_block" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Code Block</title>
+ <section id="code_block.test_1">
+ <title>Test 1</title>
+ <para>
+ A code block with proper indentation ;-)
+ </para>
+<programlisting><phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">iostream</phrase><phrase role="special">&gt;</phrase>
+
+<phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;Hello, World!&quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </section>
+ <section id="code_block.test_2">
+ <title>Test 2</title>
+ <para>
+ A code block with proper indentation ;-)
+ </para>
+ <para>
+<programlisting><phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">iostream</phrase><phrase role="special">&gt;</phrase>
+
+<phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;Hello, World!&quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ </section>
+ <section id="code_block.test_3">
+ <title>Test 3</title>
+ <para>
+<programlisting><phrase role="keyword">print</phrase> <phrase role="string">&quot;\xfabln\xeck&quot;</phrase>
+</programlisting>
+ </para>
+ </section>
+ <section id="code_block.test_4">
+ <title>Test 4</title>
+ <para>
+ This isn't valid C++ but I think we should accept it;
+ </para>
+ <para>
+<programlisting><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase><phrase role="special">&lt;&lt;</phrase><phrase role="string">&quot;\xfabln\xeck&quot;</phrase><phrase role="special">&lt;&lt;</phrase><phrase role="string">&quot;\n&quot;</phrase><phrase role="special">;</phrase>
+</programlisting>
+ </para>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/code-1_1.gold-html b/src/boost/tools/quickbook/test/code-1_1.gold-html
new file mode 100644
index 000000000..3c676ecc2
--- /dev/null
+++ b/src/boost/tools/quickbook/test/code-1_1.gold-html
@@ -0,0 +1,91 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Code Block
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#code_block.test_1">Test 1</a>
+ </li>
+ <li>
+ <a href="#code_block.test_2">Test 2</a>
+ </li>
+ <li>
+ <a href="#code_block.test_3">Test 3</a>
+ </li>
+ <li>
+ <a href="#code_block.test_4">Test 4</a>
+ </li>
+ </ul>
+ </div>
+ <div id="code_block.test_1">
+ <h3>
+ Test 1
+ </h3>
+ <div id="code_block.test_1">
+ <p>
+ A code block with proper indentation ;-)
+ </p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">&quot;Hello, World!&quot;</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+ </div>
+ </div>
+ <div id="code_block.test_2">
+ <h3>
+ Test 2
+ </h3>
+ <div id="code_block.test_2">
+ <p>
+ A code block with proper indentation ;-)
+ </p>
+ <p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">&quot;Hello, World!&quot;</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+ </p>
+ </div>
+ </div>
+ <div id="code_block.test_3">
+ <h3>
+ Test 3
+ </h3>
+ <div id="code_block.test_3">
+ <p>
+<pre class="programlisting"><span class="keyword">print</span> <span class="string">&quot;\xfabln\xeck&quot;</span>
+</pre>
+ </p>
+ </div>
+ </div>
+ <div id="code_block.test_4">
+ <h3>
+ Test 4
+ </h3>
+ <div id="code_block.test_4">
+ <p>
+ This isn't valid C++ but I think we should accept it;
+ </p>
+ <p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span><span class="special">&lt;&lt;</span><span class="string">&quot;\xfabln\xeck&quot;</span><span class="special">&lt;&lt;</span><span class="string">&quot;\n&quot;</span><span class="special">;</span>
+</pre>
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/code-1_1.quickbook b/src/boost/tools/quickbook/test/code-1_1.quickbook
new file mode 100644
index 000000000..8c800911a
--- /dev/null
+++ b/src/boost/tools/quickbook/test/code-1_1.quickbook
@@ -0,0 +1,51 @@
+[article Code Block]
+
+[section Test 1]
+
+A code block with proper indentation ;-)
+
+ #include <iostream>
+
+ int main()
+ {
+ std::cout << "Hello, World!" << std::endl;
+ return 0;
+ }
+
+[endsect]
+
+[section Test 2]
+
+A code block with proper indentation ;-)
+
+``
+ #include <iostream>
+
+ int main()
+ {
+ std::cout << "Hello, World!" << std::endl;
+ return 0;
+ }
+``
+
+[endsect]
+
+[section Test 3]
+
+[python]
+``
+ print "\xfabln\xeck"
+``
+
+[endsect]
+
+[section Test 4]
+
+This isn't valid C++ but I think we should accept it;
+
+[c++]
+``
+ std::cout<<"\xfabln\xeck"<<"\n";
+``
+
+[endsect]
diff --git a/src/boost/tools/quickbook/test/code-1_5.gold b/src/boost/tools/quickbook/test/code-1_5.gold
new file mode 100644
index 000000000..8ca228126
--- /dev/null
+++ b/src/boost/tools/quickbook/test/code-1_5.gold
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="indented_code_blocks" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Indented code blocks</title>
+ <para>
+ In a paragraph. Still in a paragraph.
+ </para>
+<programlisting>In a code block.
+</programlisting>
+ <para>
+ Back in a paragraph.
+ </para>
+<programlisting> Code block line 1.
+Code block line 2.
+ Code block line 3.
+</programlisting>
+ <para>
+ Paragraph.
+ </para>
+<programlisting>Code block with no trailing blank lines.
+</programlisting>
+ <para>
+ Paragraph.
+ </para>
+ <bridgehead renderas="sect2" id="indented_code_blocks.h0">
+ <phrase id="indented_code_blocks.code_blocks_separated_by_comment"/><link linkend="indented_code_blocks.code_blocks_separated_by_comment">Code
+ blocks separated by comment</link>
+ </bridgehead>
+<programlisting>First code block.
+</programlisting>
+<programlisting>Second code block.
+[/ Comment in second code block]
+Still second code block.
+[/ Comment trailing second code block]
+</programlisting>
+</article>
diff --git a/src/boost/tools/quickbook/test/code-1_5.gold-html b/src/boost/tools/quickbook/test/code-1_5.gold-html
new file mode 100644
index 000000000..02164d1b9
--- /dev/null
+++ b/src/boost/tools/quickbook/test/code-1_5.gold-html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Indented code blocks
+ </h3>
+ <p>
+ In a paragraph. Still in a paragraph.
+ </p>
+<pre class="programlisting">In a code block.
+</pre>
+ <p>
+ Back in a paragraph.
+ </p>
+<pre class="programlisting"> Code block line 1.
+Code block line 2.
+ Code block line 3.
+</pre>
+ <p>
+ Paragraph.
+ </p>
+<pre class="programlisting">Code block with no trailing blank lines.
+</pre>
+ <p>
+ Paragraph.
+ </p>
+ <h2 id="indented_code_blocks.code_blocks_separated_by_comment">
+ Code blocks separated by comment
+ </h2>
+<pre class="programlisting">First code block.
+</pre>
+<pre class="programlisting">Second code block.
+[/ Comment in second code block]
+Still second code block.
+[/ Comment trailing second code block]
+</pre>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/code-1_5.quickbook b/src/boost/tools/quickbook/test/code-1_5.quickbook
new file mode 100644
index 000000000..de377a64f
--- /dev/null
+++ b/src/boost/tools/quickbook/test/code-1_5.quickbook
@@ -0,0 +1,29 @@
+[article Indented code blocks
+ [quickbook 1.5]
+ [source-mode teletype]
+]
+
+In a paragraph.
+ Still in a paragraph.
+
+ In a code block.
+
+Back in a paragraph.
+
+ Code block line 1.
+ Code block line 2.
+ Code block line 3.
+
+Paragraph.
+
+ Code block with no trailing blank lines.
+Paragraph.
+
+[heading Code blocks separated by comment]
+
+ First code block.
+[/ Comment]
+ Second code block.
+ [/ Comment in second code block]
+ Still second code block.
+ [/ Comment trailing second code block]
diff --git a/src/boost/tools/quickbook/test/code_cpp-1_5.gold b/src/boost/tools/quickbook/test/code_cpp-1_5.gold
new file mode 100644
index 000000000..d0bc79a3f
--- /dev/null
+++ b/src/boost/tools/quickbook/test/code_cpp-1_5.gold
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="c___code_blocks" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>C++ Code Blocks</title>
+<programlisting><phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">some_header</phrase><phrase role="special">&gt;</phrase>
+ <phrase role="preprocessor">#include</phrase> <phrase role="string">&quot;another_header.hpp&quot;</phrase>
+<phrase role="preprocessor"># define</phrase> <phrase role="identifier">A_MACRO</phrase> <phrase role="identifier">value</phrase>
+<phrase role="preprocessor">#define</phrase> <phrase role="identifier">stringize</phrase><phrase role="special">(</phrase><phrase role="identifier">hello</phrase><phrase role="special">)</phrase> <phrase role="special">#</phrase><phrase role="identifier">hello</phrase>
+<phrase role="comment">// No escape</phrase>
+<phrase role="comment">/* No escape */</phrase>
+<phrase role="comment">/* No escape
+ * with newlines
+ */</phrase>
+<phrase role="comment">// In Header: &lt;<ulink url="boost:/boost/optional/optional.hpp">boost/optional/optional.hpp</ulink>&gt;</phrase>
+<phrase role="comment">/* In Header: &lt;<ulink url="boost:/boost/optional/optional.hpp">boost/optional/optional.hpp</ulink>&gt; */</phrase>
+<phrase role="comment">/* Multiple escapes: <emphasis>italic</emphasis>
+ * <emphasis role="underline">underline</emphasis><emphasis role="bold">bold</emphasis>
+ */</phrase>
+<phrase role="comment">/* Token pasting: */</phrase> <phrase role="identifier">a</phrase><phrase role="special">##</phrase><phrase role="identifier">b</phrase>
+</programlisting>
+ <para>
+ A badly formed comment:
+ </para>
+<programlisting><phrase role="comment">/* Oh dear
+</phrase></programlisting>
+ <para>
+ A badly formed comment with an escape:
+ </para>
+<programlisting><phrase role="comment">/* Oh dear <emphasis role="bold">bold</emphasis>
+</phrase></programlisting>
+ <para>
+ Just some code:
+ </para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <phrase role="keyword">constexpr</phrase> <phrase role="keyword">char32_t</phrase> <phrase role="identifier">x</phrase> <phrase role="special">=</phrase> <phrase role="char">'a'</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">const</phrase> <phrase role="keyword">auto</phrase> <phrase role="identifier">y</phrase> <phrase role="special">=</phrase> <phrase role="identifier">x</phrase> <phrase role="special">-</phrase> <phrase role="char">' '</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+</article>
diff --git a/src/boost/tools/quickbook/test/code_cpp-1_5.gold-html b/src/boost/tools/quickbook/test/code_cpp-1_5.gold-html
new file mode 100644
index 000000000..9fd45cd28
--- /dev/null
+++ b/src/boost/tools/quickbook/test/code_cpp-1_5.gold-html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ C++ Code Blocks
+ </h3>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">some_header</span><span class="special">&gt;</span>
+ <span class="preprocessor">#include</span> <span class="string">&quot;another_header.hpp&quot;</span>
+<span class="preprocessor"># define</span> <span class="identifier">A_MACRO</span> <span class="identifier">value</span>
+<span class="preprocessor">#define</span> <span class="identifier">stringize</span><span class="special">(</span><span class="identifier">hello</span><span class="special">)</span> <span class="special">#</span><span class="identifier">hello</span>
+<span class="comment">// No escape</span>
+<span class="comment">/* No escape */</span>
+<span class="comment">/* No escape
+ * with newlines
+ */</span>
+<span class="comment">// In Header: &lt;<a href="http://www.boost.org/doc/libs/release/boost/optional/optional.hpp">boost/optional/optional.hpp</a>&gt;</span>
+<span class="comment">/* In Header: &lt;<a href="http://www.boost.org/doc/libs/release/boost/optional/optional.hpp">boost/optional/optional.hpp</a>&gt; */</span>
+<span class="comment">/* Multiple escapes: <span class="emphasis"><em>italic</em></span>
+ * <span class="underline">underline</span><span class="bold"><strong>bold</strong></span>
+ */</span>
+<span class="comment">/* Token pasting: */</span> <span class="identifier">a</span><span class="special">##</span><span class="identifier">b</span>
+</pre>
+ <p>
+ A badly formed comment:
+ </p>
+<pre class="programlisting"><span class="comment">/* Oh dear
+</span></pre>
+ <p>
+ A badly formed comment with an escape:
+ </p>
+<pre class="programlisting"><span class="comment">/* Oh dear <span class="bold"><strong>bold</strong></span>
+</span></pre>
+ <p>
+ Just some code:
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{</span>
+ <span class="keyword">constexpr</span> <span class="keyword">char32_t</span> <span class="identifier">x</span> <span class="special">=</span> <span class="char">'a'</span><span class="special">;</span>
+ <span class="keyword">const</span> <span class="keyword">auto</span> <span class="identifier">y</span> <span class="special">=</span> <span class="identifier">x</span> <span class="special">-</span> <span class="char">' '</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/code_cpp-1_5.quickbook b/src/boost/tools/quickbook/test/code_cpp-1_5.quickbook
new file mode 100644
index 000000000..fdaa926bb
--- /dev/null
+++ b/src/boost/tools/quickbook/test/code_cpp-1_5.quickbook
@@ -0,0 +1,34 @@
+[article C++ Code Blocks
+[quickbook 1.5]
+]
+
+ #include <some_header>
+ #include "another_header.hpp"
+ # define A_MACRO value
+ #define stringize(hello) #hello
+ // No escape
+ /* No escape */
+ /* No escape
+ * with newlines
+ */
+ // In Header: <``[@boost:/boost/optional/optional.hpp boost/optional/optional.hpp]``>
+ /* In Header: <``[@boost:/boost/optional/optional.hpp boost/optional/optional.hpp]``> */
+ /* Multiple escapes: ``/italic/``
+ * ``_underline_````*bold*``
+ */
+ /* Token pasting: */ a##b
+
+A badly formed comment:
+
+ /* Oh dear
+
+A badly formed comment with an escape:
+
+ /* Oh dear ``*bold*``
+
+Just some code:
+
+ int main() {
+ constexpr char32_t x = 'a';
+ const auto y = x - ' ';
+ }
diff --git a/src/boost/tools/quickbook/test/code_cpp_mismatched_escape-1_4-fail.quickbook b/src/boost/tools/quickbook/test/code_cpp_mismatched_escape-1_4-fail.quickbook
new file mode 100644
index 000000000..d5d332c17
--- /dev/null
+++ b/src/boost/tools/quickbook/test/code_cpp_mismatched_escape-1_4-fail.quickbook
@@ -0,0 +1,5 @@
+[article Odd code markup. [quickbook 1.4] ]
+
+[c++]
+
+ `` int main() {}
diff --git a/src/boost/tools/quickbook/test/code_python-1_5.gold b/src/boost/tools/quickbook/test/code_python-1_5.gold
new file mode 100644
index 000000000..239d1470a
--- /dev/null
+++ b/src/boost/tools/quickbook/test/code_python-1_5.gold
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="python_code_blocks" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Python Code Blocks</title>
+<programlisting><phrase role="comment"># No escape</phrase>
+<phrase role="comment"># Escape: <emphasis role="bold">bold</emphasis></phrase>
+<phrase role="comment"># Escape: <emphasis role="underline">underline</emphasis><emphasis>italic</emphasis></phrase>
+</programlisting>
+</article>
diff --git a/src/boost/tools/quickbook/test/code_python-1_5.gold-html b/src/boost/tools/quickbook/test/code_python-1_5.gold-html
new file mode 100644
index 000000000..15a7739b1
--- /dev/null
+++ b/src/boost/tools/quickbook/test/code_python-1_5.gold-html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Python Code Blocks
+ </h3>
+<pre class="programlisting"><span class="comment"># No escape</span>
+<span class="comment"># Escape: <span class="bold"><strong>bold</strong></span></span>
+<span class="comment"># Escape: <span class="underline">underline</span><span class="emphasis"><em>italic</em></span></span>
+</pre>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/code_python-1_5.quickbook b/src/boost/tools/quickbook/test/code_python-1_5.quickbook
new file mode 100644
index 000000000..45e700ecb
--- /dev/null
+++ b/src/boost/tools/quickbook/test/code_python-1_5.quickbook
@@ -0,0 +1,8 @@
+[article Python Code Blocks
+[quickbook 1.5]
+[source-mode python]
+]
+
+ # No escape
+ # Escape: ``*bold*``
+ # Escape: ``_underline_````/italic/``
diff --git a/src/boost/tools/quickbook/test/code_python_mismatched_escape-1_4-fail.quickbook b/src/boost/tools/quickbook/test/code_python_mismatched_escape-1_4-fail.quickbook
new file mode 100644
index 000000000..e93cf13f1
--- /dev/null
+++ b/src/boost/tools/quickbook/test/code_python_mismatched_escape-1_4-fail.quickbook
@@ -0,0 +1,5 @@
+[article Odd code markup. [quickbook 1.4] ]
+
+[python]
+
+ print "Hello World." ``
diff --git a/src/boost/tools/quickbook/test/code_snippet-1_1.gold b/src/boost/tools/quickbook/test/code_snippet-1_1.gold
new file mode 100644
index 000000000..1badf4bab
--- /dev/null
+++ b/src/boost/tools/quickbook/test/code_snippet-1_1.gold
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="code_snippets" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Code Snippets</title>
+ <section id="code_snippets.a_code_snippet">
+ <title>A code snippet</title>
+ <para>
+ Code snippets inlined in text, as in <code><phrase role="keyword">namespace</phrase>
+ <phrase role="identifier">quickbook</phrase> <phrase role="special">{</phrase>
+ <phrase role="keyword">static</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="keyword">int</phrase> <phrase role="identifier">value</phrase>
+ <phrase role="special">=</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase>
+ <phrase role="special">}</phrase></code>, should be properly formatted and
+ not glued to the surrounding text.
+ </para>
+ <para>
+ There shoud be no spacees around (<code><phrase role="keyword">this</phrase></code>),
+ and spaces around <code><phrase role="keyword">this</phrase></code> code.
+ </para>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/code_snippet-1_1.gold-html b/src/boost/tools/quickbook/test/code_snippet-1_1.gold-html
new file mode 100644
index 000000000..a3738bf37
--- /dev/null
+++ b/src/boost/tools/quickbook/test/code_snippet-1_1.gold-html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Code Snippets
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#code_snippets.a_code_snippet">A code snippet</a>
+ </li>
+ </ul>
+ </div>
+ <div id="code_snippets.a_code_snippet">
+ <h3>
+ A code snippet
+ </h3>
+ <div id="code_snippets.a_code_snippet">
+ <p>
+ Code snippets inlined in text, as in <code><span class="keyword">namespace</span>
+ <span class="identifier">quickbook</span> <span class="special">{</span>
+ <span class="keyword">static</span> <span class="keyword">const</span>
+ <span class="keyword">int</span> <span class="identifier">value</span>
+ <span class="special">=</span> <span class="number">0</span><span class="special">;</span>
+ <span class="special">}</span></code>, should be properly formatted and
+ not glued to the surrounding text.
+ </p>
+ <p>
+ There shoud be no spacees around (<code><span class="keyword">this</span></code>),
+ and spaces around <code><span class="keyword">this</span></code> code.
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/code_snippet-1_1.quickbook b/src/boost/tools/quickbook/test/code_snippet-1_1.quickbook
new file mode 100644
index 000000000..875162708
--- /dev/null
+++ b/src/boost/tools/quickbook/test/code_snippet-1_1.quickbook
@@ -0,0 +1,12 @@
+[article Code Snippets
+]
+
+[section A code snippet]
+
+Code snippets inlined in text, as in `namespace quickbook { static const int
+value = 0; }`, should be properly formatted and not glued to the surrounding
+text.
+
+There shoud be no spacees around (`this`), and spaces around `this` code.
+
+[endsect]
diff --git a/src/boost/tools/quickbook/test/code_teletype-1_5.gold b/src/boost/tools/quickbook/test/code_teletype-1_5.gold
new file mode 100644
index 000000000..e36fb11bb
--- /dev/null
+++ b/src/boost/tools/quickbook/test/code_teletype-1_5.gold
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="code_block_teletype_1" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Code Block Teletype 1</title>
+ <section id="code_block_teletype_1.a_code_block">
+ <title><link linkend="code_block_teletype_1.a_code_block">A code block</link></title>
+<programlisting>Just some plain text.
+With some <emphasis role="bold">quickbook</emphasis> thrown in?
+</programlisting>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/code_teletype-1_5.gold-html b/src/boost/tools/quickbook/test/code_teletype-1_5.gold-html
new file mode 100644
index 000000000..a038a4b6c
--- /dev/null
+++ b/src/boost/tools/quickbook/test/code_teletype-1_5.gold-html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Code Block Teletype 1
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#code_block_teletype_1.a_code_block">A code block</a>
+ </li>
+ </ul>
+ </div>
+ <div id="code_block_teletype_1.a_code_block">
+ <h3>
+ A code block
+ </h3>
+ <div id="code_block_teletype_1.a_code_block">
+<pre class="programlisting">Just some plain text.
+With some <span class="bold"><strong>quickbook</strong></span> thrown in?
+</pre>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/code_teletype-1_5.quickbook b/src/boost/tools/quickbook/test/code_teletype-1_5.quickbook
new file mode 100644
index 000000000..841de3e54
--- /dev/null
+++ b/src/boost/tools/quickbook/test/code_teletype-1_5.quickbook
@@ -0,0 +1,13 @@
+[article Code Block Teletype 1
+ [quickbook 1.5]
+ [source-mode teletype]
+]
+
+[section A code block]
+
+[def __text__ text]
+
+ Just some plain __text__.
+ ``With some *quickbook* thrown in?``
+
+[endsect]
diff --git a/src/boost/tools/quickbook/test/code_unclosed_block-1_6-fail.quickbook b/src/boost/tools/quickbook/test/code_unclosed_block-1_6-fail.quickbook
new file mode 100644
index 000000000..f02887c44
--- /dev/null
+++ b/src/boost/tools/quickbook/test/code_unclosed_block-1_6-fail.quickbook
@@ -0,0 +1,4 @@
+[article Odd code markup. [quickbook 1.6] ]
+
+``
+int main() {}
diff --git a/src/boost/tools/quickbook/test/command-line/Jamfile.v2 b/src/boost/tools/quickbook/test/command-line/Jamfile.v2
new file mode 100644
index 000000000..9e838e0a4
--- /dev/null
+++ b/src/boost/tools/quickbook/test/command-line/Jamfile.v2
@@ -0,0 +1,28 @@
+
+#
+# Copyright (c) 2011 Daniel James
+#
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+#
+
+project quickbook/tests/command-line ;
+
+import quickbook-testing : quickbook-test quickbook-fail-test quickbook-error-test ;
+
+test-suite command-line.test :
+ # Check that expect-errors works as advertised.
+ [ quickbook-fail-test error-fail : : <testing.arg>--expect-errors ]
+ [ quickbook-error-test error1 ]
+ [ quickbook-error-test error2 ]
+
+ [ quickbook-error-test
+ non_existent_output :
+ basic-1_6.quickbook :
+ <testing.arg>--output-file=non-existent/basic.xml ]
+ [ quickbook-error-test
+ output_nested_in_file :
+ basic-1_6.quickbook :
+ <testing.arg>--output-file=basic-1_6.quickbook/basic.xml ]
+ ;
diff --git a/src/boost/tools/quickbook/test/command-line/basic-1_6.quickbook b/src/boost/tools/quickbook/test/command-line/basic-1_6.quickbook
new file mode 100644
index 000000000..fa8c8a693
--- /dev/null
+++ b/src/boost/tools/quickbook/test/command-line/basic-1_6.quickbook
@@ -0,0 +1,5 @@
+[article Basic quickbook file
+[quickbook 1.5]
+]
+
+Just used for running command line tests. \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/command-line/error-fail.quickbook b/src/boost/tools/quickbook/test/command-line/error-fail.quickbook
new file mode 100644
index 000000000..835f01ad5
--- /dev/null
+++ b/src/boost/tools/quickbook/test/command-line/error-fail.quickbook
@@ -0,0 +1,5 @@
+[article Valid file to just that expect errors fails
+[quickbook 1.5]
+]
+
+No errors. \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/command-line/error1.quickbook b/src/boost/tools/quickbook/test/command-line/error1.quickbook
new file mode 100644
index 000000000..5f76a444e
--- /dev/null
+++ b/src/boost/tools/quickbook/test/command-line/error1.quickbook
@@ -0,0 +1,3 @@
+[article A file with an error in the docinfo
+[quickbook 0.8]
+]
diff --git a/src/boost/tools/quickbook/test/command-line/error2.quickbook b/src/boost/tools/quickbook/test/command-line/error2.quickbook
new file mode 100644
index 000000000..2eea16285
--- /dev/null
+++ b/src/boost/tools/quickbook/test/command-line/error2.quickbook
@@ -0,0 +1,7 @@
+[article A file with an error in the body
+[quickbook 1.5]
+]
+
+[table
+[x]
+] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/command_line_macro-1_1.gold b/src/boost/tools/quickbook/test/command_line_macro-1_1.gold
new file mode 100644
index 000000000..423b5cbba
--- /dev/null
+++ b/src/boost/tools/quickbook/test/command_line_macro-1_1.gold
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="command_line_macro" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Command Line Macro</title>
+ <para>
+ <emphasis role="bold">bold</emphasis>
+ </para>
+ <para>
+ empty is defined
+ </para>
+</article>
diff --git a/src/boost/tools/quickbook/test/command_line_macro-1_1.gold-html b/src/boost/tools/quickbook/test/command_line_macro-1_1.gold-html
new file mode 100644
index 000000000..7e90fe4dd
--- /dev/null
+++ b/src/boost/tools/quickbook/test/command_line_macro-1_1.gold-html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Command Line Macro
+ </h3>
+ <p>
+ <span class="bold"><strong>bold</strong></span>
+ </p>
+ <p>
+ empty is defined
+ </p>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/command_line_macro-1_1.quickbook b/src/boost/tools/quickbook/test/command_line_macro-1_1.quickbook
new file mode 100644
index 000000000..5b19fc006
--- /dev/null
+++ b/src/boost/tools/quickbook/test/command_line_macro-1_1.quickbook
@@ -0,0 +1,10 @@
+[article Command Line Macro
+]
+
+[/ This test relies on __macro__ being defined at the command line.]
+
+__macro__
+
+__empty__
+
+[?__empty__ empty is defined] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/cond_phrase-1_5.gold b/src/boost/tools/quickbook/test/cond_phrase-1_5.gold
new file mode 100644
index 000000000..95a1d35d7
--- /dev/null
+++ b/src/boost/tools/quickbook/test/cond_phrase-1_5.gold
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="coniditional_phrase_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Coniditional Phrase Test</title>
+ <para>
+ This should show
+ </para>
+ <para>
+ The should be no space inserted.
+ </para>
+ <para>
+ <emphasis role="bold">Bold text</emphasis>
+ </para>
+</article>
diff --git a/src/boost/tools/quickbook/test/cond_phrase-1_5.gold-html b/src/boost/tools/quickbook/test/cond_phrase-1_5.gold-html
new file mode 100644
index 000000000..c9256b0cb
--- /dev/null
+++ b/src/boost/tools/quickbook/test/cond_phrase-1_5.gold-html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Coniditional Phrase Test
+ </h3>
+ <p>
+ This should show
+ </p>
+ <p>
+ The should be no space inserted.
+ </p>
+ <p>
+ <span class="bold"><strong>Bold text</strong></span>
+ </p>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/cond_phrase-1_5.quickbook b/src/boost/tools/quickbook/test/cond_phrase-1_5.quickbook
new file mode 100644
index 000000000..e158a251b
--- /dev/null
+++ b/src/boost/tools/quickbook/test/cond_phrase-1_5.quickbook
@@ -0,0 +1,12 @@
+[article Coniditional Phrase Test
+ [quickbook 1.5]
+]
+
+[def __defined__]
+
+[? __defined__ This should show]
+[? __undefined__ This should not show]
+
+The should be no sp[?__undefined__ just some junk]ace inserted.
+
+[? __defined__ [*Bold text]] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/cond_phrase-1_7.gold b/src/boost/tools/quickbook/test/cond_phrase-1_7.gold
new file mode 100644
index 000000000..34ba8a0bd
--- /dev/null
+++ b/src/boost/tools/quickbook/test/cond_phrase-1_7.gold
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="coniditional_phrase_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Coniditional Phrase Test</title>
+ <para>
+ This should show
+ </para>
+ <para>
+ But this should show
+ </para>
+ <para>
+ Weird macro is defined
+ </para>
+ <para>
+ The should be no space inserted.
+ </para>
+ <para>
+ <emphasis role="bold">Bold text</emphasis>
+ </para>
+</article>
diff --git a/src/boost/tools/quickbook/test/cond_phrase-1_7.gold-html b/src/boost/tools/quickbook/test/cond_phrase-1_7.gold-html
new file mode 100644
index 000000000..6c0117935
--- /dev/null
+++ b/src/boost/tools/quickbook/test/cond_phrase-1_7.gold-html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Coniditional Phrase Test
+ </h3>
+ <p>
+ This should show
+ </p>
+ <p>
+ But this should show
+ </p>
+ <p>
+ Weird macro is defined
+ </p>
+ <p>
+ The should be no space inserted.
+ </p>
+ <p>
+ <span class="bold"><strong>Bold text</strong></span>
+ </p>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/cond_phrase-1_7.quickbook b/src/boost/tools/quickbook/test/cond_phrase-1_7.quickbook
new file mode 100644
index 000000000..ebf356bf0
--- /dev/null
+++ b/src/boost/tools/quickbook/test/cond_phrase-1_7.quickbook
@@ -0,0 +1,20 @@
+[article Coniditional Phrase Test
+ [quickbook 1.7]
+]
+
+[def __defined__]
+
+[? __defined__ This should show]
+[? __undefined__ This should not show]
+
+[?! __defined__ This should also not show]
+[?! __undefined__ But this should show]
+
+[? ! __undefined__ This shouldn't show]
+
+[def !weird_macro!]
+[? !weird_macro! Weird macro is defined]
+
+The should be no sp[?__undefined__ just some junk]ace inserted.
+
+[? __defined__ [*Bold text]]
diff --git a/src/boost/tools/quickbook/test/doc-info/Jamfile.v2 b/src/boost/tools/quickbook/test/doc-info/Jamfile.v2
new file mode 100644
index 000000000..a35229c09
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/Jamfile.v2
@@ -0,0 +1,38 @@
+#
+# Copyright (c) 2005 João Abecasis
+#
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+#
+
+project quickbook/tests/doc-info ;
+
+import quickbook-testing : quickbook-test quickbook-error-test ;
+
+test-suite quickbook.test :
+ [ quickbook-test escape-1.6 ]
+ [ quickbook-test encode-1.5 ]
+ [ quickbook-test author1 ]
+ [ quickbook-test author2 ]
+ [ quickbook-test empty-attributes ]
+ [ quickbook-test escaped_attributes1-1_7 ]
+ [ quickbook-test escaped_attributes2-1_7 ]
+ [ quickbook-test duplicates-1.1 ]
+ [ quickbook-test duplicates-1.5 ]
+ [ quickbook-test macros1-1_5 ]
+ [ quickbook-test macros1-1_6 ]
+ [ quickbook-test source-mode-1.4 ]
+ [ quickbook-test source-mode-1.5 ]
+ [ quickbook-test source-mode-1.6 ]
+ [ quickbook-test copyright1 ]
+ [ quickbook-error-test copyright-fail1 ]
+ [ quickbook-error-test copyright-fail2 ]
+ [ quickbook-test id1-1.5 ]
+ [ quickbook-test title_trailing_space-1_1 ]
+ [ quickbook-test title_trailing_space-1_6 ]
+ [ quickbook-test empty_title-1_1 ]
+ [ quickbook-test empty_title-1_5 ]
+ [ quickbook-test empty_title-1_6 ]
+ [ quickbook-error-test missing_doc_info-1_6-fail ]
+ ;
diff --git a/src/boost/tools/quickbook/test/doc-info/author1.gold b/src/boost/tools/quickbook/test/doc-info/author1.gold
new file mode 100644
index 000000000..613fa83ef
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/author1.gold
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE appendix PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<appendix id="document_information_4" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Document Information 4</title>
+ <appendixinfo>
+ <authorgroup>
+ <author>
+ <firstname>Joe</firstname> <surname>Blow</surname>
+ </author>
+ </authorgroup>
+ </appendixinfo>
+</appendix>
diff --git a/src/boost/tools/quickbook/test/doc-info/author1.gold-html b/src/boost/tools/quickbook/test/doc-info/author1.gold-html
new file mode 100644
index 000000000..9d39657f3
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/author1.gold-html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Document Information 4
+ </h3>
+ <div class="authorgroup">
+ <h3 class="author">
+ Joe Blow
+ </h3>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/doc-info/author1.quickbook b/src/boost/tools/quickbook/test/doc-info/author1.quickbook
new file mode 100644
index 000000000..4505b4091
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/author1.quickbook
@@ -0,0 +1,5 @@
+[appendix Document Information 4
+[quickbook 1.5]
+[authors [Blow, Joe]]
+]
+[/ Some comment] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/doc-info/author2.gold b/src/boost/tools/quickbook/test/doc-info/author2.gold
new file mode 100644
index 000000000..766d8f68b
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/author2.gold
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE chapter PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<chapter id="document_information_4" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Document Information 4</title>
+ <chapterinfo>
+ <authorgroup>
+ <author>
+ <firstname>Joe</firstname> <surname>Blow</surname>
+ </author>
+ <author>
+ <firstname>Jane</firstname> <surname>Doe</surname>
+ </author>
+ <author>
+ <firstname>John</firstname> <surname>Coe</surname>
+ </author>
+ </authorgroup>
+ </chapterinfo>
+</chapter>
diff --git a/src/boost/tools/quickbook/test/doc-info/author2.gold-html b/src/boost/tools/quickbook/test/doc-info/author2.gold-html
new file mode 100644
index 000000000..59b9b7e5c
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/author2.gold-html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Document Information 4
+ </h3>
+ <div class="authorgroup">
+ <h3 class="author">
+ Joe Blow
+ </h3>
+ <h3 class="author">
+ Jane Doe
+ </h3>
+ <h3 class="author">
+ John Coe
+ </h3>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/doc-info/author2.quickbook b/src/boost/tools/quickbook/test/doc-info/author2.quickbook
new file mode 100644
index 000000000..c4737e0ac
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/author2.quickbook
@@ -0,0 +1,4 @@
+[chapter Document Information 4
+[quickbook 1.5]
+[authors [Blow, Joe], [Doe, Jane] [Coe, John]]
+] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/doc-info/copyright-fail1.quickbook b/src/boost/tools/quickbook/test/doc-info/copyright-fail1.quickbook
new file mode 100644
index 000000000..20738cb91
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/copyright-fail1.quickbook
@@ -0,0 +1,4 @@
+[article Invalid copyright years
+[quickbook 1.5]
+[copyright 2010-2001 Timequake man]
+] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/doc-info/copyright-fail2.quickbook b/src/boost/tools/quickbook/test/doc-info/copyright-fail2.quickbook
new file mode 100644
index 000000000..607c3a789
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/copyright-fail2.quickbook
@@ -0,0 +1,6 @@
+[article Invalid copyright
+[quickbook 1.5]
+[copyright No year]
+]
+
+Maybe this should pass? \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/doc-info/copyright1.gold b/src/boost/tools/quickbook/test/doc-info/copyright1.gold
new file mode 100644
index 000000000..3c6d40668
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/copyright1.gold
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="copyright_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Copyright Test</title>
+ <articleinfo>
+ <copyright>
+ <year>1963</year> <year>1964</year> <year>1965</year> <holder>Jane Doe</holder>
+ </copyright>
+ <copyright>
+ <year>2018</year> <holder>Joe Blow, John Coe</holder>
+ </copyright>
+ <copyright>
+ <year>1977</year> <year>1985</year> <holder>Someone else</holder>
+ </copyright>
+ </articleinfo>
+</article>
diff --git a/src/boost/tools/quickbook/test/doc-info/copyright1.gold-html b/src/boost/tools/quickbook/test/doc-info/copyright1.gold-html
new file mode 100644
index 000000000..61b05b472
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/copyright1.gold-html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Copyright Test
+ </h3>
+ <p class="copyright">
+ 1963, 1964, 1965 Jane Doe
+ </p>
+ <p class="copyright">
+ 2018 Joe Blow, John Coe
+ </p>
+ <p class="copyright">
+ 1977, 1985 Someone else
+ </p>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/doc-info/copyright1.quickbook b/src/boost/tools/quickbook/test/doc-info/copyright1.quickbook
new file mode 100644
index 000000000..4dff125fe
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/copyright1.quickbook
@@ -0,0 +1,5 @@
+[article Copyright Test
+[quickbook 1.5]
+[copyright 1963-1965 Jane Doe, 2018 Joe Blow, John Coe]
+[copyright 1977,1985 Someone else]
+] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/doc-info/duplicates-1.1.gold b/src/boost/tools/quickbook/test/doc-info/duplicates-1.1.gold
new file mode 100644
index 000000000..7ff1fa4b9
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/duplicates-1.1.gold
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<library id="thing2" name="Duplicates 1.1" dirname="thing2" last-revision="Tomorrow"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <libraryinfo>
+ <authorgroup>
+ <author>
+ <firstname>Joe</firstname> <surname>Blow</surname>
+ </author>
+ <author>
+ <firstname>Jane</firstname> <surname>Doe</surname>
+ </author>
+ </authorgroup>
+ <copyright>
+ <year>2018</year> <holder>Joe Blow</holder>
+ </copyright>
+ <copyright>
+ <year>1963</year> <holder>Jane Doe</holder>
+ </copyright>
+ <legalnotice id="thing2.legal">
+ <para>
+ Public Domain
+ </para>
+ </legalnotice>
+ <librarypurpose>
+ Another Duplicate
+ </librarypurpose>
+ <librarycategory name="category:Category 1"></librarycategory> <librarycategory
+ name="category:Category 2"></librarycategory>
+ </libraryinfo>
+ <title>Duplicates 1.1 2</title>
+ <para>
+ Content
+ </para>
+</library>
diff --git a/src/boost/tools/quickbook/test/doc-info/duplicates-1.1.gold-html b/src/boost/tools/quickbook/test/doc-info/duplicates-1.1.gold-html
new file mode 100644
index 000000000..cd1eb53d6
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/duplicates-1.1.gold-html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Duplicates 1.1 2
+ </h3>
+ <div class="authorgroup">
+ <h3 class="author">
+ Joe Blow
+ </h3>
+ <h3 class="author">
+ Jane Doe
+ </h3>
+ </div>
+ <p class="copyright">
+ 2018 Joe Blow
+ </p>
+ <p class="copyright">
+ 1963 Jane Doe
+ </p>
+ <div class="legalnotice">
+ <p>
+ Public Domain
+ </p>
+ </div>
+ <p>
+ Content
+ </p>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/doc-info/duplicates-1.1.quickbook b/src/boost/tools/quickbook/test/doc-info/duplicates-1.1.quickbook
new file mode 100644
index 000000000..d5daa2158
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/duplicates-1.1.quickbook
@@ -0,0 +1,23 @@
+[library Duplicates 1.1
+
+[id thing1]
+[id thing2]
+[dirname thing1]
+[dirname thing2]
+[last-revision Yesterday]
+[last-revision Tomorrow]
+[purpose Test Duplicates]
+[purpose Another Duplicate]
+[category Category 1]
+[category Category 2]
+[version 1]
+[version 2]
+[authors [Blow, Joe]]
+[authors [Doe, Jane]]
+[copyright 2018 Joe Blow]
+[copyright 1963 Jane Doe]
+[license Some license]
+[license Public Domain]
+]
+
+Content \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/doc-info/duplicates-1.5.gold b/src/boost/tools/quickbook/test/doc-info/duplicates-1.5.gold
new file mode 100644
index 000000000..71a58a8d1
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/duplicates-1.5.gold
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="thing2" lang="de" dirname="thing2" last-revision="Tomorrow" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Duplicates 1.5 2</title>
+ <articleinfo>
+ <authorgroup>
+ <author>
+ <firstname>Joe</firstname> <surname>Blow</surname>
+ </author>
+ <author>
+ <firstname>Jane</firstname> <surname>Doe</surname>
+ </author>
+ </authorgroup>
+ <copyright>
+ <year>2018</year> <holder>Joe Blow</holder>
+ </copyright>
+ <copyright>
+ <year>1963</year> <holder>Jane Doe</holder>
+ </copyright>
+ <legalnotice id="thing2.legal">
+ <para>
+ Public Domain
+ </para>
+ </legalnotice>
+ <articlepurpose>
+ Another Duplicate
+ </articlepurpose>
+ <articlecategory name="category:Category 1"></articlecategory> <articlecategory
+ name="category:Category 2"></articlecategory> <biblioid class="uri">http://www.boost.org/tools/quickbook/test/doc-info-2.quickbook</biblioid>
+ <biblioid class="isbn">0-937383-18-X</biblioid>
+ </articleinfo>
+</article>
diff --git a/src/boost/tools/quickbook/test/doc-info/duplicates-1.5.gold-html b/src/boost/tools/quickbook/test/doc-info/duplicates-1.5.gold-html
new file mode 100644
index 000000000..1c448e7f2
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/duplicates-1.5.gold-html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Duplicates 1.5 2
+ </h3>
+ <div class="authorgroup">
+ <h3 class="author">
+ Joe Blow
+ </h3>
+ <h3 class="author">
+ Jane Doe
+ </h3>
+ </div>
+ <p class="copyright">
+ 2018 Joe Blow
+ </p>
+ <p class="copyright">
+ 1963 Jane Doe
+ </p>
+ <div class="legalnotice">
+ <p>
+ Public Domain
+ </p>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/doc-info/duplicates-1.5.quickbook b/src/boost/tools/quickbook/test/doc-info/duplicates-1.5.quickbook
new file mode 100644
index 000000000..ed8f5da22
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/duplicates-1.5.quickbook
@@ -0,0 +1,27 @@
+[article Duplicates 1.5
+[quickbook 1.5]
+[quickbook 1.5]
+
+[id thing1]
+[id thing2]
+[dirname thing1]
+[dirname thing2]
+[last-revision Yesterday]
+[last-revision Tomorrow]
+[purpose Test Duplicates]
+[purpose Another Duplicate]
+[category Category 1]
+[category Category 2]
+[lang en]
+[lang de]
+[version 1]
+[version 2]
+[authors [Blow, Joe]]
+[authors [Doe, Jane]]
+[copyright 2018 Joe Blow]
+[copyright 1963 Jane Doe]
+[license Some license]
+[license Public Domain]
+[biblioid uri http://www.boost.org/tools/quickbook/test/doc-info-2.quickbook]
+[biblioid isbn 0-937383-18-X]
+]
diff --git a/src/boost/tools/quickbook/test/doc-info/empty-attributes.gold b/src/boost/tools/quickbook/test/doc-info/empty-attributes.gold
new file mode 100644
index 000000000..a7f05f756
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/empty-attributes.gold
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<library id="empty_attributes" name="Empty Attributes" dirname="empty_attributes"
+last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <libraryinfo>
+ <authorgroup>
+ <author>
+ <firstname></firstname> <surname></surname>
+ </author>
+ </authorgroup>
+ <copyright>
+ <year>2011</year> <holder></holder>
+ </copyright>
+ </libraryinfo>
+ <title>Empty Attributes</title>
+ <para>
+ <literal>biblioid</literal> and <literal>source-mode</literal> can't be empty.
+ </para>
+</library>
diff --git a/src/boost/tools/quickbook/test/doc-info/empty-attributes.gold-html b/src/boost/tools/quickbook/test/doc-info/empty-attributes.gold-html
new file mode 100644
index 000000000..07d23c0b3
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/empty-attributes.gold-html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Empty Attributes
+ </h3>
+ <div class="authorgroup">
+ <h3 class="author">
+ </h3>
+ </div>
+ <p class="copyright">
+ 2011
+ </p>
+ <p>
+ <tt>biblioid</tt> and <tt>source-mode</tt> can't be empty.
+ </p>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/doc-info/empty-attributes.quickbook b/src/boost/tools/quickbook/test/doc-info/empty-attributes.quickbook
new file mode 100644
index 000000000..a31dc7199
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/empty-attributes.quickbook
@@ -0,0 +1,16 @@
+[library Empty Attributes
+[version]
+[id]
+[dirname]
+[copyright]
+[copyright 2011]
+[purpose]
+[category]
+[authors]
+[authors [,]]
+[license]
+[last-revision]
+[lang]
+]
+
+=biblioid= and =source-mode= can't be empty.
diff --git a/src/boost/tools/quickbook/test/doc-info/empty_title-1_1.gold b/src/boost/tools/quickbook/test/doc-info/empty_title-1_1.gold
new file mode 100644
index 000000000..01bc60673
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/empty_title-1_1.gold
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <section id=".test">
+ <title>Test</title>
+ <para>
+ Hello
+ </para>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/doc-info/empty_title-1_1.gold-html b/src/boost/tools/quickbook/test/doc-info/empty_title-1_1.gold-html
new file mode 100644
index 000000000..359cf1546
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/empty_title-1_1.gold-html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#.test">Test</a>
+ </li>
+ </ul>
+ </div>
+ <div id=".test">
+ <h3>
+ Test
+ </h3>
+ <div id=".test">
+ <p>
+ Hello
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/doc-info/empty_title-1_1.quickbook b/src/boost/tools/quickbook/test/doc-info/empty_title-1_1.quickbook
new file mode 100644
index 000000000..45769a983
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/empty_title-1_1.quickbook
@@ -0,0 +1,8 @@
+[article
+]
+
+[section Test]
+
+Hello
+
+[endsect] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/doc-info/empty_title-1_5.gold b/src/boost/tools/quickbook/test/doc-info/empty_title-1_5.gold
new file mode 100644
index 000000000..034482798
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/empty_title-1_5.gold
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <section id=".test">
+ <title><link linkend=".test">Test</link></title>
+ <para>
+ Hello
+ </para>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/doc-info/empty_title-1_5.gold-html b/src/boost/tools/quickbook/test/doc-info/empty_title-1_5.gold-html
new file mode 100644
index 000000000..359cf1546
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/empty_title-1_5.gold-html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#.test">Test</a>
+ </li>
+ </ul>
+ </div>
+ <div id=".test">
+ <h3>
+ Test
+ </h3>
+ <div id=".test">
+ <p>
+ Hello
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/doc-info/empty_title-1_5.quickbook b/src/boost/tools/quickbook/test/doc-info/empty_title-1_5.quickbook
new file mode 100644
index 000000000..99cbf6b79
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/empty_title-1_5.quickbook
@@ -0,0 +1,7 @@
+[article
+[quickbook 1.5]
+]
+
+[section Test]
+Hello
+[endsect] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/doc-info/empty_title-1_6.gold b/src/boost/tools/quickbook/test/doc-info/empty_title-1_6.gold
new file mode 100644
index 000000000..1dce22ef0
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/empty_title-1_6.gold
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="doc0" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+</article>
diff --git a/src/boost/tools/quickbook/test/doc-info/empty_title-1_6.gold-html b/src/boost/tools/quickbook/test/doc-info/empty_title-1_6.gold-html
new file mode 100644
index 000000000..ce2d4462e
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/empty_title-1_6.gold-html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/doc-info/empty_title-1_6.quickbook b/src/boost/tools/quickbook/test/doc-info/empty_title-1_6.quickbook
new file mode 100644
index 000000000..bf310afd3
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/empty_title-1_6.quickbook
@@ -0,0 +1 @@
+[quickbook 1.6][article] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/doc-info/encode-1.5.gold b/src/boost/tools/quickbook/test/doc-info/encode-1.5.gold
new file mode 100644
index 000000000..83870c7c9
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/encode-1.5.gold
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<library id="karel_vom__xe1___x10d_ka_and_tom__xe1___x161__martin__xed_k" name="Karel Vom&#xE1;&#x10D;ka and Tom&#xE1;&#x161; Martin&#xED;k"
+dirname="karel_vom__xe1___x10d_ka_and_tom__xe1___x161__martin__xed_k" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <libraryinfo>
+ <authorgroup>
+ <author>
+ <firstname>Matti</firstname> <surname>Meik&#xE4;l&#xE4;inen</surname>
+ </author>
+ <author>
+ <firstname>Pero</firstname> <surname>Peri&#x107;</surname>
+ </author>
+ </authorgroup>
+ <copyright>
+ <year>2010</year> <holder>Me&#xF0;al-J&#xF3;n and J&#xF3;na J&#xF3;nsd&#xF3;ttir</holder>
+ </copyright>
+ <librarypurpose>
+ Inline code test: <code>1 + 2</code>
+ </librarypurpose>
+ <librarycategory name="category:tests"></librarycategory> <librarycategory name="category:irrelevance"></librarycategory>
+ <biblioid class="uri">http://www.boost.org/tools/quickbook/test/doc-info-2.quickbook</biblioid>
+ <biblioid class="isbn">0-937383-18-X</biblioid>
+ </libraryinfo>
+ <title>Karel Vom&#xE1;&#x10D;ka and Tom&#xE1;&#x161; Martin&#xED;k</title>
+</library>
diff --git a/src/boost/tools/quickbook/test/doc-info/encode-1.5.gold-html b/src/boost/tools/quickbook/test/doc-info/encode-1.5.gold-html
new file mode 100644
index 000000000..62ce95f86
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/encode-1.5.gold-html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Karel Vom&#xE1;&#x10D;ka and Tom&#xE1;&#x161; Martin&#xED;k
+ </h3>
+ <div class="authorgroup">
+ <h3 class="author">
+ Matti Meik&#xE4;l&#xE4;inen
+ </h3>
+ <h3 class="author">
+ Pero Peri&#x107;
+ </h3>
+ </div>
+ <p class="copyright">
+ 2010 Me&#xF0;al-J&#xF3;n and J&#xF3;na J&#xF3;nsd&#xF3;ttir
+ </p>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/doc-info/encode-1.5.quickbook b/src/boost/tools/quickbook/test/doc-info/encode-1.5.quickbook
new file mode 100644
index 000000000..c1928c6a8
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/encode-1.5.quickbook
@@ -0,0 +1,14 @@
+[library Karel Vom&#xE1;&#x10D;ka and Tom&#xE1;&#x161; Martin&#xED;k
+[quickbook 1.5]
+[authors [Meik&#xE4;l&#xE4;inen, Matti],[Peri&#x107;, Pero]]
+[copyright 2010 Me&#xF0;al-J&#xF3;n and J&#xF3;na J&#xF3;nsd&#xF3;ttir]
+[source-mode teletype]
+[purpose Inline code test: `1 + 2`]
+[category tests]
+[category irrelevance]
+[/ [category commented out] ]
+[biblioid uri http://www.boost.org/tools/quickbook/test/doc-info-2.quickbook]
+[biblioid isbn 0-937383-18-X]
+]
+
+[/ Some comment]
diff --git a/src/boost/tools/quickbook/test/doc-info/escape-1.6.gold b/src/boost/tools/quickbook/test/doc-info/escape-1.6.gold
new file mode 100644
index 000000000..630398679
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/escape-1.6.gold
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="karel_vom_u00e1_u010dka_and_tom_" lang="en" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Karel Vom&#xE1;&#x10D;ka and Tom&#xE1;&#x161; Martin&#xED;k</title>
+ <articleinfo>
+ <authorgroup>
+ <author>
+ <firstname>Matti</firstname> <surname>Meik&#xE4;l&#xE4;inen</surname>
+ </author>
+ <author>
+ <firstname>Pero</firstname> <surname>Peri&#x107;</surname>
+ </author>
+ </authorgroup>
+ <copyright>
+ <year>2010</year> <holder>Me&#xF0;al-J&#xF3;n and J&#xF3;na J&#xF3;nsd&#xF3;ttir</holder>
+ </copyright>
+ <articlepurpose>
+ Inline code test: <code>1 + 2</code>
+ </articlepurpose>
+ <articlecategory name="category:tests"></articlecategory> <articlecategory name="category:irrelevance"></articlecategory>
+ <biblioid class="uri">http://www.boost.org/tools/quickbook/test/doc-info-1.quickbook</biblioid>
+ </articleinfo>
+</article>
diff --git a/src/boost/tools/quickbook/test/doc-info/escape-1.6.gold-html b/src/boost/tools/quickbook/test/doc-info/escape-1.6.gold-html
new file mode 100644
index 000000000..62ce95f86
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/escape-1.6.gold-html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Karel Vom&#xE1;&#x10D;ka and Tom&#xE1;&#x161; Martin&#xED;k
+ </h3>
+ <div class="authorgroup">
+ <h3 class="author">
+ Matti Meik&#xE4;l&#xE4;inen
+ </h3>
+ <h3 class="author">
+ Pero Peri&#x107;
+ </h3>
+ </div>
+ <p class="copyright">
+ 2010 Me&#xF0;al-J&#xF3;n and J&#xF3;na J&#xF3;nsd&#xF3;ttir
+ </p>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/doc-info/escape-1.6.quickbook b/src/boost/tools/quickbook/test/doc-info/escape-1.6.quickbook
new file mode 100644
index 000000000..7ae3e7003
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/escape-1.6.quickbook
@@ -0,0 +1,12 @@
+[article Karel Vom\u00E1\u010Dka and Tom\u00E1\u0161 Martin\u00EDk
+[quickbook 1.6]
+[authors [Meik\u00E4l\u00E4inen, Matti][Peri\u0107, Pero]]
+[copyright 2010 Me\u00F0al-J\u00F3n and J\u00F3na J\u00F3nsd\u00F3ttir]
+[source-mode teletype]
+[purpose Inline code test: `1 + 2`]
+[category tests]
+[category irrelevance]
+[/ [category commented out] ]
+[biblioid uri http://www.boost.org/tools/quickbook/test/doc-info-1.quickbook]
+[lang en]
+]
diff --git a/src/boost/tools/quickbook/test/doc-info/escaped_attributes1-1_7.gold b/src/boost/tools/quickbook/test/doc-info/escaped_attributes1-1_7.gold
new file mode 100644
index 000000000..b6425d910
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/escaped_attributes1-1_7.gold
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<library id="escaped_name" name="Escaped name" dirname="escaped_name" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <libraryinfo>
+ <copyright>
+ <year>1325</year> <holder>John Doe</holder>
+ </copyright>
+ <librarycategory name="category:test"></librarycategory> <author>
+ <firstname>John</firstname>
+ <surname>Doe</surname>
+ <email>john.doe@example.com</email>
+</author>
+ </libraryinfo>
+ <title>Escaped name</title>
+</library>
diff --git a/src/boost/tools/quickbook/test/doc-info/escaped_attributes1-1_7.gold-html b/src/boost/tools/quickbook/test/doc-info/escaped_attributes1-1_7.gold-html
new file mode 100644
index 000000000..73d9655ce
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/escaped_attributes1-1_7.gold-html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Escaped name
+ </h3>
+ <div class="authorgroup">
+ <h3 class="author">
+ John Doe
+ </h3>
+ </div>
+ <p class="copyright">
+ 1325 John Doe
+ </p>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/doc-info/escaped_attributes1-1_7.quickbook b/src/boost/tools/quickbook/test/doc-info/escaped_attributes1-1_7.quickbook
new file mode 100644
index 000000000..e70161375
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/escaped_attributes1-1_7.quickbook
@@ -0,0 +1,11 @@
+[library Escaped name
+[quickbook 1.7]
+[copyright 1325 John Doe]
+'''<author>
+ <firstname>John</firstname>
+ <surname>Doe</surname>
+ <email>john.doe@example.com</email>
+</author>'''
+[category test]
+]
+
diff --git a/src/boost/tools/quickbook/test/doc-info/escaped_attributes2-1_7.gold b/src/boost/tools/quickbook/test/doc-info/escaped_attributes2-1_7.gold
new file mode 100644
index 000000000..259111ac4
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/escaped_attributes2-1_7.gold
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="multiple_escaped_attributes" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Multiple escaped attributes</title>
+ <articleinfo>
+ <author>
+ <firstname>John</firstname>
+ <surname>Doe</surname>
+ <email>john.doe@example.com</email>
+</author><orgname>Acme Corporation</orgname></articleinfo>
+</article>
diff --git a/src/boost/tools/quickbook/test/doc-info/escaped_attributes2-1_7.gold-html b/src/boost/tools/quickbook/test/doc-info/escaped_attributes2-1_7.gold-html
new file mode 100644
index 000000000..359094610
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/escaped_attributes2-1_7.gold-html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Multiple escaped attributes
+ </h3>
+ <div class="authorgroup">
+ <h3 class="author">
+ John Doe
+ </h3>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/doc-info/escaped_attributes2-1_7.quickbook b/src/boost/tools/quickbook/test/doc-info/escaped_attributes2-1_7.quickbook
new file mode 100644
index 000000000..70676f8a1
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/escaped_attributes2-1_7.quickbook
@@ -0,0 +1,10 @@
+[article Multiple escaped attributes
+[quickbook 1.7]
+'''<author>
+ <firstname>John</firstname>
+ <surname>Doe</surname>
+ <email>john.doe@example.com</email>
+</author>'''
+'''<orgname>Acme Corporation</orgname>'''
+]
+
diff --git a/src/boost/tools/quickbook/test/doc-info/id1-1.5.gold b/src/boost/tools/quickbook/test/doc-info/id1-1.5.gold
new file mode 100644
index 000000000..5b55391e2
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/id1-1.5.gold
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="missing_id_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Missing Id test</title>
+ <section id="missing_id_test.missing_id_test_1">
+ <title><link linkend="missing_id_test.missing_id_test_1">Missing Id test 1</link></title>
+ </section>
+ <section id="missing_id_test.no_docinfo_test_1">
+ <title><link linkend="missing_id_test.no_docinfo_test_1">No docinfo test 1</link></title>
+ </section>
+ <section id="missing_id_test.missing_id_test_2">
+ <title><link linkend="missing_id_test.missing_id_test_2">Missing Id test 2</link></title>
+ </section>
+ <section id="docinfo_no_id.docinfo_no_id_1">
+ <title><link linkend="docinfo_no_id.docinfo_no_id_1">Docinfo no id 1</link></title>
+ </section>
+ <section id="missing_id_test.missing_id_test_3">
+ <title><link linkend="missing_id_test.missing_id_test_3">Missing Id test 3</link></title>
+ </section>
+ <section id="docinfo_no_id.no_docinfo_test_1">
+ <title><link linkend="docinfo_no_id.no_docinfo_test_1">No docinfo test 1</link></title>
+ </section>
+ <section id="missing_id_test.missing_id_test_4">
+ <title><link linkend="missing_id_test.missing_id_test_4">Missing Id test 4</link></title>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/doc-info/id1-1.5.gold-html b/src/boost/tools/quickbook/test/doc-info/id1-1.5.gold-html
new file mode 100644
index 000000000..c6fbb841a
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/id1-1.5.gold-html
@@ -0,0 +1,86 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Missing Id test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#missing_id_test.missing_id_test_1">Missing Id test 1</a>
+ </li>
+ <li>
+ <a href="#missing_id_test.no_docinfo_test_1">No docinfo test 1</a>
+ </li>
+ <li>
+ <a href="#missing_id_test.missing_id_test_2">Missing Id test 2</a>
+ </li>
+ <li>
+ <a href="#docinfo_no_id.docinfo_no_id_1">Docinfo no id 1</a>
+ </li>
+ <li>
+ <a href="#missing_id_test.missing_id_test_3">Missing Id test 3</a>
+ </li>
+ <li>
+ <a href="#docinfo_no_id.no_docinfo_test_1">No docinfo test 1</a>
+ </li>
+ <li>
+ <a href="#missing_id_test.missing_id_test_4">Missing Id test 4</a>
+ </li>
+ </ul>
+ </div>
+ <div id="missing_id_test.missing_id_test_1">
+ <h3>
+ Missing Id test 1
+ </h3>
+ <div id="missing_id_test.missing_id_test_1">
+ </div>
+ </div>
+ <div id="missing_id_test.no_docinfo_test_1">
+ <h3>
+ No docinfo test 1
+ </h3>
+ <div id="missing_id_test.no_docinfo_test_1">
+ </div>
+ </div>
+ <div id="missing_id_test.missing_id_test_2">
+ <h3>
+ Missing Id test 2
+ </h3>
+ <div id="missing_id_test.missing_id_test_2">
+ </div>
+ </div>
+ <div id="docinfo_no_id.docinfo_no_id_1">
+ <h3>
+ Docinfo no id 1
+ </h3>
+ <div id="docinfo_no_id.docinfo_no_id_1">
+ </div>
+ </div>
+ <div id="missing_id_test.missing_id_test_3">
+ <h3>
+ Missing Id test 3
+ </h3>
+ <div id="missing_id_test.missing_id_test_3">
+ </div>
+ </div>
+ <div id="docinfo_no_id.no_docinfo_test_1">
+ <h3>
+ No docinfo test 1
+ </h3>
+ <div id="docinfo_no_id.no_docinfo_test_1">
+ </div>
+ </div>
+ <div id="missing_id_test.missing_id_test_4">
+ <h3>
+ Missing Id test 4
+ </h3>
+ <div id="missing_id_test.missing_id_test_4">
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/doc-info/id1-1.5.quickbook b/src/boost/tools/quickbook/test/doc-info/id1-1.5.quickbook
new file mode 100644
index 000000000..c7065d0c5
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/id1-1.5.quickbook
@@ -0,0 +1,21 @@
+[article Missing Id test
+[quickbook 1.5]
+]
+
+[section Missing Id test 1]
+[endsect]
+
+[include id1-no-docinfo.quickbook]
+
+[section Missing Id test 2]
+[endsect]
+
+[include id1-docinfo-no-id.quickbook]
+
+[section Missing Id test 3]
+[endsect]
+
+[include id1-no-docinfo.quickbook]
+
+[section Missing Id test 4]
+[endsect]
diff --git a/src/boost/tools/quickbook/test/doc-info/id1-docinfo-no-id.quickbook b/src/boost/tools/quickbook/test/doc-info/id1-docinfo-no-id.quickbook
new file mode 100644
index 000000000..d5e954826
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/id1-docinfo-no-id.quickbook
@@ -0,0 +1,5 @@
+[article Docinfo no id
+]
+
+[section Docinfo no id 1]
+[endsect] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/doc-info/id1-no-docinfo.quickbook b/src/boost/tools/quickbook/test/doc-info/id1-no-docinfo.quickbook
new file mode 100644
index 000000000..4dbaf2dea
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/id1-no-docinfo.quickbook
@@ -0,0 +1,2 @@
+[section No docinfo test 1]
+[endsect]
diff --git a/src/boost/tools/quickbook/test/doc-info/macros1-1_5.gold b/src/boost/tools/quickbook/test/doc-info/macros1-1_5.gold
new file mode 100644
index 000000000..0b76b9da1
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/macros1-1_5.gold
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="macro_shouldn_t_expand____date__" last-revision="__DATE__" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Macro shouldn't expand: __DATE__</title>
+ <articleinfo>
+ <articlepurpose>
+ Unfortunately this does expand: 2000-Dec-20, but I'm not fixing it, as I don't
+ think it'll cause any real problems.
+ </articlepurpose>
+ </articleinfo>
+</article>
diff --git a/src/boost/tools/quickbook/test/doc-info/macros1-1_5.gold-html b/src/boost/tools/quickbook/test/doc-info/macros1-1_5.gold-html
new file mode 100644
index 000000000..7df921e6b
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/macros1-1_5.gold-html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Macro shouldn't expand: __DATE__
+ </h3>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/doc-info/macros1-1_5.quickbook b/src/boost/tools/quickbook/test/doc-info/macros1-1_5.quickbook
new file mode 100644
index 000000000..c66a1de6d
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/macros1-1_5.quickbook
@@ -0,0 +1,6 @@
+[article Macro shouldn't expand: __DATE__
+ [quickbook 1.5]
+ [last-revision __DATE__]
+ [purpose Unfortunately this does expand: __DATE__, but I'm not fixing it,
+ as I don't think it'll cause any real problems.]
+]
diff --git a/src/boost/tools/quickbook/test/doc-info/macros1-1_6.gold b/src/boost/tools/quickbook/test/doc-info/macros1-1_6.gold
new file mode 100644
index 000000000..92ac1a191
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/macros1-1_6.gold
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="testing_date_date" last-revision="2000-Dec-20" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Testing date: 2000-Dec-20</title>
+ <chapter id="testing_macro_date_nested_macro" last-revision="5 May 2013" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Testing macro date: 5 May 2013</title>
+ </chapter>
+</article>
diff --git a/src/boost/tools/quickbook/test/doc-info/macros1-1_6.gold-html b/src/boost/tools/quickbook/test/doc-info/macros1-1_6.gold-html
new file mode 100644
index 000000000..57b673755
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/macros1-1_6.gold-html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Testing date: 2000-Dec-20
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#testing_macro_date_nested_macro">Testing macro date: 5 May 2013</a>
+ </li>
+ </ul>
+ </div>
+ <div id="testing_macro_date_nested_macro">
+ <h3>
+ Testing macro date: 5 May 2013
+ </h3>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/doc-info/macros1-1_6.quickbook b/src/boost/tools/quickbook/test/doc-info/macros1-1_6.quickbook
new file mode 100644
index 000000000..058c34954
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/macros1-1_6.quickbook
@@ -0,0 +1,7 @@
+[article Testing date: __DATE__
+ [quickbook 1.6]
+ [last-revision __DATE__]
+]
+
+[def NESTED_MACRO 5 May 2013]
+[include macros1-inc_1_6.quickbook]
diff --git a/src/boost/tools/quickbook/test/doc-info/macros1-inc_1_6.quickbook b/src/boost/tools/quickbook/test/doc-info/macros1-inc_1_6.quickbook
new file mode 100644
index 000000000..47fc84a81
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/macros1-inc_1_6.quickbook
@@ -0,0 +1,4 @@
+[chapter Testing macro date: NESTED_MACRO
+ [quickbook 1.6]
+ [last-revision NESTED_MACRO]
+]
diff --git a/src/boost/tools/quickbook/test/doc-info/missing_doc_info-1_6-fail.quickbook b/src/boost/tools/quickbook/test/doc-info/missing_doc_info-1_6-fail.quickbook
new file mode 100644
index 000000000..6f0b2cdbe
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/missing_doc_info-1_6-fail.quickbook
@@ -0,0 +1,3 @@
+[quickbook 1.6]
+
+Hello!
diff --git a/src/boost/tools/quickbook/test/doc-info/source-mode-1.4.gold b/src/boost/tools/quickbook/test/doc-info/source-mode-1.4.gold
new file mode 100644
index 000000000..f7fea9a71
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/source-mode-1.4.gold
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="c___test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>C++ test</title>
+ <articleinfo>
+ <legalnotice id="c___test.legal">
+ <para>
+ <code><phrase role="keyword">def</phrase> <phrase role="identifier">foo</phrase><phrase
+ role="special">(</phrase><phrase role="identifier">x</phrase><phrase role="special">):</phrase>
+ <phrase role="keyword">print</phrase> <phrase role="string">&quot;Hello&quot;</phrase></code>
+ </para>
+ </legalnotice>
+ <articlepurpose>
+ <code><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase
+ role="special">()</phrase> <phrase role="special">{}</phrase></code>
+ </articlepurpose>
+ </articleinfo>
+ <para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ </para>
+ <para>
+<programlisting><phrase role="keyword">def</phrase> <phrase role="identifier">foo</phrase><phrase role="special">():</phrase></programlisting>
+ </para>
+ <para>
+<programlisting><phrase role="keyword">def</phrase> <phrase role="identifier">foo</phrase><phrase role="special">(</phrase><phrase role="identifier">x</phrase><phrase role="special">):</phrase></programlisting>
+ </para>
+ <para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ </para>
+ <para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ </para>
+</article>
diff --git a/src/boost/tools/quickbook/test/doc-info/source-mode-1.4.gold-html b/src/boost/tools/quickbook/test/doc-info/source-mode-1.4.gold-html
new file mode 100644
index 000000000..e1237d1fd
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/source-mode-1.4.gold-html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ C++ test
+ </h3>
+ <div class="legalnotice">
+ <p>
+ <code><span class="keyword">def</span> <span class="identifier">foo</span><span
+ class="special">(</span><span class="identifier">x</span><span class="special">):</span>
+ <span class="keyword">print</span> <span class="string">&quot;Hello&quot;</span></code>
+ </p>
+ </div>
+ <p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span></pre>
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">def</span> <span class="identifier">foo</span><span class="special">():</span></pre>
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">def</span> <span class="identifier">foo</span><span class="special">(</span><span class="identifier">x</span><span class="special">):</span></pre>
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span></pre>
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span></pre>
+ </p>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/doc-info/source-mode-1.4.quickbook b/src/boost/tools/quickbook/test/doc-info/source-mode-1.4.quickbook
new file mode 100644
index 000000000..a04bca741
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/source-mode-1.4.quickbook
@@ -0,0 +1,17 @@
+[article C++ test
+[quickbook 1.5]
+[source-mode python]
+[license `def foo(x): print "Hello"`]
+[source-mode c++]
+[purpose `int main() {}`]
+]
+
+```int main() {}```
+
+[include source-mode-python-include.quickbook]
+
+```def foo(x):```
+
+[include source-mode-cpp-include.quickbook]
+
+```int main() {}```
diff --git a/src/boost/tools/quickbook/test/doc-info/source-mode-1.5.gold b/src/boost/tools/quickbook/test/doc-info/source-mode-1.5.gold
new file mode 100644
index 000000000..340c5d2e9
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/source-mode-1.5.gold
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="c___test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>C++ test</title>
+ <articleinfo>
+ <legalnotice id="c___test.legal">
+ <para>
+ <code><phrase role="keyword">def</phrase> <phrase role="identifier">foo</phrase><phrase
+ role="special">(</phrase><phrase role="identifier">x</phrase><phrase role="special">):</phrase>
+ <phrase role="keyword">print</phrase> <phrase role="string">&quot;Hello&quot;</phrase></code>
+ </para>
+ </legalnotice>
+ <articlepurpose>
+ <code>This shouldn't be highlighted</code>
+ </articlepurpose>
+ </articleinfo>
+ <para>
+<programlisting>This shouldn't be highlighted.</programlisting>
+ </para>
+ <para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ </para>
+ <para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ </para>
+ <para>
+<programlisting><phrase role="keyword">def</phrase> <phrase role="identifier">foo</phrase><phrase role="special">():</phrase></programlisting>
+ </para>
+ <para>
+<programlisting><phrase role="keyword">def</phrase> <phrase role="identifier">foo</phrase><phrase role="special">(</phrase><phrase role="identifier">x</phrase><phrase role="special">):</phrase></programlisting>
+ </para>
+ <para>
+<programlisting>This shouldn't be highlighted</programlisting>
+ </para>
+ <para>
+<programlisting>This shouldn't be highlighted.</programlisting>
+ </para>
+</article>
diff --git a/src/boost/tools/quickbook/test/doc-info/source-mode-1.5.gold-html b/src/boost/tools/quickbook/test/doc-info/source-mode-1.5.gold-html
new file mode 100644
index 000000000..4eacbb674
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/source-mode-1.5.gold-html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ C++ test
+ </h3>
+ <div class="legalnotice">
+ <p>
+ <code><span class="keyword">def</span> <span class="identifier">foo</span><span
+ class="special">(</span><span class="identifier">x</span><span class="special">):</span>
+ <span class="keyword">print</span> <span class="string">&quot;Hello&quot;</span></code>
+ </p>
+ </div>
+ <p>
+<pre class="programlisting">This shouldn't be highlighted.</pre>
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span></pre>
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span></pre>
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">def</span> <span class="identifier">foo</span><span class="special">():</span></pre>
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">def</span> <span class="identifier">foo</span><span class="special">(</span><span class="identifier">x</span><span class="special">):</span></pre>
+ </p>
+ <p>
+<pre class="programlisting">This shouldn't be highlighted</pre>
+ </p>
+ <p>
+<pre class="programlisting">This shouldn't be highlighted.</pre>
+ </p>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/doc-info/source-mode-1.5.quickbook b/src/boost/tools/quickbook/test/doc-info/source-mode-1.5.quickbook
new file mode 100644
index 000000000..78e20b7c0
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/source-mode-1.5.quickbook
@@ -0,0 +1,21 @@
+[article C++ test
+[quickbook 1.5]
+[source-mode python]
+[license `def foo(x): print "Hello"`]
+[source-mode teletype]
+[purpose `This shouldn't be highlighted`]
+]
+
+```This shouldn't be highlighted.```
+
+[include source-mode-cpp-include.quickbook]
+
+```int main() {}```
+
+[include source-mode-python-include.quickbook]
+
+```def foo(x):```
+
+[include source-mode-teletype-include.quickbook]
+
+```This shouldn't be highlighted.```
diff --git a/src/boost/tools/quickbook/test/doc-info/source-mode-1.6.gold b/src/boost/tools/quickbook/test/doc-info/source-mode-1.6.gold
new file mode 100644
index 000000000..02496673a
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/source-mode-1.6.gold
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="c_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>C++ test</title>
+ <articleinfo>
+ <legalnotice id="c_test.legal">
+ <para>
+ <code><phrase role="keyword">def</phrase> <phrase role="identifier">foo</phrase><phrase
+ role="special">(</phrase><phrase role="identifier">x</phrase><phrase role="special">):</phrase>
+ <phrase role="keyword">print</phrase> <phrase role="string">&quot;Hello&quot;</phrase></code>
+ </para>
+ </legalnotice>
+ <articlepurpose>
+ <code>This shouldn't be highlighted</code>
+ </articlepurpose>
+ </articleinfo>
+<programlisting>This shouldn't be highlighted.</programlisting>
+ <article id="c___source_mode_include" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>C++ source mode include</title>
+ <para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ </para>
+ </article>
+<programlisting>This shouldn't be highlighted.</programlisting>
+ <article id="python_source_mode_include" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Python source mode include</title>
+ <para>
+<programlisting><phrase role="keyword">def</phrase> <phrase role="identifier">foo</phrase><phrase role="special">():</phrase></programlisting>
+ </para>
+ </article>
+<programlisting>This shouldn't be highlighted.</programlisting>
+ <article id="teletype_source_mode_include" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Teletype source mode include</title>
+ <para>
+<programlisting>This shouldn't be highlighted</programlisting>
+ </para>
+ </article>
+<programlisting>This shouldn't be highlighted.</programlisting>
+</article>
diff --git a/src/boost/tools/quickbook/test/doc-info/source-mode-1.6.gold-html b/src/boost/tools/quickbook/test/doc-info/source-mode-1.6.gold-html
new file mode 100644
index 000000000..79390c04b
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/source-mode-1.6.gold-html
@@ -0,0 +1,60 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ C++ test
+ </h3>
+ <div class="legalnotice">
+ <p>
+ <code><span class="keyword">def</span> <span class="identifier">foo</span><span
+ class="special">(</span><span class="identifier">x</span><span class="special">):</span>
+ <span class="keyword">print</span> <span class="string">&quot;Hello&quot;</span></code>
+ </p>
+ </div>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#c___source_mode_include">C++ source mode include</a>
+ </li>
+ <li>
+ <a href="#python_source_mode_include">Python source mode include</a>
+ </li>
+ <li>
+ <a href="#teletype_source_mode_include">Teletype source mode include</a>
+ </li>
+ </ul>
+ </div>
+<pre class="programlisting">This shouldn't be highlighted.</pre>
+<pre class="programlisting">This shouldn't be highlighted.</pre>
+<pre class="programlisting">This shouldn't be highlighted.</pre>
+<pre class="programlisting">This shouldn't be highlighted.</pre>
+ <div id="c___source_mode_include">
+ <h3>
+ C++ source mode include
+ </h3>
+ <p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span></pre>
+ </p>
+ </div>
+ <div id="python_source_mode_include">
+ <h3>
+ Python source mode include
+ </h3>
+ <p>
+<pre class="programlisting"><span class="keyword">def</span> <span class="identifier">foo</span><span class="special">():</span></pre>
+ </p>
+ </div>
+ <div id="teletype_source_mode_include">
+ <h3>
+ Teletype source mode include
+ </h3>
+ <p>
+<pre class="programlisting">This shouldn't be highlighted</pre>
+ </p>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/doc-info/source-mode-1.6.quickbook b/src/boost/tools/quickbook/test/doc-info/source-mode-1.6.quickbook
new file mode 100644
index 000000000..02f7ee4c4
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/source-mode-1.6.quickbook
@@ -0,0 +1,21 @@
+[article C++ test
+[quickbook 1.6]
+[source-mode python]
+[license `def foo(x): print "Hello"`]
+[source-mode teletype]
+[purpose `This shouldn't be highlighted`]
+]
+
+```This shouldn't be highlighted.```
+
+[include source-mode-cpp-include.quickbook]
+
+```This shouldn't be highlighted.```
+
+[include source-mode-python-include.quickbook]
+
+```This shouldn't be highlighted.```
+
+[include source-mode-teletype-include.quickbook]
+
+```This shouldn't be highlighted.```
diff --git a/src/boost/tools/quickbook/test/doc-info/source-mode-cpp-include.quickbook b/src/boost/tools/quickbook/test/doc-info/source-mode-cpp-include.quickbook
new file mode 100644
index 000000000..1ff2b94cd
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/source-mode-cpp-include.quickbook
@@ -0,0 +1,4 @@
+[source-mode c++]
+[article C++ source mode include]
+
+```int main() {}``` \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/doc-info/source-mode-python-include.quickbook b/src/boost/tools/quickbook/test/doc-info/source-mode-python-include.quickbook
new file mode 100644
index 000000000..31ac531d0
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/source-mode-python-include.quickbook
@@ -0,0 +1,5 @@
+[article Python source mode include
+[source-mode python]
+]
+
+```def foo():``` \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/doc-info/source-mode-teletype-include.quickbook b/src/boost/tools/quickbook/test/doc-info/source-mode-teletype-include.quickbook
new file mode 100644
index 000000000..c7908fb76
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/source-mode-teletype-include.quickbook
@@ -0,0 +1,5 @@
+[article Teletype source mode include
+[source-mode teletype]
+]
+
+```This shouldn't be highlighted``` \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_1.gold b/src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_1.gold
new file mode 100644
index 000000000..17e4add73
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_1.gold
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="trailing_space_____" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Trailing Space</title>
+ <section id="trailing_space_____.body">
+ <title>Body</title>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_1.gold-html b/src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_1.gold-html
new file mode 100644
index 000000000..187ba4271
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_1.gold-html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Trailing Space
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#trailing_space_____.body">Body</a>
+ </li>
+ </ul>
+ </div>
+ <div id="trailing_space_____.body">
+ <h3>
+ Body
+ </h3>
+ <div id="trailing_space_____.body">
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_1.quickbook b/src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_1.quickbook
new file mode 100644
index 000000000..27305f719
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_1.quickbook
@@ -0,0 +1,5 @@
+[article Trailing Space ]
+
+[section Body]
+
+[endsect] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_6.gold b/src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_6.gold
new file mode 100644
index 000000000..45231b6d1
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_6.gold
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="trailing_space" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Trailing Space</title>
+ <section id="trailing_space.body">
+ <title><link linkend="trailing_space.body">Body</link></title>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_6.gold-html b/src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_6.gold-html
new file mode 100644
index 000000000..1b3cb4e23
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_6.gold-html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Trailing Space
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#trailing_space.body">Body</a>
+ </li>
+ </ul>
+ </div>
+ <div id="trailing_space.body">
+ <h3>
+ Body
+ </h3>
+ <div id="trailing_space.body">
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_6.quickbook b/src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_6.quickbook
new file mode 100644
index 000000000..b1b8cd5d2
--- /dev/null
+++ b/src/boost/tools/quickbook/test/doc-info/title_trailing_space-1_6.quickbook
@@ -0,0 +1,5 @@
+[article Trailing Space [quickbook 1.6]]
+
+[section Body]
+
+[endsect] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/elements-1_5.gold b/src/boost/tools/quickbook/test/elements-1_5.gold
new file mode 100644
index 000000000..e5bb24a27
--- /dev/null
+++ b/src/boost/tools/quickbook/test/elements-1_5.gold
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="1_5_elements" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>1.5 Elements</title>
+ <para>
+ [ordered_list [item1][item2]]
+ </para>
+ <para>
+ [itemized_list [item1][item2]]
+ </para>
+ <para>
+ [block<simplesect><title>A <emphasis role="bold">simplesect</emphasis>!</title>]
+ </para>
+ <para>
+ [block</simplesect>]
+ </para>
+</article>
diff --git a/src/boost/tools/quickbook/test/elements-1_5.quickbook b/src/boost/tools/quickbook/test/elements-1_5.quickbook
new file mode 100644
index 000000000..df8f10aa7
--- /dev/null
+++ b/src/boost/tools/quickbook/test/elements-1_5.quickbook
@@ -0,0 +1,13 @@
+[article 1.5 Elements
+[quickbook 1.5]
+]
+
+[/ elements from 1.6]
+
+[ordered_list [item1][item2]]
+
+[itemized_list [item1][item2]]
+
+[block'''<simplesect><title>'''A *simplesect*!'''</title>''']
+
+[block'''</simplesect>'''] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/elements-1_6.gold b/src/boost/tools/quickbook/test/elements-1_6.gold
new file mode 100644
index 000000000..59a90af5c
--- /dev/null
+++ b/src/boost/tools/quickbook/test/elements-1_6.gold
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="1_6_elements" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>1.6 Elements</title>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ item1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ item2
+ </simpara>
+ </listitem>
+ </orderedlist>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ item1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ item2
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ Check that <emphasis role="bold">bold text</emphasis> isn't confused with
+ a list.
+ </simpara>
+ </listitem>
+ </orderedlist>
+ <simplesect><title>A <emphasis role="bold">simplesect</emphasis>!</title></simplesect>
+
+</article>
diff --git a/src/boost/tools/quickbook/test/elements-1_6.gold-html b/src/boost/tools/quickbook/test/elements-1_6.gold-html
new file mode 100644
index 000000000..17566749c
--- /dev/null
+++ b/src/boost/tools/quickbook/test/elements-1_6.gold-html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ 1.6 Elements
+ </h3>
+ <ol>
+ <li>
+ <div>
+ item1
+ </div>
+ </li>
+ <li>
+ <div>
+ item2
+ </div>
+ </li>
+ </ol>
+ <ul>
+ <li>
+ <div>
+ item1
+ </div>
+ </li>
+ <li>
+ <div>
+ item2
+ </div>
+ </li>
+ </ul>
+ <ol>
+ <li>
+ <div>
+ Check that <span class="bold"><strong>bold text</strong></span> isn't confused
+ with a list.
+ </div>
+ </li>
+ </ol>
+ <h3>
+ A <span class="bold"><strong>simplesect</strong></span>!
+ </h3>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/elements-1_6.quickbook b/src/boost/tools/quickbook/test/elements-1_6.quickbook
new file mode 100644
index 000000000..e313cd98d
--- /dev/null
+++ b/src/boost/tools/quickbook/test/elements-1_6.quickbook
@@ -0,0 +1,21 @@
+[article 1.6 Elements
+[quickbook 1.6]
+]
+
+[/ elements from 1.6]
+
+[ordered_list [item1][item2]]
+
+[itemized_list [item1][item2]]
+
+[ordered_list
+ [
+ Check that
+ *bold text*
+ isn't confused with a list.
+ ]
+]
+
+[block'''<simplesect><title>'''A *simplesect*!'''</title>''']
+
+[block'''</simplesect>''']
diff --git a/src/boost/tools/quickbook/test/empty-inc.quickbook b/src/boost/tools/quickbook/test/empty-inc.quickbook
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/boost/tools/quickbook/test/empty-inc.quickbook
diff --git a/src/boost/tools/quickbook/test/endsect-unopened-1_7-fail.quickbook b/src/boost/tools/quickbook/test/endsect-unopened-1_7-fail.quickbook
new file mode 100644
index 000000000..50125d967
--- /dev/null
+++ b/src/boost/tools/quickbook/test/endsect-unopened-1_7-fail.quickbook
@@ -0,0 +1,6 @@
+[article Endsect with wrong id 1.7
+ [quickbook 1.7]
+ [id something]
+]
+
+[endsect:something]
diff --git a/src/boost/tools/quickbook/test/endsect-wrong-id-1_4-fail.quickbook b/src/boost/tools/quickbook/test/endsect-wrong-id-1_4-fail.quickbook
new file mode 100644
index 000000000..ea833323c
--- /dev/null
+++ b/src/boost/tools/quickbook/test/endsect-wrong-id-1_4-fail.quickbook
@@ -0,0 +1,6 @@
+[article Endsect with wrong id 1.4
+ [quickbook 1.4]
+]
+
+[section Quickbook section id test]
+[endsect:id_test]
diff --git a/src/boost/tools/quickbook/test/endsect-wrong-id-1_7-fail.quickbook b/src/boost/tools/quickbook/test/endsect-wrong-id-1_7-fail.quickbook
new file mode 100644
index 000000000..9ef2fc925
--- /dev/null
+++ b/src/boost/tools/quickbook/test/endsect-wrong-id-1_7-fail.quickbook
@@ -0,0 +1,6 @@
+[article Endsect with wrong id 1.7
+ [quickbook 1.7]
+]
+
+[section:id_test1 Quickbook section id test]
+[endsect:id_test]
diff --git a/src/boost/tools/quickbook/test/escape-1_1.gold b/src/boost/tools/quickbook/test/escape-1_1.gold
new file mode 100644
index 000000000..0c600e0dc
--- /dev/null
+++ b/src/boost/tools/quickbook/test/escape-1_1.gold
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="escape" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Escape</title>
+ <section id="escape.escape">
+ <title>Escape</title>
+ <para>
+ <emphasis>Da do do do. Da da da da. That's all I have to say to you.</emphasis>
+ </para>
+ <para>
+ This letter &#x3B1; should have a space either side of it.
+ </para>
+ <para>
+ These should be properly encoded: &gt; &lt; &quot;
+ </para>
+ <para>
+ This <link linkend="$0">link</link> shouldn't be changed.
+ </para>
+ <para>
+ Some other problematic links:
+<link linkend="$157">one</link>,
+<link linkend="$-256">two</link>,
+<link linkend="$text">three</link>.
+ </para>
+ <para>
+ <emphasis>This will be escaped</emphasis>
+ </para>
+ <para>
+ \[ generates [. \] generates ].
+ </para>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/escape-1_1.gold-html b/src/boost/tools/quickbook/test/escape-1_1.gold-html
new file mode 100644
index 000000000..61cd98261
--- /dev/null
+++ b/src/boost/tools/quickbook/test/escape-1_1.gold-html
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Escape
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#escape.escape">Escape</a>
+ </li>
+ </ul>
+ </div>
+ <div id="escape.escape">
+ <h3>
+ Escape
+ </h3>
+ <div id="escape.escape">
+ <p>
+ <span class="emphasis"><em>Da do do do. Da da da da. That's all I have
+ to say to you.</em></span>
+ </p>
+ <p>
+ This letter &#x3B1; should have a space either side of it.
+ </p>
+ <p>
+ These should be properly encoded: &gt; &lt; &quot;
+ </p>
+ <p>
+ This <a>link</a> shouldn't be changed.
+ </p>
+ <p>
+ Some other problematic links: <a>one</a>, <a>two</a>, <a>three</a>.
+ </p>
+ <p>
+ <span class="emphasis"><em>This will be escaped</em></span>
+ </p>
+ <p>
+ \[ generates [. \] generates ].
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/escape-1_1.quickbook b/src/boost/tools/quickbook/test/escape-1_1.quickbook
new file mode 100644
index 000000000..3536ae5d5
--- /dev/null
+++ b/src/boost/tools/quickbook/test/escape-1_1.quickbook
@@ -0,0 +1,34 @@
+[article Escape
+]
+
+[section Escape]
+
+'''
+<emphasis>Da do do do. Da da da da. That's all I have to say to you.</emphasis>
+'''
+
+This letter '''&#x3B1;''' should have a space either side of it.
+
+These should be properly encoded: \> \< \"
+
+[/ The following tests are based on internal knowledge of
+ how quickbook's id generator works. They make sure it
+ doesn't mess up escaped docbook. ]
+
+'''This <link linkend="$0">link</link> shouldn't be changed.'''
+
+'''
+Some other problematic links:
+<link linkend="$157">one</link>,
+<link linkend="$-256">two</link>,
+<link linkend="$text">three</link>.
+'''
+
+[template escapedtemplate <emphasis>This will be escaped</emphasis>]
+
+[`escapedtemplate]
+
+\\\[ generates \[.
+\\\] generates \].
+
+[endsect]
diff --git a/src/boost/tools/quickbook/test/escape-1_6.gold b/src/boost/tools/quickbook/test/escape-1_6.gold
new file mode 100644
index 000000000..54056a7d8
--- /dev/null
+++ b/src/boost/tools/quickbook/test/escape-1_6.gold
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="escape" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Escape</title>
+ <section id="escape.escape">
+ <title><link linkend="escape.escape">Escape</link></title>
+ <para>
+ <emphasis>Da do do do. Da da da da. That's all I have to say to you.</emphasis>
+ </para>
+ <para>
+ This letter &#x3B1; should have a space either side of it.
+ </para>
+ <para>
+ These should be properly encoded: &gt; &lt; &quot;
+ </para>
+ <para>
+ This <link linkend="$0">link</link> shouldn't be changed.
+ </para>
+ <para>
+ Some other problematic links:
+<link linkend="$157">one</link>,
+<link linkend="$-256">two</link>,
+<link linkend="$text">three</link>.
+ </para>
+ <para>
+ <emphasis>This will be escaped</emphasis>
+ </para>
+ <para>
+ \[ generates [. \] generates ].
+ </para>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/escape-1_6.gold-html b/src/boost/tools/quickbook/test/escape-1_6.gold-html
new file mode 100644
index 000000000..61cd98261
--- /dev/null
+++ b/src/boost/tools/quickbook/test/escape-1_6.gold-html
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Escape
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#escape.escape">Escape</a>
+ </li>
+ </ul>
+ </div>
+ <div id="escape.escape">
+ <h3>
+ Escape
+ </h3>
+ <div id="escape.escape">
+ <p>
+ <span class="emphasis"><em>Da do do do. Da da da da. That's all I have
+ to say to you.</em></span>
+ </p>
+ <p>
+ This letter &#x3B1; should have a space either side of it.
+ </p>
+ <p>
+ These should be properly encoded: &gt; &lt; &quot;
+ </p>
+ <p>
+ This <a>link</a> shouldn't be changed.
+ </p>
+ <p>
+ Some other problematic links: <a>one</a>, <a>two</a>, <a>three</a>.
+ </p>
+ <p>
+ <span class="emphasis"><em>This will be escaped</em></span>
+ </p>
+ <p>
+ \[ generates [. \] generates ].
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/escape-1_6.quickbook b/src/boost/tools/quickbook/test/escape-1_6.quickbook
new file mode 100644
index 000000000..0df903808
--- /dev/null
+++ b/src/boost/tools/quickbook/test/escape-1_6.quickbook
@@ -0,0 +1,35 @@
+[article Escape
+[quickbook 1.6]
+]
+
+[section Escape]
+
+'''
+<emphasis>Da do do do. Da da da da. That's all I have to say to you.</emphasis>
+'''
+
+This letter '''&#x3B1;''' should have a space either side of it.
+
+These should be properly encoded: \> \< \"
+
+[/ The following tests are based on internal knowledge of
+ how quickbook's id generator works. They make sure it
+ doesn't mess up escaped docbook. ]
+
+'''This <link linkend="$0">link</link> shouldn't be changed.'''
+
+'''
+Some other problematic links:
+<link linkend="$157">one</link>,
+<link linkend="$-256">two</link>,
+<link linkend="$text">three</link>.
+'''
+
+[template escapedtemplate <emphasis>This will be escaped</emphasis>]
+
+[`escapedtemplate]
+
+\\\[ generates \[.
+\\\] generates \].
+
+[endsect]
diff --git a/src/boost/tools/quickbook/test/escape-mismatched-1_5-fail.quickbook b/src/boost/tools/quickbook/test/escape-mismatched-1_5-fail.quickbook
new file mode 100644
index 000000000..1f9d0c0a4
--- /dev/null
+++ b/src/boost/tools/quickbook/test/escape-mismatched-1_5-fail.quickbook
@@ -0,0 +1,5 @@
+[article Badly escaped boostbook
+[quickbook 1.5]
+]
+
+'''<emphasis>something</emphasis> \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/footnotes-1_7.gold b/src/boost/tools/quickbook/test/footnotes-1_7.gold
new file mode 100644
index 000000000..9b9e9c15e
--- /dev/null
+++ b/src/boost/tools/quickbook/test/footnotes-1_7.gold
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="footnotes" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Footnotes</title>
+ <section id="footnotes.first">
+ <title><link linkend="footnotes.first">First Section</link></title>
+ <para>
+ Some<footnote id="footnotes.first.f0">
+ <para>
+ First footnote
+ </para>
+ </footnote> normal<footnote id="footnotes.first.f1">
+ <para>
+ Second footnote
+ </para>
+ </footnote> footnotes<footnote id="footnotes.first.f2">
+ <para>
+ Third footnote
+ </para>
+ </footnote>.
+ </para>
+ </section>
+ <section id="footnotes.second">
+ <title><link linkend="footnotes.second">Second Section</link></title>
+ <para>
+ Some<footnote id="f1"><para>Boostbook footnote</para></footnote>
+boostbook<footnote><para>Footnote without id</para></footnote>
+footnotes<footnote><para>Another footnote without an id</para></footnote>.
+ </para>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/footnotes-1_7.gold-html b/src/boost/tools/quickbook/test/footnotes-1_7.gold-html
new file mode 100644
index 000000000..d8a0743d9
--- /dev/null
+++ b/src/boost/tools/quickbook/test/footnotes-1_7.gold-html
@@ -0,0 +1,80 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Footnotes
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#footnotes.first">First Section</a>
+ </li>
+ <li>
+ <a href="#footnotes.second">Second Section</a>
+ </li>
+ </ul>
+ </div>
+ <div id="footnotes.first">
+ <h3>
+ First Section
+ </h3>
+ <div id="footnotes.first">
+ <p>
+ Some<a id="footnotes.first.f0" href="#footnote-1"><sup class="footnote">[1]</sup></a>
+ normal<a id="footnotes.first.f1" href="#footnote-2"><sup class="footnote">[2]</sup></a>
+ footnotes<a id="footnotes.first.f2" href="#footnote-3"><sup class="footnote">[3]</sup></a>.
+ </p>
+ </div>
+ </div>
+ <div id="footnotes.second">
+ <h3>
+ Second Section
+ </h3>
+ <div id="footnotes.second">
+ <p>
+ Some<a id="f1" href="#footnote-4"><sup class="footnote">[4]</sup></a> boostbook<a
+ id="footnote-6" href="#footnote-5"><sup class="footnote">[5]</sup></a>
+ footnotes<a id="footnote-8" href="#footnote-7"><sup class="footnote">[6]</sup></a>.
+ </p>
+ </div>
+ </div>
+ <div class="footnotes">
+ <br/>
+ <hr/>
+ <div id="footnote-1" class="footnote">
+ <p>
+ <a href="#footnotes.first.f0"><sup>[1]</sup></a> First footnote
+ </p>
+ </div>
+ <div id="footnote-2" class="footnote">
+ <p>
+ <a href="#footnotes.first.f1"><sup>[2]</sup></a> Second footnote
+ </p>
+ </div>
+ <div id="footnote-3" class="footnote">
+ <p>
+ <a href="#footnotes.first.f2"><sup>[3]</sup></a> Third footnote
+ </p>
+ </div>
+ <div id="footnote-4" class="footnote">
+ <p>
+ <a href="#f1"><sup>[4]</sup></a> Boostbook footnote
+ </p>
+ </div>
+ <div id="footnote-5" class="footnote">
+ <p>
+ <a href="#footnote-6"><sup>[5]</sup></a> Footnote without id
+ </p>
+ </div>
+ <div id="footnote-7" class="footnote">
+ <p>
+ <a href="#footnote-8"><sup>[6]</sup></a> Another footnote without an id
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/footnotes-1_7.quickbook b/src/boost/tools/quickbook/test/footnotes-1_7.quickbook
new file mode 100644
index 000000000..ac3dc91f9
--- /dev/null
+++ b/src/boost/tools/quickbook/test/footnotes-1_7.quickbook
@@ -0,0 +1,16 @@
+[quickbook 1.7]
+[article Footnotes]
+
+[section:first First Section]
+
+Some[footnote First footnote] normal[footnote Second footnote] footnotes[footnote Third footnote].
+
+[endsect]
+
+[section:second Second Section]
+
+Some'''<footnote id="f1"><para>Boostbook footnote</para></footnote>'''
+boostbook'''<footnote><para>Footnote without id</para></footnote>'''
+footnotes'''<footnote><para>Another footnote without an id</para></footnote>'''.
+
+[endsect] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/heading-1_1.gold b/src/boost/tools/quickbook/test/heading-1_1.gold
new file mode 100644
index 000000000..334d20bc1
--- /dev/null
+++ b/src/boost/tools/quickbook/test/heading-1_1.gold
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="heading_test_1_1" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Heading Test 1.1</title>
+ <bridgehead renderas="sect2" id="heading_test_1_1.h0">
+ <phrase id="heading_test_1_1.generic_header"/><link linkend="heading_test_1_1.generic_header">Generic
+ header</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id=".level_1">
+ Level 1
+ </bridgehead>
+ <bridgehead renderas="sect2" id=".level_2">
+ Level 2
+ </bridgehead>
+ <bridgehead renderas="sect3" id=".level_3">
+ Level 3
+ </bridgehead>
+ <bridgehead renderas="sect4" id=".level_4">
+ Level 4
+ </bridgehead>
+ <bridgehead renderas="sect5" id=".level_5">
+ Level 5
+ </bridgehead>
+ <bridgehead renderas="sect6" id=".level_6">
+ Level 6
+ </bridgehead>
+ <bridgehead renderas="sect1" id="._emphasis_role__bold__bold__emphasis_">
+ <emphasis role="bold">Bold</emphasis>
+ </bridgehead>
+ <bridgehead renderas="sect1" id=".comment">
+ Comment
+ </bridgehead>
+ <bridgehead renderas="sect1" id="._notanid">
+ :notanid
+ </bridgehead>
+ <bridgehead renderas="sect1" id="._also_not_an_id">
+ :also not an id
+ </bridgehead>
+ <bridgehead renderas="sect1" id="._anchor_id__anchor___anchor_heading">
+ <anchor id="anchor"/>Anchor heading
+ </bridgehead>
+ <bridgehead renderas="sect1" id="._link_linkend__anchor__link_heading__link_">
+ <link linkend="anchor">Link heading</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id=".h1">
+ H1
+ </bridgehead>
+ <section id="heading_test_1_1.s1">
+ <title>S1</title>
+ <bridgehead renderas="sect2" id="s1.h2">
+ H2
+ </bridgehead>
+ <section id="heading_test_1_1.s2">
+ <title>S2</title>
+ <bridgehead renderas="sect3" id="s2.h3">
+ H3
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect3" id="heading_test_1_1.s1.h0">
+ <phrase id="heading_test_1_1.s1.h4"/><link linkend="heading_test_1_1.s1.h4">H4</link>
+ </bridgehead>
+ <section id="heading_test_1_1.s3">
+ <title>S3</title>
+ <bridgehead renderas="sect3" id="s3.h5">
+ H5
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect3" id="heading_test_1_1.s1.h1">
+ <phrase id="heading_test_1_1.s1.h6"/><link linkend="heading_test_1_1.s1.h6">H6</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect1" id="s3.h7">
+ H7
+ </bridgehead>
+</article>
diff --git a/src/boost/tools/quickbook/test/heading-1_1.gold-html b/src/boost/tools/quickbook/test/heading-1_1.gold-html
new file mode 100644
index 000000000..9da607a93
--- /dev/null
+++ b/src/boost/tools/quickbook/test/heading-1_1.gold-html
@@ -0,0 +1,100 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Heading Test 1.1
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#heading_test_1_1.s1">S1</a>
+ </li>
+ </ul>
+ </div>
+ <h2 id="heading_test_1_1.generic_header">
+ Generic header
+ </h2>
+ <h1 id=".level_1">
+ Level 1
+ </h1>
+ <h2 id=".level_2">
+ Level 2
+ </h2>
+ <h3 id=".level_3">
+ Level 3
+ </h3>
+ <h4 id=".level_4">
+ Level 4
+ </h4>
+ <h5 id=".level_5">
+ Level 5
+ </h5>
+ <h6 id=".level_6">
+ Level 6
+ </h6>
+ <h1 id="._emphasis_role__bold__bold__emphasis_">
+ <span class="bold"><strong>Bold</strong></span>
+ </h1>
+ <h1 id=".comment">
+ Comment
+ </h1>
+ <h1 id="._notanid">
+ :notanid
+ </h1>
+ <h1 id="._also_not_an_id">
+ :also not an id
+ </h1>
+ <h1 id="._anchor_id__anchor___anchor_heading">
+ <span id="anchor"></span>Anchor heading
+ </h1>
+ <h1 id="._link_linkend__anchor__link_heading__link_">
+ <a href="#anchor">Link heading</a>
+ </h1>
+ <h1 id=".h1">
+ H1
+ </h1>
+ <h1 id="s3.h7">
+ H7
+ </h1>
+ <div id="heading_test_1_1.s1">
+ <h3>
+ S1
+ </h3>
+ <div id="heading_test_1_1.s1">
+ <h2 id="s1.h2">
+ H2
+ </h2>
+ <h3 id="heading_test_1_1.s1.h4">
+ H4
+ </h3>
+ <h3 id="heading_test_1_1.s1.h6">
+ H6
+ </h3>
+ </div>
+ <div id="heading_test_1_1.s2">
+ <h3>
+ S2
+ </h3>
+ <div id="heading_test_1_1.s2">
+ <h3 id="s2.h3">
+ H3
+ </h3>
+ </div>
+ </div>
+ <div id="heading_test_1_1.s3">
+ <h3>
+ S3
+ </h3>
+ <div id="heading_test_1_1.s3">
+ <h3 id="s3.h5">
+ H5
+ </h3>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/heading-1_1.quickbook b/src/boost/tools/quickbook/test/heading-1_1.quickbook
new file mode 100644
index 000000000..f7b2286f4
--- /dev/null
+++ b/src/boost/tools/quickbook/test/heading-1_1.quickbook
@@ -0,0 +1,55 @@
+[article Heading Test 1.1]
+
+[/ Basic headers ]
+
+[heading Generic header]
+[h1 Level 1]
+[h2 Level 2]
+[h3 Level 3]
+[h4 Level 4]
+[h5 Level 5]
+[h6 Level 6]
+
+[/ Test how heading ids are generated when different types of markup are present]
+
+[h1 *Bold*]
+[h1 [/]Comment[/]]
+
+[/ Headings that look like ids]
+
+[h1:notanid]
+[h1:also not an id]
+
+[/ Test how ids are generated for headings containing things like anchors
+ and links ]
+
+[h1 [#anchor]Anchor heading]
+[h1 [link anchor Link heading]]
+
+[/ Test how heading ids are generated inside sections]
+
+[h1 H1]
+
+[section:s1 S1]
+
+[h2 H2]
+
+[section:s2 S2]
+
+[h3 H3]
+
+[endsect]
+
+[heading H4]
+
+[section:s3 S3]
+
+[h3 H5]
+
+[endsect]
+
+[heading H6]
+
+[endsect]
+
+[h1 H7]
diff --git a/src/boost/tools/quickbook/test/heading-1_3.gold b/src/boost/tools/quickbook/test/heading-1_3.gold
new file mode 100644
index 000000000..f883a6037
--- /dev/null
+++ b/src/boost/tools/quickbook/test/heading-1_3.gold
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="header" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Header</title>
+ <bridgehead renderas="sect2" id="header.h0">
+ <phrase id="header.header_test"/><link linkend="header.header_test">Header Test</link>
+ </bridgehead>
+ <para>
+ Testing headers without sections.
+ </para>
+ <bridgehead renderas="sect2" id="header.h1">
+ <phrase id="header._not_an_id"/><link linkend="header._not_an_id">:Not an Id</link>
+ </bridgehead>
+ <para>
+ Paragraph.
+ </para>
+ <bridgehead renderas="sect3" id="header.h2">
+ <phrase id="header._not_an_id_again"/><link linkend="header._not_an_id_again">:Not
+ an Id again</link>
+ </bridgehead>
+ <para>
+ Paragraph.
+ </para>
+</article>
diff --git a/src/boost/tools/quickbook/test/heading-1_3.gold-html b/src/boost/tools/quickbook/test/heading-1_3.gold-html
new file mode 100644
index 000000000..a46543b63
--- /dev/null
+++ b/src/boost/tools/quickbook/test/heading-1_3.gold-html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Header
+ </h3>
+ <h2 id="header.header_test">
+ Header Test
+ </h2>
+ <p>
+ Testing headers without sections.
+ </p>
+ <h2 id="header._not_an_id">
+ :Not an Id
+ </h2>
+ <p>
+ Paragraph.
+ </p>
+ <h3 id="header._not_an_id_again">
+ :Not an Id again
+ </h3>
+ <p>
+ Paragraph.
+ </p>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/heading-1_3.quickbook b/src/boost/tools/quickbook/test/heading-1_3.quickbook
new file mode 100644
index 000000000..19de3a49a
--- /dev/null
+++ b/src/boost/tools/quickbook/test/heading-1_3.quickbook
@@ -0,0 +1,16 @@
+[article Header
+ [quickbook 1.3]
+ [id header]
+]
+
+[heading Header Test]
+
+Testing headers without sections.
+
+[heading:Not an Id]
+
+Paragraph.
+
+[h3:Not an Id again]
+
+Paragraph. \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/heading-1_5.gold b/src/boost/tools/quickbook/test/heading-1_5.gold
new file mode 100644
index 000000000..03fe46491
--- /dev/null
+++ b/src/boost/tools/quickbook/test/heading-1_5.gold
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="heading_test_1_5" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Heading Test 1.5</title>
+ <bridgehead renderas="sect2" id="heading_test_1_5.h0">
+ <phrase id="heading_test_1_5.generic_header"/><link linkend="heading_test_1_5.generic_header">Generic
+ header</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_5.h2">
+ <phrase id="heading_test_1_5.level_1"/><link linkend="heading_test_1_5.level_1">Level
+ 1</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="heading_test_1_5.h3">
+ <phrase id="heading_test_1_5.level_2"/><link linkend="heading_test_1_5.level_2">Level
+ 2</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="heading_test_1_5.h4">
+ <phrase id="heading_test_1_5.level_3"/><link linkend="heading_test_1_5.level_3">Level
+ 3</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="heading_test_1_5.h5">
+ <phrase id="heading_test_1_5.level_4"/><link linkend="heading_test_1_5.level_4">Level
+ 4</link>
+ </bridgehead>
+ <bridgehead renderas="sect5" id="heading_test_1_5.h6">
+ <phrase id="heading_test_1_5.level_5"/><link linkend="heading_test_1_5.level_5">Level
+ 5</link>
+ </bridgehead>
+ <bridgehead renderas="sect6" id="heading_test_1_5.h8">
+ <phrase id="heading_test_1_5.level_6"/><link linkend="heading_test_1_5.level_6">Level
+ 6</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_5.h9">
+ <phrase id="heading_test_1_5._emphasis_role__bold__bold__emphasis_"/><link linkend="heading_test_1_5._emphasis_role__bold__bold__emphasis_"><emphasis
+ role="bold">Bold</emphasis></link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_5.h10">
+ <phrase id="heading_test_1_5.comment"/><link linkend="heading_test_1_5.comment">Comment</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_5.h11">
+ <phrase id="heading_test_1_5._notanid"/><link linkend="heading_test_1_5._notanid">:notanid</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_5.h12">
+ <phrase id="heading_test_1_5._also_not_an_id"/><link linkend="heading_test_1_5._also_not_an_id">:also
+ not an id</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_5.h13">
+ <phrase id="heading_test_1_5._anchor_id__anchor___anchor_heading"/><link linkend="heading_test_1_5._anchor_id__anchor___anchor_heading"><anchor
+ id="anchor"/>Anchor heading</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_5.h14">
+ <phrase id="heading_test_1_5._link_linkend__anchor__link_heading__link_"/><link
+ linkend="heading_test_1_5._link_linkend__anchor__link_heading__link_"><link linkend="anchor">Link
+ heading</link></link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="heading_test_1_5.h15">
+ <phrase id="heading_test_1_5.h1"/><link linkend="heading_test_1_5.h1">H1</link>
+ </bridgehead>
+ <section id="heading_test_1_5.s1">
+ <title><link linkend="heading_test_1_5.s1">S1</link></title>
+ <bridgehead renderas="sect2" id="heading_test_1_5.s1.h0">
+ <phrase id="heading_test_1_5.s1.h2"/><link linkend="heading_test_1_5.s1.h2">H2</link>
+ </bridgehead>
+ <section id="heading_test_1_5.s1.s2">
+ <title><link linkend="heading_test_1_5.s1.s2">S2</link></title>
+ <bridgehead renderas="sect3" id="heading_test_1_5.s1.s2.h0">
+ <phrase id="heading_test_1_5.s1.s2.h3"/><link linkend="heading_test_1_5.s1.s2.h3">H3</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect2" id="heading_test_1_5.s1.h1">
+ <phrase id="heading_test_1_5.s1.h4"/><link linkend="heading_test_1_5.s1.h4">H4</link>
+ </bridgehead>
+ <section id="heading_test_1_5.s1.s3">
+ <title><link linkend="heading_test_1_5.s1.s3">S3</link></title>
+ <bridgehead renderas="sect4" id="heading_test_1_5.s1.s3.h0">
+ <phrase id="heading_test_1_5.s1.s3.h5"/><link linkend="heading_test_1_5.s1.s3.h5">H5</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect2" id="heading_test_1_5.s1.h3">
+ <phrase id="heading_test_1_5.s1.h6"/><link linkend="heading_test_1_5.s1.h6">H6</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect1" id="heading_test_1_5.h16">
+ <phrase id="heading_test_1_5.h7"/><link linkend="heading_test_1_5.h7">H7</link>
+ </bridgehead>
+</article>
diff --git a/src/boost/tools/quickbook/test/heading-1_5.gold-html b/src/boost/tools/quickbook/test/heading-1_5.gold-html
new file mode 100644
index 000000000..cad0e0311
--- /dev/null
+++ b/src/boost/tools/quickbook/test/heading-1_5.gold-html
@@ -0,0 +1,100 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Heading Test 1.5
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#heading_test_1_5.s1">S1</a>
+ </li>
+ </ul>
+ </div>
+ <h2 id="heading_test_1_5.generic_header">
+ Generic header
+ </h2>
+ <h1 id="heading_test_1_5.level_1">
+ Level 1
+ </h1>
+ <h2 id="heading_test_1_5.level_2">
+ Level 2
+ </h2>
+ <h3 id="heading_test_1_5.level_3">
+ Level 3
+ </h3>
+ <h4 id="heading_test_1_5.level_4">
+ Level 4
+ </h4>
+ <h5 id="heading_test_1_5.level_5">
+ Level 5
+ </h5>
+ <h6 id="heading_test_1_5.level_6">
+ Level 6
+ </h6>
+ <h1 id="heading_test_1_5._emphasis_role__bold__bold__emphasis_">
+ <span class="bold"><strong>Bold</strong></span>
+ </h1>
+ <h1 id="heading_test_1_5.comment">
+ Comment
+ </h1>
+ <h1 id="heading_test_1_5._notanid">
+ :notanid
+ </h1>
+ <h1 id="heading_test_1_5._also_not_an_id">
+ :also not an id
+ </h1>
+ <h1 id="heading_test_1_5._anchor_id__anchor___anchor_heading">
+ <span id="anchor"></span>Anchor heading
+ </h1>
+ <h1 id="heading_test_1_5._link_linkend__anchor__link_heading__link_">
+ <a href="#anchor">Link heading</a>
+ </h1>
+ <h2 id="heading_test_1_5.h1">
+ H1
+ </h2>
+ <h1 id="heading_test_1_5.h7">
+ H7
+ </h1>
+ <div id="heading_test_1_5.s1">
+ <h3>
+ S1
+ </h3>
+ <div id="heading_test_1_5.s1">
+ <h2 id="heading_test_1_5.s1.h2">
+ H2
+ </h2>
+ <h2 id="heading_test_1_5.s1.h4">
+ H4
+ </h2>
+ <h2 id="heading_test_1_5.s1.h6">
+ H6
+ </h2>
+ </div>
+ <div id="heading_test_1_5.s1.s2">
+ <h3>
+ S2
+ </h3>
+ <div id="heading_test_1_5.s1.s2">
+ <h3 id="heading_test_1_5.s1.s2.h3">
+ H3
+ </h3>
+ </div>
+ </div>
+ <div id="heading_test_1_5.s1.s3">
+ <h3>
+ S3
+ </h3>
+ <div id="heading_test_1_5.s1.s3">
+ <h4 id="heading_test_1_5.s1.s3.h5">
+ H5
+ </h4>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/heading-1_5.quickbook b/src/boost/tools/quickbook/test/heading-1_5.quickbook
new file mode 100644
index 000000000..572b184cd
--- /dev/null
+++ b/src/boost/tools/quickbook/test/heading-1_5.quickbook
@@ -0,0 +1,57 @@
+[article Heading Test 1.5
+[quickbook 1.5]
+]
+
+[/ Basic headers ]
+
+[heading Generic header]
+[h1 Level 1]
+[h2 Level 2]
+[h3 Level 3]
+[h4 Level 4]
+[h5 Level 5]
+[h6 Level 6]
+
+[/ Test how heading ids are generated when different types of markup are present]
+
+[h1 *Bold*]
+[h1 [/]Comment[/]]
+
+[/ Headings that look like ids]
+
+[h1:notanid]
+[h1:also not an id]
+
+[/ Test how ids are generated for headings containing things like anchors
+ and links ]
+
+[h1 [#anchor]Anchor heading]
+[h1 [link anchor Link heading]]
+
+[/ Test how heading ids are generated inside sections]
+
+[heading H1]
+
+[section:s1 S1]
+
+[h2 H2]
+
+[section:s2 S2]
+
+[h3 H3]
+
+[endsect]
+
+[h2 H4]
+
+[section:s3 S3]
+
+[heading H5]
+
+[endsect]
+
+[h2 H6]
+
+[endsect]
+
+[h1 H7]
diff --git a/src/boost/tools/quickbook/test/heading-1_6.gold b/src/boost/tools/quickbook/test/heading-1_6.gold
new file mode 100644
index 000000000..008115d72
--- /dev/null
+++ b/src/boost/tools/quickbook/test/heading-1_6.gold
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="heading_test_1_6" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Heading Test 1.6</title>
+ <bridgehead renderas="sect2" id="heading_test_1_6.h0">
+ <phrase id="heading_test_1_6.generic_header"/><link linkend="heading_test_1_6.generic_header">Generic
+ header</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_6.h2">
+ <phrase id="heading_test_1_6.level_1"/><link linkend="heading_test_1_6.level_1">Level
+ 1</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="heading_test_1_6.h3">
+ <phrase id="heading_test_1_6.level_2"/><link linkend="heading_test_1_6.level_2">Level
+ 2</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="heading_test_1_6.h4">
+ <phrase id="heading_test_1_6.level_3"/><link linkend="heading_test_1_6.level_3">Level
+ 3</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="heading_test_1_6.h5">
+ <phrase id="heading_test_1_6.level_4"/><link linkend="heading_test_1_6.level_4">Level
+ 4</link>
+ </bridgehead>
+ <bridgehead renderas="sect5" id="heading_test_1_6.h6">
+ <phrase id="heading_test_1_6.level_5"/><link linkend="heading_test_1_6.level_5">Level
+ 5</link>
+ </bridgehead>
+ <bridgehead renderas="sect6" id="heading_test_1_6.h8">
+ <phrase id="heading_test_1_6.level_6"/><link linkend="heading_test_1_6.level_6">Level
+ 6</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_6.h9">
+ <phrase id="heading_test_1_6.bold"/><link linkend="heading_test_1_6.bold"><emphasis
+ role="bold">Bold</emphasis></link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_6.h10">
+ <phrase id="heading_test_1_6.comment"/><link linkend="heading_test_1_6.comment">Comment</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_6.h11">
+ <phrase id="heading_test_1_6.anchor_anchor_heading"/><link linkend="heading_test_1_6.anchor_anchor_heading"><anchor
+ id="anchor"/>Anchor heading</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_6.h12">
+ <phrase id="heading_test_1_6.link_anchor_link_heading"/><link linkend="heading_test_1_6.link_anchor_link_heading"><link
+ linkend="anchor">Link heading</link></link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_6.h13">
+ <phrase id="heading_test_1_6.h1"/><link linkend="heading_test_1_6.h1">H1</link>
+ </bridgehead>
+ <section id="heading_test_1_6.s1">
+ <title><link linkend="heading_test_1_6.s1">S1</link></title>
+ <bridgehead renderas="sect3" id="heading_test_1_6.s1.h0">
+ <phrase id="heading_test_1_6.s1.h2"/><link linkend="heading_test_1_6.s1.h2">H2</link>
+ </bridgehead>
+ <section id="heading_test_1_6.s1.s2">
+ <title><link linkend="heading_test_1_6.s1.s2">S2</link></title>
+ <bridgehead renderas="sect3" id="heading_test_1_6.s1.s2.h0">
+ <phrase id="heading_test_1_6.s1.s2.h3"/><link linkend="heading_test_1_6.s1.s2.h3">H3</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect2" id="heading_test_1_6.s1.h1">
+ <phrase id="heading_test_1_6.s1.h4"/><link linkend="heading_test_1_6.s1.h4">H4</link>
+ </bridgehead>
+ <section id="heading_test_1_6.s1.s3">
+ <title><link linkend="heading_test_1_6.s1.s3">S3</link></title>
+ <bridgehead renderas="sect4" id="heading_test_1_6.s1.s3.h0">
+ <phrase id="heading_test_1_6.s1.s3.h5"/><link linkend="heading_test_1_6.s1.s3.h5">H5</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect2" id="heading_test_1_6.s1.h3">
+ <phrase id="heading_test_1_6.s1.h6"/><link linkend="heading_test_1_6.s1.h6">H6</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect1" id="heading_test_1_6.h14">
+ <phrase id="heading_test_1_6.h7"/><link linkend="heading_test_1_6.h7">H7</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_6.h15">
+ <phrase id="heading_test_1_6.a1"/><link linkend="heading_test_1_6.a1">H1</link>
+ </bridgehead>
+ <section id="heading_test_1_6.s1_0">
+ <title><link linkend="heading_test_1_6.s1_0">S1</link></title>
+ <bridgehead renderas="sect2" id="heading_test_1_6.s1_0.h0">
+ <phrase id="heading_test_1_6.s1_0.a2"/><link linkend="heading_test_1_6.s1_0.a2">H2</link>
+ </bridgehead>
+ <section id="heading_test_1_6.s1_0.s2">
+ <title><link linkend="heading_test_1_6.s1_0.s2">S2</link></title>
+ <bridgehead renderas="sect3" id="heading_test_1_6.s1_0.s2.h0">
+ <phrase id="heading_test_1_6.s1_0.s2.a3"/><link linkend="heading_test_1_6.s1_0.s2.a3">H3</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect2" id="heading_test_1_6.s1_0.h1">
+ <phrase id="heading_test_1_6.s1_0.a4"/><link linkend="heading_test_1_6.s1_0.a4">H4</link>
+ </bridgehead>
+ <section id="heading_test_1_6.s1_0.s3">
+ <title><link linkend="heading_test_1_6.s1_0.s3">S3</link></title>
+ <bridgehead renderas="sect3" id="heading_test_1_6.s1_0.s3.h0">
+ <phrase id="heading_test_1_6.s1_0.s3.a5"/><link linkend="heading_test_1_6.s1_0.s3.a5">H5</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect3" id="heading_test_1_6.s1_0.h2">
+ <phrase id="heading_test_1_6.s1_0.a6"/><link linkend="heading_test_1_6.s1_0.a6">H6</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect1" id="heading_test_1_6.h16">
+ <phrase id="heading_test_1_6.a7"/><link linkend="heading_test_1_6.a7">H7</link>
+ </bridgehead>
+</article>
diff --git a/src/boost/tools/quickbook/test/heading-1_6.gold-html b/src/boost/tools/quickbook/test/heading-1_6.gold-html
new file mode 100644
index 000000000..ce826d66b
--- /dev/null
+++ b/src/boost/tools/quickbook/test/heading-1_6.gold-html
@@ -0,0 +1,139 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Heading Test 1.6
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#heading_test_1_6.s1">S1</a>
+ </li>
+ <li>
+ <a href="#heading_test_1_6.s1_0">S1</a>
+ </li>
+ </ul>
+ </div>
+ <h2 id="heading_test_1_6.generic_header">
+ Generic header
+ </h2>
+ <h1 id="heading_test_1_6.level_1">
+ Level 1
+ </h1>
+ <h2 id="heading_test_1_6.level_2">
+ Level 2
+ </h2>
+ <h3 id="heading_test_1_6.level_3">
+ Level 3
+ </h3>
+ <h4 id="heading_test_1_6.level_4">
+ Level 4
+ </h4>
+ <h5 id="heading_test_1_6.level_5">
+ Level 5
+ </h5>
+ <h6 id="heading_test_1_6.level_6">
+ Level 6
+ </h6>
+ <h1 id="heading_test_1_6.bold">
+ <span class="bold"><strong>Bold</strong></span>
+ </h1>
+ <h1 id="heading_test_1_6.comment">
+ Comment
+ </h1>
+ <h1 id="heading_test_1_6.anchor_anchor_heading">
+ <span id="anchor"></span>Anchor heading
+ </h1>
+ <h1 id="heading_test_1_6.link_anchor_link_heading">
+ <a href="#anchor">Link heading</a>
+ </h1>
+ <h1 id="heading_test_1_6.h1">
+ H1
+ </h1>
+ <h1 id="heading_test_1_6.h7">
+ H7
+ </h1>
+ <h1 id="heading_test_1_6.a1">
+ H1
+ </h1>
+ <h1 id="heading_test_1_6.a7">
+ H7
+ </h1>
+ <div id="heading_test_1_6.s1">
+ <h3>
+ S1
+ </h3>
+ <div id="heading_test_1_6.s1">
+ <h3 id="heading_test_1_6.s1.h2">
+ H2
+ </h3>
+ <h2 id="heading_test_1_6.s1.h4">
+ H4
+ </h2>
+ <h2 id="heading_test_1_6.s1.h6">
+ H6
+ </h2>
+ </div>
+ <div id="heading_test_1_6.s1.s2">
+ <h3>
+ S2
+ </h3>
+ <div id="heading_test_1_6.s1.s2">
+ <h3 id="heading_test_1_6.s1.s2.h3">
+ H3
+ </h3>
+ </div>
+ </div>
+ <div id="heading_test_1_6.s1.s3">
+ <h3>
+ S3
+ </h3>
+ <div id="heading_test_1_6.s1.s3">
+ <h4 id="heading_test_1_6.s1.s3.h5">
+ H5
+ </h4>
+ </div>
+ </div>
+ </div>
+ <div id="heading_test_1_6.s1_0">
+ <h3>
+ S1
+ </h3>
+ <div id="heading_test_1_6.s1_0">
+ <h2 id="heading_test_1_6.s1_0.a2">
+ H2
+ </h2>
+ <h2 id="heading_test_1_6.s1_0.a4">
+ H4
+ </h2>
+ <h3 id="heading_test_1_6.s1_0.a6">
+ H6
+ </h3>
+ </div>
+ <div id="heading_test_1_6.s1_0.s2">
+ <h3>
+ S2
+ </h3>
+ <div id="heading_test_1_6.s1_0.s2">
+ <h3 id="heading_test_1_6.s1_0.s2.a3">
+ H3
+ </h3>
+ </div>
+ </div>
+ <div id="heading_test_1_6.s1_0.s3">
+ <h3>
+ S3
+ </h3>
+ <div id="heading_test_1_6.s1_0.s3">
+ <h3 id="heading_test_1_6.s1_0.s3.a5">
+ H5
+ </h3>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/heading-1_6.quickbook b/src/boost/tools/quickbook/test/heading-1_6.quickbook
new file mode 100644
index 000000000..b8f668694
--- /dev/null
+++ b/src/boost/tools/quickbook/test/heading-1_6.quickbook
@@ -0,0 +1,80 @@
+[article Heading Test 1.6
+[quickbook 1.6]
+]
+
+[/ Basic headers ]
+
+[heading Generic header]
+[h1 Level 1]
+[h2 Level 2]
+[h3 Level 3]
+[h4 Level 4]
+[h5 Level 5]
+[h6 Level 6]
+
+[/ Test how heading ids are generated when different types of markup are present]
+
+[h1 *Bold*]
+[h1 [/]Comment[/]]
+
+[/ Test how ids are generated for headings containing things like anchors
+ and links ]
+
+[h1 [#anchor]Anchor heading]
+[h1 [link anchor Link heading]]
+
+[/ Test how heading ids are generated inside sections]
+
+[h1 H1]
+
+[section:s1 S1]
+
+[heading H2]
+
+[section:s2 S2]
+
+[h3 H3]
+
+[endsect]
+
+[h2 H4]
+
+[section:s3 S3]
+
+[heading H5]
+
+[endsect]
+
+[h2 H6]
+
+[endsect]
+
+[h1 H7]
+
+[/ Repeat with explicit ids]
+
+[h1:a1 H1]
+
+[section:s1 S1]
+
+[h2:a2 H2]
+
+[section:s2 S2]
+
+[h3:a3 H3]
+
+[endsect]
+
+[h2:a4 H4]
+
+[section:s3 S3]
+
+[h3:a5 H5]
+
+[endsect]
+
+[heading:a6 H6]
+
+[endsect]
+
+[h1:a7 H7]
diff --git a/src/boost/tools/quickbook/test/heading-1_7.gold b/src/boost/tools/quickbook/test/heading-1_7.gold
new file mode 100644
index 000000000..52f8291ab
--- /dev/null
+++ b/src/boost/tools/quickbook/test/heading-1_7.gold
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="heading_test_1_7" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Heading Test 1.7</title>
+ <bridgehead renderas="sect2" id="heading_test_1_7.h0">
+ <phrase id="heading_test_1_7.generic_header"/><link linkend="heading_test_1_7.generic_header">Generic
+ header</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_7.h2">
+ <phrase id="heading_test_1_7.level_1"/><link linkend="heading_test_1_7.level_1">Level
+ 1</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="heading_test_1_7.h3">
+ <phrase id="heading_test_1_7.level_2"/><link linkend="heading_test_1_7.level_2">Level
+ 2</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="heading_test_1_7.h4">
+ <phrase id="heading_test_1_7.level_3"/><link linkend="heading_test_1_7.level_3">Level
+ 3</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="heading_test_1_7.h5">
+ <phrase id="heading_test_1_7.level_4"/><link linkend="heading_test_1_7.level_4">Level
+ 4</link>
+ </bridgehead>
+ <bridgehead renderas="sect5" id="heading_test_1_7.h6">
+ <phrase id="heading_test_1_7.level_5"/><link linkend="heading_test_1_7.level_5">Level
+ 5</link>
+ </bridgehead>
+ <bridgehead renderas="sect6" id="heading_test_1_7.h8">
+ <phrase id="heading_test_1_7.level_6"/><link linkend="heading_test_1_7.level_6">Level
+ 6</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_7.h9">
+ <phrase id="heading_test_1_7.bold"/><link linkend="heading_test_1_7.bold"><emphasis
+ role="bold">Bold</emphasis></link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_7.h10">
+ <phrase id="heading_test_1_7.comment"/><link linkend="heading_test_1_7.comment">Comment</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_7.h11">
+ <phrase id="heading_test_1_7.anchor_anchor_heading"/><link linkend="heading_test_1_7.anchor_anchor_heading"><anchor
+ id="anchor"/>Anchor heading</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_7.h12">
+ <phrase id="heading_test_1_7.link_anchor_link_heading"/><link linkend="heading_test_1_7.link_anchor_link_heading"><link
+ linkend="anchor">Link heading</link></link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_7.h13">
+ <phrase id="heading_test_1_7.h1"/><link linkend="heading_test_1_7.h1">H1</link>
+ </bridgehead>
+ <section id="heading_test_1_7.s1">
+ <title><link linkend="heading_test_1_7.s1">S1</link></title>
+ <bridgehead renderas="sect3" id="heading_test_1_7.s1.h0">
+ <phrase id="heading_test_1_7.s1.h2"/><link linkend="heading_test_1_7.s1.h2">H2</link>
+ </bridgehead>
+ <section id="heading_test_1_7.s1.s2">
+ <title><link linkend="heading_test_1_7.s1.s2">S2</link></title>
+ <bridgehead renderas="sect3" id="heading_test_1_7.s1.s2.h0">
+ <phrase id="heading_test_1_7.s1.s2.h3"/><link linkend="heading_test_1_7.s1.s2.h3">H3</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect2" id="heading_test_1_7.s1.h1">
+ <phrase id="heading_test_1_7.s1.h4"/><link linkend="heading_test_1_7.s1.h4">H4</link>
+ </bridgehead>
+ <section id="heading_test_1_7.s1.s3">
+ <title><link linkend="heading_test_1_7.s1.s3">S3</link></title>
+ <bridgehead renderas="sect4" id="heading_test_1_7.s1.s3.h0">
+ <phrase id="heading_test_1_7.s1.s3.h5"/><link linkend="heading_test_1_7.s1.s3.h5">H5</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect2" id="heading_test_1_7.s1.h3">
+ <phrase id="heading_test_1_7.s1.h6"/><link linkend="heading_test_1_7.s1.h6">H6</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect1" id="heading_test_1_7.h14">
+ <phrase id="heading_test_1_7.h7"/><link linkend="heading_test_1_7.h7">H7</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="heading_test_1_7.h15">
+ <phrase id="heading_test_1_7.a1"/><link linkend="heading_test_1_7.a1">H1</link>
+ </bridgehead>
+ <section id="heading_test_1_7.s1_0">
+ <title><link linkend="heading_test_1_7.s1_0">S1</link></title>
+ <bridgehead renderas="sect2" id="heading_test_1_7.s1_0.h0">
+ <phrase id="heading_test_1_7.s1_0.a2"/><link linkend="heading_test_1_7.s1_0.a2">H2</link>
+ </bridgehead>
+ <section id="heading_test_1_7.s1_0.s2">
+ <title><link linkend="heading_test_1_7.s1_0.s2">S2</link></title>
+ <bridgehead renderas="sect3" id="heading_test_1_7.s1_0.s2.h0">
+ <phrase id="heading_test_1_7.s1_0.s2.a3"/><link linkend="heading_test_1_7.s1_0.s2.a3">H3</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect2" id="heading_test_1_7.s1_0.h1">
+ <phrase id="heading_test_1_7.s1_0.a4"/><link linkend="heading_test_1_7.s1_0.a4">H4</link>
+ </bridgehead>
+ <section id="heading_test_1_7.s1_0.s3">
+ <title><link linkend="heading_test_1_7.s1_0.s3">S3</link></title>
+ <bridgehead renderas="sect3" id="heading_test_1_7.s1_0.s3.h0">
+ <phrase id="heading_test_1_7.s1_0.s3.a5"/><link linkend="heading_test_1_7.s1_0.s3.a5">H5</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect3" id="heading_test_1_7.s1_0.h2">
+ <phrase id="heading_test_1_7.s1_0.a6"/><link linkend="heading_test_1_7.s1_0.a6">H6</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect1" id="heading_test_1_7.h16">
+ <phrase id="heading_test_1_7.a7"/><link linkend="heading_test_1_7.a7">H7</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="heading_test_1_7.h17">
+ <phrase id="heading_test_1_7.abc-2"/><link linkend="heading_test_1_7.abc-2">Template
+ Id</link>
+ </bridgehead>
+</article>
diff --git a/src/boost/tools/quickbook/test/heading-1_7.gold-html b/src/boost/tools/quickbook/test/heading-1_7.gold-html
new file mode 100644
index 000000000..b0e21997b
--- /dev/null
+++ b/src/boost/tools/quickbook/test/heading-1_7.gold-html
@@ -0,0 +1,142 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Heading Test 1.7
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#heading_test_1_7.s1">S1</a>
+ </li>
+ <li>
+ <a href="#heading_test_1_7.s1_0">S1</a>
+ </li>
+ </ul>
+ </div>
+ <h2 id="heading_test_1_7.generic_header">
+ Generic header
+ </h2>
+ <h1 id="heading_test_1_7.level_1">
+ Level 1
+ </h1>
+ <h2 id="heading_test_1_7.level_2">
+ Level 2
+ </h2>
+ <h3 id="heading_test_1_7.level_3">
+ Level 3
+ </h3>
+ <h4 id="heading_test_1_7.level_4">
+ Level 4
+ </h4>
+ <h5 id="heading_test_1_7.level_5">
+ Level 5
+ </h5>
+ <h6 id="heading_test_1_7.level_6">
+ Level 6
+ </h6>
+ <h1 id="heading_test_1_7.bold">
+ <span class="bold"><strong>Bold</strong></span>
+ </h1>
+ <h1 id="heading_test_1_7.comment">
+ Comment
+ </h1>
+ <h1 id="heading_test_1_7.anchor_anchor_heading">
+ <span id="anchor"></span>Anchor heading
+ </h1>
+ <h1 id="heading_test_1_7.link_anchor_link_heading">
+ <a href="#anchor">Link heading</a>
+ </h1>
+ <h1 id="heading_test_1_7.h1">
+ H1
+ </h1>
+ <h1 id="heading_test_1_7.h7">
+ H7
+ </h1>
+ <h1 id="heading_test_1_7.a1">
+ H1
+ </h1>
+ <h1 id="heading_test_1_7.a7">
+ H7
+ </h1>
+ <h2 id="heading_test_1_7.abc-2">
+ Template Id
+ </h2>
+ <div id="heading_test_1_7.s1">
+ <h3>
+ S1
+ </h3>
+ <div id="heading_test_1_7.s1">
+ <h3 id="heading_test_1_7.s1.h2">
+ H2
+ </h3>
+ <h2 id="heading_test_1_7.s1.h4">
+ H4
+ </h2>
+ <h2 id="heading_test_1_7.s1.h6">
+ H6
+ </h2>
+ </div>
+ <div id="heading_test_1_7.s1.s2">
+ <h3>
+ S2
+ </h3>
+ <div id="heading_test_1_7.s1.s2">
+ <h3 id="heading_test_1_7.s1.s2.h3">
+ H3
+ </h3>
+ </div>
+ </div>
+ <div id="heading_test_1_7.s1.s3">
+ <h3>
+ S3
+ </h3>
+ <div id="heading_test_1_7.s1.s3">
+ <h4 id="heading_test_1_7.s1.s3.h5">
+ H5
+ </h4>
+ </div>
+ </div>
+ </div>
+ <div id="heading_test_1_7.s1_0">
+ <h3>
+ S1
+ </h3>
+ <div id="heading_test_1_7.s1_0">
+ <h2 id="heading_test_1_7.s1_0.a2">
+ H2
+ </h2>
+ <h2 id="heading_test_1_7.s1_0.a4">
+ H4
+ </h2>
+ <h3 id="heading_test_1_7.s1_0.a6">
+ H6
+ </h3>
+ </div>
+ <div id="heading_test_1_7.s1_0.s2">
+ <h3>
+ S2
+ </h3>
+ <div id="heading_test_1_7.s1_0.s2">
+ <h3 id="heading_test_1_7.s1_0.s2.a3">
+ H3
+ </h3>
+ </div>
+ </div>
+ <div id="heading_test_1_7.s1_0.s3">
+ <h3>
+ S3
+ </h3>
+ <div id="heading_test_1_7.s1_0.s3">
+ <h3 id="heading_test_1_7.s1_0.s3.a5">
+ H5
+ </h3>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/heading-1_7.quickbook b/src/boost/tools/quickbook/test/heading-1_7.quickbook
new file mode 100644
index 000000000..47f878add
--- /dev/null
+++ b/src/boost/tools/quickbook/test/heading-1_7.quickbook
@@ -0,0 +1,83 @@
+[article Heading Test 1.7
+[quickbook 1.7]
+]
+
+[/ Basic headers ]
+
+[heading Generic header]
+[h1 Level 1]
+[h2 Level 2]
+[h3 Level 3]
+[h4 Level 4]
+[h5 Level 5]
+[h6 Level 6]
+
+[/ Test how heading ids are generated when different types of markup are present]
+
+[h1 *Bold*]
+[h1 [/]Comment[/]]
+
+[/ Test how ids are generated for headings containing things like anchors
+ and links ]
+
+[h1 [#anchor]Anchor heading]
+[h1 [link anchor Link heading]]
+
+[/ Test how heading ids are generated inside sections]
+
+[h1 H1]
+
+[section:s1 S1]
+
+[heading H2]
+
+[section:s2 S2]
+
+[h3 H3]
+
+[endsect]
+
+[h2 H4]
+
+[section:s3 S3]
+
+[heading H5]
+
+[endsect]
+
+[h2 H6]
+
+[endsect]
+
+[h1 H7]
+
+[/ Repeat with explicit ids]
+
+[h1:a1 H1]
+
+[section:s1 S1]
+
+[h2:a2 H2]
+
+[section:s2 S2]
+
+[h3:a3 H3]
+
+[endsect]
+
+[h2:a4 H4]
+
+[section:s3 S3]
+
+[h3:a5 H5]
+
+[endsect]
+
+[heading:a6 H6]
+
+[endsect]
+
+[h1:a7 H7]
+
+[template thing[] abc]
+[heading:[thing]-2 Template Id]
diff --git a/src/boost/tools/quickbook/test/heading_unclosed-1_4-fail.quickbook b/src/boost/tools/quickbook/test/heading_unclosed-1_4-fail.quickbook
new file mode 100644
index 000000000..79bf3d79a
--- /dev/null
+++ b/src/boost/tools/quickbook/test/heading_unclosed-1_4-fail.quickbook
@@ -0,0 +1,3 @@
+[article Parse error [quickbook 1.4]]
+
+[heading Incomplete heading
diff --git a/src/boost/tools/quickbook/test/hr-1_5.gold b/src/boost/tools/quickbook/test/hr-1_5.gold
new file mode 100644
index 000000000..8da9aa4d0
--- /dev/null
+++ b/src/boost/tools/quickbook/test/hr-1_5.gold
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="horizontal_rule" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Horizontal Rule</title>
+ <para/>
+ <para>
+ This should be displayed.
+ </para>
+ <para/>
+ <para/>
+ <para>
+ * This shouldn't be a list
+ </para>
+ <para/>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ This should be a list
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para/>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ This should be a list
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para/>
+ <para/>
+ <para/>
+</article>
diff --git a/src/boost/tools/quickbook/test/hr-1_5.gold-html b/src/boost/tools/quickbook/test/hr-1_5.gold-html
new file mode 100644
index 000000000..14c24c067
--- /dev/null
+++ b/src/boost/tools/quickbook/test/hr-1_5.gold-html
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Horizontal Rule
+ </h3>
+ <p>
+ </p>
+ <p>
+ This should be displayed.
+ </p>
+ <p>
+ </p>
+ <p>
+ </p>
+ <p>
+ * This shouldn't be a list
+ </p>
+ <p>
+ </p>
+ <ul>
+ <li>
+ <div>
+ This should be a list
+ </div>
+ </li>
+ </ul>
+ <p>
+ </p>
+ <ul>
+ <li>
+ <div>
+ This should be a list
+ </div>
+ </li>
+ </ul>
+ <p>
+ </p>
+ <p>
+ </p>
+ <p>
+ </p>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/hr-1_5.quickbook b/src/boost/tools/quickbook/test/hr-1_5.quickbook
new file mode 100644
index 000000000..27df9f537
--- /dev/null
+++ b/src/boost/tools/quickbook/test/hr-1_5.quickbook
@@ -0,0 +1,27 @@
+[article Horizontal Rule
+[quickbook 1.5]
+]
+
+---- [/
+This should be a comment.
+] This should be displayed.
+
+---- [/ ] This shouldn't be displayed.
+
+---- [/
+This should be a comment.
+] * This shouldn't be a list
+
+---- [/
+This should be a comment.
+]
+* This should be a list
+
+---- [/ This should be a comment]
+* This should be a list
+
+---- [* This shouldn't be displayed.]
+
+---- This doesn't have an open bracket.]
+
+---- [ This doesn't have a close bracket.
diff --git a/src/boost/tools/quickbook/test/hr-1_6.gold b/src/boost/tools/quickbook/test/hr-1_6.gold
new file mode 100644
index 000000000..b9ef17a47
--- /dev/null
+++ b/src/boost/tools/quickbook/test/hr-1_6.gold
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="horizontal_rule" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Horizontal Rule</title>
+ <para/>
+ <para>
+ This should be displayed.
+ </para>
+ <para/>
+ <para/>
+ <para>
+ * This shouldn't be a list
+ </para>
+ <para/>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ This should be a list
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para/>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ This should be a list
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para/>
+ <para>
+ <emphasis role="bold">This should be displayed. Maybe that's wrong?</emphasis>
+ </para>
+ <para/>
+ <para>
+ Odd way to get text displayed.
+ </para>
+</article>
diff --git a/src/boost/tools/quickbook/test/hr-1_6.gold-html b/src/boost/tools/quickbook/test/hr-1_6.gold-html
new file mode 100644
index 000000000..11e670228
--- /dev/null
+++ b/src/boost/tools/quickbook/test/hr-1_6.gold-html
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Horizontal Rule
+ </h3>
+ <p>
+ </p>
+ <p>
+ This should be displayed.
+ </p>
+ <p>
+ </p>
+ <p>
+ </p>
+ <p>
+ * This shouldn't be a list
+ </p>
+ <p>
+ </p>
+ <ul>
+ <li>
+ <div>
+ This should be a list
+ </div>
+ </li>
+ </ul>
+ <p>
+ </p>
+ <ul>
+ <li>
+ <div>
+ This should be a list
+ </div>
+ </li>
+ </ul>
+ <p>
+ </p>
+ <p>
+ <span class="bold"><strong>This should be displayed. Maybe that's wrong?</strong></span>
+ </p>
+ <p>
+ </p>
+ <p>
+ Odd way to get text displayed.
+ </p>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/hr-1_6.quickbook b/src/boost/tools/quickbook/test/hr-1_6.quickbook
new file mode 100644
index 000000000..0ed38c93e
--- /dev/null
+++ b/src/boost/tools/quickbook/test/hr-1_6.quickbook
@@ -0,0 +1,26 @@
+[article Horizontal Rule
+[quickbook 1.6]
+]
+
+---- [/
+This should be a comment.
+] This should be displayed.
+
+---- [/ ] This shouldn't be displayed.
+
+---- [/
+This should be a comment.
+] * This shouldn't be a list
+
+---- [/
+This should be a comment.
+]
+* This should be a list
+
+---- [/ This should be a comment]
+* This should be a list
+
+---- [* This should be displayed. Maybe that's wrong?]
+
+[template nothing]
+---- [nothing] Odd way to get text displayed.
diff --git a/src/boost/tools/quickbook/test/html/images/open_clipart_library_logo.svg b/src/boost/tools/quickbook/test/html/images/open_clipart_library_logo.svg
new file mode 100644
index 000000000..9a4521f3a
--- /dev/null
+++ b/src/boost/tools/quickbook/test/html/images/open_clipart_library_logo.svg
@@ -0,0 +1,143 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://web.resource.org/cc/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.0"
+ x="0.00000000"
+ y="0.00000000"
+ id="svg6221"
+ width="745.60706"
+ height="513.25690"
+ sodipodi:version="0.32"
+ inkscape:version="0.42"
+ sodipodi:docname="Open_Clipart_Library_logo.svg">
+ <sodipodi:namedview
+ inkscape:cy="893.36713"
+ inkscape:cx="305.25953"
+ inkscape:zoom="0.86831670"
+ inkscape:window-height="913"
+ inkscape:window-width="1272"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ borderopacity="1.0"
+ bordercolor="#666666"
+ pagecolor="#ffffff"
+ id="base"
+ inkscape:window-x="0"
+ inkscape:window-y="30"
+ inkscape:current-layer="svg6221" />
+ <metadata
+ id="metadata4">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title>Open Clip Art Logo</dc:title>
+ <dc:date>10-01-2004</dc:date>
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Andreas Nilsson</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <cc:license
+ rdf:resource="http://web.resource.org/cc/PublicDomain" />
+ <dc:contributor>
+ <cc:Agent>
+ <dc:title>Jon Phillips, Tobias Jakobs</dc:title>
+ </cc:Agent>
+ </dc:contributor>
+ <dc:description>This is one version of the official Open Clip Art Library logo.</dc:description>
+ <dc:subject>logo, open clip art library logo, logotype</dc:subject>
+ </cc:Work>
+ <cc:License
+ rdf:about="http://web.resource.org/cc/PublicDomain">
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/Reproduction" />
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/Distribution" />
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
+ </cc:License>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs3" />
+ <path
+ d="M 405.82430,48.494855 C 396.10958,45.870336 386.13966,51.583653 383.51514,61.298370 L 298.15838,376.92441 C 295.53385,386.63914 301.24717,396.41506 310.96188,399.03957 L 626.58791,484.39635 C 636.30255,487.02086 646.27253,481.30755 648.89705,471.59283 L 734.25375,155.96679 C 735.49097,151.38725 734.71475,146.85751 732.70181,142.96928 L 732.70181,142.77528 L 732.50782,142.38730 L 732.50782,142.19331 C 732.46276,142.11490 732.36008,142.07704 732.31383,141.99931 L 717.76438,111.93045 L 651.80695,114.84034 L 405.82430,48.494855 z "
+ style="fill:#000000;fill-opacity:0.20000000;fill-rule:evenodd;stroke:none;stroke-width:1.6789947;stroke-miterlimit:4.0000000;stroke-opacity:0.20000000"
+ id="rect6080" />
+ <rect
+ width="363.28452"
+ height="363.28452"
+ rx="2.9260478"
+ ry="2.9260478"
+ x="363.42282"
+ y="-78.837021"
+ transform="matrix(0.965391,0.260807,-0.260807,0.965391,0.000000,0.000000)"
+ style="fill:#ffffff;fill-rule:evenodd;stroke:#ffffff;stroke-width:7.7597070;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+ id="rect911" />
+ <rect
+ width="288.49521"
+ height="288.49521"
+ rx="2.3236644"
+ ry="2.3236644"
+ x="398.72931"
+ y="-39.355053"
+ transform="matrix(0.965391,0.260807,-0.260807,0.965391,0.000000,0.000000)"
+ style="fill:#f3e533;fill-opacity:1.0000000;fill-rule:evenodd;stroke-width:0.79413080pt"
+ id="rect912" />
+ <path
+ d="M 552.48969,32.227283 L 486.13725,53.566475 L 486.71922,53.760468 L 235.30476,53.760468 C 225.24184,53.760468 217.26344,61.738811 217.26344,71.801785 L 217.26344,398.87339 C 217.26344,408.93643 225.24178,416.91471 235.30476,416.91471 L 562.37636,416.91471 C 572.43940,416.91471 580.41768,408.93637 580.41768,398.87339 L 580.41768,71.801785 C 580.41768,66.612962 578.25806,62.108236 574.79189,58.804276 L 552.48969,32.227283 z "
+ style="fill:#000000;fill-opacity:0.20000000;fill-rule:evenodd;stroke:none;stroke-width:1.6789950;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+ id="rect6079" />
+ <rect
+ width="363.28418"
+ height="363.28418"
+ rx="2.9260466"
+ ry="2.9260466"
+ x="192.47523"
+ y="30.531385"
+ style="fill:#ffffff;fill-rule:evenodd;stroke:#ffffff;stroke-width:7.7597060;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+ id="rect913" />
+ <rect
+ width="288.49512"
+ height="288.49512"
+ rx="2.3236635"
+ ry="2.3236635"
+ x="227.78207"
+ y="70.013809"
+ style="fill:#ff7f00;fill-rule:evenodd;stroke-width:0.79413080pt"
+ id="rect914" />
+ <path
+ d="M 348.20848,28.541423 L 291.17463,66.563983 L 305.14211,68.115925 L 55.667554,157.15854 C 46.188236,160.53570 41.232826,170.76437 44.609974,180.24367 L 138.89040,445.04365 L 132.29465,444.84966 L 128.02682,485.39411 L 163.52746,498.58561 L 163.91546,498.58561 C 168.05181,500.44490 172.88654,501.00342 177.49494,499.36159 L 485.55528,389.56176 C 495.03452,386.18460 499.79600,375.76200 496.41886,366.28264 L 386.81301,58.416291 C 385.25785,54.051177 382.02384,50.975478 378.27734,48.910652 L 348.20848,28.541423 z "
+ style="fill:#000000;fill-opacity:0.20000000;fill-rule:evenodd;stroke:none;stroke-width:1.2500002;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+ id="rect6078" />
+ <rect
+ width="363.28326"
+ height="363.28326"
+ rx="2.9260383"
+ ry="2.9260383"
+ x="-41.716114"
+ y="142.20343"
+ transform="matrix(0.942003,-0.335604,0.335604,0.942003,0.000000,0.000000)"
+ style="fill:#ffffff;fill-rule:evenodd;stroke:#ffffff;stroke-width:7.7596951;stroke-miterlimit:4.0000000;stroke-opacity:1.0000000"
+ id="rect915" />
+ <rect
+ width="288.49469"
+ height="288.49469"
+ rx="2.3236592"
+ ry="2.3236592"
+ x="-6.4090877"
+ y="181.68738"
+ transform="matrix(0.942003,-0.335604,0.335604,0.942003,0.000000,0.000000)"
+ style="fill:#bf0000;fill-rule:evenodd;stroke-width:0.79413080pt"
+ id="rect916" />
+</svg>
diff --git a/src/boost/tools/quickbook/test/identifier-1_5.gold b/src/boost/tools/quickbook/test/identifier-1_5.gold
new file mode 100644
index 000000000..0e3557b0a
--- /dev/null
+++ b/src/boost/tools/quickbook/test/identifier-1_5.gold
@@ -0,0 +1,610 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="identifiers_in_quickbook_1_5" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Identifiers in quickbook 1.5</title>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h0">
+ <phrase id="identifiers_in_quickbook_1_5.test_heading_with__code__phrase_role__identifier__code__phrase___code_"/><link
+ linkend="identifiers_in_quickbook_1_5.test_heading_with__code__phrase_role__identifier__code__phrase___code_">Test
+ heading with <code><phrase role="identifier">code</phrase></code></link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h1">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10_0"/><link linkend="identifiers_in_quickbook_1_5.identifier_10_0">Identifier
+ 10</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h2">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10_1"/><link linkend="identifiers_in_quickbook_1_5.identifier_10_1">Identifier
+ 10</link>
+ </bridgehead>
+ <table frame="all" id="identifiers_in_quickbook_1_5.identifier_10_2">
+ <title>Identifier 10</title>
+ <tgroup cols="1">
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h3">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_duplicate_it_by_having_several_headers"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_duplicate_it_by_having_several_headers">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h4">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d0"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d0">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h5">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_duplicate_it_by_having_lots_of_headers"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_duplicate_it_by_having_lots_of_headers">Generate
+ a really long id and duplicate it by having lots of headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h6">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d1"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d1">Generate
+ a really long id and duplicate it by having lots of headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h7">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d2"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d2">Generate
+ a really long id and duplicate it by having lots of headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h8">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d3"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d3">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h9">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d5"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d5">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h10">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d6"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d6">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h11">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d7"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d7">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h12">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_duplicate_it_by_having_too_many_headers"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_duplicate_it_by_having_too_many_headers">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h13">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d8"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d8">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h14">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d9"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d9">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h15">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_0"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_0">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h16">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_1"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_1">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h17">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_2"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_2">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h18">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_3"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_3">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h19">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_4"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_4">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h20">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_5"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_5">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h21">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_6"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_6">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h22">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_7"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_7">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h23">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_8"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_8">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h24">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_9"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_9">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h25">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_10"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_10">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h26">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_11"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_11">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h27">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_12"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_12">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h28">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_13"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_13">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h29">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_14"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_14">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h30">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_16"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_16">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h31">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_17"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_17">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h32">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_18"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_18">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h33">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_19"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_19">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h34">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_20"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_20">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h35">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_21"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_21">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h36">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_22"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_22">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h37">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_23"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_23">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h38">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_24"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_24">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h39">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_25"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_25">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h40">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_26"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_26">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h41">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_duplicate_it_by_having_even_more_headers"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_duplicate_it_by_having_even_more_headers">Generate
+ a really long id and duplicate it by having even more headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h42">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_27"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_27">Generate
+ a really long id and duplicate it by having even more headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h43">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_28"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_28">Generate
+ a really long id and duplicate it by having even more headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h44">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_29"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_29">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h45">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d4"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d4">Generate
+ a really long id and d4</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h46">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_15"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_15">Generate
+ a really long id and 15</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h47">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_30"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_30">Generate
+ a really long id and d4</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h48">
+ <phrase id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_31"/><link
+ linkend="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_31">Generate
+ a really long id and 15</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h49">
+ <phrase id="identifiers_in_quickbook_1_5.a2345678901234567890123456789012"/><link
+ linkend="identifiers_in_quickbook_1_5.a2345678901234567890123456789012">a2345678901234567890123456789012</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h50">
+ <phrase id="identifiers_in_quickbook_1_5.a0"/><link linkend="identifiers_in_quickbook_1_5.a0">a2345678901234567890123456789012</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h51">
+ <phrase id="identifiers_in_quickbook_1_5.abcdefghijklmnopqrstuvwxyzabcdef"/><link
+ linkend="identifiers_in_quickbook_1_5.abcdefghijklmnopqrstuvwxyzabcdef">abcdefghijklmnopqrstuvwxyzabcdef</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h52">
+ <phrase id="identifiers_in_quickbook_1_5.abcdefghijklmnopqrstuvwxyzabcde0"/><link
+ linkend="identifiers_in_quickbook_1_5.abcdefghijklmnopqrstuvwxyzabcde0">abcdefghijklmnopqrstuvwxyzabcdef</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h53">
+ <phrase id="identifiers_in_quickbook_1_5.abcdefghijklmnopqrstuvwxyzabcde1"/><link
+ linkend="identifiers_in_quickbook_1_5.abcdefghijklmnopqrstuvwxyzabcde1">abcdefghijklmnopqrstuvwxyzabcdef</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h54">
+ <phrase id="identifiers_in_quickbook_1_5.abcdefghijklmnopqrstuvwxyzabcde2"/><link
+ linkend="identifiers_in_quickbook_1_5.abcdefghijklmnopqrstuvwxyzabcde2">abcdefghijklmnopqrstuvwxyzabcdef</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h55">
+ <phrase id="identifiers_in_quickbook_1_5.markup_in__code__phrase_role__identifier__heading__phrase___code___in__emphasis_role__bold__order__emphasis__to_test_normalization"/><link
+ linkend="identifiers_in_quickbook_1_5.markup_in__code__phrase_role__identifier__heading__phrase___code___in__emphasis_role__bold__order__emphasis__to_test_normalization">Markup
+ in <code><phrase role="identifier">heading</phrase></code> in <emphasis role="bold">order</emphasis>
+ to test normalization</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h56">
+ <phrase id="identifiers_in_quickbook_1_5.markup_in_code_phrase_role_iden0"/><link
+ linkend="identifiers_in_quickbook_1_5.markup_in_code_phrase_role_iden0">Markup
+ in <code><phrase role="identifier">heading</phrase></code> in <emphasis role="bold">order</emphasis>
+ to test normalization</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_5.h57">
+ <phrase id="identifiers_in_quickbook_1_5.markup_in_code_phrase_role_iden1"/><link
+ linkend="identifiers_in_quickbook_1_5.markup_in_code_phrase_role_iden1">Markup
+ in <code><phrase role="identifier">heading</phrase></code> in <emphasis role="bold">order</emphasis>
+ to test normalization</link>
+ </bridgehead>
+ <section id="identifiers_in_quickbook_1_5.identifier_10">
+ <title><link linkend="identifiers_in_quickbook_1_5.identifier_10">Identifier
+ 10</link></title>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h0">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_duplicate_it_by_having_several_headers"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_duplicate_it_by_having_several_headers">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h1">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d0"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d0">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h2">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_duplicate_it_by_having_lots_of_headers"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_duplicate_it_by_having_lots_of_headers">Generate
+ a really long id and duplicate it by having lots of headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h4">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d1"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d1">Generate
+ a really long id and duplicate it by having lots of headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h5">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d2"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d2">Generate
+ a really long id and duplicate it by having lots of headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h6">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d3"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d3">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h7">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d5"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d5">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h8">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d6"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d6">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h9">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d7"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d7">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h10">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_duplicate_it_by_having_too_many_headers"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_duplicate_it_by_having_too_many_headers">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h11">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d8"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d8">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h12">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d9"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d9">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h13">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_0"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_0">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h14">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_1"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_1">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h15">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_2"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_2">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h16">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_3"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_3">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h17">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_4"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_4">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h18">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_5"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_5">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h19">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_6"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_6">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h20">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_7"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_7">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h21">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_8"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_8">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h22">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_9"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_9">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h23">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_10"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_10">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h24">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_11"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_11">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h25">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_12"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_12">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h26">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_13"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_13">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h27">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_14"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_14">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h28">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_16"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_16">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h29">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_17"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_17">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h30">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_18"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_18">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h31">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_19"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_19">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h32">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_20"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_20">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h33">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_21"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_21">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h34">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_22"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_22">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h35">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_23"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_23">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h36">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_24"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_24">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h37">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_25"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_25">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h38">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_26"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_26">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h39">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_duplicate_it_by_having_even_more_headers"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_duplicate_it_by_having_even_more_headers">Generate
+ a really long id and duplicate it by having even more headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h40">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_27"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_27">Generate
+ a really long id and duplicate it by having even more headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h41">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_28"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_28">Generate
+ a really long id and duplicate it by having even more headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h42">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_29"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_29">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h43">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d4"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d4">Generate
+ a really long id and d4</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h44">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_15"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_15">Generate
+ a really long id and 15</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h45">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_30"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_30">Generate
+ a really long id and d4</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h46">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_31"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_31">Generate
+ a really long id and 15</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h47">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.a2345678901234567890123456789012"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.a2345678901234567890123456789012">a2345678901234567890123456789012</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h48">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.a0"/><link linkend="identifiers_in_quickbook_1_5.identifier_10.a0">a2345678901234567890123456789012</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h49">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.abcdefghijklmnopqrstuvwxyzabcdef"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.abcdefghijklmnopqrstuvwxyzabcdef">abcdefghijklmnopqrstuvwxyzabcdef</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h50">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.abcdefghijklmnopqrstuvwxyzabcde0"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.abcdefghijklmnopqrstuvwxyzabcde0">abcdefghijklmnopqrstuvwxyzabcdef</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h51">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.abcdefghijklmnopqrstuvwxyzabcde1"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.abcdefghijklmnopqrstuvwxyzabcde1">abcdefghijklmnopqrstuvwxyzabcdef</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h52">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.abcdefghijklmnopqrstuvwxyzabcde2"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.abcdefghijklmnopqrstuvwxyzabcde2">abcdefghijklmnopqrstuvwxyzabcdef</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h53">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.markup_in__code__phrase_role__identifier__heading__phrase___code___in__emphasis_role__bold__order__emphasis__to_test_normalization"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.markup_in__code__phrase_role__identifier__heading__phrase___code___in__emphasis_role__bold__order__emphasis__to_test_normalization">Markup
+ in <code><phrase role="identifier">heading</phrase></code> in <emphasis role="bold">order</emphasis>
+ to test normalization</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h54">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.markup_in_code_phrase_role_iden0"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.markup_in_code_phrase_role_iden0">Markup
+ in <code><phrase role="identifier">heading</phrase></code> in <emphasis role="bold">order</emphasis>
+ to test normalization</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.identifier_10.h55">
+ <phrase id="identifiers_in_quickbook_1_5.identifier_10.markup_in_code_phrase_role_iden1"/><link
+ linkend="identifiers_in_quickbook_1_5.identifier_10.markup_in_code_phrase_role_iden1">Markup
+ in <code><phrase role="identifier">heading</phrase></code> in <emphasis role="bold">order</emphasis>
+ to test normalization</link>
+ </bridgehead>
+ <table frame="all" id="identifiers_in_quickbook_1_5.identifier_10.h3">
+ <title>h3</title>
+ <tgroup cols="1">
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="identifiers_in_quickbook_1_5.identifier_10.h3_0">
+ <title>h3</title>
+ <tgroup cols="1">
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="identifiers_in_quickbook_1_5.punctuation___stuff">
+ <title><link linkend="identifiers_in_quickbook_1_5.punctuation___stuff">Punctuation
+ &amp; stuff</link></title>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.punctuation___stuff.h0">
+ <phrase id="identifiers_in_quickbook_1_5.punctuation___stuff.a___b"/><link
+ linkend="identifiers_in_quickbook_1_5.punctuation___stuff.a___b">A + B</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_5.punctuation___stuff.h1">
+ <phrase id="identifiers_in_quickbook_1_5.punctuation___stuff.a_b0"/><link linkend="identifiers_in_quickbook_1_5.punctuation___stuff.a_b0">A
+ + B</link>
+ </bridgehead>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/identifier-1_5.gold-html b/src/boost/tools/quickbook/test/identifier-1_5.gold-html
new file mode 100644
index 000000000..4628a436f
--- /dev/null
+++ b/src/boost/tools/quickbook/test/identifier-1_5.gold-html
@@ -0,0 +1,421 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Identifiers in quickbook 1.5
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#identifiers_in_quickbook_1_5.identifier_10">Identifier 10</a>
+ </li>
+ <li>
+ <a href="#identifiers_in_quickbook_1_5.punctuation___stuff">Punctuation
+ &amp; stuff</a>
+ </li>
+ </ul>
+ </div>
+ <h2 id="identifiers_in_quickbook_1_5.test_heading_with__code__phrase_role__identifier__code__phrase___code_">
+ Test heading with <code><span class="identifier">code</span></code>
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.identifier_10_0">
+ Identifier 10
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.identifier_10_1">
+ Identifier 10
+ </h2>
+ <div id="identifiers_in_quickbook_1_5.identifier_10_2" class="table">
+ <table>
+ <caption>Identifier 10</caption>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_duplicate_it_by_having_several_headers">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d0">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_duplicate_it_by_having_lots_of_headers">
+ Generate a really long id and duplicate it by having lots of headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d1">
+ Generate a really long id and duplicate it by having lots of headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d2">
+ Generate a really long id and duplicate it by having lots of headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d3">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d5">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d6">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d7">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_duplicate_it_by_having_too_many_headers">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d8">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d9">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_0">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_1">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_2">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_3">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_4">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_5">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_6">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_7">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_8">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_9">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_10">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_11">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_12">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_13">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_14">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_16">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_17">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_18">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_19">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_20">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_21">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_22">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_23">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_24">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_25">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_26">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_duplicate_it_by_having_even_more_headers">
+ Generate a really long id and duplicate it by having even more headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_27">
+ Generate a really long id and duplicate it by having even more headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_28">
+ Generate a really long id and duplicate it by having even more headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_29">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_d4">
+ Generate a really long id and d4
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_15">
+ Generate a really long id and 15
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_30">
+ Generate a really long id and d4
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.generate_a_really_long_id_and_31">
+ Generate a really long id and 15
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.a2345678901234567890123456789012">
+ a2345678901234567890123456789012
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.a0">
+ a2345678901234567890123456789012
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.abcdefghijklmnopqrstuvwxyzabcdef">
+ abcdefghijklmnopqrstuvwxyzabcdef
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.abcdefghijklmnopqrstuvwxyzabcde0">
+ abcdefghijklmnopqrstuvwxyzabcdef
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.abcdefghijklmnopqrstuvwxyzabcde1">
+ abcdefghijklmnopqrstuvwxyzabcdef
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.abcdefghijklmnopqrstuvwxyzabcde2">
+ abcdefghijklmnopqrstuvwxyzabcdef
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.markup_in__code__phrase_role__identifier__heading__phrase___code___in__emphasis_role__bold__order__emphasis__to_test_normalization">
+ Markup in <code><span class="identifier">heading</span></code> in <span class="bold"><strong>order</strong></span>
+ to test normalization
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.markup_in_code_phrase_role_iden0">
+ Markup in <code><span class="identifier">heading</span></code> in <span class="bold"><strong>order</strong></span>
+ to test normalization
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_5.markup_in_code_phrase_role_iden1">
+ Markup in <code><span class="identifier">heading</span></code> in <span class="bold"><strong>order</strong></span>
+ to test normalization
+ </h2>
+ <div id="identifiers_in_quickbook_1_5.identifier_10">
+ <h3>
+ Identifier 10
+ </h3>
+ <div id="identifiers_in_quickbook_1_5.identifier_10">
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_duplicate_it_by_having_several_headers">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d0">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_duplicate_it_by_having_lots_of_headers">
+ Generate a really long id and duplicate it by having lots of headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d1">
+ Generate a really long id and duplicate it by having lots of headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d2">
+ Generate a really long id and duplicate it by having lots of headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d3">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d5">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d6">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d7">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_duplicate_it_by_having_too_many_headers">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d8">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d9">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_0">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_1">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_2">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_3">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_4">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_5">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_6">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_7">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_8">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_9">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_10">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_11">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_12">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_13">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_14">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_16">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_17">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_18">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_19">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_20">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_21">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_22">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_23">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_24">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_25">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_26">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_duplicate_it_by_having_even_more_headers">
+ Generate a really long id and duplicate it by having even more headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_27">
+ Generate a really long id and duplicate it by having even more headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_28">
+ Generate a really long id and duplicate it by having even more headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_29">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_d4">
+ Generate a really long id and d4
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_15">
+ Generate a really long id and 15
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_30">
+ Generate a really long id and d4
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.generate_a_really_long_id_and_31">
+ Generate a really long id and 15
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.a2345678901234567890123456789012">
+ a2345678901234567890123456789012
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.a0">
+ a2345678901234567890123456789012
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.abcdefghijklmnopqrstuvwxyzabcdef">
+ abcdefghijklmnopqrstuvwxyzabcdef
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.abcdefghijklmnopqrstuvwxyzabcde0">
+ abcdefghijklmnopqrstuvwxyzabcdef
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.abcdefghijklmnopqrstuvwxyzabcde1">
+ abcdefghijklmnopqrstuvwxyzabcdef
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.abcdefghijklmnopqrstuvwxyzabcde2">
+ abcdefghijklmnopqrstuvwxyzabcdef
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.markup_in__code__phrase_role__identifier__heading__phrase___code___in__emphasis_role__bold__order__emphasis__to_test_normalization">
+ Markup in <code><span class="identifier">heading</span></code> in <span
+ class="bold"><strong>order</strong></span> to test normalization
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.markup_in_code_phrase_role_iden0">
+ Markup in <code><span class="identifier">heading</span></code> in <span
+ class="bold"><strong>order</strong></span> to test normalization
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.identifier_10.markup_in_code_phrase_role_iden1">
+ Markup in <code><span class="identifier">heading</span></code> in <span
+ class="bold"><strong>order</strong></span> to test normalization
+ </h3>
+ <div id="identifiers_in_quickbook_1_5.identifier_10.h3" class="table">
+ <table>
+ <caption>h3</caption>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="identifiers_in_quickbook_1_5.identifier_10.h3_0" class="table">
+ <table>
+ <caption>h3</caption>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div id="identifiers_in_quickbook_1_5.punctuation___stuff">
+ <h3>
+ Punctuation &amp; stuff
+ </h3>
+ <div id="identifiers_in_quickbook_1_5.punctuation___stuff">
+ <h3 id="identifiers_in_quickbook_1_5.punctuation___stuff.a___b">
+ A + B
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_5.punctuation___stuff.a_b0">
+ A + B
+ </h3>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/identifier-1_5.quickbook b/src/boost/tools/quickbook/test/identifier-1_5.quickbook
new file mode 100644
index 000000000..882d5df23
--- /dev/null
+++ b/src/boost/tools/quickbook/test/identifier-1_5.quickbook
@@ -0,0 +1,148 @@
+[article Identifiers in quickbook 1.5
+ [quickbook 1.5]
+]
+
+[heading Test heading with `code`]
+
+[heading Identifier 10]
+[heading Identifier 10]
+[table Identifier 10
+[[]]
+]
+
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having lots of headers]
+[heading Generate a really long id and duplicate it by having lots of headers]
+[heading Generate a really long id and duplicate it by having lots of headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having even more headers]
+[heading Generate a really long id and duplicate it by having even more headers]
+[heading Generate a really long id and duplicate it by having even more headers]
+[heading Generate a really long id and duplicate it by having several headers]
+
+[heading Generate a really long id and d4]
+[heading Generate a really long id and 15]
+[heading Generate a really long id and d4]
+[heading Generate a really long id and 15]
+
+[heading a2345678901234567890123456789012]
+[heading a2345678901234567890123456789012]
+[heading abcdefghijklmnopqrstuvwxyzabcdef]
+[heading abcdefghijklmnopqrstuvwxyzabcdef]
+[heading abcdefghijklmnopqrstuvwxyzabcdef]
+[heading abcdefghijklmnopqrstuvwxyzabcdef]
+
+[heading Markup in `heading` in *order* to test normalization]
+[heading Markup in `heading` in *order* to test normalization]
+[heading Markup in `heading` in *order* to test normalization]
+
+[section Identifier 10]
+
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having lots of headers]
+[heading Generate a really long id and duplicate it by having lots of headers]
+[heading Generate a really long id and duplicate it by having lots of headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having even more headers]
+[heading Generate a really long id and duplicate it by having even more headers]
+[heading Generate a really long id and duplicate it by having even more headers]
+[heading Generate a really long id and duplicate it by having several headers]
+
+[heading Generate a really long id and d4]
+[heading Generate a really long id and 15]
+[heading Generate a really long id and d4]
+[heading Generate a really long id and 15]
+
+[heading a2345678901234567890123456789012]
+[heading a2345678901234567890123456789012]
+[heading abcdefghijklmnopqrstuvwxyzabcdef]
+[heading abcdefghijklmnopqrstuvwxyzabcdef]
+[heading abcdefghijklmnopqrstuvwxyzabcdef]
+[heading abcdefghijklmnopqrstuvwxyzabcdef]
+
+[heading Markup in `heading` in *order* to test normalization]
+[heading Markup in `heading` in *order* to test normalization]
+[heading Markup in `heading` in *order* to test normalization]
+
+[table h3
+[[]]
+]
+
+[table h3
+[[]]
+]
+
+[endsect]
+
+[section Punctuation & stuff]
+
+[heading A + B]
+[heading A + B]
+
+[endsect] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/identifier-1_6.gold b/src/boost/tools/quickbook/test/identifier-1_6.gold
new file mode 100644
index 000000000..387204122
--- /dev/null
+++ b/src/boost/tools/quickbook/test/identifier-1_6.gold
@@ -0,0 +1,609 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="identifiers_in_quickbook_1_6" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Identifiers in quickbook 1.6</title>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h0">
+ <phrase id="identifiers_in_quickbook_1_6.test_heading_with_code"/><link linkend="identifiers_in_quickbook_1_6.test_heading_with_code">Test
+ heading with <code><phrase role="identifier">code</phrase></code></link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h1">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10_0"/><link linkend="identifiers_in_quickbook_1_6.identifier_10_0">Identifier
+ 10</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h2">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10_1"/><link linkend="identifiers_in_quickbook_1_6.identifier_10_1">Identifier
+ 10</link>
+ </bridgehead>
+ <table frame="all" id="identifiers_in_quickbook_1_6.identifier_10_2">
+ <title>Identifier 10</title>
+ <tgroup cols="1">
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h3">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_du"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_du">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h4">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d0"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d0">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h5">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d1"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d1">Generate
+ a really long id and duplicate it by having lots of headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h6">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d2"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d2">Generate
+ a really long id and duplicate it by having lots of headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h7">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d3"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d3">Generate
+ a really long id and duplicate it by having lots of headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h8">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d5"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d5">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h9">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d6"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d6">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h10">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d7"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d7">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h11">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d8"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d8">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h12">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d9"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d9">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h13">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_0"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_0">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h14">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_1"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_1">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h15">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_2"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_2">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h16">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_3"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_3">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h17">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_4"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_4">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h18">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_5"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_5">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h19">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_6"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_6">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h20">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_7"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_7">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h21">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_8"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_8">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h22">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_9"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_9">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h23">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_10"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_10">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h24">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_11"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_11">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h25">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_12"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_12">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h26">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_13"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_13">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h27">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_14"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_14">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h28">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_16"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_16">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h29">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_17"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_17">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h30">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_18"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_18">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h31">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_19"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_19">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h32">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_20"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_20">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h33">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_21"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_21">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h34">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_22"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_22">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h35">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_23"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_23">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h36">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_24"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_24">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h37">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_25"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_25">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h38">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_26"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_26">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h39">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_27"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_27">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h40">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_28"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_28">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h41">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_29"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_29">Generate
+ a really long id and duplicate it by having even more headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h42">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_30"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_30">Generate
+ a really long id and duplicate it by having even more headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h43">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_31"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_31">Generate
+ a really long id and duplicate it by having even more headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h44">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_32"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_32">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h45">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d4"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d4">Generate
+ a really long id and d4</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h46">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_15"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_15">Generate
+ a really long id and 15</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h47">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_33"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_33">Generate
+ a really long id and d4</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h48">
+ <phrase id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_34"/><link
+ linkend="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_34">Generate
+ a really long id and 15</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h49">
+ <phrase id="identifiers_in_quickbook_1_6.a2345678901234567890123456789012"/><link
+ linkend="identifiers_in_quickbook_1_6.a2345678901234567890123456789012">a2345678901234567890123456789012</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h50">
+ <phrase id="identifiers_in_quickbook_1_6.a0"/><link linkend="identifiers_in_quickbook_1_6.a0">a2345678901234567890123456789012</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h51">
+ <phrase id="identifiers_in_quickbook_1_6.abcdefghijklmnopqrstuvwxyzabcdef"/><link
+ linkend="identifiers_in_quickbook_1_6.abcdefghijklmnopqrstuvwxyzabcdef">abcdefghijklmnopqrstuvwxyzabcdef</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h52">
+ <phrase id="identifiers_in_quickbook_1_6.abcdefghijklmnopqrstuvwxyzabcde0"/><link
+ linkend="identifiers_in_quickbook_1_6.abcdefghijklmnopqrstuvwxyzabcde0">abcdefghijklmnopqrstuvwxyzabcdef</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h53">
+ <phrase id="identifiers_in_quickbook_1_6.abcdefghijklmnopqrstuvwxyzabcde1"/><link
+ linkend="identifiers_in_quickbook_1_6.abcdefghijklmnopqrstuvwxyzabcde1">abcdefghijklmnopqrstuvwxyzabcdef</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h54">
+ <phrase id="identifiers_in_quickbook_1_6.abcdefghijklmnopqrstuvwxyzabcde2"/><link
+ linkend="identifiers_in_quickbook_1_6.abcdefghijklmnopqrstuvwxyzabcde2">abcdefghijklmnopqrstuvwxyzabcdef</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h55">
+ <phrase id="identifiers_in_quickbook_1_6.markup_in_heading_in_order_to_te"/><link
+ linkend="identifiers_in_quickbook_1_6.markup_in_heading_in_order_to_te">Markup
+ in <code><phrase role="identifier">heading</phrase></code> in <emphasis role="bold">order</emphasis>
+ to test normalization</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h56">
+ <phrase id="identifiers_in_quickbook_1_6.markup_in_heading_in_order_to_t0"/><link
+ linkend="identifiers_in_quickbook_1_6.markup_in_heading_in_order_to_t0">Markup
+ in <code><phrase role="identifier">heading</phrase></code> in <emphasis role="bold">order</emphasis>
+ to test normalization</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="identifiers_in_quickbook_1_6.h57">
+ <phrase id="identifiers_in_quickbook_1_6.markup_in_heading_in_order_to_t1"/><link
+ linkend="identifiers_in_quickbook_1_6.markup_in_heading_in_order_to_t1">Markup
+ in <code><phrase role="identifier">heading</phrase></code> in <emphasis role="bold">order</emphasis>
+ to test normalization</link>
+ </bridgehead>
+ <section id="identifiers_in_quickbook_1_6.identifier_10">
+ <title><link linkend="identifiers_in_quickbook_1_6.identifier_10">Identifier
+ 10</link></title>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h0">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_du"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_du">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h1">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d0"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d0">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h2">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d1"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d1">Generate
+ a really long id and duplicate it by having lots of headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h4">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d2"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d2">Generate
+ a really long id and duplicate it by having lots of headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h5">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d3"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d3">Generate
+ a really long id and duplicate it by having lots of headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h6">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d5"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d5">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h7">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d6"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d6">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h8">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d7"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d7">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h9">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d8"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d8">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h10">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d9"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d9">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h11">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_0"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_0">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h12">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_1"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_1">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h13">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_2"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_2">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h14">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_3"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_3">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h15">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_4"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_4">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h16">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_5"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_5">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h17">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_6"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_6">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h18">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_7"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_7">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h19">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_8"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_8">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h20">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_9"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_9">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h21">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_10"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_10">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h22">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_11"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_11">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h23">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_12"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_12">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h24">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_13"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_13">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h25">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_14"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_14">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h26">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_16"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_16">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h27">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_17"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_17">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h28">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_18"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_18">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h29">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_19"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_19">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h30">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_20"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_20">Generate
+ a really long id and duplicate it by having too many headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h31">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_21"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_21">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h32">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_22"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_22">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h33">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_23"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_23">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h34">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_24"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_24">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h35">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_25"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_25">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h36">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_26"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_26">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h37">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_27"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_27">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h38">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_28"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_28">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h39">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_29"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_29">Generate
+ a really long id and duplicate it by having even more headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h40">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_30"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_30">Generate
+ a really long id and duplicate it by having even more headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h41">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_31"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_31">Generate
+ a really long id and duplicate it by having even more headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h42">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_32"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_32">Generate
+ a really long id and duplicate it by having several headers</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h43">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d4"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d4">Generate
+ a really long id and d4</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h44">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_15"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_15">Generate
+ a really long id and 15</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h45">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_33"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_33">Generate
+ a really long id and d4</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h46">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_34"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_34">Generate
+ a really long id and 15</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h47">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.a2345678901234567890123456789012"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.a2345678901234567890123456789012">a2345678901234567890123456789012</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h48">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.a0"/><link linkend="identifiers_in_quickbook_1_6.identifier_10.a0">a2345678901234567890123456789012</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h49">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.abcdefghijklmnopqrstuvwxyzabcdef"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.abcdefghijklmnopqrstuvwxyzabcdef">abcdefghijklmnopqrstuvwxyzabcdef</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h50">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.abcdefghijklmnopqrstuvwxyzabcde0"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.abcdefghijklmnopqrstuvwxyzabcde0">abcdefghijklmnopqrstuvwxyzabcdef</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h51">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.abcdefghijklmnopqrstuvwxyzabcde1"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.abcdefghijklmnopqrstuvwxyzabcde1">abcdefghijklmnopqrstuvwxyzabcdef</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h52">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.abcdefghijklmnopqrstuvwxyzabcde2"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.abcdefghijklmnopqrstuvwxyzabcde2">abcdefghijklmnopqrstuvwxyzabcdef</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h53">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.markup_in_heading_in_order_to_te"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.markup_in_heading_in_order_to_te">Markup
+ in <code><phrase role="identifier">heading</phrase></code> in <emphasis role="bold">order</emphasis>
+ to test normalization</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h54">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.markup_in_heading_in_order_to_t0"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.markup_in_heading_in_order_to_t0">Markup
+ in <code><phrase role="identifier">heading</phrase></code> in <emphasis role="bold">order</emphasis>
+ to test normalization</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.identifier_10.h55">
+ <phrase id="identifiers_in_quickbook_1_6.identifier_10.markup_in_heading_in_order_to_t1"/><link
+ linkend="identifiers_in_quickbook_1_6.identifier_10.markup_in_heading_in_order_to_t1">Markup
+ in <code><phrase role="identifier">heading</phrase></code> in <emphasis role="bold">order</emphasis>
+ to test normalization</link>
+ </bridgehead>
+ <table frame="all" id="identifiers_in_quickbook_1_6.identifier_10.h3">
+ <title>h3</title>
+ <tgroup cols="1">
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="identifiers_in_quickbook_1_6.identifier_10.h3_0">
+ <title>h3</title>
+ <tgroup cols="1">
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="identifiers_in_quickbook_1_6.punctuation_stuff">
+ <title><link linkend="identifiers_in_quickbook_1_6.punctuation_stuff">Punctuation
+ &amp; stuff</link></title>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.punctuation_stuff.h0">
+ <phrase id="identifiers_in_quickbook_1_6.punctuation_stuff.a_b"/><link linkend="identifiers_in_quickbook_1_6.punctuation_stuff.a_b">A
+ + B</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="identifiers_in_quickbook_1_6.punctuation_stuff.h1">
+ <phrase id="identifiers_in_quickbook_1_6.punctuation_stuff.a_b0"/><link linkend="identifiers_in_quickbook_1_6.punctuation_stuff.a_b0">A
+ + B</link>
+ </bridgehead>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/identifier-1_6.gold-html b/src/boost/tools/quickbook/test/identifier-1_6.gold-html
new file mode 100644
index 000000000..d9f67439d
--- /dev/null
+++ b/src/boost/tools/quickbook/test/identifier-1_6.gold-html
@@ -0,0 +1,421 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Identifiers in quickbook 1.6
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#identifiers_in_quickbook_1_6.identifier_10">Identifier 10</a>
+ </li>
+ <li>
+ <a href="#identifiers_in_quickbook_1_6.punctuation_stuff">Punctuation &amp;
+ stuff</a>
+ </li>
+ </ul>
+ </div>
+ <h2 id="identifiers_in_quickbook_1_6.test_heading_with_code">
+ Test heading with <code><span class="identifier">code</span></code>
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.identifier_10_0">
+ Identifier 10
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.identifier_10_1">
+ Identifier 10
+ </h2>
+ <div id="identifiers_in_quickbook_1_6.identifier_10_2" class="table">
+ <table>
+ <caption>Identifier 10</caption>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_du">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d0">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d1">
+ Generate a really long id and duplicate it by having lots of headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d2">
+ Generate a really long id and duplicate it by having lots of headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d3">
+ Generate a really long id and duplicate it by having lots of headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d5">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d6">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d7">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d8">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d9">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_0">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_1">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_2">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_3">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_4">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_5">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_6">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_7">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_8">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_9">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_10">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_11">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_12">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_13">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_14">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_16">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_17">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_18">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_19">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_20">
+ Generate a really long id and duplicate it by having too many headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_21">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_22">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_23">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_24">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_25">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_26">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_27">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_28">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_29">
+ Generate a really long id and duplicate it by having even more headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_30">
+ Generate a really long id and duplicate it by having even more headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_31">
+ Generate a really long id and duplicate it by having even more headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_32">
+ Generate a really long id and duplicate it by having several headers
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_d4">
+ Generate a really long id and d4
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_15">
+ Generate a really long id and 15
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_33">
+ Generate a really long id and d4
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.generate_a_really_long_id_and_34">
+ Generate a really long id and 15
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.a2345678901234567890123456789012">
+ a2345678901234567890123456789012
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.a0">
+ a2345678901234567890123456789012
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.abcdefghijklmnopqrstuvwxyzabcdef">
+ abcdefghijklmnopqrstuvwxyzabcdef
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.abcdefghijklmnopqrstuvwxyzabcde0">
+ abcdefghijklmnopqrstuvwxyzabcdef
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.abcdefghijklmnopqrstuvwxyzabcde1">
+ abcdefghijklmnopqrstuvwxyzabcdef
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.abcdefghijklmnopqrstuvwxyzabcde2">
+ abcdefghijklmnopqrstuvwxyzabcdef
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.markup_in_heading_in_order_to_te">
+ Markup in <code><span class="identifier">heading</span></code> in <span class="bold"><strong>order</strong></span>
+ to test normalization
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.markup_in_heading_in_order_to_t0">
+ Markup in <code><span class="identifier">heading</span></code> in <span class="bold"><strong>order</strong></span>
+ to test normalization
+ </h2>
+ <h2 id="identifiers_in_quickbook_1_6.markup_in_heading_in_order_to_t1">
+ Markup in <code><span class="identifier">heading</span></code> in <span class="bold"><strong>order</strong></span>
+ to test normalization
+ </h2>
+ <div id="identifiers_in_quickbook_1_6.identifier_10">
+ <h3>
+ Identifier 10
+ </h3>
+ <div id="identifiers_in_quickbook_1_6.identifier_10">
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_du">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d0">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d1">
+ Generate a really long id and duplicate it by having lots of headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d2">
+ Generate a really long id and duplicate it by having lots of headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d3">
+ Generate a really long id and duplicate it by having lots of headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d5">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d6">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d7">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d8">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d9">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_0">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_1">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_2">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_3">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_4">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_5">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_6">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_7">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_8">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_9">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_10">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_11">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_12">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_13">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_14">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_16">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_17">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_18">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_19">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_20">
+ Generate a really long id and duplicate it by having too many headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_21">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_22">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_23">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_24">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_25">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_26">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_27">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_28">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_29">
+ Generate a really long id and duplicate it by having even more headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_30">
+ Generate a really long id and duplicate it by having even more headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_31">
+ Generate a really long id and duplicate it by having even more headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_32">
+ Generate a really long id and duplicate it by having several headers
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_d4">
+ Generate a really long id and d4
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_15">
+ Generate a really long id and 15
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_33">
+ Generate a really long id and d4
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.generate_a_really_long_id_and_34">
+ Generate a really long id and 15
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.a2345678901234567890123456789012">
+ a2345678901234567890123456789012
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.a0">
+ a2345678901234567890123456789012
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.abcdefghijklmnopqrstuvwxyzabcdef">
+ abcdefghijklmnopqrstuvwxyzabcdef
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.abcdefghijklmnopqrstuvwxyzabcde0">
+ abcdefghijklmnopqrstuvwxyzabcdef
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.abcdefghijklmnopqrstuvwxyzabcde1">
+ abcdefghijklmnopqrstuvwxyzabcdef
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.abcdefghijklmnopqrstuvwxyzabcde2">
+ abcdefghijklmnopqrstuvwxyzabcdef
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.markup_in_heading_in_order_to_te">
+ Markup in <code><span class="identifier">heading</span></code> in <span
+ class="bold"><strong>order</strong></span> to test normalization
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.markup_in_heading_in_order_to_t0">
+ Markup in <code><span class="identifier">heading</span></code> in <span
+ class="bold"><strong>order</strong></span> to test normalization
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.identifier_10.markup_in_heading_in_order_to_t1">
+ Markup in <code><span class="identifier">heading</span></code> in <span
+ class="bold"><strong>order</strong></span> to test normalization
+ </h3>
+ <div id="identifiers_in_quickbook_1_6.identifier_10.h3" class="table">
+ <table>
+ <caption>h3</caption>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="identifiers_in_quickbook_1_6.identifier_10.h3_0" class="table">
+ <table>
+ <caption>h3</caption>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div id="identifiers_in_quickbook_1_6.punctuation_stuff">
+ <h3>
+ Punctuation &amp; stuff
+ </h3>
+ <div id="identifiers_in_quickbook_1_6.punctuation_stuff">
+ <h3 id="identifiers_in_quickbook_1_6.punctuation_stuff.a_b">
+ A + B
+ </h3>
+ <h3 id="identifiers_in_quickbook_1_6.punctuation_stuff.a_b0">
+ A + B
+ </h3>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/identifier-1_6.quickbook b/src/boost/tools/quickbook/test/identifier-1_6.quickbook
new file mode 100644
index 000000000..1bbf0a1c4
--- /dev/null
+++ b/src/boost/tools/quickbook/test/identifier-1_6.quickbook
@@ -0,0 +1,148 @@
+[article Identifiers in quickbook 1.6
+ [quickbook 1.6]
+]
+
+[heading Test heading with `code`]
+
+[heading Identifier 10]
+[heading Identifier 10]
+[table Identifier 10
+[[]]
+]
+
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having lots of headers]
+[heading Generate a really long id and duplicate it by having lots of headers]
+[heading Generate a really long id and duplicate it by having lots of headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having even more headers]
+[heading Generate a really long id and duplicate it by having even more headers]
+[heading Generate a really long id and duplicate it by having even more headers]
+[heading Generate a really long id and duplicate it by having several headers]
+
+[heading Generate a really long id and d4]
+[heading Generate a really long id and 15]
+[heading Generate a really long id and d4]
+[heading Generate a really long id and 15]
+
+[heading a2345678901234567890123456789012]
+[heading a2345678901234567890123456789012]
+[heading abcdefghijklmnopqrstuvwxyzabcdef]
+[heading abcdefghijklmnopqrstuvwxyzabcdef]
+[heading abcdefghijklmnopqrstuvwxyzabcdef]
+[heading abcdefghijklmnopqrstuvwxyzabcdef]
+
+[heading Markup in `heading` in *order* to test normalization]
+[heading Markup in `heading` in *order* to test normalization]
+[heading Markup in `heading` in *order* to test normalization]
+
+[section Identifier 10]
+
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having lots of headers]
+[heading Generate a really long id and duplicate it by having lots of headers]
+[heading Generate a really long id and duplicate it by having lots of headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having too many headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having several headers]
+[heading Generate a really long id and duplicate it by having even more headers]
+[heading Generate a really long id and duplicate it by having even more headers]
+[heading Generate a really long id and duplicate it by having even more headers]
+[heading Generate a really long id and duplicate it by having several headers]
+
+[heading Generate a really long id and d4]
+[heading Generate a really long id and 15]
+[heading Generate a really long id and d4]
+[heading Generate a really long id and 15]
+
+[heading a2345678901234567890123456789012]
+[heading a2345678901234567890123456789012]
+[heading abcdefghijklmnopqrstuvwxyzabcdef]
+[heading abcdefghijklmnopqrstuvwxyzabcdef]
+[heading abcdefghijklmnopqrstuvwxyzabcdef]
+[heading abcdefghijklmnopqrstuvwxyzabcdef]
+
+[heading Markup in `heading` in *order* to test normalization]
+[heading Markup in `heading` in *order* to test normalization]
+[heading Markup in `heading` in *order* to test normalization]
+
+[table h3
+[[]]
+]
+
+[table h3
+[[]]
+]
+
+[endsect]
+
+[section Punctuation & stuff]
+
+[heading A + B]
+[heading A + B]
+
+[endsect] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/image-1_5.gold b/src/boost/tools/quickbook/test/image-1_5.gold
new file mode 100644
index 000000000..6364ded61
--- /dev/null
+++ b/src/boost/tools/quickbook/test/image-1_5.gold
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="images_1_5" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Images 1.5</title>
+ <para>
+ <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
+ <textobject>
+ <phrase>test</phrase>
+ </textobject>
+ </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test this.gif"></imagedata></imageobject>
+ <textobject>
+ <phrase>test this</phrase>
+ </textobject>
+ </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test&amp;this.gif"></imagedata></imageobject>
+ <textobject>
+ <phrase>test&amp;this</phrase>
+ </textobject>
+ </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"
+ height="10cm" width="10cm"></imagedata></imageobject>
+ <textobject>
+ <phrase>test</phrase>
+ </textobject>
+ </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
+ <textobject>
+ <phrase>Foo</phrase>
+ </textobject>
+ </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
+ <textobject>
+ <phrase>Foobie foobie foo</phrase>
+ </textobject>
+ </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
+ <textobject>
+ <phrase>Foo &amp; bar</phrase>
+ </textobject>
+ </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"
+ height="10cm" width="10cm"></imagedata></imageobject>
+ <textobject>
+ <phrase>Foo</phrase>
+ </textobject>
+ </inlinemediaobject>
+ </para>
+ <para>
+ <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
+ <textobject>
+ <phrase>test</phrase>
+ </textobject>
+ </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
+ <textobject>
+ <phrase>test</phrase>
+ </textobject>
+ </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
+ <textobject>
+ <phrase>comment</phrase>
+ </textobject>
+ </inlinemediaobject>
+ </para>
+ <para>
+ <inlinemediaobject><imageobject><imagedata fileref="test.gif" height="10cm" width="10cm"></imagedata></imageobject>
+ <textobject>
+ <phrase>test</phrase>
+ </textobject>
+ </inlinemediaobject>
+ </para>
+</article>
diff --git a/src/boost/tools/quickbook/test/image-1_5.gold-html b/src/boost/tools/quickbook/test/image-1_5.gold-html
new file mode 100644
index 000000000..23c8e6f16
--- /dev/null
+++ b/src/boost/tools/quickbook/test/image-1_5.gold-html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Images 1.5
+ </h3>
+ <p>
+ <span class="inlinemediaobject"><img src="test.gif" alt="[]"/></span> <span
+ class="inlinemediaobject"><img src="test this.gif" alt="[]"/></span> <span
+ class="inlinemediaobject"><img src="test&amp;this.gif" alt="[]"/></span> <span
+ class="inlinemediaobject"><img src="test.gif" alt="[]"/></span> <span class="inlinemediaobject"><img
+ src="test.gif" alt="[]"/></span> <span class="inlinemediaobject"><img src="test.gif"
+ alt="[]"/></span> <span class="inlinemediaobject"><img src="test.gif" alt="[]"/></span>
+ <span class="inlinemediaobject"><img src="test.gif" alt="[]"/></span>
+ </p>
+ <p>
+ <span class="inlinemediaobject"><img src="test.gif" alt="[]"/></span> <span
+ class="inlinemediaobject"><img src="test.gif" alt="[]"/></span> <span class="inlinemediaobject"><img
+ src="test.gif" alt="[]"/></span>
+ </p>
+ <p>
+ <span class="inlinemediaobject"><img src="test.gif" alt="[]"/></span>
+ </p>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/image-1_5.quickbook b/src/boost/tools/quickbook/test/image-1_5.quickbook
new file mode 100644
index 000000000..0774fd447
--- /dev/null
+++ b/src/boost/tools/quickbook/test/image-1_5.quickbook
@@ -0,0 +1,19 @@
+[article Images 1.5
+ [quickbook 1.5]
+]
+
+[$test.gif]
+[$test this.gif]
+[$test&this.gif]
+[$test.gif [width 10cm] [height 10cm]]
+[$test.gif [alt Foo]]
+[$test.gif [alt Foobie foobie foo]]
+[$test.gif [alt Foo & bar]]
+[$test.gif [alt Foo] [width 10cm] [height 10cm]]
+
+[$ [/comment] test.gif ]
+[$ [/comment] test.gif [/comment] ]
+[$ [/comment] test.gif [/comment] [alt comment] ]
+
+[/ This should warn about repeated attribute and then ignore it. ]
+[$test.gif [width 10cm] [height 10cm] [width 20cm]]
diff --git a/src/boost/tools/quickbook/test/image-1_6.gold b/src/boost/tools/quickbook/test/image-1_6.gold
new file mode 100644
index 000000000..d26269ac4
--- /dev/null
+++ b/src/boost/tools/quickbook/test/image-1_6.gold
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="images_1_6" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Images 1.6</title>
+ <para>
+ <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject></inlinemediaobject>
+ <inlinemediaobject><imageobject><imagedata fileref="test this.gif"></imagedata></imageobject></inlinemediaobject>
+ <inlinemediaobject><imageobject><imagedata fileref="test&amp;this.gif"></imagedata></imageobject></inlinemediaobject>
+ <inlinemediaobject><imageobject><imagedata fileref="test.gif" height="10cm" width="10cm"></imagedata></imageobject></inlinemediaobject>
+ <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
+ <textobject>
+ <phrase>Foo</phrase>
+ </textobject>
+ </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
+ <textobject>
+ <phrase>Foobie foobie foo</phrase>
+ </textobject>
+ </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
+ <textobject>
+ <phrase>Foo &amp; bar</phrase>
+ </textobject>
+ </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"
+ height="10cm" width="10cm"></imagedata></imageobject>
+ <textobject>
+ <phrase>Foo</phrase>
+ </textobject>
+ </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"
+ height="10cm" width="10cm"></imagedata></imageobject>
+ <textobject>
+ <phrase>Foo[]</phrase>
+ </textobject>
+ </inlinemediaobject>
+ </para>
+ <para>
+ <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject></inlinemediaobject>
+ <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject></inlinemediaobject>
+ <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
+ <textobject>
+ <phrase>comment</phrase>
+ </textobject>
+ </inlinemediaobject>
+ </para>
+ <para>
+ <inlinemediaobject><imageobject><imagedata fileref="test.gif" height="10cm" width="10cm"></imagedata></imageobject></inlinemediaobject>
+ </para>
+ <para>
+ <inlinemediaobject><imageobject><imagedata fileref="boost:/boost.png"></imagedata></imageobject></inlinemediaobject>
+ <inlinemediaobject><imageobject><imagedata fileref="boost:boost.png" height="10cm"
+ width="10cm"></imagedata></imageobject></inlinemediaobject>
+ </para>
+</article>
diff --git a/src/boost/tools/quickbook/test/image-1_6.gold-html b/src/boost/tools/quickbook/test/image-1_6.gold-html
new file mode 100644
index 000000000..2432d09b0
--- /dev/null
+++ b/src/boost/tools/quickbook/test/image-1_6.gold-html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Images 1.6
+ </h3>
+ <p>
+ <span class="inlinemediaobject"><img src="test.gif" alt="[]"/></span> <span
+ class="inlinemediaobject"><img src="test this.gif" alt="[]"/></span> <span
+ class="inlinemediaobject"><img src="test&amp;this.gif" alt="[]"/></span> <span
+ class="inlinemediaobject"><img src="test.gif" alt="[]"/></span> <span class="inlinemediaobject"><img
+ src="test.gif" alt="[]"/></span> <span class="inlinemediaobject"><img src="test.gif"
+ alt="[]"/></span> <span class="inlinemediaobject"><img src="test.gif" alt="[]"/></span>
+ <span class="inlinemediaobject"><img src="test.gif" alt="[]"/></span> <span
+ class="inlinemediaobject"><img src="test.gif" alt="[]"/></span>
+ </p>
+ <p>
+ <span class="inlinemediaobject"><img src="test.gif" alt="[]"/></span> <span
+ class="inlinemediaobject"><img src="test.gif" alt="[]"/></span> <span class="inlinemediaobject"><img
+ src="test.gif" alt="[]"/></span>
+ </p>
+ <p>
+ <span class="inlinemediaobject"><img src="test.gif" alt="[]"/></span>
+ </p>
+ <p>
+ <span class="inlinemediaobject"><img src="http://www.boost.org/doc/libs/release/boost.png"
+ alt="[]"/></span> <span class="inlinemediaobject"><img src="http://www.boost.org/doc/libs/release/boost.png"
+ alt="[]"/></span>
+ </p>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/image-1_6.quickbook b/src/boost/tools/quickbook/test/image-1_6.quickbook
new file mode 100644
index 000000000..438c34f5d
--- /dev/null
+++ b/src/boost/tools/quickbook/test/image-1_6.quickbook
@@ -0,0 +1,23 @@
+[article Images 1.6
+ [quickbook 1.6]
+]
+
+[$test.gif]
+[$test this.gif]
+[$test&this.gif]
+[$test.gif [width 10cm] [height 10cm]]
+[$test.gif [alt Foo]]
+[$test.gif [alt Foobie foobie foo]]
+[$test.gif [alt Foo & bar]]
+[$test.gif [alt Foo] [width 10cm] [height 10cm]]
+[$test.gif [alt Foo\[\]] [width 10cm] [height 10cm]]
+
+[$ [/comment] test.gif ]
+[$ [/comment] test.gif [/comment] ]
+[$ [/comment] test.gif [/comment] [alt comment] ]
+
+[/ This should warn about repeated attribute and then ignore it. ]
+[$test.gif [width 10cm] [height 10cm] [width 20cm]]
+
+[$boost:/boost.png]
+[$boost:boost.png [width 10cm] [height 10cm] [width 20cm]]
diff --git a/src/boost/tools/quickbook/test/import-1_1-fail.quickbook b/src/boost/tools/quickbook/test/import-1_1-fail.quickbook
new file mode 100644
index 000000000..ea60df84f
--- /dev/null
+++ b/src/boost/tools/quickbook/test/import-1_1-fail.quickbook
@@ -0,0 +1,8 @@
+[article Expect import Fail
+]
+
+[section Failure]
+
+[import this-is-not-a-file.cpp]
+
+[endsect]
diff --git a/src/boost/tools/quickbook/test/include-1_1-fail.quickbook b/src/boost/tools/quickbook/test/include-1_1-fail.quickbook
new file mode 100644
index 000000000..adb990e59
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include-1_1-fail.quickbook
@@ -0,0 +1,8 @@
+[article Expect xinclude Fail
+]
+
+[section Failure]
+
+[include this-is-not-a-file.qbk]
+
+[endsect]
diff --git a/src/boost/tools/quickbook/test/include-1_5.gold b/src/boost/tools/quickbook/test/include-1_5.gold
new file mode 100644
index 000000000..f8a347e2e
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include-1_5.gold
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="include-test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include Test</title>
+ <section id="include_test_sub_document.test">
+ <title><link linkend="include_test_sub_document.test">Test</link></title>
+ <para>
+ Just testing.
+ </para>
+ </section>
+ <section id="foo.test">
+ <title><link linkend="foo.test">Test</link></title>
+ <para>
+ Just testing.
+ </para>
+ </section>
+ <para>
+ Just trying including in a conditional macro.
+ </para>
+ <section id="foo2.test">
+ <title><link linkend="foo2.test">Test</link></title>
+ <para>
+ Just testing.
+ </para>
+ </section>
+ <para>
+ With some text around it.
+ </para>
+</article>
diff --git a/src/boost/tools/quickbook/test/include-1_5.gold-html b/src/boost/tools/quickbook/test/include-1_5.gold-html
new file mode 100644
index 000000000..5a92021b4
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include-1_5.gold-html
@@ -0,0 +1,61 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Include Test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#include_test_sub_document.test">Test</a>
+ </li>
+ <li>
+ <a href="#foo.test">Test</a>
+ </li>
+ <li>
+ <a href="#foo2.test">Test</a>
+ </li>
+ </ul>
+ </div>
+ <p>
+ Just trying including in a conditional macro.
+ </p>
+ <p>
+ With some text around it.
+ </p>
+ <div id="include_test_sub_document.test">
+ <h3>
+ Test
+ </h3>
+ <div id="include_test_sub_document.test">
+ <p>
+ Just testing.
+ </p>
+ </div>
+ </div>
+ <div id="foo.test">
+ <h3>
+ Test
+ </h3>
+ <div id="foo.test">
+ <p>
+ Just testing.
+ </p>
+ </div>
+ </div>
+ <div id="foo2.test">
+ <h3>
+ Test
+ </h3>
+ <div id="foo2.test">
+ <p>
+ Just testing.
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/include-1_5.quickbook b/src/boost/tools/quickbook/test/include-1_5.quickbook
new file mode 100644
index 000000000..972012192
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include-1_5.quickbook
@@ -0,0 +1,17 @@
+[article Include Test
+ [quickbook 1.5]
+ [id include-test]
+]
+
+[include include-inc-1_5.quickbook]
+[include .\include-inc.quickbook]
+[include:foo include-inc.quickbook]
+[include empty-inc.quickbook]
+
+[def __defined__]
+
+[? __undefined__ [include:foo1 include-inc.quickbook] ]
+[? __undefined__ [include:foo1 not_a_file.quickbook] ]
+[? __defined__
+ Just trying including in a conditional macro. [include:foo2 include-inc.quickbook]
+ With some text around it.]
diff --git a/src/boost/tools/quickbook/test/include-1_6.gold b/src/boost/tools/quickbook/test/include-1_6.gold
new file mode 100644
index 000000000..f5b5af358
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include-1_6.gold
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="include-test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include Test</title>
+ <section id="include-test.test">
+ <title><link linkend="include-test.test">Test</link></title>
+ <para>
+ Just testing.
+ </para>
+ </section>
+ <section id="foo.test">
+ <title><link linkend="foo.test">Test</link></title>
+ <para>
+ Just testing.
+ </para>
+ </section>
+ <para>
+ Just trying including in a conditional macro.
+ </para>
+ <section id="foo2.test">
+ <title><link linkend="foo2.test">Test</link></title>
+ <para>
+ Just testing.
+ </para>
+ </section>
+ <para>
+ With some text around it.
+ </para>
+</article>
diff --git a/src/boost/tools/quickbook/test/include-1_6.gold-html b/src/boost/tools/quickbook/test/include-1_6.gold-html
new file mode 100644
index 000000000..f7f45f34a
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include-1_6.gold-html
@@ -0,0 +1,61 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Include Test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#include-test.test">Test</a>
+ </li>
+ <li>
+ <a href="#foo.test">Test</a>
+ </li>
+ <li>
+ <a href="#foo2.test">Test</a>
+ </li>
+ </ul>
+ </div>
+ <p>
+ Just trying including in a conditional macro.
+ </p>
+ <p>
+ With some text around it.
+ </p>
+ <div id="include-test.test">
+ <h3>
+ Test
+ </h3>
+ <div id="include-test.test">
+ <p>
+ Just testing.
+ </p>
+ </div>
+ </div>
+ <div id="foo.test">
+ <h3>
+ Test
+ </h3>
+ <div id="foo.test">
+ <p>
+ Just testing.
+ </p>
+ </div>
+ </div>
+ <div id="foo2.test">
+ <h3>
+ Test
+ </h3>
+ <div id="foo2.test">
+ <p>
+ Just testing.
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/include-1_6.quickbook b/src/boost/tools/quickbook/test/include-1_6.quickbook
new file mode 100644
index 000000000..29a761192
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include-1_6.quickbook
@@ -0,0 +1,15 @@
+[article Include Test
+ [quickbook 1.6]
+ [id include-test]
+]
+
+[include include-inc.quickbook]
+[include:foo include-inc.quickbook]
+
+[def __defined__]
+
+[? __undefined__ [include:foo1 include-inc.quickbook] ]
+[? __undefined__ [include:foo1 not-a-file.quickbook] ]
+[? __defined__
+ Just trying including in a conditional macro. [include:foo2 include-inc.quickbook]
+ With some text around it.]
diff --git a/src/boost/tools/quickbook/test/include-1_7.gold b/src/boost/tools/quickbook/test/include-1_7.gold
new file mode 100644
index 000000000..206509bf2
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include-1_7.gold
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="include-test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include Test</title>
+ <section id="include-test.test">
+ <title><link linkend="include-test.test">Test</link></title>
+ <para>
+ Just testing.
+ </para>
+ </section>
+ <section id="foo.test">
+ <title><link linkend="foo.test">Test</link></title>
+ <para>
+ Just testing.
+ </para>
+ </section>
+ <section id="foo0.test">
+ <title><link linkend="foo0.test">Test</link></title>
+ <para>
+ Just testing.
+ </para>
+ </section>
+ <para>
+ Just trying including in a conditional macro.
+ </para>
+ <section id="foo2.test">
+ <title><link linkend="foo2.test">Test</link></title>
+ <para>
+ Just testing.
+ </para>
+ </section>
+ <para>
+ With some text around it.
+ </para>
+</article>
diff --git a/src/boost/tools/quickbook/test/include-1_7.gold-html b/src/boost/tools/quickbook/test/include-1_7.gold-html
new file mode 100644
index 000000000..b92d56298
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include-1_7.gold-html
@@ -0,0 +1,74 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Include Test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#include-test.test">Test</a>
+ </li>
+ <li>
+ <a href="#foo.test">Test</a>
+ </li>
+ <li>
+ <a href="#foo0.test">Test</a>
+ </li>
+ <li>
+ <a href="#foo2.test">Test</a>
+ </li>
+ </ul>
+ </div>
+ <p>
+ Just trying including in a conditional macro.
+ </p>
+ <p>
+ With some text around it.
+ </p>
+ <div id="include-test.test">
+ <h3>
+ Test
+ </h3>
+ <div id="include-test.test">
+ <p>
+ Just testing.
+ </p>
+ </div>
+ </div>
+ <div id="foo.test">
+ <h3>
+ Test
+ </h3>
+ <div id="foo.test">
+ <p>
+ Just testing.
+ </p>
+ </div>
+ </div>
+ <div id="foo0.test">
+ <h3>
+ Test
+ </h3>
+ <div id="foo0.test">
+ <p>
+ Just testing.
+ </p>
+ </div>
+ </div>
+ <div id="foo2.test">
+ <h3>
+ Test
+ </h3>
+ <div id="foo2.test">
+ <p>
+ Just testing.
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/include-1_7.quickbook b/src/boost/tools/quickbook/test/include-1_7.quickbook
new file mode 100644
index 000000000..481e4130a
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include-1_7.quickbook
@@ -0,0 +1,18 @@
+[article Include Test
+ [quickbook 1.7]
+ [id include-test]
+]
+
+[include include-inc.quickbook]
+[include:foo include-inc.quickbook]
+
+[template id2[] include-inc]
+[include:foo0 [id2].quickbook]
+
+[def __defined__]
+
+[? __undefined__ [include:foo1 include-inc.quickbook] ]
+[? __undefined__ [include:foo1 not-a-file.quickbook] ]
+[? __defined__
+ Just trying including in a conditional macro. [include:foo2 include-inc.quickbook]
+ With some text around it.]
diff --git a/src/boost/tools/quickbook/test/include-inc-1_5.quickbook b/src/boost/tools/quickbook/test/include-inc-1_5.quickbook
new file mode 100644
index 000000000..1dcbff9ff
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include-inc-1_5.quickbook
@@ -0,0 +1,6 @@
+[article Include Test Sub Document
+ [quickbook 1.5]
+ [id include-sub]
+]
+
+[/ Empty. Shouldn't really need this comment.]
diff --git a/src/boost/tools/quickbook/test/include-inc.quickbook b/src/boost/tools/quickbook/test/include-inc.quickbook
new file mode 100644
index 000000000..1fa61608b
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include-inc.quickbook
@@ -0,0 +1,9 @@
+[/ I'm trying not to break existing behaviour even when buggy.
+ In this case, this section will get an id using the title from
+ the previous 'include'.]
+
+[section:test Test]
+
+Just testing.
+
+[endsect] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/include/Jamfile.v2 b/src/boost/tools/quickbook/test/include/Jamfile.v2
new file mode 100644
index 000000000..a40bf5543
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/Jamfile.v2
@@ -0,0 +1,48 @@
+#
+# Copyright (c) 2011 Daniel James
+#
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+#
+
+project quickbook/test/includes
+ : requirements
+ <toolset>msvc:<debug-symbols>off
+ ;
+
+import quickbook-testing : quickbook-test quickbook-error-test ;
+
+test-suite quickbook.test :
+ [ quickbook-test import-basic-1.6 ]
+ [ quickbook-test filename ]
+ [ quickbook-test filename-1_7 ]
+ [ quickbook-test filename-path : : : <quickbook-test-include>sub ]
+ [ quickbook-test filename_path-1_7 : : : <quickbook-test-include>sub ]
+ [ quickbook-test doc-title1-1.5 ]
+ [ quickbook-test doc-title1a-1.5 ]
+ [ quickbook-test section ]
+ [ quickbook-test section-unclosed ]
+ [ quickbook-test templates-1.5 ]
+ [ quickbook-test templates-1.6 ]
+ [ quickbook-test macros-1.5 ]
+ [ quickbook-test macros-1.6 ]
+ [ quickbook-test code-import ]
+ [ quickbook-test code-include ]
+ [ quickbook-test include-id-1.5 ]
+ [ quickbook-test include-id-1.6 ]
+ [ quickbook-test include_id_unbalanced-1_6 ]
+ [ quickbook-error-test section-fail1 ]
+ [ quickbook-error-test section-fail2 ]
+ [ quickbook-test in_section-1_5 ]
+ [ quickbook-test in_section-1_6 ]
+ [ quickbook-test compatibility-1_1 ]
+ [ quickbook-test compatibility-1_5 ]
+ [ quickbook-test compatibility-1_6 ]
+ [ quickbook-test source_mode-1_5 ]
+ [ quickbook-test source_mode-1_6 ]
+ [ quickbook-test nested_compatibility-1_5 ]
+ [ quickbook-test nested_compatibility-1_6 ]
+ [ quickbook-test template_include-1_7 ]
+ [ quickbook-test glob-1_7 ]
+ ;
diff --git a/src/boost/tools/quickbook/test/include/code-import.gold b/src/boost/tools/quickbook/test/include/code-import.gold
new file mode 100644
index 000000000..12089ece2
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/code-import.gold
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="import" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Import</title>
+ <para>
+ This is the <emphasis role="bold"><emphasis>foo</emphasis></emphasis> function.
+ </para>
+ <para>
+ This description can have paragraphs...
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ lists
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ etc.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ And any quickbook block markup.
+ </para>
+ <para>
+<programlisting><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">string</phrase> <phrase role="identifier">foo</phrase><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="comment">// return 'em, foo man!</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="string">&quot;foo&quot;</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ <para>
+ This is the Python <emphasis role="bold"><emphasis>foo</emphasis></emphasis>
+ function.
+ </para>
+ <para>
+ This description can have paragraphs...
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ lists
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ etc.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ And any quickbook block markup.
+ </para>
+ <para>
+<programlisting><phrase role="keyword">def</phrase> <phrase role="identifier">foo</phrase><phrase role="special">():</phrase>
+ <phrase role="comment"># return 'em, foo man!</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="string">&quot;foo&quot;</phrase>
+</programlisting>
+ </para>
+ <para>
+ This is the C <emphasis role="bold"><emphasis>foo</emphasis></emphasis> function.
+ </para>
+ <para>
+ This description can have paragraphs...
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ lists
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ etc.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ And any quickbook block markup.
+ </para>
+ <para>
+<programlisting><phrase role="keyword">char</phrase><phrase role="special">*</phrase> <phrase role="identifier">foo</phrase><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="comment">// return 'em, foo man!</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="string">&quot;foo&quot;</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ <para>
+<programlisting><phrase role="keyword">class</phrase> <phrase role="identifier">x</phrase>
+<phrase role="special">{</phrase>
+<phrase role="keyword">public</phrase><phrase role="special">:</phrase>
+
+ <co id="import.c0" linkends="import.c1" /><phrase role="identifier">x</phrase><phrase role="special">()</phrase> <phrase role="special">:</phrase> <phrase role="identifier">n</phrase><phrase role="special">(</phrase><phrase role="number">0</phrase><phrase role="special">)</phrase>
+ <phrase role="special">{</phrase>
+ <phrase role="special">}</phrase>
+
+ <co id="import.c2" linkends="import.c3" /><phrase role="special">~</phrase><phrase role="identifier">x</phrase><phrase role="special">()</phrase>
+ <phrase role="special">{</phrase>
+ <phrase role="special">}</phrase>
+
+ <co id="import.c4" linkends="import.c5" /><phrase role="keyword">int</phrase> <phrase role="identifier">get</phrase><phrase role="special">()</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="special">{</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="identifier">n</phrase><phrase role="special">;</phrase>
+ <phrase role="special">}</phrase>
+
+ <co id="import.c6" linkends="import.c7" /><phrase role="keyword">void</phrase> <phrase role="identifier">set</phrase><phrase role="special">(</phrase><phrase role="keyword">int</phrase> <phrase role="identifier">n_</phrase><phrase role="special">)</phrase>
+ <phrase role="special">{</phrase>
+ <phrase role="identifier">n</phrase> <phrase role="special">=</phrase> <phrase role="identifier">n_</phrase><phrase role="special">;</phrase>
+ <phrase role="special">}</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ </para>
+ <calloutlist>
+ <callout arearefs="import.c0" id="import.c1">
+ <para>
+ Constructor
+ </para>
+ </callout>
+ <callout arearefs="import.c2" id="import.c3">
+ <para>
+ Destructor
+ </para>
+ </callout>
+ <callout arearefs="import.c4" id="import.c5">
+ <para>
+ Get the <code><phrase role="identifier">n</phrase></code> member variable
+ </para>
+ </callout>
+ <callout arearefs="import.c6" id="import.c7">
+ <para>
+ Set the <code><phrase role="identifier">n</phrase></code> member variable
+ </para>
+ </callout>
+ </calloutlist>
+</article>
diff --git a/src/boost/tools/quickbook/test/include/code-import.gold-html b/src/boost/tools/quickbook/test/include/code-import.gold-html
new file mode 100644
index 000000000..1fbe10557
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/code-import.gold-html
@@ -0,0 +1,148 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Import
+ </h3>
+ <p>
+ This is the <span class="bold"><strong><span class="emphasis"><em>foo</em></span></strong></span>
+ function.
+ </p>
+ <p>
+ This description can have paragraphs...
+ </p>
+ <ul>
+ <li>
+ <div>
+ lists
+ </div>
+ </li>
+ <li>
+ <div>
+ etc.
+ </div>
+ </li>
+ </ul>
+ <p>
+ And any quickbook block markup.
+ </p>
+ <p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">foo</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="comment">// return 'em, foo man!</span>
+ <span class="keyword">return</span> <span class="string">&quot;foo&quot;</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+ </p>
+ <p>
+ This is the Python <span class="bold"><strong><span class="emphasis"><em>foo</em></span></strong></span>
+ function.
+ </p>
+ <p>
+ This description can have paragraphs...
+ </p>
+ <ul>
+ <li>
+ <div>
+ lists
+ </div>
+ </li>
+ <li>
+ <div>
+ etc.
+ </div>
+ </li>
+ </ul>
+ <p>
+ And any quickbook block markup.
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">def</span> <span class="identifier">foo</span><span class="special">():</span>
+ <span class="comment"># return 'em, foo man!</span>
+ <span class="keyword">return</span> <span class="string">&quot;foo&quot;</span>
+</pre>
+ </p>
+ <p>
+ This is the C <span class="bold"><strong><span class="emphasis"><em>foo</em></span></strong></span>
+ function.
+ </p>
+ <p>
+ This description can have paragraphs...
+ </p>
+ <ul>
+ <li>
+ <div>
+ lists
+ </div>
+ </li>
+ <li>
+ <div>
+ etc.
+ </div>
+ </li>
+ </ul>
+ <p>
+ And any quickbook block markup.
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">char</span><span class="special">*</span> <span class="identifier">foo</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="comment">// return 'em, foo man!</span>
+ <span class="keyword">return</span> <span class="string">&quot;foo&quot;</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">class</span> <span class="identifier">x</span>
+<span class="special">{</span>
+<span class="keyword">public</span><span class="special">:</span>
+
+ <a href="#import.c1">(1)</a><span class="identifier">x</span><span class="special">()</span> <span class="special">:</span> <span class="identifier">n</span><span class="special">(</span><span class="number">0</span><span class="special">)</span>
+ <span class="special">{</span>
+ <span class="special">}</span>
+
+ <a href="#import.c3">(2)</a><span class="special">~</span><span class="identifier">x</span><span class="special">()</span>
+ <span class="special">{</span>
+ <span class="special">}</span>
+
+ <a href="#import.c5">(3)</a><span class="keyword">int</span> <span class="identifier">get</span><span class="special">()</span> <span class="keyword">const</span>
+ <span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">n</span><span class="special">;</span>
+ <span class="special">}</span>
+
+ <a href="#import.c7">(4)</a><span class="keyword">void</span> <span class="identifier">set</span><span class="special">(</span><span class="keyword">int</span> <span class="identifier">n_</span><span class="special">)</span>
+ <span class="special">{</span>
+ <span class="identifier">n</span> <span class="special">=</span> <span class="identifier">n_</span><span class="special">;</span>
+ <span class="special">}</span>
+<span class="special">};</span>
+</pre>
+ </p>
+ <div>
+ <div id="import.c1">
+ <a href="#import.c0">(1)</a>
+ <p>
+ Constructor
+ </p>
+ </div>
+ <div id="import.c3">
+ <a href="#import.c2">(2)</a>
+ <p>
+ Destructor
+ </p>
+ </div>
+ <div id="import.c5">
+ <a href="#import.c4">(3)</a>
+ <p>
+ Get the <code><span class="identifier">n</span></code> member variable
+ </p>
+ </div>
+ <div id="import.c7">
+ <a href="#import.c6">(4)</a>
+ <p>
+ Set the <code><span class="identifier">n</span></code> member variable
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/include/code-import.quickbook b/src/boost/tools/quickbook/test/include/code-import.quickbook
new file mode 100644
index 000000000..70faf0776
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/code-import.quickbook
@@ -0,0 +1,13 @@
+[article Import]
+
+[import ../stub.c]
+[import ../stub.py]
+[import ../stub.cpp]
+
+[foo]
+
+[foo_py]
+
+[foo_c]
+
+[class_] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/include/code-include.gold b/src/boost/tools/quickbook/test/include/code-include.gold
new file mode 100644
index 000000000..dfa697fd8
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/code-include.gold
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="include" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include</title>
+ <para>
+ This should appear when <literal>stub.c</literal> is included.
+ </para>
+ <para>
+ This is the C <emphasis role="bold"><emphasis>foo</emphasis></emphasis> function.
+ </para>
+ <para>
+ This description can have paragraphs...
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ lists
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ etc.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ And any quickbook block markup.
+ </para>
+<programlisting><phrase role="keyword">char</phrase><phrase role="special">*</phrase> <phrase role="identifier">foo</phrase><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="comment">// return 'em, foo man!</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="string">&quot;foo&quot;</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ <para>
+ This should appear when <literal>stub.py</literal> is included.
+ </para>
+ <para>
+ This should appear when <literal>stub.cpp</literal> is included.
+ </para>
+ <para>
+ [foo]
+ </para>
+ <para>
+ [foo_py]
+ </para>
+ <para>
+ [foo_c]
+ </para>
+</article>
diff --git a/src/boost/tools/quickbook/test/include/code-include.gold-html b/src/boost/tools/quickbook/test/include/code-include.gold-html
new file mode 100644
index 000000000..100e34a1b
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/code-include.gold-html
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Include
+ </h3>
+ <p>
+ This should appear when <tt>stub.c</tt> is included.
+ </p>
+ <p>
+ This is the C <span class="bold"><strong><span class="emphasis"><em>foo</em></span></strong></span>
+ function.
+ </p>
+ <p>
+ This description can have paragraphs...
+ </p>
+ <ul>
+ <li>
+ <div>
+ lists
+ </div>
+ </li>
+ <li>
+ <div>
+ etc.
+ </div>
+ </li>
+ </ul>
+ <p>
+ And any quickbook block markup.
+ </p>
+<pre class="programlisting"><span class="keyword">char</span><span class="special">*</span> <span class="identifier">foo</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="comment">// return 'em, foo man!</span>
+ <span class="keyword">return</span> <span class="string">&quot;foo&quot;</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+ <p>
+ This should appear when <tt>stub.py</tt> is included.
+ </p>
+ <p>
+ This should appear when <tt>stub.cpp</tt> is included.
+ </p>
+ <p>
+ [foo]
+ </p>
+ <p>
+ [foo_py]
+ </p>
+ <p>
+ [foo_c]
+ </p>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/include/code-include.quickbook b/src/boost/tools/quickbook/test/include/code-include.quickbook
new file mode 100644
index 000000000..8a47538f1
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/code-include.quickbook
@@ -0,0 +1,16 @@
+[article Include
+[quickbook 1.6]
+]
+
+[include ../stub.c]
+[include ../stub.py]
+[include ../stub.cpp]
+
+[/ These shouldn't expand ]
+
+[foo]
+
+[foo_py]
+
+[foo_c]
+
diff --git a/src/boost/tools/quickbook/test/include/compatibility-1_1.gold b/src/boost/tools/quickbook/test/include/compatibility-1_1.gold
new file mode 100644
index 000000000..961d6aa51
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/compatibility-1_1.gold
@@ -0,0 +1,362 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="compatibility" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Test Compatibility Mode</title>
+ <section id="compatibility.collision">
+ <title>Outer</title>
+ <section id="test_compatibility_mode.inner">
+ <title>Inner</title>
+ <bridgehead renderas="sect4" id="test_compatibility_mode.collision.inner.h0">
+ <phrase id="test_compatibility_mode.collision.inner.header"/><link linkend="test_compatibility_mode.collision.inner.header">Header</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="inner.heading1">
+ Heading1
+ </bridgehead>
+ <bridgehead renderas="sect4" id="test_compatibility_mode.collision.inner.h1">
+ <phrase id="test_compatibility_mode.collision.inner.x1"/><link linkend="test_compatibility_mode.collision.inner.x1">Header
+ with id</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="test_compatibility_mode.collision.inner.h2">
+ <phrase id="test_compatibility_mode.collision.inner.x2"/><link linkend="test_compatibility_mode.collision.inner.x2">Heading1
+ with id</link>
+ </bridgehead>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable frame="all" id="test_compatibility_mode.collision.inner.withid">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all" id="test_compatibility_mode.collision.inner.t0">
+ <title>With Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="test_compatibility_mode.collision.inner.x">
+ <title>Id and Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="test_compatibility_mode.x">
+ <title>Inner with id</title>
+ </section>
+ </section>
+ <section id="compatibility.collision0">
+ <title>Include compatibility 1.1</title>
+ <section id="test_compatibility_mode.inner0">
+ <title>Inner</title>
+ <bridgehead renderas="sect4" id="test_compatibility_mode.collision.inner.h3">
+ <phrase id="test_compatibility_mode.collision.inner.header0"/><link linkend="test_compatibility_mode.collision.inner.header0">Header</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="inner.heading1_0">
+ Heading1
+ </bridgehead>
+ <bridgehead renderas="sect4" id="test_compatibility_mode.collision.inner.h4">
+ <phrase id="test_compatibility_mode.collision.inner.x1_0"/><link linkend="test_compatibility_mode.collision.inner.x1_0">Header
+ with id</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="test_compatibility_mode.collision.inner.h5">
+ <phrase id="test_compatibility_mode.collision.inner.x2_0"/><link linkend="test_compatibility_mode.collision.inner.x2_0">Heading1
+ with id</link>
+ </bridgehead>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable frame="all" id="test_compatibility_mode.collision.inner.withid0">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all" id="test_compatibility_mode.collision.inner.t1">
+ <title>With Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="test_compatibility_mode.collision.inner.x0">
+ <title>Id and Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="test_compatibility_mode.x0">
+ <title>Inner with id</title>
+ </section>
+ </section>
+ <section id="compatibility.collision1">
+ <title>Include compatibility 1.5</title>
+ <section id="test_compatibility_mode.collision.inner">
+ <title><link linkend="test_compatibility_mode.collision.inner">Inner</link></title>
+ <bridgehead renderas="sect4" id="test_compatibility_mode.collision.inner.h6">
+ <phrase id="test_compatibility_mode.collision.inner.header1"/><link linkend="test_compatibility_mode.collision.inner.header1">Header</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="test_compatibility_mode.collision.inner.h7">
+ <phrase id="test_compatibility_mode.collision.inner.heading1"/><link linkend="test_compatibility_mode.collision.inner.heading1">Heading1</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="test_compatibility_mode.collision.inner.h8">
+ <phrase id="test_compatibility_mode.collision.inner.x1_1"/><link linkend="test_compatibility_mode.collision.inner.x1_1">Header
+ with id</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="test_compatibility_mode.collision.inner.h9">
+ <phrase id="test_compatibility_mode.collision.inner.x2_1"/><link linkend="test_compatibility_mode.collision.inner.x2_1">Heading1
+ with id</link>
+ </bridgehead>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable frame="all" id="test_compatibility_mode.collision.inner.withid1">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all" id="test_compatibility_mode.collision.inner.with_title">
+ <title>With Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="test_compatibility_mode.collision.inner.x3">
+ <title>Id and Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="test_compatibility_mode.collision.x">
+ <title><link linkend="test_compatibility_mode.collision.x">Inner with id</link></title>
+ </section>
+ </section>
+ <section id="compatibility.collision2">
+ <title>Include compatibility 1.6</title>
+ <section id="compatibility.collision.inner">
+ <title><link linkend="compatibility.collision.inner">Inner</link></title>
+ <bridgehead renderas="sect4" id="compatibility.collision.inner.h0">
+ <phrase id="compatibility.collision.inner.header"/><link linkend="compatibility.collision.inner.header">Header</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="compatibility.collision.inner.h1">
+ <phrase id="compatibility.collision.inner.heading1"/><link linkend="compatibility.collision.inner.heading1">Heading1</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="compatibility.collision.inner.h2">
+ <phrase id="compatibility.collision.inner.x1"/><link linkend="compatibility.collision.inner.x1">Header
+ with id</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="compatibility.collision.inner.h3">
+ <phrase id="compatibility.collision.inner.x2"/><link linkend="compatibility.collision.inner.x2">Heading1
+ with id</link>
+ </bridgehead>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable frame="all" id="compatibility.collision.inner.withid">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all" id="compatibility.collision.inner.with_title">
+ <title>With Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="compatibility.collision.inner.x">
+ <title>Id and Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="compatibility.collision.x">
+ <title><link linkend="compatibility.collision.x">Inner with id</link></title>
+ </section>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/include/compatibility-1_1.gold-html b/src/boost/tools/quickbook/test/include/compatibility-1_1.gold-html
new file mode 100644
index 000000000..6a811781a
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/compatibility-1_1.gold-html
@@ -0,0 +1,424 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Test Compatibility Mode
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#compatibility.collision">Outer</a>
+ </li>
+ <li>
+ <a href="#compatibility.collision0">Include compatibility 1.1</a>
+ </li>
+ <li>
+ <a href="#compatibility.collision1">Include compatibility 1.5</a>
+ </li>
+ <li>
+ <a href="#compatibility.collision2">Include compatibility 1.6</a>
+ </li>
+ </ul>
+ </div>
+ <div id="compatibility.collision">
+ <h3>
+ Outer
+ </h3>
+ <div id="compatibility.collision">
+ </div>
+ <div id="test_compatibility_mode.inner">
+ <h3>
+ Inner
+ </h3>
+ <div id="test_compatibility_mode.inner">
+ <h4 id="test_compatibility_mode.collision.inner.header">
+ Header
+ </h4>
+ <h1 id="inner.heading1">
+ Heading1
+ </h1>
+ <h4 id="test_compatibility_mode.collision.inner.x1">
+ Header with id
+ </h4>
+ <h1 id="test_compatibility_mode.collision.inner.x2">
+ Heading1 with id
+ </h1>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="test_compatibility_mode.collision.inner.withid" class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="test_compatibility_mode.collision.inner.t0" class="table">
+ <table>
+ <caption>With Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="test_compatibility_mode.collision.inner.x" class="table">
+ <table>
+ <caption>Id and Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div id="test_compatibility_mode.x">
+ <h3>
+ Inner with id
+ </h3>
+ <div id="test_compatibility_mode.x">
+ </div>
+ </div>
+ </div>
+ <div id="compatibility.collision0">
+ <h3>
+ Include compatibility 1.1
+ </h3>
+ <div id="compatibility.collision0">
+ </div>
+ <div id="test_compatibility_mode.inner0">
+ <h3>
+ Inner
+ </h3>
+ <div id="test_compatibility_mode.inner0">
+ <h4 id="test_compatibility_mode.collision.inner.header0">
+ Header
+ </h4>
+ <h1 id="inner.heading1_0">
+ Heading1
+ </h1>
+ <h4 id="test_compatibility_mode.collision.inner.x1_0">
+ Header with id
+ </h4>
+ <h1 id="test_compatibility_mode.collision.inner.x2_0">
+ Heading1 with id
+ </h1>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="test_compatibility_mode.collision.inner.withid0" class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="test_compatibility_mode.collision.inner.t1" class="table">
+ <table>
+ <caption>With Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="test_compatibility_mode.collision.inner.x0" class="table">
+ <table>
+ <caption>Id and Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div id="test_compatibility_mode.x0">
+ <h3>
+ Inner with id
+ </h3>
+ <div id="test_compatibility_mode.x0">
+ </div>
+ </div>
+ </div>
+ <div id="compatibility.collision1">
+ <h3>
+ Include compatibility 1.5
+ </h3>
+ <div id="compatibility.collision1">
+ </div>
+ <div id="test_compatibility_mode.collision.inner">
+ <h3>
+ Inner
+ </h3>
+ <div id="test_compatibility_mode.collision.inner">
+ <h4 id="test_compatibility_mode.collision.inner.header1">
+ Header
+ </h4>
+ <h1 id="test_compatibility_mode.collision.inner.heading1">
+ Heading1
+ </h1>
+ <h4 id="test_compatibility_mode.collision.inner.x1_1">
+ Header with id
+ </h4>
+ <h1 id="test_compatibility_mode.collision.inner.x2_1">
+ Heading1 with id
+ </h1>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="test_compatibility_mode.collision.inner.withid1" class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="test_compatibility_mode.collision.inner.with_title" class="table">
+ <table>
+ <caption>With Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="test_compatibility_mode.collision.inner.x3" class="table">
+ <table>
+ <caption>Id and Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div id="test_compatibility_mode.collision.x">
+ <h3>
+ Inner with id
+ </h3>
+ <div id="test_compatibility_mode.collision.x">
+ </div>
+ </div>
+ </div>
+ <div id="compatibility.collision2">
+ <h3>
+ Include compatibility 1.6
+ </h3>
+ <div id="compatibility.collision2">
+ </div>
+ <div id="compatibility.collision.inner">
+ <h3>
+ Inner
+ </h3>
+ <div id="compatibility.collision.inner">
+ <h4 id="compatibility.collision.inner.header">
+ Header
+ </h4>
+ <h1 id="compatibility.collision.inner.heading1">
+ Heading1
+ </h1>
+ <h4 id="compatibility.collision.inner.x1">
+ Header with id
+ </h4>
+ <h1 id="compatibility.collision.inner.x2">
+ Heading1 with id
+ </h1>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="compatibility.collision.inner.withid" class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="compatibility.collision.inner.with_title" class="table">
+ <table>
+ <caption>With Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="compatibility.collision.inner.x" class="table">
+ <table>
+ <caption>Id and Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div id="compatibility.collision.x">
+ <h3>
+ Inner with id
+ </h3>
+ <div id="compatibility.collision.x">
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/include/compatibility-1_1.quickbook b/src/boost/tools/quickbook/test/include/compatibility-1_1.quickbook
new file mode 100644
index 000000000..afdd39dc4
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/compatibility-1_1.quickbook
@@ -0,0 +1,18 @@
+[article Test Compatibility Mode
+[quickbook 1.6]
+[compatibility-mode 1.1]
+[id compatibility]
+]
+
+[section:collision Outer]
+[include compatibility-inc.quickbook]
+[endsect]
+[section:collision Include compatibility 1.1]
+[include compatibility-inc_1_1.quickbook]
+[endsect]
+[section:collision Include compatibility 1.5]
+[include compatibility-inc_1_5.quickbook]
+[endsect]
+[section:collision Include compatibility 1.6]
+[include compatibility-inc_1_6.quickbook]
+[endsect]
diff --git a/src/boost/tools/quickbook/test/include/compatibility-1_5.gold b/src/boost/tools/quickbook/test/include/compatibility-1_5.gold
new file mode 100644
index 000000000..79245caf1
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/compatibility-1_5.gold
@@ -0,0 +1,362 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="compatibility" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Test Compatibility Mode</title>
+ <section id="compatibility.collision">
+ <title><link linkend="compatibility.collision">Outer</link></title>
+ <section id="test_compatibility_mode.collision.inner">
+ <title><link linkend="test_compatibility_mode.collision.inner">Inner</link></title>
+ <bridgehead renderas="sect4" id="test_compatibility_mode.collision.inner.h0">
+ <phrase id="test_compatibility_mode.collision.inner.header"/><link linkend="test_compatibility_mode.collision.inner.header">Header</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="test_compatibility_mode.collision.inner.h1">
+ <phrase id="test_compatibility_mode.collision.inner.heading1"/><link linkend="test_compatibility_mode.collision.inner.heading1">Heading1</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="test_compatibility_mode.collision.inner.h2">
+ <phrase id="test_compatibility_mode.collision.inner.x1"/><link linkend="test_compatibility_mode.collision.inner.x1">Header
+ with id</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="test_compatibility_mode.collision.inner.h3">
+ <phrase id="test_compatibility_mode.collision.inner.x2"/><link linkend="test_compatibility_mode.collision.inner.x2">Heading1
+ with id</link>
+ </bridgehead>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable frame="all" id="test_compatibility_mode.collision.inner.withid">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all" id="test_compatibility_mode.collision.inner.with_title">
+ <title>With Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="test_compatibility_mode.collision.inner.x">
+ <title>Id and Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="test_compatibility_mode.collision.x">
+ <title><link linkend="test_compatibility_mode.collision.x">Inner with id</link></title>
+ </section>
+ </section>
+ <section id="compatibility.collision0">
+ <title><link linkend="compatibility.collision0">Include compatibility 1.1</link></title>
+ <section id="test_compatibility_mode.inner">
+ <title>Inner</title>
+ <bridgehead renderas="sect4" id="test_compatibility_mode.collision.inner.h4">
+ <phrase id="test_compatibility_mode.collision.inner.header0"/><link linkend="test_compatibility_mode.collision.inner.header0">Header</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="inner.heading1">
+ Heading1
+ </bridgehead>
+ <bridgehead renderas="sect4" id="test_compatibility_mode.collision.inner.h5">
+ <phrase id="test_compatibility_mode.collision.inner.x1_0"/><link linkend="test_compatibility_mode.collision.inner.x1_0">Header
+ with id</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="test_compatibility_mode.collision.inner.h6">
+ <phrase id="test_compatibility_mode.collision.inner.x2_0"/><link linkend="test_compatibility_mode.collision.inner.x2_0">Heading1
+ with id</link>
+ </bridgehead>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable frame="all" id="test_compatibility_mode.collision.inner.withid0">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all" id="test_compatibility_mode.collision.inner.t0">
+ <title>With Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="test_compatibility_mode.collision.inner.x0">
+ <title>Id and Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="test_compatibility_mode.x">
+ <title>Inner with id</title>
+ </section>
+ </section>
+ <section id="compatibility.collision1">
+ <title><link linkend="compatibility.collision1">Include compatibility 1.5</link></title>
+ <section id="test_compatibility_mode.collision.inner0">
+ <title><link linkend="test_compatibility_mode.collision.inner0">Inner</link></title>
+ <bridgehead renderas="sect4" id="test_compatibility_mode.collision.inner.h7">
+ <phrase id="test_compatibility_mode.collision.inner.header1"/><link linkend="test_compatibility_mode.collision.inner.header1">Header</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="test_compatibility_mode.collision.inner.h8">
+ <phrase id="test_compatibility_mode.collision.inner.heading1_0"/><link linkend="test_compatibility_mode.collision.inner.heading1_0">Heading1</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="test_compatibility_mode.collision.inner.h9">
+ <phrase id="test_compatibility_mode.collision.inner.x1_1"/><link linkend="test_compatibility_mode.collision.inner.x1_1">Header
+ with id</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="test_compatibility_mode.collision.inner.h10">
+ <phrase id="test_compatibility_mode.collision.inner.x2_1"/><link linkend="test_compatibility_mode.collision.inner.x2_1">Heading1
+ with id</link>
+ </bridgehead>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable frame="all" id="test_compatibility_mode.collision.inner.withid1">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all" id="test_compatibility_mode.collision.inner.with_title0">
+ <title>With Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="test_compatibility_mode.collision.inner.x3">
+ <title>Id and Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="test_compatibility_mode.collision.x0">
+ <title><link linkend="test_compatibility_mode.collision.x0">Inner with id</link></title>
+ </section>
+ </section>
+ <section id="compatibility.collision2">
+ <title><link linkend="compatibility.collision2">Include compatibility 1.6</link></title>
+ <section id="compatibility.collision.inner">
+ <title><link linkend="compatibility.collision.inner">Inner</link></title>
+ <bridgehead renderas="sect4" id="compatibility.collision.inner.h0">
+ <phrase id="compatibility.collision.inner.header"/><link linkend="compatibility.collision.inner.header">Header</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="compatibility.collision.inner.h1">
+ <phrase id="compatibility.collision.inner.heading1"/><link linkend="compatibility.collision.inner.heading1">Heading1</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="compatibility.collision.inner.h2">
+ <phrase id="compatibility.collision.inner.x1"/><link linkend="compatibility.collision.inner.x1">Header
+ with id</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="compatibility.collision.inner.h3">
+ <phrase id="compatibility.collision.inner.x2"/><link linkend="compatibility.collision.inner.x2">Heading1
+ with id</link>
+ </bridgehead>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable frame="all" id="compatibility.collision.inner.withid">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all" id="compatibility.collision.inner.with_title">
+ <title>With Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="compatibility.collision.inner.x">
+ <title>Id and Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="compatibility.collision.x">
+ <title><link linkend="compatibility.collision.x">Inner with id</link></title>
+ </section>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/include/compatibility-1_5.gold-html b/src/boost/tools/quickbook/test/include/compatibility-1_5.gold-html
new file mode 100644
index 000000000..945b00f0b
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/compatibility-1_5.gold-html
@@ -0,0 +1,424 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Test Compatibility Mode
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#compatibility.collision">Outer</a>
+ </li>
+ <li>
+ <a href="#compatibility.collision0">Include compatibility 1.1</a>
+ </li>
+ <li>
+ <a href="#compatibility.collision1">Include compatibility 1.5</a>
+ </li>
+ <li>
+ <a href="#compatibility.collision2">Include compatibility 1.6</a>
+ </li>
+ </ul>
+ </div>
+ <div id="compatibility.collision">
+ <h3>
+ Outer
+ </h3>
+ <div id="compatibility.collision">
+ </div>
+ <div id="test_compatibility_mode.collision.inner">
+ <h3>
+ Inner
+ </h3>
+ <div id="test_compatibility_mode.collision.inner">
+ <h4 id="test_compatibility_mode.collision.inner.header">
+ Header
+ </h4>
+ <h1 id="test_compatibility_mode.collision.inner.heading1">
+ Heading1
+ </h1>
+ <h4 id="test_compatibility_mode.collision.inner.x1">
+ Header with id
+ </h4>
+ <h1 id="test_compatibility_mode.collision.inner.x2">
+ Heading1 with id
+ </h1>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="test_compatibility_mode.collision.inner.withid" class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="test_compatibility_mode.collision.inner.with_title" class="table">
+ <table>
+ <caption>With Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="test_compatibility_mode.collision.inner.x" class="table">
+ <table>
+ <caption>Id and Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div id="test_compatibility_mode.collision.x">
+ <h3>
+ Inner with id
+ </h3>
+ <div id="test_compatibility_mode.collision.x">
+ </div>
+ </div>
+ </div>
+ <div id="compatibility.collision0">
+ <h3>
+ Include compatibility 1.1
+ </h3>
+ <div id="compatibility.collision0">
+ </div>
+ <div id="test_compatibility_mode.inner">
+ <h3>
+ Inner
+ </h3>
+ <div id="test_compatibility_mode.inner">
+ <h4 id="test_compatibility_mode.collision.inner.header0">
+ Header
+ </h4>
+ <h1 id="inner.heading1">
+ Heading1
+ </h1>
+ <h4 id="test_compatibility_mode.collision.inner.x1_0">
+ Header with id
+ </h4>
+ <h1 id="test_compatibility_mode.collision.inner.x2_0">
+ Heading1 with id
+ </h1>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="test_compatibility_mode.collision.inner.withid0" class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="test_compatibility_mode.collision.inner.t0" class="table">
+ <table>
+ <caption>With Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="test_compatibility_mode.collision.inner.x0" class="table">
+ <table>
+ <caption>Id and Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div id="test_compatibility_mode.x">
+ <h3>
+ Inner with id
+ </h3>
+ <div id="test_compatibility_mode.x">
+ </div>
+ </div>
+ </div>
+ <div id="compatibility.collision1">
+ <h3>
+ Include compatibility 1.5
+ </h3>
+ <div id="compatibility.collision1">
+ </div>
+ <div id="test_compatibility_mode.collision.inner0">
+ <h3>
+ Inner
+ </h3>
+ <div id="test_compatibility_mode.collision.inner0">
+ <h4 id="test_compatibility_mode.collision.inner.header1">
+ Header
+ </h4>
+ <h1 id="test_compatibility_mode.collision.inner.heading1_0">
+ Heading1
+ </h1>
+ <h4 id="test_compatibility_mode.collision.inner.x1_1">
+ Header with id
+ </h4>
+ <h1 id="test_compatibility_mode.collision.inner.x2_1">
+ Heading1 with id
+ </h1>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="test_compatibility_mode.collision.inner.withid1" class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="test_compatibility_mode.collision.inner.with_title0" class="table">
+ <table>
+ <caption>With Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="test_compatibility_mode.collision.inner.x3" class="table">
+ <table>
+ <caption>Id and Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div id="test_compatibility_mode.collision.x0">
+ <h3>
+ Inner with id
+ </h3>
+ <div id="test_compatibility_mode.collision.x0">
+ </div>
+ </div>
+ </div>
+ <div id="compatibility.collision2">
+ <h3>
+ Include compatibility 1.6
+ </h3>
+ <div id="compatibility.collision2">
+ </div>
+ <div id="compatibility.collision.inner">
+ <h3>
+ Inner
+ </h3>
+ <div id="compatibility.collision.inner">
+ <h4 id="compatibility.collision.inner.header">
+ Header
+ </h4>
+ <h1 id="compatibility.collision.inner.heading1">
+ Heading1
+ </h1>
+ <h4 id="compatibility.collision.inner.x1">
+ Header with id
+ </h4>
+ <h1 id="compatibility.collision.inner.x2">
+ Heading1 with id
+ </h1>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="compatibility.collision.inner.withid" class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="compatibility.collision.inner.with_title" class="table">
+ <table>
+ <caption>With Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="compatibility.collision.inner.x" class="table">
+ <table>
+ <caption>Id and Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div id="compatibility.collision.x">
+ <h3>
+ Inner with id
+ </h3>
+ <div id="compatibility.collision.x">
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/include/compatibility-1_5.quickbook b/src/boost/tools/quickbook/test/include/compatibility-1_5.quickbook
new file mode 100644
index 000000000..9593df720
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/compatibility-1_5.quickbook
@@ -0,0 +1,18 @@
+[article Test Compatibility Mode
+[compatibility-mode 1.5]
+[id compatibility]
+[quickbook 1.6]
+]
+
+[section:collision Outer]
+[include compatibility-inc.quickbook]
+[endsect]
+[section:collision Include compatibility 1.1]
+[include compatibility-inc_1_1.quickbook]
+[endsect]
+[section:collision Include compatibility 1.5]
+[include compatibility-inc_1_5.quickbook]
+[endsect]
+[section:collision Include compatibility 1.6]
+[include compatibility-inc_1_6.quickbook]
+[endsect]
diff --git a/src/boost/tools/quickbook/test/include/compatibility-1_6.gold b/src/boost/tools/quickbook/test/include/compatibility-1_6.gold
new file mode 100644
index 000000000..b3e51277f
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/compatibility-1_6.gold
@@ -0,0 +1,362 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="compatibility" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Test Compatibility Mode</title>
+ <section id="compatibility.collision">
+ <title><link linkend="compatibility.collision">Outer</link></title>
+ <section id="compatibility.collision.inner">
+ <title><link linkend="compatibility.collision.inner">Inner</link></title>
+ <bridgehead renderas="sect4" id="compatibility.collision.inner.h0">
+ <phrase id="compatibility.collision.inner.header"/><link linkend="compatibility.collision.inner.header">Header</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="compatibility.collision.inner.h1">
+ <phrase id="compatibility.collision.inner.heading1"/><link linkend="compatibility.collision.inner.heading1">Heading1</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="compatibility.collision.inner.h2">
+ <phrase id="compatibility.collision.inner.x1"/><link linkend="compatibility.collision.inner.x1">Header
+ with id</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="compatibility.collision.inner.h3">
+ <phrase id="compatibility.collision.inner.x2"/><link linkend="compatibility.collision.inner.x2">Heading1
+ with id</link>
+ </bridgehead>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable frame="all" id="compatibility.collision.inner.withid">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all" id="compatibility.collision.inner.with_title">
+ <title>With Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="compatibility.collision.inner.x">
+ <title>Id and Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="compatibility.collision.x">
+ <title><link linkend="compatibility.collision.x">Inner with id</link></title>
+ </section>
+ </section>
+ <section id="compatibility.collision0">
+ <title><link linkend="compatibility.collision0">Include compatibility 1.1</link></title>
+ <section id="compatibility.collision0.inner">
+ <title>Inner</title>
+ <bridgehead renderas="sect4" id="compatibility.collision0.inner.h0">
+ <phrase id="compatibility.collision0.inner.header"/><link linkend="compatibility.collision0.inner.header">Header</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="inner.heading1">
+ Heading1
+ </bridgehead>
+ <bridgehead renderas="sect4" id="compatibility.collision0.inner.h1">
+ <phrase id="compatibility.collision0.inner.x1"/><link linkend="compatibility.collision0.inner.x1">Header
+ with id</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="compatibility.collision0.inner.h2">
+ <phrase id="compatibility.collision0.inner.x2"/><link linkend="compatibility.collision0.inner.x2">Heading1
+ with id</link>
+ </bridgehead>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable frame="all" id="compatibility.collision0.inner.withid">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all" id="compatibility.collision0.inner.t0">
+ <title>With Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="compatibility.collision0.inner.x">
+ <title>Id and Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="compatibility.collision0.x">
+ <title>Inner with id</title>
+ </section>
+ </section>
+ <section id="compatibility.collision1">
+ <title><link linkend="compatibility.collision1">Include compatibility 1.5</link></title>
+ <section id="compatibility.collision1.inner">
+ <title><link linkend="compatibility.collision1.inner">Inner</link></title>
+ <bridgehead renderas="sect4" id="compatibility.collision1.inner.h0">
+ <phrase id="compatibility.collision1.inner.header"/><link linkend="compatibility.collision1.inner.header">Header</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="compatibility.collision1.inner.h1">
+ <phrase id="compatibility.collision1.inner.heading1"/><link linkend="compatibility.collision1.inner.heading1">Heading1</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="compatibility.collision1.inner.h2">
+ <phrase id="compatibility.collision1.inner.x1"/><link linkend="compatibility.collision1.inner.x1">Header
+ with id</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="compatibility.collision1.inner.h3">
+ <phrase id="compatibility.collision1.inner.x2"/><link linkend="compatibility.collision1.inner.x2">Heading1
+ with id</link>
+ </bridgehead>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable frame="all" id="compatibility.collision1.inner.withid">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all" id="compatibility.collision1.inner.with_title">
+ <title>With Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="compatibility.collision1.inner.x">
+ <title>Id and Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="compatibility.collision1.x">
+ <title><link linkend="compatibility.collision1.x">Inner with id</link></title>
+ </section>
+ </section>
+ <section id="compatibility.collision2">
+ <title><link linkend="compatibility.collision2">Include compatibility 1.6</link></title>
+ <section id="compatibility.collision2.inner">
+ <title><link linkend="compatibility.collision2.inner">Inner</link></title>
+ <bridgehead renderas="sect4" id="compatibility.collision2.inner.h0">
+ <phrase id="compatibility.collision2.inner.header"/><link linkend="compatibility.collision2.inner.header">Header</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="compatibility.collision2.inner.h1">
+ <phrase id="compatibility.collision2.inner.heading1"/><link linkend="compatibility.collision2.inner.heading1">Heading1</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="compatibility.collision2.inner.h2">
+ <phrase id="compatibility.collision2.inner.x1"/><link linkend="compatibility.collision2.inner.x1">Header
+ with id</link>
+ </bridgehead>
+ <bridgehead renderas="sect1" id="compatibility.collision2.inner.h3">
+ <phrase id="compatibility.collision2.inner.x2"/><link linkend="compatibility.collision2.inner.x2">Heading1
+ with id</link>
+ </bridgehead>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable frame="all" id="compatibility.collision2.inner.withid">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all" id="compatibility.collision2.inner.with_title">
+ <title>With Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="compatibility.collision2.inner.x">
+ <title>Id and Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="compatibility.collision2.x">
+ <title><link linkend="compatibility.collision2.x">Inner with id</link></title>
+ </section>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/include/compatibility-1_6.gold-html b/src/boost/tools/quickbook/test/include/compatibility-1_6.gold-html
new file mode 100644
index 000000000..eff72c000
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/compatibility-1_6.gold-html
@@ -0,0 +1,424 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Test Compatibility Mode
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#compatibility.collision">Outer</a>
+ </li>
+ <li>
+ <a href="#compatibility.collision0">Include compatibility 1.1</a>
+ </li>
+ <li>
+ <a href="#compatibility.collision1">Include compatibility 1.5</a>
+ </li>
+ <li>
+ <a href="#compatibility.collision2">Include compatibility 1.6</a>
+ </li>
+ </ul>
+ </div>
+ <div id="compatibility.collision">
+ <h3>
+ Outer
+ </h3>
+ <div id="compatibility.collision">
+ </div>
+ <div id="compatibility.collision.inner">
+ <h3>
+ Inner
+ </h3>
+ <div id="compatibility.collision.inner">
+ <h4 id="compatibility.collision.inner.header">
+ Header
+ </h4>
+ <h1 id="compatibility.collision.inner.heading1">
+ Heading1
+ </h1>
+ <h4 id="compatibility.collision.inner.x1">
+ Header with id
+ </h4>
+ <h1 id="compatibility.collision.inner.x2">
+ Heading1 with id
+ </h1>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="compatibility.collision.inner.withid" class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="compatibility.collision.inner.with_title" class="table">
+ <table>
+ <caption>With Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="compatibility.collision.inner.x" class="table">
+ <table>
+ <caption>Id and Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div id="compatibility.collision.x">
+ <h3>
+ Inner with id
+ </h3>
+ <div id="compatibility.collision.x">
+ </div>
+ </div>
+ </div>
+ <div id="compatibility.collision0">
+ <h3>
+ Include compatibility 1.1
+ </h3>
+ <div id="compatibility.collision0">
+ </div>
+ <div id="compatibility.collision0.inner">
+ <h3>
+ Inner
+ </h3>
+ <div id="compatibility.collision0.inner">
+ <h4 id="compatibility.collision0.inner.header">
+ Header
+ </h4>
+ <h1 id="inner.heading1">
+ Heading1
+ </h1>
+ <h4 id="compatibility.collision0.inner.x1">
+ Header with id
+ </h4>
+ <h1 id="compatibility.collision0.inner.x2">
+ Heading1 with id
+ </h1>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="compatibility.collision0.inner.withid" class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="compatibility.collision0.inner.t0" class="table">
+ <table>
+ <caption>With Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="compatibility.collision0.inner.x" class="table">
+ <table>
+ <caption>Id and Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div id="compatibility.collision0.x">
+ <h3>
+ Inner with id
+ </h3>
+ <div id="compatibility.collision0.x">
+ </div>
+ </div>
+ </div>
+ <div id="compatibility.collision1">
+ <h3>
+ Include compatibility 1.5
+ </h3>
+ <div id="compatibility.collision1">
+ </div>
+ <div id="compatibility.collision1.inner">
+ <h3>
+ Inner
+ </h3>
+ <div id="compatibility.collision1.inner">
+ <h4 id="compatibility.collision1.inner.header">
+ Header
+ </h4>
+ <h1 id="compatibility.collision1.inner.heading1">
+ Heading1
+ </h1>
+ <h4 id="compatibility.collision1.inner.x1">
+ Header with id
+ </h4>
+ <h1 id="compatibility.collision1.inner.x2">
+ Heading1 with id
+ </h1>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="compatibility.collision1.inner.withid" class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="compatibility.collision1.inner.with_title" class="table">
+ <table>
+ <caption>With Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="compatibility.collision1.inner.x" class="table">
+ <table>
+ <caption>Id and Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div id="compatibility.collision1.x">
+ <h3>
+ Inner with id
+ </h3>
+ <div id="compatibility.collision1.x">
+ </div>
+ </div>
+ </div>
+ <div id="compatibility.collision2">
+ <h3>
+ Include compatibility 1.6
+ </h3>
+ <div id="compatibility.collision2">
+ </div>
+ <div id="compatibility.collision2.inner">
+ <h3>
+ Inner
+ </h3>
+ <div id="compatibility.collision2.inner">
+ <h4 id="compatibility.collision2.inner.header">
+ Header
+ </h4>
+ <h1 id="compatibility.collision2.inner.heading1">
+ Heading1
+ </h1>
+ <h4 id="compatibility.collision2.inner.x1">
+ Header with id
+ </h4>
+ <h1 id="compatibility.collision2.inner.x2">
+ Heading1 with id
+ </h1>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="compatibility.collision2.inner.withid" class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="compatibility.collision2.inner.with_title" class="table">
+ <table>
+ <caption>With Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="compatibility.collision2.inner.x" class="table">
+ <table>
+ <caption>Id and Title</caption>
+ <thead>
+ <tr>
+ <th>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div id="compatibility.collision2.x">
+ <h3>
+ Inner with id
+ </h3>
+ <div id="compatibility.collision2.x">
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/include/compatibility-1_6.quickbook b/src/boost/tools/quickbook/test/include/compatibility-1_6.quickbook
new file mode 100644
index 000000000..46880a8c3
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/compatibility-1_6.quickbook
@@ -0,0 +1,17 @@
+[article Test Compatibility Mode
+[id compatibility]
+[quickbook 1.6]
+]
+
+[section:collision Outer]
+[include compatibility-inc.quickbook]
+[endsect]
+[section:collision Include compatibility 1.1]
+[include compatibility-inc_1_1.quickbook]
+[endsect]
+[section:collision Include compatibility 1.5]
+[include compatibility-inc_1_5.quickbook]
+[endsect]
+[section:collision Include compatibility 1.6]
+[include compatibility-inc_1_6.quickbook]
+[endsect]
diff --git a/src/boost/tools/quickbook/test/include/compatibility-inc.quickbook b/src/boost/tools/quickbook/test/include/compatibility-inc.quickbook
new file mode 100644
index 000000000..66fbb54ee
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/compatibility-inc.quickbook
@@ -0,0 +1,31 @@
+[section Inner]
+
+[heading Header]
+
+[h1 Heading1]
+
+[heading:x1 Header with id]
+
+[h1:x2 Heading1 with id]
+
+[table
+[[]][[]]
+]
+
+[table:withid
+[[]][[]]
+]
+
+[table With Title
+[[]][[]]
+]
+
+[table:x Id and Title
+[[]][[]]
+]
+
+
+[endsect]
+
+[section:x Inner with id]
+[endsect]
diff --git a/src/boost/tools/quickbook/test/include/compatibility-inc_1_1.quickbook b/src/boost/tools/quickbook/test/include/compatibility-inc_1_1.quickbook
new file mode 100644
index 000000000..89b4d6554
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/compatibility-inc_1_1.quickbook
@@ -0,0 +1,33 @@
+[compatibility-mode 1.1]
+
+[section Inner]
+
+[heading Header]
+
+[h1 Heading1]
+
+[heading:x1 Header with id]
+
+[h1:x2 Heading1 with id]
+
+[table
+[[]][[]]
+]
+
+[table:withid
+[[]][[]]
+]
+
+[table With Title
+[[]][[]]
+]
+
+[table:x Id and Title
+[[]][[]]
+]
+
+
+[endsect]
+
+[section:x Inner with id]
+[endsect]
diff --git a/src/boost/tools/quickbook/test/include/compatibility-inc_1_5.quickbook b/src/boost/tools/quickbook/test/include/compatibility-inc_1_5.quickbook
new file mode 100644
index 000000000..5551da5b3
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/compatibility-inc_1_5.quickbook
@@ -0,0 +1,33 @@
+[compatibility-mode 1.5]
+
+[section Inner]
+
+[heading Header]
+
+[h1 Heading1]
+
+[heading:x1 Header with id]
+
+[h1:x2 Heading1 with id]
+
+[table
+[[]][[]]
+]
+
+[table:withid
+[[]][[]]
+]
+
+[table With Title
+[[]][[]]
+]
+
+[table:x Id and Title
+[[]][[]]
+]
+
+
+[endsect]
+
+[section:x Inner with id]
+[endsect]
diff --git a/src/boost/tools/quickbook/test/include/compatibility-inc_1_6.quickbook b/src/boost/tools/quickbook/test/include/compatibility-inc_1_6.quickbook
new file mode 100644
index 000000000..61f3c7bcd
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/compatibility-inc_1_6.quickbook
@@ -0,0 +1,33 @@
+[compatibility-mode 1.6]
+
+[section Inner]
+
+[heading Header]
+
+[h1 Heading1]
+
+[heading:x1 Header with id]
+
+[h1:x2 Heading1 with id]
+
+[table
+[[]][[]]
+]
+
+[table:withid
+[[]][[]]
+]
+
+[table With Title
+[[]][[]]
+]
+
+[table:x Id and Title
+[[]][[]]
+]
+
+
+[endsect]
+
+[section:x Inner with id]
+[endsect]
diff --git a/src/boost/tools/quickbook/test/include/doc-title1-1.5.gold b/src/boost/tools/quickbook/test/include/doc-title1-1.5.gold
new file mode 100644
index 000000000..f2fb5321d
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/doc-title1-1.5.gold
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="doc_title_1" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Doc Title 1</title>
+ <bridgehead renderas="sect2" id="doc_title_1.h0">
+ <phrase id="doc_title_1.a1"/><link linkend="doc_title_1.a1">a1</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="doc_title_1.h1">
+ <phrase id="doc_title_1.inc1"/><link linkend="doc_title_1.inc1">inc1</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="doc_title_1.h2">
+ <phrase id="doc_title_1.a2"/><link linkend="doc_title_1.a2">a2</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="doc_title_1_inc2.h0">
+ <phrase id="doc_title_1_inc2.inc2"/><link linkend="doc_title_1_inc2.inc2">inc2</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="doc_title_1.h3">
+ <phrase id="doc_title_1.a3"/><link linkend="doc_title_1.a3">a3</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="doc_title_1_inc2.h1">
+ <phrase id="doc_title_1_inc2.inc3"/><link linkend="doc_title_1_inc2.inc3">inc3</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="doc_title_1.h4">
+ <phrase id="doc_title_1.a4"/><link linkend="doc_title_1.a4">a4</link>
+ </bridgehead>
+</article>
diff --git a/src/boost/tools/quickbook/test/include/doc-title1-1.5.gold-html b/src/boost/tools/quickbook/test/include/doc-title1-1.5.gold-html
new file mode 100644
index 000000000..69848ef9f
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/doc-title1-1.5.gold-html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Doc Title 1
+ </h3>
+ <h2 id="doc_title_1.a1">
+ a1
+ </h2>
+ <h2 id="doc_title_1.inc1">
+ inc1
+ </h2>
+ <h2 id="doc_title_1.a2">
+ a2
+ </h2>
+ <h2 id="doc_title_1_inc2.inc2">
+ inc2
+ </h2>
+ <h2 id="doc_title_1.a3">
+ a3
+ </h2>
+ <h2 id="doc_title_1_inc2.inc3">
+ inc3
+ </h2>
+ <h2 id="doc_title_1.a4">
+ a4
+ </h2>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/include/doc-title1-1.5.quickbook b/src/boost/tools/quickbook/test/include/doc-title1-1.5.quickbook
new file mode 100644
index 000000000..ec7a56c86
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/doc-title1-1.5.quickbook
@@ -0,0 +1,27 @@
+[article Doc Title 1
+[quickbook 1.5]
+]
+
+[/ Doc Titles for included files is a little odd. You generally don't see
+ titles in them, the only way to detect them is through the generated ids.
+ So that's what this test is for.
+
+ The second include has a title, because that isn't scoped by file it will
+ continue to be used to generated ids for the following included files -
+ but not in this document as the document id for the file is generated
+ for the whole file at the start.
+ ]
+
+[heading a1]
+
+[include doc-title1-inc1.quickbook]
+
+[heading a2]
+
+[include doc-title1-inc2.quickbook]
+
+[heading a3]
+
+[include doc-title1-inc3.quickbook]
+
+[heading a4]
diff --git a/src/boost/tools/quickbook/test/include/doc-title1-inc1.quickbook b/src/boost/tools/quickbook/test/include/doc-title1-inc1.quickbook
new file mode 100644
index 000000000..e17ad31d8
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/doc-title1-inc1.quickbook
@@ -0,0 +1 @@
+[heading inc1]
diff --git a/src/boost/tools/quickbook/test/include/doc-title1-inc2.quickbook b/src/boost/tools/quickbook/test/include/doc-title1-inc2.quickbook
new file mode 100644
index 000000000..e8b18d37b
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/doc-title1-inc2.quickbook
@@ -0,0 +1,4 @@
+[article Doc Title 1 Inc2
+]
+
+[heading inc2]
diff --git a/src/boost/tools/quickbook/test/include/doc-title1-inc3.quickbook b/src/boost/tools/quickbook/test/include/doc-title1-inc3.quickbook
new file mode 100644
index 000000000..501e3320b
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/doc-title1-inc3.quickbook
@@ -0,0 +1 @@
+[heading inc3]
diff --git a/src/boost/tools/quickbook/test/include/doc-title1a-1.5.gold b/src/boost/tools/quickbook/test/include/doc-title1a-1.5.gold
new file mode 100644
index 000000000..0ee226e9e
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/doc-title1a-1.5.gold
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="doc-title" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Doc Title 1a</title>
+ <bridgehead renderas="sect2" id="doc-title.h0">
+ <phrase id="doc-title.a1"/><link linkend="doc-title.a1">a1</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="doc_title_1a.h0">
+ <phrase id="doc_title_1a.inc1"/><link linkend="doc_title_1a.inc1">inc1</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="doc-title.h1">
+ <phrase id="doc-title.a2"/><link linkend="doc-title.a2">a2</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="doc_title_1_inc2.h0">
+ <phrase id="doc_title_1_inc2.inc2"/><link linkend="doc_title_1_inc2.inc2">inc2</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="doc-title.h2">
+ <phrase id="doc-title.a3"/><link linkend="doc-title.a3">a3</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="doc_title_1_inc2.h1">
+ <phrase id="doc_title_1_inc2.inc3"/><link linkend="doc_title_1_inc2.inc3">inc3</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="doc-title.h3">
+ <phrase id="doc-title.a4"/><link linkend="doc-title.a4">a4</link>
+ </bridgehead>
+</article>
diff --git a/src/boost/tools/quickbook/test/include/doc-title1a-1.5.gold-html b/src/boost/tools/quickbook/test/include/doc-title1a-1.5.gold-html
new file mode 100644
index 000000000..f29d8cdb7
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/doc-title1a-1.5.gold-html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Doc Title 1a
+ </h3>
+ <h2 id="doc-title.a1">
+ a1
+ </h2>
+ <h2 id="doc_title_1a.inc1">
+ inc1
+ </h2>
+ <h2 id="doc-title.a2">
+ a2
+ </h2>
+ <h2 id="doc_title_1_inc2.inc2">
+ inc2
+ </h2>
+ <h2 id="doc-title.a3">
+ a3
+ </h2>
+ <h2 id="doc_title_1_inc2.inc3">
+ inc3
+ </h2>
+ <h2 id="doc-title.a4">
+ a4
+ </h2>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/include/doc-title1a-1.5.quickbook b/src/boost/tools/quickbook/test/include/doc-title1a-1.5.quickbook
new file mode 100644
index 000000000..dc12d5cb7
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/doc-title1a-1.5.quickbook
@@ -0,0 +1,20 @@
+[article Doc Title 1a
+[quickbook 1.5]
+[id doc-title]
+]
+
+[/ A repeat of doc-title1, but with an explicit id. ]
+
+[heading a1]
+
+[include doc-title1-inc1.quickbook]
+
+[heading a2]
+
+[include doc-title1-inc2.quickbook]
+
+[heading a3]
+
+[include doc-title1-inc3.quickbook]
+
+[heading a4]
diff --git a/src/boost/tools/quickbook/test/include/filename-1_7.gold b/src/boost/tools/quickbook/test/include/filename-1_7.gold
new file mode 100644
index 000000000..935b42642
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/filename-1_7.gold
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="filename_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Filename Test</title>
+ <para>
+ filename-1_7.quickbook
+ </para>
+ <bridgehead renderas="sect2" id="filename_test.h0">
+ <phrase id="filename_test.test_1"/><link linkend="filename_test.test_1">Test
+ 1</link>
+ </bridgehead>
+ <para>
+ sub/filename_include1.quickbook
+ </para>
+ <para>
+ sub/../filename_include2.quickbook
+ </para>
+ <bridgehead renderas="sect2" id="filename_test.h1">
+ <phrase id="filename_test.test_2"/><link linkend="filename_test.test_2">Test
+ 2</link>
+ </bridgehead>
+ <para>
+ filename_include2.quickbook
+ </para>
+ <bridgehead renderas="sect2" id="filename_test.h2">
+ <phrase id="filename_test.test_3"/><link linkend="filename_test.test_3">Test
+ 3</link>
+ </bridgehead>
+ <para>
+ sub/filename_include1.quickbook
+ </para>
+ <para>
+ sub/../filename_include2.quickbook
+ </para>
+ <bridgehead renderas="sect2" id="filename_test.h3">
+ <phrase id="filename_test.test_4"/><link linkend="filename_test.test_4">Test
+ 4</link>
+ </bridgehead>
+ <para>
+ sub/filename_include1.quickbook
+ </para>
+ <para>
+ sub/../filename_include2.quickbook
+ </para>
+</article>
diff --git a/src/boost/tools/quickbook/test/include/filename-1_7.gold-html b/src/boost/tools/quickbook/test/include/filename-1_7.gold-html
new file mode 100644
index 000000000..50bd60546
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/filename-1_7.gold-html
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Filename Test
+ </h3>
+ <p>
+ filename-1_7.quickbook
+ </p>
+ <h2 id="filename_test.test_1">
+ Test 1
+ </h2>
+ <p>
+ sub/filename_include1.quickbook
+ </p>
+ <p>
+ sub/../filename_include2.quickbook
+ </p>
+ <h2 id="filename_test.test_2">
+ Test 2
+ </h2>
+ <p>
+ filename_include2.quickbook
+ </p>
+ <h2 id="filename_test.test_3">
+ Test 3
+ </h2>
+ <p>
+ sub/filename_include1.quickbook
+ </p>
+ <p>
+ sub/../filename_include2.quickbook
+ </p>
+ <h2 id="filename_test.test_4">
+ Test 4
+ </h2>
+ <p>
+ sub/filename_include1.quickbook
+ </p>
+ <p>
+ sub/../filename_include2.quickbook
+ </p>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/include/filename-1_7.quickbook b/src/boost/tools/quickbook/test/include/filename-1_7.quickbook
new file mode 100644
index 000000000..9d462af89
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/filename-1_7.quickbook
@@ -0,0 +1,21 @@
+[article Filename Test
+[quickbook 1.7]
+]
+
+__FILENAME__
+
+[heading Test 1]
+
+[include sub/*.quickbook]
+
+[heading Test 2]
+
+[include filename_include?.quickbook]
+
+[heading Test 3]
+
+[include su\[b\]/filename\\_include1.quickbook]
+
+[heading Test 4]
+
+[include su\\b/*.quickbook]
diff --git a/src/boost/tools/quickbook/test/include/filename-path.gold b/src/boost/tools/quickbook/test/include/filename-path.gold
new file mode 100644
index 000000000..f77ab84a8
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/filename-path.gold
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="filename_test_with_include_path" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Filename test with include path</title>
+ <para>
+ filename-path.quickbook
+ </para>
+ <para>
+ filename_include1.quickbook
+ </para>
+ <para>
+ ../filename_include2.quickbook
+ </para>
+ <para>
+ filename_include2.quickbook
+ </para>
+</article>
diff --git a/src/boost/tools/quickbook/test/include/filename-path.gold-html b/src/boost/tools/quickbook/test/include/filename-path.gold-html
new file mode 100644
index 000000000..d7a6e2e00
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/filename-path.gold-html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Filename test with include path
+ </h3>
+ <p>
+ filename-path.quickbook
+ </p>
+ <p>
+ filename_include1.quickbook
+ </p>
+ <p>
+ ../filename_include2.quickbook
+ </p>
+ <p>
+ filename_include2.quickbook
+ </p>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/include/filename-path.quickbook b/src/boost/tools/quickbook/test/include/filename-path.quickbook
new file mode 100644
index 000000000..6121df5c5
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/filename-path.quickbook
@@ -0,0 +1,9 @@
+[article Filename test with include path
+[quickbook 1.5]
+]
+
+__FILENAME__
+
+[include filename_include1.quickbook]
+
+[include filename_include2.quickbook] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/include/filename.gold b/src/boost/tools/quickbook/test/include/filename.gold
new file mode 100644
index 000000000..3e895eb4e
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/filename.gold
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="filename_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Filename Test</title>
+ <para>
+ filename.quickbook
+ </para>
+ <para>
+ sub/filename_include1.quickbook
+ </para>
+ <para>
+ sub/../filename_include2.quickbook
+ </para>
+ <para>
+ filename_include2.quickbook
+ </para>
+</article>
diff --git a/src/boost/tools/quickbook/test/include/filename.gold-html b/src/boost/tools/quickbook/test/include/filename.gold-html
new file mode 100644
index 000000000..e722f9307
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/filename.gold-html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Filename Test
+ </h3>
+ <p>
+ filename.quickbook
+ </p>
+ <p>
+ sub/filename_include1.quickbook
+ </p>
+ <p>
+ sub/../filename_include2.quickbook
+ </p>
+ <p>
+ filename_include2.quickbook
+ </p>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/include/filename.quickbook b/src/boost/tools/quickbook/test/include/filename.quickbook
new file mode 100644
index 000000000..37ff37b5c
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/filename.quickbook
@@ -0,0 +1,9 @@
+[article Filename Test
+[quickbook 1.5]
+]
+
+__FILENAME__
+
+[include sub/filename_include1.quickbook]
+
+[include filename_include2.quickbook]
diff --git a/src/boost/tools/quickbook/test/include/filename_include2.quickbook b/src/boost/tools/quickbook/test/include/filename_include2.quickbook
new file mode 100644
index 000000000..f9d479a93
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/filename_include2.quickbook
@@ -0,0 +1 @@
+__FILENAME__ \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/include/filename_path-1_7.gold b/src/boost/tools/quickbook/test/include/filename_path-1_7.gold
new file mode 100644
index 000000000..6f52dafc1
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/filename_path-1_7.gold
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="filename_test_with_include_path" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Filename test with include path</title>
+ <para>
+ filename_path-1_7.quickbook
+ </para>
+ <para>
+ filename_include1.quickbook
+ </para>
+ <para>
+ ../filename_include2.quickbook
+ </para>
+ <para>
+ filename_include2.quickbook
+ </para>
+</article>
diff --git a/src/boost/tools/quickbook/test/include/filename_path-1_7.gold-html b/src/boost/tools/quickbook/test/include/filename_path-1_7.gold-html
new file mode 100644
index 000000000..190f5d240
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/filename_path-1_7.gold-html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Filename test with include path
+ </h3>
+ <p>
+ filename_path-1_7.quickbook
+ </p>
+ <p>
+ filename_include1.quickbook
+ </p>
+ <p>
+ ../filename_include2.quickbook
+ </p>
+ <p>
+ filename_include2.quickbook
+ </p>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/include/filename_path-1_7.quickbook b/src/boost/tools/quickbook/test/include/filename_path-1_7.quickbook
new file mode 100644
index 000000000..741d76ad5
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/filename_path-1_7.quickbook
@@ -0,0 +1,7 @@
+[article Filename test with include path
+[quickbook 1.7]
+]
+
+__FILENAME__
+
+[include filename_include?.quickbook]
diff --git a/src/boost/tools/quickbook/test/include/glob-1_7.gold b/src/boost/tools/quickbook/test/include/glob-1_7.gold
new file mode 100644
index 000000000..ba31ae961
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/glob-1_7.gold
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="glob_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Glob Test</title>
+ <section id="glob_test.t1_0">
+ <title><link linkend="glob_test.t1_0">Test 1.0</link></title>
+ </section>
+ <section id="glob_test.t1_1">
+ <title><link linkend="glob_test.t1_1">Test 1.1</link></title>
+ <para>
+ A
+ </para>
+ </section>
+ <section id="glob_test.t1_2">
+ <title><link linkend="glob_test.t1_2">Test 1.2</link></title>
+ <para>
+ B
+ </para>
+ </section>
+ <section id="glob_test.t1_3">
+ <title><link linkend="glob_test.t1_3">Test 1.3</link></title>
+ <para>
+ B
+ </para>
+ </section>
+ <section id="glob_test.t2_1">
+ <title><link linkend="glob_test.t2_1">Test 2.1</link></title>
+ <para>
+ A
+ </para>
+ <para>
+ B
+ </para>
+ </section>
+ <section id="glob_test.t2_2">
+ <title><link linkend="glob_test.t2_2">Test 2.2</link></title>
+ <para>
+ B
+ </para>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/include/glob-1_7.gold-html b/src/boost/tools/quickbook/test/include/glob-1_7.gold-html
new file mode 100644
index 000000000..9b53c2be4
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/glob-1_7.gold-html
@@ -0,0 +1,94 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Glob Test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#glob_test.t1_0">Test 1.0</a>
+ </li>
+ <li>
+ <a href="#glob_test.t1_1">Test 1.1</a>
+ </li>
+ <li>
+ <a href="#glob_test.t1_2">Test 1.2</a>
+ </li>
+ <li>
+ <a href="#glob_test.t1_3">Test 1.3</a>
+ </li>
+ <li>
+ <a href="#glob_test.t2_1">Test 2.1</a>
+ </li>
+ <li>
+ <a href="#glob_test.t2_2">Test 2.2</a>
+ </li>
+ </ul>
+ </div>
+ <div id="glob_test.t1_0">
+ <h3>
+ Test 1.0
+ </h3>
+ <div id="glob_test.t1_0">
+ </div>
+ </div>
+ <div id="glob_test.t1_1">
+ <h3>
+ Test 1.1
+ </h3>
+ <div id="glob_test.t1_1">
+ <p>
+ A
+ </p>
+ </div>
+ </div>
+ <div id="glob_test.t1_2">
+ <h3>
+ Test 1.2
+ </h3>
+ <div id="glob_test.t1_2">
+ <p>
+ B
+ </p>
+ </div>
+ </div>
+ <div id="glob_test.t1_3">
+ <h3>
+ Test 1.3
+ </h3>
+ <div id="glob_test.t1_3">
+ <p>
+ B
+ </p>
+ </div>
+ </div>
+ <div id="glob_test.t2_1">
+ <h3>
+ Test 2.1
+ </h3>
+ <div id="glob_test.t2_1">
+ <p>
+ A
+ </p>
+ <p>
+ B
+ </p>
+ </div>
+ </div>
+ <div id="glob_test.t2_2">
+ <h3>
+ Test 2.2
+ </h3>
+ <div id="glob_test.t2_2">
+ <p>
+ B
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/include/glob-1_7.quickbook b/src/boost/tools/quickbook/test/include/glob-1_7.quickbook
new file mode 100644
index 000000000..826c12be8
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/glob-1_7.quickbook
@@ -0,0 +1,39 @@
+[article Glob Test
+[quickbook 1.7]
+]
+
+[section:t1_0 Test 1.0]
+
+[include glob0/*]
+
+[endsect] [/t1_0]
+
+[section:t1_1 Test 1.1]
+
+[include glob1/*]
+
+[endsect] [/t1_1]
+
+[section:t1_2 Test 1.2]
+
+[include glob1/*/*]
+
+[endsect] [/t1_2]
+
+[section:t1_3 Test 1.3]
+
+[include glob1/*/b.qbk]
+
+[endsect] [/t1_3]
+
+[section:t2_1 Test 2.1]
+
+[include glob2/*]
+
+[endsect] [/t2_1]
+
+[section:t2_2 Test 2.2]
+
+[include glob2/*/*]
+
+[endsect] [/t2_2]
diff --git a/src/boost/tools/quickbook/test/include/glob1/a.qbk b/src/boost/tools/quickbook/test/include/glob1/a.qbk
new file mode 100644
index 000000000..f70f10e4d
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/glob1/a.qbk
@@ -0,0 +1 @@
+A
diff --git a/src/boost/tools/quickbook/test/include/glob1/glob1-1/b.qbk b/src/boost/tools/quickbook/test/include/glob1/glob1-1/b.qbk
new file mode 100644
index 000000000..223b7836f
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/glob1/glob1-1/b.qbk
@@ -0,0 +1 @@
+B
diff --git a/src/boost/tools/quickbook/test/include/glob2/a.qbk b/src/boost/tools/quickbook/test/include/glob2/a.qbk
new file mode 100644
index 000000000..160580801
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/glob2/a.qbk
@@ -0,0 +1,3 @@
+A
+
+[include */*.qbk]
diff --git a/src/boost/tools/quickbook/test/include/glob2/glob2-1/b.qbk b/src/boost/tools/quickbook/test/include/glob2/glob2-1/b.qbk
new file mode 100644
index 000000000..223b7836f
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/glob2/glob2-1/b.qbk
@@ -0,0 +1 @@
+B
diff --git a/src/boost/tools/quickbook/test/include/import-basic-1.6.gold b/src/boost/tools/quickbook/test/include/import-basic-1.6.gold
new file mode 100644
index 000000000..706589aef
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/import-basic-1.6.gold
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="import-1.6" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Import Quickbook Test</title>
+ <para>
+ Macro 1: import-basic-inc1.quickbook Template 1: import-basic-1.6.quickbook
+ </para>
+ <para>
+ Macro 2: import-basic-inc2.quickbook Template 2: import-basic-1.6.quickbook
+ </para>
+</article>
diff --git a/src/boost/tools/quickbook/test/include/import-basic-1.6.gold-html b/src/boost/tools/quickbook/test/include/import-basic-1.6.gold-html
new file mode 100644
index 000000000..bbc87b7d7
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/import-basic-1.6.gold-html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Import Quickbook Test
+ </h3>
+ <p>
+ Macro 1: import-basic-inc1.quickbook Template 1: import-basic-1.6.quickbook
+ </p>
+ <p>
+ Macro 2: import-basic-inc2.quickbook Template 2: import-basic-1.6.quickbook
+ </p>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/include/import-basic-1.6.quickbook b/src/boost/tools/quickbook/test/include/import-basic-1.6.quickbook
new file mode 100644
index 000000000..934db6a9e
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/import-basic-1.6.quickbook
@@ -0,0 +1,12 @@
+[article Import Quickbook Test
+[quickbook 1.6]
+[id import-1.6]
+]
+
+[import import-basic-inc1.quickbook]
+
+macro1 [template1]
+
+[import import-basic-inc2.quickbook]
+
+macro2 [template2]
diff --git a/src/boost/tools/quickbook/test/include/import-basic-inc1.quickbook b/src/boost/tools/quickbook/test/include/import-basic-inc1.quickbook
new file mode 100644
index 000000000..469922845
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/import-basic-inc1.quickbook
@@ -0,0 +1,4 @@
+This shouldn't show: __FILENAME__
+
+[def macro1 Macro 1: __FILENAME__]
+[template template1 Template 1: __FILENAME__] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/include/import-basic-inc2.quickbook b/src/boost/tools/quickbook/test/include/import-basic-inc2.quickbook
new file mode 100644
index 000000000..0cbaaa11d
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/import-basic-inc2.quickbook
@@ -0,0 +1,10 @@
+[article Macro import.
+[quickbook 1.6]
+]
+
+[/ TOOD: Should I have a special docinfo type for this kind of thing? ]
+
+This shouldn't show: __FILENAME__
+
+[def macro2 Macro 2: __FILENAME__]
+[template template2 Template 2: __FILENAME__] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/include/in_section-1_5.gold b/src/boost/tools/quickbook/test/include/in_section-1_5.gold
new file mode 100644
index 000000000..b55eb73f3
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/in_section-1_5.gold
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="include_in_section_1_5" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include in section 1.5</title>
+ <section id="include_in_section_1_5.container">
+ <title><link linkend="include_in_section_1_5.container">Container</link></title>
+ <bridgehead renderas="sect1" id="include_in_section_include_1.container.h0">
+ <phrase id="include_in_section_include_1.container.test1"/><link linkend="include_in_section_include_1.container.test1">Test1</link>
+ </bridgehead>
+ <section id="include_in_section_include_1.container.inner">
+ <bridgehead renderas="sect1" id="include_in_section_include_1.container.inner.h0">
+ <phrase id="include_in_section_include_1.container.inner.test2"/><link linkend="include_in_section_include_1.container.inner.test2">Test2</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="include_in_section_include_1.container.inner.h1">
+ <phrase id="include_in_section_include_1.container.inner.simple_include"/><link
+ linkend="include_in_section_include_1.container.inner.simple_include">Simple
+ include</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect1" id="section_include.container.h0">
+ <phrase id="section_include.container.test1"/><link linkend="section_include.container.test1">Test1</link>
+ </bridgehead>
+ <section id="section_include.container.inner">
+ <bridgehead renderas="sect1" id="section_include.container.inner.h0">
+ <phrase id="section_include.container.inner.test2"/><link linkend="section_include.container.inner.test2">Test2</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="include_in_section_include_2.container.inner.h0">
+ <phrase id="include_in_section_include_2.container.inner.simple_include"/><link
+ linkend="include_in_section_include_2.container.inner.simple_include">Simple
+ include</link>
+ </bridgehead>
+ </section>
+ </section>
+ <bridgehead renderas="sect1" id="include_in_section_include_1.h0">
+ <phrase id="include_in_section_include_1.test1"/><link linkend="include_in_section_include_1.test1">Test1</link>
+ </bridgehead>
+ <section id="include_in_section_include_1.inner">
+ <bridgehead renderas="sect1" id="include_in_section_include_1.inner.h0">
+ <phrase id="include_in_section_include_1.inner.test2"/><link linkend="include_in_section_include_1.inner.test2">Test2</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="include_in_section_include_1.inner.h1">
+ <phrase id="include_in_section_include_1.inner.simple_include"/><link linkend="include_in_section_include_1.inner.simple_include">Simple
+ include</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect1" id="section_include.h0">
+ <phrase id="section_include.test1"/><link linkend="section_include.test1">Test1</link>
+ </bridgehead>
+ <section id="section_include.inner">
+ <bridgehead renderas="sect1" id="section_include.inner.h0">
+ <phrase id="section_include.inner.test2"/><link linkend="section_include.inner.test2">Test2</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="include_in_section_include_2.inner.h0">
+ <phrase id="include_in_section_include_2.inner.simple_include"/><link linkend="include_in_section_include_2.inner.simple_include">Simple
+ include</link>
+ </bridgehead>
+ </section>
+ <section id="include_in_section_1_5.container2">
+ <title><link linkend="include_in_section_1_5.container2">Container2</link></title>
+ <bridgehead renderas="sect1" id="include_in_section_include_1.container2.h0">
+ <phrase id="include_in_section_include_1.container2.test1"/><link linkend="include_in_section_include_1.container2.test1">Test1</link>
+ </bridgehead>
+ <section id="include_in_section_include_1.container2.inner">
+ <bridgehead renderas="sect1" id="include_in_section_include_1.container2.inner.h0">
+ <phrase id="include_in_section_include_1.container2.inner.test2"/><link linkend="include_in_section_include_1.container2.inner.test2">Test2</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="include_in_section_include_1.container2.inner.h1">
+ <phrase id="include_in_section_include_1.container2.inner.simple_include"/><link
+ linkend="include_in_section_include_1.container2.inner.simple_include">Simple
+ include</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect1" id="section_include.container2.h0">
+ <phrase id="section_include.container2.test1"/><link linkend="section_include.container2.test1">Test1</link>
+ </bridgehead>
+ <section id="section_include.container2.inner">
+ <bridgehead renderas="sect1" id="section_include.container2.inner.h0">
+ <phrase id="section_include.container2.inner.test2"/><link linkend="section_include.container2.inner.test2">Test2</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="include_in_section_include_2.container2.inner.h0">
+ <phrase id="include_in_section_include_2.container2.inner.simple_include"/><link
+ linkend="include_in_section_include_2.container2.inner.simple_include">Simple
+ include</link>
+ </bridgehead>
+ </section>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/include/in_section-1_5.gold-html b/src/boost/tools/quickbook/test/include/in_section-1_5.gold-html
new file mode 100644
index 000000000..5bad6b570
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/in_section-1_5.gold-html
@@ -0,0 +1,120 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Include in section 1.5
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#include_in_section_1_5.container">Container</a>
+ </li>
+ <li>
+ <a href="#include_in_section_include_1.inner"><i>Untitled</i></a>
+ </li>
+ <li>
+ <a href="#section_include.inner"><i>Untitled</i></a>
+ </li>
+ <li>
+ <a href="#include_in_section_1_5.container2">Container2</a>
+ </li>
+ </ul>
+ </div>
+ <h1 id="include_in_section_include_1.test1">
+ Test1
+ </h1>
+ <h1 id="section_include.test1">
+ Test1
+ </h1>
+ <div id="include_in_section_1_5.container">
+ <h3>
+ Container
+ </h3>
+ <div id="include_in_section_1_5.container">
+ <h1 id="include_in_section_include_1.container.test1">
+ Test1
+ </h1>
+ <h1 id="section_include.container.test1">
+ Test1
+ </h1>
+ </div>
+ <div id="include_in_section_include_1.container.inner">
+ <div id="include_in_section_include_1.container.inner">
+ <h1 id="include_in_section_include_1.container.inner.test2">
+ Test2
+ </h1>
+ <h4 id="include_in_section_include_1.container.inner.simple_include">
+ Simple include
+ </h4>
+ </div>
+ </div>
+ <div id="section_include.container.inner">
+ <div id="section_include.container.inner">
+ <h1 id="section_include.container.inner.test2">
+ Test2
+ </h1>
+ <h4 id="include_in_section_include_2.container.inner.simple_include">
+ Simple include
+ </h4>
+ </div>
+ </div>
+ </div>
+ <div id="include_in_section_include_1.inner">
+ <div id="include_in_section_include_1.inner">
+ <h1 id="include_in_section_include_1.inner.test2">
+ Test2
+ </h1>
+ <h3 id="include_in_section_include_1.inner.simple_include">
+ Simple include
+ </h3>
+ </div>
+ </div>
+ <div id="section_include.inner">
+ <div id="section_include.inner">
+ <h1 id="section_include.inner.test2">
+ Test2
+ </h1>
+ <h3 id="include_in_section_include_2.inner.simple_include">
+ Simple include
+ </h3>
+ </div>
+ </div>
+ <div id="include_in_section_1_5.container2">
+ <h3>
+ Container2
+ </h3>
+ <div id="include_in_section_1_5.container2">
+ <h1 id="include_in_section_include_1.container2.test1">
+ Test1
+ </h1>
+ <h1 id="section_include.container2.test1">
+ Test1
+ </h1>
+ </div>
+ <div id="include_in_section_include_1.container2.inner">
+ <div id="include_in_section_include_1.container2.inner">
+ <h1 id="include_in_section_include_1.container2.inner.test2">
+ Test2
+ </h1>
+ <h4 id="include_in_section_include_1.container2.inner.simple_include">
+ Simple include
+ </h4>
+ </div>
+ </div>
+ <div id="section_include.container2.inner">
+ <div id="section_include.container2.inner">
+ <h1 id="section_include.container2.inner.test2">
+ Test2
+ </h1>
+ <h4 id="include_in_section_include_2.container2.inner.simple_include">
+ Simple include
+ </h4>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/include/in_section-1_5.quickbook b/src/boost/tools/quickbook/test/include/in_section-1_5.quickbook
new file mode 100644
index 000000000..28183096a
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/in_section-1_5.quickbook
@@ -0,0 +1,16 @@
+[article Include in section 1.5
+[quickbook 1.5]
+]
+
+[section:container Container]
+[include in_section-inc1.quickbook]
+[include in_section-inc2.quickbook]
+[endsect]
+
+[include in_section-inc1.quickbook]
+[include in_section-inc2.quickbook]
+
+[section:container2 Container2]
+[include in_section-inc1.quickbook]
+[include in_section-inc2.quickbook]
+[endsect]
diff --git a/src/boost/tools/quickbook/test/include/in_section-1_6.gold b/src/boost/tools/quickbook/test/include/in_section-1_6.gold
new file mode 100644
index 000000000..52c18a706
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/in_section-1_6.gold
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="include_in_section_1_6" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include in section 1.6</title>
+ <section id="include_in_section_1_6.container">
+ <title><link linkend="include_in_section_1_6.container">Container</link></title>
+ <article id="include_in_section_include_1" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include in section include 1</title>
+ <bridgehead renderas="sect1" id="include_in_section_include_1.h0">
+ <phrase id="include_in_section_include_1.test1"/><link linkend="include_in_section_include_1.test1">Test1</link>
+ </bridgehead>
+ <section id="include_in_section_include_1.inner">
+ <bridgehead renderas="sect1" id="include_in_section_include_1.inner.h0">
+ <phrase id="include_in_section_include_1.inner.test2"/><link linkend="include_in_section_include_1.inner.test2">Test2</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="include_in_section_include_1.inner.h1">
+ <phrase id="include_in_section_include_1.inner.simple_include"/><link linkend="include_in_section_include_1.inner.simple_include">Simple
+ include</link>
+ </bridgehead>
+ </section>
+ </article>
+ <article id="section_include" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include in section include 2</title>
+ <bridgehead renderas="sect1" id="section_include.h0">
+ <phrase id="section_include.test1"/><link linkend="section_include.test1">Test1</link>
+ </bridgehead>
+ <section id="section_include.inner">
+ <bridgehead renderas="sect1" id="section_include.inner.h0">
+ <phrase id="section_include.inner.test2"/><link linkend="section_include.inner.test2">Test2</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="section_include.inner.h1">
+ <phrase id="section_include.inner.simple_include"/><link linkend="section_include.inner.simple_include">Simple
+ include</link>
+ </bridgehead>
+ </section>
+ </article>
+ </section>
+ <article id="include_in_section_include_1_0" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include in section include 1</title>
+ <bridgehead renderas="sect1" id="include_in_section_include_1_0.h0">
+ <phrase id="include_in_section_include_1_0.test1"/><link linkend="include_in_section_include_1_0.test1">Test1</link>
+ </bridgehead>
+ <section id="include_in_section_include_1_0.inner">
+ <bridgehead renderas="sect1" id="include_in_section_include_1_0.inner.h0">
+ <phrase id="include_in_section_include_1_0.inner.test2"/><link linkend="include_in_section_include_1_0.inner.test2">Test2</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="include_in_section_include_1_0.inner.h1">
+ <phrase id="include_in_section_include_1_0.inner.simple_include"/><link linkend="include_in_section_include_1_0.inner.simple_include">Simple
+ include</link>
+ </bridgehead>
+ </section>
+ </article>
+ <article id="section_include0" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include in section include 2</title>
+ <bridgehead renderas="sect1" id="section_include0.h0">
+ <phrase id="section_include0.test1"/><link linkend="section_include0.test1">Test1</link>
+ </bridgehead>
+ <section id="section_include0.inner">
+ <bridgehead renderas="sect1" id="section_include0.inner.h0">
+ <phrase id="section_include0.inner.test2"/><link linkend="section_include0.inner.test2">Test2</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="section_include0.inner.h1">
+ <phrase id="section_include0.inner.simple_include"/><link linkend="section_include0.inner.simple_include">Simple
+ include</link>
+ </bridgehead>
+ </section>
+ </article>
+ <section id="include_in_section_1_6.container2">
+ <title><link linkend="include_in_section_1_6.container2">Container2</link></title>
+ <article id="include_in_section_include_1_1" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include in section include 1</title>
+ <bridgehead renderas="sect1" id="include_in_section_include_1_1.h0">
+ <phrase id="include_in_section_include_1_1.test1"/><link linkend="include_in_section_include_1_1.test1">Test1</link>
+ </bridgehead>
+ <section id="include_in_section_include_1_1.inner">
+ <bridgehead renderas="sect1" id="include_in_section_include_1_1.inner.h0">
+ <phrase id="include_in_section_include_1_1.inner.test2"/><link linkend="include_in_section_include_1_1.inner.test2">Test2</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="include_in_section_include_1_1.inner.h1">
+ <phrase id="include_in_section_include_1_1.inner.simple_include"/><link
+ linkend="include_in_section_include_1_1.inner.simple_include">Simple include</link>
+ </bridgehead>
+ </section>
+ </article>
+ <article id="section_include1" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include in section include 2</title>
+ <bridgehead renderas="sect1" id="section_include1.h0">
+ <phrase id="section_include1.test1"/><link linkend="section_include1.test1">Test1</link>
+ </bridgehead>
+ <section id="section_include1.inner">
+ <bridgehead renderas="sect1" id="section_include1.inner.h0">
+ <phrase id="section_include1.inner.test2"/><link linkend="section_include1.inner.test2">Test2</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="section_include1.inner.h1">
+ <phrase id="section_include1.inner.simple_include"/><link linkend="section_include1.inner.simple_include">Simple
+ include</link>
+ </bridgehead>
+ </section>
+ </article>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/include/in_section-1_6.gold-html b/src/boost/tools/quickbook/test/include/in_section-1_6.gold-html
new file mode 100644
index 000000000..cc2c36ac0
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/in_section-1_6.gold-html
@@ -0,0 +1,238 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Include in section 1.6
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#include_in_section_1_6.container">Container</a>
+ <ul>
+ <li>
+ <a href="#include_in_section_include_1">Include in section include
+ 1</a>
+ </li>
+ <li>
+ <a href="#section_include">Include in section include 2</a>
+ </li>
+ </ul>
+ </li>
+ <li>
+ <a href="#include_in_section_include_1_0">Include in section include 1</a>
+ <ul>
+ <li>
+ <a href="#include_in_section_include_1_0.inner"><i>Untitled</i></a>
+ </li>
+ </ul>
+ </li>
+ <li>
+ <a href="#section_include0">Include in section include 2</a>
+ <ul>
+ <li>
+ <a href="#section_include0.inner"><i>Untitled</i></a>
+ </li>
+ </ul>
+ </li>
+ <li>
+ <a href="#include_in_section_1_6.container2">Container2</a>
+ <ul>
+ <li>
+ <a href="#include_in_section_include_1_1">Include in section include
+ 1</a>
+ </li>
+ <li>
+ <a href="#section_include1">Include in section include 2</a>
+ </li>
+ </ul>
+ </li>
+ </ul>
+ </div>
+ <div id="include_in_section_1_6.container">
+ <h3>
+ Container
+ </h3>
+ <div id="include_in_section_1_6.container">
+ </div>
+ <div id="include_in_section_include_1">
+ <h3>
+ Include in section include 1
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#include_in_section_include_1.inner"><i>Untitled</i></a>
+ </li>
+ </ul>
+ </div>
+ <h1 id="include_in_section_include_1.test1">
+ Test1
+ </h1>
+ <div id="include_in_section_include_1.inner">
+ <div id="include_in_section_include_1.inner">
+ <h1 id="include_in_section_include_1.inner.test2">
+ Test2
+ </h1>
+ <h3 id="include_in_section_include_1.inner.simple_include">
+ Simple include
+ </h3>
+ </div>
+ </div>
+ </div>
+ <div id="section_include">
+ <h3>
+ Include in section include 2
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#section_include.inner"><i>Untitled</i></a>
+ </li>
+ </ul>
+ </div>
+ <h1 id="section_include.test1">
+ Test1
+ </h1>
+ <div id="section_include.inner">
+ <div id="section_include.inner">
+ <h1 id="section_include.inner.test2">
+ Test2
+ </h1>
+ <h3 id="section_include.inner.simple_include">
+ Simple include
+ </h3>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="include_in_section_include_1_0">
+ <h3>
+ Include in section include 1
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#include_in_section_include_1_0.inner"><i>Untitled</i></a>
+ </li>
+ </ul>
+ </div>
+ <h1 id="include_in_section_include_1_0.test1">
+ Test1
+ </h1>
+ <div id="include_in_section_include_1_0.inner">
+ <div id="include_in_section_include_1_0.inner">
+ <h1 id="include_in_section_include_1_0.inner.test2">
+ Test2
+ </h1>
+ <h3 id="include_in_section_include_1_0.inner.simple_include">
+ Simple include
+ </h3>
+ </div>
+ </div>
+ </div>
+ <div id="section_include0">
+ <h3>
+ Include in section include 2
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#section_include0.inner"><i>Untitled</i></a>
+ </li>
+ </ul>
+ </div>
+ <h1 id="section_include0.test1">
+ Test1
+ </h1>
+ <div id="section_include0.inner">
+ <div id="section_include0.inner">
+ <h1 id="section_include0.inner.test2">
+ Test2
+ </h1>
+ <h3 id="section_include0.inner.simple_include">
+ Simple include
+ </h3>
+ </div>
+ </div>
+ </div>
+ <div id="include_in_section_1_6.container2">
+ <h3>
+ Container2
+ </h3>
+ <div id="include_in_section_1_6.container2">
+ </div>
+ <div id="include_in_section_include_1_1">
+ <h3>
+ Include in section include 1
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#include_in_section_include_1_1.inner"><i>Untitled</i></a>
+ </li>
+ </ul>
+ </div>
+ <h1 id="include_in_section_include_1_1.test1">
+ Test1
+ </h1>
+ <div id="include_in_section_include_1_1.inner">
+ <div id="include_in_section_include_1_1.inner">
+ <h1 id="include_in_section_include_1_1.inner.test2">
+ Test2
+ </h1>
+ <h3 id="include_in_section_include_1_1.inner.simple_include">
+ Simple include
+ </h3>
+ </div>
+ </div>
+ </div>
+ <div id="section_include1">
+ <h3>
+ Include in section include 2
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#section_include1.inner"><i>Untitled</i></a>
+ </li>
+ </ul>
+ </div>
+ <h1 id="section_include1.test1">
+ Test1
+ </h1>
+ <div id="section_include1.inner">
+ <div id="section_include1.inner">
+ <h1 id="section_include1.inner.test2">
+ Test2
+ </h1>
+ <h3 id="section_include1.inner.simple_include">
+ Simple include
+ </h3>
+ </div>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/include/in_section-1_6.quickbook b/src/boost/tools/quickbook/test/include/in_section-1_6.quickbook
new file mode 100644
index 000000000..686f97ec4
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/in_section-1_6.quickbook
@@ -0,0 +1,16 @@
+[article Include in section 1.6
+[quickbook 1.6]
+]
+
+[section:container Container]
+[include in_section-inc1.quickbook]
+[include in_section-inc2.quickbook]
+[endsect]
+
+[include in_section-inc1.quickbook]
+[include in_section-inc2.quickbook]
+
+[section:container2 Container2]
+[include in_section-inc1.quickbook]
+[include in_section-inc2.quickbook]
+[endsect]
diff --git a/src/boost/tools/quickbook/test/include/in_section-inc1.quickbook b/src/boost/tools/quickbook/test/include/in_section-inc1.quickbook
new file mode 100644
index 000000000..f74bf5dbd
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/in_section-inc1.quickbook
@@ -0,0 +1,13 @@
+[article Include in section include 1
+[quickbook 1.6]
+]
+
+[h1 Test1]
+
+[section:inner]
+
+[h1 Test2]
+
+[include include-id-inc1.quickbook]
+
+[endsect]
diff --git a/src/boost/tools/quickbook/test/include/in_section-inc2.quickbook b/src/boost/tools/quickbook/test/include/in_section-inc2.quickbook
new file mode 100644
index 000000000..0a30aaa74
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/in_section-inc2.quickbook
@@ -0,0 +1,14 @@
+[article Include in section include 2
+[quickbook 1.6]
+[id section_include]
+]
+
+[h1 Test1]
+
+[section:inner]
+
+[h1 Test2]
+
+[include include-id-inc1.quickbook]
+
+[endsect]
diff --git a/src/boost/tools/quickbook/test/include/include-id-1.5.gold b/src/boost/tools/quickbook/test/include/include-id-1.5.gold
new file mode 100644
index 000000000..4944d08d4
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/include-id-1.5.gold
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="include_id_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include Id Test</title>
+ <bridgehead renderas="sect2" id="a.h0">
+ <phrase id="a.simple_include"/><link linkend="a.simple_include">Simple include</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="b.h0">
+ <phrase id="b.simple_include"/><link linkend="b.simple_include">Simple include</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="c.h0">
+ <phrase id="c.title__no_id"/><link linkend="c.title__no_id">Title, no id</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="d.h0">
+ <phrase id="d.title__no_id"/><link linkend="d.title__no_id">Title, no id</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="with-id.h0">
+ <phrase id="with-id.title_with_id"/><link linkend="with-id.title_with_id">Title
+ with id</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="with-id.h1">
+ <phrase id="with-id.title_with_id0"/><link linkend="with-id.title_with_id0">Title
+ with id</link>
+ </bridgehead>
+</article>
diff --git a/src/boost/tools/quickbook/test/include/include-id-1.5.gold-html b/src/boost/tools/quickbook/test/include/include-id-1.5.gold-html
new file mode 100644
index 000000000..4c7b6b230
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/include-id-1.5.gold-html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Include Id Test
+ </h3>
+ <h2 id="a.simple_include">
+ Simple include
+ </h2>
+ <h2 id="b.simple_include">
+ Simple include
+ </h2>
+ <h2 id="c.title__no_id">
+ Title, no id
+ </h2>
+ <h2 id="d.title__no_id">
+ Title, no id
+ </h2>
+ <h2 id="with-id.title_with_id">
+ Title with id
+ </h2>
+ <h2 id="with-id.title_with_id0">
+ Title with id
+ </h2>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/include/include-id-1.5.quickbook b/src/boost/tools/quickbook/test/include/include-id-1.5.quickbook
new file mode 100644
index 000000000..dd4b50ad3
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/include-id-1.5.quickbook
@@ -0,0 +1,10 @@
+[article Include Id Test
+[quickbook 1.5]
+]
+
+[include:a include-id-inc1.quickbook]
+[include:b include-id-inc1.quickbook]
+[include:c include-id-inc2.quickbook]
+[include:d include-id-inc2.quickbook]
+[include:e include-id-inc3.quickbook]
+[include:f include-id-inc3.quickbook]
diff --git a/src/boost/tools/quickbook/test/include/include-id-1.6.gold b/src/boost/tools/quickbook/test/include/include-id-1.6.gold
new file mode 100644
index 000000000..1f4cb881f
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/include-id-1.6.gold
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="include_id_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include Id Test</title>
+ <bridgehead renderas="sect2" id="a.h0">
+ <phrase id="a.simple_include"/><link linkend="a.simple_include">Simple include</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="b.h0">
+ <phrase id="b.simple_include"/><link linkend="b.simple_include">Simple include</link>
+ </bridgehead>
+ <article id="c" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include without id</title>
+ <bridgehead renderas="sect2" id="c.h0">
+ <phrase id="c.title__no_id"/><link linkend="c.title__no_id">Title, no id</link>
+ </bridgehead>
+ </article>
+ <article id="d" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include without id</title>
+ <bridgehead renderas="sect2" id="d.h0">
+ <phrase id="d.title__no_id"/><link linkend="d.title__no_id">Title, no id</link>
+ </bridgehead>
+ </article>
+ <article id="e" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include with id</title>
+ <bridgehead renderas="sect2" id="e.h0">
+ <phrase id="e.title_with_id"/><link linkend="e.title_with_id">Title with id</link>
+ </bridgehead>
+ </article>
+ <article id="f" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include with id</title>
+ <bridgehead renderas="sect2" id="f.h0">
+ <phrase id="f.title_with_id"/><link linkend="f.title_with_id">Title with id</link>
+ </bridgehead>
+ </article>
+</article>
diff --git a/src/boost/tools/quickbook/test/include/include-id-1.6.gold-html b/src/boost/tools/quickbook/test/include/include-id-1.6.gold-html
new file mode 100644
index 000000000..5912dadb0
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/include-id-1.6.gold-html
@@ -0,0 +1,66 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Include Id Test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#c">Include without id</a>
+ </li>
+ <li>
+ <a href="#d">Include without id</a>
+ </li>
+ <li>
+ <a href="#e">Include with id</a>
+ </li>
+ <li>
+ <a href="#f">Include with id</a>
+ </li>
+ </ul>
+ </div>
+ <h2 id="a.simple_include">
+ Simple include
+ </h2>
+ <h2 id="b.simple_include">
+ Simple include
+ </h2>
+ <div id="c">
+ <h3>
+ Include without id
+ </h3>
+ <h2 id="c.title__no_id">
+ Title, no id
+ </h2>
+ </div>
+ <div id="d">
+ <h3>
+ Include without id
+ </h3>
+ <h2 id="d.title__no_id">
+ Title, no id
+ </h2>
+ </div>
+ <div id="e">
+ <h3>
+ Include with id
+ </h3>
+ <h2 id="e.title_with_id">
+ Title with id
+ </h2>
+ </div>
+ <div id="f">
+ <h3>
+ Include with id
+ </h3>
+ <h2 id="f.title_with_id">
+ Title with id
+ </h2>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/include/include-id-1.6.quickbook b/src/boost/tools/quickbook/test/include/include-id-1.6.quickbook
new file mode 100644
index 000000000..d7d5318cd
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/include-id-1.6.quickbook
@@ -0,0 +1,10 @@
+[article Include Id Test
+[quickbook 1.6]
+]
+
+[include:a include-id-inc1.quickbook]
+[include:b include-id-inc1.quickbook]
+[include:c include-id-inc2.quickbook]
+[include:d include-id-inc2.quickbook]
+[include:e include-id-inc3.quickbook]
+[include:f include-id-inc3.quickbook]
diff --git a/src/boost/tools/quickbook/test/include/include-id-inc1.quickbook b/src/boost/tools/quickbook/test/include/include-id-inc1.quickbook
new file mode 100644
index 000000000..63a761d56
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/include-id-inc1.quickbook
@@ -0,0 +1 @@
+[heading Simple include]
diff --git a/src/boost/tools/quickbook/test/include/include-id-inc2.quickbook b/src/boost/tools/quickbook/test/include/include-id-inc2.quickbook
new file mode 100644
index 000000000..a7dbef41b
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/include-id-inc2.quickbook
@@ -0,0 +1,5 @@
+[article Include without id
+[quickbook 1.5]
+]
+
+[heading Title, no id]
diff --git a/src/boost/tools/quickbook/test/include/include-id-inc3.quickbook b/src/boost/tools/quickbook/test/include/include-id-inc3.quickbook
new file mode 100644
index 000000000..2bd239825
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/include-id-inc3.quickbook
@@ -0,0 +1,6 @@
+[article Include with id
+[quickbook 1.5]
+[id with-id]
+]
+
+[heading Title with id]
diff --git a/src/boost/tools/quickbook/test/include/include_id_unbalanced-1_6.gold b/src/boost/tools/quickbook/test/include/include_id_unbalanced-1_6.gold
new file mode 100644
index 000000000..ede21ccbb
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/include_id_unbalanced-1_6.gold
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="unbalanced" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Test include ids with unbalanced sections</title>
+ <section id="include1.inc1">
+ <title><link linkend="include1.inc1">Include 1</link></title>
+ <bridgehead renderas="sect3" id="include1.inc1.h0">
+ <phrase id="include1.inc1.inc1_1"/><link linkend="include1.inc1.inc1_1">Heading
+ 1</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="include1a.h0">
+ <phrase id="include1a.inc1a_1"/><link linkend="include1a.inc1a_1">Heading 1</link>
+ </bridgehead>
+ <section id="include1a.inc1a">
+ <title><link linkend="include1a.inc1a">Include 1a</link></title>
+ <bridgehead renderas="sect4" id="include1a.inc1a.h0">
+ <phrase id="include1a.inc1a.inc1a_2"/><link linkend="include1a.inc1a.inc1a_2">Heading
+ 2</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="include1a.inc1a.h1">
+ <phrase id="include1a.inc1a.inc1_2"/><link linkend="include1a.inc1a.inc1_2">Heading
+ 2</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="include1a.inc1a.h2">
+ <phrase id="include1a.inc1a.x1"/><link linkend="include1a.inc1a.x1">X1</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect3" id="include1.inc1.h1">
+ <phrase id="include1.inc1.x2"/><link linkend="include1.inc1.x2">X2</link>
+ </bridgehead>
+ </section>
+ <section id="unbalanced.sect1">
+ <title><link linkend="unbalanced.sect1">Section 1</link></title>
+ <bridgehead renderas="sect3" id="unbalanced.sect1.h0">
+ <phrase id="unbalanced.sect1.x1"/><link linkend="unbalanced.sect1.x1">X1</link>
+ </bridgehead>
+ <section id="unbalanced.sect1.sect2">
+ <title><link linkend="unbalanced.sect1.sect2">Section 2</link></title>
+ <bridgehead renderas="sect4" id="unbalanced.sect1.sect2.h0">
+ <phrase id="unbalanced.sect1.sect2.x2"/><link linkend="unbalanced.sect1.sect2.x2">X2</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="include2.h0">
+ <phrase id="include2.inc2_1"/><link linkend="include2.inc2_1">Heading 1</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect3" id="include2.h1">
+ <phrase id="include2.inc2_2"/><link linkend="include2.inc2_2">Heading 2</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="include2a.h0">
+ <phrase id="include2a.inc2a_1"/><link linkend="include2a.inc2a_1">Heading 1</link>
+ </bridgehead>
+ </section>
+ <bridgehead renderas="sect2" id="include2a.h1">
+ <phrase id="include2a.inc2a_2"/><link linkend="include2a.inc2a_2">Heading 2</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="include2.h2">
+ <phrase id="include2.inc2_3"/><link linkend="include2.inc2_3">Heading 3</link>
+ </bridgehead>
+</article>
diff --git a/src/boost/tools/quickbook/test/include/include_id_unbalanced-1_6.gold-html b/src/boost/tools/quickbook/test/include/include_id_unbalanced-1_6.gold-html
new file mode 100644
index 000000000..85415e882
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/include_id_unbalanced-1_6.gold-html
@@ -0,0 +1,89 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Test include ids with unbalanced sections
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#include1.inc1">Include 1</a>
+ </li>
+ <li>
+ <a href="#unbalanced.sect1">Section 1</a>
+ </li>
+ </ul>
+ </div>
+ <h2 id="include2a.inc2a_2">
+ Heading 2
+ </h2>
+ <h2 id="include2.inc2_3">
+ Heading 3
+ </h2>
+ <div id="include1.inc1">
+ <h3>
+ Include 1
+ </h3>
+ <div id="include1.inc1">
+ <h3 id="include1.inc1.inc1_1">
+ Heading 1
+ </h3>
+ <h3 id="include1a.inc1a_1">
+ Heading 1
+ </h3>
+ <h3 id="include1.inc1.x2">
+ X2
+ </h3>
+ </div>
+ <div id="include1a.inc1a">
+ <h3>
+ Include 1a
+ </h3>
+ <div id="include1a.inc1a">
+ <h4 id="include1a.inc1a.inc1a_2">
+ Heading 2
+ </h4>
+ <h4 id="include1a.inc1a.inc1_2">
+ Heading 2
+ </h4>
+ <h4 id="include1a.inc1a.x1">
+ X1
+ </h4>
+ </div>
+ </div>
+ </div>
+ <div id="unbalanced.sect1">
+ <h3>
+ Section 1
+ </h3>
+ <div id="unbalanced.sect1">
+ <h3 id="unbalanced.sect1.x1">
+ X1
+ </h3>
+ <h3 id="include2.inc2_2">
+ Heading 2
+ </h3>
+ <h3 id="include2a.inc2a_1">
+ Heading 1
+ </h3>
+ </div>
+ <div id="unbalanced.sect1.sect2">
+ <h3>
+ Section 2
+ </h3>
+ <div id="unbalanced.sect1.sect2">
+ <h4 id="unbalanced.sect1.sect2.x2">
+ X2
+ </h4>
+ <h4 id="include2.inc2_1">
+ Heading 1
+ </h4>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/include/include_id_unbalanced-1_6.quickbook b/src/boost/tools/quickbook/test/include/include_id_unbalanced-1_6.quickbook
new file mode 100644
index 000000000..b1568d4f9
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/include_id_unbalanced-1_6.quickbook
@@ -0,0 +1,19 @@
+[quickbook 1.6]
+[article Test include ids with unbalanced sections
+ [id unbalanced]
+]
+
+[/ Sections start in included files ]
+
+[include:include1 include_id_unbalanced-inc1.quickbook]
+[heading:x1 X1]
+[endsect]
+[heading:x2 X2]
+[endsect]
+
+[/ Sections end in included files ]
+[section:sect1 Section 1]
+[heading:x1 X1]
+[section:sect2 Section 2]
+[heading:x2 X2]
+[include:include2 include_id_unbalanced-inc2.quickbook]
diff --git a/src/boost/tools/quickbook/test/include/include_id_unbalanced-inc1.quickbook b/src/boost/tools/quickbook/test/include/include_id_unbalanced-inc1.quickbook
new file mode 100644
index 000000000..d3214811a
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/include_id_unbalanced-inc1.quickbook
@@ -0,0 +1,4 @@
+[section:inc1 Include 1]
+[heading:inc1_1 Heading 1]
+[include:include1a include_id_unbalanced-inc1a.quickbook]
+[heading:inc1_2 Heading 2]
diff --git a/src/boost/tools/quickbook/test/include/include_id_unbalanced-inc1a.quickbook b/src/boost/tools/quickbook/test/include/include_id_unbalanced-inc1a.quickbook
new file mode 100644
index 000000000..1bc46b4f5
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/include_id_unbalanced-inc1a.quickbook
@@ -0,0 +1,3 @@
+[heading:inc1a_1 Heading 1]
+[section:inc1a Include 1a]
+[heading:inc1a_2 Heading 2]
diff --git a/src/boost/tools/quickbook/test/include/include_id_unbalanced-inc2.quickbook b/src/boost/tools/quickbook/test/include/include_id_unbalanced-inc2.quickbook
new file mode 100644
index 000000000..37c313cae
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/include_id_unbalanced-inc2.quickbook
@@ -0,0 +1,5 @@
+[heading:inc2_1 Heading 1]
+[endsect]
+[heading:inc2_2 Heading 2]
+[include:include2a include_id_unbalanced-inc2a.quickbook]
+[heading:inc2_3 Heading 3]
diff --git a/src/boost/tools/quickbook/test/include/include_id_unbalanced-inc2a.quickbook b/src/boost/tools/quickbook/test/include/include_id_unbalanced-inc2a.quickbook
new file mode 100644
index 000000000..780fb4057
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/include_id_unbalanced-inc2a.quickbook
@@ -0,0 +1,3 @@
+[heading:inc2a_1 Heading 1]
+[endsect]
+[heading:inc2a_2 Heading 2]
diff --git a/src/boost/tools/quickbook/test/include/macros-1.5.gold b/src/boost/tools/quickbook/test/include/macros-1.5.gold
new file mode 100644
index 000000000..d5e8a5193
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/macros-1.5.gold
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="macros_test_1_5" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Macros Test 1.5</title>
+ <para>
+ Foo:macros-inc1.quickbook
+ </para>
+ <para>
+ Defined conditional phrase.
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ __foo__
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Defined template:macros-1.5.quickbook
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ __defined_macro__
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ [not_defined_template]
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <emphasis role="underline">_not_defined_macro__</emphasis>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+</article>
diff --git a/src/boost/tools/quickbook/test/include/macros-1.5.gold-html b/src/boost/tools/quickbook/test/include/macros-1.5.gold-html
new file mode 100644
index 000000000..e1a985932
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/macros-1.5.gold-html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Macros Test 1.5
+ </h3>
+ <p>
+ Foo:macros-inc1.quickbook
+ </p>
+ <p>
+ Defined conditional phrase.
+ </p>
+ <ul>
+ <li>
+ <div>
+ __foo__
+ </div>
+ </li>
+ <li>
+ <div>
+ Defined template:macros-1.5.quickbook
+ </div>
+ </li>
+ <li>
+ <div>
+ __defined_macro__
+ </div>
+ </li>
+ <li>
+ <div>
+ [not_defined_template]
+ </div>
+ </li>
+ <li>
+ <div>
+ <span class="underline">_not_defined_macro__</span>
+ </div>
+ </li>
+ </ul>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/include/macros-1.5.quickbook b/src/boost/tools/quickbook/test/include/macros-1.5.quickbook
new file mode 100644
index 000000000..a63a1f0ca
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/macros-1.5.quickbook
@@ -0,0 +1,13 @@
+[article Macros Test 1.5
+[quickbook 1.5]
+]
+
+[def __defined__]
+
+[include macros-inc1.quickbook]
+
+* __foo__
+* [defined_template]
+* __defined_macro__
+* [not_defined_template]
+* [__not_defined_macro__]
diff --git a/src/boost/tools/quickbook/test/include/macros-1.6.gold b/src/boost/tools/quickbook/test/include/macros-1.6.gold
new file mode 100644
index 000000000..ec93c05c1
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/macros-1.6.gold
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="macros_test_1_6" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Macros Test 1.6</title>
+ <para>
+ Foo:macros-inc1.quickbook
+ </para>
+ <para>
+ Defined conditional phrase.
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ __foo__
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ [defined_template]
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ __defined_macro__
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ [not_defined_template]
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <emphasis role="underline">_not_defined_macro__</emphasis>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Foo:macros-inc1.quickbook
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Defined template:macros-1.6.quickbook
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Defined macro:macros-inc1.quickbook
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ [not_defined_template]
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <emphasis role="underline">_not_defined_macro__</emphasis>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+</article>
diff --git a/src/boost/tools/quickbook/test/include/macros-1.6.gold-html b/src/boost/tools/quickbook/test/include/macros-1.6.gold-html
new file mode 100644
index 000000000..bb7a9c6c7
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/macros-1.6.gold-html
@@ -0,0 +1,69 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Macros Test 1.6
+ </h3>
+ <p>
+ Foo:macros-inc1.quickbook
+ </p>
+ <p>
+ Defined conditional phrase.
+ </p>
+ <ul>
+ <li>
+ <div>
+ __foo__
+ </div>
+ </li>
+ <li>
+ <div>
+ [defined_template]
+ </div>
+ </li>
+ <li>
+ <div>
+ __defined_macro__
+ </div>
+ </li>
+ <li>
+ <div>
+ [not_defined_template]
+ </div>
+ </li>
+ <li>
+ <div>
+ <span class="underline">_not_defined_macro__</span>
+ </div>
+ </li>
+ </ul>
+ <ul>
+ <li>
+ <div>
+ Foo:macros-inc1.quickbook
+ </div>
+ </li>
+ <li>
+ <div>
+ Defined template:macros-1.6.quickbook
+ </div>
+ </li>
+ <li>
+ <div>
+ Defined macro:macros-inc1.quickbook
+ </div>
+ </li>
+ <li>
+ <div>
+ [not_defined_template]
+ </div>
+ </li>
+ <li>
+ <div>
+ <span class="underline">_not_defined_macro__</span>
+ </div>
+ </li>
+ </ul>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/include/macros-1.6.quickbook b/src/boost/tools/quickbook/test/include/macros-1.6.quickbook
new file mode 100644
index 000000000..5355c090e
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/macros-1.6.quickbook
@@ -0,0 +1,21 @@
+[article Macros Test 1.6
+[quickbook 1.6]
+]
+
+[def __defined__]
+
+[include macros-inc1.quickbook]
+
+* __foo__
+* [defined_template]
+* __defined_macro__
+* [not_defined_template]
+* [__not_defined_macro__]
+
+[import macros-inc1.quickbook]
+
+* __foo__
+* [defined_template]
+* __defined_macro__
+* [not_defined_template]
+* [__not_defined_macro__]
diff --git a/src/boost/tools/quickbook/test/include/macros-inc1.quickbook b/src/boost/tools/quickbook/test/include/macros-inc1.quickbook
new file mode 100644
index 000000000..f8b6f25bc
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/macros-inc1.quickbook
@@ -0,0 +1,15 @@
+[def __foo__ Foo:__FILENAME__]
+
+__foo__
+
+[?__defined__
+Defined conditional phrase.
+[template defined_template Defined template:__FILENAME__]
+[def __defined_macro__ Defined macro:__FILENAME__]
+]
+
+[?__not_defined__
+Not defined conditional phrase.
+[template not_defined_template Not defined template:__FILENAME__]
+[def __not_defined_macro__ Not defined macro:__FILENAME__]
+] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/include/nested_compatibility-1_5.gold b/src/boost/tools/quickbook/test/include/nested_compatibility-1_5.gold
new file mode 100644
index 000000000..92c948a14
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/nested_compatibility-1_5.gold
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="nested_compatibility_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Nested Compatibility Test</title>
+ <section id="nested_compatibility_test.duplicate_name">
+ <title><link linkend="nested_compatibility_test.duplicate_name">Duplicate Name</link></title>
+ <section id="nested_compatibility_test.duplicate_name.nested">
+ <title><link linkend="nested_compatibility_test.duplicate_name.nested">Nested
+ Section 1.5</link></title>
+ <bridgehead renderas="sect4" id="nested_compatibility_test.duplicate_name.nested.h0">
+ <phrase id="nested_compatibility_test.duplicate_name.nested.nested_heading_1_5"/><link
+ linkend="nested_compatibility_test.duplicate_name.nested.nested_heading_1_5">Nested
+ Heading 1.5</link>
+ </bridgehead>
+ </section>
+ <section id="nested_compatibility_test.duplicate_name.nested0">
+ <title><link linkend="nested_compatibility_test.duplicate_name.nested0">Nested
+ Section 1.6</link></title>
+ <bridgehead renderas="sect4" id="nested_compatibility_test.duplicate_name.nested0.h0">
+ <phrase id="nested_compatibility_test.duplicate_name.nested0.nested_heading_1_6"/><link
+ linkend="nested_compatibility_test.duplicate_name.nested0.nested_heading_1_6">Nested
+ Heading 1.6</link>
+ </bridgehead>
+ </section>
+ </section>
+ <section id="nested_compatibility_test.duplicate_name0">
+ <title><link linkend="nested_compatibility_test.duplicate_name0">Duplicate Name</link></title>
+ <section id="nested_compatibility_test.duplicate_name.nested1">
+ <title><link linkend="nested_compatibility_test.duplicate_name.nested1">Nested
+ Section 1.5</link></title>
+ <bridgehead renderas="sect4" id="nested_compatibility_test.duplicate_name.nested.h1">
+ <phrase id="nested_compatibility_test.duplicate_name.nested.nested_heading_1_5_0"/><link
+ linkend="nested_compatibility_test.duplicate_name.nested.nested_heading_1_5_0">Nested
+ Heading 1.5</link>
+ </bridgehead>
+ </section>
+ <section id="nested_compatibility_test.duplicate_name.nested2">
+ <title><link linkend="nested_compatibility_test.duplicate_name.nested2">Nested
+ Section 1.6</link></title>
+ <bridgehead renderas="sect4" id="nested_compatibility_test.duplicate_name.nested2.h0">
+ <phrase id="nested_compatibility_test.duplicate_name.nested2.nested_heading_1_6"/><link
+ linkend="nested_compatibility_test.duplicate_name.nested2.nested_heading_1_6">Nested
+ Heading 1.6</link>
+ </bridgehead>
+ </section>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/include/nested_compatibility-1_5.gold-html b/src/boost/tools/quickbook/test/include/nested_compatibility-1_5.gold-html
new file mode 100644
index 000000000..c7fe5f3e4
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/nested_compatibility-1_5.gold-html
@@ -0,0 +1,76 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Nested Compatibility Test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#nested_compatibility_test.duplicate_name">Duplicate Name</a>
+ </li>
+ <li>
+ <a href="#nested_compatibility_test.duplicate_name0">Duplicate Name</a>
+ </li>
+ </ul>
+ </div>
+ <div id="nested_compatibility_test.duplicate_name">
+ <h3>
+ Duplicate Name
+ </h3>
+ <div id="nested_compatibility_test.duplicate_name">
+ </div>
+ <div id="nested_compatibility_test.duplicate_name.nested">
+ <h3>
+ Nested Section 1.5
+ </h3>
+ <div id="nested_compatibility_test.duplicate_name.nested">
+ <h4 id="nested_compatibility_test.duplicate_name.nested.nested_heading_1_5">
+ Nested Heading 1.5
+ </h4>
+ </div>
+ </div>
+ <div id="nested_compatibility_test.duplicate_name.nested0">
+ <h3>
+ Nested Section 1.6
+ </h3>
+ <div id="nested_compatibility_test.duplicate_name.nested0">
+ <h4 id="nested_compatibility_test.duplicate_name.nested0.nested_heading_1_6">
+ Nested Heading 1.6
+ </h4>
+ </div>
+ </div>
+ </div>
+ <div id="nested_compatibility_test.duplicate_name0">
+ <h3>
+ Duplicate Name
+ </h3>
+ <div id="nested_compatibility_test.duplicate_name0">
+ </div>
+ <div id="nested_compatibility_test.duplicate_name.nested1">
+ <h3>
+ Nested Section 1.5
+ </h3>
+ <div id="nested_compatibility_test.duplicate_name.nested1">
+ <h4 id="nested_compatibility_test.duplicate_name.nested.nested_heading_1_5_0">
+ Nested Heading 1.5
+ </h4>
+ </div>
+ </div>
+ <div id="nested_compatibility_test.duplicate_name.nested2">
+ <h3>
+ Nested Section 1.6
+ </h3>
+ <div id="nested_compatibility_test.duplicate_name.nested2">
+ <h4 id="nested_compatibility_test.duplicate_name.nested2.nested_heading_1_6">
+ Nested Heading 1.6
+ </h4>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/include/nested_compatibility-1_5.quickbook b/src/boost/tools/quickbook/test/include/nested_compatibility-1_5.quickbook
new file mode 100644
index 000000000..f9d78b1e4
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/nested_compatibility-1_5.quickbook
@@ -0,0 +1,12 @@
+[quickbook 1.5]
+[article Nested Compatibility Test]
+
+[section Duplicate Name]
+[include nested_compatibility-inc-1_5.quickbook]
+[include nested_compatibility-inc-1_6.quickbook]
+[endsect]
+
+[section Duplicate Name]
+[include nested_compatibility-inc-1_5.quickbook]
+[include nested_compatibility-inc-1_6.quickbook]
+[endsect]
diff --git a/src/boost/tools/quickbook/test/include/nested_compatibility-1_6.gold b/src/boost/tools/quickbook/test/include/nested_compatibility-1_6.gold
new file mode 100644
index 000000000..af09a9e87
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/nested_compatibility-1_6.gold
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="nested_compatibility_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Nested Compatibility Test</title>
+ <section id="nested_compatibility_test.duplicate_name">
+ <title><link linkend="nested_compatibility_test.duplicate_name">Duplicate Name</link></title>
+ <section id="nested_compatibility_test.duplicate_name.nested">
+ <title><link linkend="nested_compatibility_test.duplicate_name.nested">Nested
+ Section 1.5</link></title>
+ <bridgehead renderas="sect4" id="nested_compatibility_test.duplicate_name.nested.h0">
+ <phrase id="nested_compatibility_test.duplicate_name.nested.nested_heading_1_5"/><link
+ linkend="nested_compatibility_test.duplicate_name.nested.nested_heading_1_5">Nested
+ Heading 1.5</link>
+ </bridgehead>
+ </section>
+ <section id="nested_compatibility_test.duplicate_name.nested0">
+ <title><link linkend="nested_compatibility_test.duplicate_name.nested0">Nested
+ Section 1.6</link></title>
+ <bridgehead renderas="sect4" id="nested_compatibility_test.duplicate_name.nested0.h0">
+ <phrase id="nested_compatibility_test.duplicate_name.nested0.nested_heading_1_6"/><link
+ linkend="nested_compatibility_test.duplicate_name.nested0.nested_heading_1_6">Nested
+ Heading 1.6</link>
+ </bridgehead>
+ </section>
+ </section>
+ <section id="nested_compatibility_test.duplicate_name0">
+ <title><link linkend="nested_compatibility_test.duplicate_name0">Duplicate Name</link></title>
+ <section id="nested_compatibility_test.duplicate_name0.nested">
+ <title><link linkend="nested_compatibility_test.duplicate_name0.nested">Nested
+ Section 1.5</link></title>
+ <bridgehead renderas="sect4" id="nested_compatibility_test.duplicate_name0.nested.h0">
+ <phrase id="nested_compatibility_test.duplicate_name0.nested.nested_heading_1_5"/><link
+ linkend="nested_compatibility_test.duplicate_name0.nested.nested_heading_1_5">Nested
+ Heading 1.5</link>
+ </bridgehead>
+ </section>
+ <section id="nested_compatibility_test.duplicate_name0.nested0">
+ <title><link linkend="nested_compatibility_test.duplicate_name0.nested0">Nested
+ Section 1.6</link></title>
+ <bridgehead renderas="sect4" id="nested_compatibility_test.duplicate_name0.nested0.h0">
+ <phrase id="nested_compatibility_test.duplicate_name0.nested0.nested_heading_1_6"/><link
+ linkend="nested_compatibility_test.duplicate_name0.nested0.nested_heading_1_6">Nested
+ Heading 1.6</link>
+ </bridgehead>
+ </section>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/include/nested_compatibility-1_6.gold-html b/src/boost/tools/quickbook/test/include/nested_compatibility-1_6.gold-html
new file mode 100644
index 000000000..028e53038
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/nested_compatibility-1_6.gold-html
@@ -0,0 +1,76 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Nested Compatibility Test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#nested_compatibility_test.duplicate_name">Duplicate Name</a>
+ </li>
+ <li>
+ <a href="#nested_compatibility_test.duplicate_name0">Duplicate Name</a>
+ </li>
+ </ul>
+ </div>
+ <div id="nested_compatibility_test.duplicate_name">
+ <h3>
+ Duplicate Name
+ </h3>
+ <div id="nested_compatibility_test.duplicate_name">
+ </div>
+ <div id="nested_compatibility_test.duplicate_name.nested">
+ <h3>
+ Nested Section 1.5
+ </h3>
+ <div id="nested_compatibility_test.duplicate_name.nested">
+ <h4 id="nested_compatibility_test.duplicate_name.nested.nested_heading_1_5">
+ Nested Heading 1.5
+ </h4>
+ </div>
+ </div>
+ <div id="nested_compatibility_test.duplicate_name.nested0">
+ <h3>
+ Nested Section 1.6
+ </h3>
+ <div id="nested_compatibility_test.duplicate_name.nested0">
+ <h4 id="nested_compatibility_test.duplicate_name.nested0.nested_heading_1_6">
+ Nested Heading 1.6
+ </h4>
+ </div>
+ </div>
+ </div>
+ <div id="nested_compatibility_test.duplicate_name0">
+ <h3>
+ Duplicate Name
+ </h3>
+ <div id="nested_compatibility_test.duplicate_name0">
+ </div>
+ <div id="nested_compatibility_test.duplicate_name0.nested">
+ <h3>
+ Nested Section 1.5
+ </h3>
+ <div id="nested_compatibility_test.duplicate_name0.nested">
+ <h4 id="nested_compatibility_test.duplicate_name0.nested.nested_heading_1_5">
+ Nested Heading 1.5
+ </h4>
+ </div>
+ </div>
+ <div id="nested_compatibility_test.duplicate_name0.nested0">
+ <h3>
+ Nested Section 1.6
+ </h3>
+ <div id="nested_compatibility_test.duplicate_name0.nested0">
+ <h4 id="nested_compatibility_test.duplicate_name0.nested0.nested_heading_1_6">
+ Nested Heading 1.6
+ </h4>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/include/nested_compatibility-1_6.quickbook b/src/boost/tools/quickbook/test/include/nested_compatibility-1_6.quickbook
new file mode 100644
index 000000000..8beeb8a06
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/nested_compatibility-1_6.quickbook
@@ -0,0 +1,12 @@
+[quickbook 1.6]
+[article Nested Compatibility Test]
+
+[section Duplicate Name]
+[include nested_compatibility-inc-1_5.quickbook]
+[include nested_compatibility-inc-1_6.quickbook]
+[endsect]
+
+[section Duplicate Name]
+[include nested_compatibility-inc-1_5.quickbook]
+[include nested_compatibility-inc-1_6.quickbook]
+[endsect]
diff --git a/src/boost/tools/quickbook/test/include/nested_compatibility-inc-1_5.quickbook b/src/boost/tools/quickbook/test/include/nested_compatibility-inc-1_5.quickbook
new file mode 100644
index 000000000..3c79855a4
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/nested_compatibility-inc-1_5.quickbook
@@ -0,0 +1,5 @@
+[compatibility-mode 1.5]
+
+[section:nested Nested Section 1.5]
+[heading Nested Heading 1.5]
+[endsect]
diff --git a/src/boost/tools/quickbook/test/include/nested_compatibility-inc-1_6.quickbook b/src/boost/tools/quickbook/test/include/nested_compatibility-inc-1_6.quickbook
new file mode 100644
index 000000000..d0790840c
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/nested_compatibility-inc-1_6.quickbook
@@ -0,0 +1,5 @@
+[compatibility-mode 1.6]
+
+[section:nested Nested Section 1.6]
+[heading Nested Heading 1.6]
+[endsect]
diff --git a/src/boost/tools/quickbook/test/include/section-fail1.quickbook b/src/boost/tools/quickbook/test/include/section-fail1.quickbook
new file mode 100644
index 000000000..ea75783e0
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/section-fail1.quickbook
@@ -0,0 +1,6 @@
+[article Include Section Test
+[quickbook 1.5]
+]
+
+[include section-inc2.quickbook]
+[include section-inc1.quickbook]
diff --git a/src/boost/tools/quickbook/test/include/section-fail2.quickbook b/src/boost/tools/quickbook/test/include/section-fail2.quickbook
new file mode 100644
index 000000000..26a481104
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/section-fail2.quickbook
@@ -0,0 +1,5 @@
+[article Include Section Test
+[quickbook 1.5]
+]
+
+[include section-inc2.quickbook]
diff --git a/src/boost/tools/quickbook/test/include/section-inc1.quickbook b/src/boost/tools/quickbook/test/include/section-inc1.quickbook
new file mode 100644
index 000000000..9c3fdd824
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/section-inc1.quickbook
@@ -0,0 +1 @@
+[section Mulitple file section]
diff --git a/src/boost/tools/quickbook/test/include/section-inc2.quickbook b/src/boost/tools/quickbook/test/include/section-inc2.quickbook
new file mode 100644
index 000000000..8acc6a502
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/section-inc2.quickbook
@@ -0,0 +1 @@
+[endsect]
diff --git a/src/boost/tools/quickbook/test/include/section-unclosed.gold b/src/boost/tools/quickbook/test/include/section-unclosed.gold
new file mode 100644
index 000000000..bea5cea67
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/section-unclosed.gold
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="include_section_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include Section Test</title>
+ <section id="include_section_test.mulitple_file_section">
+ <title><link linkend="include_section_test.mulitple_file_section">Mulitple file
+ section</link></title>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/include/section-unclosed.gold-html b/src/boost/tools/quickbook/test/include/section-unclosed.gold-html
new file mode 100644
index 000000000..efbdd708a
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/section-unclosed.gold-html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Include Section Test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#include_section_test.mulitple_file_section">Mulitple file section</a>
+ </li>
+ </ul>
+ </div>
+ <div id="include_section_test.mulitple_file_section">
+ <h3>
+ Mulitple file section
+ </h3>
+ <div id="include_section_test.mulitple_file_section">
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/include/section-unclosed.quickbook b/src/boost/tools/quickbook/test/include/section-unclosed.quickbook
new file mode 100644
index 000000000..290cd1633
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/section-unclosed.quickbook
@@ -0,0 +1,5 @@
+[article Include Section Test
+[quickbook 1.5]
+]
+
+[include section-inc1.quickbook]
diff --git a/src/boost/tools/quickbook/test/include/section.gold b/src/boost/tools/quickbook/test/include/section.gold
new file mode 100644
index 000000000..bea5cea67
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/section.gold
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="include_section_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include Section Test</title>
+ <section id="include_section_test.mulitple_file_section">
+ <title><link linkend="include_section_test.mulitple_file_section">Mulitple file
+ section</link></title>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/include/section.gold-html b/src/boost/tools/quickbook/test/include/section.gold-html
new file mode 100644
index 000000000..efbdd708a
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/section.gold-html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Include Section Test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#include_section_test.mulitple_file_section">Mulitple file section</a>
+ </li>
+ </ul>
+ </div>
+ <div id="include_section_test.mulitple_file_section">
+ <h3>
+ Mulitple file section
+ </h3>
+ <div id="include_section_test.mulitple_file_section">
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/include/section.quickbook b/src/boost/tools/quickbook/test/include/section.quickbook
new file mode 100644
index 000000000..a570b3524
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/section.quickbook
@@ -0,0 +1,6 @@
+[article Include Section Test
+[quickbook 1.5]
+]
+
+[include section-inc1.quickbook]
+[include section-inc2.quickbook]
diff --git a/src/boost/tools/quickbook/test/include/source_mode-1_5.gold b/src/boost/tools/quickbook/test/include/source_mode-1_5.gold
new file mode 100644
index 000000000..2ed6b7fee
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/source_mode-1_5.gold
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="souce_mode_include_" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Souce Mode Include</title>
+<programlisting>void main() {}</programlisting>
+<programlisting>void main() {}
+</programlisting>
+</article>
diff --git a/src/boost/tools/quickbook/test/include/source_mode-1_5.gold-html b/src/boost/tools/quickbook/test/include/source_mode-1_5.gold-html
new file mode 100644
index 000000000..8781356e2
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/source_mode-1_5.gold-html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Souce Mode Include
+ </h3>
+<pre class="programlisting">void main() {}</pre>
+<pre class="programlisting">void main() {}
+</pre>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/include/source_mode-1_5.quickbook b/src/boost/tools/quickbook/test/include/source_mode-1_5.quickbook
new file mode 100644
index 000000000..d5df05bd4
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/source_mode-1_5.quickbook
@@ -0,0 +1,4 @@
+[article Souce Mode Include [source-mode teletype][quickbook 1.5]]
+
+[include source_mode-inc1.quickbook]
+[include source_mode-inc2.quickbook]
diff --git a/src/boost/tools/quickbook/test/include/source_mode-1_6.gold b/src/boost/tools/quickbook/test/include/source_mode-1_6.gold
new file mode 100644
index 000000000..aa01d2057
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/source_mode-1_6.gold
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="souce_mode_include" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Souce Mode Include</title>
+ <article id="source_include_with_no_source_mode" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Source include with no source-mode</title>
+<programlisting><phrase role="keyword">void</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ </article>
+<programlisting>void main() {}
+</programlisting>
+</article>
diff --git a/src/boost/tools/quickbook/test/include/source_mode-1_6.gold-html b/src/boost/tools/quickbook/test/include/source_mode-1_6.gold-html
new file mode 100644
index 000000000..c41dbbe70
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/source_mode-1_6.gold-html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Souce Mode Include
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#source_include_with_no_source_mode">Source include with no source-mode</a>
+ </li>
+ </ul>
+ </div>
+<pre class="programlisting">void main() {}
+</pre>
+ <div id="source_include_with_no_source_mode">
+ <h3>
+ Source include with no source-mode
+ </h3>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span></pre>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/include/source_mode-1_6.quickbook b/src/boost/tools/quickbook/test/include/source_mode-1_6.quickbook
new file mode 100644
index 000000000..fc4243f3b
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/source_mode-1_6.quickbook
@@ -0,0 +1,5 @@
+[source-mode teletype][quickbook 1.6]
+[article Souce Mode Include]
+
+[include source_mode-inc1.quickbook]
+[include source_mode-inc2.quickbook]
diff --git a/src/boost/tools/quickbook/test/include/source_mode-inc1.quickbook b/src/boost/tools/quickbook/test/include/source_mode-inc1.quickbook
new file mode 100644
index 000000000..3cefbe6bc
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/source_mode-inc1.quickbook
@@ -0,0 +1,3 @@
+[article Source include with no source-mode]
+
+ void main() {} \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/include/source_mode-inc2.quickbook b/src/boost/tools/quickbook/test/include/source_mode-inc2.quickbook
new file mode 100644
index 000000000..81dba8a17
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/source_mode-inc2.quickbook
@@ -0,0 +1,3 @@
+[/ Source include with no source-mode, and no docinfo.]
+
+ void main() {}
diff --git a/src/boost/tools/quickbook/test/include/sub/filename_include1.quickbook b/src/boost/tools/quickbook/test/include/sub/filename_include1.quickbook
new file mode 100644
index 000000000..6c57614d5
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/sub/filename_include1.quickbook
@@ -0,0 +1,3 @@
+__FILENAME__
+
+[include ../filename_include2.quickbook] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/include/template_include-1_7.gold b/src/boost/tools/quickbook/test/include/template_include-1_7.gold
new file mode 100644
index 000000000..163ff30ee
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/template_include-1_7.gold
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="template_include_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Template include test</title>
+ <bridgehead renderas="sect2" id="template_include_test.h0">
+ <phrase id="template_include_test.simple_include"/><link linkend="template_include_test.simple_include">Simple
+ include</link>
+ </bridgehead>
+<programlisting><phrase role="keyword">void</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase>
+</programlisting>
+</article>
diff --git a/src/boost/tools/quickbook/test/include/template_include-1_7.gold-html b/src/boost/tools/quickbook/test/include/template_include-1_7.gold-html
new file mode 100644
index 000000000..fdd7ff8c5
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/template_include-1_7.gold-html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Template include test
+ </h3>
+ <h2 id="template_include_test.simple_include">
+ Simple include
+ </h2>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span>
+</pre>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/include/template_include-1_7.quickbook b/src/boost/tools/quickbook/test/include/template_include-1_7.quickbook
new file mode 100644
index 000000000..19f58fab0
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/template_include-1_7.quickbook
@@ -0,0 +1,8 @@
+[article Template include test
+[quickbook 1.7]
+]
+
+[template include_foo[name] [include [name].quickbook]]
+
+[include_foo include-id-inc1]
+[include_foo source_mode-inc2]
diff --git a/src/boost/tools/quickbook/test/include/templates-1.5.gold b/src/boost/tools/quickbook/test/include/templates-1.5.gold
new file mode 100644
index 000000000..7d7e5dd60
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/templates-1.5.gold
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="templates_1_5" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Templates 1.5</title>
+ <para>
+ Inline:templates-inc1.quickbook
+ </para>
+ <para>
+ Foo:templates-1.5.quickbook
+ </para>
+</article>
diff --git a/src/boost/tools/quickbook/test/include/templates-1.5.gold-html b/src/boost/tools/quickbook/test/include/templates-1.5.gold-html
new file mode 100644
index 000000000..c773637b6
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/templates-1.5.gold-html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Templates 1.5
+ </h3>
+ <p>
+ Inline:templates-inc1.quickbook
+ </p>
+ <p>
+ Foo:templates-1.5.quickbook
+ </p>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/include/templates-1.5.quickbook b/src/boost/tools/quickbook/test/include/templates-1.5.quickbook
new file mode 100644
index 000000000..5104ae6fa
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/templates-1.5.quickbook
@@ -0,0 +1,7 @@
+[article Templates 1.5
+[quickbook 1.5]
+]
+
+[include templates-inc1.quickbook]
+
+[foo] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/include/templates-1.6.gold b/src/boost/tools/quickbook/test/include/templates-1.6.gold
new file mode 100644
index 000000000..4e37e5e64
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/templates-1.6.gold
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="templates_1_6" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Templates 1.6</title>
+ <para>
+ Inline:templates-inc1.quickbook
+ </para>
+ <para>
+ [foo]
+ </para>
+ <para>
+ Foo:templates-1.6.quickbook
+ </para>
+</article>
diff --git a/src/boost/tools/quickbook/test/include/templates-1.6.gold-html b/src/boost/tools/quickbook/test/include/templates-1.6.gold-html
new file mode 100644
index 000000000..362390d93
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/templates-1.6.gold-html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Templates 1.6
+ </h3>
+ <p>
+ Inline:templates-inc1.quickbook
+ </p>
+ <p>
+ [foo]
+ </p>
+ <p>
+ Foo:templates-1.6.quickbook
+ </p>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/include/templates-1.6.quickbook b/src/boost/tools/quickbook/test/include/templates-1.6.quickbook
new file mode 100644
index 000000000..77d821e4c
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/templates-1.6.quickbook
@@ -0,0 +1,11 @@
+[article Templates 1.6
+[quickbook 1.6]
+]
+
+[include templates-inc1.quickbook]
+
+[foo]
+
+[import templates-inc1.quickbook]
+
+[foo]
diff --git a/src/boost/tools/quickbook/test/include/templates-inc1.quickbook b/src/boost/tools/quickbook/test/include/templates-inc1.quickbook
new file mode 100644
index 000000000..70574627c
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include/templates-inc1.quickbook
@@ -0,0 +1,4 @@
+Inline:__FILENAME__
+
+[template foo Foo:__FILENAME__]
+
diff --git a/src/boost/tools/quickbook/test/include2-1_6.gold b/src/boost/tools/quickbook/test/include2-1_6.gold
new file mode 100644
index 000000000..f46759b78
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include2-1_6.gold
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="include-test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include Test</title>
+ <article id="include-sub" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include Test Sub Document</title>
+ </article>
+ <section id="include-test.test">
+ <title><link linkend="include-test.test">Test</link></title>
+ <para>
+ Just testing.
+ </para>
+ </section>
+ <section id="foo.test">
+ <title><link linkend="foo.test">Test</link></title>
+ <para>
+ Just testing.
+ </para>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/include2-1_6.gold-html b/src/boost/tools/quickbook/test/include2-1_6.gold-html
new file mode 100644
index 000000000..6d96cfa32
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include2-1_6.gold-html
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Include Test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#include-sub">Include Test Sub Document</a>
+ </li>
+ <li>
+ <a href="#include-test.test">Test</a>
+ </li>
+ <li>
+ <a href="#foo.test">Test</a>
+ </li>
+ </ul>
+ </div>
+ <div id="include-sub">
+ <h3>
+ Include Test Sub Document
+ </h3>
+ </div>
+ <div id="include-test.test">
+ <h3>
+ Test
+ </h3>
+ <div id="include-test.test">
+ <p>
+ Just testing.
+ </p>
+ </div>
+ </div>
+ <div id="foo.test">
+ <h3>
+ Test
+ </h3>
+ <div id="foo.test">
+ <p>
+ Just testing.
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/include2-1_6.quickbook b/src/boost/tools/quickbook/test/include2-1_6.quickbook
new file mode 100644
index 000000000..66b4897ef
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include2-1_6.quickbook
@@ -0,0 +1,8 @@
+[article Include Test
+ [quickbook 1.6]
+ [id include-test]
+]
+
+[include include-inc-1_5.quickbook]
+[include include-inc.quickbook]
+[include:foo include-inc.quickbook]
diff --git a/src/boost/tools/quickbook/test/include_invalid_path1-1_7-fail.quickbook b/src/boost/tools/quickbook/test/include_invalid_path1-1_7-fail.quickbook
new file mode 100644
index 000000000..fa7e8e337
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include_invalid_path1-1_7-fail.quickbook
@@ -0,0 +1,5 @@
+[article Include invalid path fail
+[quickbook 1.7]
+]
+
+[include .\\\/empty-inc.quickbook]
diff --git a/src/boost/tools/quickbook/test/include_invalid_path2-1_7-fail.quickbook b/src/boost/tools/quickbook/test/include_invalid_path2-1_7-fail.quickbook
new file mode 100644
index 000000000..4f2672840
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include_invalid_path2-1_7-fail.quickbook
@@ -0,0 +1,5 @@
+[article Include invalid path fail
+[quickbook 1.7]
+]
+
+[include .\\\\empty-inc.quickbook]
diff --git a/src/boost/tools/quickbook/test/include_invalid_path3-1_7-fail.quickbook b/src/boost/tools/quickbook/test/include_invalid_path3-1_7-fail.quickbook
new file mode 100644
index 000000000..5c99c1143
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include_invalid_path3-1_7-fail.quickbook
@@ -0,0 +1,5 @@
+[article Include invalid path fail
+[quickbook 1.7]
+]
+
+[include empty\[-/\]inc.quickbook]
diff --git a/src/boost/tools/quickbook/test/include_unicode_glob-1_7-fail.quickbook b/src/boost/tools/quickbook/test/include_unicode_glob-1_7-fail.quickbook
new file mode 100644
index 000000000..79a9df667
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include_unicode_glob-1_7-fail.quickbook
@@ -0,0 +1,5 @@
+[article Unicode glob
+[quickbook 1.7]
+]
+
+[include £*.quickbook]
diff --git a/src/boost/tools/quickbook/test/include_win_path-1_6-fail.quickbook b/src/boost/tools/quickbook/test/include_win_path-1_6-fail.quickbook
new file mode 100644
index 000000000..aff5fd2c3
--- /dev/null
+++ b/src/boost/tools/quickbook/test/include_win_path-1_6-fail.quickbook
@@ -0,0 +1,5 @@
+[article Include fail for windows path.
+[quickbook 1.6]
+]
+
+[include .\empty-inc.quickbook]
diff --git a/src/boost/tools/quickbook/test/link-1_1.gold b/src/boost/tools/quickbook/test/link-1_1.gold
new file mode 100644
index 000000000..955fdec76
--- /dev/null
+++ b/src/boost/tools/quickbook/test/link-1_1.gold
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="link_tests" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Link tests</title>
+ <section id="link_tests.different_types_of_links">
+ <title>Different types of links</title>
+ <para>
+ <ulink url="http://www.boost.org/">http://www.boost.org/</ulink> <ulink url="http://www.boost.org/">Boost</ulink>
+ <link linkend="link-id">link-id</link> <link linkend="link-id">Link Text</link>
+ <anchor id="link-id"/><functionname alt="foo">foo</functionname> <functionname
+ alt="foo">link text</functionname> <classname alt="foo">foo</classname> <classname
+ alt="foo">link text</classname> <methodname alt="foo">foo</methodname> <methodname
+ alt="foo">link text</methodname> <enumname alt="foo">foo</enumname> <enumname
+ alt="foo">link text</enumname> <macroname alt="foo">foo</macroname> <macroname
+ alt="foo">link text</macroname> <headername alt="foo">foo</headername> <headername
+ alt="foo">link text</headername> <conceptname alt="foo">foo</conceptname>
+ <conceptname alt="foo">link text</conceptname> <globalname alt="foo">foo</globalname>
+ <globalname alt="foo">link text</globalname>
+ </para>
+ <para>
+ <link linkend="link">description</link>
+ </para>
+ </section>
+ <section id="link_tests.side_by_side_links">
+ <title>Side-by-side links</title>
+ <para>
+ <link linkend="x">x</link> and <link linkend="y">y</link> are two distinct
+ links, which should be separated by whitespace when they appear together as
+ in <link linkend="x">x</link> <link linkend="y">y</link>. Also in <link linkend="x">x</link>
+ <link linkend="y">y</link>, and in <link linkend="x">x</link> <link linkend="y">y</link>
+ as well.
+ </para>
+ </section>
+ <section id="link_tests.escaping_links">
+ <title>Escaping links</title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ <ulink url="http://svn.boost.org/trac/boost/query?status=closed&amp;milestone=Boost+1.34.1">Boost
+ Trac</ulink>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/link-1_1.gold-html b/src/boost/tools/quickbook/test/link-1_1.gold-html
new file mode 100644
index 000000000..92ac75b4e
--- /dev/null
+++ b/src/boost/tools/quickbook/test/link-1_1.gold-html
@@ -0,0 +1,68 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Link tests
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#link_tests.different_types_of_links">Different types of links</a>
+ </li>
+ <li>
+ <a href="#link_tests.side_by_side_links">Side-by-side links</a>
+ </li>
+ <li>
+ <a href="#link_tests.escaping_links">Escaping links</a>
+ </li>
+ </ul>
+ </div>
+ <div id="link_tests.different_types_of_links">
+ <h3>
+ Different types of links
+ </h3>
+ <div id="link_tests.different_types_of_links">
+ <p>
+ <a href="http://www.boost.org/">http://www.boost.org/</a> <a href="http://www.boost.org/">Boost</a>
+ <a href="#link-id">link-id</a> <a href="#link-id">Link Text</a> <span id="link-id"></span>foo
+ link text <code>foo</code> <code>link text</code> foo link text foo link
+ text foo link text foo link text foo link text foo link text
+ </p>
+ <p>
+ <a>description</a>
+ </p>
+ </div>
+ </div>
+ <div id="link_tests.side_by_side_links">
+ <h3>
+ Side-by-side links
+ </h3>
+ <div id="link_tests.side_by_side_links">
+ <p>
+ <a>x</a> and <a>y</a> are two distinct links, which should be separated
+ by whitespace when they appear together as in <a>x</a> <a>y</a>. Also in
+ <a>x</a> <a>y</a>, and in <a>x</a> <a>y</a> as well.
+ </p>
+ </div>
+ </div>
+ <div id="link_tests.escaping_links">
+ <h3>
+ Escaping links
+ </h3>
+ <div id="link_tests.escaping_links">
+ <ul>
+ <li>
+ <div>
+ <a href="http://svn.boost.org/trac/boost/query?status=closed&amp;milestone=Boost+1.34.1">Boost
+ Trac</a>
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/link-1_1.quickbook b/src/boost/tools/quickbook/test/link-1_1.quickbook
new file mode 100644
index 000000000..a22ce70f0
--- /dev/null
+++ b/src/boost/tools/quickbook/test/link-1_1.quickbook
@@ -0,0 +1,48 @@
+[article Link tests
+]
+
+[section Different types of links]
+
+[@http://www.boost.org/]
+[@ http://www.boost.org/ Boost]
+[link link-id]
+[link link-id Link Text]
+[#link-id]
+[funcref foo]
+[funcref foo link text]
+[classref foo]
+[classref foo link text]
+[memberref foo]
+[memberref foo link text]
+[enumref foo]
+[enumref foo link text]
+[macroref foo]
+[macroref foo link text]
+[headerref foo]
+[headerref foo link text]
+[conceptref foo]
+[conceptref foo link text]
+[globalref foo]
+[globalref foo link text]
+
+[link link[/ comment]description]
+
+[endsect]
+
+[section Side-by-side links]
+
+[link x] and [link y] are two distinct links, which should be separated by
+whitespace when they appear together as in [link x] [link y]. Also in [link x]
+[link y], and in
+[link x]
+[link y]
+as well.
+
+[endsect]
+
+[section Escaping links]
+
+* [@http://svn.boost.org/trac/boost/query?status=closed&milestone=Boost+1.34.1
+ Boost Trac]
+
+[endsect]
diff --git a/src/boost/tools/quickbook/test/link-1_6.gold b/src/boost/tools/quickbook/test/link-1_6.gold
new file mode 100644
index 000000000..587b67be3
--- /dev/null
+++ b/src/boost/tools/quickbook/test/link-1_6.gold
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="link_tests" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Link tests</title>
+ <section id="link_tests.different_types_of_links">
+ <title><link linkend="link_tests.different_types_of_links">Different types of
+ links</link></title>
+ <para>
+ <ulink url="http://www.boost.org/">http://www.boost.org/</ulink> <ulink url="http://www.boost.org/">Boost</ulink>
+ <link linkend="link-id">link-id</link> <link linkend="link-id">Link Text</link>
+ <anchor id="link-id"/><functionname alt="foo">foo</functionname> <functionname
+ alt="foo">link text</functionname> <classname alt="foo">foo</classname> <classname
+ alt="foo">link text</classname> <methodname alt="foo">foo</methodname> <methodname
+ alt="foo">link text</methodname> <enumname alt="foo">foo</enumname> <enumname
+ alt="foo">link text</enumname> <macroname alt="foo">foo</macroname> <macroname
+ alt="foo">link text</macroname> <headername alt="foo">foo</headername> <headername
+ alt="foo">link text</headername> <conceptname alt="foo">foo</conceptname>
+ <conceptname alt="foo">link text</conceptname> <globalname alt="foo">foo</globalname>
+ <globalname alt="foo">link text</globalname>
+ </para>
+ <para>
+ <link linkend="link">description</link>
+ </para>
+ <para>
+ <link linkend="link[Hello]">description</link>
+ </para>
+ </section>
+ <section id="link_tests.side_by_side_links">
+ <title><link linkend="link_tests.side_by_side_links">Side-by-side links</link></title>
+ <para>
+ <link linkend="x">x</link> and <link linkend="y">y</link> are two distinct
+ links, which should be separated by whitespace when they appear together as
+ in <link linkend="x">x</link> <link linkend="y">y</link>. Also in <link linkend="x">x</link>
+ <link linkend="y">y</link>, and in <link linkend="x">x</link> <link linkend="y">y</link>
+ as well.
+ </para>
+ </section>
+ <section id="link_tests.escaping_links">
+ <title><link linkend="link_tests.escaping_links">Escaping links</link></title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ <ulink url="http://svn.boost.org/trac/boost/query?status=closed&amp;milestone=Boost+1.34.1">Boost
+ Trac</ulink>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/link-1_6.gold-html b/src/boost/tools/quickbook/test/link-1_6.gold-html
new file mode 100644
index 000000000..f8f9b1a2b
--- /dev/null
+++ b/src/boost/tools/quickbook/test/link-1_6.gold-html
@@ -0,0 +1,71 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Link tests
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#link_tests.different_types_of_links">Different types of links</a>
+ </li>
+ <li>
+ <a href="#link_tests.side_by_side_links">Side-by-side links</a>
+ </li>
+ <li>
+ <a href="#link_tests.escaping_links">Escaping links</a>
+ </li>
+ </ul>
+ </div>
+ <div id="link_tests.different_types_of_links">
+ <h3>
+ Different types of links
+ </h3>
+ <div id="link_tests.different_types_of_links">
+ <p>
+ <a href="http://www.boost.org/">http://www.boost.org/</a> <a href="http://www.boost.org/">Boost</a>
+ <a href="#link-id">link-id</a> <a href="#link-id">Link Text</a> <span id="link-id"></span>foo
+ link text <code>foo</code> <code>link text</code> foo link text foo link
+ text foo link text foo link text foo link text foo link text
+ </p>
+ <p>
+ <a>description</a>
+ </p>
+ <p>
+ <a>description</a>
+ </p>
+ </div>
+ </div>
+ <div id="link_tests.side_by_side_links">
+ <h3>
+ Side-by-side links
+ </h3>
+ <div id="link_tests.side_by_side_links">
+ <p>
+ <a>x</a> and <a>y</a> are two distinct links, which should be separated
+ by whitespace when they appear together as in <a>x</a> <a>y</a>. Also in
+ <a>x</a> <a>y</a>, and in <a>x</a> <a>y</a> as well.
+ </p>
+ </div>
+ </div>
+ <div id="link_tests.escaping_links">
+ <h3>
+ Escaping links
+ </h3>
+ <div id="link_tests.escaping_links">
+ <ul>
+ <li>
+ <div>
+ <a href="http://svn.boost.org/trac/boost/query?status=closed&amp;milestone=Boost+1.34.1">Boost
+ Trac</a>
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/link-1_6.quickbook b/src/boost/tools/quickbook/test/link-1_6.quickbook
new file mode 100644
index 000000000..c874a79c6
--- /dev/null
+++ b/src/boost/tools/quickbook/test/link-1_6.quickbook
@@ -0,0 +1,52 @@
+[article Link tests
+[quickbook 1.6]
+]
+
+[section Different types of links]
+
+[@http://www.boost.org/]
+[@ http://www.boost.org/ Boost]
+[link link-id]
+[link link-id Link Text]
+[#link-id]
+[funcref foo]
+[funcref foo link text]
+[classref foo]
+[classref foo link text]
+[memberref foo]
+[memberref foo link text]
+[enumref foo]
+[enumref foo link text]
+[macroref foo]
+[macroref foo link text]
+[headerref foo]
+[headerref foo link text]
+[conceptref foo]
+[conceptref foo link text]
+[globalref foo]
+[globalref foo link text]
+
+[link link[/ comment]description]
+
+[link link\[Hello\] description]
+
+
+[endsect]
+
+[section Side-by-side links]
+
+[link x] and [link y] are two distinct links, which should be separated by
+whitespace when they appear together as in [link x] [link y]. Also in [link x]
+[link y], and in
+[link x]
+[link y]
+as well.
+
+[endsect]
+
+[section Escaping links]
+
+* [@http://svn.boost.org/trac/boost/query?status=closed&milestone=Boost+1.34.1
+ Boost Trac]
+
+[endsect]
diff --git a/src/boost/tools/quickbook/test/link-1_7-fail.quickbook b/src/boost/tools/quickbook/test/link-1_7-fail.quickbook
new file mode 100644
index 000000000..9f2db1fb1
--- /dev/null
+++ b/src/boost/tools/quickbook/test/link-1_7-fail.quickbook
@@ -0,0 +1,5 @@
+[article Link fail test
+[quickbook 1.7]
+]
+
+[link something [table]]
diff --git a/src/boost/tools/quickbook/test/link-1_7-fail2.quickbook b/src/boost/tools/quickbook/test/link-1_7-fail2.quickbook
new file mode 100644
index 000000000..30ac49570
--- /dev/null
+++ b/src/boost/tools/quickbook/test/link-1_7-fail2.quickbook
@@ -0,0 +1,6 @@
+[article Link fail test
+[quickbook 1.7]
+]
+
+[/ Escapes aren't allowed in links.]
+[link '''escaped stuff''']
diff --git a/src/boost/tools/quickbook/test/link-1_7.gold b/src/boost/tools/quickbook/test/link-1_7.gold
new file mode 100644
index 000000000..c2e5f0398
--- /dev/null
+++ b/src/boost/tools/quickbook/test/link-1_7.gold
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="link_tests" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Link tests</title>
+ <section id="link_tests.different_types_of_links">
+ <title><link linkend="link_tests.different_types_of_links">Different types of
+ links</link></title>
+ <para>
+ <ulink url="http://www.boost.org/">http://www.boost.org/</ulink> <ulink url="http://www.boost.org/">Boost</ulink>
+ <link linkend="link-id">link-id</link> <link linkend="link-id">Link Text</link>
+ <anchor id="link-id"/><functionname alt="foo">foo</functionname> <functionname
+ alt="foo">link text</functionname> <classname alt="foo">foo</classname> <classname
+ alt="foo">link text</classname> <methodname alt="foo">foo</methodname> <methodname
+ alt="foo">link text</methodname> <enumname alt="foo">foo</enumname> <enumname
+ alt="foo">link text</enumname> <macroname alt="foo">foo</macroname> <macroname
+ alt="foo">link text</macroname> <headername alt="foo">foo</headername> <headername
+ alt="foo">link text</headername> <conceptname alt="foo">foo</conceptname>
+ <conceptname alt="foo">link text</conceptname> <globalname alt="foo">foo</globalname>
+ <globalname alt="foo">link text</globalname>
+ </para>
+ <para>
+ <link linkend="link">description</link>
+ </para>
+ </section>
+ <section id="link_tests.side_by_side_links">
+ <title><link linkend="link_tests.side_by_side_links">Side-by-side links</link></title>
+ <para>
+ <link linkend="x">x</link> and <link linkend="y">y</link> are two distinct
+ links, which should be separated by whitespace when they appear together as
+ in <link linkend="x">x</link> <link linkend="y">y</link>. Also in <link linkend="x">x</link>
+ <link linkend="y">y</link>, and in <link linkend="x">x</link> <link linkend="y">y</link>
+ as well.
+ </para>
+ </section>
+ <section id="link_tests.templates_is_links">
+ <title><link linkend="link_tests.templates_is_links">Templates is links....</link></title>
+ <para>
+ <link linkend="blah.x2">Templated link?</link>
+ </para>
+ <para>
+ <link linkend="something-one-two">something-one-two</link> <link linkend="something-one-two">something-one-two</link>
+ <link linkend="something-one-two">something-one-two</link>
+ </para>
+ </section>
+ <section id="link_tests.escaping_links">
+ <title><link linkend="link_tests.escaping_links">Escaping links</link></title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ <ulink url="http://svn.boost.org/trac/boost/query?status=closed&amp;milestone=Boost+1.34.1">Boost
+ Trac</ulink>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/link-1_7.gold-html b/src/boost/tools/quickbook/test/link-1_7.gold-html
new file mode 100644
index 000000000..797e6a769
--- /dev/null
+++ b/src/boost/tools/quickbook/test/link-1_7.gold-html
@@ -0,0 +1,84 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Link tests
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#link_tests.different_types_of_links">Different types of links</a>
+ </li>
+ <li>
+ <a href="#link_tests.side_by_side_links">Side-by-side links</a>
+ </li>
+ <li>
+ <a href="#link_tests.templates_is_links">Templates is links....</a>
+ </li>
+ <li>
+ <a href="#link_tests.escaping_links">Escaping links</a>
+ </li>
+ </ul>
+ </div>
+ <div id="link_tests.different_types_of_links">
+ <h3>
+ Different types of links
+ </h3>
+ <div id="link_tests.different_types_of_links">
+ <p>
+ <a href="http://www.boost.org/">http://www.boost.org/</a> <a href="http://www.boost.org/">Boost</a>
+ <a href="#link-id">link-id</a> <a href="#link-id">Link Text</a> <span id="link-id"></span>foo
+ link text <code>foo</code> <code>link text</code> foo link text foo link
+ text foo link text foo link text foo link text foo link text
+ </p>
+ <p>
+ <a>description</a>
+ </p>
+ </div>
+ </div>
+ <div id="link_tests.side_by_side_links">
+ <h3>
+ Side-by-side links
+ </h3>
+ <div id="link_tests.side_by_side_links">
+ <p>
+ <a>x</a> and <a>y</a> are two distinct links, which should be separated
+ by whitespace when they appear together as in <a>x</a> <a>y</a>. Also in
+ <a>x</a> <a>y</a>, and in <a>x</a> <a>y</a> as well.
+ </p>
+ </div>
+ </div>
+ <div id="link_tests.templates_is_links">
+ <h3>
+ Templates is links....
+ </h3>
+ <div id="link_tests.templates_is_links">
+ <p>
+ <a>Templated link?</a>
+ </p>
+ <p>
+ <a>something-one-two</a> <a>something-one-two</a> <a>something-one-two</a>
+ </p>
+ </div>
+ </div>
+ <div id="link_tests.escaping_links">
+ <h3>
+ Escaping links
+ </h3>
+ <div id="link_tests.escaping_links">
+ <ul>
+ <li>
+ <div>
+ <a href="http://svn.boost.org/trac/boost/query?status=closed&amp;milestone=Boost+1.34.1">Boost
+ Trac</a>
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/link-1_7.quickbook b/src/boost/tools/quickbook/test/link-1_7.quickbook
new file mode 100644
index 000000000..acfba3188
--- /dev/null
+++ b/src/boost/tools/quickbook/test/link-1_7.quickbook
@@ -0,0 +1,61 @@
+[article Link tests
+[quickbook 1.7]
+]
+
+[section Different types of links]
+
+[@http://www.boost.org/]
+[@ http://www.boost.org/ Boost]
+[link link-id]
+[link link-id Link Text]
+[#link-id]
+[funcref foo]
+[funcref foo link text]
+[classref foo]
+[classref foo link text]
+[memberref foo]
+[memberref foo link text]
+[enumref foo]
+[enumref foo link text]
+[macroref foo]
+[macroref foo link text]
+[headerref foo]
+[headerref foo link text]
+[conceptref foo]
+[conceptref foo link text]
+[globalref foo]
+[globalref foo link text]
+
+[link link[/ comment]description]
+
+[endsect]
+
+[section Side-by-side links]
+
+[link x] and [link y] are two distinct links, which should be separated by
+whitespace when they appear together as in [link x] [link y]. Also in [link x]
+[link y], and in
+[link x]
+[link y]
+as well.
+
+[endsect]
+
+[section Templates is links....]
+
+[template thing[]x]
+[link blah.[thing]2 Templated link?]
+
+[template link_in_template[x y] [link something-[x]-[y]]]
+[link_in_template one two]
+[link_in_template one..two]
+[link_in_template one .. two ]
+
+[endsect]
+
+[section Escaping links]
+
+* [@http://svn.boost.org/trac/boost/query?status=closed&milestone=Boost+1.34.1
+ Boost Trac]
+
+[endsect]
diff --git a/src/boost/tools/quickbook/test/list_test-1_5.gold b/src/boost/tools/quickbook/test/list_test-1_5.gold
new file mode 100644
index 000000000..4d25aa7cc
--- /dev/null
+++ b/src/boost/tools/quickbook/test/list_test-1_5.gold
@@ -0,0 +1,402 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="list_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>List Test</title>
+ <para>
+ Simple list:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Simple list:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </orderedlist>
+ <para>
+ Two level list:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Two level list:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ A
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </orderedlist>
+ <para>
+ Three level list:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ A
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ C
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ D
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ E
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ F
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ G
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ H
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </orderedlist>
+ <para>
+ Three level list:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ A
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ <orderedlist>
+ <listitem>
+ <simpara>
+ C
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ D
+ </simpara>
+ </listitem>
+ </orderedlist>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ G
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ H
+ </simpara>
+ </listitem>
+ </orderedlist>
+ <para>
+ Inconsistent Indentation:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A1
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ B1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B2
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ C1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ C2
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B3
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B4
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B5
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ C3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B6
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Markup in list:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ <emphasis role="bold">Bold</emphasis>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <emphasis role="bold">Bold</emphasis>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <quote>Quoted</quote>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <footnote id="list_test.f0">
+ <para>
+ Footnote
+ </para>
+ </footnote>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Don't end list with comment 1:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A3
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A4
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Don't end list with comment 2:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A1
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ B1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <section id="list_test.list_immediately_following_markup">
+ <title><link linkend="list_test.list_immediately_following_markup">List immediately
+ following markup</link></title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ One
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Two
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Three
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="list_test.list_immediately_following_markup_2">
+ <title><link linkend="list_test.list_immediately_following_markup_2">List immediately
+ following markup 2</link></title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ One [section Nested section]
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Two [endsect]
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/list_test-1_5.gold-html b/src/boost/tools/quickbook/test/list_test-1_5.gold-html
new file mode 100644
index 000000000..6c599de4f
--- /dev/null
+++ b/src/boost/tools/quickbook/test/list_test-1_5.gold-html
@@ -0,0 +1,432 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ List Test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#list_test.list_immediately_following_markup">List immediately
+ following markup</a>
+ </li>
+ <li>
+ <a href="#list_test.list_immediately_following_markup_2">List immediately
+ following markup 2</a>
+ </li>
+ </ul>
+ </div>
+ <p>
+ Simple list:
+ </p>
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ </div>
+ </li>
+ </ul>
+ <p>
+ Simple list:
+ </p>
+ <ol>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ </div>
+ </li>
+ </ol>
+ <p>
+ Two level list:
+ </p>
+ <ul>
+ <li>
+ <div>
+ A
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ </ul>
+ <p>
+ Two level list:
+ </p>
+ <ol>
+ <li>
+ <div>
+ A
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ </ol>
+ <p>
+ Three level list:
+ </p>
+ <ol>
+ <li>
+ <div>
+ A
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ <ul>
+ <li>
+ <div>
+ C
+ </div>
+ </li>
+ <li>
+ <div>
+ D
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ E
+ </div>
+ </li>
+ <li>
+ <div>
+ F
+ <ul>
+ <li>
+ <div>
+ G
+ </div>
+ </li>
+ <li>
+ <div>
+ H
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ </ol>
+ <p>
+ Three level list:
+ </p>
+ <ol>
+ <li>
+ <div>
+ A
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ <ol>
+ <li>
+ <div>
+ C
+ </div>
+ </li>
+ <li>
+ <div>
+ D
+ </div>
+ </li>
+ </ol>
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ G
+ </div>
+ </li>
+ <li>
+ <div>
+ H
+ </div>
+ </li>
+ </ol>
+ <p>
+ Inconsistent Indentation:
+ </p>
+ <ul>
+ <li>
+ <div>
+ A1
+ <ul>
+ <li>
+ <div>
+ B1
+ </div>
+ </li>
+ <li>
+ <div>
+ B2
+ <ul>
+ <li>
+ <div>
+ C1
+ </div>
+ </li>
+ <li>
+ <div>
+ C2
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ B3
+ </div>
+ </li>
+ <li>
+ <div>
+ B4
+ </div>
+ </li>
+ <li>
+ <div>
+ B5
+ <ul>
+ <li>
+ <div>
+ C3
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ B6
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ A2
+ </div>
+ </li>
+ <li>
+ <div>
+ A3
+ </div>
+ </li>
+ </ul>
+ <p>
+ Markup in list:
+ </p>
+ <ul>
+ <li>
+ <div>
+ <span class="bold"><strong>Bold</strong></span>
+ </div>
+ </li>
+ <li>
+ <div>
+ <span class="bold"><strong>Bold</strong></span>
+ </div>
+ </li>
+ <li>
+ <div>
+ <q>Quoted</q>
+ </div>
+ </li>
+ <li>
+ <div>
+ <a id="list_test.f0" href="#footnote-1"><sup class="footnote">[1]</sup></a>
+ </div>
+ </li>
+ </ul>
+ <p>
+ Don't end list with comment 1:
+ </p>
+ <ul>
+ <li>
+ <div>
+ A1
+ </div>
+ </li>
+ <li>
+ <div>
+ A2
+ </div>
+ </li>
+ <li>
+ <div>
+ A3
+ </div>
+ </li>
+ <li>
+ <div>
+ A4
+ </div>
+ </li>
+ </ul>
+ <p>
+ Don't end list with comment 2:
+ </p>
+ <ul>
+ <li>
+ <div>
+ A1
+ <ul>
+ <li>
+ <div>
+ B1
+ </div>
+ </li>
+ <li>
+ <div>
+ B2
+ </div>
+ </li>
+ <li>
+ <div>
+ B3
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ </ul>
+ <div id="list_test.list_immediately_following_markup">
+ <h3>
+ List immediately following markup
+ </h3>
+ <div id="list_test.list_immediately_following_markup">
+ <ul>
+ <li>
+ <div>
+ One
+ </div>
+ </li>
+ <li>
+ <div>
+ Two
+ </div>
+ </li>
+ <li>
+ <div>
+ Three
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div id="list_test.list_immediately_following_markup_2">
+ <h3>
+ List immediately following markup 2
+ </h3>
+ <div id="list_test.list_immediately_following_markup_2">
+ <ul>
+ <li>
+ <div>
+ One [section Nested section]
+ </div>
+ </li>
+ <li>
+ <div>
+ Two [endsect]
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div class="footnotes">
+ <br/>
+ <hr/>
+ <div id="footnote-1" class="footnote">
+ <p>
+ <a href="#list_test.f0"><sup>[1]</sup></a> Footnote
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/list_test-1_5.quickbook b/src/boost/tools/quickbook/test/list_test-1_5.quickbook
new file mode 100644
index 000000000..64b391a61
--- /dev/null
+++ b/src/boost/tools/quickbook/test/list_test-1_5.quickbook
@@ -0,0 +1,108 @@
+[article List Test
+[quickbook 1.5]
+]
+
+Simple list:
+
+* A
+* B
+
+Simple list:
+
+#A
+#B
+
+Two level list:
+
+* A
+ * A
+ * B
+* B
+ * A
+ * B
+
+Two level list:
+
+# A
+ * A
+ * B
+# B
+ * A
+ * B
+
+Three level list:
+
+# A
+ * A
+ * B
+ * C
+ * D
+ * E
+ * F
+ * G
+ * H
+
+Three level list:
+
+# A
+ * A
+ * B
+ # C
+ # D
+# G
+# H
+
+Inconsistent Indentation:
+
+* A1
+ * B1
+ * B2
+ * C1
+ * C2
+ * B3
+ * B4
+ * B5
+ * C3
+ * B6
+ * A2
+* A3
+
+Markup in list:
+
+* *Bold*
+* [*Bold]
+* ["Quoted]
+* [footnote Footnote]
+
+Don't end list with comment 1:
+
+* A1
+* A2
+
+[/ End list?]
+* A3
+* A4
+
+Don't end list with comment 2:
+
+* A1
+ * B1
+
+[/ End list?]
+ * B2
+ * B3
+
+[section List immediately following markup]
+* One
+* Two
+* Three
+
+[endsect]
+
+[section List immediately following markup 2]
+* One
+[section Nested section]
+* Two
+[endsect]
+
+[endsect]
diff --git a/src/boost/tools/quickbook/test/list_test-1_6-fail.quickbook b/src/boost/tools/quickbook/test/list_test-1_6-fail.quickbook
new file mode 100644
index 000000000..7ca8a9399
--- /dev/null
+++ b/src/boost/tools/quickbook/test/list_test-1_6-fail.quickbook
@@ -0,0 +1,46 @@
+[article List Test
+[quickbook 1.6]
+]
+
+Markup in list:
+
+* [table [[Heading]][[Cell]]]
+* [heading The heading for a list item]
+
+ The content of the list item.
+
+[section Paragraphs in list items]
+
+* A1
+
+ A2
+
+* B1
+ * C1
+
+ C2
+
+ B2
+
+* D1
+ * E1
+
+ E2
+
+ E3
+
+ D2
+
+[endsect]
+
+[section Indented code blocks in lists]
+
+* A
+
+ B
+ C
+* D
+
+ E
+* F
+[endsect]
diff --git a/src/boost/tools/quickbook/test/list_test-1_6.gold b/src/boost/tools/quickbook/test/list_test-1_6.gold
new file mode 100644
index 000000000..b6d3775a6
--- /dev/null
+++ b/src/boost/tools/quickbook/test/list_test-1_6.gold
@@ -0,0 +1,450 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="list_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>List Test</title>
+ <para>
+ Simple list:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Simple list:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </orderedlist>
+ <para>
+ Two level list:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Two level list:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ A
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </orderedlist>
+ <para>
+ Three level list:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ A
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ C
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ D
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ E
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ F
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ G
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ H
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </orderedlist>
+ <para>
+ Three level list:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ A
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ <orderedlist>
+ <listitem>
+ <simpara>
+ C
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ D
+ </simpara>
+ </listitem>
+ </orderedlist>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ G
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ H
+ </simpara>
+ </listitem>
+ </orderedlist>
+ <para>
+ Inconsistent Indentation:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A1
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ B1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B2
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ C1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ C2
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B3
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B4
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B5
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ C3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B6
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Markup in list:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ <emphasis role="bold">Bold</emphasis>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <emphasis role="bold">Bold</emphasis>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <quote>Quoted</quote>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <footnote id="list_test.f0">
+ <para>
+ Footnote
+ </para>
+ </footnote>
+ </simpara>
+ </listitem>
+ <listitem>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ Cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <simpara>
+ Some text.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ [section Doesn't expand] Blah, blah. [endsect]
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Paragraph cheat 1.
+ </simpara>
+ <simpara>
+ Paragraph cheat 2.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Paragraph cheat 3.
+ </simpara>
+ <simpara>
+ Paragraph cheat 4.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Don't end list with comment 1:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A3
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A4
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Don't end list with comment 2:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A1
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ B1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <section id="list_test.list_immediately_following_marku">
+ <title><link linkend="list_test.list_immediately_following_marku">List immediately
+ following markup</link></title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ One
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Two
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Three
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="list_test.list_immediately_following_mark0">
+ <title><link linkend="list_test.list_immediately_following_mark0">List immediately
+ following markup 2</link></title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ One [section Nested section]
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Two [endsect]
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/list_test-1_6.gold-html b/src/boost/tools/quickbook/test/list_test-1_6.gold-html
new file mode 100644
index 000000000..c8ca7a85c
--- /dev/null
+++ b/src/boost/tools/quickbook/test/list_test-1_6.gold-html
@@ -0,0 +1,480 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ List Test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#list_test.list_immediately_following_marku">List immediately
+ following markup</a>
+ </li>
+ <li>
+ <a href="#list_test.list_immediately_following_mark0">List immediately
+ following markup 2</a>
+ </li>
+ </ul>
+ </div>
+ <p>
+ Simple list:
+ </p>
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ </div>
+ </li>
+ </ul>
+ <p>
+ Simple list:
+ </p>
+ <ol>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ </div>
+ </li>
+ </ol>
+ <p>
+ Two level list:
+ </p>
+ <ul>
+ <li>
+ <div>
+ A
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ </ul>
+ <p>
+ Two level list:
+ </p>
+ <ol>
+ <li>
+ <div>
+ A
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ </ol>
+ <p>
+ Three level list:
+ </p>
+ <ol>
+ <li>
+ <div>
+ A
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ <ul>
+ <li>
+ <div>
+ C
+ </div>
+ </li>
+ <li>
+ <div>
+ D
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ E
+ </div>
+ </li>
+ <li>
+ <div>
+ F
+ <ul>
+ <li>
+ <div>
+ G
+ </div>
+ </li>
+ <li>
+ <div>
+ H
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ </ol>
+ <p>
+ Three level list:
+ </p>
+ <ol>
+ <li>
+ <div>
+ A
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ <ol>
+ <li>
+ <div>
+ C
+ </div>
+ </li>
+ <li>
+ <div>
+ D
+ </div>
+ </li>
+ </ol>
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ G
+ </div>
+ </li>
+ <li>
+ <div>
+ H
+ </div>
+ </li>
+ </ol>
+ <p>
+ Inconsistent Indentation:
+ </p>
+ <ul>
+ <li>
+ <div>
+ A1
+ <ul>
+ <li>
+ <div>
+ B1
+ </div>
+ </li>
+ <li>
+ <div>
+ B2
+ <ul>
+ <li>
+ <div>
+ C1
+ </div>
+ </li>
+ <li>
+ <div>
+ C2
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ B3
+ </div>
+ </li>
+ <li>
+ <div>
+ B4
+ </div>
+ </li>
+ <li>
+ <div>
+ B5
+ <ul>
+ <li>
+ <div>
+ C3
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ B6
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ A2
+ </div>
+ </li>
+ <li>
+ <div>
+ A3
+ </div>
+ </li>
+ </ul>
+ <p>
+ Markup in list:
+ </p>
+ <ul>
+ <li>
+ <div>
+ <span class="bold"><strong>Bold</strong></span>
+ </div>
+ </li>
+ <li>
+ <div>
+ <span class="bold"><strong>Bold</strong></span>
+ </div>
+ </li>
+ <li>
+ <div>
+ <q>Quoted</q>
+ </div>
+ </li>
+ <li>
+ <div>
+ <a id="list_test.f0" href="#footnote-1"><sup class="footnote">[1]</sup></a>
+ </div>
+ </li>
+ <li>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ Cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div>
+ Some text.
+ </div>
+ </li>
+ <li>
+ <div>
+ [section Doesn't expand] Blah, blah. [endsect]
+ </div>
+ </li>
+ <li>
+ <div>
+ Paragraph cheat 1.
+ </div>
+ <div>
+ Paragraph cheat 2.
+ </div>
+ </li>
+ <li>
+ <div>
+ Paragraph cheat 3.
+ </div>
+ <div>
+ Paragraph cheat 4.
+ </div>
+ </li>
+ </ul>
+ <p>
+ Don't end list with comment 1:
+ </p>
+ <ul>
+ <li>
+ <div>
+ A1
+ </div>
+ </li>
+ <li>
+ <div>
+ A2
+ </div>
+ </li>
+ <li>
+ <div>
+ A3
+ </div>
+ </li>
+ <li>
+ <div>
+ A4
+ </div>
+ </li>
+ </ul>
+ <p>
+ Don't end list with comment 2:
+ </p>
+ <ul>
+ <li>
+ <div>
+ A1
+ <ul>
+ <li>
+ <div>
+ B1
+ </div>
+ </li>
+ <li>
+ <div>
+ B2
+ </div>
+ </li>
+ <li>
+ <div>
+ B3
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ </ul>
+ <div id="list_test.list_immediately_following_marku">
+ <h3>
+ List immediately following markup
+ </h3>
+ <div id="list_test.list_immediately_following_marku">
+ <ul>
+ <li>
+ <div>
+ One
+ </div>
+ </li>
+ <li>
+ <div>
+ Two
+ </div>
+ </li>
+ <li>
+ <div>
+ Three
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div id="list_test.list_immediately_following_mark0">
+ <h3>
+ List immediately following markup 2
+ </h3>
+ <div id="list_test.list_immediately_following_mark0">
+ <ul>
+ <li>
+ <div>
+ One [section Nested section]
+ </div>
+ </li>
+ <li>
+ <div>
+ Two [endsect]
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div class="footnotes">
+ <br/>
+ <hr/>
+ <div id="footnote-1" class="footnote">
+ <p>
+ <a href="#list_test.f0"><sup>[1]</sup></a> Footnote
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/list_test-1_6.quickbook b/src/boost/tools/quickbook/test/list_test-1_6.quickbook
new file mode 100644
index 000000000..fe1e18756
--- /dev/null
+++ b/src/boost/tools/quickbook/test/list_test-1_6.quickbook
@@ -0,0 +1,120 @@
+[article List Test
+[quickbook 1.6]
+]
+
+Simple list:
+
+* A
+* B
+
+Simple list:
+
+#A
+#B
+
+Two level list:
+
+* A
+ * A
+ * B
+* B
+ * A
+ * B
+
+Two level list:
+
+# A
+ * A
+ * B
+# B
+ * A
+ * B
+
+Three level list:
+
+# A
+ * A
+ * B
+ * C
+ * D
+ * E
+ * F
+ * G
+ * H
+
+Three level list:
+
+# A
+ * A
+ * B
+ # C
+ # D
+# G
+# H
+
+Inconsistent Indentation:
+
+* A1
+ * B1
+ * B2
+ * C1
+ * C2
+ * B3
+ * B4
+ * B5
+ * C3
+ * B6
+ * A2
+* A3
+
+Markup in list:
+
+* *Bold*
+* [*Bold]
+* ["Quoted]
+* [footnote Footnote]
+* [table [[Heading]][[Cell]]]
+ Some text.
+* [section Doesn't expand]
+ Blah, blah.
+ [endsect]
+
+* Paragraph cheat 1.
+ [block]
+ Paragraph cheat 2.
+* Paragraph cheat 3.
+ [block]
+ Paragraph cheat 4.
+
+Don't end list with comment 1:
+
+* A1
+* A2
+
+[/ End list?]
+* A3
+* A4
+
+Don't end list with comment 2:
+
+* A1
+ * B1
+
+[/ End list?]
+ * B2
+ * B3
+
+[section List immediately following markup]
+* One
+* Two
+* Three
+
+[endsect]
+
+[section List immediately following markup 2]
+* One
+[section Nested section]
+* Two
+[endsect]
+
+[endsect]
diff --git a/src/boost/tools/quickbook/test/list_test-1_7-fail1.quickbook b/src/boost/tools/quickbook/test/list_test-1_7-fail1.quickbook
new file mode 100644
index 000000000..c8beed1c5
--- /dev/null
+++ b/src/boost/tools/quickbook/test/list_test-1_7-fail1.quickbook
@@ -0,0 +1,9 @@
+[article List Fail Test 1
+[quickbook 1.7]
+]
+
+[section List immediately following markup]
+* One
+* Two
+* Three
+[endsect]
diff --git a/src/boost/tools/quickbook/test/list_test-1_7.gold b/src/boost/tools/quickbook/test/list_test-1_7.gold
new file mode 100644
index 000000000..dec074c74
--- /dev/null
+++ b/src/boost/tools/quickbook/test/list_test-1_7.gold
@@ -0,0 +1,479 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="list_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>List Test</title>
+ <para>
+ Simple list:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Simple list:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </orderedlist>
+ <para>
+ Two level list:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Two level list:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ A
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </orderedlist>
+ <para>
+ Three level list:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ A
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ C
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ D
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ E
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ F
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ G
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ H
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </orderedlist>
+ <para>
+ Three level list:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ A
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B
+ <orderedlist>
+ <listitem>
+ <simpara>
+ C
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ D
+ </simpara>
+ </listitem>
+ </orderedlist>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ G
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ H
+ </simpara>
+ </listitem>
+ </orderedlist>
+ <para>
+ Inconsistent Indentation:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A1
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ B1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B2
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ C1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ C2
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B3
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B4
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B5
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ C3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B6
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Markup in list:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ <emphasis role="bold">Bold</emphasis>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <emphasis role="bold">Bold</emphasis>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <quote>Quoted</quote>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <footnote id="list_test.f0">
+ <para>
+ Footnote
+ </para>
+ </footnote>
+ </simpara>
+ </listitem>
+ <listitem>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ Cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </listitem>
+ <listitem>
+ <bridgehead renderas="sect2" id="list_test.h0">
+ <phrase id="list_test.the_heading_for_a_list_item"/><link linkend="list_test.the_heading_for_a_list_item">The
+ heading for a list item</link>
+ </bridgehead>
+ <simpara>
+ The content of the list item.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Don't end list with comment 1:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A3
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A4
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Don't end list with comment 2:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A1
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ B1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <section id="list_test.paragraphs_in_list_items">
+ <title><link linkend="list_test.paragraphs_in_list_items">Paragraphs in list
+ items</link></title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A1
+ </simpara>
+ <simpara>
+ A2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ B1
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ C1
+ </simpara>
+ <simpara>
+ C2
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ <simpara>
+ B2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ D1
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ E1
+ </simpara>
+ <simpara>
+ E2
+ </simpara>
+ <simpara>
+ E3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ <simpara>
+ D2
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="list_test.indented_code_blocks_in_lists">
+ <title><link linkend="list_test.indented_code_blocks_in_lists">Indented code
+ blocks in lists</link></title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ A
+ </simpara>
+<programlisting><phrase role="identifier">B</phrase>
+</programlisting>
+ <simpara>
+ C
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ D
+ </simpara>
+<programlisting><phrase role="identifier">E</phrase>
+</programlisting>
+ </listitem>
+ <listitem>
+ <simpara>
+ F
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/list_test-1_7.gold-html b/src/boost/tools/quickbook/test/list_test-1_7.gold-html
new file mode 100644
index 000000000..9d7b78eac
--- /dev/null
+++ b/src/boost/tools/quickbook/test/list_test-1_7.gold-html
@@ -0,0 +1,507 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ List Test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#list_test.paragraphs_in_list_items">Paragraphs in list items</a>
+ </li>
+ <li>
+ <a href="#list_test.indented_code_blocks_in_lists">Indented code blocks
+ in lists</a>
+ </li>
+ </ul>
+ </div>
+ <p>
+ Simple list:
+ </p>
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ </div>
+ </li>
+ </ul>
+ <p>
+ Simple list:
+ </p>
+ <ol>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ </div>
+ </li>
+ </ol>
+ <p>
+ Two level list:
+ </p>
+ <ul>
+ <li>
+ <div>
+ A
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ </ul>
+ <p>
+ Two level list:
+ </p>
+ <ol>
+ <li>
+ <div>
+ A
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ </ol>
+ <p>
+ Three level list:
+ </p>
+ <ol>
+ <li>
+ <div>
+ A
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ <ul>
+ <li>
+ <div>
+ C
+ </div>
+ </li>
+ <li>
+ <div>
+ D
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ E
+ </div>
+ </li>
+ <li>
+ <div>
+ F
+ <ul>
+ <li>
+ <div>
+ G
+ </div>
+ </li>
+ <li>
+ <div>
+ H
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ </ol>
+ <p>
+ Three level list:
+ </p>
+ <ol>
+ <li>
+ <div>
+ A
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+ </li>
+ <li>
+ <div>
+ B
+ <ol>
+ <li>
+ <div>
+ C
+ </div>
+ </li>
+ <li>
+ <div>
+ D
+ </div>
+ </li>
+ </ol>
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ G
+ </div>
+ </li>
+ <li>
+ <div>
+ H
+ </div>
+ </li>
+ </ol>
+ <p>
+ Inconsistent Indentation:
+ </p>
+ <ul>
+ <li>
+ <div>
+ A1
+ <ul>
+ <li>
+ <div>
+ B1
+ </div>
+ </li>
+ <li>
+ <div>
+ B2
+ <ul>
+ <li>
+ <div>
+ C1
+ </div>
+ </li>
+ <li>
+ <div>
+ C2
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ B3
+ </div>
+ </li>
+ <li>
+ <div>
+ B4
+ </div>
+ </li>
+ <li>
+ <div>
+ B5
+ <ul>
+ <li>
+ <div>
+ C3
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ B6
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ A2
+ </div>
+ </li>
+ <li>
+ <div>
+ A3
+ </div>
+ </li>
+ </ul>
+ <p>
+ Markup in list:
+ </p>
+ <ul>
+ <li>
+ <div>
+ <span class="bold"><strong>Bold</strong></span>
+ </div>
+ </li>
+ <li>
+ <div>
+ <span class="bold"><strong>Bold</strong></span>
+ </div>
+ </li>
+ <li>
+ <div>
+ <q>Quoted</q>
+ </div>
+ </li>
+ <li>
+ <div>
+ <a id="list_test.f0" href="#footnote-1"><sup class="footnote">[1]</sup></a>
+ </div>
+ </li>
+ <li>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ Cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </li>
+ <li>
+ <h2 id="list_test.the_heading_for_a_list_item">
+ The heading for a list item
+ </h2>
+ <div>
+ The content of the list item.
+ </div>
+ </li>
+ </ul>
+ <p>
+ Don't end list with comment 1:
+ </p>
+ <ul>
+ <li>
+ <div>
+ A1
+ </div>
+ </li>
+ <li>
+ <div>
+ A2
+ </div>
+ </li>
+ <li>
+ <div>
+ A3
+ </div>
+ </li>
+ <li>
+ <div>
+ A4
+ </div>
+ </li>
+ </ul>
+ <p>
+ Don't end list with comment 2:
+ </p>
+ <ul>
+ <li>
+ <div>
+ A1
+ <ul>
+ <li>
+ <div>
+ B1
+ </div>
+ </li>
+ <li>
+ <div>
+ B2
+ </div>
+ </li>
+ <li>
+ <div>
+ B3
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ </ul>
+ <div id="list_test.paragraphs_in_list_items">
+ <h3>
+ Paragraphs in list items
+ </h3>
+ <div id="list_test.paragraphs_in_list_items">
+ <ul>
+ <li>
+ <div>
+ A1
+ </div>
+ <div>
+ A2
+ </div>
+ </li>
+ <li>
+ <div>
+ B1
+ <ul>
+ <li>
+ <div>
+ C1
+ </div>
+ <div>
+ C2
+ </div>
+ </li>
+ </ul>
+ </div>
+ <div>
+ B2
+ </div>
+ </li>
+ <li>
+ <div>
+ D1
+ <ul>
+ <li>
+ <div>
+ E1
+ </div>
+ <div>
+ E2
+ </div>
+ <div>
+ E3
+ </div>
+ </li>
+ </ul>
+ </div>
+ <div>
+ D2
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div id="list_test.indented_code_blocks_in_lists">
+ <h3>
+ Indented code blocks in lists
+ </h3>
+ <div id="list_test.indented_code_blocks_in_lists">
+ <ul>
+ <li>
+ <div>
+ A
+ </div>
+<pre class="programlisting"><span class="identifier">B</span>
+</pre>
+ <div>
+ C
+ </div>
+ </li>
+ <li>
+ <div>
+ D
+ </div>
+<pre class="programlisting"><span class="identifier">E</span>
+</pre>
+ </li>
+ <li>
+ <div>
+ F
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div class="footnotes">
+ <br/>
+ <hr/>
+ <div id="footnote-1" class="footnote">
+ <p>
+ <a href="#list_test.f0"><sup>[1]</sup></a> Footnote
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/list_test-1_7.quickbook b/src/boost/tools/quickbook/test/list_test-1_7.quickbook
new file mode 100644
index 000000000..8eac6a718
--- /dev/null
+++ b/src/boost/tools/quickbook/test/list_test-1_7.quickbook
@@ -0,0 +1,134 @@
+[article List Test
+[quickbook 1.7]
+]
+
+Simple list:
+
+* A
+* B
+
+Simple list:
+
+#A
+#B
+
+Two level list:
+
+* A
+ * A
+ * B
+* B
+ * A
+ * B
+
+Two level list:
+
+# A
+ * A
+ * B
+# B
+ * A
+ * B
+
+Three level list:
+
+# A
+ * A
+ * B
+ * C
+ * D
+ * E
+ * F
+ * G
+ * H
+
+Three level list:
+
+# A
+ * A
+ * B
+ # C
+ # D
+# G
+# H
+
+Inconsistent Indentation:
+
+* A1
+ * B1
+ * B2
+ * C1
+ * C2
+ * B3
+ * B4
+ * B5
+ * C3
+ * B6
+ * A2
+* A3
+
+Markup in list:
+
+* *Bold*
+* [*Bold]
+* ["Quoted]
+* [footnote Footnote]
+* [table [[Heading]][[Cell]]]
+* [heading The heading for a list item]
+
+ The content of the list item.
+
+Don't end list with comment 1:
+
+* A1
+* A2
+
+[/ End list?]
+* A3
+* A4
+
+Don't end list with comment 2:
+
+* A1
+ * B1
+
+[/ End list?]
+ * B2
+ * B3
+
+[section Paragraphs in list items]
+
+* A1
+
+ A2
+
+* B1
+ * C1
+
+ C2
+
+ B2
+
+* D1
+ * E1
+
+ E2
+
+ E3
+
+ D2
+
+[endsect]
+
+[section Indented code blocks in lists]
+
+* A
+
+ B
+ C
+* D
+
+ E
+* F
+
+[endsect]
diff --git a/src/boost/tools/quickbook/test/macro-1_5.gold b/src/boost/tools/quickbook/test/macro-1_5.gold
new file mode 100644
index 000000000..aec771a0c
--- /dev/null
+++ b/src/boost/tools/quickbook/test/macro-1_5.gold
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="macro_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Macro Test</title>
+ <para>
+ 1
+ </para>
+ <para>
+ 2
+ </para>
+ <para>
+ two
+ </para>
+ <para>
+ 1
+ </para>
+ <para>
+ 1
+ </para>
+ <para>
+ 1
+ </para>
+ <para>
+ 1 2
+ </para>
+</article>
diff --git a/src/boost/tools/quickbook/test/macro-1_5.gold-html b/src/boost/tools/quickbook/test/macro-1_5.gold-html
new file mode 100644
index 000000000..b2ffd0edd
--- /dev/null
+++ b/src/boost/tools/quickbook/test/macro-1_5.gold-html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Macro Test
+ </h3>
+ <p>
+ 1
+ </p>
+ <p>
+ 2
+ </p>
+ <p>
+ two
+ </p>
+ <p>
+ 1
+ </p>
+ <p>
+ 1
+ </p>
+ <p>
+ 1
+ </p>
+ <p>
+ 1 2
+ </p>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/macro-1_5.quickbook b/src/boost/tools/quickbook/test/macro-1_5.quickbook
new file mode 100644
index 000000000..165ad1b92
--- /dev/null
+++ b/src/boost/tools/quickbook/test/macro-1_5.quickbook
@@ -0,0 +1,34 @@
+[article Macro Test
+[quickbook 1.5]
+]
+
+[def one 1]
+
+one
+
+[template foo[]
+
+[def two 2]
+two
+]
+
+[foo]
+two [/This shouldn't expand]
+
+
+[def __foo__ 1]
+[def __foo__ 2]
+__foo__
+
+[template foo2[]
+[def __foo__ 3]
+__foo__
+]
+
+[foo2]
+__foo__
+
+[def __crazy[macro__ 1]
+[def __crazy\macro__ 2]
+__crazy[macro__
+__crazy\macro__ \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/macro-1_6.gold b/src/boost/tools/quickbook/test/macro-1_6.gold
new file mode 100644
index 000000000..291ddf1f9
--- /dev/null
+++ b/src/boost/tools/quickbook/test/macro-1_6.gold
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="macro_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Macro Test</title>
+ <para>
+ 1
+ </para>
+ <para>
+ 2
+ </para>
+ <para>
+ two
+ </para>
+ <para>
+ 2
+ </para>
+ <para>
+ 3
+ </para>
+ <para>
+ 2
+ </para>
+ <para>
+ [1] \m2
+ </para>
+</article>
diff --git a/src/boost/tools/quickbook/test/macro-1_6.gold-html b/src/boost/tools/quickbook/test/macro-1_6.gold-html
new file mode 100644
index 000000000..f49236233
--- /dev/null
+++ b/src/boost/tools/quickbook/test/macro-1_6.gold-html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Macro Test
+ </h3>
+ <p>
+ 1
+ </p>
+ <p>
+ 2
+ </p>
+ <p>
+ two
+ </p>
+ <p>
+ 2
+ </p>
+ <p>
+ 3
+ </p>
+ <p>
+ 2
+ </p>
+ <p>
+ [1] \m2
+ </p>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/macro-1_6.quickbook b/src/boost/tools/quickbook/test/macro-1_6.quickbook
new file mode 100644
index 000000000..43f8cbc0a
--- /dev/null
+++ b/src/boost/tools/quickbook/test/macro-1_6.quickbook
@@ -0,0 +1,34 @@
+[article Macro Test
+[quickbook 1.6]
+]
+
+[def one 1]
+
+one
+
+[template foo[]
+
+[def two 2]
+two
+]
+
+[foo]
+two [/This shouldn't expand]
+
+
+[def __foo__ 1]
+[def __foo__ 2]
+__foo__
+
+[template foo2[]
+[def __foo__ 3]
+__foo__
+]
+
+[foo2]
+__foo__
+
+[def __crazy[1]]
+[def __crazy2\m2]
+__crazy
+__crazy2 \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/mismatched_brackets-1_1-fail.quickbook b/src/boost/tools/quickbook/test/mismatched_brackets-1_1-fail.quickbook
new file mode 100644
index 000000000..e3db0daa2
--- /dev/null
+++ b/src/boost/tools/quickbook/test/mismatched_brackets-1_1-fail.quickbook
@@ -0,0 +1,5 @@
+[article Mismatched brackets]
+
+[template foo Oops]
+[template blah Eek
+[foo]
diff --git a/src/boost/tools/quickbook/test/mismatched_brackets1-1_1.gold b/src/boost/tools/quickbook/test/mismatched_brackets1-1_1.gold
new file mode 100644
index 000000000..f6fbff497
--- /dev/null
+++ b/src/boost/tools/quickbook/test/mismatched_brackets1-1_1.gold
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="mismatched_brackets" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Mismatched brackets</title>
+ <para>
+ [foo
+ </para>
+ <para>
+ Eek
+ </para>
+</article>
diff --git a/src/boost/tools/quickbook/test/mismatched_brackets1-1_1.gold-html b/src/boost/tools/quickbook/test/mismatched_brackets1-1_1.gold-html
new file mode 100644
index 000000000..a0c96eb7a
--- /dev/null
+++ b/src/boost/tools/quickbook/test/mismatched_brackets1-1_1.gold-html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Mismatched brackets
+ </h3>
+ <p>
+ [foo
+ </p>
+ <p>
+ Eek
+ </p>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/mismatched_brackets1-1_1.quickbook b/src/boost/tools/quickbook/test/mismatched_brackets1-1_1.quickbook
new file mode 100644
index 000000000..a0cfb77b3
--- /dev/null
+++ b/src/boost/tools/quickbook/test/mismatched_brackets1-1_1.quickbook
@@ -0,0 +1,7 @@
+[article Mismatched brackets]
+
+[template foo Oops]
+
+[foo
+[template blah Eek]
+[blah] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/mismatched_brackets1-1_7.quickbook b/src/boost/tools/quickbook/test/mismatched_brackets1-1_7.quickbook
new file mode 100644
index 000000000..2303fa8e8
--- /dev/null
+++ b/src/boost/tools/quickbook/test/mismatched_brackets1-1_7.quickbook
@@ -0,0 +1,8 @@
+[quickbook 1.7]
+[article Mismatched brackets]
+
+[template foo Oops]
+
+[foo
+[template blah Eek]
+[blah]
diff --git a/src/boost/tools/quickbook/test/mismatched_brackets2-1_1.gold b/src/boost/tools/quickbook/test/mismatched_brackets2-1_1.gold
new file mode 100644
index 000000000..bdbb114c7
--- /dev/null
+++ b/src/boost/tools/quickbook/test/mismatched_brackets2-1_1.gold
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="mismatched_brackets" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Mismatched brackets</title>
+ <para>
+ [foo Eek
+ </para>
+</article>
diff --git a/src/boost/tools/quickbook/test/mismatched_brackets2-1_1.gold-html b/src/boost/tools/quickbook/test/mismatched_brackets2-1_1.gold-html
new file mode 100644
index 000000000..27c42db45
--- /dev/null
+++ b/src/boost/tools/quickbook/test/mismatched_brackets2-1_1.gold-html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Mismatched brackets
+ </h3>
+ <p>
+ [foo Eek
+ </p>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/mismatched_brackets2-1_1.quickbook b/src/boost/tools/quickbook/test/mismatched_brackets2-1_1.quickbook
new file mode 100644
index 000000000..271fee8af
--- /dev/null
+++ b/src/boost/tools/quickbook/test/mismatched_brackets2-1_1.quickbook
@@ -0,0 +1,7 @@
+[article Mismatched brackets]
+
+[template foo Oops]
+[template blah Eek]
+
+[foo
+[blah] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/mismatched_brackets3-1_1.gold b/src/boost/tools/quickbook/test/mismatched_brackets3-1_1.gold
new file mode 100644
index 000000000..a7ab11e83
--- /dev/null
+++ b/src/boost/tools/quickbook/test/mismatched_brackets3-1_1.gold
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="mismatched_brackets" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Mismatched brackets</title>
+ <section id="mismatched_brackets.something">
+ <title>Something</title>
+ </section>
+ <para>
+ ]
+ </para>
+</article>
diff --git a/src/boost/tools/quickbook/test/mismatched_brackets3-1_1.gold-html b/src/boost/tools/quickbook/test/mismatched_brackets3-1_1.gold-html
new file mode 100644
index 000000000..a63ee3a63
--- /dev/null
+++ b/src/boost/tools/quickbook/test/mismatched_brackets3-1_1.gold-html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Mismatched brackets
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#mismatched_brackets.something">Something</a>
+ </li>
+ </ul>
+ </div>
+ <p>
+ ]
+ </p>
+ <div id="mismatched_brackets.something">
+ <h3>
+ Something
+ </h3>
+ <div id="mismatched_brackets.something">
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/mismatched_brackets3-1_1.quickbook b/src/boost/tools/quickbook/test/mismatched_brackets3-1_1.quickbook
new file mode 100644
index 000000000..dadd42692
--- /dev/null
+++ b/src/boost/tools/quickbook/test/mismatched_brackets3-1_1.quickbook
@@ -0,0 +1,6 @@
+[article Mismatched brackets]
+
+[section Something]
+
+[endsect]
+]
diff --git a/src/boost/tools/quickbook/test/newline-1_1.gold b/src/boost/tools/quickbook/test/newline-1_1.gold
new file mode 100644
index 000000000..716acca12
--- /dev/null
+++ b/src/boost/tools/quickbook/test/newline-1_1.gold
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="test_newlines" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Test newlines</title>
+ <para>
+ Line 1<sbr/> Line 2
+ </para>
+ <blockquote>
+ <para>
+ <quote>It is better to be approximately right than exactly wrong.</quote><sbr/>
+ <emphasis>-- Old adage</emphasis>
+ </para>
+ </blockquote>
+ <para>
+ Line 1<sbr/> Line 2
+ </para>
+ <blockquote>
+ <para>
+ <quote>It is better to be approximately right than exactly wrong.</quote><sbr/>
+ <emphasis>-- Old adage</emphasis>
+ </para>
+ </blockquote>
+</article>
diff --git a/src/boost/tools/quickbook/test/newline-1_1.gold-html b/src/boost/tools/quickbook/test/newline-1_1.gold-html
new file mode 100644
index 000000000..ea82594a1
--- /dev/null
+++ b/src/boost/tools/quickbook/test/newline-1_1.gold-html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Test newlines
+ </h3>
+ <p>
+ Line 1<br/> Line 2
+ </p>
+ <blockquote>
+ <p>
+ <q>It is better to be approximately right than exactly wrong.</q><br/> <span
+ class="emphasis"><em>-- Old adage</em></span>
+ </p>
+ </blockquote>
+ <p>
+ Line 1<br/> Line 2
+ </p>
+ <blockquote>
+ <p>
+ <q>It is better to be approximately right than exactly wrong.</q><br/> <span
+ class="emphasis"><em>-- Old adage</em></span>
+ </p>
+ </blockquote>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/newline-1_1.quickbook b/src/boost/tools/quickbook/test/newline-1_1.quickbook
new file mode 100644
index 000000000..6476f6a40
--- /dev/null
+++ b/src/boost/tools/quickbook/test/newline-1_1.quickbook
@@ -0,0 +1,10 @@
+[article Test newlines
+]
+
+Line 1\nLine 2
+
+[:["It is better to be approximately right than exactly wrong.]\n['-- Old adage]]
+
+Line 1[br]Line 2
+
+[:["It is better to be approximately right than exactly wrong.][br]['-- Old adage]] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/para_test-1_5.gold b/src/boost/tools/quickbook/test/para_test-1_5.gold
new file mode 100644
index 000000000..1a8f17d6a
--- /dev/null
+++ b/src/boost/tools/quickbook/test/para_test-1_5.gold
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="paragraph_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Paragraph Test</title>
+ <section id="paragraph_test.some_paragraphs">
+ <title><link linkend="paragraph_test.some_paragraphs">Some Paragraphs</link></title>
+ <para>
+ Shouldn't be a code block.
+ </para>
+ <para>
+ <emphasis role="bold">Should be bold</emphasis>.
+ </para>
+ <para>
+ Should be a single paragraph.
+ </para>
+ <para>
+ Single paragraph.
+ </para>
+ <para>
+ Single paragraph.
+ </para>
+ <para>
+ Single paragraph.
+ </para>
+ <para>
+ Single paragraph.
+ </para>
+ <para>
+ Lots of newlines round this paragraph.
+ </para>
+ <para>
+ Last paragraph.
+ </para>
+ </section>
+ <section id="paragraph_test.inside___breaking_comment__blocks">
+ <title><link linkend="paragraph_test.inside___breaking_comment__blocks">Inside
+ blocks</link></title>
+ <variablelist>
+ <title></title>
+ <varlistentry>
+ <term>Paragraphs</term>
+ <listitem>
+ <para>
+ Shouldn't be a code block.
+ </para>
+ <para>
+ <emphasis role="bold">Should be bold</emphasis>.
+ </para>
+ <para>
+ Should be a single paragraph.
+ </para>
+ <para>
+ Single paragraph.
+ </para>
+ <para>
+ Single paragraph.
+ </para>
+ <para>
+ Single paragraph.
+ </para>
+ <para>
+ Single paragraph.
+ </para>
+ <para>
+ Lots of newlines round this paragraph.
+ </para>
+ <para>
+ Last paragraph.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/para_test-1_5.gold-html b/src/boost/tools/quickbook/test/para_test-1_5.gold-html
new file mode 100644
index 000000000..92018efc5
--- /dev/null
+++ b/src/boost/tools/quickbook/test/para_test-1_5.gold-html
@@ -0,0 +1,97 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Paragraph Test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#paragraph_test.some_paragraphs">Some Paragraphs</a>
+ </li>
+ <li>
+ <a href="#paragraph_test.inside___breaking_comment__blocks">Inside blocks</a>
+ </li>
+ </ul>
+ </div>
+ <div id="paragraph_test.some_paragraphs">
+ <h3>
+ Some Paragraphs
+ </h3>
+ <div id="paragraph_test.some_paragraphs">
+ <p>
+ Shouldn't be a code block.
+ </p>
+ <p>
+ <span class="bold"><strong>Should be bold</strong></span>.
+ </p>
+ <p>
+ Should be a single paragraph.
+ </p>
+ <p>
+ Single paragraph.
+ </p>
+ <p>
+ Single paragraph.
+ </p>
+ <p>
+ Single paragraph.
+ </p>
+ <p>
+ Single paragraph.
+ </p>
+ <p>
+ Lots of newlines round this paragraph.
+ </p>
+ <p>
+ Last paragraph.
+ </p>
+ </div>
+ </div>
+ <div id="paragraph_test.inside___breaking_comment__blocks">
+ <h3>
+ Inside blocks
+ </h3>
+ <div id="paragraph_test.inside___breaking_comment__blocks">
+ <dl>
+ <dt>
+ Paragraphs
+ </dt>
+ <dd>
+ <p>
+ Shouldn't be a code block.
+ </p>
+ <p>
+ <span class="bold"><strong>Should be bold</strong></span>.
+ </p>
+ <p>
+ Should be a single paragraph.
+ </p>
+ <p>
+ Single paragraph.
+ </p>
+ <p>
+ Single paragraph.
+ </p>
+ <p>
+ Single paragraph.
+ </p>
+ <p>
+ Single paragraph.
+ </p>
+ <p>
+ Lots of newlines round this paragraph.
+ </p>
+ <p>
+ Last paragraph.
+ </p>
+ </dd>
+ </dl>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/para_test-1_5.quickbook b/src/boost/tools/quickbook/test/para_test-1_5.quickbook
new file mode 100644
index 000000000..8a099bce5
--- /dev/null
+++ b/src/boost/tools/quickbook/test/para_test-1_5.quickbook
@@ -0,0 +1,81 @@
+[article Paragraph Test
+ [quickbook 1.5]
+]
+
+[section Some Paragraphs]
+
+[/ Leading comment ] Shouldn't be a code block.
+
+[/ Leading comment ]*Should be bold*.
+
+Should be a
+[/ Breaking comment]
+single paragraph.
+
+Single paragraph.
+[/ Breaking comment]
+
+Single paragraph.
+
+[/ Breaking comment]
+Single paragraph.
+
+Single paragraph.[/ Trailing comment]
+
+
+
+
+
+
+Lots of newlines round this paragraph.
+
+
+
+
+
+
+
+
+Last paragraph.[endsect]
+
+[section Inside
+[/Breaking comment]
+blocks]
+
+[variablelist
+[[Paragraphs][
+[/ Leading comment ] Shouldn't be a code block.
+
+[/ Leading comment ]*Should be bold*.
+
+Should be a
+[/ Breaking comment]
+single paragraph.
+
+Single paragraph.
+[/ Breaking comment]
+
+Single paragraph.
+
+[/ Breaking comment]
+Single paragraph.
+
+Single paragraph.[/ Trailing comment]
+
+
+
+
+
+
+Lots of newlines round this paragraph.
+
+
+
+
+
+
+
+
+Last paragraph.]]]
+
+[endsect] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/post_process-fail.quickbook b/src/boost/tools/quickbook/test/post_process-fail.quickbook
new file mode 100644
index 000000000..994a63574
--- /dev/null
+++ b/src/boost/tools/quickbook/test/post_process-fail.quickbook
@@ -0,0 +1,3 @@
+[article Fail post process due to invalid embedded xml [quickbook 1.4] ]
+
+Invalid xml follows: '''<!--quickbook-escape-postfix--><>'''
diff --git a/src/boost/tools/quickbook/test/preformatted-1_1.gold b/src/boost/tools/quickbook/test/preformatted-1_1.gold
new file mode 100644
index 000000000..a92b3f55a
--- /dev/null
+++ b/src/boost/tools/quickbook/test/preformatted-1_1.gold
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="preformatted" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Preformatted</title>
+ <section id="preformatted.preformatted">
+ <title>Preformatted</title>
+ <para>
+ Here's the ubiquitous <emphasis>Hello World</emphasis> program in C++.
+ </para>
+<programlisting>#include &lt;iostream&gt;
+
+int main()
+{
+ std::cout &lt;&lt; &quot;Hello, World!&quot; &lt;&lt; std::endl;
+ return 0;
+}
+</programlisting>
+ <para>
+ The code should appear as a single block of code in a monospaced font and with
+ no syntax highlighting. The fifth and sixth lines should appear indented to
+ the right, aligning under <code><phrase role="identifier">main</phrase></code>,
+ on line 3.
+ </para>
+ <para>
+ Here's a one line function definitition:
+ </para>
+<programlisting>void something(); </programlisting>
+ <para>
+ .
+ </para>
+ <para>
+ And some indented code:
+ </para>
+<programlisting>void go()
+ {
+ }
+</programlisting>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/preformatted-1_1.gold-html b/src/boost/tools/quickbook/test/preformatted-1_1.gold-html
new file mode 100644
index 000000000..e25c047f5
--- /dev/null
+++ b/src/boost/tools/quickbook/test/preformatted-1_1.gold-html
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Preformatted
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#preformatted.preformatted">Preformatted</a>
+ </li>
+ </ul>
+ </div>
+ <div id="preformatted.preformatted">
+ <h3>
+ Preformatted
+ </h3>
+ <div id="preformatted.preformatted">
+ <p>
+ Here's the ubiquitous <span class="emphasis"><em>Hello World</em></span>
+ program in C++.
+ </p>
+<pre class="programlisting">#include &lt;iostream&gt;
+
+int main()
+{
+ std::cout &lt;&lt; &quot;Hello, World!&quot; &lt;&lt; std::endl;
+ return 0;
+}
+</pre>
+ <p>
+ The code should appear as a single block of code in a monospaced font and
+ with no syntax highlighting. The fifth and sixth lines should appear indented
+ to the right, aligning under <code><span class="identifier">main</span></code>,
+ on line 3.
+ </p>
+ <p>
+ Here's a one line function definitition:
+ </p>
+<pre class="programlisting">void something(); </pre>
+ <p>
+ .
+ </p>
+ <p>
+ And some indented code:
+ </p>
+<pre class="programlisting">void go()
+ {
+ }
+</pre>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/preformatted-1_1.quickbook b/src/boost/tools/quickbook/test/preformatted-1_1.quickbook
new file mode 100644
index 000000000..e41f83b5d
--- /dev/null
+++ b/src/boost/tools/quickbook/test/preformatted-1_1.quickbook
@@ -0,0 +1,32 @@
+[article Preformatted
+]
+
+[section Preformatted]
+
+Here's the ubiquitous /Hello World/ program in C++.
+
+[pre
+#include <iostream>
+
+int main()
+{
+ std::cout << "Hello, World!" << std::endl;
+ return 0;
+}
+]
+
+The code should appear as a single block of code in a monospaced font and with
+no syntax highlighting. The fifth and sixth lines should appear indented to the
+right, aligning under `main`, on line 3.
+
+Here's a one line function definitition: [pre void something(); ].
+
+And some indented code:
+
+[pre
+ void go()
+ {
+ }
+]
+
+[endsect]
diff --git a/src/boost/tools/quickbook/test/preformatted-1_6.gold b/src/boost/tools/quickbook/test/preformatted-1_6.gold
new file mode 100644
index 000000000..46a90c98e
--- /dev/null
+++ b/src/boost/tools/quickbook/test/preformatted-1_6.gold
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="preformatted" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Preformatted</title>
+ <section id="preformatted.preformatted">
+ <title><link linkend="preformatted.preformatted">Preformatted</link></title>
+ <para>
+ Here's the ubiquitous <emphasis>Hello World</emphasis> program in C++.
+ </para>
+<programlisting>#include &lt;iostream&gt;
+
+int main()
+{
+ std::cout &lt;&lt; &quot;Hello, World!&quot; &lt;&lt; std::endl;
+ return 0;
+}
+</programlisting>
+ <para>
+ The code should appear as a single block of code in a monospaced font and with
+ no syntax highlighting. The fifth and sixth lines should appear indented to
+ the right, aligning under <code><phrase role="identifier">main</phrase></code>,
+ on line 3.
+ </para>
+ <para>
+ Here's a one line function definitition:
+ </para>
+<programlisting>void something(); </programlisting>
+ <para>
+ .
+ </para>
+ <para>
+ And some indented code:
+ </para>
+<programlisting> void go()
+ {
+ }
+</programlisting>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/preformatted-1_6.gold-html b/src/boost/tools/quickbook/test/preformatted-1_6.gold-html
new file mode 100644
index 000000000..bebc28896
--- /dev/null
+++ b/src/boost/tools/quickbook/test/preformatted-1_6.gold-html
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Preformatted
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#preformatted.preformatted">Preformatted</a>
+ </li>
+ </ul>
+ </div>
+ <div id="preformatted.preformatted">
+ <h3>
+ Preformatted
+ </h3>
+ <div id="preformatted.preformatted">
+ <p>
+ Here's the ubiquitous <span class="emphasis"><em>Hello World</em></span>
+ program in C++.
+ </p>
+<pre class="programlisting">#include &lt;iostream&gt;
+
+int main()
+{
+ std::cout &lt;&lt; &quot;Hello, World!&quot; &lt;&lt; std::endl;
+ return 0;
+}
+</pre>
+ <p>
+ The code should appear as a single block of code in a monospaced font and
+ with no syntax highlighting. The fifth and sixth lines should appear indented
+ to the right, aligning under <code><span class="identifier">main</span></code>,
+ on line 3.
+ </p>
+ <p>
+ Here's a one line function definitition:
+ </p>
+<pre class="programlisting">void something(); </pre>
+ <p>
+ .
+ </p>
+ <p>
+ And some indented code:
+ </p>
+<pre class="programlisting"> void go()
+ {
+ }
+</pre>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/preformatted-1_6.quickbook b/src/boost/tools/quickbook/test/preformatted-1_6.quickbook
new file mode 100644
index 000000000..25c6bc5c5
--- /dev/null
+++ b/src/boost/tools/quickbook/test/preformatted-1_6.quickbook
@@ -0,0 +1,33 @@
+[article Preformatted
+[quickbook 1.6]
+]
+
+[section Preformatted]
+
+Here's the ubiquitous /Hello World/ program in C++.
+
+[pre
+#include <iostream>
+
+int main()
+{
+ std::cout << "Hello, World!" << std::endl;
+ return 0;
+}
+]
+
+The code should appear as a single block of code in a monospaced font and with
+no syntax highlighting. The fifth and sixth lines should appear indented to the
+right, aligning under `main`, on line 3.
+
+Here's a one line function definitition: [pre void something(); ].
+
+And some indented code:
+
+[pre
+ void go()
+ {
+ }
+]
+
+[endsect]
diff --git a/src/boost/tools/quickbook/test/python/include_glob.qbk b/src/boost/tools/quickbook/test/python/include_glob.qbk
new file mode 100644
index 000000000..6e1f5248a
--- /dev/null
+++ b/src/boost/tools/quickbook/test/python/include_glob.qbk
@@ -0,0 +1,11 @@
+[/
+ Copyright 2012-2013 Daniel James
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+]
+
+[quickbook 1.7]
+[article Include Path]
+[include ?.qbk]
diff --git a/src/boost/tools/quickbook/test/python/include_glob_deps.txt b/src/boost/tools/quickbook/test/python/include_glob_deps.txt
new file mode 100644
index 000000000..82fb66e68
--- /dev/null
+++ b/src/boost/tools/quickbook/test/python/include_glob_deps.txt
@@ -0,0 +1,6 @@
+# Copyright 2012-2013 Daniel James
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+include_glob.qbk
+sub1/a.qbk
+sub2/b.qbk
diff --git a/src/boost/tools/quickbook/test/python/include_glob_locs.txt b/src/boost/tools/quickbook/test/python/include_glob_locs.txt
new file mode 100644
index 000000000..ccab607e0
--- /dev/null
+++ b/src/boost/tools/quickbook/test/python/include_glob_locs.txt
@@ -0,0 +1,9 @@
+# Copyright 2012-2013 Daniel James
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
++ include_glob.qbk
+g ?.qbk
+g sub1/?.qbk
++ sub1/a.qbk
+g sub2/?.qbk
++ sub2/b.qbk
diff --git a/src/boost/tools/quickbook/test/python/include_path.qbk b/src/boost/tools/quickbook/test/python/include_path.qbk
new file mode 100644
index 000000000..3af3b3704
--- /dev/null
+++ b/src/boost/tools/quickbook/test/python/include_path.qbk
@@ -0,0 +1,12 @@
+[/
+ Copyright 2012-2013 Daniel James
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+]
+
+[quickbook 1.5]
+[article Include Path]
+[include a.qbk]
+[include b.qbk]
diff --git a/src/boost/tools/quickbook/test/python/include_path_deps.txt b/src/boost/tools/quickbook/test/python/include_path_deps.txt
new file mode 100644
index 000000000..86875d79b
--- /dev/null
+++ b/src/boost/tools/quickbook/test/python/include_path_deps.txt
@@ -0,0 +1,6 @@
+# Copyright 2012-2013 Daniel James
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+include_path.qbk
+sub1/a.qbk
+sub2/b.qbk
diff --git a/src/boost/tools/quickbook/test/python/include_path_locs.txt b/src/boost/tools/quickbook/test/python/include_path_locs.txt
new file mode 100644
index 000000000..7926db615
--- /dev/null
+++ b/src/boost/tools/quickbook/test/python/include_path_locs.txt
@@ -0,0 +1,9 @@
+# Copyright 2012-2013 Daniel James
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
++ include_path.qbk
+- a.qbk
++ sub1/a.qbk
+- b.qbk
+- sub1/b.qbk
++ sub2/b.qbk
diff --git a/src/boost/tools/quickbook/test/python/missing_relative.qbk b/src/boost/tools/quickbook/test/python/missing_relative.qbk
new file mode 100644
index 000000000..ff96b1088
--- /dev/null
+++ b/src/boost/tools/quickbook/test/python/missing_relative.qbk
@@ -0,0 +1,14 @@
+[/
+ Copyright 2012-2013 Daniel James
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+]
+
+[quickbook 1.5]
+[article Missing Relative]
+
+[include ../missing.qbk]
+[include missing-dir/x.qbk]
+[include missing-dir/../../x.qbk]
diff --git a/src/boost/tools/quickbook/test/python/missing_relative_deps.txt b/src/boost/tools/quickbook/test/python/missing_relative_deps.txt
new file mode 100644
index 000000000..fb8f27fee
--- /dev/null
+++ b/src/boost/tools/quickbook/test/python/missing_relative_deps.txt
@@ -0,0 +1,4 @@
+# Copyright 2012-2013 Daniel James
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+missing_relative.qbk
diff --git a/src/boost/tools/quickbook/test/python/missing_relative_locs.txt b/src/boost/tools/quickbook/test/python/missing_relative_locs.txt
new file mode 100644
index 000000000..ac85cec10
--- /dev/null
+++ b/src/boost/tools/quickbook/test/python/missing_relative_locs.txt
@@ -0,0 +1,7 @@
+# Copyright 2012-2013 Daniel James
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
++ missing_relative.qbk
+- ../missing.qbk
+- missing-dir/x.qbk
+- missing-dir/../../x.qbk
diff --git a/src/boost/tools/quickbook/test/python/run_tests.py b/src/boost/tools/quickbook/test/python/run_tests.py
new file mode 100644
index 000000000..955f52c92
--- /dev/null
+++ b/src/boost/tools/quickbook/test/python/run_tests.py
@@ -0,0 +1,191 @@
+#!/usr/bin/env python
+
+# Copyright 2012-2013 Daniel James
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+
+import sys, os, subprocess, tempfile, re
+
+def main(args, directory):
+ if len(args) != 1:
+ print "Usage: output-deps.py quickbook-command"
+ exit(1)
+ quickbook_command = args[0]
+
+ failures = 0
+
+ # Dependency tests
+
+ failures += run_quickbook(quickbook_command, 'svg_missing.qbk',
+ deps_gold = 'svg_missing_deps.txt')
+ failures += run_quickbook(quickbook_command, 'svg_missing.qbk',
+ locations_gold = 'svg_missing_locs.txt')
+ failures += run_quickbook(quickbook_command, 'missing_relative.qbk',
+ deps_gold = 'missing_relative_deps.txt',
+ locations_gold = 'missing_relative_locs.txt')
+ failures += run_quickbook(quickbook_command, 'include_path.qbk',
+ deps_gold = 'include_path_deps.txt',
+ locations_gold = 'include_path_locs.txt',
+ input_path = ['sub1', 'sub2'])
+ failures += run_quickbook(quickbook_command, 'include_glob.qbk',
+ deps_gold = 'include_glob_deps.txt',
+ locations_gold = 'include_glob_locs.txt',
+ input_path = ['sub1', 'sub2'])
+
+ # Try building a simple document with various flags.
+
+ failures += run_quickbook(quickbook_command, 'simple.qbk',
+ output_gold = 'simple.xml')
+ failures += run_quickbook(quickbook_command, 'simple.qbk',
+ extra_flags = ['--no-self-linked-headers'],
+ output_gold = 'simple_no_self_linked.xml')
+ failures += run_quickbook(quickbook_command, 'simple.qbk',
+ extra_flags = ['--no-pretty-print'],
+ output_gold = 'simple_no_pretty_print.xml')
+ failures += run_quickbook(quickbook_command, 'simple.qbk',
+ extra_flags = ['--indent','4','--linewidth','60'],
+ output_gold = 'simple_custom_pretty_print.xml')
+
+ if failures == 0:
+ print "Success"
+ else:
+ print "Failures:",failures
+ exit(failures)
+
+def run_quickbook(quickbook_command, filename, output_gold = None,
+ deps_gold = None, locations_gold = None, input_path = [],
+ extra_flags = None):
+ failures = 0
+
+ command = [quickbook_command, '--debug', filename]
+
+ output_filename = None
+ if output_gold:
+ output_filename = temp_filename('.qbk')
+ command.extend(['--output-file', output_filename])
+
+ deps_filename = None
+ if deps_gold:
+ deps_filename = temp_filename('.txt')
+ command.extend(['--output-deps', deps_filename])
+
+ locations_filename = None
+ if locations_gold:
+ locations_filename = temp_filename('.txt')
+ command.extend(['--output-checked-locations', locations_filename])
+
+ for path in input_path:
+ command.extend(['-I', path])
+
+ if extra_flags:
+ command.extend(extra_flags)
+
+ try:
+ print 'Running: ' + ' '.join(command)
+ print
+ exit_code = subprocess.call(command)
+ print
+ success = not exit_code
+
+ if output_filename:
+ output = load_file(output_filename)
+ else:
+ output = None
+
+ if deps_filename:
+ deps = load_dependencies(deps_filename)
+ else:
+ deps = None
+
+ if locations_filename:
+ locations = load_locations(locations_filename)
+ else:
+ locations = None
+ finally:
+ if output_filename: os.unlink(output_filename)
+ if deps_filename: os.unlink(deps_filename)
+
+ if deps_gold:
+ gold = load_dependencies(deps_gold)
+ if deps != gold:
+ failures = failures + 1
+ print "Dependencies don't match:"
+ print "Gold:", gold
+ print "Result:", deps
+ print
+
+ if locations_gold:
+ gold = load_locations(locations_gold)
+ if locations != gold:
+ failures = failures + 1
+ print "Dependencies don't match:"
+ print "Gold:", gold
+ print "Result:", locations
+ print
+
+ if output_gold:
+ gold = load_file(output_gold)
+ if gold != output:
+ failures = failures + 1
+ print "Output doesn't match:"
+ print
+ print gold
+ print
+ print output
+ print
+
+ return failures
+
+def load_dependencies(filename):
+ dependencies = set()
+ f = open(filename, 'r')
+ for path in f:
+ if path[0] == '#': continue
+ if path in dependencies:
+ raise Exception("Duplicate path (%1s) in %2s" % (path, filename))
+ dependencies.add(path)
+ return dependencies
+
+def load_locations(filename):
+ line_matcher = re.compile("^([+-g]) (.*)$")
+ dependencies = {}
+ f = open(filename, 'r')
+ glob = None
+ globs = {}
+ for line in f:
+ if line[0] == '#': continue
+ m = line_matcher.match(line)
+
+ path = m.group(2)
+
+ if not m:
+ raise Exception("Invalid dependency file: %1s" % filename)
+ if m.group(1) == 'g':
+ globs[path] = []
+ glob = path
+ elif glob:
+ if m.group(1) != '+':
+ raise Exception("Negative match in glob.")
+ globs[glob].append(path)
+ else:
+ found = m.group(1) == '+'
+ if path in dependencies:
+ raise Exception("Duplicate path (%1s) in %2s" % (path, filename))
+ dependencies[path] = found
+ return { 'dependencies': dependencies, 'globs': globs }
+
+def temp_filename(extension):
+ file = tempfile.mkstemp(suffix = extension)
+ os.close(file[0])
+ return file[1]
+
+def load_file(filename):
+ f = open(filename, 'r')
+ try:
+ return f.read()
+ finally:
+ f.close()
+
+ return None
+
+main(sys.argv[1:], os.path.dirname(sys.argv[0]))
diff --git a/src/boost/tools/quickbook/test/python/simple.qbk b/src/boost/tools/quickbook/test/python/simple.qbk
new file mode 100644
index 000000000..af42ca5cd
--- /dev/null
+++ b/src/boost/tools/quickbook/test/python/simple.qbk
@@ -0,0 +1,23 @@
+[/ Copyright 2016 Daniel James.
+ / Distributed under the Boost Software License, Version 1.0. (See accompanying
+ / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ]
+
+[quickbook 1.6]
+[article Simple Test Article
+ [copyright 2016 Daniel James]
+ [license
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+ ]
+]
+
+[section:one One]
+
+[h1 A]
+
+Lorem ipsum dolor. Sit amet quis hendrerit pretium massa. Et imperdiet sit luctus et nam. Eget neque vivamus nec aliquam vestibulum. Venenatis id penatibus. Rutrum lobortis tempora. Turpis cras imperdiet. Quis parturient quam sed non libero donec in ut aliquam aliquam purus maecenas con dolor in est felis lorem amet vel. Risus mauris felis. Libero felis fringilla. Sed cursus metus dolor iaculis eget sit ac commodo. Molestie interdum nunc. Erat auctor suscipit. Turpis quisque nonummy. Integer vestibulum vivamus vulputate euismod et sed pretium urna metus scelerisque urna massa vestibulum neque.
+
+[heading B]
+
+[endsect]
diff --git a/src/boost/tools/quickbook/test/python/simple.xml b/src/boost/tools/quickbook/test/python/simple.xml
new file mode 100644
index 000000000..9b8f73bed
--- /dev/null
+++ b/src/boost/tools/quickbook/test/python/simple.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="simple_test_article" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Simple Test Article</title>
+ <articleinfo>
+ <copyright>
+ <year>2016</year> <holder>Daniel James</holder>
+ </copyright>
+ <legalnotice id="simple_test_article.legal">
+ <para>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</ulink>)
+ </para>
+ </legalnotice>
+ </articleinfo>
+ <section id="simple_test_article.one">
+ <title><link linkend="simple_test_article.one">One</link></title>
+ <bridgehead renderas="sect1" id="simple_test_article.one.h0">
+ <phrase id="simple_test_article.one.a"/><link linkend="simple_test_article.one.a">A</link>
+ </bridgehead>
+ <para>
+ Lorem ipsum dolor. Sit amet quis hendrerit pretium massa. Et imperdiet sit
+ luctus et nam. Eget neque vivamus nec aliquam vestibulum. Venenatis id penatibus.
+ Rutrum lobortis tempora. Turpis cras imperdiet. Quis parturient quam sed non
+ libero donec in ut aliquam aliquam purus maecenas con dolor in est felis lorem
+ amet vel. Risus mauris felis. Libero felis fringilla. Sed cursus metus dolor
+ iaculis eget sit ac commodo. Molestie interdum nunc. Erat auctor suscipit.
+ Turpis quisque nonummy. Integer vestibulum vivamus vulputate euismod et sed
+ pretium urna metus scelerisque urna massa vestibulum neque.
+ </para>
+ <bridgehead renderas="sect3" id="simple_test_article.one.h1">
+ <phrase id="simple_test_article.one.b"/><link linkend="simple_test_article.one.b">B</link>
+ </bridgehead>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/python/simple_custom_pretty_print.xml b/src/boost/tools/quickbook/test/python/simple_custom_pretty_print.xml
new file mode 100644
index 000000000..07b71e5bf
--- /dev/null
+++ b/src/boost/tools/quickbook/test/python/simple_custom_pretty_print.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="simple_test_article" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Simple Test Article</title>
+ <articleinfo>
+ <copyright>
+ <year>2016</year> <holder>Daniel James</holder>
+ </copyright>
+ <legalnotice id="simple_test_article.legal">
+ <para>
+ Distributed under the Boost Software License,
+ Version 1.0. (See accompanying file LICENSE_1_0.txt
+ or copy at <ulink url="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</ulink>)
+ </para>
+ </legalnotice>
+ </articleinfo>
+ <section id="simple_test_article.one">
+ <title><link linkend="simple_test_article.one">One</link></title>
+ <bridgehead renderas="sect1" id="simple_test_article.one.h0">
+ <phrase id="simple_test_article.one.a"/><link linkend="simple_test_article.one.a">A</link>
+ </bridgehead>
+ <para>
+ Lorem ipsum dolor. Sit amet quis hendrerit pretium
+ massa. Et imperdiet sit luctus et nam. Eget neque
+ vivamus nec aliquam vestibulum. Venenatis id penatibus.
+ Rutrum lobortis tempora. Turpis cras imperdiet. Quis
+ parturient quam sed non libero donec in ut aliquam
+ aliquam purus maecenas con dolor in est felis lorem
+ amet vel. Risus mauris felis. Libero felis fringilla.
+ Sed cursus metus dolor iaculis eget sit ac commodo.
+ Molestie interdum nunc. Erat auctor suscipit. Turpis
+ quisque nonummy. Integer vestibulum vivamus vulputate
+ euismod et sed pretium urna metus scelerisque urna
+ massa vestibulum neque.
+ </para>
+ <bridgehead renderas="sect3" id="simple_test_article.one.h1">
+ <phrase id="simple_test_article.one.b"/><link linkend="simple_test_article.one.b">B</link>
+ </bridgehead>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/python/simple_no_pretty_print.xml b/src/boost/tools/quickbook/test/python/simple_no_pretty_print.xml
new file mode 100644
index 000000000..258b4339f
--- /dev/null
+++ b/src/boost/tools/quickbook/test/python/simple_no_pretty_print.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
+ "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article
+ id="simple_test_article"
+ last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Simple Test Article</title>
+
+
+ <articleinfo>
+
+ <copyright>
+ <year>2016</year>
+ <holder>Daniel James</holder>
+ </copyright>
+
+ <legalnotice id="simple_test_article.legal">
+ <para>
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ <ulink url="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</ulink>)
+
+ </para>
+ </legalnotice>
+
+ </articleinfo>
+
+
+<section id="simple_test_article.one">
+<title><link linkend="simple_test_article.one">One</link></title>
+<bridgehead renderas="sect1" id="simple_test_article.one.h0"><phrase id="simple_test_article.one.a"/><link linkend="simple_test_article.one.a">A</link></bridgehead><para>
+Lorem ipsum dolor. Sit amet quis hendrerit pretium massa. Et imperdiet sit luctus et nam. Eget neque vivamus nec aliquam vestibulum. Venenatis id penatibus. Rutrum lobortis tempora. Turpis cras imperdiet. Quis parturient quam sed non libero donec in ut aliquam aliquam purus maecenas con dolor in est felis lorem amet vel. Risus mauris felis. Libero felis fringilla. Sed cursus metus dolor iaculis eget sit ac commodo. Molestie interdum nunc. Erat auctor suscipit. Turpis quisque nonummy. Integer vestibulum vivamus vulputate euismod et sed pretium urna metus scelerisque urna massa vestibulum neque.</para>
+<bridgehead renderas="sect3" id="simple_test_article.one.h1"><phrase id="simple_test_article.one.b"/><link linkend="simple_test_article.one.b">B</link></bridgehead></section>
+</article>
+
diff --git a/src/boost/tools/quickbook/test/python/simple_no_self_linked.xml b/src/boost/tools/quickbook/test/python/simple_no_self_linked.xml
new file mode 100644
index 000000000..37dce222e
--- /dev/null
+++ b/src/boost/tools/quickbook/test/python/simple_no_self_linked.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="simple_test_article" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Simple Test Article</title>
+ <articleinfo>
+ <copyright>
+ <year>2016</year> <holder>Daniel James</holder>
+ </copyright>
+ <legalnotice id="simple_test_article.legal">
+ <para>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</ulink>)
+ </para>
+ </legalnotice>
+ </articleinfo>
+ <section id="simple_test_article.one">
+ <title>One</title>
+ <bridgehead renderas="sect1" id="simple_test_article.one.a">
+ A
+ </bridgehead>
+ <para>
+ Lorem ipsum dolor. Sit amet quis hendrerit pretium massa. Et imperdiet sit
+ luctus et nam. Eget neque vivamus nec aliquam vestibulum. Venenatis id penatibus.
+ Rutrum lobortis tempora. Turpis cras imperdiet. Quis parturient quam sed non
+ libero donec in ut aliquam aliquam purus maecenas con dolor in est felis lorem
+ amet vel. Risus mauris felis. Libero felis fringilla. Sed cursus metus dolor
+ iaculis eget sit ac commodo. Molestie interdum nunc. Erat auctor suscipit.
+ Turpis quisque nonummy. Integer vestibulum vivamus vulputate euismod et sed
+ pretium urna metus scelerisque urna massa vestibulum neque.
+ </para>
+ <bridgehead renderas="sect3" id="simple_test_article.one.b">
+ B
+ </bridgehead>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/python/sub1/a.qbk b/src/boost/tools/quickbook/test/python/sub1/a.qbk
new file mode 100644
index 000000000..f3abe6ebf
--- /dev/null
+++ b/src/boost/tools/quickbook/test/python/sub1/a.qbk
@@ -0,0 +1,9 @@
+[/
+ Copyright 2012-2013 Daniel James
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+]
+
+a
diff --git a/src/boost/tools/quickbook/test/python/sub2/b.qbk b/src/boost/tools/quickbook/test/python/sub2/b.qbk
new file mode 100644
index 000000000..9b4336bdc
--- /dev/null
+++ b/src/boost/tools/quickbook/test/python/sub2/b.qbk
@@ -0,0 +1,9 @@
+[/
+ Copyright 2012-2013 Daniel James
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+]
+
+b
diff --git a/src/boost/tools/quickbook/test/python/svg_missing.qbk b/src/boost/tools/quickbook/test/python/svg_missing.qbk
new file mode 100644
index 000000000..1b54ece45
--- /dev/null
+++ b/src/boost/tools/quickbook/test/python/svg_missing.qbk
@@ -0,0 +1,11 @@
+[/
+ Copyright 2012-2013 Daniel James
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+]
+
+[article Dependencies for missing svg]
+
+[$missing.svg]
diff --git a/src/boost/tools/quickbook/test/python/svg_missing_deps.txt b/src/boost/tools/quickbook/test/python/svg_missing_deps.txt
new file mode 100644
index 000000000..91487e85e
--- /dev/null
+++ b/src/boost/tools/quickbook/test/python/svg_missing_deps.txt
@@ -0,0 +1,4 @@
+# Copyright 2012-2013 Daniel James
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+svg_missing.qbk
diff --git a/src/boost/tools/quickbook/test/python/svg_missing_locs.txt b/src/boost/tools/quickbook/test/python/svg_missing_locs.txt
new file mode 100644
index 000000000..0f4c9b806
--- /dev/null
+++ b/src/boost/tools/quickbook/test/python/svg_missing_locs.txt
@@ -0,0 +1,5 @@
+# Copyright 2012-2013 Daniel James
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+- html/missing.svg
++ svg_missing.qbk
diff --git a/src/boost/tools/quickbook/test/quickbook-testing.jam b/src/boost/tools/quickbook/test/quickbook-testing.jam
new file mode 100644
index 000000000..a4529497c
--- /dev/null
+++ b/src/boost/tools/quickbook/test/quickbook-testing.jam
@@ -0,0 +1,185 @@
+#
+# Copyright (c) 2005 João Abecasis
+#
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+#
+
+import feature ;
+import generators ;
+import modules ;
+import project ;
+import targets ;
+import testing ;
+import toolset ;
+import type ;
+
+feature.feature quickbook-testing.quickbook-command : : free dependency ;
+feature.feature <quickbook-test-define> : : free ;
+feature.feature <quickbook-test-include> : : free path ;
+feature.feature <quickbook-xinclude-base> : : free ;
+
+type.register QUICKBOOK_INPUT : quickbook ;
+type.register QUICKBOOK_OUTPUT ;
+type.register QUICKBOOK_HTML_OUTPUT ;
+
+generators.register-standard quickbook-testing.process-quickbook : QUICKBOOK_INPUT : QUICKBOOK_OUTPUT ;
+generators.register-standard quickbook-testing.process-quickbook-html : QUICKBOOK_INPUT : QUICKBOOK_HTML_OUTPUT ;
+
+################################################################################
+#
+# quickbook-test - generates a test for quickbook itself. A quickbook-test is
+# actually made up of two tests:
+# $(target-name).boostbook :
+# generate boostbook from $(input) or $(target-name).quickbook
+#
+# $(target-name):
+# compare generated boostbook to $(reference-output) or
+# $(input).gold or $(target-name).gold
+#
+rule quickbook-test ( target-name : input ? : reference-output ? : requirements * )
+{
+ input ?= $(target-name).quickbook ;
+ reference-output ?= $(input:S=.gold) ;
+ reference-output-html = $(input:S=.gold-html) ;
+
+ local project = [ project.current ] ;
+
+ local boost-root = [ modules.peek : BOOST_ROOT ] ;
+
+ local t1 =
+ [ targets.create-typed-target QUICKBOOK_OUTPUT
+ : $(project)
+ : $(target-name).boostbook
+ : $(input)
+ : $(requirements)
+ <location-prefix>$(target-name).test
+ <quickbook-testing.quickbook-command>$(boost-root)/tools/quickbook/src//quickbook
+ ] ;
+
+ local t2 =
+ [ targets.create-typed-target RUN
+ : $(project)
+ : $(target-name)
+ : $(boost-root)/tools/quickbook/test/src/text_diff.cpp
+ : $(requirements)
+ <location-prefix>$(target-name).test2
+ <testing.input-file>$(reference-output)
+ <testing.input-file>$(target-name).boostbook
+ <preserve-test-targets>on
+ ] ;
+
+ local t1-html =
+ [ targets.create-typed-target QUICKBOOK_HTML_OUTPUT
+ : $(project)
+ : $(target-name).html
+ : $(input)
+ : $(requirements)
+ <location-prefix>$(target-name).test-html
+ <quickbook-testing.quickbook-command>$(boost-root)/tools/quickbook/src//quickbook
+ ] ;
+
+ local t2-html =
+ [ targets.create-typed-target RUN
+ : $(project)
+ : $(target-name)-compare-html
+ : $(boost-root)/tools/quickbook/test/src/text_diff.cpp
+ : $(requirements)
+ <location-prefix>$(target-name).test-html
+ <testing.input-file>$(reference-output-html)
+ <testing.input-file>$(target-name).html
+ <preserve-test-targets>on
+ ] ;
+
+ local all-tests = [ modules.peek testing : .all-tests ] ;
+ all-tests += $(t2) $(t2-html) ;
+ modules.poke testing : .all-tests : $(all-tests) ;
+
+ return $(t1) $(t2) $(t1-html) $(t2-html) ;
+}
+
+rule quickbook-fail-test ( target-name : input ? : requirements * )
+{
+ input ?= $(target-name).quickbook ;
+
+ local project = [ project.current ] ;
+
+ local boost-root = [ modules.peek : BOOST_ROOT ] ;
+
+ local t =
+ [ targets.create-typed-target RUN_FAIL
+ : $(project)
+ : $(target-name)
+ : $(boost-root)/tools/quickbook/src//quickbook
+ : $(requirements)
+ <testing.input-file>$(input)
+ <preserve-test-targets>on
+ <dependency>$(input)
+ ]
+ ;
+
+ local all-tests = [ modules.peek testing : .all-tests ] ;
+ all-tests += $(t) ;
+ modules.poke testing : .all-tests : $(all-tests) ;
+
+ return $(t) ;
+}
+
+rule quickbook-error-test ( target-name : input ? : requirements * )
+{
+ input ?= $(target-name).quickbook ;
+
+ local project = [ project.current ] ;
+
+ local boost-root = [ modules.peek : BOOST_ROOT ] ;
+
+ local t =
+ [ targets.create-typed-target RUN
+ : $(project)
+ : $(target-name)
+ : $(boost-root)/tools/quickbook/src//quickbook
+ : $(requirements)
+ <testing.input-file>$(input)
+ <testing.arg>--expect-errors
+ <preserve-test-targets>on
+ <dependency>$(input)
+ ]
+ ;
+
+ local all-tests = [ modules.peek testing : .all-tests ] ;
+ all-tests += $(t) ;
+ modules.poke testing : .all-tests : $(all-tests) ;
+
+ return $(t) ;
+}
+
+################################################################################
+toolset.flags quickbook-testing.process-quickbook quickbook-command <quickbook-testing.quickbook-command> ;
+toolset.flags quickbook-testing.process-quickbook QB-DEFINES <quickbook-test-define> ;
+toolset.flags quickbook-testing.process-quickbook XINCLUDE <quickbook-xinclude-base> ;
+toolset.flags quickbook-testing.process-quickbook INCLUDES <quickbook-test-include> ;
+toolset.flags quickbook-testing.process-quickbook-html quickbook-command <quickbook-testing.quickbook-command> ;
+toolset.flags quickbook-testing.process-quickbook-html QB-DEFINES <quickbook-test-define> ;
+toolset.flags quickbook-testing.process-quickbook-html XINCLUDE <quickbook-xinclude-base> ;
+toolset.flags quickbook-testing.process-quickbook-html INCLUDES <quickbook-test-include> ;
+
+rule process-quickbook ( target : source : properties * )
+{
+ DEPENDS $(target) : [ on $(target) return $(quickbook-command) ] ;
+}
+
+actions process-quickbook bind quickbook-command
+{
+ $(quickbook-command) $(>) --output-file=$(<) --debug -D"$(QB-DEFINES)" -I"$(INCLUDES)" --xinclude-base="$(XINCLUDE)"
+}
+
+rule process-quickbook-html ( target : source : properties * )
+{
+ DEPENDS $(target) : [ on $(target) return $(quickbook-command) ] ;
+}
+
+actions process-quickbook-html bind quickbook-command
+{
+ $(quickbook-command) $(>) --output-format=onehtml --output-file=$(<) --debug -D"$(QB-DEFINES)" -I"$(INCLUDES)" --xinclude-base="$(XINCLUDE)"
+}
diff --git a/src/boost/tools/quickbook/test/quickbook_manual-1_4.gold b/src/boost/tools/quickbook/test/quickbook_manual-1_4.gold
new file mode 100644
index 000000000..86d2eda66
--- /dev/null
+++ b/src/boost/tools/quickbook/test/quickbook_manual-1_4.gold
@@ -0,0 +1,3945 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="quickbook" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Quickbook 1.4</title>
+ <articleinfo>
+ <authorgroup>
+ <author>
+ <firstname>Joel</firstname> <surname>de Guzman</surname>
+ </author>
+ <author>
+ <firstname>Eric</firstname> <surname>Niebler</surname>
+ </author>
+ </authorgroup>
+ <copyright>
+ <year>2002</year> <year>2004</year> <year>2006</year> <holder>Joel de Guzman,
+ Eric Niebler</holder>
+ </copyright>
+ <legalnotice id="quickbook.legal">
+ <para>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at <ulink url="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</ulink>)
+ </para>
+ </legalnotice>
+ <articlepurpose>
+ <emphasis>WikiWiki</emphasis> style documentation tool
+ </articlepurpose>
+ </articleinfo>
+ <section id="quickbook.intro">
+ <title><link linkend="quickbook.intro">Introduction</link></title>
+ <blockquote>
+ <para>
+ <emphasis role="bold"><emphasis><quote>Why program by hand in five days what
+ you can spend five years of your life automating?</quote></emphasis></emphasis>
+ </para>
+ <para>
+ -- Terrence Parr, author ANTLR/PCCTS
+ </para>
+ </blockquote>
+ <para>
+ Well, QuickBook started as a weekend hack. It was originally intended to be
+ a sample application using <ulink url="http://spirit.sourceforge.net">Spirit</ulink>.
+ What is it? What you are viewing now, this documentation, is autogenerated
+ by QuickBook. These files were generated from one master:
+ </para>
+ <blockquote>
+ <para>
+ <ulink url="../quickbook.qbk">quickbook.qbk</ulink>
+ </para>
+ </blockquote>
+ <para>
+ Originally named QuickDoc, this funky tool that never dies evolved into a funkier
+ tool thanks to Eric Niebler who resurrected the project making it generate
+ <ulink url="http://www.boost.org/doc/html/boostbook.html">BoostBook</ulink>
+ instead of HTML. The <ulink url="http://www.boost.org/doc/html/boostbook.html">BoostBook</ulink>
+ documentation format is an extension of <ulink url="http://www.docbook.org/">DocBook</ulink>,
+ an SGML or XML based format for describing documentation.
+ </para>
+ <para>
+ QuickBook is a WikiWiki style documentation tool geared towards C++ documentation
+ using simple rules and markup for simple formatting tasks. QuickBook extends
+ the WikiWiki concept. Like the WikiWiki, QuickBook documents are simple text
+ files. A single QuickBook document can generate a fully linked set of nice
+ HTML and PostScript/PDF documents complete with images and syntax- colorized
+ source code.
+ </para>
+ <para>
+ Features include:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ generate <ulink url="http://www.boost.org/doc/html/boostbook.html">BoostBook</ulink>
+ xml, to generate HTML, PostScript and PDF
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ simple markup to link to Doxygen-generated entities
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ macro system for simple text substitution
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ simple markup for italics, bold, preformatted, blurbs, code samples, tables,
+ URLs, anchors, images, etc.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ automatic syntax coloring of code samples
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ CSS support
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="quickbook.change_log">
+ <title><link linkend="quickbook.change_log">Change Log</link></title>
+ <bridgehead renderas="sect3" id="quickbook.change_log.h0">
+ <phrase id="quickbook.change_log.version_1_3"/><link linkend="quickbook.change_log.version_1_3">Version
+ 1.3</link>
+ </bridgehead>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Quickbook file inclusion [include].
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Better xml output (pretty layout). Check out the generated XML.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Regression testing facility: to make sure your document will always be
+ compatible (full backward compatibility) regardless of changes to QuickBook.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Code cleanup and refactoring.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Allow phrase markup in the doc-info.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Preformatted code blocks via ``code`` (double ticks) allows code in tables
+ and lists, for example.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Quickbook versioning; allows full backward compatibility. You have to add
+ [quickbook 1.3] to the doc-info header to enable the new features. Without
+ this, QuickBook will assume that the document is a pre-1.3 document.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Better (intuitive) paragraph termination. Some markups may terminate a
+ paragraph. Example:
+<programlisting><phrase role="special">[</phrase><phrase role="identifier">section</phrase> <phrase role="identifier">x</phrase><phrase role="special">]</phrase>
+<phrase role="identifier">blah</phrase><phrase role="special">...</phrase>
+<phrase role="special">[</phrase><phrase role="identifier">endsect</phrase><phrase role="special">]</phrase></programlisting>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Fully qualified section and headers. Subsection names are concatenated
+ to the ID to avoid clashing. Example: <code><phrase role="identifier">doc_name</phrase><phrase
+ role="special">.</phrase><phrase role="identifier">sect_name</phrase><phrase
+ role="special">.</phrase><phrase role="identifier">sub_sect_name</phrase><phrase
+ role="special">.</phrase><phrase role="identifier">sub_sub_sect_name</phrase></code>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Better &amp;nbsp; and whitespace handling in code snippets.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ [xinclude] fixes up the relative path to the target XML file when input_directory
+ is not the same as the output_directory.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Allow untitled tables.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Allow phrase markups in section titles.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Allow escaping back to QuickBook from code, code blocks and inline code.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Footnotes, with the [footnote This is the footnote] syntax.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Post-processor bug fix for escaped XML code that it does not recognize.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Replaceable, with the [~replacement] syntax.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Generic Headers
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Code changes to allow full recursion (i.e. Collectors and push/pop functions)
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Various code cleanup/maintenance
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Templates!
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ [conceptref] for referencing BoostBook &lt;concept&gt; entities.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Allow escape of spaces. The escaped space is removed from the output. Syntax:
+ <code><phrase role="special">\</phrase> </code>.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Nested comments are now allowed.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Quickbook blocks can nest inside comments.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <link linkend="quickbook.syntax.block.import">Import</link> facility.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Callouts on imported code
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Simple markups can now span a whole block.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <link linkend="quickbook.syntax.block.blurbs">Blurbs</link>, <link linkend="quickbook.syntax.block.admonitions">Admonitions</link>
+ and table cells (see <link linkend="quickbook.syntax.block.tables">Tables</link>)
+ may now contain paragraphs.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <code><phrase role="special">\</phrase><phrase role="identifier">n</phrase></code>
+ and <code><phrase role="special">[</phrase><phrase role="identifier">br</phrase><phrase
+ role="special">]</phrase></code> are now deprecated.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="quickbook.syntax">
+ <title><link linkend="quickbook.syntax">Syntax Summary</link></title>
+ <para>
+ 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.
+ </para>
+ <para>
+ 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.
+ </para>
+ <section id="quickbook.syntax.comments">
+ <title><link linkend="quickbook.syntax.comments">Comments</link></title>
+ <para>
+ Can be placed anywhere.
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[/ comment (no output generated) ]<!--quickbook-escape-postfix-->
+</programlisting>
+<programlisting><!--quickbook-escape-prefix-->[/ comments can be nested [/ some more here] ]<!--quickbook-escape-postfix-->
+</programlisting>
+<programlisting><!--quickbook-escape-prefix-->[/ Quickbook blocks can nest inside comments. [*Comment this out too!] ]<!--quickbook-escape-postfix-->
+</programlisting>
+ </section>
+ <section id="quickbook.syntax.phrase">
+ <title><link linkend="quickbook.syntax.phrase">Phrase Level Elements</link></title>
+ <section id="quickbook.syntax.phrase.font_styles">
+ <title><link linkend="quickbook.syntax.phrase.font_styles">Font Styles</link></title>
+<programlisting><!--quickbook-escape-prefix-->['italic], [*bold], [_underline], [^teletype], [-strikethrough]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ will generate:
+ </para>
+ <para>
+ <emphasis>italic</emphasis>, <emphasis role="bold">bold</emphasis>, <emphasis
+ role="underline">underline</emphasis>, <literal>teletype</literal>, <emphasis
+ role="strikethrough">strikethrough</emphasis>
+ </para>
+ <para>
+ Like all non-terminal phrase level elements, this can of course be nested:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[*['bold-italic]]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ will generate:
+ </para>
+ <para>
+ <emphasis role="bold"><emphasis>bold-italic</emphasis></emphasis>
+ </para>
+ </section>
+ <section id="quickbook.syntax.phrase.replaceable">
+ <title><link linkend="quickbook.syntax.phrase.replaceable">Replaceable</link></title>
+ <para>
+ When you want content that may or must be replaced by the user, use the
+ syntax:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[~replacement]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ This will generate:
+ </para>
+ <para>
+ <replaceable>replacement</replaceable>
+ </para>
+ </section>
+ <section id="quickbook.syntax.phrase.quotations">
+ <title><link linkend="quickbook.syntax.phrase.quotations">Quotations</link></title>
+<programlisting><!--quickbook-escape-prefix-->["A question that sometimes drives me hazy: am I or are the others crazy?]--Einstein
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ will generate:
+ </para>
+ <para>
+ <quote>A question that sometimes drives me hazy: am I or are the others
+ crazy?</quote>--Einstein
+ </para>
+ <para>
+ Note the proper left and right quote marks. Also, while you can simply
+ use ordinary quote marks like &quot;quoted&quot;, our quotation, above,
+ will generate correct DocBook quotations (e.g. &lt;quote&gt;quoted&lt;/quote&gt;).
+ </para>
+ <para>
+ Like all phrase elements, quotations may be nested. Example:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->["Here's the rule for bargains: ["Do other men, for they would do you.] That's
+the true business precept.]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ will generate:
+ </para>
+ <para>
+ <quote>Here's the rule for bargains: <quote>Do other men, for they would
+ do you.</quote> That's the true business precept.</quote>
+ </para>
+ </section>
+ <section id="quickbook.syntax.phrase.simple_formatting">
+ <title><link linkend="quickbook.syntax.phrase.simple_formatting">Simple formatting</link></title>
+ <para>
+ Simple markup for formatting text, common in many applications, is now
+ supported:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->/italic/, *bold*, _underline_, =teletype=
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ will generate:
+ </para>
+ <para>
+ <emphasis>italic</emphasis>, <emphasis role="bold">bold</emphasis>, <emphasis
+ role="underline">underline</emphasis>, <literal>teletype</literal>
+ </para>
+ <para>
+ Unlike QuickBook's standard formatting scheme, the rules for simpler alternatives
+ are much stricter<footnote id="quickbook.syntax.phrase.simple_formatting.f0">
+ <para>
+ Thanks to David Barrett, author of <ulink url="http://quinthar.com/qwikiwiki/index.php?page=Home">Qwiki</ulink>,
+ for sharing these samples and teaching me these obscure formatting rules.
+ I wasn't sure at all if <ulink url="http://spirit.sourceforge.net">Spirit</ulink>,
+ being more or less a formal EBNF parser, can handle the context sensitivity
+ and ambiguity.
+ </para>
+ </footnote>.
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Simple markups cannot nest. You can combine a simple markup with a
+ nestable markup.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Simple markups cannot contain any other form of quickbook markup.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A non-space character must follow the leading markup
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A non-space character must precede the trailing markup
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A space or a punctuation must follow the trailing markup
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ 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: ']'.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A line starting with the star will be interpreted as an unordered list.
+ See <link linkend="quickbook.syntax.block.lists.unordered_lists">Unordered
+ lists</link>.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <table frame="all" id="quickbook.syntax.phrase.simple_formatting.t0">
+ <title>More Formatting Samples</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Markup
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Result
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ <literal>*Bold*</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <emphasis role="bold">Bold</emphasis>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <literal>*Is bold*</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <emphasis role="bold">Is bold</emphasis>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <literal>* Not bold* *Not bold * * Not bold *</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ * Not bold* *Not bold * * Not bold *
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <literal>This*Isn't*Bold (no bold)</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ This*Isn't*Bold (no bold)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <literal>(*Bold Inside*) (parenthesis not bold)</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ (<emphasis role="bold">Bold Inside</emphasis>) (parenthesis not
+ bold)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <literal>*(Bold Outside)* (parenthesis bold)</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <emphasis role="bold">(Bold Outside)</emphasis> (parenthesis
+ bold)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <literal>3*4*5 = 60 (no bold)</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ 3*4*5 = 60 (no bold)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <literal>3 * 4 * 5 = 60 (no bold)</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ 3 * 4 * 5 = 60 (no bold)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <literal>3 *4* 5 = 60 (4 is bold)</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ 3 <emphasis role="bold">4</emphasis> 5 = 60 (4 is bold)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <literal>*This is bold* this is not *but this is*</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <emphasis role="bold">This is bold</emphasis> this is not <emphasis
+ role="bold">but this is</emphasis>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <literal>*This is bold*.</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <emphasis role="bold">This is bold</emphasis>.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <literal>*B*. (bold B)</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <emphasis role="bold">B</emphasis>. (bold B)
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <literal>['*Bold-Italic*]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <emphasis><emphasis role="bold">Bold-Italic</emphasis></emphasis>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <literal>*side-by*/-side/</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <emphasis role="bold">side-by</emphasis><emphasis>-side</emphasis>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <para>
+ As mentioned, simple markups cannot go past a single block. The text from
+ &quot;have&quot; to &quot;full&quot; in the following paragraph will be
+ rendered as bold:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->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.
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ Baa baa black sheep, <emphasis role="bold">have you any wool? Yes sir,
+ yes sir, three bags full!</emphasis> One for the master, one for the dame,
+ And one for the little boy who lives down the lane.
+ </para>
+ <para>
+ But in the following paragraph, bold is not applied:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->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.
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ 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.
+ </para>
+ </section>
+ <section id="quickbook.syntax.phrase.inline_code">
+ <title><link linkend="quickbook.syntax.phrase.inline_code">Inline code</link></title>
+ <para>
+ Inlining code in paragraphs is quite common when writing C++ documentation.
+ We provide a very simple markup for this. For example, this:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->This text has inlined code `int main() { return 0; }` in it.
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ will generate:
+ </para>
+ <para>
+ This text has inlined code <code><phrase role="keyword">int</phrase> <phrase
+ role="identifier">main</phrase><phrase role="special">()</phrase> <phrase
+ role="special">{</phrase> <phrase role="keyword">return</phrase> <phrase
+ role="number">0</phrase><phrase role="special">;</phrase> <phrase role="special">}</phrase></code>
+ in it. The code will be syntax highlighted.
+ </para>
+ <note>
+ <para>
+ We simply enclose the code with the tick: <literal>"`"</literal>, not the
+ single quote: <code><phrase role="string">&quot;'&quot;</phrase></code>.
+ Note too that <literal>`some code`</literal> is preferred over <literal>[^some code]</literal>.
+ </para>
+ </note>
+ </section>
+ <section id="quickbook.syntax.phrase.code_blocks">
+ <title><link linkend="quickbook.syntax.phrase.code_blocks">Code blocks</link></title>
+ <para>
+ Preformatted code simply starts with a space or a tab (See <link linkend="quickbook.syntax.block.code">Code</link>).
+ However, such a simple syntax cannot be used as phrase elements in lists
+ (See <link linkend="quickbook.syntax.block.lists.ordered_lists">Ordered
+ lists</link> and <link linkend="quickbook.syntax.block.lists.unordered_lists">Unordered
+ lists</link>), tables (See <link linkend="quickbook.syntax.block.tables">Tables</link>),
+ etc. Inline code (see above) can. The problem is, inline code does not
+ allow formatting with newlines, spaces, and tabs. These are lost.
+ </para>
+ <para>
+ 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:
+ </para>
+<programlisting>``
+ #include &lt;iostream&gt;
+
+ int main()
+ {
+ std::cout &lt;&lt; &quot;Hello, World!&quot; &lt;&lt; std::endl;
+ return 0;
+ }
+``
+</programlisting>
+ <para>
+ will generate:
+ </para>
+ <para>
+<programlisting><phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">iostream</phrase><phrase role="special">&gt;</phrase>
+
+<phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;Hello, World!&quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ </section>
+ <section id="quickbook.syntax.phrase.source_mode">
+ <title><link linkend="quickbook.syntax.phrase.source_mode">Source Mode</link></title>
+ <para>
+ 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 <link linkend="quickbook.syntax.block.document">Document</link>
+ section.
+ </para>
+ <para>
+ To change the source mode, use the <literal>[source-mode]</literal> markup,
+ where <literal>source-mode</literal> is one of the supported modes. For
+ example, this:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->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`.
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ will generate:
+ </para>
+ <para>
+ Python's <code><phrase role="keyword">import</phrase></code> is rather
+ like C++'s <code><phrase role="preprocessor">#include</phrase></code>.
+ A C++ comment <code><phrase role="comment">// looks like this</phrase></code>
+ whereas a Python comment <code><phrase role="comment">#looks like this</phrase></code>.
+ </para>
+ <table frame="all" id="quickbook.syntax.phrase.source_mode.t0">
+ <title>Supported Source Modes</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Mode
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Source Mode Markup
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ C++
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[c++]</literal>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Python
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[python]</literal>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <note>
+ <para>
+ The source mode strings are lowercase.
+ </para>
+ </note>
+ </section>
+ <section id="quickbook.syntax.phrase.line_break">
+ <title><link linkend="quickbook.syntax.phrase.line_break">line-break</link></title>
+<programlisting><!--quickbook-escape-prefix-->[br]
+<!--quickbook-escape-postfix--></programlisting>
+ <warning>
+ <para>
+ <code><phrase role="special">[</phrase><phrase role="identifier">br</phrase><phrase
+ role="special">]</phrase></code> is now deprecated. <link linkend="quickbook.syntax.block.blurbs">Blurbs</link>,
+ <link linkend="quickbook.syntax.block.admonitions">Admonitions</link>
+ and table cells (see <link linkend="quickbook.syntax.block.tables">Tables</link>)
+ may now contain paragraphs.
+ </para>
+ </warning>
+ </section>
+ <section id="quickbook.syntax.phrase.anchors">
+ <title><link linkend="quickbook.syntax.phrase.anchors">Anchors</link></title>
+<programlisting><!--quickbook-escape-prefix-->[#named_anchor]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ A named anchor is a hook that can be referenced by a link elsewhere in
+ the document. You can then reference an anchor with <literal>[link named_anchor
+Some link text]</literal>.
+ See <link linkend="quickbook.syntax.phrase.anchor_links">Anchor links</link>,
+ <link linkend="quickbook.syntax.block.section">Section</link> and <link
+ linkend="quickbook.syntax.block.headings">Heading</link>.
+ </para>
+ </section>
+ <section id="quickbook.syntax.phrase.links">
+ <title><link linkend="quickbook.syntax.phrase.links">Links</link></title>
+<programlisting><!--quickbook-escape-prefix-->[@http://www.boost.org this is [*boost's] website....]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ will generate:
+ </para>
+ <para>
+ <ulink url="http://www.boost.org">this is <emphasis role="bold">boost's</emphasis>
+ website....</ulink>
+ </para>
+ <para>
+ URL links where the link text is the link itself is common. Example:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->see http://spirit.sourceforge.net/
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ so, when the text is absent in a link markup, the URL is assumed. Example:
+ </para>
+<programlisting>see <!--quickbook-escape-prefix-->[@http://spirit.sourceforge.net/]<!--quickbook-escape-postfix-->
+</programlisting>
+ <para>
+ will generate:
+ </para>
+ <para>
+ see <ulink url="http://spirit.sourceforge.net/">http://spirit.sourceforge.net/</ulink>
+ </para>
+ </section>
+ <section id="quickbook.syntax.phrase.anchor_links">
+ <title><link linkend="quickbook.syntax.phrase.anchor_links">Anchor links</link></title>
+ <para>
+ You can link within a document using:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[link section_id.normalized_header_text The link text]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ See sections <link linkend="quickbook.syntax.block.section">Section</link>
+ and <link linkend="quickbook.syntax.block.headings">Heading</link> for
+ more info.
+ </para>
+ </section>
+ <section id="quickbook.syntax.phrase.refentry_links">
+ <title><link linkend="quickbook.syntax.phrase.refentry_links">refentry links</link></title>
+ <para>
+ In addition, you can link internally to an XML refentry like:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[link xml.refentry The link text]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ This gets converted into <literal>&lt;link linkend=&quot;xml.refentry&quot;&gt;The
+ link text&lt;/link&gt;</literal>.
+ </para>
+ <para>
+ Like URLs, the link text is optional. If this is not present, the link
+ text will automatically be the refentry. Example:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[link xml.refentry]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ This gets converted into <literal>&lt;link linkend=&quot;xml.refentry&quot;&gt;xml.refentry&lt;/link&gt;</literal>.
+ </para>
+ </section>
+ <section id="quickbook.syntax.phrase.code_links">
+ <title><link linkend="quickbook.syntax.phrase.code_links">Code Links</link></title>
+ <para>
+ If you want to link to a function, class, member, enum, concept or header
+ in the reference section, you can use:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[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]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ Again, the link text is optional. If this is not present, the link text
+ will automatically be the function, class, member, enum, macro, concept
+ or header. Example:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[classref boost::bar::baz]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ would have &quot;boost::bar::baz&quot; as the link text.
+ </para>
+ </section>
+ <section id="quickbook.syntax.phrase.escape">
+ <title><link linkend="quickbook.syntax.phrase.escape">Escape</link></title>
+ <para>
+ The escape mark-up is used when we don't want to do any processing.
+ </para>
+<programlisting>'''
+escape (no processing/formatting)
+'''
+</programlisting>
+ <para>
+ Escaping allows us to pass XML markup to <ulink url="http://www.boost.org/doc/html/boostbook.html">BoostBook</ulink>
+ or <ulink url="http://www.docbook.org/">DocBook</ulink>. For example:
+ </para>
+<programlisting>'''
+&lt;emphasis role=&quot;bold&quot;&gt;This is direct XML markup&lt;/emphasis&gt;
+'''
+</programlisting>
+ <para>
+ <emphasis role="bold">This is direct XML markup</emphasis>
+ </para>
+ <important>
+ <para>
+ Be careful when using the escape. The text must conform to <ulink url="http://www.boost.org/doc/html/boostbook.html">BoostBook</ulink>/<ulink
+ url="http://www.docbook.org/">DocBook</ulink> syntax.
+ </para>
+ </important>
+ </section>
+ <section id="quickbook.syntax.phrase.single_char_escape">
+ <title><link linkend="quickbook.syntax.phrase.single_char_escape">Single
+ char escape</link></title>
+ <para>
+ 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 <code><phrase
+ role="special">[</phrase></code> and <code><phrase role="special">]</phrase></code>.
+ For example, how do you escape the triple quote? Simple: <literal>\'\'\'</literal>
+ </para>
+ <para>
+ <code><phrase role="special">\</phrase><phrase role="identifier">n</phrase></code>
+ has a special meaning. It is used to generate line breaks.
+ </para>
+ <warning>
+ <para>
+ <code><phrase role="special">\</phrase><phrase role="identifier">n</phrase></code>
+ and <code><phrase role="special">[</phrase><phrase role="identifier">br</phrase><phrase
+ role="special">]</phrase></code> are now deprecated. <link linkend="quickbook.syntax.block.blurbs">Blurbs</link>,
+ <link linkend="quickbook.syntax.block.admonitions">Admonitions</link>
+ and table cells (see <link linkend="quickbook.syntax.block.tables">Tables</link>)
+ may now contain paragraphs.
+ </para>
+ </warning>
+ <para>
+ The escaped space: <code><phrase role="special">\</phrase> </code> also
+ has a special meaning. The escaped space is removed from the output.
+ </para>
+ </section>
+ <section id="quickbook.syntax.phrase.images">
+ <title><link linkend="quickbook.syntax.phrase.images">Images</link></title>
+<programlisting><!--quickbook-escape-prefix-->[$image.jpg]
+<!--quickbook-escape-postfix--></programlisting>
+ </section>
+ <section id="quickbook.syntax.phrase.footnotes">
+ <title><link linkend="quickbook.syntax.phrase.footnotes">Footnotes</link></title>
+ <para>
+ As of version 1.3, QuickBook supports footnotes. Just put the text of the
+ footnote in a <code><phrase role="special">[</phrase><phrase role="identifier">footnote</phrase><phrase
+ role="special">]</phrase></code> block, and the text will be put at the
+ bottom of the current page. For example, this:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[footnote A sample footnote]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ will generate this<footnote id="quickbook.syntax.phrase.footnotes.f0">
+ <para>
+ A sample footnote
+ </para>
+ </footnote>.
+ </para>
+ <section id="quickbook.syntax.phrase.footnotes.macro_expansion">
+ <title><link linkend="quickbook.syntax.phrase.footnotes.macro_expansion">Macro
+ Expansion</link></title>
+<programlisting><!--quickbook-escape-prefix-->__a_macro_identifier__
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ See <link linkend="quickbook.syntax.block.macros">Macros</link> for details.
+ </para>
+ </section>
+ <section id="quickbook.syntax.phrase.footnotes.template_expansion">
+ <title><link linkend="quickbook.syntax.phrase.footnotes.template_expansion">Template
+ Expansion</link></title>
+<programlisting><!--quickbook-escape-prefix-->[a_template_identifier]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ See <link linkend="quickbook.syntax.block.templates">Templates</link>
+ for details.
+ </para>
+ </section>
+ </section>
+ </section>
+ <section id="quickbook.syntax.block">
+ <title><link linkend="quickbook.syntax.block">Block Level Elements</link></title>
+ <section id="quickbook.syntax.block.document">
+ <title><link linkend="quickbook.syntax.block.document">Document</link></title>
+ <para>
+ Every document must begin with a Document Info section, which should look
+ like this:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[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]
+]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ Where document-type is one of:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ book
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ article
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ library
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ chapter
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ part
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ appendix
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ preface
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ qandadiv
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ qandaset
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ reference
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ set
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ quickbook 1.3 declares the version of quickbook the document is written
+ for. In its absence, version 1.1 is assumed.
+ </para>
+ <para>
+ <literal>version</literal>, <literal>id</literal>, <literal>dirname</literal>,
+ <literal>copyright</literal>, <literal>purpose</literal>, <literal>category</literal>,
+ <literal>authors</literal>, <literal>license</literal>, <literal>last-revision</literal>
+ and <literal>source-mode</literal> are optional information.
+ </para>
+ <para>
+ <literal>source-type</literal> is a lowercase string setting the initial
+ <link linkend="quickbook.syntax.phrase.source_mode">Source Mode</link>.
+ If the <literal>source-mode</literal> field is omitted, a default value
+ of <literal>c++</literal> will be used.
+ </para>
+ </section>
+ <section id="quickbook.syntax.block.section">
+ <title><link linkend="quickbook.syntax.block.section">Section</link></title>
+ <para>
+ Starting a new section is accomplished with:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[section:id The Section Title]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ where <emphasis>id</emphasis> is optional. id will be the filename of the
+ generated section. If it is not present, &quot;The Section Title&quot;
+ will be normalized and become the id. Valid characters are <literal>a-Z</literal>,
+ <literal>A-Z</literal>, <literal>0-9</literal> and <literal>_</literal>.
+ All non-valid characters are converted to underscore and all upper-case
+ are converted to lower case. Thus: &quot;The Section Title&quot; will be
+ normalized to &quot;the_section_title&quot;.
+ </para>
+ <para>
+ End a section with:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[endsect]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ Sections can nest, and that results in a hierarchy in the table of contents.
+ </para>
+ </section>
+ <section id="quickbook.syntax.block.xinclude">
+ <title><link linkend="quickbook.syntax.block.xinclude">xinclude</link></title>
+ <para>
+ You can include another XML file with:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[xinclude file.xml]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ This is useful when file.xml has been generated by Doxygen and contains
+ your reference section.
+ </para>
+ </section>
+ <section id="quickbook.syntax.block.paragraphs">
+ <title><link linkend="quickbook.syntax.block.paragraphs">Paragraphs</link></title>
+ <para>
+ 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.
+ </para>
+ </section>
+ <section id="quickbook.syntax.block.lists">
+ <title><link linkend="quickbook.syntax.block.lists">Lists</link></title>
+ <section id="quickbook.syntax.block.lists.ordered_lists">
+ <title><link linkend="quickbook.syntax.block.lists.ordered_lists">Ordered
+ lists</link></title>
+<programlisting># One
+# Two
+# Three
+</programlisting>
+ <para>
+ will generate:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ One
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Two
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Three
+ </simpara>
+ </listitem>
+ </orderedlist>
+ </section>
+ <section id="quickbook.syntax.block.lists.list_hierarchies">
+ <title><link linkend="quickbook.syntax.block.lists.list_hierarchies">List
+ Hierarchies</link></title>
+ <para>
+ List hierarchies are supported. Example:
+ </para>
+<programlisting># One
+# Two
+# Three
+ # Three.a
+ # Three.b
+ # Three.c
+# Four
+ # Four.a
+ # Four.a.i
+ # Four.a.ii
+# Five
+</programlisting>
+ <para>
+ will generate:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ One
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Two
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Three
+ <orderedlist>
+ <listitem>
+ <simpara>
+ Three.a
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Three.b
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Three.c
+ </simpara>
+ </listitem>
+ </orderedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Fourth
+ <orderedlist>
+ <listitem>
+ <simpara>
+ Four.a
+ <orderedlist>
+ <listitem>
+ <simpara>
+ Four.a.i
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Four.a.ii
+ </simpara>
+ </listitem>
+ </orderedlist>
+ </simpara>
+ </listitem>
+ </orderedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Five
+ </simpara>
+ </listitem>
+ </orderedlist>
+ </section>
+ <section id="quickbook.syntax.block.lists.long_list_lines">
+ <title><link linkend="quickbook.syntax.block.lists.long_list_lines">Long
+ List Lines</link></title>
+ <para>
+ Long lines will be wrapped appropriately. Example:
+ </para>
+<programlisting># 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.
+</programlisting>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ A short item.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ 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.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A short item.
+ </simpara>
+ </listitem>
+ </orderedlist>
+ </section>
+ <section id="quickbook.syntax.block.lists.unordered_lists">
+ <title><link linkend="quickbook.syntax.block.lists.unordered_lists">Unordered
+ lists</link></title>
+<programlisting><!--quickbook-escape-prefix-->* First
+* Second
+* Third
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ will generate:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ First
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Second
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Third
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="quickbook.syntax.block.lists.mixed_lists">
+ <title><link linkend="quickbook.syntax.block.lists.mixed_lists">Mixed lists</link></title>
+ <para>
+ Mixed lists (ordered and unordered) are supported. Example:
+ </para>
+<programlisting><!--quickbook-escape-prefix--># One
+# Two
+# Three
+ * Three.a
+ * Three.b
+ * Three.c
+# Four
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ will generate:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ One
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Two
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Three
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Three.a
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Three.b
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Three.c
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Four
+ </simpara>
+ </listitem>
+ </orderedlist>
+ <para>
+ And...
+ </para>
+<programlisting><!--quickbook-escape-prefix--># 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
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ will generate:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ 1
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ 1.a
+ <orderedlist>
+ <listitem>
+ <simpara>
+ 1.a.1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ 1.a.2
+ </simpara>
+ </listitem>
+ </orderedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ 1.b
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ 2
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ 2.a
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ 2.b
+ <orderedlist>
+ <listitem>
+ <simpara>
+ 2.b.1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ 2.b.2
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ 2.b.2.a
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ 2.b.2.b
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </orderedlist>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ </orderedlist>
+ </section>
+ </section>
+ <section id="quickbook.syntax.block.code">
+ <title><link linkend="quickbook.syntax.block.code">Code</link></title>
+ <para>
+ Preformatted code starts with a space or a tab. The code will be syntax
+ highlighted according to the current <link linkend="quickbook.syntax.phrase.source_mode">Source
+ Mode</link>:
+ </para>
+<programlisting><phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">iostream</phrase><phrase role="special">&gt;</phrase>
+
+<phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="comment">// Sample code</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;Hello, World\n&quot;</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+<programlisting><phrase role="keyword">import</phrase> <phrase role="identifier">cgi</phrase>
+
+<phrase role="keyword">def</phrase> <phrase role="identifier">cookForHtml</phrase><phrase role="special">(</phrase><phrase role="identifier">text</phrase><phrase role="special">):</phrase>
+ <phrase role="string">'''&quot;Cooks&quot; the input text for HTML.'''</phrase>
+
+ <phrase role="keyword">return</phrase> <phrase role="identifier">cgi</phrase><phrase role="special">.</phrase><phrase role="identifier">escape</phrase><phrase role="special">(</phrase><phrase role="identifier">text</phrase><phrase role="special">)</phrase>
+</programlisting>
+ <para>
+ Macros that are already defined are expanded in source code. Example:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[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__;
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ Generates:
+ </para>
+<programlisting><phrase role="keyword">using</phrase> <ulink url="http://www.boost.org/libs/libraries.htm">boost</ulink><phrase role="special">::</phrase><ulink url="http://www.boost.org/doc/html/array/reference.html">array</ulink><phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ <section id="quickbook.syntax.block.escape_back">
+ <title><link linkend="quickbook.syntax.block.escape_back">Escaping Back To
+ QuickBook</link></title>
+ <para>
+ 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 <emphasis>escape-back</emphasis> delimiter. In C++
+ and Python, the delimiter is the double tick (back-quote): &quot;``&quot;
+ and &quot;``&quot;. Example:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->void ``[@http://en.wikipedia.org/wiki/Foo#Foo.2C_Bar_and_Baz foo]``()
+{
+}
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ Will generate:
+ </para>
+<programlisting><phrase role="keyword">void</phrase> <ulink url="http://en.wikipedia.org/wiki/Foo#Foo.2C_Bar_and_Baz">foo</ulink><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ <para>
+ When escaping from code to QuickBook, only phrase level markups are allowed.
+ Block level markups like lists, tables etc. are not allowed.
+ </para>
+ </section>
+ <section id="quickbook.syntax.block.preformatted">
+ <title><link linkend="quickbook.syntax.block.preformatted">Preformatted</link></title>
+ <para>
+ Sometimes, you don't want some preformatted text to be parsed as C++. In
+ such cases, use the <literal>[pre ... ]</literal> markup block.
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[pre
+
+ Some *preformatted* text Some *preformatted* text
+
+ Some *preformatted* text Some *preformatted* text
+
+ Some *preformatted* text Some *preformatted* text
+
+]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ 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:
+ </para>
+<programlisting>Some <emphasis role="bold">preformatted</emphasis> text Some <emphasis role="bold">preformatted</emphasis> text
+
+ Some <emphasis role="bold">preformatted</emphasis> text Some <emphasis role="bold">preformatted</emphasis> text
+
+ Some <emphasis role="bold">preformatted</emphasis> text Some <emphasis role="bold">preformatted</emphasis> text
+
+</programlisting>
+ <para>
+ Notice that unlike Code, phrase markup such as font style is still permitted
+ inside <literal>pre</literal> blocks.
+ </para>
+ </section>
+ <section id="quickbook.syntax.block.blockquote">
+ <title><link linkend="quickbook.syntax.block.blockquote">Blockquote</link></title>
+<programlisting><!--quickbook-escape-prefix-->[:sometext...]<!--quickbook-escape-postfix-->
+</programlisting>
+ <blockquote>
+ <para>
+ Indents the paragraph. This applies to one paragraph only.
+ </para>
+ </blockquote>
+ </section>
+ <section id="quickbook.syntax.block.admonitions">
+ <title><link linkend="quickbook.syntax.block.admonitions">Admonitions</link></title>
+<programlisting><!--quickbook-escape-prefix-->[note This is a note]
+[tip This is a tip]
+[important This is important]
+[caution This is a caution]
+[warning This is a warning]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ generates <ulink url="http://www.docbook.org/">DocBook</ulink> admonitions:
+ </para>
+ <note>
+ <para>
+ This is a note
+ </para>
+ </note>
+ <tip>
+ <para>
+ This is a tip
+ </para>
+ </tip>
+ <important>
+ <para>
+ This is important
+ </para>
+ </important>
+ <caution>
+ <para>
+ This is a caution
+ </para>
+ </caution>
+ <warning>
+ <para>
+ This is a warning
+ </para>
+ </warning>
+ <para>
+ These are the only admonitions supported by <ulink url="http://www.docbook.org/">DocBook</ulink>.
+ So, for example <literal>[information This is some information]</literal>
+ is unlikely to produce the desired effect.
+ </para>
+ </section>
+ <section id="quickbook.syntax.block.headings">
+ <title><link linkend="quickbook.syntax.block.headings">Headings</link></title>
+<programlisting><!--quickbook-escape-prefix-->[h1 Heading 1]
+[h2 Heading 2]
+[h3 Heading 3]
+[h4 Heading 4]
+[h5 Heading 5]
+[h6 Heading 6]
+<!--quickbook-escape-postfix--></programlisting>
+ <bridgehead renderas="sect1" id="quickbook.syntax.block.headings.h0">
+ <phrase id="quickbook.syntax.block.headings.heading_1"/><link linkend="quickbook.syntax.block.headings.heading_1">Heading
+ 1</link>
+ </bridgehead>
+ <bridgehead renderas="sect2" id="quickbook.syntax.block.headings.h1">
+ <phrase id="quickbook.syntax.block.headings.heading_2"/><link linkend="quickbook.syntax.block.headings.heading_2">Heading
+ 2</link>
+ </bridgehead>
+ <bridgehead renderas="sect3" id="quickbook.syntax.block.headings.h2">
+ <phrase id="quickbook.syntax.block.headings.heading_3"/><link linkend="quickbook.syntax.block.headings.heading_3">Heading
+ 3</link>
+ </bridgehead>
+ <bridgehead renderas="sect4" id="quickbook.syntax.block.headings.h3">
+ <phrase id="quickbook.syntax.block.headings.heading_4"/><link linkend="quickbook.syntax.block.headings.heading_4">Heading
+ 4</link>
+ </bridgehead>
+ <bridgehead renderas="sect5" id="quickbook.syntax.block.headings.h4">
+ <phrase id="quickbook.syntax.block.headings.heading_5"/><link linkend="quickbook.syntax.block.headings.heading_5">Heading
+ 5</link>
+ </bridgehead>
+ <bridgehead renderas="sect6" id="quickbook.syntax.block.headings.h5">
+ <phrase id="quickbook.syntax.block.headings.heading_6"/><link linkend="quickbook.syntax.block.headings.heading_6">Heading
+ 6</link>
+ </bridgehead>
+ <para>
+ Headings 1-3 [h1 h2 and h3] will automatically have anchors with normalized
+ names with <literal>name=&quot;section_id.normalized_header_text&quot;</literal>
+ (i.e. valid characters are <literal>a-z</literal>, <literal>A-Z</literal>,
+ <literal>0-9</literal> and <literal>_</literal>. 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 <literal>section_2.heading_1</literal>).
+ You can use:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[link section_id.normalized_header_text The link text]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ to link to them. See <link linkend="quickbook.syntax.phrase.anchor_links">Anchor
+ links</link> and <link linkend="quickbook.syntax.block.section">Section</link>
+ for more info.
+ </para>
+ </section>
+ <section id="quickbook.syntax.block.generic_heading">
+ <title><link linkend="quickbook.syntax.block.generic_heading">Generic Heading</link></title>
+ <para>
+ In cases when you don't want to care about the heading level (1 to 6),
+ you can use the <emphasis>Generic Heading</emphasis>:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[heading Heading]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ The <emphasis>Generic Heading</emphasis> 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 <emphasis>h2</emphasis>.
+ </para>
+ <para>
+ 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:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[section A]
+[h2 X]
+[h2 Y]
+[h2 Z]
+[endsect]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ 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:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[section A]
+[heading X]
+[heading Y]
+[heading Z]
+[endsect]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ 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 <emphasis>section</emphasis> and <emphasis>heading</emphasis>, you
+ have all you need. <emphasis>h1</emphasis>..<emphasis>h6</emphasis> becomes
+ redundant. <emphasis>h1</emphasis>..<emphasis>h6</emphasis> might be deprecated
+ in the future.
+ </para>
+ </section>
+ <section id="quickbook.syntax.block.macros">
+ <title><link linkend="quickbook.syntax.block.macros">Macros</link></title>
+<programlisting><!--quickbook-escape-prefix-->[def macro_identifier some text]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ 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:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[def sf_logo [$http://sourceforge.net/sflogo.php?group_id=28447&amp;type=1]]
+sf_logo
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ Now everywhere the sf_logo is placed, the picture will be inlined.
+ </para>
+ <para>
+ <inlinemediaobject><imageobject><imagedata fileref="http://sourceforge.net/sflogo.php?group_id=28447&amp;type=1"></imagedata></imageobject>
+ <textobject>
+ <phrase>sflogo</phrase>
+ </textobject>
+ </inlinemediaobject>
+ </para>
+ <tip>
+ <para>
+ 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. <literal>__spirit__</literal>). The reason is to avoid unwanted
+ macro replacement.
+ </para>
+ </tip>
+ <para>
+ Links (URLS) and images are good candidates for macros. <emphasis role="bold">1</emphasis>)
+ 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. <emphasis role="bold">2</emphasis>)
+ The syntax is not pretty. It's easier to read and write, e.g. <literal>__spirit__</literal>
+ than <literal>[@http://spirit.sourceforge.net Spirit]</literal>.
+ </para>
+ <para>
+ Some more examples:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[def :-) [$theme/smiley.png]]
+[def __spirit__ [@http://spirit.sourceforge.net Spirit]]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ (See <link linkend="quickbook.syntax.phrase.images">Images</link> and
+ <link linkend="quickbook.syntax.phrase.links">Links</link>)
+ </para>
+ <para>
+ Invoking these macros:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->Hi __spirit__ :-)
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ will generate this:
+ </para>
+ <para>
+ Hi <ulink url="http://spirit.sourceforge.net">Spirit</ulink> <inlinemediaobject><imageobject><imagedata
+ fileref="images/smiley.png"></imagedata></imageobject>
+ <textobject>
+ <phrase>smiley</phrase>
+ </textobject>
+ </inlinemediaobject>
+ </para>
+ </section>
+ <section id="quickbook.syntax.block.predefined_macros">
+ <title><link linkend="quickbook.syntax.block.predefined_macros">Predefined
+ Macros</link></title>
+ <para>
+ Quickbook has some predefined macros that you can already use.
+ </para>
+ <table frame="all" id="quickbook.syntax.block.predefined_macros.t0">
+ <title>Predefined Macros</title>
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Macro
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Meaning
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Example
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ __DATE__
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Today's date
+ </para>
+ </entry>
+ <entry>
+ <para>
+ 2000-Dec-20
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ __TIME__
+ </para>
+ </entry>
+ <entry>
+ <para>
+ The current time
+ </para>
+ </entry>
+ <entry>
+ <para>
+ 12:00:00 PM
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ __FILENAME__
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Quickbook source filename
+ </para>
+ </entry>
+ <entry>
+ <para>
+ quickbook_manual-1_4.quickbook
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="quickbook.syntax.block.templates">
+ <title><link linkend="quickbook.syntax.block.templates">Templates</link></title>
+ <para>
+ 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).
+ </para>
+ <para>
+ Example template:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[template person[name age what]
+
+Hi, my name is [name]. I am [age] years old. I am a [what].
+
+]
+<!--quickbook-escape-postfix--></programlisting>
+ <bridgehead renderas="sect5" id="quickbook.syntax.block.templates.h0">
+ <phrase id="quickbook.syntax.block.templates.template_identifier"/><link
+ linkend="quickbook.syntax.block.templates.template_identifier">Template
+ Identifier</link>
+ </bridgehead>
+ <para>
+ Template identifiers can either consist of:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ 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.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ A single character punctuation (a non-alphanumeric printable character)
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <bridgehead renderas="sect5" id="quickbook.syntax.block.templates.h1">
+ <phrase id="quickbook.syntax.block.templates.formal_template_arguments"/><link
+ linkend="quickbook.syntax.block.templates.formal_template_arguments">Formal
+ Template Arguments</link>
+ </bridgehead>
+ <para>
+ 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.
+ </para>
+ <para>
+ A template formal argument temporarily hides a template of the same name
+ at the point where the <link linkend="quickbook.syntax.block.templates.template_expansion">template
+ is expanded</link>. Note that the body of the <literal>person</literal>
+ template above refers to <literal>name</literal> <literal>age</literal>
+ and <literal>what</literal> as <literal>[name]</literal> <literal>[age]</literal>
+ and <literal>[what]</literal>. <literal>name</literal> <literal>age</literal>
+ and <literal>what</literal> are actually templates that exist in the duration
+ of the template call.
+ </para>
+ <bridgehead renderas="sect5" id="quickbook.syntax.block.templates.h2">
+ <phrase id="quickbook.syntax.block.templates.template_body"/><link linkend="quickbook.syntax.block.templates.template_body">Template
+ Body</link>
+ </bridgehead>
+ <para>
+ 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:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[template sample[arg1 arg2...argN] replacement text... ]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ Block templates are of the form:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[template sample[arg1 arg2...argN]
+replacement text...
+]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ 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.
+ </para>
+ <bridgehead renderas="sect5" id="quickbook.syntax.block.templates.h3">
+ <phrase id="quickbook.syntax.block.templates.template_expansion"/><link
+ linkend="quickbook.syntax.block.templates.template_expansion">Template
+ Expansion</link>
+ </bridgehead>
+ <para>
+ You expand a template this way:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[template_identifier arg1..arg2..arg3]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ At template expansion, you supply the actual arguments. The template will
+ be expanded with your supplied arguments. Example:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[person James Bond..39..Spy]
+[person Santa Clause..87..Big Red Fatso]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ Which will expand to:
+ </para>
+ <para>
+ Hi, my name is James Bond. I am 39 years old. I am a Spy.
+ </para>
+ <para>
+ Hi, my name is Santa Clause. I am 87 years old. I am a Big Red Fatso.
+ </para>
+ <caution>
+ <para>
+ 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.
+ </para>
+ </caution>
+ <para>
+ Each actual argument can be a word, a text fragment or just about any
+ <link linkend="quickbook.syntax.phrase">QuickBook phrase</link>. Arguments
+ are separated by the double dot <literal>&quot;..&quot;</literal> and terminated
+ by the close parenthesis.
+ </para>
+ <bridgehead renderas="sect5" id="quickbook.syntax.block.templates.h4">
+ <phrase id="quickbook.syntax.block.templates.nullary_templates"/><link
+ linkend="quickbook.syntax.block.templates.nullary_templates">Nullary Templates</link>
+ </bridgehead>
+ <para>
+ Nullary templates look and act like simple macros. Example:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[template alpha[]&apos;&apos;&apos;&amp;#945;&apos;&apos;&apos;]
+[template beta[]&apos;&apos;&apos;&amp;#946;&apos;&apos;&apos;]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ Expanding:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->Some squigles...[*[alpha][beta]]<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ We have:
+ </para>
+ <para>
+ Some squiggles...<emphasis role="bold">&#945;&#946;</emphasis>
+ </para>
+ <para>
+ The difference with macros are
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ The explicit <link linkend="quickbook.syntax.block.templates.template_expansion">template
+ expansion syntax</link>. 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.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ 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.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The empty brackets after the template identifier (<literal>alpha[]</literal>)
+ indicates no arguments. If the template body does not look like a template
+ argument list, we can elide the empty brackets. Example:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[template aristotle_quote Aristotle: [*['Education is the best provision
+for the journey to old age.]]]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ Expanding:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->Here's a quote from [aristotle_quote].
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ We have:
+ </para>
+ <para>
+ Here's a quote from Aristotle: <emphasis role="bold"><emphasis>Education
+ is the best provision for the journey to old age.</emphasis></emphasis>.
+ </para>
+ <para>
+ The disadvantage is that you can't avoid the space between the template
+ identifier, <code><phrase role="identifier">aristotle_quote</phrase></code>,
+ and the template body &quot;Aristotle...&quot;. This space will be part
+ of the template body. If that space is unwanted, use empty brackets or
+ use the space escape: &quot;<code><phrase role="special">\</phrase> </code>&quot;.
+ Example:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[template tag\ _tag]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ Then expanding:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->`struct` x[tag];
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ We have:
+ </para>
+ <para>
+ <code><phrase role="keyword">struct</phrase></code> x_tag;
+ </para>
+ <para>
+ You have a couple of ways to do it. I personally prefer the explicit empty
+ brackets, though.
+ </para>
+ <bridgehead renderas="sect5" id="quickbook.syntax.block.templates.h5">
+ <phrase id="quickbook.syntax.block.templates.simple_arguments"/><link linkend="quickbook.syntax.block.templates.simple_arguments">Simple
+ Arguments</link>
+ </bridgehead>
+ <para>
+ As mentioned, arguments are separated by the double dot <literal>&quot;..&quot;</literal>.
+ If there are less arguments passed than expected, QuickBook attempts to
+ break the last argument into two or more arguments following this logic:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Break the last argument into two, at the first space found (<literal>'',
+ '\n', \t' or '\r'</literal>).
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Repeat until there are enough arguments or if there are no more spaces
+ found (in which case, an error is reported).
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ For example:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[template simple[a b c d] [a][b][c][d]]
+[simple w x y z]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ will produce:
+ </para>
+ <para>
+ wxyz
+ </para>
+ <para>
+ &quot;w x y z&quot; is initially treated as a single argument because we
+ didn't supply any <literal>&quot;..&quot;</literal> separators. However,
+ since <literal>simple</literal> expects 4 arguments, &quot;w x y z&quot;
+ is broken down iteratively (applying the logic above) until we have &quot;w&quot;,
+ &quot;x&quot;, &quot;y&quot; and &quot;z&quot;.
+ </para>
+ <para>
+ QuickBook only tries to get the arguments it needs. For example:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[simple w x y z trail]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ will produce:
+ </para>
+ <para>
+ wxyz trail
+ </para>
+ <para>
+ The arguments being: &quot;w&quot;, &quot;x&quot;, &quot;y&quot; and &quot;z
+ trail&quot;.
+ </para>
+ <para>
+ It should be obvious now that for simple arguments with no spaces, we can
+ get by without separating the arguments with <literal>&quot;..&quot;</literal>
+ separators. It is possible to combine <literal>&quot;..&quot;</literal>
+ separators with the argument passing simplification presented above. Example:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[simple what do you think ..m a n?]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ will produce:
+ </para>
+ <para>
+ what do you think man?
+ </para>
+ <bridgehead renderas="sect5" id="quickbook.syntax.block.templates.h6">
+ <phrase id="quickbook.syntax.block.templates.punctuation_templates"/><link
+ linkend="quickbook.syntax.block.templates.punctuation_templates">Punctuation
+ Templates</link>
+ </bridgehead>
+ <para>
+ 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
+ <link linkend="quickbook.syntax.block.templates.template_identifier">template
+ identifiers</link>. Example:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[template ![bar] <!--quickbook-escape-postfix-->&lt;hey&gt;<!--quickbook-escape-prefix-->[bar]<!--quickbook-escape-postfix-->&lt;/hey&gt;<!--quickbook-escape-prefix-->]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ Now, expanding this:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[!baz]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ We will have:
+ </para>
+<programlisting>&lt;hey&gt;baz&lt;/hey&gt;
+</programlisting>
+ </section>
+ <section id="quickbook.syntax.block.blurbs">
+ <title><link linkend="quickbook.syntax.block.blurbs">Blurbs</link></title>
+<programlisting><!--quickbook-escape-prefix-->[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++.
+]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ will generate this:
+ </para>
+ <sidebar role="blurb">
+ <para>
+ <inlinemediaobject><imageobject><imagedata fileref="images/smiley.png"></imagedata></imageobject>
+ <textobject>
+ <phrase>smiley</phrase>
+ </textobject>
+ </inlinemediaobject> <emphasis role="bold">An eye catching advertisement
+ or note...</emphasis>
+ </para>
+ <para>
+ <ulink url="http://spirit.sourceforge.net">Spirit</ulink> 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++.
+ </para>
+ </sidebar>
+ <note>
+ <para>
+ Prefer <link linkend="quickbook.syntax.block.admonitions">admonitions</link>
+ wherever appropriate.
+ </para>
+ </note>
+ </section>
+ <section id="quickbook.syntax.block.tables">
+ <title><link linkend="quickbook.syntax.block.tables">Tables</link></title>
+<programlisting><!--quickbook-escape-prefix-->[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]]
+]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ will generate:
+ </para>
+ <table frame="all" id="quickbook.syntax.block.tables.t0">
+ <title>A Simple Table</title>
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading 1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Heading 2
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Heading 3
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ R0-C0
+ </para>
+ </entry>
+ <entry>
+ <para>
+ R0-C1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ R0-C2
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ R2-C0
+ </para>
+ </entry>
+ <entry>
+ <para>
+ R2-C1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ R2-C2
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ R3-C0
+ </para>
+ </entry>
+ <entry>
+ <para>
+ R3-C1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ R3-C2
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <para>
+ The table title is optional. The first row of the table is automatically
+ treated as the table header; that is, it is wrapped in <literal>&lt;thead&gt;...&lt;/thead&gt;</literal>
+ 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:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[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]
+ ]
+]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ and thus:
+ </para>
+ <table frame="all" id="quickbook.syntax.block.tables.t1">
+ <title>Table with fat cells</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading 1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Heading 2
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ Row 0, Col 0: a small cell
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Row 0, Col 1: a big fat cell with paragraphs
+ </para>
+ <para>
+ Boost provides free peer-reviewed portable C++ source libraries.
+ </para>
+ <para>
+ 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.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Row 1, Col 0: a small cell
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Row 1, Col 1: a small cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <para>
+ Here's how to have preformatted blocks of code in a table cell:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[table Table with code
+ [[Comment] [Code]]
+ [
+ [My first program]
+ [<!--quickbook-escape-postfix-->``
+ #include &lt;iostream&gt;
+
+ int main()
+ {
+ std::cout &lt;&lt; &quot;Hello, World!&quot; &lt;&lt; std::endl;
+ return 0;
+ }
+ ``<!--quickbook-escape-prefix-->]
+ ]
+]
+<!--quickbook-escape-postfix--></programlisting>
+ <table frame="all" id="quickbook.syntax.block.tables.t2">
+ <title>Table with code</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Comment
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Code
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ My first program
+ </para>
+ </entry>
+ <entry>
+ <para>
+<programlisting><phrase role="preprocessor">#include</phrase> <phrase role="special">&lt;</phrase><phrase role="identifier">iostream</phrase><phrase role="special">&gt;</phrase>
+
+<phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;Hello, World!&quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <section id="quickbook.syntax.block.variable_lists">
+ <title><link linkend="quickbook.syntax.block.variable_lists">Variable Lists</link></title>
+<programlisting><!--quickbook-escape-prefix-->[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]]
+]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ will generate:
+ </para>
+ <variablelist>
+ <title>A Variable List</title>
+ <varlistentry>
+ <term>term 1</term>
+ <listitem>
+ <para>
+ The definition of term 1
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>term 2</term>
+ <listitem>
+ <para>
+ The definition of term 2
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>term 3</term>
+ <listitem>
+ <para>
+ The definition of term 3
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <para>
+ The rules for variable lists are the same as for tables, except that only
+ 2 &quot;columns&quot; are allowed. The first column contains the terms,
+ and the second column contains the definitions. Those familiar with HTML
+ will recognize this as a &quot;definition list&quot;.
+ </para>
+ </section>
+ <section id="quickbook.syntax.block.include">
+ <title><link linkend="quickbook.syntax.block.include">Include</link></title>
+ <para>
+ You can include one QuickBook file from another. The syntax is simply:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[include someother.qbk]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ The included file will be processed as if it had been cut and pasted into
+ the current document, with the following exceptions:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ The __FILENAME__ predefined macro will reflect the name of the file currently being
+ processed.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Any macros defined in the included file are scoped to that file.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ The <literal>[include]</literal> 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 (&quot;someother&quot;, in the example
+ above). You can specify the id like this:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[include:someid someother.qbk]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ 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 &quot;Intro&quot;,
+ the named anchor for that section will be &quot;someid.intro&quot;, and
+ you can link to it with <literal>[link someid.intro The Intro]</literal>.
+ </para>
+ </section>
+ <section id="quickbook.syntax.block.import">
+ <title><link linkend="quickbook.syntax.block.import">Import</link></title>
+ <para>
+ 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.
+ </para>
+ <para>
+ QuickBook's import facility provides a nice solution.
+ </para>
+ <bridgehead renderas="sect5" id="quickbook.syntax.block.import.h0">
+ <phrase id="quickbook.syntax.block.import.example"/><link linkend="quickbook.syntax.block.import.example">Example</link>
+ </bridgehead>
+ <para>
+ You can effortlessly import code snippets from source code into your QuickBook.
+ The following illustrates how this is done:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[import ../test/stub.cpp]
+[foo]
+[bar]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ The first line:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[import ../test/stub.cpp]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ collects specially marked-up code snippets from <ulink url="../../test/stub.cpp">stub.cpp</ulink>
+ and places them in your QuickBook file as virtual templates. Each of the
+ specially marked-up code snippets has a name (e.g. <code><phrase role="identifier">foo</phrase></code>
+ and <code><phrase role="identifier">bar</phrase></code> 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:
+ </para>
+<programlisting><!--quickbook-escape-prefix-->[foo]
+[bar]
+<!--quickbook-escape-postfix--></programlisting>
+ <para>
+ And the result is:
+ </para>
+ <para>
+ This is the <emphasis role="bold"><emphasis>foo</emphasis></emphasis> function.
+ </para>
+ <para>
+ This description can have paragraphs...
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ lists
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ etc.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ And any quickbook block markup.
+ </para>
+ <para>
+<programlisting><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">string</phrase> <phrase role="identifier">foo</phrase><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="comment">// return 'em, foo man!</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="string">&quot;foo&quot;</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ <para>
+ This is the <emphasis role="bold"><emphasis>bar</emphasis></emphasis> function
+ </para>
+ <para>
+<programlisting><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">string</phrase> <phrase role="identifier">bar</phrase><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="comment">// return 'em, bar man!</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="string">&quot;bar&quot;</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ <para>
+ Some trailing text here
+ </para>
+ <bridgehead renderas="sect5" id="quickbook.syntax.block.import.h1">
+ <phrase id="quickbook.syntax.block.import.code_snippet_markup"/><link linkend="quickbook.syntax.block.import.code_snippet_markup">Code
+ Snippet Markup</link>
+ </bridgehead>
+ <para>
+ Note how the code snippets in <ulink url="../../test/stub.cpp">stub.cpp</ulink>
+ get marked up. We use distinguishable comments following the form:
+ </para>
+<programlisting><phrase role="comment">//[id</phrase>
+<phrase role="identifier">some</phrase> <phrase role="identifier">code</phrase> <phrase role="identifier">here</phrase>
+<phrase role="comment">//]</phrase>
+</programlisting>
+ <para>
+ The first comment line above initiates a named code-snippet. This prefix
+ will not be visible in quickbook. The entire code-snippet in between <code><phrase
+ role="comment">//[id</phrase></code> and <code><phrase role="comment">//]</phrase></code>
+ will be inserted as a template in quickbook with name <emphasis><emphasis>id</emphasis></emphasis>.
+ The comment <code><phrase role="comment">//]</phrase></code> ends a code-snippet
+ This too will not be visible in quickbook.
+ </para>
+ <bridgehead renderas="sect5" id="quickbook.syntax.block.import.h2">
+ <phrase id="quickbook.syntax.block.import.special_comments"/><link linkend="quickbook.syntax.block.import.special_comments">Special
+ Comments</link>
+ </bridgehead>
+ <para>
+ Special comments of the form:
+ </para>
+<programlisting><phrase role="comment">//` some [*quickbook] markup here</phrase>
+</programlisting>
+ <para>
+ and:
+ </para>
+<programlisting><phrase role="comment">/*` some [*quickbook] markup here */</phrase>
+</programlisting>
+ <para>
+ will be parsed by QuickBook. This can contain quickbook <emphasis>blocks</emphasis>
+ (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.
+ </para>
+ <bridgehead renderas="sect5" id="quickbook.syntax.block.import.h3">
+ <phrase id="quickbook.syntax.block.import.callouts"/><link linkend="quickbook.syntax.block.import.callouts">Callouts</link>
+ </bridgehead>
+ <para>
+ Special comments of the form:
+ </para>
+<programlisting><phrase role="comment">/*&lt; some [*quickbook] markup here &gt;*/</phrase>
+</programlisting>
+ <para>
+ will be regarded as callouts. These will be collected, numbered and rendered
+ as a &quot;callout bug&quot; (a small icon with a number). After the whole
+ snippet is parsed, the callout list is generated. See <ulink url="http://www.docbook.org/tdg/en/html/callout.html">Callouts</ulink>
+ for details. Example:
+ </para>
+ <para>
+<programlisting><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">string</phrase> <phrase role="identifier">foo_bar</phrase><phrase role="special">()</phrase> <co id="quickbook.syntax.block.import.c0" linkends="quickbook.syntax.block.import.c1" />
+<phrase role="special">{</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="string">&quot;foo-bar&quot;</phrase><phrase role="special">;</phrase> <co id="quickbook.syntax.block.import.c2" linkends="quickbook.syntax.block.import.c3" />
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ <calloutlist>
+ <callout arearefs="quickbook.syntax.block.import.c0" id="quickbook.syntax.block.import.c1">
+ <para>
+ The <emphasis>Mythical</emphasis> FooBar. See <ulink url="http://en.wikipedia.org/wiki/Foobar">Foobar
+ for details</ulink>
+ </para>
+ </callout>
+ <callout arearefs="quickbook.syntax.block.import.c2" id="quickbook.syntax.block.import.c3">
+ <para>
+ return 'em, foo-bar man!
+ </para>
+ </callout>
+ </calloutlist>
+ <para>
+ Checkout <ulink url="../../test/stub.cpp">stub.cpp</ulink> to see the actual
+ code.
+ </para>
+ </section>
+ </section>
+ </section>
+ <section id="quickbook.install">
+ <title><link linkend="quickbook.install">Installation and configuration</link></title>
+ <para>
+ This section provides some guidelines on how to install and configure BoostBook
+ and Quickbook under several operating systems.
+ </para>
+ <para>
+ Before continuing, it is very important that you keep this in mind: if you
+ try to build some documents and the process breaks due to misconfiguration,
+ be absolutely sure to delete any <code><phrase role="identifier">bin</phrase></code>
+ and <code><phrase role="identifier">bin</phrase><phrase role="special">.</phrase><phrase
+ role="identifier">v2</phrase></code> directories generated by the build before
+ trying again. Otherwise your configuration fixes will not take any effect.
+ </para>
+ <section id="quickbook.install.windows">
+ <title><link linkend="quickbook.install.windows">Windows 2000, XP, 2003, Vista</link></title>
+ <blockquote>
+ <para>
+ <emphasis>Section contributed by Julio M. Merino Vidal</emphasis>
+ </para>
+ </blockquote>
+ <para>
+ The following instructions apply to any Windows system based on Windows 2000,
+ including Windows XP, Windows 2003 Server and Windows Vista. The paths shown
+ below are taken from a Windows Vista machine; you will need to adjust them
+ to match your system in case you are running an older version.
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ First of all you need to have a copy of <code><phrase role="identifier">xsltproc</phrase></code>
+ for Windows. There are many ways to get this tool, but to keep things
+ simple, use the <ulink url="http://www.zlatkovic.com/pub/libxml/">binary
+ packages</ulink> made by Igor Zlatkovic. At the very least, you need
+ to download the following packages: <code><phrase role="identifier">iconv</phrase></code>,
+ <code><phrase role="identifier">zlib</phrase></code>, <code><phrase role="identifier">libxml2</phrase></code>
+ and <code><phrase role="identifier">libxslt</phrase></code>.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Unpack all these packages in the same directory so that you get unique
+ <code><phrase role="identifier">bin</phrase></code>, <code><phrase role="identifier">include</phrase></code>
+ and <code><phrase role="identifier">lib</phrase></code> directories within
+ the hierarchy. These instructions use <code><phrase role="identifier">C</phrase><phrase
+ role="special">:\</phrase><phrase role="identifier">Users</phrase><phrase
+ role="special">\</phrase><phrase role="identifier">example</phrase><phrase
+ role="special">\</phrase><phrase role="identifier">Documents</phrase><phrase
+ role="special">\</phrase><phrase role="identifier">boost</phrase><phrase
+ role="special">\</phrase><phrase role="identifier">xml</phrase></code>
+ as the root for all files.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ From the command line, go to the <code><phrase role="identifier">bin</phrase></code>
+ directory and launch <code><phrase role="identifier">xsltproc</phrase><phrase
+ role="special">.</phrase><phrase role="identifier">exe</phrase></code>
+ to ensure it works. You should get usage information on screen.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Download <ulink url="http://www.docbook.org/xml/4.2/docbook-xml-4.2.zip">Docbook
+ XML 4.2</ulink> and unpack it in the same directory used above. That
+ is: <code><phrase role="identifier">C</phrase><phrase role="special">:\</phrase><phrase
+ role="identifier">Users</phrase><phrase role="special">\</phrase><phrase
+ role="identifier">example</phrase><phrase role="special">\</phrase><phrase
+ role="identifier">Documents</phrase><phrase role="special">\</phrase><phrase
+ role="identifier">boost</phrase><phrase role="special">\</phrase><phrase
+ role="identifier">xml</phrase><phrase role="special">\</phrase><phrase
+ role="identifier">docbook</phrase><phrase role="special">-</phrase><phrase
+ role="identifier">xml</phrase></code>.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Download the latest <ulink url="http://sourceforge.net/project/showfiles.php?group_id=21935&amp;package_id=16608">Docbook
+ XSL</ulink> version and unpack it, again in the same directory used before.
+ To make things easier, rename the directory created during the extraction
+ to <code><phrase role="identifier">docbook</phrase><phrase role="special">-</phrase><phrase
+ role="identifier">xsl</phrase></code> (bypassing the version name):
+ <code><phrase role="identifier">C</phrase><phrase role="special">:\</phrase><phrase
+ role="identifier">Users</phrase><phrase role="special">\</phrase><phrase
+ role="identifier">example</phrase><phrase role="special">\</phrase><phrase
+ role="identifier">Documents</phrase><phrase role="special">\</phrase><phrase
+ role="identifier">boost</phrase><phrase role="special">\</phrase><phrase
+ role="identifier">xml</phrase><phrase role="special">\</phrase><phrase
+ role="identifier">docbook</phrase><phrase role="special">-</phrase><phrase
+ role="identifier">xsl</phrase></code>.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Add the following to your <code><phrase role="identifier">user</phrase><phrase
+ role="special">-</phrase><phrase role="identifier">config</phrase><phrase
+ role="special">.</phrase><phrase role="identifier">jam</phrase></code>
+ file, which should live in your home directory (<code><phrase role="special">%</phrase><phrase
+ role="identifier">HOMEDRIVE</phrase><phrase role="special">%%</phrase><phrase
+ role="identifier">HOMEPATH</phrase><phrase role="special">%</phrase></code>).
+ You must already have it somewhere or otherwise you could not be building
+ Boost (i.e. missing tools configuration).
+ </simpara>
+ </listitem>
+ </orderedlist>
+<programlisting><phrase role="identifier">using</phrase> <phrase role="identifier">xsltproc</phrase>
+ <phrase role="special">:</phrase> <phrase role="string">&quot;C:/Users/example/Documents/boost/xml/bin/xsltproc.exe&quot;</phrase>
+ <phrase role="special">;</phrase>
+
+<phrase role="identifier">using</phrase> <phrase role="identifier">boostbook</phrase>
+ <phrase role="special">:</phrase> <phrase role="string">&quot;C:/Users/example/Documents/boost/xml/docbook-xsl&quot;</phrase>
+ <phrase role="special">:</phrase> <phrase role="string">&quot;C:/Users/example/Documents/boost/xml/docbook-xml&quot;</phrase>
+ <phrase role="special">;</phrase>
+</programlisting>
+ <para>
+ The above steps are enough to get a functional BoostBook setup. Quickbook
+ will be automatically built when needed. If you want to avoid these rebuilds:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ Go to Quickbook's source directory (<code><phrase role="identifier">BOOST_ROOT</phrase><phrase
+ role="special">\</phrase><phrase role="identifier">tools</phrase><phrase
+ role="special">\</phrase><phrase role="identifier">quickbook</phrase></code>).
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Build the utility by issuing <code><phrase role="identifier">bjam</phrase>
+ <phrase role="special">--</phrase><phrase role="identifier">v2</phrase></code>.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Copy the resulting <code><phrase role="identifier">quickbook</phrase><phrase
+ role="special">.</phrase><phrase role="identifier">exe</phrase></code>
+ binary (located under the <code><phrase role="identifier">BOOST_ROOT</phrase><phrase
+ role="special">\</phrase><phrase role="identifier">bin</phrase><phrase
+ role="special">.</phrase><phrase role="identifier">v2</phrase></code>
+ hierarchy) to a safe place. Following our previous example, you can install
+ it into: <code><phrase role="identifier">C</phrase><phrase role="special">:\</phrase><phrase
+ role="identifier">Users</phrase><phrase role="special">\</phrase><phrase
+ role="identifier">example</phrase><phrase role="special">\</phrase><phrase
+ role="identifier">Documents</phrase><phrase role="special">\</phrase><phrase
+ role="identifier">boost</phrase><phrase role="special">\</phrase><phrase
+ role="identifier">xml</phrase><phrase role="special">\</phrase><phrase
+ role="identifier">bin</phrase></code>.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Add the following to your <code><phrase role="identifier">user</phrase><phrase
+ role="special">-</phrase><phrase role="identifier">config</phrase><phrase
+ role="special">.</phrase><phrase role="identifier">jam</phrase></code>
+ file:
+ </simpara>
+ </listitem>
+ </orderedlist>
+<programlisting><phrase role="identifier">using</phrase> <phrase role="identifier">quickbook</phrase>
+ <phrase role="special">:</phrase> <phrase role="string">&quot;C:/Users/example/Documents/boost/xml/bin/quickbook.exe&quot;</phrase>
+ <phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ <section id="quickbook.install.linux">
+ <title><link linkend="quickbook.install.linux">Debian, Ubuntu</link></title>
+ <para>
+ The following instructions apply to Debian and its derivatives. They are
+ based on a Ubuntu Edgy install but should work on other Debian based systems.
+ </para>
+ <para>
+ First install the <code><phrase role="identifier">bjam</phrase></code>,
+ <code><phrase role="identifier">xsltproc</phrase></code>, <code><phrase role="identifier">docbook</phrase><phrase
+ role="special">-</phrase><phrase role="identifier">xsl</phrase></code> and
+ <code><phrase role="identifier">docbook</phrase><phrase role="special">-</phrase><phrase
+ role="identifier">xml</phrase></code> packages. For example, using <code><phrase
+ role="identifier">apt</phrase><phrase role="special">-</phrase><phrase role="identifier">get</phrase></code>:
+ </para>
+<programlisting><phrase role="identifier">sudo</phrase> <phrase role="identifier">apt</phrase><phrase role="special">-</phrase><phrase role="identifier">get</phrase> <phrase role="identifier">install</phrase> <phrase role="identifier">xsltprc</phrase> <phrase role="identifier">docbook</phrase><phrase role="special">-</phrase><phrase role="identifier">xsl</phrase> <phrase role="identifier">docbook</phrase><phrase role="special">-</phrase><phrase role="identifier">xml</phrase>
+</programlisting>
+ <para>
+ If you're planning on building boost's documentation, you'll also need to
+ install the <code><phrase role="identifier">doxygen</phrase></code> package
+ as well.
+ </para>
+ <para>
+ Next, we need to configure Boost Build to compile BoostBook files. Add the
+ following to your <code><phrase role="identifier">user</phrase><phrase role="special">-</phrase><phrase
+ role="identifier">config</phrase><phrase role="special">.</phrase><phrase
+ role="identifier">jam</phrase></code> file, which should be in your home
+ directory. If you don't have one, create a file containing this text. For
+ more information on setting up <code><phrase role="identifier">user</phrase><phrase
+ role="special">-</phrase><phrase role="identifier">config</phrase><phrase
+ role="special">.</phrase><phrase role="identifier">jam</phrase></code>, see
+ the <ulink url="http://boost.org/boost-build2/doc/html/bbv2/advanced/configuration.html">Boost
+ Build documentation</ulink>.
+ </para>
+<programlisting><phrase role="identifier">using</phrase> <phrase role="identifier">xsltproc</phrase> <phrase role="special">;</phrase>
+
+<phrase role="identifier">using</phrase> <phrase role="identifier">boostbook</phrase>
+ <phrase role="special">:</phrase> <phrase role="special">/</phrase><phrase role="identifier">usr</phrase><phrase role="special">/</phrase><phrase role="identifier">share</phrase><phrase role="special">/</phrase><phrase role="identifier">xml</phrase><phrase role="special">/</phrase><phrase role="identifier">docbook</phrase><phrase role="special">/</phrase><phrase role="identifier">stylesheet</phrase><phrase role="special">/</phrase><phrase role="identifier">nwalsh</phrase>
+ <phrase role="special">:</phrase> <phrase role="special">/</phrase><phrase role="identifier">usr</phrase><phrase role="special">/</phrase><phrase role="identifier">share</phrase><phrase role="special">/</phrase><phrase role="identifier">xml</phrase><phrase role="special">/</phrase><phrase role="identifier">docbook</phrase><phrase role="special">/</phrase><phrase role="identifier">schema</phrase><phrase role="special">/</phrase><phrase role="identifier">dtd</phrase><phrase role="special">/</phrase><phrase role="number">4.2</phrase>
+ <phrase role="special">;</phrase>
+
+<phrase role="comment"># Remove this line if you're not using doxygen</phrase>
+<phrase role="identifier">using</phrase> <phrase role="identifier">doxygen</phrase> <phrase role="special">;</phrase>
+</programlisting>
+ <para>
+ The above steps are enough to get a functional BoostBook setup. Quickbook
+ will be automatically built when needed. If you want to avoid these rebuilds:
+ </para>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ Go to Quickbook's source directory (<code><phrase role="identifier">BOOST_ROOT</phrase><phrase
+ role="special">/</phrase><phrase role="identifier">tools</phrase><phrase
+ role="special">/</phrase><phrase role="identifier">quickbook</phrase></code>).
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Build the utility by issuing <code><phrase role="identifier">bjam</phrase>
+ <phrase role="special">--</phrase><phrase role="identifier">v2</phrase></code>.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Copy the resulting <code><phrase role="identifier">quickbook</phrase></code>
+ binary (located under the <code><phrase role="identifier">BOOST_ROOT</phrase><phrase
+ role="special">/</phrase><phrase role="identifier">bin</phrase><phrase
+ role="special">.</phrase><phrase role="identifier">v2</phrase></code>
+ hierarchy) to a safe place. The traditional location is <code><phrase
+ role="special">/</phrase><phrase role="identifier">usr</phrase><phrase
+ role="special">/</phrase><phrase role="identifier">local</phrase><phrase
+ role="special">/</phrase><phrase role="identifier">bin</phrase></code>.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Add the following to your <code><phrase role="identifier">user</phrase><phrase
+ role="special">-</phrase><phrase role="identifier">config</phrase><phrase
+ role="special">.</phrase><phrase role="identifier">jam</phrase></code>
+ file, using the full path of the quickbook executable:
+ </simpara>
+ </listitem>
+ </orderedlist>
+<programlisting><phrase role="identifier">using</phrase> <phrase role="identifier">quickbook</phrase>
+ <phrase role="special">:</phrase> <phrase role="special">/</phrase><phrase role="identifier">usr</phrase><phrase role="special">/</phrase><phrase role="identifier">local</phrase><phrase role="special">/</phrase><phrase role="identifier">bin</phrase><phrase role="special">/</phrase><phrase role="identifier">quickbook</phrase>
+ <phrase role="special">;</phrase>
+</programlisting>
+ </section>
+ </section>
+ <section id="quickbook.editors">
+ <title><link linkend="quickbook.editors">Editor Support</link></title>
+ <para>
+ Editing quickbook files is usually done with text editors both simple and powerful.
+ The following sections list the settings for some editors which can help make
+ editing quickbook files a bit easier.
+ </para>
+ <sidebar role="blurb">
+ <para>
+ <inlinemediaobject><imageobject><imagedata fileref="images/note.png"></imagedata></imageobject>
+ <textobject>
+ <phrase>note</phrase>
+ </textobject>
+ </inlinemediaobject> You may submit your settings, tips, and suggestions to
+ the authors, or through the <ulink url="https://lists.sourceforge.net/lists/listinfo/boost-">docs
+ Boost Docs mailing list</ulink>.
+ </para>
+ </sidebar>
+ <section id="quickbook.editors.scite">
+ <title><link linkend="quickbook.editors.scite">Scintilla Text Editor</link></title>
+ <blockquote>
+ <para>
+ <emphasis>Section contributed by Dean Michael Berris</emphasis>
+ </para>
+ </blockquote>
+ <para>
+ The Scintilla Text Editor (SciTE) is a free source code editor for Win32
+ and X. It uses the SCIntilla source code editing component.
+ </para>
+ <sidebar role="blurb">
+ <para>
+ <inlinemediaobject><imageobject><imagedata fileref="images/tip.png"></imagedata></imageobject>
+ <textobject>
+ <phrase>tip</phrase>
+ </textobject>
+ </inlinemediaobject> SciTE can be downloaded from <ulink url="http://www.scintilla.org/SciTE.html">http://www.scintilla.org/SciTE.html</ulink>
+ </para>
+ </sidebar>
+ <para>
+ You can use the following settings to highlight quickbook tags when editing
+ quickbook files.
+ </para>
+<programlisting><!--quickbook-escape-prefix-->qbk=*.qbk
+lexer.*.qbk=props
+use.tabs.$(qbk)=0
+tab.size.$(qbk)=4
+indent.size.$(qbk)=4
+style.props.32=$(font.base)
+comment.stream.start.props=[/
+comment.stream.end.props=]
+comment.box.start.props=[/
+comment.box.middle.props=
+comment.box.end.props=]
+<!--quickbook-escape-postfix--></programlisting>
+ <sidebar role="blurb">
+ <para>
+ <inlinemediaobject><imageobject><imagedata fileref="images/note.png"></imagedata></imageobject>
+ <textobject>
+ <phrase>note</phrase>
+ </textobject>
+ </inlinemediaobject> Thanks to Rene Rivera for the above SciTE settings.
+ </para>
+ </sidebar>
+ </section>
+ </section>
+ <section id="quickbook.faq">
+ <title><link linkend="quickbook.faq">Frequently Asked Questions</link></title>
+ <bridgehead renderas="sect3" id="quickbook.faq.h0">
+ <phrase id="quickbook.faq.can_i_use_quickbook_for_non_boost_documentation_"/><link
+ linkend="quickbook.faq.can_i_use_quickbook_for_non_boost_documentation_">Can
+ I use QuickBook for non-Boost documentation?</link>
+ </bridgehead>
+ <para>
+ QuickBook can be used for non-Boost documentation with a little extra work.
+ </para>
+ <blockquote>
+ <para>
+ <emphasis>Faq contributed by Michael Marcin</emphasis>
+ </para>
+ </blockquote>
+ <para>
+ When building HTML documentation with BoostBook a Boost C++ Libraries header
+ is added to the files. When using QuickBook to document projects outside of
+ Boost this is not desirable. This behavior can be overridden at the BoostBook
+ level by specifying some XSLT options. When using Boost Build version 2 (BBv2)
+ this can be achieved by adding parameters to the BoostBook target declaration.
+ </para>
+ <para>
+ For example:
+ </para>
+<programlisting>using quickbook ;
+
+xml my_doc : my_doc.qbk ;
+
+boostbook standalone
+ :
+ my_doc
+ :
+ &lt;xsl:param&gt;boost.image.src=images/my_project_logo.png
+ &lt;xsl:param&gt;boost.image.alt=&quot;\&quot;My Project\&quot;&quot;
+ &lt;xsl:param&gt;boost.image.w=100
+ &lt;xsl:param&gt;boost.image.h=50
+ &lt;xsl:param&gt;nav.layout=none
+ ;
+</programlisting>
+ </section>
+ <section id="quickbook.ref">
+ <title><link linkend="quickbook.ref">Quick Reference</link></title>
+ <para>
+ [cpp]
+ </para>
+ <table frame="all" id="quickbook.ref.t0">
+ <title>Syntax Compendium</title>
+ <tgroup cols="3">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ To do this...
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Use this...
+ </para>
+ </entry>
+ <entry>
+ <para>
+ See this...
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ comment
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[/ some comment]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.comments">Comments</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <emphasis>italics</emphasis>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>['italics] or /italics/</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.font_styles">Font Styles</link>
+ and <link linkend="quickbook.syntax.phrase.simple_formatting">Simple
+ formatting</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <emphasis role="bold">bold</emphasis>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[*bold] or *bold*</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.font_styles">Font Styles</link>
+ and <link linkend="quickbook.syntax.phrase.simple_formatting">Simple
+ formatting</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <emphasis role="underline">underline</emphasis>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[_underline] or _underline_</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.font_styles">Font Styles</link>
+ and <link linkend="quickbook.syntax.phrase.simple_formatting">Simple
+ formatting</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <literal>teletype</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[^teletype] or =teletype=</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.font_styles">Font Styles</link>
+ and <link linkend="quickbook.syntax.phrase.simple_formatting">Simple
+ formatting</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <emphasis role="strikethrough">strikethrough</emphasis>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[-strikethrough]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.font_styles">Font Styles</link>
+ and <link linkend="quickbook.syntax.phrase.simple_formatting">Simple
+ formatting</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ <replaceable>replaceable</replaceable>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[~replaceable]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.replaceable">Replaceble</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ source mode
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[c++]</literal> or <literal>[python]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.source_mode">Source Mode</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ inline code
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>`int main();`</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.inline_code">Inline code</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ code block
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>``int main();``</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.code">Code</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ code escape
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>``from c++ to QuickBook``</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.escape_back">Escaping Back
+ To QuickBook</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ line break
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[br] or \n</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.line_break">line-break</link>
+ <emphasis role="bold">DEPRECATED</emphasis>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ anchor
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[#anchor]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.anchors">Anchors</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ link
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[@http://www.boost.org Boost]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.links">Links</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ anchor link
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[link section.anchor Link text]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.anchor_links">Anchor links</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ refentry link
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[link xml.refentry Link text]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.refentry_links">refentry links</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ function link
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[funcref fully::qualified::function_name Link text]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.code_links">function, class,
+ member, enum, macro, concept or header links</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ class link
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[classref fully::qualified::class_name Link text]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.code_links">function, class,
+ member, enum, macro, concept or header links</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ member link
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[memberref fully::qualified::member_name Link text]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.code_links">function, class,
+ member, enum, macro, concept or header links</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ enum link
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[enumref fully::qualified::enum_name Link text]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.code_links">function, class,
+ member, enum, macro, concept or header links</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ macro link
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[macroref MACRO_NAME Link text]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.code_links">function, class,
+ member, enum, macro, concept or header links</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ concept link
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[conceptref ConceptName Link text]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.code_links">function, class,
+ member, enum, macro, concept or header links</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ header link
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[headerref path/to/header.hpp Link text]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.code_links">function, class,
+ member, enum, macro, concept or header links</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ escape
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>'''escaped text (no processing/formatting)'''</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.escape">Escape</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ single char escape
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>\c</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.single_char_escape">Single
+ char escape</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ images
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[$image.jpg]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.phrase.images">Images</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ begin section
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[section The Section Title]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.section">Section</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ end section
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[endsect]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.section">Section</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ paragraph
+ </para>
+ </entry>
+ <entry>
+ <para>
+ No markup. Paragraphs start left-flushed and are terminated by two
+ or more newlines.
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.paragraphs">Paragraphs</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ ordered list
+ </para>
+ </entry>
+ <entry>
+<programlisting><!--quickbook-escape-prefix--># one
+# two
+# three
+<!--quickbook-escape-postfix--></programlisting>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.lists.ordered_lists">Ordered
+ lists</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ unordered list
+ </para>
+ </entry>
+ <entry>
+<programlisting><!--quickbook-escape-prefix-->* one
+* two
+* three
+<!--quickbook-escape-postfix--></programlisting>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.lists.unordered_lists">Unordered
+ lists</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ code
+ </para>
+ </entry>
+ <entry>
+ <para>
+ No markup. Preformatted code starts with a space or a tab.
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.code">Code</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ preformatted
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[pre preformatted]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.preformatted">Preformatted</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ block quote
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[:sometext...]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.blockquote">Blockquote</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ heading 1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[h1 Heading 1]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.headings">Heading</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ heading 2
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[h2 Heading 2]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.headings">Heading</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ heading 3
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[h3 Heading 3]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.headings">Heading</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ heading 4
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[h4 Heading 4]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.headings">Heading</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ heading 5
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[h5 Heading 5]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.headings">Heading</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ heading 6
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[h6 Heading 6]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.headings">Heading</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ macro
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[def macro_identifier some text]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.macros">Macros</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ template
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[template[a b] [a] body [b]]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.templates">Templates</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ blurb
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[blurb advertisement or note...]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.blurbs">Blurbs</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ admonition
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[warning Warning text...]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.admonitions">Admonitions</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ table
+ </para>
+ </entry>
+ <entry>
+<programlisting><!--quickbook-escape-prefix-->[table Title
+[[a][b][c]]
+[[a][b][c]]
+]
+<!--quickbook-escape-postfix--></programlisting>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.tables">Tables</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ variablelist
+ </para>
+ </entry>
+ <entry>
+<programlisting><!--quickbook-escape-prefix-->[variablelist Title
+[[a][b]]
+[[a][b]]
+]
+<!--quickbook-escape-postfix--></programlisting>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.variable_lists">Variable Lists</link>
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ include
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <literal>[include someother.qbk]</literal>
+ </para>
+ </entry>
+ <entry>
+ <para>
+ <link linkend="quickbook.syntax.block.include">Include</link>
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/quickbook_manual-1_4.gold-html b/src/boost/tools/quickbook/test/quickbook_manual-1_4.gold-html
new file mode 100644
index 000000000..0eeaf54e2
--- /dev/null
+++ b/src/boost/tools/quickbook/test/quickbook_manual-1_4.gold-html
@@ -0,0 +1,4177 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Quickbook 1.4
+ </h3>
+ <div class="authorgroup">
+ <h3 class="author">
+ Joel de Guzman
+ </h3>
+ <h3 class="author">
+ Eric Niebler
+ </h3>
+ </div>
+ <p class="copyright">
+ 2002, 2004, 2006 Joel de Guzman, Eric Niebler
+ </p>
+ <div class="legalnotice">
+ <p>
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)
+ </p>
+ </div>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#quickbook.intro">Introduction</a>
+ </li>
+ <li>
+ <a href="#quickbook.change_log">Change Log</a>
+ </li>
+ <li>
+ <a href="#quickbook.syntax">Syntax Summary</a>
+ </li>
+ <li>
+ <a href="#quickbook.install">Installation and configuration</a>
+ </li>
+ <li>
+ <a href="#quickbook.editors">Editor Support</a>
+ </li>
+ <li>
+ <a href="#quickbook.faq">Frequently Asked Questions</a>
+ </li>
+ <li>
+ <a href="#quickbook.ref">Quick Reference</a>
+ </li>
+ </ul>
+ </div>
+ <div id="quickbook.intro">
+ <h3>
+ Introduction
+ </h3>
+ <div id="quickbook.intro">
+ <blockquote>
+ <p>
+ <span class="bold"><strong><span class="emphasis"><em><q>Why program
+ by hand in five days what you can spend five years of your life automating?</q></em></span></strong></span>
+ </p>
+ <p>
+ -- Terrence Parr, author ANTLR/PCCTS
+ </p>
+ </blockquote>
+ <p>
+ Well, QuickBook started as a weekend hack. It was originally intended to
+ be a sample application using <a href="http://spirit.sourceforge.net">Spirit</a>.
+ What is it? What you are viewing now, this documentation, is autogenerated
+ by QuickBook. These files were generated from one master:
+ </p>
+ <blockquote>
+ <p>
+ <a href="../quickbook.qbk">quickbook.qbk</a>
+ </p>
+ </blockquote>
+ <p>
+ Originally named QuickDoc, this funky tool that never dies evolved into
+ a funkier tool thanks to Eric Niebler who resurrected the project making
+ it generate <a href="http://www.boost.org/doc/html/boostbook.html">BoostBook</a>
+ instead of HTML. The <a href="http://www.boost.org/doc/html/boostbook.html">BoostBook</a>
+ documentation format is an extension of <a href="http://www.docbook.org/">DocBook</a>,
+ an SGML or XML based format for describing documentation.
+ </p>
+ <p>
+ QuickBook is a WikiWiki style documentation tool geared towards C++ documentation
+ using simple rules and markup for simple formatting tasks. QuickBook extends
+ the WikiWiki concept. Like the WikiWiki, QuickBook documents are simple
+ text files. A single QuickBook document can generate a fully linked set
+ of nice HTML and PostScript/PDF documents complete with images and syntax-
+ colorized source code.
+ </p>
+ <p>
+ Features include:
+ </p>
+ <ul>
+ <li>
+ <div>
+ generate <a href="http://www.boost.org/doc/html/boostbook.html">BoostBook</a>
+ xml, to generate HTML, PostScript and PDF
+ </div>
+ </li>
+ <li>
+ <div>
+ simple markup to link to Doxygen-generated entities
+ </div>
+ </li>
+ <li>
+ <div>
+ macro system for simple text substitution
+ </div>
+ </li>
+ <li>
+ <div>
+ simple markup for italics, bold, preformatted, blurbs, code samples,
+ tables, URLs, anchors, images, etc.
+ </div>
+ </li>
+ <li>
+ <div>
+ automatic syntax coloring of code samples
+ </div>
+ </li>
+ <li>
+ <div>
+ CSS support
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div id="quickbook.change_log">
+ <h3>
+ Change Log
+ </h3>
+ <div id="quickbook.change_log">
+ <h3 id="quickbook.change_log.version_1_3">
+ Version 1.3
+ </h3>
+ <ul>
+ <li>
+ <div>
+ Quickbook file inclusion [include].
+ </div>
+ </li>
+ <li>
+ <div>
+ Better xml output (pretty layout). Check out the generated XML.
+ </div>
+ </li>
+ <li>
+ <div>
+ Regression testing facility: to make sure your document will always
+ be compatible (full backward compatibility) regardless of changes to
+ QuickBook.
+ </div>
+ </li>
+ <li>
+ <div>
+ Code cleanup and refactoring.
+ </div>
+ </li>
+ <li>
+ <div>
+ Allow phrase markup in the doc-info.
+ </div>
+ </li>
+ <li>
+ <div>
+ Preformatted code blocks via ``code`` (double ticks) allows code in
+ tables and lists, for example.
+ </div>
+ </li>
+ <li>
+ <div>
+ Quickbook versioning; allows full backward compatibility. You have
+ to add [quickbook 1.3] to the doc-info header to enable the new features.
+ Without this, QuickBook will assume that the document is a pre-1.3
+ document.
+ </div>
+ </li>
+ <li>
+ <div>
+ Better (intuitive) paragraph termination. Some markups may terminate
+ a paragraph. Example:
+<pre class="programlisting"><span class="special">[</span><span class="identifier">section</span> <span class="identifier">x</span><span class="special">]</span>
+<span class="identifier">blah</span><span class="special">...</span>
+<span class="special">[</span><span class="identifier">endsect</span><span class="special">]</span></pre>
+ </div>
+ </li>
+ <li>
+ <div>
+ Fully qualified section and headers. Subsection names are concatenated
+ to the ID to avoid clashing. Example: <code><span class="identifier">doc_name</span><span
+ class="special">.</span><span class="identifier">sect_name</span><span
+ class="special">.</span><span class="identifier">sub_sect_name</span><span
+ class="special">.</span><span class="identifier">sub_sub_sect_name</span></code>
+ </div>
+ </li>
+ <li>
+ <div>
+ Better &amp;nbsp; and whitespace handling in code snippets.
+ </div>
+ </li>
+ <li>
+ <div>
+ [xinclude] fixes up the relative path to the target XML file when input_directory
+ is not the same as the output_directory.
+ </div>
+ </li>
+ <li>
+ <div>
+ Allow untitled tables.
+ </div>
+ </li>
+ <li>
+ <div>
+ Allow phrase markups in section titles.
+ </div>
+ </li>
+ <li>
+ <div>
+ Allow escaping back to QuickBook from code, code blocks and inline
+ code.
+ </div>
+ </li>
+ <li>
+ <div>
+ Footnotes, with the [footnote This is the footnote] syntax.
+ </div>
+ </li>
+ <li>
+ <div>
+ Post-processor bug fix for escaped XML code that it does not recognize.
+ </div>
+ </li>
+ <li>
+ <div>
+ Replaceable, with the [~replacement] syntax.
+ </div>
+ </li>
+ <li>
+ <div>
+ Generic Headers
+ </div>
+ </li>
+ <li>
+ <div>
+ Code changes to allow full recursion (i.e. Collectors and push/pop
+ functions)
+ </div>
+ </li>
+ <li>
+ <div>
+ Various code cleanup/maintenance
+ </div>
+ </li>
+ <li>
+ <div>
+ Templates!
+ </div>
+ </li>
+ <li>
+ <div>
+ [conceptref] for referencing BoostBook &lt;concept&gt; entities.
+ </div>
+ </li>
+ <li>
+ <div>
+ Allow escape of spaces. The escaped space is removed from the output.
+ Syntax: <code><span class="special">\</span> </code>.
+ </div>
+ </li>
+ <li>
+ <div>
+ Nested comments are now allowed.
+ </div>
+ </li>
+ <li>
+ <div>
+ Quickbook blocks can nest inside comments.
+ </div>
+ </li>
+ <li>
+ <div>
+ <a href="#quickbook.syntax.block.import">Import</a> facility.
+ </div>
+ </li>
+ <li>
+ <div>
+ Callouts on imported code
+ </div>
+ </li>
+ <li>
+ <div>
+ Simple markups can now span a whole block.
+ </div>
+ </li>
+ <li>
+ <div>
+ <a href="#quickbook.syntax.block.blurbs">Blurbs</a>, <a href="#quickbook.syntax.block.admonitions">Admonitions</a>
+ and table cells (see <a href="#quickbook.syntax.block.tables">Tables</a>)
+ may now contain paragraphs.
+ </div>
+ </li>
+ <li>
+ <div>
+ <code><span class="special">\</span><span class="identifier">n</span></code>
+ and <code><span class="special">[</span><span class="identifier">br</span><span
+ class="special">]</span></code> are now deprecated.
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div id="quickbook.syntax">
+ <h3>
+ Syntax Summary
+ </h3>
+ <div id="quickbook.syntax">
+ <p>
+ 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.
+ </p>
+ <p>
+ 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.
+ </p>
+ </div>
+ <div id="quickbook.syntax.comments">
+ <h3>
+ Comments
+ </h3>
+ <div id="quickbook.syntax.comments">
+ <p>
+ Can be placed anywhere.
+ </p>
+<pre class="programlisting">[/ comment (no output generated) ]
+</pre>
+<pre class="programlisting">[/ comments can be nested [/ some more here] ]
+</pre>
+<pre class="programlisting">[/ Quickbook blocks can nest inside comments. [*Comment this out too!] ]
+</pre>
+ </div>
+ </div>
+ <div id="quickbook.syntax.phrase">
+ <h3>
+ Phrase Level Elements
+ </h3>
+ <div id="quickbook.syntax.phrase">
+ </div>
+ <div id="quickbook.syntax.phrase.font_styles">
+ <h3>
+ Font Styles
+ </h3>
+ <div id="quickbook.syntax.phrase.font_styles">
+<pre class="programlisting">['italic], [*bold], [_underline], [^teletype], [-strikethrough]
+</pre>
+ <p>
+ will generate:
+ </p>
+ <p>
+ <span class="emphasis"><em>italic</em></span>, <span class="bold"><strong>bold</strong></span>,
+ <span class="underline">underline</span>, <tt>teletype</tt>, <span
+ class="strikethrough">strikethrough</span>
+ </p>
+ <p>
+ Like all non-terminal phrase level elements, this can of course be
+ nested:
+ </p>
+<pre class="programlisting">[*['bold-italic]]
+</pre>
+ <p>
+ will generate:
+ </p>
+ <p>
+ <span class="bold"><strong><span class="emphasis"><em>bold-italic</em></span></strong></span>
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.phrase.replaceable">
+ <h3>
+ Replaceable
+ </h3>
+ <div id="quickbook.syntax.phrase.replaceable">
+ <p>
+ When you want content that may or must be replaced by the user, use
+ the syntax:
+ </p>
+<pre class="programlisting">[~replacement]
+</pre>
+ <p>
+ This will generate:
+ </p>
+ <p>
+ <em class="replaceable">replacement</em>
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.phrase.quotations">
+ <h3>
+ Quotations
+ </h3>
+ <div id="quickbook.syntax.phrase.quotations">
+<pre class="programlisting">["A question that sometimes drives me hazy: am I or are the others crazy?]--Einstein
+</pre>
+ <p>
+ will generate:
+ </p>
+ <p>
+ <q>A question that sometimes drives me hazy: am I or are the others
+ crazy?</q>--Einstein
+ </p>
+ <p>
+ Note the proper left and right quote marks. Also, while you can simply
+ use ordinary quote marks like &quot;quoted&quot;, our quotation, above,
+ will generate correct DocBook quotations (e.g. &lt;quote&gt;quoted&lt;/quote&gt;).
+ </p>
+ <p>
+ Like all phrase elements, quotations may be nested. Example:
+ </p>
+<pre class="programlisting">["Here's the rule for bargains: ["Do other men, for they would do you.] That's
+the true business precept.]
+</pre>
+ <p>
+ will generate:
+ </p>
+ <p>
+ <q>Here's the rule for bargains: <q>Do other men, for they would do
+ you.</q> That's the true business precept.</q>
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.phrase.simple_formatting">
+ <h3>
+ Simple formatting
+ </h3>
+ <div id="quickbook.syntax.phrase.simple_formatting">
+ <p>
+ Simple markup for formatting text, common in many applications, is
+ now supported:
+ </p>
+<pre class="programlisting">/italic/, *bold*, _underline_, =teletype=
+</pre>
+ <p>
+ will generate:
+ </p>
+ <p>
+ <span class="emphasis"><em>italic</em></span>, <span class="bold"><strong>bold</strong></span>,
+ <span class="underline">underline</span>, <tt>teletype</tt>
+ </p>
+ <p>
+ Unlike QuickBook's standard formatting scheme, the rules for simpler
+ alternatives are much stricter<a id="quickbook.syntax.phrase.simple_formatting.f0"
+ href="#footnote-1"><sup class="footnote">[1]</sup></a>.
+ </p>
+ <ul>
+ <li>
+ <div>
+ Simple markups cannot nest. You can combine a simple markup with
+ a nestable markup.
+ </div>
+ </li>
+ <li>
+ <div>
+ Simple markups cannot contain any other form of quickbook markup.
+ </div>
+ </li>
+ <li>
+ <div>
+ A non-space character must follow the leading markup
+ </div>
+ </li>
+ <li>
+ <div>
+ A non-space character must precede the trailing markup
+ </div>
+ </li>
+ <li>
+ <div>
+ A space or a punctuation must follow the trailing markup
+ </div>
+ </li>
+ <li>
+ <div>
+ 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: ']'.
+ </div>
+ </li>
+ <li>
+ <div>
+ A line starting with the star will be interpreted as an unordered
+ list. See <a href="#quickbook.syntax.block.lists.unordered_lists">Unordered
+ lists</a>.
+ </div>
+ </li>
+ </ul>
+ <div id="quickbook.syntax.phrase.simple_formatting.t0" class="table">
+ <table>
+ <caption>More Formatting Samples</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Markup
+ </p>
+ </th>
+ <th>
+ <p>
+ Result
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ <tt>*Bold*</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <span class="bold"><strong>Bold</strong></span>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <tt>*Is bold*</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <span class="bold"><strong>Is bold</strong></span>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <tt>* Not bold* *Not bold * * Not bold *</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ * Not bold* *Not bold * * Not bold *
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <tt>This*Isn't*Bold (no bold)</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ This*Isn't*Bold (no bold)
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <tt>(*Bold Inside*) (parenthesis not bold)</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ (<span class="bold"><strong>Bold Inside</strong></span>)
+ (parenthesis not bold)
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <tt>*(Bold Outside)* (parenthesis bold)</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <span class="bold"><strong>(Bold Outside)</strong></span>
+ (parenthesis bold)
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <tt>3*4*5 = 60 (no bold)</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ 3*4*5 = 60 (no bold)
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <tt>3 * 4 * 5 = 60 (no bold)</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ 3 * 4 * 5 = 60 (no bold)
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <tt>3 *4* 5 = 60 (4 is bold)</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ 3 <span class="bold"><strong>4</strong></span> 5 = 60 (4
+ is bold)
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <tt>*This is bold* this is not *but this is*</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <span class="bold"><strong>This is bold</strong></span> this
+ is not <span class="bold"><strong>but this is</strong></span>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <tt>*This is bold*.</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <span class="bold"><strong>This is bold</strong></span>.
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <tt>*B*. (bold B)</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <span class="bold"><strong>B</strong></span>. (bold B)
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <tt>['*Bold-Italic*]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <span class="emphasis"><em><span class="bold"><strong>Bold-Italic</strong></span></em></span>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <tt>*side-by*/-side/</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <span class="bold"><strong>side-by</strong></span><span class="emphasis"><em>-side</em></span>
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <p>
+ As mentioned, simple markups cannot go past a single block. The text
+ from &quot;have&quot; to &quot;full&quot; in the following paragraph
+ will be rendered as bold:
+ </p>
+<pre class="programlisting">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.
+</pre>
+ <p>
+ Baa baa black sheep, <span class="bold"><strong>have you any wool?
+ Yes sir, yes sir, three bags full!</strong></span> One for the master,
+ one for the dame, And one for the little boy who lives down the lane.
+ </p>
+ <p>
+ But in the following paragraph, bold is not applied:
+ </p>
+<pre class="programlisting">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.
+</pre>
+ <p>
+ 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.
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.phrase.inline_code">
+ <h3>
+ Inline code
+ </h3>
+ <div id="quickbook.syntax.phrase.inline_code">
+ <p>
+ Inlining code in paragraphs is quite common when writing C++ documentation.
+ We provide a very simple markup for this. For example, this:
+ </p>
+<pre class="programlisting">This text has inlined code `int main() { return 0; }` in it.
+</pre>
+ <p>
+ will generate:
+ </p>
+ <p>
+ This text has inlined code <code><span class="keyword">int</span>
+ <span class="identifier">main</span><span class="special">()</span>
+ <span class="special">{</span> <span class="keyword">return</span>
+ <span class="number">0</span><span class="special">;</span> <span class="special">}</span></code>
+ in it. The code will be syntax highlighted.
+ </p>
+ <div class="note">
+ <p>
+ We simply enclose the code with the tick: <tt>"`"</tt>, not the single
+ quote: <code><span class="string">&quot;'&quot;</span></code>. Note
+ too that <tt>`some code`</tt> is preferred over <tt>[^some code]</tt>.
+ </p>
+ </div>
+ </div>
+ </div>
+ <div id="quickbook.syntax.phrase.code_blocks">
+ <h3>
+ Code blocks
+ </h3>
+ <div id="quickbook.syntax.phrase.code_blocks">
+ <p>
+ Preformatted code simply starts with a space or a tab (See <a href="#quickbook.syntax.block.code">Code</a>).
+ However, such a simple syntax cannot be used as phrase elements in
+ lists (See <a href="#quickbook.syntax.block.lists.ordered_lists">Ordered
+ lists</a> and <a href="#quickbook.syntax.block.lists.unordered_lists">Unordered
+ lists</a>), tables (See <a href="#quickbook.syntax.block.tables">Tables</a>),
+ etc. Inline code (see above) can. The problem is, inline code does
+ not allow formatting with newlines, spaces, and tabs. These are lost.
+ </p>
+ <p>
+ 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:
+ </p>
+<pre class="programlisting">``
+ #include &lt;iostream&gt;
+
+ int main()
+ {
+ std::cout &lt;&lt; &quot;Hello, World!&quot; &lt;&lt; std::endl;
+ return 0;
+ }
+``
+</pre>
+ <p>
+ will generate:
+ </p>
+ <p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">&quot;Hello, World!&quot;</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.phrase.source_mode">
+ <h3>
+ Source Mode
+ </h3>
+ <div id="quickbook.syntax.phrase.source_mode">
+ <p>
+ 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 <a href="#quickbook.syntax.block.document">Document</a>
+ section.
+ </p>
+ <p>
+ To change the source mode, use the <tt>[source-mode]</tt> markup, where
+ <tt>source-mode</tt> is one of the supported modes. For example, this:
+ </p>
+<pre class="programlisting">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`.
+</pre>
+ <p>
+ will generate:
+ </p>
+ <p>
+ Python's <code><span class="keyword">import</span></code> is rather
+ like C++'s <code><span class="preprocessor">#include</span></code>.
+ A C++ comment <code><span class="comment">// looks like this</span></code>
+ whereas a Python comment <code><span class="comment">#looks like this</span></code>.
+ </p>
+ <div id="quickbook.syntax.phrase.source_mode.t0" class="table">
+ <table>
+ <caption>Supported Source Modes</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Mode
+ </p>
+ </th>
+ <th>
+ <p>
+ Source Mode Markup
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ C++
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[c++]</tt>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ Python
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[python]</tt>
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div class="note">
+ <p>
+ The source mode strings are lowercase.
+ </p>
+ </div>
+ </div>
+ </div>
+ <div id="quickbook.syntax.phrase.line_break">
+ <h3>
+ line-break
+ </h3>
+ <div id="quickbook.syntax.phrase.line_break">
+<pre class="programlisting">[br]
+</pre>
+ <div class="warning">
+ <p>
+ <code><span class="special">[</span><span class="identifier">br</span><span
+ class="special">]</span></code> is now deprecated. <a href="#quickbook.syntax.block.blurbs">Blurbs</a>,
+ <a href="#quickbook.syntax.block.admonitions">Admonitions</a> and
+ table cells (see <a href="#quickbook.syntax.block.tables">Tables</a>)
+ may now contain paragraphs.
+ </p>
+ </div>
+ </div>
+ </div>
+ <div id="quickbook.syntax.phrase.anchors">
+ <h3>
+ Anchors
+ </h3>
+ <div id="quickbook.syntax.phrase.anchors">
+<pre class="programlisting">[#named_anchor]
+</pre>
+ <p>
+ A named anchor is a hook that can be referenced by a link elsewhere
+ in the document. You can then reference an anchor with <tt>[link named_anchor
+ Some link text]</tt>. See <a href="#quickbook.syntax.phrase.anchor_links">Anchor
+ links</a>, <a href="#quickbook.syntax.block.section">Section</a> and
+ <a href="#quickbook.syntax.block.headings">Heading</a>.
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.phrase.links">
+ <h3>
+ Links
+ </h3>
+ <div id="quickbook.syntax.phrase.links">
+<pre class="programlisting">[@http://www.boost.org this is [*boost's] website....]
+</pre>
+ <p>
+ will generate:
+ </p>
+ <p>
+ <a href="http://www.boost.org">this is <span class="bold"><strong>boost's</strong></span>
+ website....</a>
+ </p>
+ <p>
+ URL links where the link text is the link itself is common. Example:
+ </p>
+<pre class="programlisting">see http://spirit.sourceforge.net/
+</pre>
+ <p>
+ so, when the text is absent in a link markup, the URL is assumed. Example:
+ </p>
+<pre class="programlisting">see [@http://spirit.sourceforge.net/]
+</pre>
+ <p>
+ will generate:
+ </p>
+ <p>
+ see <a href="http://spirit.sourceforge.net/">http://spirit.sourceforge.net/</a>
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.phrase.anchor_links">
+ <h3>
+ Anchor links
+ </h3>
+ <div id="quickbook.syntax.phrase.anchor_links">
+ <p>
+ You can link within a document using:
+ </p>
+<pre class="programlisting">[link section_id.normalized_header_text The link text]
+</pre>
+ <p>
+ See sections <a href="#quickbook.syntax.block.section">Section</a>
+ and <a href="#quickbook.syntax.block.headings">Heading</a> for more
+ info.
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.phrase.refentry_links">
+ <h3>
+ refentry links
+ </h3>
+ <div id="quickbook.syntax.phrase.refentry_links">
+ <p>
+ In addition, you can link internally to an XML refentry like:
+ </p>
+<pre class="programlisting">[link xml.refentry The link text]
+</pre>
+ <p>
+ This gets converted into <tt>&lt;link linkend=&quot;xml.refentry&quot;&gt;The
+ link text&lt;/link&gt;</tt>.
+ </p>
+ <p>
+ Like URLs, the link text is optional. If this is not present, the link
+ text will automatically be the refentry. Example:
+ </p>
+<pre class="programlisting">[link xml.refentry]
+</pre>
+ <p>
+ This gets converted into <tt>&lt;link linkend=&quot;xml.refentry&quot;&gt;xml.refentry&lt;/link&gt;</tt>.
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.phrase.code_links">
+ <h3>
+ Code Links
+ </h3>
+ <div id="quickbook.syntax.phrase.code_links">
+ <p>
+ If you want to link to a function, class, member, enum, concept or
+ header in the reference section, you can use:
+ </p>
+<pre class="programlisting">[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]
+</pre>
+ <p>
+ Again, the link text is optional. If this is not present, the link
+ text will automatically be the function, class, member, enum, macro,
+ concept or header. Example:
+ </p>
+<pre class="programlisting">[classref boost::bar::baz]
+</pre>
+ <p>
+ would have &quot;boost::bar::baz&quot; as the link text.
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.phrase.escape">
+ <h3>
+ Escape
+ </h3>
+ <div id="quickbook.syntax.phrase.escape">
+ <p>
+ The escape mark-up is used when we don't want to do any processing.
+ </p>
+<pre class="programlisting">'''
+escape (no processing/formatting)
+'''
+</pre>
+ <p>
+ Escaping allows us to pass XML markup to <a href="http://www.boost.org/doc/html/boostbook.html">BoostBook</a>
+ or <a href="http://www.docbook.org/">DocBook</a>. For example:
+ </p>
+<pre class="programlisting">'''
+&lt;emphasis role=&quot;bold&quot;&gt;This is direct XML markup&lt;/emphasis&gt;
+'''
+</pre>
+ <p>
+ <span class="bold"><strong>This is direct XML markup</strong></span>
+ </p>
+ <div class="important">
+ <p>
+ Be careful when using the escape. The text must conform to <a href="http://www.boost.org/doc/html/boostbook.html">BoostBook</a>/<a
+ href="http://www.docbook.org/">DocBook</a> syntax.
+ </p>
+ </div>
+ </div>
+ </div>
+ <div id="quickbook.syntax.phrase.single_char_escape">
+ <h3>
+ Single char escape
+ </h3>
+ <div id="quickbook.syntax.phrase.single_char_escape">
+ <p>
+ 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 <code><span class="special">[</span></code> and <code><span
+ class="special">]</span></code>. For example, how do you escape the
+ triple quote? Simple: <tt>\'\'\'</tt>
+ </p>
+ <p>
+ <code><span class="special">\</span><span class="identifier">n</span></code>
+ has a special meaning. It is used to generate line breaks.
+ </p>
+ <div class="warning">
+ <p>
+ <code><span class="special">\</span><span class="identifier">n</span></code>
+ and <code><span class="special">[</span><span class="identifier">br</span><span
+ class="special">]</span></code> are now deprecated. <a href="#quickbook.syntax.block.blurbs">Blurbs</a>,
+ <a href="#quickbook.syntax.block.admonitions">Admonitions</a> and
+ table cells (see <a href="#quickbook.syntax.block.tables">Tables</a>)
+ may now contain paragraphs.
+ </p>
+ </div>
+ <p>
+ The escaped space: <code><span class="special">\</span> </code> also
+ has a special meaning. The escaped space is removed from the output.
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.phrase.images">
+ <h3>
+ Images
+ </h3>
+ <div id="quickbook.syntax.phrase.images">
+<pre class="programlisting">[$image.jpg]
+</pre>
+ </div>
+ </div>
+ <div id="quickbook.syntax.phrase.footnotes">
+ <h3>
+ Footnotes
+ </h3>
+ <div id="quickbook.syntax.phrase.footnotes">
+ <p>
+ As of version 1.3, QuickBook supports footnotes. Just put the text
+ of the footnote in a <code><span class="special">[</span><span class="identifier">footnote</span><span
+ class="special">]</span></code> block, and the text will be put at
+ the bottom of the current page. For example, this:
+ </p>
+<pre class="programlisting">[footnote A sample footnote]
+</pre>
+ <p>
+ will generate this<a id="quickbook.syntax.phrase.footnotes.f0" href="#footnote-2"><sup
+ class="footnote">[2]</sup></a>.
+ </p>
+ </div>
+ <div id="quickbook.syntax.phrase.footnotes.macro_expansion">
+ <h3>
+ Macro Expansion
+ </h3>
+ <div id="quickbook.syntax.phrase.footnotes.macro_expansion">
+<pre class="programlisting">__a_macro_identifier__
+</pre>
+ <p>
+ See <a href="#quickbook.syntax.block.macros">Macros</a> for details.
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.phrase.footnotes.template_expansion">
+ <h3>
+ Template Expansion
+ </h3>
+ <div id="quickbook.syntax.phrase.footnotes.template_expansion">
+<pre class="programlisting">[a_template_identifier]
+</pre>
+ <p>
+ See <a href="#quickbook.syntax.block.templates">Templates</a> for
+ details.
+ </p>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block">
+ <h3>
+ Block Level Elements
+ </h3>
+ <div id="quickbook.syntax.block">
+ </div>
+ <div id="quickbook.syntax.block.document">
+ <h3>
+ Document
+ </h3>
+ <div id="quickbook.syntax.block.document">
+ <p>
+ Every document must begin with a Document Info section, which should
+ look like this:
+ </p>
+<pre class="programlisting">[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]
+]
+</pre>
+ <p>
+ Where document-type is one of:
+ </p>
+ <ul>
+ <li>
+ <div>
+ book
+ </div>
+ </li>
+ <li>
+ <div>
+ article
+ </div>
+ </li>
+ <li>
+ <div>
+ library
+ </div>
+ </li>
+ <li>
+ <div>
+ chapter
+ </div>
+ </li>
+ <li>
+ <div>
+ part
+ </div>
+ </li>
+ <li>
+ <div>
+ appendix
+ </div>
+ </li>
+ <li>
+ <div>
+ preface
+ </div>
+ </li>
+ <li>
+ <div>
+ qandadiv
+ </div>
+ </li>
+ <li>
+ <div>
+ qandaset
+ </div>
+ </li>
+ <li>
+ <div>
+ reference
+ </div>
+ </li>
+ <li>
+ <div>
+ set
+ </div>
+ </li>
+ </ul>
+ <p>
+ quickbook 1.3 declares the version of quickbook the document is written
+ for. In its absence, version 1.1 is assumed.
+ </p>
+ <p>
+ <tt>version</tt>, <tt>id</tt>, <tt>dirname</tt>, <tt>copyright</tt>,
+ <tt>purpose</tt>, <tt>category</tt>, <tt>authors</tt>, <tt>license</tt>,
+ <tt>last-revision</tt> and <tt>source-mode</tt> are optional information.
+ </p>
+ <p>
+ <tt>source-type</tt> is a lowercase string setting the initial <a href="#quickbook.syntax.phrase.source_mode">Source
+ Mode</a>. If the <tt>source-mode</tt> field is omitted, a default value
+ of <tt>c++</tt> will be used.
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.section">
+ <h3>
+ Section
+ </h3>
+ <div id="quickbook.syntax.block.section">
+ <p>
+ Starting a new section is accomplished with:
+ </p>
+<pre class="programlisting">[section:id The Section Title]
+</pre>
+ <p>
+ where <span class="emphasis"><em>id</em></span> is optional. id will
+ be the filename of the generated section. If it is not present, &quot;The
+ Section Title&quot; will be normalized and become the id. Valid characters
+ are <tt>a-Z</tt>, <tt>A-Z</tt>, <tt>0-9</tt> and <tt>_</tt>. All non-valid
+ characters are converted to underscore and all upper-case are converted
+ to lower case. Thus: &quot;The Section Title&quot; will be normalized
+ to &quot;the_section_title&quot;.
+ </p>
+ <p>
+ End a section with:
+ </p>
+<pre class="programlisting">[endsect]
+</pre>
+ <p>
+ Sections can nest, and that results in a hierarchy in the table of
+ contents.
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.xinclude">
+ <h3>
+ xinclude
+ </h3>
+ <div id="quickbook.syntax.block.xinclude">
+ <p>
+ You can include another XML file with:
+ </p>
+<pre class="programlisting">[xinclude file.xml]
+</pre>
+ <p>
+ This is useful when file.xml has been generated by Doxygen and contains
+ your reference section.
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.paragraphs">
+ <h3>
+ Paragraphs
+ </h3>
+ <div id="quickbook.syntax.block.paragraphs">
+ <p>
+ 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.
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.lists">
+ <h3>
+ Lists
+ </h3>
+ <div id="quickbook.syntax.block.lists">
+ </div>
+ <div id="quickbook.syntax.block.lists.ordered_lists">
+ <h3>
+ Ordered lists
+ </h3>
+ <div id="quickbook.syntax.block.lists.ordered_lists">
+<pre class="programlisting"># One
+# Two
+# Three
+</pre>
+ <p>
+ will generate:
+ </p>
+ <ol>
+ <li>
+ <div>
+ One
+ </div>
+ </li>
+ <li>
+ <div>
+ Two
+ </div>
+ </li>
+ <li>
+ <div>
+ Three
+ </div>
+ </li>
+ </ol>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.lists.list_hierarchies">
+ <h3>
+ List Hierarchies
+ </h3>
+ <div id="quickbook.syntax.block.lists.list_hierarchies">
+ <p>
+ List hierarchies are supported. Example:
+ </p>
+<pre class="programlisting"># One
+# Two
+# Three
+ # Three.a
+ # Three.b
+ # Three.c
+# Four
+ # Four.a
+ # Four.a.i
+ # Four.a.ii
+# Five
+</pre>
+ <p>
+ will generate:
+ </p>
+ <ol>
+ <li>
+ <div>
+ One
+ </div>
+ </li>
+ <li>
+ <div>
+ Two
+ </div>
+ </li>
+ <li>
+ <div>
+ Three
+ <ol>
+ <li>
+ <div>
+ Three.a
+ </div>
+ </li>
+ <li>
+ <div>
+ Three.b
+ </div>
+ </li>
+ <li>
+ <div>
+ Three.c
+ </div>
+ </li>
+ </ol>
+ </div>
+ </li>
+ <li>
+ <div>
+ Fourth
+ <ol>
+ <li>
+ <div>
+ Four.a
+ <ol>
+ <li>
+ <div>
+ Four.a.i
+ </div>
+ </li>
+ <li>
+ <div>
+ Four.a.ii
+ </div>
+ </li>
+ </ol>
+ </div>
+ </li>
+ </ol>
+ </div>
+ </li>
+ <li>
+ <div>
+ Five
+ </div>
+ </li>
+ </ol>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.lists.long_list_lines">
+ <h3>
+ Long List Lines
+ </h3>
+ <div id="quickbook.syntax.block.lists.long_list_lines">
+ <p>
+ Long lines will be wrapped appropriately. Example:
+ </p>
+<pre class="programlisting"># 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.
+</pre>
+ <ol>
+ <li>
+ <div>
+ A short item.
+ </div>
+ </li>
+ <li>
+ <div>
+ 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.
+ </div>
+ </li>
+ <li>
+ <div>
+ A short item.
+ </div>
+ </li>
+ </ol>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.lists.unordered_lists">
+ <h3>
+ Unordered lists
+ </h3>
+ <div id="quickbook.syntax.block.lists.unordered_lists">
+<pre class="programlisting">* First
+* Second
+* Third
+</pre>
+ <p>
+ will generate:
+ </p>
+ <ul>
+ <li>
+ <div>
+ First
+ </div>
+ </li>
+ <li>
+ <div>
+ Second
+ </div>
+ </li>
+ <li>
+ <div>
+ Third
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.lists.mixed_lists">
+ <h3>
+ Mixed lists
+ </h3>
+ <div id="quickbook.syntax.block.lists.mixed_lists">
+ <p>
+ Mixed lists (ordered and unordered) are supported. Example:
+ </p>
+<pre class="programlisting"># One
+# Two
+# Three
+ * Three.a
+ * Three.b
+ * Three.c
+# Four
+</pre>
+ <p>
+ will generate:
+ </p>
+ <ol>
+ <li>
+ <div>
+ One
+ </div>
+ </li>
+ <li>
+ <div>
+ Two
+ </div>
+ </li>
+ <li>
+ <div>
+ Three
+ <ul>
+ <li>
+ <div>
+ Three.a
+ </div>
+ </li>
+ <li>
+ <div>
+ Three.b
+ </div>
+ </li>
+ <li>
+ <div>
+ Three.c
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ Four
+ </div>
+ </li>
+ </ol>
+ <p>
+ And...
+ </p>
+<pre class="programlisting"># 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
+</pre>
+ <p>
+ will generate:
+ </p>
+ <ol>
+ <li>
+ <div>
+ 1
+ <ul>
+ <li>
+ <div>
+ 1.a
+ <ol>
+ <li>
+ <div>
+ 1.a.1
+ </div>
+ </li>
+ <li>
+ <div>
+ 1.a.2
+ </div>
+ </li>
+ </ol>
+ </div>
+ </li>
+ <li>
+ <div>
+ 1.b
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <div>
+ 2
+ <ul>
+ <li>
+ <div>
+ 2.a
+ </div>
+ </li>
+ <li>
+ <div>
+ 2.b
+ <ol>
+ <li>
+ <div>
+ 2.b.1
+ </div>
+ </li>
+ <li>
+ <div>
+ 2.b.2
+ <ul>
+ <li>
+ <div>
+ 2.b.2.a
+ </div>
+ </li>
+ <li>
+ <div>
+ 2.b.2.b
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ </ol>
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ </ol>
+ </div>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.code">
+ <h3>
+ Code
+ </h3>
+ <div id="quickbook.syntax.block.code">
+ <p>
+ Preformatted code starts with a space or a tab. The code will be syntax
+ highlighted according to the current <a href="#quickbook.syntax.phrase.source_mode">Source
+ Mode</a>:
+ </p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="comment">// Sample code</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">&quot;Hello, World\n&quot;</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+<pre class="programlisting"><span class="keyword">import</span> <span class="identifier">cgi</span>
+
+<span class="keyword">def</span> <span class="identifier">cookForHtml</span><span class="special">(</span><span class="identifier">text</span><span class="special">):</span>
+ <span class="string">'''&quot;Cooks&quot; the input text for HTML.'''</span>
+
+ <span class="keyword">return</span> <span class="identifier">cgi</span><span class="special">.</span><span class="identifier">escape</span><span class="special">(</span><span class="identifier">text</span><span class="special">)</span>
+</pre>
+ <p>
+ Macros that are already defined are expanded in source code. Example:
+ </p>
+<pre class="programlisting">[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__;
+</pre>
+ <p>
+ Generates:
+ </p>
+<pre class="programlisting"><span class="keyword">using</span> <a href="http://www.boost.org/libs/libraries.htm">boost</a><span class="special">::</span><a href="http://www.boost.org/doc/html/array/reference.html">array</a><span class="special">;</span>
+</pre>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.escape_back">
+ <h3>
+ Escaping Back To QuickBook
+ </h3>
+ <div id="quickbook.syntax.block.escape_back">
+ <p>
+ 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 <span class="emphasis"><em>escape-back</em></span>
+ delimiter. In C++ and Python, the delimiter is the double tick (back-quote):
+ &quot;``&quot; and &quot;``&quot;. Example:
+ </p>
+<pre class="programlisting">void ``[@http://en.wikipedia.org/wiki/Foo#Foo.2C_Bar_and_Baz foo]``()
+{
+}
+</pre>
+ <p>
+ Will generate:
+ </p>
+<pre class="programlisting"><span class="keyword">void</span> <a href="http://en.wikipedia.org/wiki/Foo#Foo.2C_Bar_and_Baz">foo</a><span class="special">()</span>
+<span class="special">{</span>
+<span class="special">}</span>
+</pre>
+ <p>
+ When escaping from code to QuickBook, only phrase level markups are
+ allowed. Block level markups like lists, tables etc. are not allowed.
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.preformatted">
+ <h3>
+ Preformatted
+ </h3>
+ <div id="quickbook.syntax.block.preformatted">
+ <p>
+ Sometimes, you don't want some preformatted text to be parsed as C++.
+ In such cases, use the <tt>[pre ... ]</tt> markup block.
+ </p>
+<pre class="programlisting">[pre
+
+ Some *preformatted* text Some *preformatted* text
+
+ Some *preformatted* text Some *preformatted* text
+
+ Some *preformatted* text Some *preformatted* text
+
+]
+</pre>
+ <p>
+ 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:
+ </p>
+<pre class="programlisting">Some <span class="bold"><strong>preformatted</strong></span> text Some <span class="bold"><strong>preformatted</strong></span> text
+
+ Some <span class="bold"><strong>preformatted</strong></span> text Some <span class="bold"><strong>preformatted</strong></span> text
+
+ Some <span class="bold"><strong>preformatted</strong></span> text Some <span class="bold"><strong>preformatted</strong></span> text
+
+</pre>
+ <p>
+ Notice that unlike Code, phrase markup such as font style is still
+ permitted inside <tt>pre</tt> blocks.
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.blockquote">
+ <h3>
+ Blockquote
+ </h3>
+ <div id="quickbook.syntax.block.blockquote">
+<pre class="programlisting">[:sometext...]
+</pre>
+ <blockquote>
+ <p>
+ Indents the paragraph. This applies to one paragraph only.
+ </p>
+ </blockquote>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.admonitions">
+ <h3>
+ Admonitions
+ </h3>
+ <div id="quickbook.syntax.block.admonitions">
+<pre class="programlisting">[note This is a note]
+[tip This is a tip]
+[important This is important]
+[caution This is a caution]
+[warning This is a warning]
+</pre>
+ <p>
+ generates <a href="http://www.docbook.org/">DocBook</a> admonitions:
+ </p>
+ <div class="note">
+ <p>
+ This is a note
+ </p>
+ </div>
+ <div class="tip">
+ <p>
+ This is a tip
+ </p>
+ </div>
+ <div class="important">
+ <p>
+ This is important
+ </p>
+ </div>
+ <div class="caution">
+ <p>
+ This is a caution
+ </p>
+ </div>
+ <div class="warning">
+ <p>
+ This is a warning
+ </p>
+ </div>
+ <p>
+ These are the only admonitions supported by <a href="http://www.docbook.org/">DocBook</a>.
+ So, for example <tt>[information This is some information]</tt> is
+ unlikely to produce the desired effect.
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.headings">
+ <h3>
+ Headings
+ </h3>
+ <div id="quickbook.syntax.block.headings">
+<pre class="programlisting">[h1 Heading 1]
+[h2 Heading 2]
+[h3 Heading 3]
+[h4 Heading 4]
+[h5 Heading 5]
+[h6 Heading 6]
+</pre>
+ <h1 id="quickbook.syntax.block.headings.heading_1">
+ Heading 1
+ </h1>
+ <h2 id="quickbook.syntax.block.headings.heading_2">
+ Heading 2
+ </h2>
+ <h3 id="quickbook.syntax.block.headings.heading_3">
+ Heading 3
+ </h3>
+ <h4 id="quickbook.syntax.block.headings.heading_4">
+ Heading 4
+ </h4>
+ <h5 id="quickbook.syntax.block.headings.heading_5">
+ Heading 5
+ </h5>
+ <h6 id="quickbook.syntax.block.headings.heading_6">
+ Heading 6
+ </h6>
+ <p>
+ Headings 1-3 [h1 h2 and h3] will automatically have anchors with normalized
+ names with <tt>name=&quot;section_id.normalized_header_text&quot;</tt>
+ (i.e. valid characters are <tt>a-z</tt>, <tt>A-Z</tt>, <tt>0-9</tt>
+ and <tt>_</tt>. 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 <tt>section_2.heading_1</tt>).
+ You can use:
+ </p>
+<pre class="programlisting">[link section_id.normalized_header_text The link text]
+</pre>
+ <p>
+ to link to them. See <a href="#quickbook.syntax.phrase.anchor_links">Anchor
+ links</a> and <a href="#quickbook.syntax.block.section">Section</a>
+ for more info.
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.generic_heading">
+ <h3>
+ Generic Heading
+ </h3>
+ <div id="quickbook.syntax.block.generic_heading">
+ <p>
+ In cases when you don't want to care about the heading level (1 to
+ 6), you can use the <span class="emphasis"><em>Generic Heading</em></span>:
+ </p>
+<pre class="programlisting">[heading Heading]
+</pre>
+ <p>
+ The <span class="emphasis"><em>Generic Heading</em></span> 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
+ <span class="emphasis"><em>h2</em></span>.
+ </p>
+ <p>
+ 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:
+ </p>
+<pre class="programlisting">[section A]
+[h2 X]
+[h2 Y]
+[h2 Z]
+[endsect]
+</pre>
+ <p>
+ 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:
+ </p>
+<pre class="programlisting">[section A]
+[heading X]
+[heading Y]
+[heading Z]
+[endsect]
+</pre>
+ <p>
+ 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 <span class="emphasis"><em>section</em></span> and <span
+ class="emphasis"><em>heading</em></span>, you have all you need. <span
+ class="emphasis"><em>h1</em></span>..<span class="emphasis"><em>h6</em></span>
+ becomes redundant. <span class="emphasis"><em>h1</em></span>..<span
+ class="emphasis"><em>h6</em></span> might be deprecated in the future.
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.macros">
+ <h3>
+ Macros
+ </h3>
+ <div id="quickbook.syntax.block.macros">
+<pre class="programlisting">[def macro_identifier some text]
+</pre>
+ <p>
+ 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:
+ </p>
+<pre class="programlisting">[def sf_logo [$http://sourceforge.net/sflogo.php?group_id=28447&amp;type=1]]
+sf_logo
+</pre>
+ <p>
+ Now everywhere the sf_logo is placed, the picture will be inlined.
+ </p>
+ <p>
+ <span class="inlinemediaobject"><img src="http://sourceforge.net/sflogo.php?group_id=28447&amp;type=1"
+ alt="[]"/></span>
+ </p>
+ <div class="tip">
+ <p>
+ 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. <tt>__spirit__</tt>). The reason is
+ to avoid unwanted macro replacement.
+ </p>
+ </div>
+ <p>
+ Links (URLS) and images are good candidates for macros. <span class="bold"><strong>1</strong></span>)
+ 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.
+ <span class="bold"><strong>2</strong></span>) The syntax is not pretty.
+ It's easier to read and write, e.g. <tt>__spirit__</tt> than <tt>[@http://spirit.sourceforge.net
+ Spirit]</tt>.
+ </p>
+ <p>
+ Some more examples:
+ </p>
+<pre class="programlisting">[def :-) [$theme/smiley.png]]
+[def __spirit__ [@http://spirit.sourceforge.net Spirit]]
+</pre>
+ <p>
+ (See <a href="#quickbook.syntax.phrase.images">Images</a> and <a href="#quickbook.syntax.phrase.links">Links</a>)
+ </p>
+ <p>
+ Invoking these macros:
+ </p>
+<pre class="programlisting">Hi __spirit__ :-)
+</pre>
+ <p>
+ will generate this:
+ </p>
+ <p>
+ Hi <a href="http://spirit.sourceforge.net">Spirit</a> <span class="inlinemediaobject"><img
+ src="images/smiley.png" alt="[]"/></span>
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.predefined_macros">
+ <h3>
+ Predefined Macros
+ </h3>
+ <div id="quickbook.syntax.block.predefined_macros">
+ <p>
+ Quickbook has some predefined macros that you can already use.
+ </p>
+ <div id="quickbook.syntax.block.predefined_macros.t0" class="table">
+ <table>
+ <caption>Predefined Macros</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Macro
+ </p>
+ </th>
+ <th>
+ <p>
+ Meaning
+ </p>
+ </th>
+ <th>
+ <p>
+ Example
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ __DATE__
+ </p>
+ </td>
+ <td>
+ <p>
+ Today's date
+ </p>
+ </td>
+ <td>
+ <p>
+ 2000-Dec-20
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ __TIME__
+ </p>
+ </td>
+ <td>
+ <p>
+ The current time
+ </p>
+ </td>
+ <td>
+ <p>
+ 12:00:00 PM
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ __FILENAME__
+ </p>
+ </td>
+ <td>
+ <p>
+ Quickbook source filename
+ </p>
+ </td>
+ <td>
+ <p>
+ quickbook_manual-1_4.quickbook
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.templates">
+ <h3>
+ Templates
+ </h3>
+ <div id="quickbook.syntax.block.templates">
+ <p>
+ 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).
+ </p>
+ <p>
+ Example template:
+ </p>
+<pre class="programlisting">[template person[name age what]
+
+Hi, my name is [name]. I am [age] years old. I am a [what].
+
+]
+</pre>
+ <h5 id="quickbook.syntax.block.templates.template_identifier">
+ Template Identifier
+ </h5>
+ <p>
+ Template identifiers can either consist of:
+ </p>
+ <ul>
+ <li>
+ <div>
+ 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.
+ </div>
+ </li>
+ <li>
+ <div>
+ A single character punctuation (a non-alphanumeric printable character)
+ </div>
+ </li>
+ </ul>
+ <h5 id="quickbook.syntax.block.templates.formal_template_arguments">
+ Formal Template Arguments
+ </h5>
+ <p>
+ 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.
+ </p>
+ <p>
+ A template formal argument temporarily hides a template of the same
+ name at the point where the <a href="#quickbook.syntax.block.templates.template_expansion">template
+ is expanded</a>. Note that the body of the <tt>person</tt> template
+ above refers to <tt>name</tt> <tt>age</tt> and <tt>what</tt> as <tt>[name]</tt>
+ <tt>[age]</tt> and <tt>[what]</tt>. <tt>name</tt> <tt>age</tt> and
+ <tt>what</tt> are actually templates that exist in the duration of
+ the template call.
+ </p>
+ <h5 id="quickbook.syntax.block.templates.template_body">
+ Template Body
+ </h5>
+ <p>
+ 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:
+ </p>
+<pre class="programlisting">[template sample[arg1 arg2...argN] replacement text... ]
+</pre>
+ <p>
+ Block templates are of the form:
+ </p>
+<pre class="programlisting">[template sample[arg1 arg2...argN]
+replacement text...
+]
+</pre>
+ <p>
+ 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.
+ </p>
+ <h5 id="quickbook.syntax.block.templates.template_expansion">
+ Template Expansion
+ </h5>
+ <p>
+ You expand a template this way:
+ </p>
+<pre class="programlisting">[template_identifier arg1..arg2..arg3]
+</pre>
+ <p>
+ At template expansion, you supply the actual arguments. The template
+ will be expanded with your supplied arguments. Example:
+ </p>
+<pre class="programlisting">[person James Bond..39..Spy]
+[person Santa Clause..87..Big Red Fatso]
+</pre>
+ <p>
+ Which will expand to:
+ </p>
+ <p>
+ Hi, my name is James Bond. I am 39 years old. I am a Spy.
+ </p>
+ <p>
+ Hi, my name is Santa Clause. I am 87 years old. I am a Big Red Fatso.
+ </p>
+ <div class="caution">
+ <p>
+ 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.
+ </p>
+ </div>
+ <p>
+ Each actual argument can be a word, a text fragment or just about any
+ <a href="#quickbook.syntax.phrase">QuickBook phrase</a>. Arguments
+ are separated by the double dot <tt>&quot;..&quot;</tt> and terminated
+ by the close parenthesis.
+ </p>
+ <h5 id="quickbook.syntax.block.templates.nullary_templates">
+ Nullary Templates
+ </h5>
+ <p>
+ Nullary templates look and act like simple macros. Example:
+ </p>
+<pre class="programlisting">[template alpha[]&apos;&apos;&apos;&amp;#945;&apos;&apos;&apos;]
+[template beta[]&apos;&apos;&apos;&amp;#946;&apos;&apos;&apos;]
+</pre>
+ <p>
+ Expanding:
+ </p>
+<pre class="programlisting">Some squigles...[*[alpha][beta]]</pre>
+ <p>
+ We have:
+ </p>
+ <p>
+ Some squiggles...<span class="bold"><strong>&#945;&#946;</strong></span>
+ </p>
+ <p>
+ The difference with macros are
+ </p>
+ <ul>
+ <li>
+ <div>
+ The explicit <a href="#quickbook.syntax.block.templates.template_expansion">template
+ expansion syntax</a>. 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.
+ </div>
+ </li>
+ <li>
+ <div>
+ 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.
+ </div>
+ </li>
+ </ul>
+ <p>
+ The empty brackets after the template identifier (<tt>alpha[]</tt>)
+ indicates no arguments. If the template body does not look like a template
+ argument list, we can elide the empty brackets. Example:
+ </p>
+<pre class="programlisting">[template aristotle_quote Aristotle: [*['Education is the best provision
+for the journey to old age.]]]
+</pre>
+ <p>
+ Expanding:
+ </p>
+<pre class="programlisting">Here's a quote from [aristotle_quote].
+</pre>
+ <p>
+ We have:
+ </p>
+ <p>
+ Here's a quote from Aristotle: <span class="bold"><strong><span class="emphasis"><em>Education
+ is the best provision for the journey to old age.</em></span></strong></span>.
+ </p>
+ <p>
+ The disadvantage is that you can't avoid the space between the template
+ identifier, <code><span class="identifier">aristotle_quote</span></code>,
+ and the template body &quot;Aristotle...&quot;. This space will be
+ part of the template body. If that space is unwanted, use empty brackets
+ or use the space escape: &quot;<code><span class="special">\</span>
+ </code>&quot;. Example:
+ </p>
+<pre class="programlisting">[template tag\ _tag]
+</pre>
+ <p>
+ Then expanding:
+ </p>
+<pre class="programlisting">`struct` x[tag];
+</pre>
+ <p>
+ We have:
+ </p>
+ <p>
+ <code><span class="keyword">struct</span></code> x_tag;
+ </p>
+ <p>
+ You have a couple of ways to do it. I personally prefer the explicit
+ empty brackets, though.
+ </p>
+ <h5 id="quickbook.syntax.block.templates.simple_arguments">
+ Simple Arguments
+ </h5>
+ <p>
+ As mentioned, arguments are separated by the double dot <tt>&quot;..&quot;</tt>.
+ If there are less arguments passed than expected, QuickBook attempts
+ to break the last argument into two or more arguments following this
+ logic:
+ </p>
+ <ul>
+ <li>
+ <div>
+ Break the last argument into two, at the first space found (<tt>'',
+ '\n', \t' or '\r'</tt>).
+ </div>
+ </li>
+ <li>
+ <div>
+ Repeat until there are enough arguments or if there are no more
+ spaces found (in which case, an error is reported).
+ </div>
+ </li>
+ </ul>
+ <p>
+ For example:
+ </p>
+<pre class="programlisting">[template simple[a b c d] [a][b][c][d]]
+[simple w x y z]
+</pre>
+ <p>
+ will produce:
+ </p>
+ <p>
+ wxyz
+ </p>
+ <p>
+ &quot;w x y z&quot; is initially treated as a single argument because
+ we didn't supply any <tt>&quot;..&quot;</tt> separators. However, since
+ <tt>simple</tt> expects 4 arguments, &quot;w x y z&quot; is broken
+ down iteratively (applying the logic above) until we have &quot;w&quot;,
+ &quot;x&quot;, &quot;y&quot; and &quot;z&quot;.
+ </p>
+ <p>
+ QuickBook only tries to get the arguments it needs. For example:
+ </p>
+<pre class="programlisting">[simple w x y z trail]
+</pre>
+ <p>
+ will produce:
+ </p>
+ <p>
+ wxyz trail
+ </p>
+ <p>
+ The arguments being: &quot;w&quot;, &quot;x&quot;, &quot;y&quot; and
+ &quot;z trail&quot;.
+ </p>
+ <p>
+ It should be obvious now that for simple arguments with no spaces,
+ we can get by without separating the arguments with <tt>&quot;..&quot;</tt>
+ separators. It is possible to combine <tt>&quot;..&quot;</tt> separators
+ with the argument passing simplification presented above. Example:
+ </p>
+<pre class="programlisting">[simple what do you think ..m a n?]
+</pre>
+ <p>
+ will produce:
+ </p>
+ <p>
+ what do you think man?
+ </p>
+ <h5 id="quickbook.syntax.block.templates.punctuation_templates">
+ Punctuation Templates
+ </h5>
+ <p>
+ 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 <a href="#quickbook.syntax.block.templates.template_identifier">template
+ identifiers</a>. Example:
+ </p>
+<pre class="programlisting">[template ![bar] &lt;hey&gt;[bar]&lt;/hey&gt;]
+</pre>
+ <p>
+ Now, expanding this:
+ </p>
+<pre class="programlisting">[!baz]
+</pre>
+ <p>
+ We will have:
+ </p>
+<pre class="programlisting">&lt;hey&gt;baz&lt;/hey&gt;
+</pre>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.blurbs">
+ <h3>
+ Blurbs
+ </h3>
+ <div id="quickbook.syntax.block.blurbs">
+<pre class="programlisting">[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++.
+]
+</pre>
+ <p>
+ will generate this:
+ </p>
+ <div class="blurb">
+ <p>
+ <span class="inlinemediaobject"><img src="images/smiley.png" alt="[]"/></span>
+ <span class="bold"><strong>An eye catching advertisement or note...</strong></span>
+ </p>
+ <p>
+ <a href="http://spirit.sourceforge.net">Spirit</a> 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++.
+ </p>
+ </div>
+ <div class="note">
+ <p>
+ Prefer <a href="#quickbook.syntax.block.admonitions">admonitions</a>
+ wherever appropriate.
+ </p>
+ </div>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.tables">
+ <h3>
+ Tables
+ </h3>
+ <div id="quickbook.syntax.block.tables">
+<pre class="programlisting">[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]]
+]
+</pre>
+ <p>
+ will generate:
+ </p>
+ <div id="quickbook.syntax.block.tables.t0" class="table">
+ <table>
+ <caption>A Simple Table</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading 1
+ </p>
+ </th>
+ <th>
+ <p>
+ Heading 2
+ </p>
+ </th>
+ <th>
+ <p>
+ Heading 3
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ R0-C0
+ </p>
+ </td>
+ <td>
+ <p>
+ R0-C1
+ </p>
+ </td>
+ <td>
+ <p>
+ R0-C2
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ R2-C0
+ </p>
+ </td>
+ <td>
+ <p>
+ R2-C1
+ </p>
+ </td>
+ <td>
+ <p>
+ R2-C2
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ R3-C0
+ </p>
+ </td>
+ <td>
+ <p>
+ R3-C1
+ </p>
+ </td>
+ <td>
+ <p>
+ R3-C2
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <p>
+ The table title is optional. The first row of the table is automatically
+ treated as the table header; that is, it is wrapped in <tt>&lt;thead&gt;...&lt;/thead&gt;</tt>
+ 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:
+ </p>
+<pre class="programlisting">[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]
+ ]
+]
+</pre>
+ <p>
+ and thus:
+ </p>
+ <div id="quickbook.syntax.block.tables.t1" class="table">
+ <table>
+ <caption>Table with fat cells</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading 1
+ </p>
+ </th>
+ <th>
+ <p>
+ Heading 2
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ Row 0, Col 0: a small cell
+ </p>
+ </td>
+ <td>
+ <p>
+ Row 0, Col 1: a big fat cell with paragraphs
+ </p>
+ <p>
+ Boost provides free peer-reviewed portable C++ source libraries.
+ </p>
+ <p>
+ 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.
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ Row 1, Col 0: a small cell
+ </p>
+ </td>
+ <td>
+ <p>
+ Row 1, Col 1: a small cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <p>
+ Here's how to have preformatted blocks of code in a table cell:
+ </p>
+<pre class="programlisting">[table Table with code
+ [[Comment] [Code]]
+ [
+ [My first program]
+ [``
+ #include &lt;iostream&gt;
+
+ int main()
+ {
+ std::cout &lt;&lt; &quot;Hello, World!&quot; &lt;&lt; std::endl;
+ return 0;
+ }
+ ``]
+ ]
+]
+</pre>
+ <div id="quickbook.syntax.block.tables.t2" class="table">
+ <table>
+ <caption>Table with code</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Comment
+ </p>
+ </th>
+ <th>
+ <p>
+ Code
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ My first program
+ </p>
+ </td>
+ <td>
+ <p>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">iostream</span><span class="special">&gt;</span>
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="string">&quot;Hello, World!&quot;</span> <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+ <span class="keyword">return</span> <span class="number">0</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.variable_lists">
+ <h3>
+ Variable Lists
+ </h3>
+ <div id="quickbook.syntax.block.variable_lists">
+<pre class="programlisting">[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]]
+]
+</pre>
+ <p>
+ will generate:
+ </p>
+ <dl>
+ <dt>
+ term 1
+ </dt>
+ <dd>
+ <p>
+ The definition of term 1
+ </p>
+ </dd>
+ <dt>
+ term 2
+ </dt>
+ <dd>
+ <p>
+ The definition of term 2
+ </p>
+ </dd>
+ <dt>
+ term 3
+ </dt>
+ <dd>
+ <p>
+ The definition of term 3
+ </p>
+ </dd>
+ </dl>
+ <p>
+ The rules for variable lists are the same as for tables, except that
+ only 2 &quot;columns&quot; are allowed. The first column contains the
+ terms, and the second column contains the definitions. Those familiar
+ with HTML will recognize this as a &quot;definition list&quot;.
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.include">
+ <h3>
+ Include
+ </h3>
+ <div id="quickbook.syntax.block.include">
+ <p>
+ You can include one QuickBook file from another. The syntax is simply:
+ </p>
+<pre class="programlisting">[include someother.qbk]
+</pre>
+ <p>
+ The included file will be processed as if it had been cut and pasted
+ into the current document, with the following exceptions:
+ </p>
+ <ul>
+ <li>
+ <div>
+ The __FILENAME__ predefined macro will reflect the name of the
+ file currently being processed.
+ </div>
+ </li>
+ <li>
+ <div>
+ Any macros defined in the included file are scoped to that file.
+ </div>
+ </li>
+ </ul>
+ <p>
+ The <tt>[include]</tt> 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 (&quot;someother&quot;, in the example
+ above). You can specify the id like this:
+ </p>
+<pre class="programlisting">[include:someid someother.qbk]
+</pre>
+ <p>
+ 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 &quot;Intro&quot;,
+ the named anchor for that section will be &quot;someid.intro&quot;,
+ and you can link to it with <tt>[link someid.intro The Intro]</tt>.
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.syntax.block.import">
+ <h3>
+ Import
+ </h3>
+ <div id="quickbook.syntax.block.import">
+ <p>
+ 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.
+ </p>
+ <p>
+ QuickBook's import facility provides a nice solution.
+ </p>
+ <h5 id="quickbook.syntax.block.import.example">
+ Example
+ </h5>
+ <p>
+ You can effortlessly import code snippets from source code into your
+ QuickBook. The following illustrates how this is done:
+ </p>
+<pre class="programlisting">[import ../test/stub.cpp]
+[foo]
+[bar]
+</pre>
+ <p>
+ The first line:
+ </p>
+<pre class="programlisting">[import ../test/stub.cpp]
+</pre>
+ <p>
+ collects specially marked-up code snippets from <a href="../../test/stub.cpp">stub.cpp</a>
+ and places them in your QuickBook file as virtual templates. Each of
+ the specially marked-up code snippets has a name (e.g. <code><span
+ class="identifier">foo</span></code> and <code><span class="identifier">bar</span></code>
+ 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:
+ </p>
+<pre class="programlisting">[foo]
+[bar]
+</pre>
+ <p>
+ And the result is:
+ </p>
+ <p>
+ This is the <span class="bold"><strong><span class="emphasis"><em>foo</em></span></strong></span>
+ function.
+ </p>
+ <p>
+ This description can have paragraphs...
+ </p>
+ <ul>
+ <li>
+ <div>
+ lists
+ </div>
+ </li>
+ <li>
+ <div>
+ etc.
+ </div>
+ </li>
+ </ul>
+ <p>
+ And any quickbook block markup.
+ </p>
+ <p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">foo</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="comment">// return 'em, foo man!</span>
+ <span class="keyword">return</span> <span class="string">&quot;foo&quot;</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+ </p>
+ <p>
+ This is the <span class="bold"><strong><span class="emphasis"><em>bar</em></span></strong></span>
+ function
+ </p>
+ <p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">bar</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="comment">// return 'em, bar man!</span>
+ <span class="keyword">return</span> <span class="string">&quot;bar&quot;</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+ </p>
+ <p>
+ Some trailing text here
+ </p>
+ <h5 id="quickbook.syntax.block.import.code_snippet_markup">
+ Code Snippet Markup
+ </h5>
+ <p>
+ Note how the code snippets in <a href="../../test/stub.cpp">stub.cpp</a>
+ get marked up. We use distinguishable comments following the form:
+ </p>
+<pre class="programlisting"><span class="comment">//[id</span>
+<span class="identifier">some</span> <span class="identifier">code</span> <span class="identifier">here</span>
+<span class="comment">//]</span>
+</pre>
+ <p>
+ The first comment line above initiates a named code-snippet. This prefix
+ will not be visible in quickbook. The entire code-snippet in between
+ <code><span class="comment">//[id</span></code> and <code><span class="comment">//]</span></code>
+ will be inserted as a template in quickbook with name <span class="emphasis"><em><span
+ class="emphasis"><em>id</em></span></em></span>. The comment <code><span
+ class="comment">//]</span></code> ends a code-snippet This too will
+ not be visible in quickbook.
+ </p>
+ <h5 id="quickbook.syntax.block.import.special_comments">
+ Special Comments
+ </h5>
+ <p>
+ Special comments of the form:
+ </p>
+<pre class="programlisting"><span class="comment">//` some [*quickbook] markup here</span>
+</pre>
+ <p>
+ and:
+ </p>
+<pre class="programlisting"><span class="comment">/*` some [*quickbook] markup here */</span>
+</pre>
+ <p>
+ will be parsed by QuickBook. This can contain quickbook <span class="emphasis"><em>blocks</em></span>
+ (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.
+ </p>
+ <h5 id="quickbook.syntax.block.import.callouts">
+ Callouts
+ </h5>
+ <p>
+ Special comments of the form:
+ </p>
+<pre class="programlisting"><span class="comment">/*&lt; some [*quickbook] markup here &gt;*/</span>
+</pre>
+ <p>
+ will be regarded as callouts. These will be collected, numbered and
+ rendered as a &quot;callout bug&quot; (a small icon with a number).
+ After the whole snippet is parsed, the callout list is generated. See
+ <a href="http://www.docbook.org/tdg/en/html/callout.html">Callouts</a>
+ for details. Example:
+ </p>
+ <p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">foo_bar</span><span class="special">()</span> <a href="#quickbook.syntax.block.import.c1">(1)</a>
+<span class="special">{</span>
+ <span class="keyword">return</span> <span class="string">&quot;foo-bar&quot;</span><span class="special">;</span> <a href="#quickbook.syntax.block.import.c3">(2)</a>
+<span class="special">}</span>
+</pre>
+ </p>
+ <div>
+ <div id="quickbook.syntax.block.import.c1">
+ <a href="#quickbook.syntax.block.import.c0">(1)</a>
+ <p>
+ The <span class="emphasis"><em>Mythical</em></span> FooBar. See
+ <a href="http://en.wikipedia.org/wiki/Foobar">Foobar for details</a>
+ </p>
+ </div>
+ <div id="quickbook.syntax.block.import.c3">
+ <a href="#quickbook.syntax.block.import.c2">(2)</a>
+ <p>
+ return 'em, foo-bar man!
+ </p>
+ </div>
+ </div>
+ <p>
+ Checkout <a href="../../test/stub.cpp">stub.cpp</a> to see the actual
+ code.
+ </p>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="quickbook.install">
+ <h3>
+ Installation and configuration
+ </h3>
+ <div id="quickbook.install">
+ <p>
+ This section provides some guidelines on how to install and configure BoostBook
+ and Quickbook under several operating systems.
+ </p>
+ <p>
+ Before continuing, it is very important that you keep this in mind: if
+ you try to build some documents and the process breaks due to misconfiguration,
+ be absolutely sure to delete any <code><span class="identifier">bin</span></code>
+ and <code><span class="identifier">bin</span><span class="special">.</span><span
+ class="identifier">v2</span></code> directories generated by the build
+ before trying again. Otherwise your configuration fixes will not take any
+ effect.
+ </p>
+ </div>
+ <div id="quickbook.install.windows">
+ <h3>
+ Windows 2000, XP, 2003, Vista
+ </h3>
+ <div id="quickbook.install.windows">
+ <blockquote>
+ <p>
+ <span class="emphasis"><em>Section contributed by Julio M. Merino Vidal</em></span>
+ </p>
+ </blockquote>
+ <p>
+ The following instructions apply to any Windows system based on Windows
+ 2000, including Windows XP, Windows 2003 Server and Windows Vista. The
+ paths shown below are taken from a Windows Vista machine; you will need
+ to adjust them to match your system in case you are running an older
+ version.
+ </p>
+ <ol>
+ <li>
+ <div>
+ First of all you need to have a copy of <code><span class="identifier">xsltproc</span></code>
+ for Windows. There are many ways to get this tool, but to keep things
+ simple, use the <a href="http://www.zlatkovic.com/pub/libxml/">binary
+ packages</a> made by Igor Zlatkovic. At the very least, you need
+ to download the following packages: <code><span class="identifier">iconv</span></code>,
+ <code><span class="identifier">zlib</span></code>, <code><span class="identifier">libxml2</span></code>
+ and <code><span class="identifier">libxslt</span></code>.
+ </div>
+ </li>
+ <li>
+ <div>
+ Unpack all these packages in the same directory so that you get unique
+ <code><span class="identifier">bin</span></code>, <code><span class="identifier">include</span></code>
+ and <code><span class="identifier">lib</span></code> directories
+ within the hierarchy. These instructions use <code><span class="identifier">C</span><span
+ class="special">:\</span><span class="identifier">Users</span><span
+ class="special">\</span><span class="identifier">example</span><span
+ class="special">\</span><span class="identifier">Documents</span><span
+ class="special">\</span><span class="identifier">boost</span><span
+ class="special">\</span><span class="identifier">xml</span></code>
+ as the root for all files.
+ </div>
+ </li>
+ <li>
+ <div>
+ From the command line, go to the <code><span class="identifier">bin</span></code>
+ directory and launch <code><span class="identifier">xsltproc</span><span
+ class="special">.</span><span class="identifier">exe</span></code>
+ to ensure it works. You should get usage information on screen.
+ </div>
+ </li>
+ <li>
+ <div>
+ Download <a href="http://www.docbook.org/xml/4.2/docbook-xml-4.2.zip">Docbook
+ XML 4.2</a> and unpack it in the same directory used above. That
+ is: <code><span class="identifier">C</span><span class="special">:\</span><span
+ class="identifier">Users</span><span class="special">\</span><span
+ class="identifier">example</span><span class="special">\</span><span
+ class="identifier">Documents</span><span class="special">\</span><span
+ class="identifier">boost</span><span class="special">\</span><span
+ class="identifier">xml</span><span class="special">\</span><span
+ class="identifier">docbook</span><span class="special">-</span><span
+ class="identifier">xml</span></code>.
+ </div>
+ </li>
+ <li>
+ <div>
+ Download the latest <a href="http://sourceforge.net/project/showfiles.php?group_id=21935&amp;package_id=16608">Docbook
+ XSL</a> version and unpack it, again in the same directory used before.
+ To make things easier, rename the directory created during the extraction
+ to <code><span class="identifier">docbook</span><span class="special">-</span><span
+ class="identifier">xsl</span></code> (bypassing the version name):
+ <code><span class="identifier">C</span><span class="special">:\</span><span
+ class="identifier">Users</span><span class="special">\</span><span
+ class="identifier">example</span><span class="special">\</span><span
+ class="identifier">Documents</span><span class="special">\</span><span
+ class="identifier">boost</span><span class="special">\</span><span
+ class="identifier">xml</span><span class="special">\</span><span
+ class="identifier">docbook</span><span class="special">-</span><span
+ class="identifier">xsl</span></code>.
+ </div>
+ </li>
+ <li>
+ <div>
+ Add the following to your <code><span class="identifier">user</span><span
+ class="special">-</span><span class="identifier">config</span><span
+ class="special">.</span><span class="identifier">jam</span></code>
+ file, which should live in your home directory (<code><span class="special">%</span><span
+ class="identifier">HOMEDRIVE</span><span class="special">%%</span><span
+ class="identifier">HOMEPATH</span><span class="special">%</span></code>).
+ You must already have it somewhere or otherwise you could not be
+ building Boost (i.e. missing tools configuration).
+ </div>
+ </li>
+ </ol>
+<pre class="programlisting"><span class="identifier">using</span> <span class="identifier">xsltproc</span>
+ <span class="special">:</span> <span class="string">&quot;C:/Users/example/Documents/boost/xml/bin/xsltproc.exe&quot;</span>
+ <span class="special">;</span>
+
+<span class="identifier">using</span> <span class="identifier">boostbook</span>
+ <span class="special">:</span> <span class="string">&quot;C:/Users/example/Documents/boost/xml/docbook-xsl&quot;</span>
+ <span class="special">:</span> <span class="string">&quot;C:/Users/example/Documents/boost/xml/docbook-xml&quot;</span>
+ <span class="special">;</span>
+</pre>
+ <p>
+ The above steps are enough to get a functional BoostBook setup. Quickbook
+ will be automatically built when needed. If you want to avoid these rebuilds:
+ </p>
+ <ol>
+ <li>
+ <div>
+ Go to Quickbook's source directory (<code><span class="identifier">BOOST_ROOT</span><span
+ class="special">\</span><span class="identifier">tools</span><span
+ class="special">\</span><span class="identifier">quickbook</span></code>).
+ </div>
+ </li>
+ <li>
+ <div>
+ Build the utility by issuing <code><span class="identifier">bjam</span>
+ <span class="special">--</span><span class="identifier">v2</span></code>.
+ </div>
+ </li>
+ <li>
+ <div>
+ Copy the resulting <code><span class="identifier">quickbook</span><span
+ class="special">.</span><span class="identifier">exe</span></code>
+ binary (located under the <code><span class="identifier">BOOST_ROOT</span><span
+ class="special">\</span><span class="identifier">bin</span><span
+ class="special">.</span><span class="identifier">v2</span></code>
+ hierarchy) to a safe place. Following our previous example, you can
+ install it into: <code><span class="identifier">C</span><span class="special">:\</span><span
+ class="identifier">Users</span><span class="special">\</span><span
+ class="identifier">example</span><span class="special">\</span><span
+ class="identifier">Documents</span><span class="special">\</span><span
+ class="identifier">boost</span><span class="special">\</span><span
+ class="identifier">xml</span><span class="special">\</span><span
+ class="identifier">bin</span></code>.
+ </div>
+ </li>
+ <li>
+ <div>
+ Add the following to your <code><span class="identifier">user</span><span
+ class="special">-</span><span class="identifier">config</span><span
+ class="special">.</span><span class="identifier">jam</span></code>
+ file:
+ </div>
+ </li>
+ </ol>
+<pre class="programlisting"><span class="identifier">using</span> <span class="identifier">quickbook</span>
+ <span class="special">:</span> <span class="string">&quot;C:/Users/example/Documents/boost/xml/bin/quickbook.exe&quot;</span>
+ <span class="special">;</span>
+</pre>
+ </div>
+ </div>
+ <div id="quickbook.install.linux">
+ <h3>
+ Debian, Ubuntu
+ </h3>
+ <div id="quickbook.install.linux">
+ <p>
+ The following instructions apply to Debian and its derivatives. They
+ are based on a Ubuntu Edgy install but should work on other Debian based
+ systems.
+ </p>
+ <p>
+ First install the <code><span class="identifier">bjam</span></code>,
+ <code><span class="identifier">xsltproc</span></code>, <code><span class="identifier">docbook</span><span
+ class="special">-</span><span class="identifier">xsl</span></code> and
+ <code><span class="identifier">docbook</span><span class="special">-</span><span
+ class="identifier">xml</span></code> packages. For example, using <code><span
+ class="identifier">apt</span><span class="special">-</span><span class="identifier">get</span></code>:
+ </p>
+<pre class="programlisting"><span class="identifier">sudo</span> <span class="identifier">apt</span><span class="special">-</span><span class="identifier">get</span> <span class="identifier">install</span> <span class="identifier">xsltprc</span> <span class="identifier">docbook</span><span class="special">-</span><span class="identifier">xsl</span> <span class="identifier">docbook</span><span class="special">-</span><span class="identifier">xml</span>
+</pre>
+ <p>
+ If you're planning on building boost's documentation, you'll also need
+ to install the <code><span class="identifier">doxygen</span></code> package
+ as well.
+ </p>
+ <p>
+ Next, we need to configure Boost Build to compile BoostBook files. Add
+ the following to your <code><span class="identifier">user</span><span
+ class="special">-</span><span class="identifier">config</span><span class="special">.</span><span
+ class="identifier">jam</span></code> file, which should be in your home
+ directory. If you don't have one, create a file containing this text.
+ For more information on setting up <code><span class="identifier">user</span><span
+ class="special">-</span><span class="identifier">config</span><span class="special">.</span><span
+ class="identifier">jam</span></code>, see the <a href="http://boost.org/boost-build2/doc/html/bbv2/advanced/configuration.html">Boost
+ Build documentation</a>.
+ </p>
+<pre class="programlisting"><span class="identifier">using</span> <span class="identifier">xsltproc</span> <span class="special">;</span>
+
+<span class="identifier">using</span> <span class="identifier">boostbook</span>
+ <span class="special">:</span> <span class="special">/</span><span class="identifier">usr</span><span class="special">/</span><span class="identifier">share</span><span class="special">/</span><span class="identifier">xml</span><span class="special">/</span><span class="identifier">docbook</span><span class="special">/</span><span class="identifier">stylesheet</span><span class="special">/</span><span class="identifier">nwalsh</span>
+ <span class="special">:</span> <span class="special">/</span><span class="identifier">usr</span><span class="special">/</span><span class="identifier">share</span><span class="special">/</span><span class="identifier">xml</span><span class="special">/</span><span class="identifier">docbook</span><span class="special">/</span><span class="identifier">schema</span><span class="special">/</span><span class="identifier">dtd</span><span class="special">/</span><span class="number">4.2</span>
+ <span class="special">;</span>
+
+<span class="comment"># Remove this line if you're not using doxygen</span>
+<span class="identifier">using</span> <span class="identifier">doxygen</span> <span class="special">;</span>
+</pre>
+ <p>
+ The above steps are enough to get a functional BoostBook setup. Quickbook
+ will be automatically built when needed. If you want to avoid these rebuilds:
+ </p>
+ <ol>
+ <li>
+ <div>
+ Go to Quickbook's source directory (<code><span class="identifier">BOOST_ROOT</span><span
+ class="special">/</span><span class="identifier">tools</span><span
+ class="special">/</span><span class="identifier">quickbook</span></code>).
+ </div>
+ </li>
+ <li>
+ <div>
+ Build the utility by issuing <code><span class="identifier">bjam</span>
+ <span class="special">--</span><span class="identifier">v2</span></code>.
+ </div>
+ </li>
+ <li>
+ <div>
+ Copy the resulting <code><span class="identifier">quickbook</span></code>
+ binary (located under the <code><span class="identifier">BOOST_ROOT</span><span
+ class="special">/</span><span class="identifier">bin</span><span
+ class="special">.</span><span class="identifier">v2</span></code>
+ hierarchy) to a safe place. The traditional location is <code><span
+ class="special">/</span><span class="identifier">usr</span><span
+ class="special">/</span><span class="identifier">local</span><span
+ class="special">/</span><span class="identifier">bin</span></code>.
+ </div>
+ </li>
+ <li>
+ <div>
+ Add the following to your <code><span class="identifier">user</span><span
+ class="special">-</span><span class="identifier">config</span><span
+ class="special">.</span><span class="identifier">jam</span></code>
+ file, using the full path of the quickbook executable:
+ </div>
+ </li>
+ </ol>
+<pre class="programlisting"><span class="identifier">using</span> <span class="identifier">quickbook</span>
+ <span class="special">:</span> <span class="special">/</span><span class="identifier">usr</span><span class="special">/</span><span class="identifier">local</span><span class="special">/</span><span class="identifier">bin</span><span class="special">/</span><span class="identifier">quickbook</span>
+ <span class="special">;</span>
+</pre>
+ </div>
+ </div>
+ </div>
+ <div id="quickbook.editors">
+ <h3>
+ Editor Support
+ </h3>
+ <div id="quickbook.editors">
+ <p>
+ Editing quickbook files is usually done with text editors both simple and
+ powerful. The following sections list the settings for some editors which
+ can help make editing quickbook files a bit easier.
+ </p>
+ <div class="blurb">
+ <p>
+ <span class="inlinemediaobject"><img src="images/note.png" alt="[]"/></span>
+ You may submit your settings, tips, and suggestions to the authors, or
+ through the <a href="https://lists.sourceforge.net/lists/listinfo/boost-">docs
+ Boost Docs mailing list</a>.
+ </p>
+ </div>
+ </div>
+ <div id="quickbook.editors.scite">
+ <h3>
+ Scintilla Text Editor
+ </h3>
+ <div id="quickbook.editors.scite">
+ <blockquote>
+ <p>
+ <span class="emphasis"><em>Section contributed by Dean Michael Berris</em></span>
+ </p>
+ </blockquote>
+ <p>
+ The Scintilla Text Editor (SciTE) is a free source code editor for Win32
+ and X. It uses the SCIntilla source code editing component.
+ </p>
+ <div class="blurb">
+ <p>
+ <span class="inlinemediaobject"><img src="images/tip.png" alt="[]"/></span>
+ SciTE can be downloaded from <a href="http://www.scintilla.org/SciTE.html">http://www.scintilla.org/SciTE.html</a>
+ </p>
+ </div>
+ <p>
+ You can use the following settings to highlight quickbook tags when editing
+ quickbook files.
+ </p>
+<pre class="programlisting">qbk=*.qbk
+lexer.*.qbk=props
+use.tabs.$(qbk)=0
+tab.size.$(qbk)=4
+indent.size.$(qbk)=4
+style.props.32=$(font.base)
+comment.stream.start.props=[/
+comment.stream.end.props=]
+comment.box.start.props=[/
+comment.box.middle.props=
+comment.box.end.props=]
+</pre>
+ <div class="blurb">
+ <p>
+ <span class="inlinemediaobject"><img src="images/note.png" alt="[]"/></span>
+ Thanks to Rene Rivera for the above SciTE settings.
+ </p>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="quickbook.faq">
+ <h3>
+ Frequently Asked Questions
+ </h3>
+ <div id="quickbook.faq">
+ <h3 id="quickbook.faq.can_i_use_quickbook_for_non_boost_documentation_">
+ Can I use QuickBook for non-Boost documentation?
+ </h3>
+ <p>
+ QuickBook can be used for non-Boost documentation with a little extra work.
+ </p>
+ <blockquote>
+ <p>
+ <span class="emphasis"><em>Faq contributed by Michael Marcin</em></span>
+ </p>
+ </blockquote>
+ <p>
+ When building HTML documentation with BoostBook a Boost C++ Libraries header
+ is added to the files. When using QuickBook to document projects outside
+ of Boost this is not desirable. This behavior can be overridden at the
+ BoostBook level by specifying some XSLT options. When using Boost Build
+ version 2 (BBv2) this can be achieved by adding parameters to the BoostBook
+ target declaration.
+ </p>
+ <p>
+ For example:
+ </p>
+<pre class="programlisting">using quickbook ;
+
+xml my_doc : my_doc.qbk ;
+
+boostbook standalone
+ :
+ my_doc
+ :
+ &lt;xsl:param&gt;boost.image.src=images/my_project_logo.png
+ &lt;xsl:param&gt;boost.image.alt=&quot;\&quot;My Project\&quot;&quot;
+ &lt;xsl:param&gt;boost.image.w=100
+ &lt;xsl:param&gt;boost.image.h=50
+ &lt;xsl:param&gt;nav.layout=none
+ ;
+</pre>
+ </div>
+ </div>
+ <div id="quickbook.ref">
+ <h3>
+ Quick Reference
+ </h3>
+ <div id="quickbook.ref">
+ <p>
+ [cpp]
+ </p>
+ <div id="quickbook.ref.t0" class="table">
+ <table>
+ <caption>Syntax Compendium</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ To do this...
+ </p>
+ </th>
+ <th>
+ <p>
+ Use this...
+ </p>
+ </th>
+ <th>
+ <p>
+ See this...
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ comment
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[/ some comment]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.comments">Comments</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <span class="emphasis"><em>italics</em></span>
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>['italics] or /italics/</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.font_styles">Font Styles</a>
+ and <a href="#quickbook.syntax.phrase.simple_formatting">Simple
+ formatting</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <span class="bold"><strong>bold</strong></span>
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[*bold] or *bold*</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.font_styles">Font Styles</a>
+ and <a href="#quickbook.syntax.phrase.simple_formatting">Simple
+ formatting</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <span class="underline">underline</span>
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[_underline] or _underline_</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.font_styles">Font Styles</a>
+ and <a href="#quickbook.syntax.phrase.simple_formatting">Simple
+ formatting</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <tt>teletype</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[^teletype] or =teletype=</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.font_styles">Font Styles</a>
+ and <a href="#quickbook.syntax.phrase.simple_formatting">Simple
+ formatting</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <span class="strikethrough">strikethrough</span>
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[-strikethrough]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.font_styles">Font Styles</a>
+ and <a href="#quickbook.syntax.phrase.simple_formatting">Simple
+ formatting</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ <em class="replaceable">replaceable</em>
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[~replaceable]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.replaceable">Replaceble</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ source mode
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[c++]</tt> or <tt>[python]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.source_mode">Source Mode</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ inline code
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>`int main();`</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.inline_code">Inline code</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ code block
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>``int main();``</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.code">Code</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ code escape
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>``from c++ to QuickBook``</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.escape_back">Escaping Back To
+ QuickBook</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ line break
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[br] or \n</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.line_break">line-break</a>
+ <span class="bold"><strong>DEPRECATED</strong></span>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ anchor
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[#anchor]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.anchors">Anchors</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ link
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[@http://www.boost.org Boost]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.links">Links</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ anchor link
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[link section.anchor Link text]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.anchor_links">Anchor links</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ refentry link
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[link xml.refentry Link text]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.refentry_links">refentry links</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ function link
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[funcref fully::qualified::function_name Link text]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.code_links">function, class,
+ member, enum, macro, concept or header links</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ class link
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[classref fully::qualified::class_name Link text]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.code_links">function, class,
+ member, enum, macro, concept or header links</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ member link
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[memberref fully::qualified::member_name Link text]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.code_links">function, class,
+ member, enum, macro, concept or header links</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ enum link
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[enumref fully::qualified::enum_name Link text]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.code_links">function, class,
+ member, enum, macro, concept or header links</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ macro link
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[macroref MACRO_NAME Link text]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.code_links">function, class,
+ member, enum, macro, concept or header links</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ concept link
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[conceptref ConceptName Link text]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.code_links">function, class,
+ member, enum, macro, concept or header links</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ header link
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[headerref path/to/header.hpp Link text]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.code_links">function, class,
+ member, enum, macro, concept or header links</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ escape
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>'''escaped text (no processing/formatting)'''</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.escape">Escape</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ single char escape
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>\c</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.single_char_escape">Single
+ char escape</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ images
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[$image.jpg]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.phrase.images">Images</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ begin section
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[section The Section Title]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.section">Section</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ end section
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[endsect]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.section">Section</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ paragraph
+ </p>
+ </td>
+ <td>
+ <p>
+ No markup. Paragraphs start left-flushed and are terminated by
+ two or more newlines.
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.paragraphs">Paragraphs</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ ordered list
+ </p>
+ </td>
+ <td>
+<pre class="programlisting"># one
+# two
+# three
+</pre>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.lists.ordered_lists">Ordered
+ lists</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ unordered list
+ </p>
+ </td>
+ <td>
+<pre class="programlisting">* one
+* two
+* three
+</pre>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.lists.unordered_lists">Unordered
+ lists</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ code
+ </p>
+ </td>
+ <td>
+ <p>
+ No markup. Preformatted code starts with a space or a tab.
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.code">Code</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ preformatted
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[pre preformatted]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.preformatted">Preformatted</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ block quote
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[:sometext...]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.blockquote">Blockquote</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ heading 1
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[h1 Heading 1]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.headings">Heading</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ heading 2
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[h2 Heading 2]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.headings">Heading</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ heading 3
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[h3 Heading 3]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.headings">Heading</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ heading 4
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[h4 Heading 4]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.headings">Heading</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ heading 5
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[h5 Heading 5]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.headings">Heading</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ heading 6
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[h6 Heading 6]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.headings">Heading</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ macro
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[def macro_identifier some text]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.macros">Macros</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ template
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[template[a b] [a] body [b]]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.templates">Templates</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ blurb
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[blurb advertisement or note...]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.blurbs">Blurbs</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ admonition
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[warning Warning text...]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.admonitions">Admonitions</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ table
+ </p>
+ </td>
+ <td>
+<pre class="programlisting">[table Title
+[[a][b][c]]
+[[a][b][c]]
+]
+</pre>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.tables">Tables</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ variablelist
+ </p>
+ </td>
+ <td>
+<pre class="programlisting">[variablelist Title
+[[a][b]]
+[[a][b]]
+]
+</pre>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.variable_lists">Variable Lists</a>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ include
+ </p>
+ </td>
+ <td>
+ <p>
+ <tt>[include someother.qbk]</tt>
+ </p>
+ </td>
+ <td>
+ <p>
+ <a href="#quickbook.syntax.block.include">Include</a>
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div class="footnotes">
+ <br/>
+ <hr/>
+ <div id="footnote-1" class="footnote">
+ <p>
+ <a href="#quickbook.syntax.phrase.simple_formatting.f0"><sup>[1]</sup></a>
+ Thanks to David Barrett, author of <a href="http://quinthar.com/qwikiwiki/index.php?page=Home">Qwiki</a>,
+ for sharing these samples and teaching me these obscure formatting rules.
+ I wasn't sure at all if <a href="http://spirit.sourceforge.net">Spirit</a>,
+ being more or less a formal EBNF parser, can handle the context sensitivity
+ and ambiguity.
+ </p>
+ </div>
+ <div id="footnote-2" class="footnote">
+ <p>
+ <a href="#quickbook.syntax.phrase.footnotes.f0"><sup>[2]</sup></a> A sample
+ footnote
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/quickbook_manual-1_4.quickbook b/src/boost/tools/quickbook/test/quickbook_manual-1_4.quickbook
new file mode 100644
index 000000000..00fc9caa1
--- /dev/null
+++ b/src/boost/tools/quickbook/test/quickbook_manual-1_4.quickbook
@@ -0,0 +1,1981 @@
+[article Quickbook
+ [quickbook 1.4]
+ [version 1.4]
+ [authors [de Guzman, Joel], [Niebler, Eric]]
+ [copyright 2002 2004 2006 Joel de Guzman, Eric Niebler]
+ [purpose /WikiWiki/ style documentation tool]
+ [license
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ [@http://www.boost.org/LICENSE_1_0.txt])
+ ]
+]
+
+[/ QuickBook Document version 1.3 ]
+[/ Sept 24, 2002 ]
+[/ Sept 2, 2004 ]
+[/ Feb 14, 2005 ]
+[/ Sept 13, 2005 ]
+
+[/ Some links]
+
+[def __note__ [$images/note.png]]
+[def __alert__ [$images/alert.png]]
+[def __tip__ [$images/tip.png]]
+[def :-) [$images/smiley.png]]
+[def __spirit__ [@http://spirit.sourceforge.net Spirit]]
+[def __boostbook__ [@http://www.boost.org/doc/html/boostbook.html BoostBook]]
+[def __docbook__ [@http://www.docbook.org/ DocBook]]
+
+[def __comments__ [link quickbook.syntax.comments Comments]]
+
+[def __font_styles__ [link quickbook.syntax.phrase.font_styles Font Styles]]
+[def __quotations__ [link quickbook.syntax.phrase.quotations Quotations]]
+[def __replaceable__ [link quickbook.syntax.phrase.replaceable Replaceble]]
+[def __simple_formatting__ [link quickbook.syntax.phrase.simple_formatting Simple formatting]]
+[def __inline_code__ [link quickbook.syntax.phrase.inline_code Inline code]]
+[def __code_blocks__ [link quickbook.syntax.phrase.code_blocks Code blocks]]
+[def __source_mode__ [link quickbook.syntax.phrase.source_mode Source Mode]]
+[def __line_break__ [link quickbook.syntax.phrase.line_break line-break]]
+[def __anchors__ [link quickbook.syntax.phrase.anchors Anchors]]
+[def __links__ [link quickbook.syntax.phrase.links Links]]
+[def __anchor_links__ [link quickbook.syntax.phrase.anchor_links Anchor links]]
+[def __refentry_links__ [link quickbook.syntax.phrase.refentry_links refentry links]]
+[def __code_links__ [link quickbook.syntax.phrase.code_links function, class, member, enum, macro, concept or header links]]
+[def __escape__ [link quickbook.syntax.phrase.escape Escape]]
+[def __single_char_escape__ [link quickbook.syntax.phrase.single_char_escape Single char escape]]
+[def __images__ [link quickbook.syntax.phrase.images Images]]
+
+[def __document__ [link quickbook.syntax.block.document Document]]
+[def __section__ [link quickbook.syntax.block.section Section]]
+[def __xinclude__ [link quickbook.syntax.block.xinclude xinclude]]
+[def __paragraphs__ [link quickbook.syntax.block.paragraphs Paragraphs]]
+[def __ordered_lists__ [link quickbook.syntax.block.lists.ordered_lists Ordered lists]]
+[def __list_hierarchies__ [link quickbook.syntax.block.lists.list_hierarchies List Hierarchies]]
+[def __long_list_lines__ [link quickbook.syntax.block.lists.long_list_lines Long List Lines]]
+[def __unordered_lists__ [link quickbook.syntax.block.lists.unordered_lists Unordered lists]]
+[def __mixed_lists__ [link quickbook.syntax.block.lists.mixed_lists Mixed lists]]
+[def __code__ [link quickbook.syntax.block.code Code]]
+[def __escape_back__ [link quickbook.syntax.block.escape_back Escaping Back To QuickBook]]
+[def __preformatted__ [link quickbook.syntax.block.preformatted Preformatted]]
+[def __blockquote__ [link quickbook.syntax.block.blockquote Blockquote]]
+[def __heading__ [link quickbook.syntax.block.headings Heading]]
+[def __macros__ [link quickbook.syntax.block.macros Macros]]
+[def __templates__ [link quickbook.syntax.block.templates Templates]]
+[def __predefined_macros__ [link quickbook.syntax.block.predefined_macros Predefined Macros]]
+[def __blurbs__ [link quickbook.syntax.block.blurbs Blurbs]]
+[def __admonitions__ [link quickbook.syntax.block.admonitions Admonitions]]
+[def __tables__ [link quickbook.syntax.block.tables Tables]]
+[def __variable_lists__ [link quickbook.syntax.block.variable_lists Variable Lists]]
+[def __include__ [link quickbook.syntax.block.include Include]]
+[def __import__ [link quickbook.syntax.block.import Import]]
+
+[section:intro Introduction]
+
+[:[*['["Why program by hand in five days what you can spend five years of your
+life automating?]]]
+
+-- Terrence Parr, author ANTLR/PCCTS
+]
+
+Well, QuickBook started as a weekend hack. It was originally intended to be a
+sample application using __spirit__. What is it? What you are viewing now, this
+documentation, is autogenerated by QuickBook. These files were generated from
+one master:
+
+[:[@../quickbook.qbk quickbook.qbk]]
+
+Originally named QuickDoc, this funky tool that never dies evolved into a
+funkier tool thanks to Eric Niebler who resurrected the project making it
+generate __boostbook__ instead of HTML. The __boostbook__ documentation format
+is an extension of __docbook__, an SGML or XML based format for describing
+documentation.
+
+QuickBook is a WikiWiki style documentation tool geared towards C++
+documentation using simple rules and markup for simple formatting tasks.
+QuickBook extends the WikiWiki concept. Like the WikiWiki, QuickBook documents are
+simple text files. A single QuickBook document can generate a fully linked set
+of nice HTML and PostScript/PDF documents complete with images and syntax-
+colorized source code.
+
+Features include:
+
+* generate __boostbook__ xml, to generate HTML, PostScript and PDF
+* simple markup to link to Doxygen-generated entities
+* macro system for simple text substitution
+* simple markup for italics, bold, preformatted, blurbs, code samples,
+ tables, URLs, anchors, images, etc.
+* automatic syntax coloring of code samples
+* CSS support
+
+[endsect]
+
+[section:change_log Change Log]
+
+[h3 Version 1.3]
+
+* Quickbook file inclusion \[include\].
+* Better xml output (pretty layout). Check out the generated XML.
+* Regression testing facility: to make sure your document will always be
+ compatible (full backward compatibility) regardless of changes to
+ QuickBook.
+* Code cleanup and refactoring.
+* Allow phrase markup in the doc-info.
+* Preformatted code blocks via \`\`code\`\` (double ticks) allows code in tables
+ and lists, for example.
+* Quickbook versioning; allows full backward compatibility. You have to add
+ \[quickbook 1.3\] to the doc-info header to enable the new features. Without
+ this, QuickBook will assume that the document is a pre-1.3 document.
+* Better (intuitive) paragraph termination. Some markups may terminate a paragraph.
+ Example:``
+ [section x]
+ blah...
+ [endsect]``
+* Fully qualified section and headers. Subsection names are concatenated to the
+ ID to avoid clashing. Example: `doc_name.sect_name.sub_sect_name.sub_sub_sect_name`
+* Better &nbsp; and whitespace handling in code snippets.
+* \[xinclude\] fixes up the relative path to the target XML file when
+ input_directory is not the same as the output_directory.
+* Allow untitled tables.
+* Allow phrase markups in section titles.
+* Allow escaping back to QuickBook from code, code blocks and inline code.
+* Footnotes, with the \[footnote This is the footnote\] syntax.
+* Post-processor bug fix for escaped XML code that it does not recognize.
+* Replaceable, with the \[~replacement\] syntax.
+* Generic Headers
+* Code changes to allow full recursion (i.e. Collectors and push/pop functions)
+* Various code cleanup/maintenance
+* Templates!
+* \[conceptref\] for referencing BoostBook <concept> entities.
+* Allow escape of spaces. The escaped space is removed from the output. Syntax:
+ `\ `.
+* Nested comments are now allowed.
+* Quickbook blocks can nest inside comments.
+* __import__ facility.
+* Callouts on imported code
+* Simple markups can now span a whole block.
+* __blurbs__, __admonitions__ and table cells (see __tables__) may now
+ contain paragraphs.
+* `\n` and `[br]` are now deprecated.
+
+[endsect]
+
+[section:syntax Syntax Summary]
+
+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.
+
+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.
+
+[section Comments]
+
+Can be placed anywhere.
+
+[pre
+'''[/ comment (no output generated) ]'''
+]
+
+[/ for testing only... ]
+
+[pre
+'''[/ comments can be nested [/ some more here] ]'''
+]
+
+[/ for testing [/ only ] ]
+
+[pre
+'''[/ Quickbook blocks can nest inside comments. [*Comment this out too!] ]'''
+]
+
+[/ for testing [*only ] ]
+
+[endsect]
+
+[section:phrase Phrase Level Elements]
+
+[section Font Styles]
+
+[pre'''
+['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:
+
+[pre'''
+[*['bold-italic]]
+''']
+
+will generate:
+
+[*['bold-italic]]
+
+[endsect]
+
+[section Replaceable]
+
+When you want content that may or must be replaced by the user, use the syntax:
+
+[pre'''
+[~replacement]
+''']
+
+This will generate:
+
+[~replacement]
+
+[endsect]
+
+[section Quotations]
+
+[pre'''
+["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>).
+
+Like all phrase elements, quotations may be nested. Example:
+
+[pre'''
+["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.]
+
+[endsect]
+[section Simple formatting]
+
+Simple markup for formatting text, common in many applications, is now supported:
+
+[pre'''
+/italic/, *bold*, _underline_, =teletype=
+''']
+
+will generate:
+
+/italic/, *bold*, _underline_, =teletype=
+
+Unlike QuickBook's standard formatting scheme, the rules for simpler
+alternatives are much stricter[footnote Thanks to David Barrett, author of
+[@http://quinthar.com/qwikiwiki/index.php?page=Home 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.].
+
+* Simple markups cannot nest. You can combine a simple markup with a nestable markup.
+* Simple markups cannot contain any other form of quickbook markup.
+* 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 More Formatting Samples
+ [[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:
+
+[pre'''
+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:
+
+[pre'''
+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.
+
+[endsect]
+[section Inline code]
+
+Inlining code in paragraphs is quite common when writing C++ documentation. We
+provide a very simple markup for this. For example, this:
+
+[pre'''
+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 We simply enclose the code with the tick: [^'''"`"'''], not the
+single quote: `"'"`. Note too that [^'''`some code`'''] is preferred over
+[^'''[^some code]''']. ]
+
+[endsect]
+[section Code blocks]
+
+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:
+
+[pre
+\`\`
+ #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;
+ }
+``
+
+[endsect]
+[section Source Mode]
+
+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.
+
+To change the source mode, use the [^\[source-mode\]] markup, where
+=source-mode= is one of the supported modes. For example, this:
+
+[pre'''
+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 [python] `import` is rather like C++'s [c++] `#include`. A
+C++ comment `// looks like this` whereas a Python comment [python]
+`#looks like this`.
+
+[table Supported Source Modes
+ [[Mode] [Source Mode Markup]]
+ [[C++] [[^\[c++\]]]]
+ [[Python] [[^\[python\]]]]
+]
+
+[note The source mode strings are lowercase.]
+
+[endsect]
+[section line-break]
+
+[pre'''
+[br]
+''']
+
+[warning `[br]` is now deprecated. __blurbs__, __admonitions__ and
+table cells (see __tables__) may now contain paragraphs.]
+
+[endsect]
+[section Anchors]
+
+[pre'''
+[#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__.
+
+[endsect]
+[section Links]
+
+[pre'''
+[@http://www.boost.org this is [*boost's] website....]
+''']
+
+will generate:
+
+[@http://www.boost.org this is [*boost's] website....]
+
+URL links where the link text is the link itself is common. Example:
+
+[pre'''
+see http://spirit.sourceforge.net/
+''']
+
+so, when the text is absent in a link markup, the URL is assumed. Example:
+
+[pre
+see '''[@http://spirit.sourceforge.net/]'''
+]
+
+will generate:
+
+see [@http://spirit.sourceforge.net/]
+
+[endsect]
+[section Anchor links]
+
+You can link within a document using:
+
+[pre'''
+[link section_id.normalized_header_text The link text]
+''']
+
+See sections __section__ and __heading__ for more info.
+
+[endsect]
+[section refentry links]
+
+In addition, you can link internally to an XML refentry like:
+
+[pre'''
+[link xml.refentry The link text]
+''']
+
+This gets converted into [^<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:
+
+[pre'''
+[link xml.refentry]
+''']
+
+This gets converted into [^<link linkend="xml.refentry">xml.refentry</link>].
+
+[endsect]
+[section:code_links Code Links]
+
+If you want to link to a function, class, member, enum, concept or header in the reference
+section, you can use:
+
+[pre'''
+[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]
+''']
+
+Again, the link text is optional. If this is not present, the link text will
+automatically be the function, class, member, enum, macro, concept or header. Example:
+
+[pre'''
+[classref boost::bar::baz]
+''']
+
+would have "boost::bar::baz" as the link text.
+
+[endsect]
+[section Escape]
+
+The escape mark-up is used when we don't want to do any processing.
+
+[pre
+\'\'\'
+escape (no processing/formatting)
+\'\'\'
+]
+
+Escaping allows us to pass XML markup to __boostbook__ or __docbook__. For example:
+
+[pre
+\'\'\'
+<emphasis role="bold">This is direct XML markup</emphasis>
+\'\'\'
+]
+
+'''
+<emphasis role="bold">This is direct XML markup</emphasis>
+'''
+
+[important Be careful when using the escape. The text must conform to
+__boostbook__/__docbook__ syntax.]
+
+[endsect]
+[section Single char escape]
+
+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: [^\\'\\'\\']
+
+
+`\n` has a special meaning. It is used to generate line breaks.
+
+[warning `\n` and `[br]` are now deprecated. __blurbs__, __admonitions__
+and table cells (see __tables__) may now contain paragraphs.]
+
+The escaped space: `\ ` also has a special meaning. The escaped space is removed
+from the output.
+
+[endsect]
+[section Images]
+
+[pre'''
+[$image.jpg]
+''']
+
+[endsect]
+[section Footnotes]
+
+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:
+
+[pre'''
+[footnote A sample footnote]
+''']
+
+will generate this[footnote A sample footnote].
+
+[section Macro Expansion]
+
+[pre'''
+__a_macro_identifier__
+''']
+
+See __macros__ for details.
+
+[endsect]
+
+[section Template Expansion]
+
+[pre'''
+[a_template_identifier]
+''']
+
+See __templates__ for details.
+
+[endsect]
+
+[endsect]
+[endsect]
+[section:block Block Level Elements]
+
+[section Document]
+
+Every document must begin with a Document Info section, which should look
+like this:
+
+[pre'''
+[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:
+
+* 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.
+
+=version=, =id=, =dirname=, =copyright=, =purpose=, =category=, =authors=,
+=license=, =last-revision= and =source-mode= are optional information.
+
+=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.
+
+[endsect]
+[section Section]
+
+Starting a new section is accomplished with:
+
+[pre'''
+[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".
+
+End a section with:
+
+[pre'''
+[endsect]
+''']
+
+Sections can nest, and that results in a hierarchy in the table of contents.
+
+[endsect]
+[section xinclude]
+
+You can include another XML file with:
+
+[pre'''
+[xinclude file.xml]
+''']
+
+This is useful when file.xml has been generated by Doxygen and contains your
+reference section.
+
+[endsect]
+[section Paragraphs]
+
+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.
+
+[endsect]
+
+[section Lists]
+[section Ordered lists]
+
+[pre
+# One
+# Two
+# Three
+]
+
+will generate:
+
+# One
+# Two
+# Three
+
+[endsect]
+[section List Hierarchies]
+
+List hierarchies are supported. Example:
+
+[pre
+# One
+# Two
+# Three
+ # Three.a
+ # Three.b
+ # Three.c
+# Four
+ # Four.a
+ # Four.a.i
+ # Four.a.ii
+# Five
+]
+
+will generate:
+
+# One
+# Two
+# Three
+ # Three.a
+ # Three.b
+ # Three.c
+# Fourth
+ # Four.a
+ # Four.a.i
+ # Four.a.ii
+# Five
+
+[endsect]
+[section Long List Lines]
+
+Long lines will be wrapped appropriately. Example:
+
+[pre
+# 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.
+]
+
+# 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.
+
+[endsect]
+[section Unordered lists]
+
+[pre'''
+* First
+* Second
+* Third
+''']
+
+will generate:
+
+* First
+* Second
+* Third
+
+[endsect]
+[section Mixed lists]
+
+Mixed lists (ordered and unordered) are supported. Example:
+
+[pre'''
+# One
+# Two
+# Three
+ * Three.a
+ * Three.b
+ * Three.c
+# Four
+''']
+
+will generate:
+
+# One
+# Two
+# Three
+ * Three.a
+ * Three.b
+ * Three.c
+# Four
+
+And...
+
+[pre'''
+# 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.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
+
+[endsect]
+[endsect]
+
+[section Code]
+
+Preformatted code starts with a space or a tab. The code will be
+syntax highlighted according to the current __source_mode__:
+
+[c++]
+
+ #include <iostream>
+
+ int main()
+ {
+ // Sample code
+ std::cout << "Hello, World\n";
+ return 0;
+ }
+
+[python]
+
+ import cgi
+
+ def cookForHtml(text):
+ '''"Cooks" the input text for HTML.'''
+
+ return cgi.escape(text)
+
+[c++]
+
+Macros that are already defined are expanded in source code. Example:
+
+[pre'''
+[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:
+
+[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__;
+
+[endsect]
+[section:escape_back Escaping Back To QuickBook]
+
+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:
+
+[pre'''
+void ``[@http://en.wikipedia.org/wiki/Foo#Foo.2C_Bar_and_Baz foo]``()
+{
+}
+''']
+
+Will generate:
+
+ void ``[@http://en.wikipedia.org/wiki/Foo#Foo.2C_Bar_and_Baz foo]``()
+ {
+ }
+
+When escaping from code to QuickBook, only phrase level markups are
+allowed. Block level markups like lists, tables etc. are not allowed.
+
+[endsect]
+[section Preformatted]
+
+Sometimes, you don't want some preformatted text to be parsed as C++. In such
+cases, use the [^[pre ... \]] markup block.
+
+[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:
+
+[pre
+
+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.
+
+[endsect]
+[section Blockquote]
+
+[pre
+'''[:sometext...]'''
+]
+
+[:Indents the paragraph. This applies to one paragraph only.]
+
+[endsect]
+[section Admonitions]
+
+[pre'''
+[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:
+
+[note This is a note]
+[tip This is a tip]
+[important This is important]
+[caution This is a caution]
+[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.
+
+[endsect]
+[section Headings]
+
+[pre'''
+[h1 Heading 1]
+[h2 Heading 2]
+[h3 Heading 3]
+[h4 Heading 4]
+[h5 Heading 5]
+[h6 Heading 6]
+''']
+
+[h1 Heading 1]
+[h2 Heading 2]
+[h3 Heading 3]
+[h4 Heading 4]
+[h5 Heading 5]
+[h6 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:
+
+[pre'''
+[link section_id.normalized_header_text The link text]
+''']
+
+to link to them. See __anchor_links__ and __section__ for more info.
+
+[endsect]
+[section Generic Heading]
+
+In cases when you don't want to care about the heading level (1 to 6), you
+can use the /Generic Heading/:
+
+[pre'''
+[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/.
+
+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:
+
+[pre'''
+[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:
+
+[pre'''
+[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.
+
+[endsect]
+[section Macros]
+
+[pre'''
+[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:
+
+[pre'''
+[def sf_logo [$http://sourceforge.net/sflogo.php?group_id=28447&amp;type=1]]
+sf_logo
+''']
+
+Now everywhere the sf_logo is placed, the picture will be inlined.
+
+[def sf_logo [$http://sourceforge.net/sflogo.php?group_id=28447&type=1]]
+sf_logo
+
+[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.]
+
+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]'''].
+
+Some more examples:
+
+[pre'''
+[def :-) [$theme/smiley.png]]
+[def __spirit__ [@http://spirit.sourceforge.net Spirit]]
+''']
+
+(See __images__ and __links__)
+
+Invoking these macros:
+
+[pre'''
+Hi __spirit__ :-)
+''']
+
+will generate this:
+
+Hi __spirit__ :-)
+
+[endsect]
+[section Predefined Macros]
+
+Quickbook has some predefined macros that you can already use.
+
+[table Predefined Macros
+ [[Macro] [Meaning] [Example]]
+ [['''__DATE__'''] [Today's date] [__DATE__]]
+ [['''__TIME__'''] [The current time] [__TIME__]]
+ [['''__FILENAME__'''] [Quickbook source filename] [__FILENAME__]]
+]
+
+[endsect]
+[section Templates]
+
+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:
+
+[pre'''
+[template person[name age what]
+
+Hi, my name is [name]. I am [age] years old. I am a [what].
+
+]
+''']
+
+[template person[name age what]
+
+Hi, my name is [name]. I am [age] years old. I am a [what].
+
+]
+
+[heading 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.
+* A single character punctuation (a non-alphanumeric printable character)
+
+[heading 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.
+
+A template formal argument temporarily hides a template of the same name at
+the point where the [link quickbook.syntax.block.templates.template_expansion
+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.
+
+[heading 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:
+
+[pre'''
+[template sample[arg1 arg2...argN] replacement text... ]
+''']
+
+Block templates are of the form:
+
+[pre'''
+[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.
+
+[heading Template Expansion]
+
+You expand a template this way:
+
+[pre'''
+[template_identifier arg1..arg2..arg3]
+''']
+
+At template expansion, you supply the actual arguments. The template will
+be expanded with your supplied arguments. Example:
+
+[pre'''
+[person James Bond..39..Spy]
+[person Santa Clause..87..Big Red Fatso]
+''']
+
+Which will expand to:
+
+[person James Bond..39..Spy]
+[person Santa Clause..87..Big Red Fatso]
+
+[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.]
+
+Each actual argument can be a word, a text fragment or just about any [link
+quickbook.syntax.phrase QuickBook phrase]. Arguments are separated by the
+double dot [^".."] and terminated by the close parenthesis.
+
+[heading Nullary Templates]
+
+Nullary templates look and act like simple macros. Example:
+
+[pre'''
+[template alpha[]&apos;&apos;&apos;&amp;#945;&apos;&apos;&apos;]
+[template beta[]&apos;&apos;&apos;&amp;#946;&apos;&apos;&apos;]
+''']
+
+[template alpha[]'''&#945;''']
+[template beta[]'''&#946;''']
+
+Expanding:
+
+[pre'''Some squigles...[*[alpha][beta]]''']
+
+We have:
+
+Some squiggles...[*[alpha][beta]]
+
+The difference with macros are
+
+* The explicit [link quickbook.syntax.block.templates.template_expansion
+ 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.
+* 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:
+
+[pre'''
+[template aristotle_quote Aristotle: [*['Education is the best provision
+for the journey to old age.]]]
+''']
+
+[template aristotle_quote\ Aristotle: [*['Education is the best provision
+for the journey to old age.]]]
+
+Expanding:
+
+[pre'''
+Here's a quote from [aristotle_quote].
+''']
+
+We have:
+
+Here's a quote from [aristotle_quote].
+
+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:
+
+[pre'''
+[template tag\ _tag]
+''']
+
+[template tag\ _tag]
+
+Then expanding:
+
+[pre'''
+`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.
+
+[heading 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:
+
+* Break the last argument into two, at the first space found ([^'', '\\n',
+ \\t' or '\\r']).
+* Repeat until there are enough arguments or if there are no more spaces
+ found (in which case, an error is reported).
+
+For example:
+
+[pre'''
+[template simple[a b c d] [a][b][c][d]]
+[simple w x y z]
+''']
+
+will produce:
+
+[template simple[a b c d] [a][b][c][d]]
+[simple w x y z]
+
+"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".
+
+QuickBook only tries to get the arguments it needs. For example:
+
+[pre'''
+[simple w x y z trail]
+''']
+
+will produce:
+
+[simple w x y z trail]
+
+The arguments being: "w", "x", "y" and "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:
+
+[pre'''
+[simple what do you think ..m a n?]
+''']
+
+will produce:
+
+[simple what do you think ..m a n?]
+
+[heading 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 [link quickbook.syntax.block.templates.template_identifier
+template identifiers]. Example:
+
+[pre'''
+[template ![bar] '''<hey>'''[bar]'''</hey>''']
+''']
+
+Now, expanding this:
+
+[pre'''
+[!baz]
+''']
+
+We will have:
+
+[pre
+<hey>baz</hey>
+]
+
+[endsect]
+[section Blurbs]
+
+[pre'''
+[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:
+
+[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++.
+]
+
+[note Prefer [link quickbook.syntax.block.admonitions admonitions] wherever
+appropriate.]
+
+[endsect]
+[section Tables]
+
+[pre'''
+[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 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:
+
+[pre'''
+[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 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:
+
+[pre'''
+[table Table with code
+ [[Comment] [Code]]
+ [
+ [My first program]
+ ['''\`\`
+ #include <iostream>
+
+ int main()
+ {
+ std::cout << "Hello, World!" << std::endl;
+ return 0;
+ }
+ \`\`''']
+ ]
+]
+''']
+
+[table Table with code
+ [[Comment] [Code]]
+ [
+ [My first program]
+ [``
+ #include <iostream>
+
+ int main()
+ {
+ std::cout << "Hello, World!" << std::endl;
+ return 0;
+ }
+ ``]
+ ]
+]
+
+[endsect]
+[section Variable Lists]
+
+[pre'''
+[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]]
+]
+''']
+
+will generate:
+
+[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]]
+]
+
+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".
+
+[endsect]
+[section Include]
+
+You can include one QuickBook file from another. The syntax is simply:
+
+[pre'''
+[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.
+* 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:
+
+[pre'''
+[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\]].
+
+[endsect]
+
+[section Import]
+
+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's import facility provides a nice solution.
+
+[heading Example]
+
+You can effortlessly import code snippets from source code into your QuickBook.
+The following illustrates how this is done:
+
+[pre'''
+[import ../test/stub.cpp]
+[foo]
+[bar]
+''']
+
+The first line:
+
+[pre'''
+[import ../test/stub.cpp]
+''']
+
+collects specially marked-up code snippets from [@../../test/stub.cpp 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:
+
+[pre'''
+[foo]
+[bar]
+''']
+
+And the result is:
+
+[import ../test/stub.cpp]
+[foo]
+[bar]
+
+[heading Code Snippet Markup]
+
+Note how the code snippets in [@../../test/stub.cpp stub.cpp] get marked up. We
+use distinguishable comments following the form:
+
+ //[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.
+
+[heading 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.
+
+[heading 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
+[@http://www.docbook.org/tdg/en/html/callout.html Callouts] for details.
+Example:
+
+[foo_bar]
+
+Checkout [@../../test/stub.cpp stub.cpp] to see the actual code.
+
+[endsect]
+
+[endsect]
+[endsect]
+
+[section:install Installation and configuration]
+
+This section provides some guidelines on how to install and configure
+BoostBook and Quickbook under several operating systems.
+
+Before continuing, it is very important that you keep this in mind: if you
+try to build some documents and the process breaks due to misconfiguration,
+be absolutely sure to delete any `bin` and `bin.v2` directories generated
+by the build before trying again. Otherwise your configuration fixes will
+not take any effect.
+
+[section:windows Windows 2000, XP, 2003, Vista]
+
+[python]
+
+[:['Section contributed by Julio M. Merino Vidal]]
+
+The following instructions apply to any Windows system based on Windows
+2000, including Windows XP, Windows 2003 Server and Windows Vista. The
+paths shown below are taken from a Windows Vista machine; you will need to
+adjust them to match your system in case you are running an older version.
+
+# First of all you need to have a copy of `xsltproc` for Windows. There
+ are many ways to get this tool, but to keep things simple, use the
+ [@http://www.zlatkovic.com/pub/libxml/ binary packages] made by Igor
+ Zlatkovic. At the very least, you need to download the following
+ packages: `iconv`, `zlib`, `libxml2` and `libxslt`.
+
+# Unpack all these packages in the same directory so that you get unique
+ `bin`, `include` and `lib` directories within the hierarchy. These
+ instructions use `C:\Users\example\Documents\boost\xml` as the root for
+ all files.
+
+# From the command line, go to the `bin` directory and launch
+ `xsltproc.exe` to ensure it works. You should get usage information on
+ screen.
+
+# Download [@http://www.docbook.org/xml/4.2/docbook-xml-4.2.zip Docbook XML
+ 4.2] and unpack it in the same directory used above. That is:
+ `C:\Users\example\Documents\boost\xml\docbook-xml`.
+
+# Download the latest
+ [@http://sourceforge.net/project/showfiles.php?group_id=21935&package_id=16608
+ Docbook XSL] version and unpack it, again in the same directory
+ used before. To make things easier, rename the directory created
+ during the extraction to `docbook-xsl` (bypassing the version name):
+ `C:\Users\example\Documents\boost\xml\docbook-xsl`.
+
+# Add the following to your `user-config.jam` file, which should live in
+ your home directory (`%HOMEDRIVE%%HOMEPATH%`). You must already have it
+ somewhere or otherwise you could not be building Boost (i.e. missing
+ tools configuration).
+
+ using xsltproc
+ : "C:/Users/example/Documents/boost/xml/bin/xsltproc.exe"
+ ;
+
+ using boostbook
+ : "C:/Users/example/Documents/boost/xml/docbook-xsl"
+ : "C:/Users/example/Documents/boost/xml/docbook-xml"
+ ;
+
+The above steps are enough to get a functional BoostBook setup. Quickbook
+will be automatically built when needed. If you want to avoid these
+rebuilds:
+
+# Go to Quickbook's source directory (`BOOST_ROOT\tools\quickbook`).
+
+# Build the utility by issuing `bjam --v2`.
+
+# Copy the resulting `quickbook.exe` binary (located under the
+ `BOOST_ROOT\bin.v2` hierarchy) to a safe place. Following our previous
+ example, you can install it into:
+ `C:\Users\example\Documents\boost\xml\bin`.
+
+# Add the following to your `user-config.jam` file:
+
+ using quickbook
+ : "C:/Users/example/Documents/boost/xml/bin/quickbook.exe"
+ ;
+
+[endsect]
+
+[section:linux Debian, Ubuntu]
+
+The following instructions apply to Debian and its derivatives. They are based
+on a Ubuntu Edgy install but should work on other Debian based systems.
+
+First install the `bjam`, `xsltproc`, `docbook-xsl` and `docbook-xml` packages.
+For example, using `apt-get`:
+
+ sudo apt-get install xsltprc docbook-xsl docbook-xml
+
+If you're planning on building boost's documentation, you'll also need to
+install the `doxygen` package as well.
+
+Next, we need to configure Boost Build to compile BoostBook files. Add the
+following to your `user-config.jam` file, which should be in your home
+directory. If you don't have one, create a file containing this text. For more
+information on setting up `user-config.jam`, see the
+[@http://boost.org/boost-build2/doc/html/bbv2/advanced/configuration.html Boost
+Build documentation].
+
+ using xsltproc ;
+
+ using boostbook
+ : /usr/share/xml/docbook/stylesheet/nwalsh
+ : /usr/share/xml/docbook/schema/dtd/4.2
+ ;
+
+ # Remove this line if you're not using doxygen
+ using doxygen ;
+
+The above steps are enough to get a functional BoostBook setup. Quickbook
+will be automatically built when needed. If you want to avoid these
+rebuilds:
+
+# Go to Quickbook's source directory (`BOOST_ROOT/tools/quickbook`).
+
+# Build the utility by issuing `bjam --v2`.
+
+# Copy the resulting `quickbook` binary (located under the
+ `BOOST_ROOT/bin.v2` hierarchy) to a safe place. The traditional location is
+ `/usr/local/bin`.
+
+# Add the following to your `user-config.jam` file, using the full path of the
+ quickbook executable:
+
+ using quickbook
+ : /usr/local/bin/quickbook
+ ;
+
+[endsect]
+[endsect] [/Installation and configuration]
+
+[section:editors Editor Support]
+
+Editing quickbook files is usually done with text editors both simple and
+powerful. The following sections list the settings for some editors which can
+help make editing quickbook files a bit easier.
+
+[blurb __note__ You may submit your settings, tips, and suggestions to the
+authors, or through the [@https://lists.sourceforge.net/lists/listinfo/boost-
+docs Boost Docs mailing list].]
+
+[section:scite Scintilla Text Editor]
+
+[:['Section contributed by Dean Michael Berris]]
+
+The Scintilla Text Editor (SciTE) is a free source code editor for Win32 and X.
+It uses the SCIntilla source code editing component.
+
+[blurb __tip__ SciTE can be downloaded from [@http://www.scintilla.org/SciTE.html]]
+
+You can use the following settings to highlight quickbook tags when
+editing quickbook files.
+
+[pre'''
+qbk=*.qbk
+lexer.*.qbk=props
+use.tabs.$(qbk)=0
+tab.size.$(qbk)=4
+indent.size.$(qbk)=4
+style.props.32=$(font.base)
+comment.stream.start.props=[/
+comment.stream.end.props=]
+comment.box.start.props=[/
+comment.box.middle.props=
+comment.box.end.props=]
+''']
+
+[blurb __note__ Thanks to Rene Rivera for the above SciTE settings.]
+
+[endsect] [/scite]
+[endsect] [/editors]
+
+[section:faq Frequently Asked Questions]
+
+[heading Can I use QuickBook for non-Boost documentation?]
+
+QuickBook can be used for non-Boost documentation with a little extra work.
+
+[:['Faq contributed by Michael Marcin]]
+
+When building HTML documentation with BoostBook a Boost C++ Libraries header
+is added to the files. When using QuickBook to document projects outside of
+Boost this is not desirable. This behavior can be overridden at the BoostBook
+level by specifying some XSLT options. When using Boost Build version 2 (BBv2)
+this can be achieved by adding parameters to the BoostBook target declaration.
+
+For example:
+[pre
+using quickbook ;
+
+xml my_doc : my_doc.qbk ;
+
+boostbook standalone
+ :
+ my_doc
+ :
+ <xsl:param>boost.image.src=images/my_project_logo.png
+ <xsl:param>boost.image.alt="\\"My Project\\""
+ <xsl:param>boost.image.w=100
+ <xsl:param>boost.image.h=50
+ <xsl:param>nav.layout=none
+ ;
+]
+
+[endsect] [/faq]
+
+[section:ref Quick Reference]
+
+[cpp]
+
+[template ordered_list_sample[]
+[pre'''
+# one
+# two
+# three
+''']
+]
+
+[template unordered_list_sample[]
+[pre'''
+* one
+* two
+* three
+''']
+]
+
+[template table_sample[]
+[pre'''
+[table Title
+[[a][b][c]]
+[[a][b][c]]
+]
+''']
+]
+
+[template var_list_sample[]
+[pre'''
+[variablelist Title
+[[a][b]]
+[[a][b]]
+]
+''']
+]
+
+
+[table Syntax Compendium
+ [[To do this...] [Use this...] [See this...]]
+ [[comment] [[^'''[/ some comment]''']] [__comments__]]
+ [[['italics]] [[^'''['italics] or /italics/''']] [__font_styles__ and __simple_formatting__]]
+ [[[*bold]] [[^'''[*bold] or *bold*''']] [__font_styles__ and __simple_formatting__]]
+ [[[_underline]] [[^'''[_underline] or _underline_''']] [__font_styles__ and __simple_formatting__]]
+ [[[^teletype]] [[^'''[^teletype] or =teletype=''']] [__font_styles__ and __simple_formatting__]]
+ [[[-strikethrough]] [[^'''[-strikethrough]''']] [__font_styles__ and __simple_formatting__]]
+ [[[~replaceable]] [[^'''[~replaceable]''']] [__replaceable__]]
+ [[source mode] [[^\[c++\]] or [^\[python\]]] [__source_mode__]]
+ [[inline code] [[^'''`int main();`''']] [__inline_code__]]
+ [[code block] [[^'''``int main();``''']] [__code__]]
+ [[code escape] [[^'''``from c++ to QuickBook``''']] [__escape_back__]]
+ [[line break] [[^'''[br] or \n''']] [__line_break__ *DEPRECATED*]]
+ [[anchor] [[^'''[#anchor]''']] [__anchors__]]
+ [[link] [[^'''[@http://www.boost.org Boost]''']] [__links__]]
+ [[anchor link] [[^'''[link section.anchor Link text]''']] [__anchor_links__]]
+ [[refentry link] [[^'''[link xml.refentry Link text]''']] [__refentry_links__]]
+ [[function link] [[^'''[funcref fully::qualified::function_name Link text]''']] [__code_links__]]
+ [[class link] [[^'''[classref fully::qualified::class_name Link text]''']] [__code_links__]]
+ [[member link] [[^'''[memberref fully::qualified::member_name Link text]''']] [__code_links__]]
+ [[enum link] [[^'''[enumref fully::qualified::enum_name Link text]''']] [__code_links__]]
+ [[macro link] [[^'''[macroref MACRO_NAME Link text]''']] [__code_links__]]
+ [[concept link] [[^'''[conceptref ConceptName Link text]''']] [__code_links__]]
+ [[header link] [[^'''[headerref path/to/header.hpp Link text]''']] [__code_links__]]
+ [[escape] [[^\'\'\'escaped text (no processing/formatting)\'\'\']] [__escape__]]
+ [[single char escape] [[^\\c]] [__single_char_escape__]]
+ [[images] [[^'''[$image.jpg]''']] [__images__]]
+ [[begin section] [[^'''[section The Section Title]''']] [__section__]]
+ [[end section] [[^'''[endsect]''']] [__section__]]
+ [[paragraph] [No markup. Paragraphs start left-flushed and are terminated by two or more newlines.] [__paragraphs__]]
+ [[ordered list] [[ordered_list_sample]] [__ordered_lists__]]
+ [[unordered list] [[unordered_list_sample]] [__unordered_lists__]]
+ [[code] [No markup. Preformatted code starts with a space or a tab.] [__code__]]
+ [[preformatted] [[^'''[pre preformatted]''']] [__preformatted__]]
+ [[block quote] [[^'''[:sometext...]''']] [__blockquote__]]
+ [[heading 1] [[^'''[h1 Heading 1]''']] [__heading__]]
+ [[heading 2] [[^'''[h2 Heading 2]''']] [__heading__]]
+ [[heading 3] [[^'''[h3 Heading 3]''']] [__heading__]]
+ [[heading 4] [[^'''[h4 Heading 4]''']] [__heading__]]
+ [[heading 5] [[^'''[h5 Heading 5]''']] [__heading__]]
+ [[heading 6] [[^'''[h6 Heading 6]''']] [__heading__]]
+ [[macro] [[^'''[def macro_identifier some text]''']] [__macros__]]
+ [[template] [[^'''[template[a b] [a] body [b]]''']] [__templates__]]
+ [[blurb] [[^'''[blurb advertisement or note...]''']] [__blurbs__]]
+ [[admonition] [[^'''[warning Warning text...]''']] [__admonitions__]]
+ [[table] [[table_sample]] [__tables__]]
+ [[variablelist] [[var_list_sample]] [__variable_lists__]]
+ [[include] [[^'''[include someother.qbk]''']] [__include__]]
+]
+
+[endsect]
diff --git a/src/boost/tools/quickbook/test/regen-gold.sh b/src/boost/tools/quickbook/test/regen-gold.sh
new file mode 100644
index 000000000..c1f9b8e8e
--- /dev/null
+++ b/src/boost/tools/quickbook/test/regen-gold.sh
@@ -0,0 +1,47 @@
+#==============================================================================
+# Copyright (c) 2017-2018 Daniel James
+#
+# Use, modification and distribution is subject to the Boost Software
+# License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+#==============================================================================
+
+#!/usr/bin/env bash
+
+cd $(dirname $0)
+
+cd ..
+b2 -q || exit 1
+cd -
+
+find . -name "*.gold" | while read gold_file
+do
+ flags="--debug"
+
+ quickbook_file=$(echo $gold_file | sed 's/[.]gold/.quickbook/')
+ html_file=$(echo $gold_file | sed 's/[.]gold/.gold-html/')
+
+ if [[ $gold_file =~ .*xinclude/.*-alt\.gold ]]
+ then
+ quickbook_file=$(echo $quickbook_file | sed 's/-alt\.quickbook/.quickbook/')
+ flags="$flags --xinclude-base xinclude/sub"
+ elif [[ $gold_file =~ .*xinclude/.*\.gold ]]
+ then
+ flags="$flags --xinclude-base xinclude/../.."
+ fi
+
+ if [[ $gold_file =~ .*include/filename[-_]path.* ]]
+ then
+ flags="$flags -I include/sub"
+ fi
+
+ if [[ $gold_file =~ .*command_line_macro.* ]]
+ then
+ flags="$flags -D__macro__=*bold* -D__empty__"
+ fi
+
+ ../../../dist/bin/quickbook $quickbook_file $flags --output-file $gold_file ||
+ echo "*** Error generating boostbook from $quickbook_file"
+ ../../../dist/bin/quickbook $quickbook_file $flags --output-file $html_file --output-format onehtml ||
+ echo "*** Error generating html from $quickbook_file"
+done
diff --git a/src/boost/tools/quickbook/test/role-1_6.gold b/src/boost/tools/quickbook/test/role-1_6.gold
new file mode 100644
index 000000000..bdb4b58ef
--- /dev/null
+++ b/src/boost/tools/quickbook/test/role-1_6.gold
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="quickbook_role_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Quickbook Role Test</title>
+ <para>
+ <phrase role="keyword">Keyword</phrase> <phrase role="keyword"></phrase> [role]
+ </para>
+</article>
diff --git a/src/boost/tools/quickbook/test/role-1_6.gold-html b/src/boost/tools/quickbook/test/role-1_6.gold-html
new file mode 100644
index 000000000..536c82745
--- /dev/null
+++ b/src/boost/tools/quickbook/test/role-1_6.gold-html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Quickbook Role Test
+ </h3>
+ <p>
+ <span class="keyword">Keyword</span> <span class="keyword"></span> [role]
+ </p>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/role-1_6.quickbook b/src/boost/tools/quickbook/test/role-1_6.quickbook
new file mode 100644
index 000000000..0982b9cd9
--- /dev/null
+++ b/src/boost/tools/quickbook/test/role-1_6.quickbook
@@ -0,0 +1,5 @@
+[article Quickbook Role Test
+[quickbook 1.6]
+]
+
+[role keyword Keyword] [role keyword] [role]
diff --git a/src/boost/tools/quickbook/test/role-1_7-fail.quickbook b/src/boost/tools/quickbook/test/role-1_7-fail.quickbook
new file mode 100644
index 000000000..b01d16e23
--- /dev/null
+++ b/src/boost/tools/quickbook/test/role-1_7-fail.quickbook
@@ -0,0 +1,5 @@
+[article Quickbook Role Fail Test
+[quickbook 1.7]
+]
+
+[role]
diff --git a/src/boost/tools/quickbook/test/role-1_7.gold b/src/boost/tools/quickbook/test/role-1_7.gold
new file mode 100644
index 000000000..4cd7d5bb7
--- /dev/null
+++ b/src/boost/tools/quickbook/test/role-1_7.gold
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="quickbook_role_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Quickbook Role Test</title>
+ <para>
+ <phrase role="keyword">Keyword</phrase> <phrase role="keyword"></phrase>
+ </para>
+ <para>
+ road <phrase role="red">Red</phrase> <phrase role="red"></phrase> <phrase role="three-colours-red">Three
+ Colours Red</phrase> <phrase role="red-road">Red Road</phrase>
+ </para>
+</article>
diff --git a/src/boost/tools/quickbook/test/role-1_7.gold-html b/src/boost/tools/quickbook/test/role-1_7.gold-html
new file mode 100644
index 000000000..7e2eb0122
--- /dev/null
+++ b/src/boost/tools/quickbook/test/role-1_7.gold-html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Quickbook Role Test
+ </h3>
+ <p>
+ <span class="keyword">Keyword</span> <span class="keyword"></span>
+ </p>
+ <p>
+ road <span class="red">Red</span> <span class="red"></span> <span class="three-colours-red">Three
+ Colours Red</span> <span class="red-road">Red Road</span>
+ </p>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/role-1_7.quickbook b/src/boost/tools/quickbook/test/role-1_7.quickbook
new file mode 100644
index 000000000..17bf44952
--- /dev/null
+++ b/src/boost/tools/quickbook/test/role-1_7.quickbook
@@ -0,0 +1,13 @@
+[article Quickbook Role Test
+[quickbook 1.7]
+]
+
+[role keyword Keyword] [role keyword]
+
+[template r red]
+[template r2 road]
+[r2]
+[role [r] Red] [role [r]]
+[role three-colours-[r] Three Colours Red]
+[role [r]-[r2] Red Road]
+
diff --git a/src/boost/tools/quickbook/test/section-1_4.gold b/src/boost/tools/quickbook/test/section-1_4.gold
new file mode 100644
index 000000000..07ba43a2c
--- /dev/null
+++ b/src/boost/tools/quickbook/test/section-1_4.gold
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="section_id_1_4" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Section Id 1.4</title>
+ <section id="section_id_1_4.id_test1">
+ <title><link linkend="section_id_1_4.id_test1">Quickbook section id test</link></title>
+ </section>
+ <section id="section_id_1_4.id_test2">
+ <title><link linkend="section_id_1_4.id_test2">Quickbook section id test</link></title>
+ </section>
+ <section id="section_id_1_4.quickbook_section_no_id_test_1">
+ <title><link linkend="section_id_1_4.quickbook_section_no_id_test_1">Quickbook
+ section no id test 1</link></title>
+ </section>
+ <section id="section_id_1_4.___quickbook_section_no_id_test_2">
+ <title><link linkend="section_id_1_4.___quickbook_section_no_id_test_2">++ Quickbook
+ section no id test 2</link></title>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/section-1_4.gold-html b/src/boost/tools/quickbook/test/section-1_4.gold-html
new file mode 100644
index 000000000..948b8a9d7
--- /dev/null
+++ b/src/boost/tools/quickbook/test/section-1_4.gold-html
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Section Id 1.4
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#section_id_1_4.id_test1">Quickbook section id test</a>
+ </li>
+ <li>
+ <a href="#section_id_1_4.id_test2">Quickbook section id test</a>
+ </li>
+ <li>
+ <a href="#section_id_1_4.quickbook_section_no_id_test_1">Quickbook section
+ no id test 1</a>
+ </li>
+ <li>
+ <a href="#section_id_1_4.___quickbook_section_no_id_test_2">++ Quickbook
+ section no id test 2</a>
+ </li>
+ </ul>
+ </div>
+ <div id="section_id_1_4.id_test1">
+ <h3>
+ Quickbook section id test
+ </h3>
+ <div id="section_id_1_4.id_test1">
+ </div>
+ </div>
+ <div id="section_id_1_4.id_test2">
+ <h3>
+ Quickbook section id test
+ </h3>
+ <div id="section_id_1_4.id_test2">
+ </div>
+ </div>
+ <div id="section_id_1_4.quickbook_section_no_id_test_1">
+ <h3>
+ Quickbook section no id test 1
+ </h3>
+ <div id="section_id_1_4.quickbook_section_no_id_test_1">
+ </div>
+ </div>
+ <div id="section_id_1_4.___quickbook_section_no_id_test_2">
+ <h3>
+ ++ Quickbook section no id test 2
+ </h3>
+ <div id="section_id_1_4.___quickbook_section_no_id_test_2">
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/section-1_4.quickbook b/src/boost/tools/quickbook/test/section-1_4.quickbook
new file mode 100644
index 000000000..6dd2beece
--- /dev/null
+++ b/src/boost/tools/quickbook/test/section-1_4.quickbook
@@ -0,0 +1,12 @@
+[article Section Id 1.4
+ [quickbook 1.4]
+]
+
+[section:id_test1 Quickbook section id test]
+[endsect]
+[section :id_test2 Quickbook section id test]
+[endsect:id_test2]
+[section: Quickbook section no id test 1]
+[endsect]
+[section:++ Quickbook section no id test 2]
+[endsect]
diff --git a/src/boost/tools/quickbook/test/section-1_5-unclosed.gold b/src/boost/tools/quickbook/test/section-1_5-unclosed.gold
new file mode 100644
index 000000000..b86c556ec
--- /dev/null
+++ b/src/boost/tools/quickbook/test/section-1_5-unclosed.gold
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="unclosed_section" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Unclosed section</title>
+ <section id="unclosed_section.unclosed">
+ <title><link linkend="unclosed_section.unclosed">Unclosed Section should be closed
+ with a warning</link></title>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/section-1_5-unclosed.gold-html b/src/boost/tools/quickbook/test/section-1_5-unclosed.gold-html
new file mode 100644
index 000000000..b756717b7
--- /dev/null
+++ b/src/boost/tools/quickbook/test/section-1_5-unclosed.gold-html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Unclosed section
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#unclosed_section.unclosed">Unclosed Section should be closed
+ with a warning</a>
+ </li>
+ </ul>
+ </div>
+ <div id="unclosed_section.unclosed">
+ <h3>
+ Unclosed Section should be closed with a warning
+ </h3>
+ <div id="unclosed_section.unclosed">
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/section-1_5-unclosed.quickbook b/src/boost/tools/quickbook/test/section-1_5-unclosed.quickbook
new file mode 100644
index 000000000..49b70f491
--- /dev/null
+++ b/src/boost/tools/quickbook/test/section-1_5-unclosed.quickbook
@@ -0,0 +1,5 @@
+[article Unclosed section
+[quickbook 1.5]
+]
+
+[section:unclosed Unclosed Section should be closed with a warning] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/section-1_5.gold b/src/boost/tools/quickbook/test/section-1_5.gold
new file mode 100644
index 000000000..13ec9eba2
--- /dev/null
+++ b/src/boost/tools/quickbook/test/section-1_5.gold
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="section_id_1_5" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Section Id 1.5</title>
+ <section id="section_id_1_5.id_test1">
+ <title><link linkend="section_id_1_5.id_test1">Quickbook section id test</link></title>
+ </section>
+ <section id="section_id_1_5.id_test2">
+ <title><link linkend="section_id_1_5.id_test2">Quickbook section id test</link></title>
+ </section>
+ <section id="section_id_1_5.id_test3">
+ <title><link linkend="section_id_1_5.id_test3">Quickbook section id test</link></title>
+ </section>
+ <section id="section_id_1_5.___quickbook_section_no_id_test">
+ <title><link linkend="section_id_1_5.___quickbook_section_no_id_test">++ Quickbook
+ section no id test</link></title>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/section-1_5.gold-html b/src/boost/tools/quickbook/test/section-1_5.gold-html
new file mode 100644
index 000000000..6089cf1ac
--- /dev/null
+++ b/src/boost/tools/quickbook/test/section-1_5.gold-html
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Section Id 1.5
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#section_id_1_5.id_test1">Quickbook section id test</a>
+ </li>
+ <li>
+ <a href="#section_id_1_5.id_test2">Quickbook section id test</a>
+ </li>
+ <li>
+ <a href="#section_id_1_5.id_test3">Quickbook section id test</a>
+ </li>
+ <li>
+ <a href="#section_id_1_5.___quickbook_section_no_id_test">++ Quickbook
+ section no id test</a>
+ </li>
+ </ul>
+ </div>
+ <div id="section_id_1_5.id_test1">
+ <h3>
+ Quickbook section id test
+ </h3>
+ <div id="section_id_1_5.id_test1">
+ </div>
+ </div>
+ <div id="section_id_1_5.id_test2">
+ <h3>
+ Quickbook section id test
+ </h3>
+ <div id="section_id_1_5.id_test2">
+ </div>
+ </div>
+ <div id="section_id_1_5.id_test3">
+ <h3>
+ Quickbook section id test
+ </h3>
+ <div id="section_id_1_5.id_test3">
+ </div>
+ </div>
+ <div id="section_id_1_5.___quickbook_section_no_id_test">
+ <h3>
+ ++ Quickbook section no id test
+ </h3>
+ <div id="section_id_1_5.___quickbook_section_no_id_test">
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/section-1_5.quickbook b/src/boost/tools/quickbook/test/section-1_5.quickbook
new file mode 100644
index 000000000..223a7e6c8
--- /dev/null
+++ b/src/boost/tools/quickbook/test/section-1_5.quickbook
@@ -0,0 +1,12 @@
+[article Section Id 1.5
+ [quickbook 1.5]
+]
+
+[section:id_test1 Quickbook section id test]
+[endsect]
+[section :id_test2 Quickbook section id test]
+[endsect:id_test2]
+[section: id_test3 Quickbook section id test]
+[endsect]
+[section:++ Quickbook section no id test]
+[endsect]
diff --git a/src/boost/tools/quickbook/test/section-1_7.gold b/src/boost/tools/quickbook/test/section-1_7.gold
new file mode 100644
index 000000000..02cb4c7d1
--- /dev/null
+++ b/src/boost/tools/quickbook/test/section-1_7.gold
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="section_id_1_7" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Section Id 1.7</title>
+ <section id="section_id_1_7.quickbook_section_no_id_test">
+ <title><link linkend="section_id_1_7.quickbook_section_no_id_test">Quickbook
+ section no id test</link></title>
+ </section>
+ <section id="section_id_1_7.id_test1">
+ <title><link linkend="section_id_1_7.id_test1">Quickbook section id test</link></title>
+ </section>
+ <section id="section_id_1_7.id_test2">
+ <title><link linkend="section_id_1_7.id_test2">Quickbook section id test</link></title>
+ </section>
+ <section id="section_id_1_7.id_test3_quickbook_section_id_te">
+ <title><link linkend="section_id_1_7.id_test3_quickbook_section_id_te">id_test3
+ Quickbook section id test</link></title>
+ </section>
+ <section id="section_id_1_7.--">
+ <title><link linkend="section_id_1_7.--">Quickbook section odd id test</link></title>
+ </section>
+ <section id="section_id_1_7.sect-abc">
+ <title><link linkend="section_id_1_7.sect-abc">Section with template in id</link></title>
+ </section>
+ <section id="section_id_1_7.link_section_id_1_7_id_test1_lin">
+ <title><link linkend="section_id_1_7.id_test1">Link in title</link></title>
+ </section>
+ <section id="section_id_1_7.link_section_id_1_7_id_test1_li0">
+ <title><link linkend="section_id_1_7.id_test1">Link</link> in title</title>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/section-1_7.gold-html b/src/boost/tools/quickbook/test/section-1_7.gold-html
new file mode 100644
index 000000000..0d44ad8a2
--- /dev/null
+++ b/src/boost/tools/quickbook/test/section-1_7.gold-html
@@ -0,0 +1,100 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Section Id 1.7
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#section_id_1_7.quickbook_section_no_id_test">Quickbook section
+ no id test</a>
+ </li>
+ <li>
+ <a href="#section_id_1_7.id_test1">Quickbook section id test</a>
+ </li>
+ <li>
+ <a href="#section_id_1_7.id_test2">Quickbook section id test</a>
+ </li>
+ <li>
+ <a href="#section_id_1_7.id_test3_quickbook_section_id_te">id_test3 Quickbook
+ section id test</a>
+ </li>
+ <li>
+ <a href="#section_id_1_7.--">Quickbook section odd id test</a>
+ </li>
+ <li>
+ <a href="#section_id_1_7.sect-abc">Section with template in id</a>
+ </li>
+ <li>
+ <a href="#section_id_1_7.link_section_id_1_7_id_test1_lin"><a href="#section_id_1_7.id_test1">Link
+ in title</a></a>
+ </li>
+ <li>
+ <a href="#section_id_1_7.link_section_id_1_7_id_test1_li0"><a href="#section_id_1_7.id_test1">Link</a>
+ in title</a>
+ </li>
+ </ul>
+ </div>
+ <div id="section_id_1_7.quickbook_section_no_id_test">
+ <h3>
+ Quickbook section no id test
+ </h3>
+ <div id="section_id_1_7.quickbook_section_no_id_test">
+ </div>
+ </div>
+ <div id="section_id_1_7.id_test1">
+ <h3>
+ Quickbook section id test
+ </h3>
+ <div id="section_id_1_7.id_test1">
+ </div>
+ </div>
+ <div id="section_id_1_7.id_test2">
+ <h3>
+ Quickbook section id test
+ </h3>
+ <div id="section_id_1_7.id_test2">
+ </div>
+ </div>
+ <div id="section_id_1_7.id_test3_quickbook_section_id_te">
+ <h3>
+ id_test3 Quickbook section id test
+ </h3>
+ <div id="section_id_1_7.id_test3_quickbook_section_id_te">
+ </div>
+ </div>
+ <div id="section_id_1_7.--">
+ <h3>
+ Quickbook section odd id test
+ </h3>
+ <div id="section_id_1_7.--">
+ </div>
+ </div>
+ <div id="section_id_1_7.sect-abc">
+ <h3>
+ Section with template in id
+ </h3>
+ <div id="section_id_1_7.sect-abc">
+ </div>
+ </div>
+ <div id="section_id_1_7.link_section_id_1_7_id_test1_lin">
+ <h3>
+ <a href="#section_id_1_7.id_test1">Link in title</a>
+ </h3>
+ <div id="section_id_1_7.link_section_id_1_7_id_test1_lin">
+ </div>
+ </div>
+ <div id="section_id_1_7.link_section_id_1_7_id_test1_li0">
+ <h3>
+ <a href="#section_id_1_7.id_test1">Link</a> in title
+ </h3>
+ <div id="section_id_1_7.link_section_id_1_7_id_test1_li0">
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/section-1_7.quickbook b/src/boost/tools/quickbook/test/section-1_7.quickbook
new file mode 100644
index 000000000..9c8baeb0c
--- /dev/null
+++ b/src/boost/tools/quickbook/test/section-1_7.quickbook
@@ -0,0 +1,23 @@
+[article Section Id 1.7
+ [quickbook 1.7]
+]
+
+[section Quickbook section no id test]
+[endsect]
+[section:id_test1 Quickbook section id test]
+[endsect]
+[section :id_test2 Quickbook section id test]
+[endsect:id_test2]
+[section: id_test3 Quickbook section id test]
+[endsect]
+[section:-- Quickbook section odd id test]
+[endsect]
+
+[template thing[] abc]
+[section:sect-[thing] Section with template in id]
+[endsect]
+
+[section [link section_id_1_7.id_test1 Link in title]]
+[endsect]
+[section [link section_id_1_7.id_test1 Link] in title]
+[endsect]
diff --git a/src/boost/tools/quickbook/test/simple_markup-1_5.gold b/src/boost/tools/quickbook/test/simple_markup-1_5.gold
new file mode 100644
index 000000000..4d044ceb4
--- /dev/null
+++ b/src/boost/tools/quickbook/test/simple_markup-1_5.gold
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="simple_markup_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Simple Markup Test</title>
+ <section id="simple_markup_test.simple_markup">
+ <title><link linkend="simple_markup_test.simple_markup">Simple Markup</link></title>
+ <para>
+ <emphasis>italic</emphasis> <emphasis role="bold">bold</emphasis> <emphasis
+ role="underline">underline</emphasis> <literal>teletype</literal>
+ </para>
+ <para>
+ //not italic// **not bold** __not underline__ ==not teletype==
+ </para>
+ <para>
+ <emphasis role="underline">odd__ edge case</emphasis>
+ </para>
+ <para>
+ not__underlined__hopefully
+ </para>
+ <para>
+ (<emphasis role="bold">bold</emphasis>) <emphasis role="underline">und/er/lined</emphasis>
+ </para>
+ <para>
+ <emphasis>all/italic</emphasis> * not bold*
+ </para>
+ <para>
+ /not italic <ulink url="http://www.boost.org/"><emphasis role="bold">bold</emphasis></ulink>
+ </para>
+ <para>
+ not_underlined_
+ </para>
+ <para>
+ _Should not underline escaped markup_. _or this escaped_ markup form.
+ </para>
+ <para>
+ <literal>Matti Meik\u00E4l\u00E4inen</literal>
+ </para>
+ <para>
+ <literal>replaced</literal>
+ </para>
+ <para>
+ <emphasis role="underline">replaced</emphasis>
+ </para>
+ <para>
+ <literal>_mac\ ro_</literal>
+ </para>
+ <para>
+ <emphasis>italic\</emphasis>
+ </para>
+ <para>
+ These shouldn't be interepted as markup: == // **
+ </para>
+ <para>
+ <literal>&lt;</literal> <literal>\&lt;</literal> <literal>\\&lt;</literal>
+ </para>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/simple_markup-1_5.gold-html b/src/boost/tools/quickbook/test/simple_markup-1_5.gold-html
new file mode 100644
index 000000000..3e07c9b81
--- /dev/null
+++ b/src/boost/tools/quickbook/test/simple_markup-1_5.gold-html
@@ -0,0 +1,75 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Simple Markup Test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#simple_markup_test.simple_markup">Simple Markup</a>
+ </li>
+ </ul>
+ </div>
+ <div id="simple_markup_test.simple_markup">
+ <h3>
+ Simple Markup
+ </h3>
+ <div id="simple_markup_test.simple_markup">
+ <p>
+ <span class="emphasis"><em>italic</em></span> <span class="bold"><strong>bold</strong></span>
+ <span class="underline">underline</span> <tt>teletype</tt>
+ </p>
+ <p>
+ //not italic// **not bold** __not underline__ ==not teletype==
+ </p>
+ <p>
+ <span class="underline">odd__ edge case</span>
+ </p>
+ <p>
+ not__underlined__hopefully
+ </p>
+ <p>
+ (<span class="bold"><strong>bold</strong></span>) <span class="underline">und/er/lined</span>
+ </p>
+ <p>
+ <span class="emphasis"><em>all/italic</em></span> * not bold*
+ </p>
+ <p>
+ /not italic <a href="http://www.boost.org/"><span class="bold"><strong>bold</strong></span></a>
+ </p>
+ <p>
+ not_underlined_
+ </p>
+ <p>
+ _Should not underline escaped markup_. _or this escaped_ markup form.
+ </p>
+ <p>
+ <tt>Matti Meik\u00E4l\u00E4inen</tt>
+ </p>
+ <p>
+ <tt>replaced</tt>
+ </p>
+ <p>
+ <span class="underline">replaced</span>
+ </p>
+ <p>
+ <tt>_mac\ ro_</tt>
+ </p>
+ <p>
+ <span class="emphasis"><em>italic\</em></span>
+ </p>
+ <p>
+ These shouldn't be interepted as markup: == // **
+ </p>
+ <p>
+ <tt>&lt;</tt> <tt>\&lt;</tt> <tt>\\&lt;</tt>
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/simple_markup-1_5.quickbook b/src/boost/tools/quickbook/test/simple_markup-1_5.quickbook
new file mode 100644
index 000000000..c8277fb32
--- /dev/null
+++ b/src/boost/tools/quickbook/test/simple_markup-1_5.quickbook
@@ -0,0 +1,42 @@
+[article Simple Markup Test
+[quickbook 1.5]
+]
+
+[def _macro_ replaced]
+
+[section Simple Markup]
+
+/italic/ *bold* _underline_ =teletype=
+
+//not italic// **not bold** __not underline__ ==not teletype==
+
+_odd__ edge case_
+
+not__underlined__hopefully
+
+(*bold*) _und/er/lined_
+
+/all/italic/ * not bold*
+
+/not italic [@http://www.boost.org/ *bold*]
+
+not_underlined_
+
+_Should not underline '''escaped''' markup_.
+_or this '''escaped_ markup''' form.
+
+=Matti Meik\u00E4l\u00E4inen=
+
+=_macro_=
+
+__macro__
+
+=_mac\ ro_=
+
+/italic\/
+
+These shouldn't be interepted as markup: == // **
+
+=<= =\<= =\\<=
+
+[endsect]
diff --git a/src/boost/tools/quickbook/test/snippets/Jamfile.v2 b/src/boost/tools/quickbook/test/snippets/Jamfile.v2
new file mode 100644
index 000000000..6765dff9e
--- /dev/null
+++ b/src/boost/tools/quickbook/test/snippets/Jamfile.v2
@@ -0,0 +1,18 @@
+#
+# Copyright (c) 2011 Daniel James
+#
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+#
+
+project quickbook/test/snippets ;
+
+import quickbook-testing : quickbook-test quickbook-error-test ;
+
+test-suite quickbook.test :
+ [ quickbook-test pass_thru ]
+ [ quickbook-test unbalanced_snippet1-1_5 ]
+ [ quickbook-error-test unbalanced_snippet1-1_6-fail ]
+ [ quickbook-error-test unbalanced_snippet2-1_6-fail ]
+ ;
diff --git a/src/boost/tools/quickbook/test/snippets/pass_thru.cpp b/src/boost/tools/quickbook/test/snippets/pass_thru.cpp
new file mode 100644
index 000000000..c5c120a17
--- /dev/null
+++ b/src/boost/tools/quickbook/test/snippets/pass_thru.cpp
@@ -0,0 +1,33 @@
+// clang-format off
+
+//[foo_cpp_copyright
+/*=============================================================================
+ Copyright (c) 2011 Daniel James
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+=============================================================================*/
+//]
+
+//[foo_cpp
+struct Foo{
+
+ Foo()//=;
+//<-
+ : x( 10 )
+ {}
+//->
+
+//<-
+ int x;
+//->
+};
+
+/*=
+int main()
+{
+ Foo x;
+}
+*/
+//]
diff --git a/src/boost/tools/quickbook/test/snippets/pass_thru.gold b/src/boost/tools/quickbook/test/snippets/pass_thru.gold
new file mode 100644
index 000000000..dde5deb19
--- /dev/null
+++ b/src/boost/tools/quickbook/test/snippets/pass_thru.gold
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="pass_thru_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Pass thru test</title>
+ <para>
+<programlisting><phrase role="comment">/*=============================================================================
+ Copyright (c) 2011 Daniel James
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+=============================================================================*/</phrase>
+</programlisting>
+ </para>
+ <para>
+<programlisting><phrase role="keyword">struct</phrase> <phrase role="identifier">Foo</phrase><phrase role="special">{</phrase>
+
+ <phrase role="identifier">Foo</phrase><phrase role="special">();</phrase>
+
+<phrase role="special">};</phrase>
+
+
+<phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">Foo</phrase> <phrase role="identifier">x</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ </para>
+ <para>
+<programlisting><phrase role="keyword">def</phrase> <phrase role="identifier">foo</phrase><phrase role="special">:</phrase>
+ <phrase role="keyword">print</phrase><phrase role="special">(</phrase><phrase role="string">'foo'</phrase><phrase role="special">)</phrase>
+</programlisting>
+ </para>
+</article>
diff --git a/src/boost/tools/quickbook/test/snippets/pass_thru.gold-html b/src/boost/tools/quickbook/test/snippets/pass_thru.gold-html
new file mode 100644
index 000000000..ba0237ddb
--- /dev/null
+++ b/src/boost/tools/quickbook/test/snippets/pass_thru.gold-html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Pass thru test
+ </h3>
+ <p>
+<pre class="programlisting"><span class="comment">/*=============================================================================
+ Copyright (c) 2011 Daniel James
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+=============================================================================*/</span>
+</pre>
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">struct</span> <span class="identifier">Foo</span><span class="special">{</span>
+
+ <span class="identifier">Foo</span><span class="special">();</span>
+
+<span class="special">};</span>
+
+
+<span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="identifier">Foo</span> <span class="identifier">x</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+ </p>
+ <p>
+<pre class="programlisting"><span class="keyword">def</span> <span class="identifier">foo</span><span class="special">:</span>
+ <span class="keyword">print</span><span class="special">(</span><span class="string">'foo'</span><span class="special">)</span>
+</pre>
+ </p>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/snippets/pass_thru.py b/src/boost/tools/quickbook/test/snippets/pass_thru.py
new file mode 100644
index 000000000..412cee420
--- /dev/null
+++ b/src/boost/tools/quickbook/test/snippets/pass_thru.py
@@ -0,0 +1,13 @@
+# Copyright (c) 2011 Daniel James
+#
+# Use, modification and distribution is subject to the Boost Software
+# License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+#[foo_py
+def foo:
+ #=print('foo')
+ #<-
+ print('bar')
+ #->
+#] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/snippets/pass_thru.quickbook b/src/boost/tools/quickbook/test/snippets/pass_thru.quickbook
new file mode 100644
index 000000000..7e8319478
--- /dev/null
+++ b/src/boost/tools/quickbook/test/snippets/pass_thru.quickbook
@@ -0,0 +1,12 @@
+[article Pass thru test
+[quickbook 1.5]
+]
+
+[import pass_thru.cpp]
+[import pass_thru.py]
+
+[foo_cpp_copyright]
+
+[foo_cpp]
+
+[foo_py] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.gold b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.gold
new file mode 100644
index 000000000..1f9115c0f
--- /dev/null
+++ b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.gold
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="unbalanced_snippet_fail_test_1" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Unbalanced snippet fail test 1</title>
+ <para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase>
+</programlisting>
+ </para>
+</article>
diff --git a/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.gold-html b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.gold-html
new file mode 100644
index 000000000..af90d9d35
--- /dev/null
+++ b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.gold-html
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Unbalanced snippet fail test 1
+ </h3>
+ <p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span>
+</pre>
+ </p>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.quickbook b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.quickbook
new file mode 100644
index 000000000..7fdde6afd
--- /dev/null
+++ b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_5.quickbook
@@ -0,0 +1,8 @@
+[article Unbalanced snippet fail test 1
+[quickbook 1.5]
+]
+
+[import unbalanced_snippet1.cpp]
+[import unbalanced_snippet2.cpp]
+
+[unclosed] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_6-fail.quickbook b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_6-fail.quickbook
new file mode 100644
index 000000000..c2fb98ec0
--- /dev/null
+++ b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1-1_6-fail.quickbook
@@ -0,0 +1,7 @@
+[article Unbalanced snippet fail test 1
+[quickbook 1.6]
+]
+
+[import unbalanced_snippet1.cpp]
+
+[unclosed] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1.cpp b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1.cpp
new file mode 100644
index 000000000..ee5983912
--- /dev/null
+++ b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet1.cpp
@@ -0,0 +1,11 @@
+/*=============================================================================
+ Copyright (c) 2011 Daniel James
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+=============================================================================*/
+
+//[unclosed
+
+int main() {}
diff --git a/src/boost/tools/quickbook/test/snippets/unbalanced_snippet2-1_6-fail.quickbook b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet2-1_6-fail.quickbook
new file mode 100644
index 000000000..a06a16448
--- /dev/null
+++ b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet2-1_6-fail.quickbook
@@ -0,0 +1,5 @@
+[article Unbalanced snippet fail test 2
+[quickbook 1.6]
+]
+
+[import unbalanced_snippet2.cpp]
diff --git a/src/boost/tools/quickbook/test/snippets/unbalanced_snippet2.cpp b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet2.cpp
new file mode 100644
index 000000000..b2fcb247b
--- /dev/null
+++ b/src/boost/tools/quickbook/test/snippets/unbalanced_snippet2.cpp
@@ -0,0 +1,9 @@
+//]
+
+/*=============================================================================
+ Copyright (c) 2011 Daniel James
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+=============================================================================*/
diff --git a/src/boost/tools/quickbook/test/source_mode-1_7.gold b/src/boost/tools/quickbook/test/source_mode-1_7.gold
new file mode 100644
index 000000000..2cc454a6d
--- /dev/null
+++ b/src/boost/tools/quickbook/test/source_mode-1_7.gold
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="source_mode_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Source Mode Test</title>
+ <informaltable frame="all">
+ <tgroup cols="2">
+ <tbody>
+ <row>
+ <entry>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ </entry>
+ <entry>
+<programlisting><phrase role="keyword">void</phrase> <phrase role="identifier">foo</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+<programlisting>Plain text...</programlisting>
+ <para>
+ <code><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase
+ role="special">()</phrase> <phrase role="special">{}</phrase></code> but <code>plain
+ text</code>.
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ <code><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase
+ role="special">()</phrase> <phrase role="special">{}</phrase></code>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <code><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase
+ role="special">()</phrase> <phrase role="special">{}</phrase></code>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <code>int main() {}</code>
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ <code><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase
+ role="special">()</phrase> <phrase role="special">{}</phrase></code> and <code><phrase
+ role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
+ <phrase role="special">{}</phrase></code> should both be C++ highlighted. <code>int
+ main() {}</code> shouldn't be, but <code><phrase role="keyword">int</phrase>
+ <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase
+ role="special">{}</phrase></code> should.
+ </para>
+ <para>
+ <code><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase
+ role="special">()</phrase> <phrase role="special">{}</phrase></code>. Not highlighted:
+ <code>int main() {}</code>.
+ </para>
+ <section id="source_mode_test.cpp">
+ <title><link linkend="source_mode_test.cpp">C++ section</link></title>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/source_mode-1_7.gold-html b/src/boost/tools/quickbook/test/source_mode-1_7.gold-html
new file mode 100644
index 000000000..f5b16981c
--- /dev/null
+++ b/src/boost/tools/quickbook/test/source_mode-1_7.gold-html
@@ -0,0 +1,80 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Source Mode Test
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#source_mode_test.cpp">C++ section</a>
+ </li>
+ </ul>
+ </div>
+ <div class="informaltable">
+ <table>
+ <tbody>
+ <tr>
+ <td>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span></pre>
+ </td>
+ <td>
+<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">foo</span><span class="special">()</span> <span class="special">{}</span></pre>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+<pre class="programlisting">Plain text...</pre>
+ <p>
+ <code><span class="keyword">int</span> <span class="identifier">main</span><span
+ class="special">()</span> <span class="special">{}</span></code> but <code>plain
+ text</code>.
+ </p>
+ <ul>
+ <li>
+ <div>
+ <code><span class="keyword">int</span> <span class="identifier">main</span><span
+ class="special">()</span> <span class="special">{}</span></code>
+ </div>
+ </li>
+ <li>
+ <div>
+ <code><span class="keyword">int</span> <span class="identifier">main</span><span
+ class="special">()</span> <span class="special">{}</span></code>
+ </div>
+ </li>
+ <li>
+ <div>
+ <code>int main() {}</code>
+ </div>
+ </li>
+ </ul>
+ <p>
+ <code><span class="keyword">int</span> <span class="identifier">main</span><span
+ class="special">()</span> <span class="special">{}</span></code> and <code><span
+ class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+ <span class="special">{}</span></code> should both be C++ highlighted. <code>int
+ main() {}</code> shouldn't be, but <code><span class="keyword">int</span>
+ <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span></code>
+ should.
+ </p>
+ <p>
+ <code><span class="keyword">int</span> <span class="identifier">main</span><span
+ class="special">()</span> <span class="special">{}</span></code>. Not highlighted:
+ <code>int main() {}</code>.
+ </p>
+ <div id="source_mode_test.cpp">
+ <h3>
+ C++ section
+ </h3>
+ <div id="source_mode_test.cpp">
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span></pre>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/source_mode-1_7.quickbook b/src/boost/tools/quickbook/test/source_mode-1_7.quickbook
new file mode 100644
index 000000000..9388867c8
--- /dev/null
+++ b/src/boost/tools/quickbook/test/source_mode-1_7.quickbook
@@ -0,0 +1,24 @@
+[quickbook 1.7]
+[source-mode teletype]
+[article Source Mode Test]
+
+[!c++][table [[``int main() {}``][``void foo() {}``]]]
+``Plain text...``
+
+[!c++]`int main() {}` but `plain text`.
+
+[!c++]
+* `int main() {}`
+* `int main() {}`
+* [teletype] `int main() {}` [/ shouldn't be highlighted]
+
+[!c++]
+`int main() {}` and `int main() {}` should both be C++ highlighted.
+[!teletype]`int main() {}` shouldn't be, but `int main() {}` should.
+
+[!c++] `int main() {}`. Not highlighted: `int main() {}`.
+
+[!c++]
+[section:cpp C++ section]
+``int main() {}``
+[endsect]
diff --git a/src/boost/tools/quickbook/test/src/text_diff.cpp b/src/boost/tools/quickbook/test/src/text_diff.cpp
new file mode 100644
index 000000000..cee521173
--- /dev/null
+++ b/src/boost/tools/quickbook/test/src/text_diff.cpp
@@ -0,0 +1,96 @@
+//
+// Copyright (c) 2005 João Abecasis
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#include <cstring>
+#include <fstream>
+#include <iostream>
+#include <iterator>
+#include <vector>
+
+#include <boost/spirit/include/classic_primitives.hpp>
+#include <boost/spirit/include/classic_scanner.hpp>
+
+namespace spirit = boost::spirit::classic;
+
+typedef std::istream_iterator<char, char> iterator;
+typedef spirit::scanner<iterator> scanner;
+
+int main(int argc, char* argv[])
+{
+ std::vector<char*> args;
+ bool usage_error = false;
+
+ for (int i = 1; i < argc; ++i) {
+ if (std::strncmp(argv[i], "--", 2) == 0) {
+ if (strcmp(argv[i], "--strict") == 0) {
+ // Ignore --strict because the build file accidentally
+ // uses it. Why yes, this is a horrible hack.
+ }
+ else {
+ std::cerr << "ERROR: Invalid flag: " << argv[i] << std::endl;
+ usage_error = true;
+ }
+ }
+ else {
+ args.push_back(argv[i]);
+ }
+ }
+
+ if (!usage_error && args.size() != 2) {
+ std::cerr << "ERROR: Wrong number of arguments." << std::endl;
+ usage_error = true;
+ }
+
+ if (usage_error) {
+ std::cout << "Usage:\n\t" << argv[0] << " file1 file2" << std::endl;
+ return 1;
+ }
+
+ std::ifstream file1(args[0], std::ios_base::binary | std::ios_base::in),
+ file2(args[1], std::ios_base::binary | std::ios_base::in);
+
+ if (!file1 || !file2) {
+ std::cerr << "ERROR: Unable to open one or both files." << std::endl;
+ return 2;
+ }
+
+ file1.unsetf(std::ios_base::skipws);
+ file2.unsetf(std::ios_base::skipws);
+
+ iterator iter_file1(file1), iter_file2(file2);
+
+ scanner scan1(iter_file1, iterator()), scan2(iter_file2, iterator());
+
+ std::size_t line = 1, column = 1;
+
+ while (!scan1.at_end() && !scan2.at_end()) {
+ if (spirit::eol_p.parse(scan1)) {
+ if (!spirit::eol_p.parse(scan2)) {
+ std::cout << "Files differ at line " << line << ", column "
+ << column << '.' << std::endl;
+ return 3;
+ }
+
+ ++line, column = 1;
+ continue;
+ }
+
+ if (*scan1 != *scan2) {
+ std::cout << "Files differ at line " << line << ", column "
+ << column << '.' << std::endl;
+ return 4;
+ }
+
+ ++scan1, ++scan2, ++column;
+ }
+
+ if (scan1.at_end() != scan2.at_end()) {
+ std::cout << "Files differ in length." << std::endl;
+ return 5;
+ }
+}
diff --git a/src/boost/tools/quickbook/test/stray_close_bracket-1_1.gold b/src/boost/tools/quickbook/test/stray_close_bracket-1_1.gold
new file mode 100644
index 000000000..c062eaab8
--- /dev/null
+++ b/src/boost/tools/quickbook/test/stray_close_bracket-1_1.gold
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="stray_close_bracket_1_1" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Stray close bracket 1.1</title>
+ <para>
+ X]Y
+ </para>
+</article>
diff --git a/src/boost/tools/quickbook/test/stray_close_bracket-1_1.gold-html b/src/boost/tools/quickbook/test/stray_close_bracket-1_1.gold-html
new file mode 100644
index 000000000..094ac4655
--- /dev/null
+++ b/src/boost/tools/quickbook/test/stray_close_bracket-1_1.gold-html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Stray close bracket 1.1
+ </h3>
+ <p>
+ X]Y
+ </p>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/stray_close_bracket-1_1.quickbook b/src/boost/tools/quickbook/test/stray_close_bracket-1_1.quickbook
new file mode 100644
index 000000000..3866bdb7c
--- /dev/null
+++ b/src/boost/tools/quickbook/test/stray_close_bracket-1_1.quickbook
@@ -0,0 +1,3 @@
+[article Stray close bracket 1.1]
+
+X]Y
diff --git a/src/boost/tools/quickbook/test/stray_close_bracket-1_7-fail.quickbook b/src/boost/tools/quickbook/test/stray_close_bracket-1_7-fail.quickbook
new file mode 100644
index 000000000..6798b679c
--- /dev/null
+++ b/src/boost/tools/quickbook/test/stray_close_bracket-1_7-fail.quickbook
@@ -0,0 +1,5 @@
+[article Stray close bracket 1.1
+ [quickbook 1.7]
+]
+
+X]Y
diff --git a/src/boost/tools/quickbook/test/stub.c b/src/boost/tools/quickbook/test/stub.c
new file mode 100644
index 000000000..f7f83cfe8
--- /dev/null
+++ b/src/boost/tools/quickbook/test/stub.c
@@ -0,0 +1,32 @@
+/*=============================================================================
+ Copyright (c) 2006 Joel de Guzman
+ http://spirit.sourceforge.net/
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+=============================================================================*/
+
+/*`
+This should appear when =stub.c= is included.
+
+[foo_c]
+*/
+
+/*[foo_c */
+ /*`
+ This is the C [*['foo]] function.
+
+ This description can have paragraphs...
+
+ * lists
+ * etc.
+
+ And any quickbook block markup.
+ */
+char* foo()
+{
+ // return 'em, foo man!
+ return "foo";
+}
+/*]*/
diff --git a/src/boost/tools/quickbook/test/stub.cpp b/src/boost/tools/quickbook/test/stub.cpp
new file mode 100644
index 000000000..ef0f03432
--- /dev/null
+++ b/src/boost/tools/quickbook/test/stub.cpp
@@ -0,0 +1,86 @@
+/*=============================================================================
+ Copyright (c) 2006 Joel de Guzman
+ http://spirit.sourceforge.net/
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+=============================================================================*/
+
+// clang-format off
+
+/*` This should appear when =stub.cpp= is included. */
+
+#include <string>
+
+//[ bar
+//` This is the [*/bar/] function
+std::string bar()
+{
+ // return 'em, bar man!
+ return "bar";
+}
+/*`
+Some trailing text here
+*/
+//]
+
+//[ foo
+ /*`
+ 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";
+}
+//]
+
+//[ 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! >*/
+}
+//]
+
+//[ class_
+class x
+{
+public:
+
+ /*<< Constructor >>*/
+ x() : n(0)
+ {
+ }
+
+ /*<< Destructor >>*/
+ ~x()
+ {
+ }
+
+ /*<< Get the `n` member variable >>*/
+ int get() const
+ {
+ return n; /*<- this will be ignored by quickbook ->*/
+ }
+
+ /*<< Set the `n` member variable >>*/
+ void set(int n_)
+ {
+ n = n_;
+ }
+//<- this will be ignored by quickbook
+private:
+
+ int n;
+//->
+};
+//]
diff --git a/src/boost/tools/quickbook/test/stub.py b/src/boost/tools/quickbook/test/stub.py
new file mode 100644
index 000000000..48ba87e0c
--- /dev/null
+++ b/src/boost/tools/quickbook/test/stub.py
@@ -0,0 +1,27 @@
+# Copyright 2009 Daniel James
+#
+# Use, modification and distribution is subject to the Boost Software
+# License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+#` This should appear when =stub.py= is included.
+
+#[foo_py
+"""`
+ This is the Python [*['foo]] function.
+
+ This description can have paragraphs...
+
+ * lists
+ * etc.
+
+ And any quickbook block markup.
+"""
+
+def foo():
+ # return 'em, foo man!
+ return "foo"
+
+#]
+
+print foo() \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/svg-1_1.gold b/src/boost/tools/quickbook/test/svg-1_1.gold
new file mode 100644
index 000000000..a8a49b06a
--- /dev/null
+++ b/src/boost/tools/quickbook/test/svg-1_1.gold
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="svg_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>SVG test</title>
+ <para>
+ <inlinemediaobject><imageobject><imagedata contentdepth="513.25690" contentwidth="745.60706"
+ fileref="images/open_clipart_library_logo.svg" format="SVG"></imagedata></imageobject>
+ <textobject>
+ <phrase>open_clipart_library_logo</phrase>
+ </textobject>
+ </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="images/missing_image.svg"
+ format="SVG"></imagedata></imageobject>
+ <textobject>
+ <phrase>missing_image</phrase>
+ </textobject>
+ </inlinemediaobject>
+ </para>
+</article>
diff --git a/src/boost/tools/quickbook/test/svg-1_1.gold-html b/src/boost/tools/quickbook/test/svg-1_1.gold-html
new file mode 100644
index 000000000..643e7762a
--- /dev/null
+++ b/src/boost/tools/quickbook/test/svg-1_1.gold-html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ SVG test
+ </h3>
+ <p>
+ <span class="inlinemediaobject"><img src="images/open_clipart_library_logo.svg"
+ alt="[]"/></span> <span class="inlinemediaobject"><img src="images/missing_image.svg"
+ alt="[]"/></span>
+ </p>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/svg-1_1.quickbook b/src/boost/tools/quickbook/test/svg-1_1.quickbook
new file mode 100644
index 000000000..71b811a8c
--- /dev/null
+++ b/src/boost/tools/quickbook/test/svg-1_1.quickbook
@@ -0,0 +1,4 @@
+[article SVG test]
+
+[$images/open_clipart_library_logo.svg]
+[$images/missing_image.svg]
diff --git a/src/boost/tools/quickbook/test/table-1_3.gold b/src/boost/tools/quickbook/test/table-1_3.gold
new file mode 100644
index 000000000..fcda21570
--- /dev/null
+++ b/src/boost/tools/quickbook/test/table-1_3.gold
@@ -0,0 +1,351 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="table_tests" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Table 1.3</title>
+ <table frame="all" id="table_tests.t0">
+ <title>Table 2</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all" id="table_tests.t1">
+ <title>Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.t2">
+ <title>Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.t3">
+ <title>Title [/ ] containing a comment</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.t4">
+ <title>Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.t5">
+ <title>[[Title]]</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <section id="table_tests.section1">
+ <title><link linkend="table_tests.section1">Section 1</link></title>
+ <table frame="all" id="table_tests.section1.t0">
+ <title>A &amp; B</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ A
+ </para>
+ </entry>
+ <entry>
+ <para>
+ B
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ a
+ </para>
+ </entry>
+ <entry>
+ <para>
+ b
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.t1">
+ <title>Empty Table</title>
+ <tgroup cols="0">
+ <tbody>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.t2">
+ <title>Table with an empty cell</title>
+ <tgroup cols="1">
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ x
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.t3">
+ <title>Indentation</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Header 1. Paragraph 1
+ </para>
+ <para>
+ Header 1. Paragraph 2
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Header 2
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ Row 1. Cell 1.
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Row 1. Cell 2.
+ </para>
+ <para>
+ Row 1. Cell 2. Paragraph 2.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.t4">
+ <title>Nested Tables</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Header 1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Header 2
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <table frame="all" id="table_tests.section1.t5">
+ <title>Inner Table</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ 1.1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ 1.2
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ 2.1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ 2.2
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Something.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <anchor id="id1"/>
+ <table frame="all" id="table_tests.section1.t6">
+ <title>Table with anchors</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ <anchor id="id2"/>a<anchor id="id3"/>
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ b
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/table-1_3.gold-html b/src/boost/tools/quickbook/test/table-1_3.gold-html
new file mode 100644
index 000000000..99a126a92
--- /dev/null
+++ b/src/boost/tools/quickbook/test/table-1_3.gold-html
@@ -0,0 +1,368 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Table 1.3
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#table_tests.section1">Section 1</a>
+ </li>
+ </ul>
+ </div>
+ <div id="table_tests.t0" class="table">
+ <table>
+ <caption>Table 2</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.t1" class="table">
+ <table>
+ <caption>Title</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.t2" class="table">
+ <table>
+ <caption>Title</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.t3" class="table">
+ <table>
+ <caption>Title [/ ] containing a comment</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.t4" class="table">
+ <table>
+ <caption>Title</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.t5" class="table">
+ <table>
+ <caption>[[Title]]</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1">
+ <h3>
+ Section 1
+ </h3>
+ <div id="table_tests.section1">
+ <div id="table_tests.section1.t0" class="table">
+ <table>
+ <caption>A &amp; B</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ A
+ </p>
+ </th>
+ <th>
+ <p>
+ B
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ a
+ </p>
+ </td>
+ <td>
+ <p>
+ b
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.t1" class="table">
+ <table>
+ <caption>Empty Table</caption>
+ <tbody>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.t2" class="table">
+ <table>
+ <caption>Table with an empty cell</caption>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ x
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.t3" class="table">
+ <table>
+ <caption>Indentation</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Header 1. Paragraph 1
+ </p>
+ <p>
+ Header 1. Paragraph 2
+ </p>
+ </th>
+ <th>
+ <p>
+ Header 2
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ Row 1. Cell 1.
+ </p>
+ </td>
+ <td>
+ <p>
+ Row 1. Cell 2.
+ </p>
+ <p>
+ Row 1. Cell 2. Paragraph 2.
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.t4" class="table">
+ <table>
+ <caption>Nested Tables</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Header 1
+ </p>
+ </th>
+ <th>
+ <p>
+ Header 2
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <div id="table_tests.section1.t5" class="table">
+ <table>
+ <caption>Inner Table</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ 1.1
+ </p>
+ </th>
+ <th>
+ <p>
+ 1.2
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ 2.1
+ </p>
+ </td>
+ <td>
+ <p>
+ 2.2
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ Something.
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <span id="id1"></span>
+ <div id="table_tests.section1.t6" class="table">
+ <table>
+ <caption>Table with anchors</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ <span id="id2"></span>a<span id="id3"></span>
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ b
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/table-1_3.quickbook b/src/boost/tools/quickbook/test/table-1_3.quickbook
new file mode 100644
index 000000000..1dc048911
--- /dev/null
+++ b/src/boost/tools/quickbook/test/table-1_3.quickbook
@@ -0,0 +1,113 @@
+[article Table 1.3
+ [quickbook 1.3]
+ [id table_tests]
+]
+
+[table Table 2
+ [[Heading]]
+ [[cell]]
+]
+
+[table
+ [[Heading]]
+ [[cell]]
+]
+
+[table [/ Comment?] Title
+ [[Heading]]
+ [[cell]]
+]
+
+[table [/ Multi line
+comment] Title
+ [[Heading]]
+ [[cell]]
+]
+
+[table Title [/ ] containing a comment
+ [[Heading]]
+ [[cell]]
+]
+
+[/ These two might be considered to be a bug. ]
+
+[table [/ Multi line
+comment]
+ Title
+ [[Heading]]
+ [[cell]]
+]
+
+[table [/ Multi line
+comment]
+ [[Title]]
+ [[Heading]]
+ [[cell]]
+]
+
+[section:section1 Section 1]
+
+[table A & B
+ [[A][B]]
+ [[a][b]]
+]
+
+[table Empty Table
+]
+
+[table Table with an empty cell
+[[x]]]
+
+[table Indentation
+ [
+ [
+ Header 1. Paragraph 1
+
+ Header 1. Paragraph 2
+ ]
+ [
+ Header 2
+ ]
+ ]
+ [
+ [
+ Row 1. Cell 1.
+ ]
+ [
+ Row 1. Cell 2.
+
+ Row 1. Cell 2. Paragraph 2.
+ ]
+ ]
+]
+
+[table Nested Tables
+ [
+ [
+ Header 1
+ ]
+ [
+ Header 2
+ ]
+ ]
+ [
+ [
+ [table Inner Table
+ [[1.1][1.2]]
+ [[2.1][2.2]]
+ ]
+ ]
+ ]
+ [
+ [
+ Something.
+ ]
+ ]
+]
+
+[#id1]
+[table Table with anchors
+[[[#id2]a[#id3]]][[b]]
+]
+
+[endsect]
diff --git a/src/boost/tools/quickbook/test/table-1_5.gold b/src/boost/tools/quickbook/test/table-1_5.gold
new file mode 100644
index 000000000..838a400fa
--- /dev/null
+++ b/src/boost/tools/quickbook/test/table-1_5.gold
@@ -0,0 +1,442 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="table_tests" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Table 1.5</title>
+ <table frame="all" id="table_tests.table1">
+ <title>Table 1</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.table_2">
+ <title>Table 2</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable frame="all" id="table_tests.table4">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all" id="table_tests._table5_">
+ <title>-table5-</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.title">
+ <title>Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.title0">
+ <title>Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.title_______containing_a_comment">
+ <title>Title [/ ] containing a comment</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.title1">
+ <title>Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.__title__">
+ <title>[[Title]]</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <section id="table_tests.section1">
+ <title><link linkend="table_tests.section1">Section 1</link></title>
+ <table frame="all" id="table_tests.section1.table1">
+ <title>Table 1</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.a___b">
+ <title>A &amp; B</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ A
+ </para>
+ </entry>
+ <entry>
+ <para>
+ B
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ a
+ </para>
+ </entry>
+ <entry>
+ <para>
+ b
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.empty_table">
+ <title>Empty Table</title>
+ <tgroup cols="0">
+ <tbody>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.table_with_an_empty_cell">
+ <title>Table with an empty cell</title>
+ <tgroup cols="1">
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ x
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.indentation">
+ <title>Indentation</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Header 1. Paragraph 1
+ </para>
+ <para>
+ Header 1. Paragraph 2
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Header 2
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ Row 1. Cell 1.
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Row 1. Cell 2.
+ </para>
+ <para>
+ Row 1. Cell 2. Paragraph 2.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.nested_tables">
+ <title>Nested Tables</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Header 1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Header 2
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <table frame="all" id="table_tests.section1.inner_table">
+ <title>Inner Table</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ 1.1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ 1.2
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ 2.1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ 2.2
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Something.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <anchor id="id1"/>
+ <table frame="all" id="table_tests.section1.table_with_anchors">
+ <title>Table with anchors</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ <anchor id="id2"/>a<anchor id="id3"/>
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ b
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/table-1_5.gold-html b/src/boost/tools/quickbook/test/table-1_5.gold-html
new file mode 100644
index 000000000..49c999883
--- /dev/null
+++ b/src/boost/tools/quickbook/test/table-1_5.gold-html
@@ -0,0 +1,459 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Table 1.5
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#table_tests.section1">Section 1</a>
+ </li>
+ </ul>
+ </div>
+ <div id="table_tests.table1" class="table">
+ <table>
+ <caption>Table 1</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.table_2" class="table">
+ <table>
+ <caption>Table 2</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.table4" class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests._table5_" class="table">
+ <table>
+ <caption>-table5-</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.title" class="table">
+ <table>
+ <caption>Title</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.title0" class="table">
+ <table>
+ <caption>Title</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.title_______containing_a_comment" class="table">
+ <table>
+ <caption>Title [/ ] containing a comment</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.title1" class="table">
+ <table>
+ <caption>Title</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.__title__" class="table">
+ <table>
+ <caption>[[Title]]</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1">
+ <h3>
+ Section 1
+ </h3>
+ <div id="table_tests.section1">
+ <div id="table_tests.section1.table1" class="table">
+ <table>
+ <caption>Table 1</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.a___b" class="table">
+ <table>
+ <caption>A &amp; B</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ A
+ </p>
+ </th>
+ <th>
+ <p>
+ B
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ a
+ </p>
+ </td>
+ <td>
+ <p>
+ b
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.empty_table" class="table">
+ <table>
+ <caption>Empty Table</caption>
+ <tbody>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.table_with_an_empty_cell" class="table">
+ <table>
+ <caption>Table with an empty cell</caption>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ x
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.indentation" class="table">
+ <table>
+ <caption>Indentation</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Header 1. Paragraph 1
+ </p>
+ <p>
+ Header 1. Paragraph 2
+ </p>
+ </th>
+ <th>
+ <p>
+ Header 2
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ Row 1. Cell 1.
+ </p>
+ </td>
+ <td>
+ <p>
+ Row 1. Cell 2.
+ </p>
+ <p>
+ Row 1. Cell 2. Paragraph 2.
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.nested_tables" class="table">
+ <table>
+ <caption>Nested Tables</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Header 1
+ </p>
+ </th>
+ <th>
+ <p>
+ Header 2
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <div id="table_tests.section1.inner_table" class="table">
+ <table>
+ <caption>Inner Table</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ 1.1
+ </p>
+ </th>
+ <th>
+ <p>
+ 1.2
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ 2.1
+ </p>
+ </td>
+ <td>
+ <p>
+ 2.2
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ Something.
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <span id="id1"></span>
+ <div id="table_tests.section1.table_with_anchors" class="table">
+ <table>
+ <caption>Table with anchors</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ <span id="id2"></span>a<span id="id3"></span>
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ b
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/table-1_5.quickbook b/src/boost/tools/quickbook/test/table-1_5.quickbook
new file mode 100644
index 000000000..7ab15b1ac
--- /dev/null
+++ b/src/boost/tools/quickbook/test/table-1_5.quickbook
@@ -0,0 +1,133 @@
+[article Table 1.5
+ [quickbook 1.5]
+ [id table_tests]
+]
+
+[table:table1 Table 1
+ [[Heading]]
+ [[cell]]
+]
+
+[table Table 2
+ [[Heading]]
+ [[cell]]
+]
+
+[table
+ [[Heading]]
+ [[cell]]
+]
+
+[table:table4
+ [[Heading]]
+ [[cell]]
+]
+
+[table:-table5-
+ [[Heading]]
+ [[cell]]
+]
+
+[table [/ Comment?] Title
+ [[Heading]]
+ [[cell]]
+]
+
+[table [/ Multi line
+comment] Title
+ [[Heading]]
+ [[cell]]
+]
+
+[table Title [/ ] containing a comment
+ [[Heading]]
+ [[cell]]
+]
+
+[/ These two might be considered to be a bug. ]
+
+[table [/ Multi line
+comment]
+ Title
+ [[Heading]]
+ [[cell]]
+]
+
+[table [/ Multi line
+comment]
+ [[Title]]
+ [[Heading]]
+ [[cell]]
+]
+
+[section:section1 Section 1]
+
+[table:table1 Table 1
+ [[Heading]]
+ [[cell]]
+]
+
+[table A & B
+ [[A][B]]
+ [[a][b]]
+]
+
+[table Empty Table
+]
+
+[table Table with an empty cell
+[[x]]]
+
+[table Indentation
+ [
+ [
+ Header 1. Paragraph 1
+
+ Header 1. Paragraph 2
+ ]
+ [
+ Header 2
+ ]
+ ]
+ [
+ [
+ Row 1. Cell 1.
+ ]
+ [
+ Row 1. Cell 2.
+
+ Row 1. Cell 2. Paragraph 2.
+ ]
+ ]
+]
+
+[table Nested Tables
+ [
+ [
+ Header 1
+ ]
+ [
+ Header 2
+ ]
+ ]
+ [
+ [
+ [table Inner Table
+ [[1.1][1.2]]
+ [[2.1][2.2]]
+ ]
+ ]
+ ]
+ [
+ [
+ Something.
+ ]
+ ]
+]
+
+[#id1]
+[table Table with anchors
+[[[#id2]a[#id3]]][[b]]
+]
+
+[endsect]
diff --git a/src/boost/tools/quickbook/test/table-1_6.gold b/src/boost/tools/quickbook/test/table-1_6.gold
new file mode 100644
index 000000000..3abe6b0d2
--- /dev/null
+++ b/src/boost/tools/quickbook/test/table-1_6.gold
@@ -0,0 +1,478 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="table_tests" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Table 1.6</title>
+ <table frame="all" id="table_tests.table1">
+ <title>Table 1</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.table_2">
+ <title>Table 2</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable frame="all" id="table_tests.table4">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all" id="table_tests.table5">
+ <title>-table5-</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.title">
+ <title>Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.title0">
+ <title>Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.title_containing_a_comment">
+ <title>Title containing a comment</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.title1">
+ <title>Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ Cell 1
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Cell 2
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all" id="table_tests.title_on_multiple_lines_with_bol">
+ <title>Title on multiple lines with <emphasis role="bold">bold</emphasis> text?</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ Cell 1
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Cell 2
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <section id="table_tests.section1">
+ <title><link linkend="table_tests.section1">Section 1</link></title>
+ <table frame="all" id="table_tests.section1.table1">
+ <title>Table 1</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.a_b">
+ <title>A &amp; B</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ A
+ </para>
+ </entry>
+ <entry>
+ <para>
+ B
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ a
+ </para>
+ </entry>
+ <entry>
+ <para>
+ b
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.empty_table">
+ <title>Empty Table</title>
+ <tgroup cols="0">
+ <tbody>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.table_with_an_empty_cell">
+ <title>Table with an empty cell</title>
+ <tgroup cols="1">
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ x
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.indentation">
+ <title>Indentation</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Header 1. Paragraph 1
+ </para>
+ <para>
+ Header 1. Paragraph 2
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Header 2
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ Row 1. Cell 1.
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Row 1. Cell 2.
+ </para>
+ <para>
+ Row 1. Cell 2. Paragraph 2.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.nested_tables">
+ <title>Nested Tables</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Header 1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Header 2
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <table frame="all" id="table_tests.section1.inner_table">
+ <title>Inner Table</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ 1.1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ 1.2
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ 2.1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ 2.2
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Something.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <anchor id="id1"/>
+ <table frame="all" id="table_tests.section1.table_with_anchors">
+ <title>Table with anchors</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ <anchor id="id2"/>a<anchor id="id3"/>
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ b
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/table-1_6.gold-html b/src/boost/tools/quickbook/test/table-1_6.gold-html
new file mode 100644
index 000000000..83690c32e
--- /dev/null
+++ b/src/boost/tools/quickbook/test/table-1_6.gold-html
@@ -0,0 +1,496 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Table 1.6
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#table_tests.section1">Section 1</a>
+ </li>
+ </ul>
+ </div>
+ <div id="table_tests.table1" class="table">
+ <table>
+ <caption>Table 1</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.table_2" class="table">
+ <table>
+ <caption>Table 2</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.table4" class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.table5" class="table">
+ <table>
+ <caption>-table5-</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.title" class="table">
+ <table>
+ <caption>Title</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.title0" class="table">
+ <table>
+ <caption>Title</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.title_containing_a_comment" class="table">
+ <table>
+ <caption>Title containing a comment</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.title1" class="table">
+ <table>
+ <caption>Title</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ Cell 1
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ Cell 2
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.title_on_multiple_lines_with_bol" class="table">
+ <table>
+ <caption>Title on multiple lines with <span class="bold"><strong>bold</strong></span>
+ text?</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ Cell 1
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ Cell 2
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1">
+ <h3>
+ Section 1
+ </h3>
+ <div id="table_tests.section1">
+ <div id="table_tests.section1.table1" class="table">
+ <table>
+ <caption>Table 1</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.a_b" class="table">
+ <table>
+ <caption>A &amp; B</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ A
+ </p>
+ </th>
+ <th>
+ <p>
+ B
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ a
+ </p>
+ </td>
+ <td>
+ <p>
+ b
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.empty_table" class="table">
+ <table>
+ <caption>Empty Table</caption>
+ <tbody>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.table_with_an_empty_cell" class="table">
+ <table>
+ <caption>Table with an empty cell</caption>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ x
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.indentation" class="table">
+ <table>
+ <caption>Indentation</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Header 1. Paragraph 1
+ </p>
+ <p>
+ Header 1. Paragraph 2
+ </p>
+ </th>
+ <th>
+ <p>
+ Header 2
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ Row 1. Cell 1.
+ </p>
+ </td>
+ <td>
+ <p>
+ Row 1. Cell 2.
+ </p>
+ <p>
+ Row 1. Cell 2. Paragraph 2.
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.nested_tables" class="table">
+ <table>
+ <caption>Nested Tables</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Header 1
+ </p>
+ </th>
+ <th>
+ <p>
+ Header 2
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <div id="table_tests.section1.inner_table" class="table">
+ <table>
+ <caption>Inner Table</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ 1.1
+ </p>
+ </th>
+ <th>
+ <p>
+ 1.2
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ 2.1
+ </p>
+ </td>
+ <td>
+ <p>
+ 2.2
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ Something.
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <span id="id1"></span>
+ <div id="table_tests.section1.table_with_anchors" class="table">
+ <table>
+ <caption>Table with anchors</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ <span id="id2"></span>a<span id="id3"></span>
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ b
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/table-1_6.quickbook b/src/boost/tools/quickbook/test/table-1_6.quickbook
new file mode 100644
index 000000000..332e07060
--- /dev/null
+++ b/src/boost/tools/quickbook/test/table-1_6.quickbook
@@ -0,0 +1,134 @@
+[article Table 1.6
+ [quickbook 1.6]
+ [id table_tests]
+]
+
+[table:table1 Table 1 [[Heading]][[cell]]]
+
+[table Table 2
+ [[Heading]]
+ [[cell]]
+]
+
+[table
+ [[Heading]]
+ [[cell]]
+]
+
+[table:table4
+ [[Heading]]
+ [[cell]]
+]
+
+[table:-table5-
+ [[Heading]]
+ [[cell]]
+]
+
+[table [/ Comment?] Title
+ [[Heading]]
+ [[cell]]
+]
+
+[table [/ Multi line
+comment] Title
+ [[Heading]]
+ [[cell]]
+]
+
+[table Title [/ ] containing a comment
+ [[Heading]]
+ [[cell]]
+]
+
+[table [/ Multi line
+comment]
+ Title
+ [[Heading]]
+ [[cell]]
+]
+
+[table [/ Multi line
+comment]
+ [[Heading]]
+ [[Cell 1]]
+ [[Cell 2]]
+]
+
+[table Title on multiple
+ lines with *bold* text?
+ [[Heading]]
+ [[Cell 1]]
+ [[Cell 2]]
+]
+
+[section:section1 Section 1]
+
+[table:table1 Table 1
+ [[Heading]]
+ [[cell]]
+]
+
+[table A & B
+ [[A][B]]
+ [[a][b]]
+]
+
+[table Empty Table]
+
+[table Table with an empty cell
+[[x]]]
+
+[table Indentation
+ [
+ [
+ Header 1. Paragraph 1
+
+ Header 1. Paragraph 2
+ ]
+ [
+ Header 2
+ ]
+ ]
+ [
+ [
+ Row 1. Cell 1.
+ ]
+ [
+ Row 1. Cell 2.
+
+ Row 1. Cell 2. Paragraph 2.
+ ]
+ ]
+]
+
+[table Nested Tables
+ [
+ [
+ Header 1
+ ]
+ [
+ Header 2
+ ]
+ ]
+ [
+ [
+ [table Inner Table
+ [[1.1][1.2]]
+ [[2.1][2.2]]
+ ]
+ ]
+ ]
+ [
+ [
+ Something.
+ ]
+ ]
+]
+
+[#id1]
+[table Table with anchors
+[[[#id2]a[#id3]]][[b]]
+]
+
+[endsect]
diff --git a/src/boost/tools/quickbook/test/table-1_7.gold b/src/boost/tools/quickbook/test/table-1_7.gold
new file mode 100644
index 000000000..6b8eafabf
--- /dev/null
+++ b/src/boost/tools/quickbook/test/table-1_7.gold
@@ -0,0 +1,520 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="table_tests" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Table 1.7</title>
+ <table frame="all" id="table_tests.table1">
+ <title>Table 1</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.table_2">
+ <title>Table 2</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable frame="all" id="table_tests.table4">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable frame="all" id="table_tests.-table5-">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all" id="table_tests.title">
+ <title>Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.title0">
+ <title>Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.title_containing_a_comment">
+ <title>Title containing a comment</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.title1">
+ <title>Title</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ Cell 1
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Cell 2
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <table frame="all" id="table_tests.title_on_multiple_lines_with_bol">
+ <title>Title on multiple lines with <emphasis role="bold">bold</emphasis> text?</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ Cell 1
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Cell 2
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <section id="table_tests.section1">
+ <title><link linkend="table_tests.section1">Section 1</link></title>
+ <table frame="all" id="table_tests.section1.table1">
+ <title>Table 1</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.a_b">
+ <title>A &amp; B</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ A
+ </para>
+ </entry>
+ <entry>
+ <para>
+ B
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ a
+ </para>
+ </entry>
+ <entry>
+ <para>
+ b
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.empty_table">
+ <title>Empty Table</title>
+ <tgroup cols="0">
+ <tbody>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.table_with_an_empty_cell">
+ <title>Table with an empty cell</title>
+ <tgroup cols="1">
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ x
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.indentation">
+ <title>Indentation</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Header 1. Paragraph 1
+ </para>
+ <para>
+ Header 1. Paragraph 2
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Header 2
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ Row 1. Cell 1.
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Row 1. Cell 2.
+ </para>
+ <para>
+ Row 1. Cell 2. Paragraph 2.
+ </para>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Row 2. Cell 1.
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Row 2. Cell 1. List item 1.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Row 2. Cell 1. List item 2.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </entry>
+ <entry>
+ <para>
+ Row 2. Cell 2.
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Row 2. Cell 2. List item 1.
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Row 2. Cell 2. List item 2.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.nested_tables">
+ <title>Nested Tables</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Header 1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ Header 2
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <table frame="all" id="table_tests.section1.inner_table">
+ <title>Inner Table</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ 1.1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ 1.2
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ 2.1
+ </para>
+ </entry>
+ <entry>
+ <para>
+ 2.2
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <para>
+ Something.
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <anchor id="id1"/>
+ <table frame="all" id="table_tests.section1.table_with_anchors">
+ <title>Table with anchors</title>
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ <anchor id="id2"/>a<anchor id="id3"/>
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ b
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <table frame="all" id="table_tests.section1.id123">
+ <title>Table with template id</title>
+ <tgroup cols="0">
+ <tbody>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/table-1_7.gold-html b/src/boost/tools/quickbook/test/table-1_7.gold-html
new file mode 100644
index 000000000..90dc27274
--- /dev/null
+++ b/src/boost/tools/quickbook/test/table-1_7.gold-html
@@ -0,0 +1,538 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Table 1.7
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#table_tests.section1">Section 1</a>
+ </li>
+ </ul>
+ </div>
+ <div id="table_tests.table1" class="table">
+ <table>
+ <caption>Table 1</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.table_2" class="table">
+ <table>
+ <caption>Table 2</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.table4" class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.-table5-" class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.title" class="table">
+ <table>
+ <caption>Title</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.title0" class="table">
+ <table>
+ <caption>Title</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.title_containing_a_comment" class="table">
+ <table>
+ <caption>Title containing a comment</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.title1" class="table">
+ <table>
+ <caption>Title</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div class="informaltable">
+ <table>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ Cell 1
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ Cell 2
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.title_on_multiple_lines_with_bol" class="table">
+ <table>
+ <caption>Title on multiple lines with <span class="bold"><strong>bold</strong></span>
+ text?</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ Cell 1
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ Cell 2
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1">
+ <h3>
+ Section 1
+ </h3>
+ <div id="table_tests.section1">
+ <div id="table_tests.section1.table1" class="table">
+ <table>
+ <caption>Table 1</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Heading
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ cell
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.a_b" class="table">
+ <table>
+ <caption>A &amp; B</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ A
+ </p>
+ </th>
+ <th>
+ <p>
+ B
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ a
+ </p>
+ </td>
+ <td>
+ <p>
+ b
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.empty_table" class="table">
+ <table>
+ <caption>Empty Table</caption>
+ <tbody>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.table_with_an_empty_cell" class="table">
+ <table>
+ <caption>Table with an empty cell</caption>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ x
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.indentation" class="table">
+ <table>
+ <caption>Indentation</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Header 1. Paragraph 1
+ </p>
+ <p>
+ Header 1. Paragraph 2
+ </p>
+ </th>
+ <th>
+ <p>
+ Header 2
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ Row 1. Cell 1.
+ </p>
+ </td>
+ <td>
+ <p>
+ Row 1. Cell 2.
+ </p>
+ <p>
+ Row 1. Cell 2. Paragraph 2.
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ Row 2. Cell 1.
+ </p>
+ <ul>
+ <li>
+ <div>
+ Row 2. Cell 1. List item 1.
+ </div>
+ </li>
+ <li>
+ <div>
+ Row 2. Cell 1. List item 2.
+ </div>
+ </li>
+ </ul>
+ </td>
+ <td>
+ <p>
+ Row 2. Cell 2.
+ </p>
+ <ul>
+ <li>
+ <div>
+ Row 2. Cell 2. List item 1.
+ </div>
+ </li>
+ <li>
+ <div>
+ Row 2. Cell 2. List item 2.
+ </div>
+ </li>
+ </ul>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.nested_tables" class="table">
+ <table>
+ <caption>Nested Tables</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ Header 1
+ </p>
+ </th>
+ <th>
+ <p>
+ Header 2
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <div id="table_tests.section1.inner_table" class="table">
+ <table>
+ <caption>Inner Table</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ 1.1
+ </p>
+ </th>
+ <th>
+ <p>
+ 1.2
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ 2.1
+ </p>
+ </td>
+ <td>
+ <p>
+ 2.2
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <p>
+ Something.
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <span id="id1"></span>
+ <div id="table_tests.section1.table_with_anchors" class="table">
+ <table>
+ <caption>Table with anchors</caption>
+ <thead>
+ <tr>
+ <th>
+ <p>
+ <span id="id2"></span>a<span id="id3"></span>
+ </p>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <p>
+ b
+ </p>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <div id="table_tests.section1.id123" class="table">
+ <table>
+ <caption>Table with template id</caption>
+ <tbody>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/table-1_7.quickbook b/src/boost/tools/quickbook/test/table-1_7.quickbook
new file mode 100644
index 000000000..84d68f71d
--- /dev/null
+++ b/src/boost/tools/quickbook/test/table-1_7.quickbook
@@ -0,0 +1,151 @@
+[article Table 1.7
+ [quickbook 1.7]
+ [id table_tests]
+]
+
+[table:table1 Table 1 [[Heading]][[cell]]]
+
+[table Table 2
+ [[Heading]]
+ [[cell]]
+]
+
+[table
+ [[Heading]]
+ [[cell]]
+]
+
+[table:table4
+ [[Heading]]
+ [[cell]]
+]
+
+[table:-table5-
+ [[Heading]]
+ [[cell]]
+]
+
+[table [/ Comment?] Title
+ [[Heading]]
+ [[cell]]
+]
+
+[table [/ Multi line
+comment] Title
+ [[Heading]]
+ [[cell]]
+]
+
+[table Title [/ ] containing a comment
+ [[Heading]]
+ [[cell]]
+]
+
+[table [/ Multi line
+comment]
+ Title
+ [[Heading]]
+ [[cell]]
+]
+
+[table [/ Multi line
+comment]
+ [[Heading]]
+ [[Cell 1]]
+ [[Cell 2]]
+]
+
+[table Title on multiple
+ lines with *bold* text?
+ [[Heading]]
+ [[Cell 1]]
+ [[Cell 2]]
+]
+
+[section:section1 Section 1]
+
+[table:table1 Table 1
+ [[Heading]]
+ [[cell]]
+]
+
+[table A & B
+ [[A][B]]
+ [[a][b]]
+]
+
+[table Empty Table]
+
+[table Table with an empty cell
+[[x]]]
+
+[table Indentation
+ [
+ [
+ Header 1. Paragraph 1
+
+ Header 1. Paragraph 2
+ ]
+ [
+ Header 2
+ ]
+ ]
+ [
+ [
+ Row 1. Cell 1.
+ ]
+ [
+ Row 1. Cell 2.
+
+ Row 1. Cell 2. Paragraph 2.
+ ]
+ ]
+ [
+ [
+Row 2. Cell 1.
+
+* Row 2. Cell 1. List item 1.
+* Row 2. Cell 1. List item 2.
+ ]
+ [
+ Row 2. Cell 2.
+
+ * Row 2. Cell 2. List item 1.
+ * Row 2. Cell 2. List item 2.
+ ]
+ ]
+]
+
+[table Nested Tables
+ [
+ [
+ Header 1
+ ]
+ [
+ Header 2
+ ]
+ ]
+ [
+ [
+ [table Inner Table
+ [[1.1][1.2]]
+ [[2.1][2.2]]
+ ]
+ ]
+ ]
+ [
+ [
+ Something.
+ ]
+ ]
+]
+
+[#id1]
+[table Table with anchors
+[[[#id2]a[#id3]]][[b]]
+]
+
+[template id_value[] id123]
+[table:[id_value] Table with template id]
+
+[endsect]
diff --git a/src/boost/tools/quickbook/test/template_arguments1-1_1-fail.quickbook b/src/boost/tools/quickbook/test/template_arguments1-1_1-fail.quickbook
new file mode 100644
index 000000000..d2622373d
--- /dev/null
+++ b/src/boost/tools/quickbook/test/template_arguments1-1_1-fail.quickbook
@@ -0,0 +1,10 @@
+[article Expect template to fail because there are too many arguments.
+]
+
+[template unary[x] [x]]
+
+[section Failure]
+
+[unary a..b ]
+
+[endsect]
diff --git a/src/boost/tools/quickbook/test/template_arguments1-1_5-fail.quickbook b/src/boost/tools/quickbook/test/template_arguments1-1_5-fail.quickbook
new file mode 100644
index 000000000..335306a27
--- /dev/null
+++ b/src/boost/tools/quickbook/test/template_arguments1-1_5-fail.quickbook
@@ -0,0 +1,11 @@
+[article Expect template to fail because there are too many arguments.
+ [quickbook 1.5]
+]
+
+[template unary[x] [x]]
+
+[section Failure]
+
+[unary a..b ]
+
+[endsect]
diff --git a/src/boost/tools/quickbook/test/template_arguments2-1_1-fail.quickbook b/src/boost/tools/quickbook/test/template_arguments2-1_1-fail.quickbook
new file mode 100644
index 000000000..4f8133708
--- /dev/null
+++ b/src/boost/tools/quickbook/test/template_arguments2-1_1-fail.quickbook
@@ -0,0 +1,10 @@
+[article Expect template to fail because there are not enough arguments.
+]
+
+[template ternary[x y z] [x][y][z]]
+
+[section Failure]
+
+[ternary a b ]
+
+[endsect]
diff --git a/src/boost/tools/quickbook/test/template_arguments2-1_5-fail.quickbook b/src/boost/tools/quickbook/test/template_arguments2-1_5-fail.quickbook
new file mode 100644
index 000000000..1c45e09c7
--- /dev/null
+++ b/src/boost/tools/quickbook/test/template_arguments2-1_5-fail.quickbook
@@ -0,0 +1,6 @@
+[article Expect template to fail because there are not enough arguments on 1.5.
+ [quickbook 1.5]
+]
+
+[template ternary[x y z] {[x]-[y]-[z]}]
+[ternary 1..2 3 4] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/template_arguments3-1_1-fail.quickbook b/src/boost/tools/quickbook/test/template_arguments3-1_1-fail.quickbook
new file mode 100644
index 000000000..83b2daa90
--- /dev/null
+++ b/src/boost/tools/quickbook/test/template_arguments3-1_1-fail.quickbook
@@ -0,0 +1,10 @@
+[article Expect template to fail because there are no arguments.
+]
+
+[template ternary[x y z] [x][y][z]]
+
+[section Failure]
+
+[ternary]
+
+[endsect]
diff --git a/src/boost/tools/quickbook/test/template_arguments3-1_5-fail.quickbook b/src/boost/tools/quickbook/test/template_arguments3-1_5-fail.quickbook
new file mode 100644
index 000000000..cd6618241
--- /dev/null
+++ b/src/boost/tools/quickbook/test/template_arguments3-1_5-fail.quickbook
@@ -0,0 +1,11 @@
+[article Expect template to fail because there are no arguments.
+ [quickbook 1.5]
+]
+
+[template ternary[x y z] [x][y][z]]
+
+[section Failure]
+
+[ternary]
+
+[endsect]
diff --git a/src/boost/tools/quickbook/test/template_section-1_5.gold b/src/boost/tools/quickbook/test/template_section-1_5.gold
new file mode 100644
index 000000000..af270acb1
--- /dev/null
+++ b/src/boost/tools/quickbook/test/template_section-1_5.gold
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="section_in_a_template" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Section in a template</title>
+ <para>
+ Some text before the section.
+ </para>
+ <section id="section_in_a_template.test">
+ <title><link linkend="section_in_a_template.test">Test</link></title>
+ <para>
+ Hello.
+ </para>
+ <bridgehead renderas="sect3" id="section_in_a_template.test.h0">
+ <phrase id="section_in_a_template.test.just_to_test_id_generation"/><link linkend="section_in_a_template.test.just_to_test_id_generation">Just
+ to test id generation</link>
+ </bridgehead>
+ <para>
+ Goodbye.
+ </para>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/template_section-1_5.gold-html b/src/boost/tools/quickbook/test/template_section-1_5.gold-html
new file mode 100644
index 000000000..a21f78004
--- /dev/null
+++ b/src/boost/tools/quickbook/test/template_section-1_5.gold-html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Section in a template
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#section_in_a_template.test">Test</a>
+ </li>
+ </ul>
+ </div>
+ <p>
+ Some text before the section.
+ </p>
+ <div id="section_in_a_template.test">
+ <h3>
+ Test
+ </h3>
+ <div id="section_in_a_template.test">
+ <p>
+ Hello.
+ </p>
+ <h3 id="section_in_a_template.test.just_to_test_id_generation">
+ Just to test id generation
+ </h3>
+ <p>
+ Goodbye.
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/template_section-1_5.quickbook b/src/boost/tools/quickbook/test/template_section-1_5.quickbook
new file mode 100644
index 000000000..670654a23
--- /dev/null
+++ b/src/boost/tools/quickbook/test/template_section-1_5.quickbook
@@ -0,0 +1,20 @@
+[article Section in a template
+ [quickbook 1.5]
+]
+
+[template nestedsection[]
+
+Some text before the section.
+
+[section Test]
+
+Hello.
+
+[heading Just to test id generation]
+
+Goodbye.
+
+[endsect]
+]
+
+[nestedsection] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/template_section1-1_5-fail.quickbook b/src/boost/tools/quickbook/test/template_section1-1_5-fail.quickbook
new file mode 100644
index 000000000..60b34830a
--- /dev/null
+++ b/src/boost/tools/quickbook/test/template_section1-1_5-fail.quickbook
@@ -0,0 +1,9 @@
+[article Template should contain balanced sections
+ [quickbook 1.5]
+]
+
+[template begin_no_end[]
+[section Test]
+]
+
+[begin_no_end] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/template_section2-1_5-fail.quickbook b/src/boost/tools/quickbook/test/template_section2-1_5-fail.quickbook
new file mode 100644
index 000000000..5445e88e3
--- /dev/null
+++ b/src/boost/tools/quickbook/test/template_section2-1_5-fail.quickbook
@@ -0,0 +1,10 @@
+[article Template should contain balanced sections
+ [quickbook 1.5]
+]
+
+[template end_before_begin[]
+[endsect]
+[section Test]
+]
+
+[end_before_begin] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/template_section3-1_5-fail.quickbook b/src/boost/tools/quickbook/test/template_section3-1_5-fail.quickbook
new file mode 100644
index 000000000..237a9f0d1
--- /dev/null
+++ b/src/boost/tools/quickbook/test/template_section3-1_5-fail.quickbook
@@ -0,0 +1,9 @@
+[article Template should contain balanced sections
+ [quickbook 1.5]
+]
+
+[template end_no_begin[]
+[endsect]
+]
+
+[end_no_begin] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/templates-1_3.gold b/src/boost/tools/quickbook/test/templates-1_3.gold
new file mode 100644
index 000000000..ed3668fda
--- /dev/null
+++ b/src/boost/tools/quickbook/test/templates-1_3.gold
@@ -0,0 +1,192 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="templates" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Templates</title>
+ <section id="templates.templates">
+ <title><link linkend="templates.templates">Templates</link></title>
+ <para>
+ nullary_arg
+ </para>
+ <para>
+ foo baz
+ </para>
+ <para>
+ foo baz
+ </para>
+ <para>
+ This is a complete paragraph. kalamazoo kalamazoo kalamazoo kalamazoo kalamazoo
+ kalamazoo kalamazoo kalamazoo kalamazoo.... blah blah blah......
+ </para>
+ <para>
+ <hey>baz</hey>
+ </para>
+ <para>
+ This is a complete paragraph. madagascar madagascar madagascar madagascar madagascar
+ madagascar madagascar madagascar madagascar.... blah blah blah......
+ </para>
+ <para>
+ zoom peanut zoom
+ </para>
+ <para>
+ exactly xanadu
+ </para>
+ <para>
+ wx
+ </para>
+ <para>
+ wxyz wxyz trail
+ </para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> &quot;Hello, World&quot; <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ <para>
+ x<superscript>2</superscript>
+ </para>
+ <para>
+ &alpha;<superscript>2</superscript>
+ </para>
+ <para>
+ x<superscript>2</superscript>
+ </para>
+ <para>
+ got a banana?
+ </para>
+ <para>
+ .0 00
+ </para>
+ <para>
+ [fool]
+ </para>
+ </section>
+ <section id="templates.empty_templates">
+ <title><link linkend="templates.empty_templates">Empty Templates</link></title>
+ </section>
+ <section id="templates.nested_templates">
+ <title><link linkend="templates.nested_templates">Nested Templates</link></title>
+ <para>
+ Pre
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Hello!
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ Post
+ </para>
+ <para>
+ Pre
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Start phrase template. Hello! End phrase template.
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ Post
+ </para>
+ <para>
+ Pre
+ </para>
+ <para>
+ Start phrase template.
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Hello!
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ End phrase template.
+ </para>
+ <para>
+ Post
+ </para>
+ <para>
+ Pre Start phrase template. Start phrase template. Hello! End phrase template.
+ End phrase template. Post
+ </para>
+ </section>
+ <section id="templates.block_markup">
+ <title><link linkend="templates.block_markup">Block Markup</link></title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ a
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ b
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para/>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ <para>
+ Paragraphs 1
+ </para>
+ <para>
+ Paragraphs 2
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ a
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ b
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <para/>
+ </listitem>
+ <listitem>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ </listitem>
+ <listitem>
+ <simpara>
+ Paragraphs 1
+ </simpara>
+ <simpara>
+ Paragraphs 2
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="templates.escaped_templates">
+ <title><link linkend="templates.escaped_templates">Escaped templates</link></title>
+ <para>
+ <thingbob>Not real boostbook</thingbob> <thingbob>Also not real boostbook</thingbob>
+ <thingbob>More fake boostbook</thingbob> <thingbob>Final fake boostbook</thingbob>
+ </para>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/templates-1_3.gold-html b/src/boost/tools/quickbook/test/templates-1_3.gold-html
new file mode 100644
index 000000000..1696e949e
--- /dev/null
+++ b/src/boost/tools/quickbook/test/templates-1_3.gold-html
@@ -0,0 +1,240 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Templates
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#templates.templates">Templates</a>
+ </li>
+ <li>
+ <a href="#templates.empty_templates">Empty Templates</a>
+ </li>
+ <li>
+ <a href="#templates.nested_templates">Nested Templates</a>
+ </li>
+ <li>
+ <a href="#templates.block_markup">Block Markup</a>
+ </li>
+ <li>
+ <a href="#templates.escaped_templates">Escaped templates</a>
+ </li>
+ </ul>
+ </div>
+ <div id="templates.templates">
+ <h3>
+ Templates
+ </h3>
+ <div id="templates.templates">
+ <p>
+ nullary_arg
+ </p>
+ <p>
+ foo baz
+ </p>
+ <p>
+ foo baz
+ </p>
+ <p>
+ This is a complete paragraph. kalamazoo kalamazoo kalamazoo kalamazoo kalamazoo
+ kalamazoo kalamazoo kalamazoo kalamazoo.... blah blah blah......
+ </p>
+ <p>
+ baz
+ </p>
+ <p>
+ This is a complete paragraph. madagascar madagascar madagascar madagascar
+ madagascar madagascar madagascar madagascar madagascar.... blah blah blah......
+ </p>
+ <p>
+ zoom peanut zoom
+ </p>
+ <p>
+ exactly xanadu
+ </p>
+ <p>
+ wx
+ </p>
+ <p>
+ wxyz wxyz trail
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> &quot;Hello, World&quot; <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+ <p>
+ x<sup>2</sup>
+ </p>
+ <p>
+ &alpha;<sup>2</sup>
+ </p>
+ <p>
+ x<sup>2</sup>
+ </p>
+ <p>
+ got a banana?
+ </p>
+ <p>
+ .0 00
+ </p>
+ <p>
+ [fool]
+ </p>
+ </div>
+ </div>
+ <div id="templates.empty_templates">
+ <h3>
+ Empty Templates
+ </h3>
+ <div id="templates.empty_templates">
+ </div>
+ </div>
+ <div id="templates.nested_templates">
+ <h3>
+ Nested Templates
+ </h3>
+ <div id="templates.nested_templates">
+ <p>
+ Pre
+ </p>
+ <p>
+ Start block template.
+ </p>
+ <p>
+ Start block template.
+ </p>
+ <p>
+ Hello!
+ </p>
+ <p>
+ End block template.
+ </p>
+ <p>
+ End block template.
+ </p>
+ <p>
+ Post
+ </p>
+ <p>
+ Pre
+ </p>
+ <p>
+ Start block template.
+ </p>
+ <p>
+ Start phrase template. Hello! End phrase template.
+ </p>
+ <p>
+ End block template.
+ </p>
+ <p>
+ Post
+ </p>
+ <p>
+ Pre
+ </p>
+ <p>
+ Start phrase template.
+ </p>
+ <p>
+ Start block template.
+ </p>
+ <p>
+ Hello!
+ </p>
+ <p>
+ End block template.
+ </p>
+ <p>
+ End phrase template.
+ </p>
+ <p>
+ Post
+ </p>
+ <p>
+ Pre Start phrase template. Start phrase template. Hello! End phrase template.
+ End phrase template. Post
+ </p>
+ </div>
+ </div>
+ <div id="templates.block_markup">
+ <h3>
+ Block Markup
+ </h3>
+ <div id="templates.block_markup">
+ <ul>
+ <li>
+ <div>
+ a
+ </div>
+ </li>
+ <li>
+ <div>
+ b
+ </div>
+ </li>
+ </ul>
+ <p>
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span></pre>
+ <p>
+ Paragraphs 1
+ </p>
+ <p>
+ Paragraphs 2
+ </p>
+ <ul>
+ <li>
+ <div>
+ <ul>
+ <li>
+ <div>
+ a
+ </div>
+ </li>
+ <li>
+ <div>
+ b
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <p>
+ </p>
+ </li>
+ <li>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span></pre>
+ </li>
+ <li>
+ <div>
+ Paragraphs 1
+ </div>
+ <div>
+ Paragraphs 2
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div id="templates.escaped_templates">
+ <h3>
+ Escaped templates
+ </h3>
+ <div id="templates.escaped_templates">
+ <p>
+ Not real boostbook Also not real boostbook More fake boostbook Final fake
+ boostbook
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/templates-1_3.quickbook b/src/boost/tools/quickbook/test/templates-1_3.quickbook
new file mode 100644
index 000000000..a6d434878
--- /dev/null
+++ b/src/boost/tools/quickbook/test/templates-1_3.quickbook
@@ -0,0 +1,216 @@
+[article Templates
+ [quickbook 1.3]
+]
+
+[section Templates]
+
+[/-------------------------------- nullary arg ]
+
+[template foo0 nullary_arg]
+
+[foo0]
+
+[/-------------------------------- unary arg, phrase syle ]
+
+[template foo1[bar] foo [bar]]
+
+[foo1 baz]
+
+[/-------------------------------- unary arg, block syle ]
+
+[template foo2[bar]
+foo [bar]
+]
+
+[foo2 baz]
+
+[template foo3[bar]
+This is a complete paragraph. [bar] [bar] [bar] [bar] [bar]
+[bar] [bar] [bar] [bar].... blah blah blah......
+]
+
+[foo3 kalamazoo]
+
+[/-------------------------------- unary arg, using punctuation ]
+
+[template ![bar] '''<hey>'''[bar]'''</hey>''']
+
+[!baz]
+
+[/-------------------------------- recursive templates ]
+
+[template foo4[bar]
+[foo3 [bar]]
+]
+
+[foo3 madagascar]
+
+[template foo5[x] zoom [x]]
+[template foo6[x] [x] zoom]
+
+[foo6[foo5 peanut]]
+
+[template kinda_weird[x y] [x] [y]]
+
+[kinda_weird exactly..xanadu]
+
+
+[/-------------------------------- space delimitted args ]
+
+[template simple1[a b] [a][b]]
+
+[simple1 w x]
+
+[template simple2[a b c d] [a][b][c][d]]
+
+[simple2 w x y z][simple2 w x y z trail]
+
+[/-------------------------------- John's templates ]
+
+[template code[x]
+ int main()
+ {
+ std::cout << ``[x]`` << std::endl;
+ }
+]
+
+[code "Hello\, World"]
+
+[template alpha '''&alpha;''']
+[template pow[a b] [a]'''<superscript>'''[b]'''</superscript>''' ]
+[template super[text]'''<superscript>'''[text]'''</superscript>''' ]
+
+[pow x 2]
+
+[pow [alpha] 2]
+
+x[super 2]
+
+[/-------------------------------- Some more ]
+
+[template banana got a banana?]
+[template plantation[bananarama] [bananarama]]
+
+[plantation [banana]]
+
+[/-------------------------------- Not a bug (there was a syntax error here) ]
+
+[template join1[a b] [b][a]]
+[template join2[a b] [a][b]]
+[template test[x] [join1 [join2 0 [x]]...0]]
+[test 0]
+
+[/-------------------------------- Mismatched template ]
+
+[template foo 1]
+[fool]
+
+[template blah 10]
+
+[endsect]
+
+[section Empty Templates]
+
+[template empty1]
+[template empty2 ]
+[template empty3 [/comment]]
+[template empty4 [/comment]
+
+]
+[template empty5
+]
+[template empty6
+
+]
+[template empty7
+[/comment]
+]
+[template empty8
+
+[/comment]
+]
+[template empty_arg1[x]]
+[template empty_arg2[x y]]
+
+[empty1]
+[empty2]
+[empty3]
+[empty4]
+[empty5]
+[empty6]
+[empty7]
+[empty8]
+[empty_arg1 1]
+[empty_arg2 1 2]
+
+[endsect]
+
+[/----------------------------------- Nested templates ]
+
+[section Nested Templates]
+
+[template block[content]
+
+Start block template.
+
+[content]
+
+End block template.
+]
+
+[template phrase[content] Start phrase template. [content] End phrase template.]
+
+Pre [block [block Hello!]] Post
+
+Pre [block [phrase Hello!]] Post
+
+Pre [phrase [block Hello!]] Post
+
+Pre [phrase [phrase Hello!]] Post
+
+[endsect]
+
+[/----------------------------------- Block Markup ]
+
+[section Block Markup]
+
+[template list
+* a
+* b]
+
+[template horizontal
+----]
+
+[template codeblock
+ int main() {}]
+
+[template paragraphs
+Paragraphs 1
+
+Paragraphs 2
+]
+
+[list][horizontal][codeblock][paragraphs]
+
+* [list]
+* [horizontal]
+* [codeblock]
+* [paragraphs]
+
+[endsect]
+
+[/----------------------------------- Escaped templates ]
+
+[section Escaped templates]
+
+[template raw_markup <thingbob>Not real boostbook</thingbob>]
+[template | <thingbob>Also not real boostbook</thingbob>]
+[template escaped1 [|] [`|]]
+[template escaped2 [x] [`x]]
+
+[`raw_markup]
+[`|]
+[escaped1 <thingbob>More fake boostbook</thingbob>]
+[escaped2 <thingbob>Final fake boostbook</thingbob>]
+
+[endsect]
diff --git a/src/boost/tools/quickbook/test/templates-1_4.gold b/src/boost/tools/quickbook/test/templates-1_4.gold
new file mode 100644
index 000000000..40c244369
--- /dev/null
+++ b/src/boost/tools/quickbook/test/templates-1_4.gold
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="template_1_4" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Template 1.4</title>
+ <para>
+ dynamic scoping
+ </para>
+ <para>
+ old
+ </para>
+ <para>
+ {1-2} {1-2} {1-2 3 4} {1 2-3 4} {1 2 3-4} {[1-2} {1..2-3} {1..2-3}
+ </para>
+ <para>
+ {[binary 1 2-3} 4]
+ </para>
+ <para>
+ {1-2-3} {1-2-3} {1-2-3 4} {1 2-3-4} {[1-2-3}
+ </para>
+ <section id="template_1_4.escaped_templates">
+ <title><link linkend="template_1_4.escaped_templates">Escaped templates</link></title>
+ <para>
+ <thingbob>Not real boostbook</thingbob> <thingbob>Also not real boostbook</thingbob>
+ <thingbob>More fake boostbook</thingbob> <thingbob>Final fake boostbook</thingbob>
+ </para>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/templates-1_4.gold-html b/src/boost/tools/quickbook/test/templates-1_4.gold-html
new file mode 100644
index 000000000..344d09eac
--- /dev/null
+++ b/src/boost/tools/quickbook/test/templates-1_4.gold-html
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Template 1.4
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#template_1_4.escaped_templates">Escaped templates</a>
+ </li>
+ </ul>
+ </div>
+ <p>
+ dynamic scoping
+ </p>
+ <p>
+ old
+ </p>
+ <p>
+ {1-2} {1-2} {1-2 3 4} {1 2-3 4} {1 2 3-4} {[1-2} {1..2-3} {1..2-3}
+ </p>
+ <p>
+ {[binary 1 2-3} 4]
+ </p>
+ <p>
+ {1-2-3} {1-2-3} {1-2-3 4} {1 2-3-4} {[1-2-3}
+ </p>
+ <div id="template_1_4.escaped_templates">
+ <h3>
+ Escaped templates
+ </h3>
+ <div id="template_1_4.escaped_templates">
+ <p>
+ Not real boostbook Also not real boostbook More fake boostbook Final fake
+ boostbook
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/templates-1_4.quickbook b/src/boost/tools/quickbook/test/templates-1_4.quickbook
new file mode 100644
index 000000000..3fb893748
--- /dev/null
+++ b/src/boost/tools/quickbook/test/templates-1_4.quickbook
@@ -0,0 +1,53 @@
+[article Template 1.4
+ [quickbook 1.4]
+]
+
+[/ 1.4 uses dynamic scoping ]
+
+[template x static scoping]
+[template foo1[] [x]]
+[template foo2[x] [foo1]]
+[foo2 dynamic scoping]
+
+[/ In 1.4 template arguments are scoped at the point they are used]
+
+[template y new]
+[template foo3[a y] [a]]
+[foo3 [y] old]
+
+[/ 1.4 template arguments]
+
+[template binary[x y] {[x]-[y]}]
+[binary 1..2] [/ {1-2} ]
+[binary 1 2] [/ {1-2} ]
+[binary 1..2 3 4] [/ {1-2 3 4} ]
+[binary 1 2..3 4] [/ {1 2-3 4} ]
+[binary 1 2 3..4] [/ {1 2 3-4} ]
+[binary [1..2] [/ {(1-2} but with a square bracket ]
+[binary 1.\.2..3] [/ {1..2-3} ]
+[binary 1.\.2 3] [/ {1..2-3} ]
+
+[binary [binary 1 2..3] 4] [/ {[binary 1 2-3} 4] ]
+
+[template ternary[x y z] {[x]-[y]-[z]}]
+[ternary 1..2..3] [/ {1-2-3} ]
+[ternary 1 2 3] [/ {1-2-3} ]
+[ternary 1..2 3 4] [/ {1-2-3 4} ]
+[ternary 1 2..3 4] [/ {1 2-3-4} ]
+[ternary [1..2..3] [/ {(1-2-3} (but with a square bracket) ]
+
+[/----------------------------------- Escaped templates ]
+
+[section Escaped templates]
+
+[template raw_markup <thingbob>Not real boostbook</thingbob>]
+[template | <thingbob>Also not real boostbook</thingbob>]
+[template escaped1 [|] [`|]]
+[template escaped2 [x] [`x]]
+
+[`raw_markup]
+[`|]
+[escaped1 <thingbob>More fake boostbook</thingbob>]
+[escaped2 <thingbob>Final fake boostbook</thingbob>]
+
+[endsect]
diff --git a/src/boost/tools/quickbook/test/templates-1_5.gold b/src/boost/tools/quickbook/test/templates-1_5.gold
new file mode 100644
index 000000000..9577f1a91
--- /dev/null
+++ b/src/boost/tools/quickbook/test/templates-1_5.gold
@@ -0,0 +1,239 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="template_1_5" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Template 1.5</title>
+ <section id="template_1_5.templates">
+ <title><link linkend="template_1_5.templates">Templates</link></title>
+ <para>
+ nullary_arg
+ </para>
+ <para>
+ foo baz
+ </para>
+ <para>
+ foo baz
+ </para>
+ <para>
+ This is a complete paragraph. kalamazoo kalamazoo kalamazoo kalamazoo kalamazoo
+ kalamazoo kalamazoo kalamazoo kalamazoo.... blah blah blah......
+ </para>
+ <para>
+ <hey>baz</hey>
+ </para>
+ <para>
+ This is a complete paragraph. madagascar madagascar madagascar madagascar madagascar
+ madagascar madagascar madagascar madagascar.... blah blah blah......
+ </para>
+ <para>
+ zoom peanut zoom
+ </para>
+ <para>
+ exactly xanadu
+ </para>
+ <para>
+ wx
+ </para>
+ <para>
+ wxyz wxyz trail
+ </para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> &quot;Hello, World&quot; <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ <para>
+ x<superscript>2</superscript>
+ </para>
+ <para>
+ &alpha;<superscript>2</superscript>
+ </para>
+ <para>
+ x<superscript>2</superscript>
+ </para>
+ <para>
+ got a banana?
+ </para>
+ <para>
+ .0 00
+ </para>
+ <para>
+ [fool]
+ </para>
+ </section>
+ <section id="template_1_5.empty_templates">
+ <title><link linkend="template_1_5.empty_templates">Empty Templates</link></title>
+ </section>
+ <section id="template_1_5.nested_templates">
+ <title><link linkend="template_1_5.nested_templates">Nested Templates</link></title>
+ <para>
+ Pre
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Hello!
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ Post
+ </para>
+ <para>
+ Pre
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Start phrase template. Hello! End phrase template.
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ Post
+ </para>
+ <para>
+ Pre
+ </para>
+ <para>
+ Start phrase template.
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Hello!
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ End phrase template.
+ </para>
+ <para>
+ Post
+ </para>
+ <para>
+ Pre Start phrase template. Start phrase template. Hello! End phrase template.
+ End phrase template. Post
+ </para>
+ </section>
+ <section id="template_1_5.block_markup">
+ <title><link linkend="template_1_5.block_markup">Block Markup</link></title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ a
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ b
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para/>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ <para>
+ Paragraphs 1
+ </para>
+ <para>
+ Paragraphs 2
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ a
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ b
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <para/>
+ </listitem>
+ <listitem>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ </listitem>
+ <listitem>
+ <simpara>
+ Paragraphs 1
+ </simpara>
+ <simpara>
+ Paragraphs 2
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="template_1_5.static_scoping">
+ <title><link linkend="template_1_5.static_scoping">Static Scoping</link></title>
+ <para>
+ static scoping
+ </para>
+ <para>
+ [a]
+ </para>
+ <para>
+ new
+ </para>
+ <para>
+ foo foo
+ </para>
+ </section>
+ <section id="template_1_5.template_arguments">
+ <title><link linkend="template_1_5.template_arguments">Template Arguments</link></title>
+ <para>
+ {1-2} {1-2} {1-2 3 4} {1 2-3 4} {1 2 3-4} {1..2-3} {1..2-3}
+ </para>
+ <para>
+ { {1 2-3}-4} { {1 2-3}-4} { {1-2 3}-4}
+ </para>
+ <para>
+ {[1-2] 3} {[1-2] 3} {[1-2}
+ </para>
+ <para>
+ {1-2-3} {1-2-3}
+ </para>
+ </section>
+ <section id="template_1_5.block_and_phrase_templates">
+ <title><link linkend="template_1_5.block_and_phrase_templates">Block and phrase
+ templates</link></title>
+ <para>
+ Some <emphasis role="bold">text</emphasis>
+ </para>
+ <para>
+ A &lt;emphasis&gt;paragraph&lt;/emphasis&gt;.
+ </para>
+ <para>
+ Some *text* A <emphasis>paragraph</emphasis>.
+ </para>
+ <para>
+ <index type="things"><title>Things</title></index>
+ </para>
+ </section>
+ <section id="template_1_5.escaped_templates">
+ <title><link linkend="template_1_5.escaped_templates">Escaped templates</link></title>
+ <para>
+ <thingbob>Not real boostbook</thingbob> <thingbob>Also not real boostbook</thingbob>
+ <thingbob>More fake boostbook</thingbob> <thingbob>Final fake boostbook</thingbob>
+ </para>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/templates-1_5.gold-html b/src/boost/tools/quickbook/test/templates-1_5.gold-html
new file mode 100644
index 000000000..f557f0ac2
--- /dev/null
+++ b/src/boost/tools/quickbook/test/templates-1_5.gold-html
@@ -0,0 +1,308 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Template 1.5
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#template_1_5.templates">Templates</a>
+ </li>
+ <li>
+ <a href="#template_1_5.empty_templates">Empty Templates</a>
+ </li>
+ <li>
+ <a href="#template_1_5.nested_templates">Nested Templates</a>
+ </li>
+ <li>
+ <a href="#template_1_5.block_markup">Block Markup</a>
+ </li>
+ <li>
+ <a href="#template_1_5.static_scoping">Static Scoping</a>
+ </li>
+ <li>
+ <a href="#template_1_5.template_arguments">Template Arguments</a>
+ </li>
+ <li>
+ <a href="#template_1_5.block_and_phrase_templates">Block and phrase templates</a>
+ </li>
+ <li>
+ <a href="#template_1_5.escaped_templates">Escaped templates</a>
+ </li>
+ </ul>
+ </div>
+ <div id="template_1_5.templates">
+ <h3>
+ Templates
+ </h3>
+ <div id="template_1_5.templates">
+ <p>
+ nullary_arg
+ </p>
+ <p>
+ foo baz
+ </p>
+ <p>
+ foo baz
+ </p>
+ <p>
+ This is a complete paragraph. kalamazoo kalamazoo kalamazoo kalamazoo kalamazoo
+ kalamazoo kalamazoo kalamazoo kalamazoo.... blah blah blah......
+ </p>
+ <p>
+ baz
+ </p>
+ <p>
+ This is a complete paragraph. madagascar madagascar madagascar madagascar
+ madagascar madagascar madagascar madagascar madagascar.... blah blah blah......
+ </p>
+ <p>
+ zoom peanut zoom
+ </p>
+ <p>
+ exactly xanadu
+ </p>
+ <p>
+ wx
+ </p>
+ <p>
+ wxyz wxyz trail
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> &quot;Hello, World&quot; <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+ <p>
+ x<sup>2</sup>
+ </p>
+ <p>
+ &alpha;<sup>2</sup>
+ </p>
+ <p>
+ x<sup>2</sup>
+ </p>
+ <p>
+ got a banana?
+ </p>
+ <p>
+ .0 00
+ </p>
+ <p>
+ [fool]
+ </p>
+ </div>
+ </div>
+ <div id="template_1_5.empty_templates">
+ <h3>
+ Empty Templates
+ </h3>
+ <div id="template_1_5.empty_templates">
+ </div>
+ </div>
+ <div id="template_1_5.nested_templates">
+ <h3>
+ Nested Templates
+ </h3>
+ <div id="template_1_5.nested_templates">
+ <p>
+ Pre
+ </p>
+ <p>
+ Start block template.
+ </p>
+ <p>
+ Start block template.
+ </p>
+ <p>
+ Hello!
+ </p>
+ <p>
+ End block template.
+ </p>
+ <p>
+ End block template.
+ </p>
+ <p>
+ Post
+ </p>
+ <p>
+ Pre
+ </p>
+ <p>
+ Start block template.
+ </p>
+ <p>
+ Start phrase template. Hello! End phrase template.
+ </p>
+ <p>
+ End block template.
+ </p>
+ <p>
+ Post
+ </p>
+ <p>
+ Pre
+ </p>
+ <p>
+ Start phrase template.
+ </p>
+ <p>
+ Start block template.
+ </p>
+ <p>
+ Hello!
+ </p>
+ <p>
+ End block template.
+ </p>
+ <p>
+ End phrase template.
+ </p>
+ <p>
+ Post
+ </p>
+ <p>
+ Pre Start phrase template. Start phrase template. Hello! End phrase template.
+ End phrase template. Post
+ </p>
+ </div>
+ </div>
+ <div id="template_1_5.block_markup">
+ <h3>
+ Block Markup
+ </h3>
+ <div id="template_1_5.block_markup">
+ <ul>
+ <li>
+ <div>
+ a
+ </div>
+ </li>
+ <li>
+ <div>
+ b
+ </div>
+ </li>
+ </ul>
+ <p>
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span></pre>
+ <p>
+ Paragraphs 1
+ </p>
+ <p>
+ Paragraphs 2
+ </p>
+ <ul>
+ <li>
+ <div>
+ <ul>
+ <li>
+ <div>
+ a
+ </div>
+ </li>
+ <li>
+ <div>
+ b
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <p>
+ </p>
+ </li>
+ <li>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span></pre>
+ </li>
+ <li>
+ <div>
+ Paragraphs 1
+ </div>
+ <div>
+ Paragraphs 2
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div id="template_1_5.static_scoping">
+ <h3>
+ Static Scoping
+ </h3>
+ <div id="template_1_5.static_scoping">
+ <p>
+ static scoping
+ </p>
+ <p>
+ [a]
+ </p>
+ <p>
+ new
+ </p>
+ <p>
+ foo foo
+ </p>
+ </div>
+ </div>
+ <div id="template_1_5.template_arguments">
+ <h3>
+ Template Arguments
+ </h3>
+ <div id="template_1_5.template_arguments">
+ <p>
+ {1-2} {1-2} {1-2 3 4} {1 2-3 4} {1 2 3-4} {1..2-3} {1..2-3}
+ </p>
+ <p>
+ { {1 2-3}-4} { {1 2-3}-4} { {1-2 3}-4}
+ </p>
+ <p>
+ {[1-2] 3} {[1-2] 3} {[1-2}
+ </p>
+ <p>
+ {1-2-3} {1-2-3}
+ </p>
+ </div>
+ </div>
+ <div id="template_1_5.block_and_phrase_templates">
+ <h3>
+ Block and phrase templates
+ </h3>
+ <div id="template_1_5.block_and_phrase_templates">
+ <p>
+ Some <span class="bold"><strong>text</strong></span>
+ </p>
+ <p>
+ A &lt;emphasis&gt;paragraph&lt;/emphasis&gt;.
+ </p>
+ <p>
+ Some *text* A <span class="emphasis"><em>paragraph</em></span>.
+ </p>
+ <p>
+ <h3>
+ Things
+ </h3>
+ </p>
+ </div>
+ </div>
+ <div id="template_1_5.escaped_templates">
+ <h3>
+ Escaped templates
+ </h3>
+ <div id="template_1_5.escaped_templates">
+ <p>
+ Not real boostbook Also not real boostbook More fake boostbook Final fake
+ boostbook
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/templates-1_5.quickbook b/src/boost/tools/quickbook/test/templates-1_5.quickbook
new file mode 100644
index 000000000..55ec031fd
--- /dev/null
+++ b/src/boost/tools/quickbook/test/templates-1_5.quickbook
@@ -0,0 +1,297 @@
+[article Template 1.5
+ [quickbook 1.5]
+]
+
+[section Templates]
+
+[/-------------------------------- nullary arg ]
+
+[template foo0 nullary_arg]
+
+[foo0]
+
+[/-------------------------------- unary arg, phrase syle ]
+
+[template foo1[bar] foo [bar]]
+
+[foo1 baz]
+
+[/-------------------------------- unary arg, block syle ]
+
+[template foo2[bar]
+foo [bar]
+]
+
+[foo2 baz]
+
+[template foo3[bar]
+This is a complete paragraph. [bar] [bar] [bar] [bar] [bar]
+[bar] [bar] [bar] [bar].... blah blah blah......
+]
+
+[foo3 kalamazoo]
+
+[/-------------------------------- unary arg, using punctuation ]
+
+[template ![bar] '''<hey>'''[bar]'''</hey>''']
+
+[!baz]
+
+[/-------------------------------- recursive templates ]
+
+[template foo4[bar]
+[foo3 [bar]]
+]
+
+[foo3 madagascar]
+
+[template foo5[x] zoom [x]]
+[template foo6[x] [x] zoom]
+
+[foo6[foo5 peanut]]
+
+[template kinda_weird[x y] [x] [y]]
+
+[kinda_weird exactly..xanadu]
+
+
+[/-------------------------------- space delimitted args ]
+
+[template simple1[a b] [a][b]]
+
+[simple1 w x]
+
+[template simple2[a b c d] [a][b][c][d]]
+
+[simple2 w x y z][simple2 w x y z trail]
+
+[/-------------------------------- John's templates ]
+
+[template code[x]
+ int main()
+ {
+ std::cout << ``[x]`` << std::endl;
+ }
+]
+
+[code "Hello\, World"]
+
+[template alpha '''&alpha;''']
+[template pow[a b] [a]'''<superscript>'''[b]'''</superscript>''' ]
+[template super[text]'''<superscript>'''[text]'''</superscript>''' ]
+
+[pow x 2]
+
+[pow [alpha] 2]
+
+x[super 2]
+
+[/-------------------------------- Some more ]
+
+[template banana got a banana?]
+[template plantation[bananarama] [bananarama]]
+
+[plantation [banana]]
+
+[/-------------------------------- Not a bug (there was a syntax error here) ]
+
+[template join1[a b] [b][a]]
+[template join2[a b] [a][b]]
+[template test[x] [join1 [join2 0 [x]]...0]]
+[test 0]
+
+[/-------------------------------- Mismatched template ]
+
+[template foo 1]
+[fool]
+
+[template blah 10]
+
+[endsect]
+
+[section Empty Templates]
+
+[template empty1]
+[template empty2 ]
+[template empty3 [/comment]]
+[template empty4 [/comment]
+
+]
+[template empty5
+]
+[template empty6
+
+]
+[template empty7
+[/comment]
+]
+[template empty8
+
+[/comment]
+]
+[template empty_arg1[x]]
+[template empty_arg2[x y]]
+
+[empty1]
+[empty2]
+[empty3]
+[empty4]
+[empty5]
+[empty6]
+[empty7]
+[empty8]
+[empty_arg1 1]
+[empty_arg2 1 2]
+
+[endsect]
+
+[/----------------------------------- Nested templates ]
+
+[section Nested Templates]
+
+[template block[content]
+
+Start block template.
+
+[content]
+
+End block template.
+]
+
+[template phrase[content] Start phrase template. [content] End phrase template.]
+
+Pre [block [block Hello!]] Post
+
+Pre [block [phrase Hello!]] Post
+
+Pre [phrase [block Hello!]] Post
+
+Pre [phrase [phrase Hello!]] Post
+
+[endsect]
+
+[/----------------------------------- Block Markup ]
+
+[section Block Markup]
+
+[template list
+* a
+* b]
+
+[template horizontal
+----]
+
+[template codeblock
+ int main() {}]
+
+[template paragraphs
+Paragraphs 1
+
+Paragraphs 2
+]
+
+[list][horizontal][codeblock][paragraphs]
+
+* [list]
+* [horizontal]
+* [codeblock]
+* [paragraphs]
+
+[endsect]
+
+[/----------------------------------- 1.5+ use static scoping ]
+
+[section Static Scoping]
+
+[template x static scoping]
+[template static_test1[] [x]]
+[template static_test2[x] [static_test1]]
+[static_test2 dynamic scoping]
+
+[/ This should be '[a]' because [a] isn't matched. ]
+[template test1[] [a]]
+[template test2[a] [test1]]
+[test2 1]
+
+[/ In 1.5 template arguments are scoped at the point they are defined]
+
+[template y new]
+[template static_test3[a y] [a]]
+[static_test3 [y] old]
+
+[/ From https://svn.boost.org/trac/boost/ticket/2034 ]
+
+[template same[x] [x]]
+[template echo[a b] [a] [b]]
+[template echo_twice[x] [echo [same [x]]..[same [x]]]]
+[echo_twice foo]
+
+[endsect]
+
+[/----------------------------------- 1.5+ template arguments ]
+
+[section Template Arguments]
+
+[template binary[x y] {[x]-[y]}]
+[binary 1..2] [/ {1-2} ]
+[binary 1 2] [/ {1-2} ]
+[binary 1..2 3 4] [/ {1-2 3 4} ]
+[binary 1 2..3 4] [/ {1 2-3 4} ]
+[binary 1 2 3..4] [/ {1 2 3-4} ]
+[binary 1.\.2..3] [/ {1..2-3} ]
+[binary 1.\.2 3] [/ {1..2-3} ]
+
+[binary [binary 1 2..3]..4] [/ { {1 2-3}-4} ]
+[binary [binary 1 2..3] 4] [/ { {1 2-3}-4} ]
+[binary [binary 1 2 3]..4] [/ { {1-2 3}-4} ]
+
+[binary \[1 2\] 3] [/ {[1-2] 3} ]
+[binary \[1..2\] 3] [/ {[1-2] 3} ]
+[binary \[1 2] [/ {(1-2} ]
+
+[template ternary[x y z] {[x]-[y]-[z]}]
+[ternary 1..2..3] [/ {1-2-3} ]
+[ternary 1 2 3] [/ {1-2-3} ]
+
+[endsect]
+
+[/----------------------------------- Block and phrases ]
+
+[section Block and phrase templates]
+
+[template phrase_template[] Some *text*]
+[template block_template[]
+
+A <emphasis>paragraph</emphasis>.
+]
+
+[phrase_template]
+[block_template]
+[`phrase_template]
+[`block_template]
+
+[/ Trailing newline shouldn't be included]
+
+[template named_index[type title]
+'''<index type="'''[type]'''"><title>'''[title]'''</title></index>'''
+]
+
+[named_index things Things]
+
+[endsect]
+
+[/----------------------------------- Escaped templates ]
+
+[section Escaped templates]
+
+[template raw_markup <thingbob>Not real boostbook</thingbob>]
+[template | <thingbob>Also not real boostbook</thingbob>]
+[template escaped1 [|] [`|]]
+[template escaped2 [x] [`x]]
+
+[`raw_markup]
+[`|]
+[escaped1 <thingbob>More fake boostbook</thingbob>]
+[escaped2 <thingbob>Final fake boostbook</thingbob>]
+
+[endsect]
diff --git a/src/boost/tools/quickbook/test/templates-1_6-fail1.quickbook b/src/boost/tools/quickbook/test/templates-1_6-fail1.quickbook
new file mode 100644
index 000000000..0fd039b1e
--- /dev/null
+++ b/src/boost/tools/quickbook/test/templates-1_6-fail1.quickbook
@@ -0,0 +1,8 @@
+[article Template 1.6 fail 1
+ [quickbook 1.6]
+]
+
+[/ I've removed support for escaping punctuation templates in 1.6. ]
+
+[template ~ body]
+[`~]
diff --git a/src/boost/tools/quickbook/test/templates-1_6.gold b/src/boost/tools/quickbook/test/templates-1_6.gold
new file mode 100644
index 000000000..b37604e75
--- /dev/null
+++ b/src/boost/tools/quickbook/test/templates-1_6.gold
@@ -0,0 +1,257 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="template_1_6" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Template 1.6</title>
+ <section id="template_1_6.templates">
+ <title><link linkend="template_1_6.templates">Templates</link></title>
+ <para>
+ nullary_arg
+ </para>
+ <para>
+ foo baz
+ </para>
+ <para>
+ foo baz
+ </para>
+ <para>
+ This is a complete paragraph. kalamazoo kalamazoo kalamazoo kalamazoo kalamazoo
+ kalamazoo kalamazoo kalamazoo kalamazoo.... blah blah blah......
+ </para>
+ <para>
+ <hey>baz</hey>
+ </para>
+ <para>
+ This is a complete paragraph. madagascar madagascar madagascar madagascar madagascar
+ madagascar madagascar madagascar madagascar.... blah blah blah......
+ </para>
+ <para>
+ zoom peanut zoom
+ </para>
+ <para>
+ exactly xanadu
+ </para>
+ <para>
+ wx
+ </para>
+ <para>
+ wxyz wxyz trail
+ </para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> &quot;Hello, World&quot; <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ <para>
+ x<superscript>2</superscript>
+ </para>
+ <para>
+ &alpha;<superscript>2</superscript>
+ </para>
+ <para>
+ x<superscript>2</superscript>
+ </para>
+ <para>
+ got a banana?
+ </para>
+ <para>
+ .0 00
+ </para>
+ <para>
+ [fool]
+ </para>
+ </section>
+ <section id="template_1_6.empty_templates">
+ <title><link linkend="template_1_6.empty_templates">Empty Templates</link></title>
+ </section>
+ <section id="template_1_6.nested_templates">
+ <title><link linkend="template_1_6.nested_templates">Nested Templates</link></title>
+ <para>
+ Pre
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Hello!
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ Post
+ </para>
+ <para>
+ Pre
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Start phrase template. Hello! End phrase template.
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ Post
+ </para>
+ <para>
+ Pre
+ </para>
+ <para>
+ Start phrase template.
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Hello!
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ End phrase template.
+ </para>
+ <para>
+ Post
+ </para>
+ <para>
+ Pre Start phrase template. Start phrase template. Hello! End phrase template.
+ End phrase template. Post
+ </para>
+ </section>
+ <section id="template_1_6.block_markup">
+ <title><link linkend="template_1_6.block_markup">Block Markup</link></title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ a
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ b
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para/>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ <para>
+ Paragraphs 1
+ </para>
+ <para>
+ Paragraphs 2
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ a
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ b
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <para/>
+ </listitem>
+ <listitem>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ </listitem>
+ <listitem>
+ <simpara>
+ Paragraphs 1
+ </simpara>
+ <simpara>
+ Paragraphs 2
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="template_1_6.static_scoping">
+ <title><link linkend="template_1_6.static_scoping">Static Scoping</link></title>
+ <para>
+ static scoping
+ </para>
+ <para>
+ [a]
+ </para>
+ <para>
+ new
+ </para>
+ <para>
+ foo foo
+ </para>
+ </section>
+ <section id="template_1_6.template_arguments">
+ <title><link linkend="template_1_6.template_arguments">Template Arguments</link></title>
+ <para>
+ {1-2} {1-2} {1-2 3 4} {1 2-3 4} {1 2 3-4} {1..2-3} {1..2-3}
+ </para>
+ <para>
+ { {1 2-3}-4} { {1 2-3}-4} { {1-2 3}-4}
+ </para>
+ <para>
+ {[1-2] 3} {[1-2] 3} {[1-2}
+ </para>
+ <para>
+ {1-2-3} {1-2-3}
+ </para>
+ </section>
+ <section id="template_1_6.block_and_phrase_templates">
+ <title><link linkend="template_1_6.block_and_phrase_templates">Block and phrase
+ templates</link></title>
+ <para>
+ Some <emphasis role="bold">text</emphasis>
+ </para>
+ <para>
+ A &lt;emphasis&gt;paragraph&lt;/emphasis&gt;.
+ </para>
+ <para>
+ Some *text* A <emphasis>paragraph</emphasis>.
+ </para>
+ <para>
+ <index type="things"><title>Things</title></index>
+ </para>
+ </section>
+ <section id="template_1_6.template_body">
+ <title><link linkend="template_1_6.template_body">Skipping the template body
+ correctly</link></title>
+ <para>
+ <emphasis>Argument</emphasis>
+ </para>
+ <orderedlist>
+ <listitem>
+<programlisting><phrase role="identifier">code</phrase></programlisting>
+ </listitem>
+ </orderedlist>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ <code><phrase role="identifier">code</phrase></code>
+ </simpara>
+ </listitem>
+ </orderedlist>
+ </section>
+ <section id="template_1_6.escaped_templates">
+ <title><link linkend="template_1_6.escaped_templates">Escaped templates</link></title>
+ <para>
+ <thingbob>Not real boostbook</thingbob> <thingbob>More fake boostbook</thingbob>
+ </para>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/templates-1_6.gold-html b/src/boost/tools/quickbook/test/templates-1_6.gold-html
new file mode 100644
index 000000000..77d55d0a0
--- /dev/null
+++ b/src/boost/tools/quickbook/test/templates-1_6.gold-html
@@ -0,0 +1,332 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Template 1.6
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#template_1_6.templates">Templates</a>
+ </li>
+ <li>
+ <a href="#template_1_6.empty_templates">Empty Templates</a>
+ </li>
+ <li>
+ <a href="#template_1_6.nested_templates">Nested Templates</a>
+ </li>
+ <li>
+ <a href="#template_1_6.block_markup">Block Markup</a>
+ </li>
+ <li>
+ <a href="#template_1_6.static_scoping">Static Scoping</a>
+ </li>
+ <li>
+ <a href="#template_1_6.template_arguments">Template Arguments</a>
+ </li>
+ <li>
+ <a href="#template_1_6.block_and_phrase_templates">Block and phrase templates</a>
+ </li>
+ <li>
+ <a href="#template_1_6.template_body">Skipping the template body correctly</a>
+ </li>
+ <li>
+ <a href="#template_1_6.escaped_templates">Escaped templates</a>
+ </li>
+ </ul>
+ </div>
+ <div id="template_1_6.templates">
+ <h3>
+ Templates
+ </h3>
+ <div id="template_1_6.templates">
+ <p>
+ nullary_arg
+ </p>
+ <p>
+ foo baz
+ </p>
+ <p>
+ foo baz
+ </p>
+ <p>
+ This is a complete paragraph. kalamazoo kalamazoo kalamazoo kalamazoo kalamazoo
+ kalamazoo kalamazoo kalamazoo kalamazoo.... blah blah blah......
+ </p>
+ <p>
+ baz
+ </p>
+ <p>
+ This is a complete paragraph. madagascar madagascar madagascar madagascar
+ madagascar madagascar madagascar madagascar madagascar.... blah blah blah......
+ </p>
+ <p>
+ zoom peanut zoom
+ </p>
+ <p>
+ exactly xanadu
+ </p>
+ <p>
+ wx
+ </p>
+ <p>
+ wxyz wxyz trail
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> &quot;Hello, World&quot; <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+ <p>
+ x<sup>2</sup>
+ </p>
+ <p>
+ &alpha;<sup>2</sup>
+ </p>
+ <p>
+ x<sup>2</sup>
+ </p>
+ <p>
+ got a banana?
+ </p>
+ <p>
+ .0 00
+ </p>
+ <p>
+ [fool]
+ </p>
+ </div>
+ </div>
+ <div id="template_1_6.empty_templates">
+ <h3>
+ Empty Templates
+ </h3>
+ <div id="template_1_6.empty_templates">
+ </div>
+ </div>
+ <div id="template_1_6.nested_templates">
+ <h3>
+ Nested Templates
+ </h3>
+ <div id="template_1_6.nested_templates">
+ <p>
+ Pre
+ </p>
+ <p>
+ Start block template.
+ </p>
+ <p>
+ Start block template.
+ </p>
+ <p>
+ Hello!
+ </p>
+ <p>
+ End block template.
+ </p>
+ <p>
+ End block template.
+ </p>
+ <p>
+ Post
+ </p>
+ <p>
+ Pre
+ </p>
+ <p>
+ Start block template.
+ </p>
+ <p>
+ Start phrase template. Hello! End phrase template.
+ </p>
+ <p>
+ End block template.
+ </p>
+ <p>
+ Post
+ </p>
+ <p>
+ Pre
+ </p>
+ <p>
+ Start phrase template.
+ </p>
+ <p>
+ Start block template.
+ </p>
+ <p>
+ Hello!
+ </p>
+ <p>
+ End block template.
+ </p>
+ <p>
+ End phrase template.
+ </p>
+ <p>
+ Post
+ </p>
+ <p>
+ Pre Start phrase template. Start phrase template. Hello! End phrase template.
+ End phrase template. Post
+ </p>
+ </div>
+ </div>
+ <div id="template_1_6.block_markup">
+ <h3>
+ Block Markup
+ </h3>
+ <div id="template_1_6.block_markup">
+ <ul>
+ <li>
+ <div>
+ a
+ </div>
+ </li>
+ <li>
+ <div>
+ b
+ </div>
+ </li>
+ </ul>
+ <p>
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span></pre>
+ <p>
+ Paragraphs 1
+ </p>
+ <p>
+ Paragraphs 2
+ </p>
+ <ul>
+ <li>
+ <div>
+ <ul>
+ <li>
+ <div>
+ a
+ </div>
+ </li>
+ <li>
+ <div>
+ b
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <p>
+ </p>
+ </li>
+ <li>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span></pre>
+ </li>
+ <li>
+ <div>
+ Paragraphs 1
+ </div>
+ <div>
+ Paragraphs 2
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div id="template_1_6.static_scoping">
+ <h3>
+ Static Scoping
+ </h3>
+ <div id="template_1_6.static_scoping">
+ <p>
+ static scoping
+ </p>
+ <p>
+ [a]
+ </p>
+ <p>
+ new
+ </p>
+ <p>
+ foo foo
+ </p>
+ </div>
+ </div>
+ <div id="template_1_6.template_arguments">
+ <h3>
+ Template Arguments
+ </h3>
+ <div id="template_1_6.template_arguments">
+ <p>
+ {1-2} {1-2} {1-2 3 4} {1 2-3 4} {1 2 3-4} {1..2-3} {1..2-3}
+ </p>
+ <p>
+ { {1 2-3}-4} { {1 2-3}-4} { {1-2 3}-4}
+ </p>
+ <p>
+ {[1-2] 3} {[1-2] 3} {[1-2}
+ </p>
+ <p>
+ {1-2-3} {1-2-3}
+ </p>
+ </div>
+ </div>
+ <div id="template_1_6.block_and_phrase_templates">
+ <h3>
+ Block and phrase templates
+ </h3>
+ <div id="template_1_6.block_and_phrase_templates">
+ <p>
+ Some <span class="bold"><strong>text</strong></span>
+ </p>
+ <p>
+ A &lt;emphasis&gt;paragraph&lt;/emphasis&gt;.
+ </p>
+ <p>
+ Some *text* A <span class="emphasis"><em>paragraph</em></span>.
+ </p>
+ <p>
+ <h3>
+ Things
+ </h3>
+ </p>
+ </div>
+ </div>
+ <div id="template_1_6.template_body">
+ <h3>
+ Skipping the template body correctly
+ </h3>
+ <div id="template_1_6.template_body">
+ <p>
+ <span class="emphasis"><em>Argument</em></span>
+ </p>
+ <ol>
+ <li>
+<pre class="programlisting"><span class="identifier">code</span></pre>
+ </li>
+ </ol>
+ <ol>
+ <li>
+ <div>
+ <code><span class="identifier">code</span></code>
+ </div>
+ </li>
+ </ol>
+ </div>
+ </div>
+ <div id="template_1_6.escaped_templates">
+ <h3>
+ Escaped templates
+ </h3>
+ <div id="template_1_6.escaped_templates">
+ <p>
+ Not real boostbook More fake boostbook
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/templates-1_6.quickbook b/src/boost/tools/quickbook/test/templates-1_6.quickbook
new file mode 100644
index 000000000..627bd7fd8
--- /dev/null
+++ b/src/boost/tools/quickbook/test/templates-1_6.quickbook
@@ -0,0 +1,313 @@
+[article Template 1.6
+ [quickbook 1.6]
+]
+
+[section Templates]
+
+[/-------------------------------- nullary arg ]
+
+[template foo0 nullary_arg]
+
+[foo0]
+
+[/-------------------------------- unary arg, phrase syle ]
+
+[template foo1[bar] foo [bar]]
+
+[foo1 baz]
+
+[/-------------------------------- unary arg, block syle ]
+
+[template foo2[bar]
+foo [bar]
+]
+
+[foo2 baz]
+
+[template foo3[bar]
+This is a complete paragraph. [bar] [bar] [bar] [bar] [bar]
+[bar] [bar] [bar] [bar].... blah blah blah......
+]
+
+[foo3 kalamazoo]
+
+[/-------------------------------- unary arg, using punctuation ]
+
+[template ![bar] '''<hey>'''[bar]'''</hey>''']
+
+[!baz]
+
+[/-------------------------------- recursive templates ]
+
+[template foo4[bar]
+[foo3 [bar]]
+]
+
+[foo3 madagascar]
+
+[template foo5[x] zoom [x]]
+[template foo6[x] [x] zoom]
+
+[foo6[foo5 peanut]]
+
+[template kinda_weird[x y] [x] [y]]
+
+[kinda_weird exactly..xanadu]
+
+
+[/-------------------------------- space delimitted args ]
+
+[template simple1[a b] [a][b]]
+
+[simple1 w x]
+
+[template simple2[a b c d] [a][b][c][d]]
+
+[simple2 w x y z][simple2 w x y z trail]
+
+[/-------------------------------- John's templates ]
+
+[template code[x]
+ int main()
+ {
+ std::cout << ``[x]`` << std::endl;
+ }
+]
+
+[code "Hello\, World"]
+
+[template alpha '''&alpha;''']
+[template pow[a b] [a]'''<superscript>'''[b]'''</superscript>''' ]
+[template super[text]'''<superscript>'''[text]'''</superscript>''' ]
+
+[pow x 2]
+
+[pow [alpha] 2]
+
+x[super 2]
+
+[/-------------------------------- Some more ]
+
+[template banana got a banana?]
+[template plantation[bananarama] [bananarama]]
+
+[plantation [banana]]
+
+[/-------------------------------- Not a bug (there was a syntax error here) ]
+
+[template join1[a b] [b][a]]
+[template join2[a b] [a][b]]
+[template test[x] [join1 [join2 0 [x]]...0]]
+[test 0]
+
+[/-------------------------------- Mismatched template ]
+
+[template foo 1]
+[fool]
+
+[template blah 10]
+
+[endsect]
+
+[section Empty Templates]
+
+[template empty1]
+[template empty2 ]
+[template empty3 [/comment]]
+[template empty4 [/comment]
+
+]
+[template empty5
+]
+[template empty6
+
+]
+[template empty7
+[/comment]
+]
+[template empty8
+
+[/comment]
+]
+[template empty_arg1[x]]
+[template empty_arg2[x y]]
+
+[empty1]
+[empty2]
+[empty3]
+[empty4]
+[empty5]
+[empty6]
+[empty7]
+[empty8]
+[empty_arg1 1]
+[empty_arg2 1 2]
+
+[endsect]
+
+[/----------------------------------- Nested templates ]
+
+[section Nested Templates]
+
+[template block_foo[content]
+
+Start block template.
+
+[content]
+
+End block template.
+]
+
+[template phrase_foo[content] Start phrase template. [content] End phrase template.]
+
+Pre [block_foo [block_foo Hello!]] Post
+
+Pre [block_foo [phrase_foo Hello!]] Post
+
+Pre [phrase_foo [block_foo Hello!]] Post
+
+Pre [phrase_foo [phrase_foo Hello!]] Post
+
+[endsect]
+
+[/----------------------------------- Block Markup ]
+
+[section Block Markup]
+
+[template list
+* a
+* b]
+
+[template horizontal
+----]
+
+[template codeblock
+ int main() {}]
+
+[template paragraphs
+Paragraphs 1
+
+Paragraphs 2
+]
+
+[list][horizontal][codeblock][paragraphs]
+
+* [list]
+* [horizontal]
+* [codeblock]
+* [paragraphs]
+
+[endsect]
+
+[/----------------------------------- 1.5+ use static scoping ]
+
+[section Static Scoping]
+
+[template x static scoping]
+[template static_test1[] [x]]
+[template static_test2[x] [static_test1]]
+[static_test2 dynamic scoping]
+
+[/ This should be '[a]' because [a] isn't matched. ]
+[template test1[] [a]]
+[template test2[a] [test1]]
+[test2 1]
+
+[/ In 1.5 template arguments are scoped at the point they are defined]
+
+[template y new]
+[template static_test3[a y] [a]]
+[static_test3 [y] old]
+
+[/ From https://svn.boost.org/trac/boost/ticket/2034 ]
+
+[template same[x] [x]]
+[template echo[a b] [a] [b]]
+[template echo_twice[x] [echo [same [x]]..[same [x]]]]
+[echo_twice foo]
+
+[endsect]
+
+[/----------------------------------- 1.5+ template arguments ]
+
+[section Template Arguments]
+
+[template binary[x y] {[x]-[y]}]
+[binary 1..2] [/ {1-2} ]
+[binary 1 2] [/ {1-2} ]
+[binary 1..2 3 4] [/ {1-2 3 4} ]
+[binary 1 2..3 4] [/ {1 2-3 4} ]
+[binary 1 2 3..4] [/ {1 2 3-4} ]
+[binary 1.\.2..3] [/ {1..2-3} ]
+[binary 1.\.2 3] [/ {1..2-3} ]
+
+[binary [binary 1 2..3]..4] [/ { {1 2-3}-4} ]
+[binary [binary 1 2..3] 4] [/ { {1 2-3}-4} ]
+[binary [binary 1 2 3]..4] [/ { {1-2 3}-4} ]
+
+[binary \[1 2\] 3] [/ {[1-2] 3} ]
+[binary \[1..2\] 3] [/ {[1-2] 3} ]
+[binary \[1 2] [/ {(1-2} ]
+
+[template ternary[x y z] {[x]-[y]-[z]}]
+[ternary 1..2..3] [/ {1-2-3} ]
+[ternary 1 2 3] [/ {1-2-3} ]
+
+[endsect]
+
+[/----------------------------------- Block and phrases ]
+
+[section Block and phrase templates]
+
+[template phrase_template[] Some *text*]
+[template block_template[]
+
+A <emphasis>paragraph</emphasis>.
+]
+
+[phrase_template]
+[block_template]
+[`phrase_template]
+[`block_template]
+
+[/ Trailing newline shouldn't be included]
+
+[template named_index[type title]
+'''<index type="'''[type]'''"><title>'''[title]'''</title></index>'''
+]
+
+[named_index things Things]
+
+[endsect]
+
+[/-------------------------------- Skipping template body ]
+
+[section:template_body Skipping the template body correctly]
+
+[template args1[x] [`x]]
+[template args2[]
+[ordered_list [``code``]]
+]
+[/ Due to a bug in the template parser need to stop the parser
+ thinking that the code is an escaped template. ]
+[template args3[]
+[ordered_list [\ `code`]]
+]
+
+[args1 <emphasis>Argument</emphasis>]
+[args2]
+[args3]
+
+[endsect]
+
+[/----------------------------------- Escaped templates ]
+
+[section Escaped templates]
+
+[template raw_markup <thingbob>Not real boostbook</thingbob>]
+[template escaped1 [x] [`x]]
+
+[`raw_markup]
+[escaped1 <thingbob>More fake boostbook</thingbob>]
+
+[endsect]
diff --git a/src/boost/tools/quickbook/test/templates-1_7-fail1.quickbook b/src/boost/tools/quickbook/test/templates-1_7-fail1.quickbook
new file mode 100644
index 000000000..0618bebb9
--- /dev/null
+++ b/src/boost/tools/quickbook/test/templates-1_7-fail1.quickbook
@@ -0,0 +1,12 @@
+[article Template 1.7 fail
+[quickbook 1.7]
+]
+
+[/ This should fail because it's a phrase template containing a paragraph
+ separator. ]
+
+[template fail[] Phrase content.
+
+Paragraph content.]
+
+[fail]
diff --git a/src/boost/tools/quickbook/test/templates-1_7-fail2.quickbook b/src/boost/tools/quickbook/test/templates-1_7-fail2.quickbook
new file mode 100644
index 000000000..548884b16
--- /dev/null
+++ b/src/boost/tools/quickbook/test/templates-1_7-fail2.quickbook
@@ -0,0 +1,11 @@
+[article Template 1.7 fail
+[quickbook 1.7]
+]
+
+[/ This should fail because it's a block template called from an attribute ]
+
+[template fail[]
+
+Block template.]
+
+[link this-should-[fail]]
diff --git a/src/boost/tools/quickbook/test/templates-1_7.gold b/src/boost/tools/quickbook/test/templates-1_7.gold
new file mode 100644
index 000000000..c7d4c64e0
--- /dev/null
+++ b/src/boost/tools/quickbook/test/templates-1_7.gold
@@ -0,0 +1,302 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="template_1_7" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Template 1.7</title>
+ <section id="template_1_7.templates">
+ <title><link linkend="template_1_7.templates">Templates</link></title>
+ <para>
+ nullary_arg
+ </para>
+ <para>
+ foo baz
+ </para>
+ <para>
+ foo baz
+ </para>
+ <para>
+ This is a complete paragraph. kalamazoo kalamazoo kalamazoo kalamazoo kalamazoo
+ kalamazoo kalamazoo kalamazoo kalamazoo.... blah blah blah......
+ </para>
+ <para>
+ <hey>baz</hey>
+ </para>
+ <para>
+ This is a complete paragraph. madagascar madagascar madagascar madagascar madagascar
+ madagascar madagascar madagascar madagascar.... blah blah blah......
+ </para>
+ <para>
+ zoom peanut zoom
+ </para>
+ <para>
+ exactly xanadu
+ </para>
+ <para>
+ wx
+ </para>
+ <para>
+ wxyz wxyz trail
+ </para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
+<phrase role="special">{</phrase>
+ <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> &quot;Hello, World&quot; <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
+ <para>
+ x<superscript>2</superscript>
+ </para>
+ <para>
+ &alpha;<superscript>2</superscript>
+ </para>
+ <para>
+ x<superscript>2</superscript>
+ </para>
+ <para>
+ got a banana?
+ </para>
+ <para>
+ .0 00
+ </para>
+ <para>
+ [fool]
+ </para>
+ </section>
+ <section id="template_1_7.empty_templates">
+ <title><link linkend="template_1_7.empty_templates">Empty Templates</link></title>
+ </section>
+ <section id="template_1_7.nested_templates">
+ <title><link linkend="template_1_7.nested_templates">Nested Templates</link></title>
+ <para>
+ Pre
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Hello!
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ Post
+ </para>
+ <para>
+ Pre
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Start phrase template. Hello! End phrase template.
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ Post
+ </para>
+ <para>
+ Pre Start phrase template.
+ </para>
+ <para>
+ Start block template.
+ </para>
+ <para>
+ Hello!
+ </para>
+ <para>
+ End block template.
+ </para>
+ <para>
+ End phrase template. Post
+ </para>
+ <para>
+ Pre Start phrase template. Start phrase template. Hello! End phrase template.
+ End phrase template. Post
+ </para>
+ </section>
+ <section id="template_1_7.block_markup">
+ <title><link linkend="template_1_7.block_markup">Block Markup</link></title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ a
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ b
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para/>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ <para>
+ Paragraphs 1
+ </para>
+ <para>
+ Paragraphs 2
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ a
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ b
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <para/>
+ </listitem>
+ <listitem>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{}</phrase></programlisting>
+ </listitem>
+ <listitem>
+ <simpara>
+ Paragraphs 1
+ </simpara>
+ <simpara>
+ Paragraphs 2
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+ <section id="template_1_7.static_scoping">
+ <title><link linkend="template_1_7.static_scoping">Static Scoping</link></title>
+ <para>
+ static scoping
+ </para>
+ <para>
+ [a]
+ </para>
+ <para>
+ new
+ </para>
+ <para>
+ foo foo
+ </para>
+ </section>
+ <section id="template_1_7.template_arguments">
+ <title><link linkend="template_1_7.template_arguments">Template Arguments</link></title>
+ <para>
+ {1-2} {1-2} {1-2 3 4} {1 2-3 4} {1 2 3-4} {1..2-3} {1..2-3}
+ </para>
+ <para>
+ { {1 2-3}-4} { {1 2-3}-4} { {1-2 3}-4}
+ </para>
+ <para>
+ {[1-2] 3} {[1-2] 3} {[1-2}
+ </para>
+ <para>
+ {1-2-3} {1-2-3}
+ </para>
+ </section>
+ <section id="template_1_7.block_and_phrase_templates">
+ <title><link linkend="template_1_7.block_and_phrase_templates">Block and phrase
+ templates</link></title>
+ <para>
+ Some <emphasis role="bold">text</emphasis>
+ </para>
+ <para>
+ A &lt;emphasis&gt;paragraph&lt;/emphasis&gt;.
+ </para>
+ <para>
+ Some *text* A <emphasis>paragraph</emphasis>.
+ </para>
+ <para>
+ <index type="things"><title>Things</title></index>
+ </para>
+ <informaltable frame="all">
+ <tgroup cols="0">
+ <tbody>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <informaltable frame="all">
+ <tgroup cols="0">
+ <tbody>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ Text2 afterwards. Text3 before.
+ </para>
+ <informaltable frame="all">
+ <tgroup cols="0">
+ <tbody>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ Text4 before.
+ </para>
+ <informaltable frame="all">
+ <tgroup cols="0">
+ <tbody>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ Text4 afterwards.
+ </para>
+ <informaltable frame="all">
+ <tgroup cols="0">
+ <tbody>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ * Not a list.
+ </para>
+ <informaltable frame="all">
+ <tgroup cols="0">
+ <tbody>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ <para>
+ * Not a list.
+ </para>
+ </section>
+ <section id="template_1_7.template_body">
+ <title><link linkend="template_1_7.template_body">Skipping the template body
+ correctly</link></title>
+ <para>
+ <emphasis>Argument</emphasis>
+ </para>
+ <orderedlist>
+ <listitem>
+<programlisting><phrase role="identifier">code</phrase></programlisting>
+ </listitem>
+ </orderedlist>
+ <orderedlist>
+ <listitem>
+ <simpara>
+ <code><phrase role="identifier">code</phrase></code>
+ </simpara>
+ </listitem>
+ </orderedlist>
+ </section>
+ <section id="template_1_7.escaped_templates">
+ <title><link linkend="template_1_7.escaped_templates">Escaped templates</link></title>
+ <para>
+ <thingbob>Not real boostbook</thingbob> <thingbob>More fake boostbook</thingbob>
+ </para>
+ </section>
+</article>
diff --git a/src/boost/tools/quickbook/test/templates-1_7.gold-html b/src/boost/tools/quickbook/test/templates-1_7.gold-html
new file mode 100644
index 000000000..b79546dd9
--- /dev/null
+++ b/src/boost/tools/quickbook/test/templates-1_7.gold-html
@@ -0,0 +1,377 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Template 1.7
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#template_1_7.templates">Templates</a>
+ </li>
+ <li>
+ <a href="#template_1_7.empty_templates">Empty Templates</a>
+ </li>
+ <li>
+ <a href="#template_1_7.nested_templates">Nested Templates</a>
+ </li>
+ <li>
+ <a href="#template_1_7.block_markup">Block Markup</a>
+ </li>
+ <li>
+ <a href="#template_1_7.static_scoping">Static Scoping</a>
+ </li>
+ <li>
+ <a href="#template_1_7.template_arguments">Template Arguments</a>
+ </li>
+ <li>
+ <a href="#template_1_7.block_and_phrase_templates">Block and phrase templates</a>
+ </li>
+ <li>
+ <a href="#template_1_7.template_body">Skipping the template body correctly</a>
+ </li>
+ <li>
+ <a href="#template_1_7.escaped_templates">Escaped templates</a>
+ </li>
+ </ul>
+ </div>
+ <div id="template_1_7.templates">
+ <h3>
+ Templates
+ </h3>
+ <div id="template_1_7.templates">
+ <p>
+ nullary_arg
+ </p>
+ <p>
+ foo baz
+ </p>
+ <p>
+ foo baz
+ </p>
+ <p>
+ This is a complete paragraph. kalamazoo kalamazoo kalamazoo kalamazoo kalamazoo
+ kalamazoo kalamazoo kalamazoo kalamazoo.... blah blah blah......
+ </p>
+ <p>
+ baz
+ </p>
+ <p>
+ This is a complete paragraph. madagascar madagascar madagascar madagascar
+ madagascar madagascar madagascar madagascar madagascar.... blah blah blah......
+ </p>
+ <p>
+ zoom peanut zoom
+ </p>
+ <p>
+ exactly xanadu
+ </p>
+ <p>
+ wx
+ </p>
+ <p>
+ wxyz wxyz trail
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span>
+<span class="special">{</span>
+ <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> &quot;Hello, World&quot; <span class="special">&lt;&lt;</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span>
+<span class="special">}</span>
+</pre>
+ <p>
+ x<sup>2</sup>
+ </p>
+ <p>
+ &alpha;<sup>2</sup>
+ </p>
+ <p>
+ x<sup>2</sup>
+ </p>
+ <p>
+ got a banana?
+ </p>
+ <p>
+ .0 00
+ </p>
+ <p>
+ [fool]
+ </p>
+ </div>
+ </div>
+ <div id="template_1_7.empty_templates">
+ <h3>
+ Empty Templates
+ </h3>
+ <div id="template_1_7.empty_templates">
+ </div>
+ </div>
+ <div id="template_1_7.nested_templates">
+ <h3>
+ Nested Templates
+ </h3>
+ <div id="template_1_7.nested_templates">
+ <p>
+ Pre
+ </p>
+ <p>
+ Start block template.
+ </p>
+ <p>
+ Start block template.
+ </p>
+ <p>
+ Hello!
+ </p>
+ <p>
+ End block template.
+ </p>
+ <p>
+ End block template.
+ </p>
+ <p>
+ Post
+ </p>
+ <p>
+ Pre
+ </p>
+ <p>
+ Start block template.
+ </p>
+ <p>
+ Start phrase template. Hello! End phrase template.
+ </p>
+ <p>
+ End block template.
+ </p>
+ <p>
+ Post
+ </p>
+ <p>
+ Pre Start phrase template.
+ </p>
+ <p>
+ Start block template.
+ </p>
+ <p>
+ Hello!
+ </p>
+ <p>
+ End block template.
+ </p>
+ <p>
+ End phrase template. Post
+ </p>
+ <p>
+ Pre Start phrase template. Start phrase template. Hello! End phrase template.
+ End phrase template. Post
+ </p>
+ </div>
+ </div>
+ <div id="template_1_7.block_markup">
+ <h3>
+ Block Markup
+ </h3>
+ <div id="template_1_7.block_markup">
+ <ul>
+ <li>
+ <div>
+ a
+ </div>
+ </li>
+ <li>
+ <div>
+ b
+ </div>
+ </li>
+ </ul>
+ <p>
+ </p>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span></pre>
+ <p>
+ Paragraphs 1
+ </p>
+ <p>
+ Paragraphs 2
+ </p>
+ <ul>
+ <li>
+ <div>
+ <ul>
+ <li>
+ <div>
+ a
+ </div>
+ </li>
+ <li>
+ <div>
+ b
+ </div>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <li>
+ <p>
+ </p>
+ </li>
+ <li>
+<pre class="programlisting"><span class="keyword">int</span> <span class="identifier">main</span><span class="special">()</span> <span class="special">{}</span></pre>
+ </li>
+ <li>
+ <div>
+ Paragraphs 1
+ </div>
+ <div>
+ Paragraphs 2
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div id="template_1_7.static_scoping">
+ <h3>
+ Static Scoping
+ </h3>
+ <div id="template_1_7.static_scoping">
+ <p>
+ static scoping
+ </p>
+ <p>
+ [a]
+ </p>
+ <p>
+ new
+ </p>
+ <p>
+ foo foo
+ </p>
+ </div>
+ </div>
+ <div id="template_1_7.template_arguments">
+ <h3>
+ Template Arguments
+ </h3>
+ <div id="template_1_7.template_arguments">
+ <p>
+ {1-2} {1-2} {1-2 3 4} {1 2-3 4} {1 2 3-4} {1..2-3} {1..2-3}
+ </p>
+ <p>
+ { {1 2-3}-4} { {1 2-3}-4} { {1-2 3}-4}
+ </p>
+ <p>
+ {[1-2] 3} {[1-2] 3} {[1-2}
+ </p>
+ <p>
+ {1-2-3} {1-2-3}
+ </p>
+ </div>
+ </div>
+ <div id="template_1_7.block_and_phrase_templates">
+ <h3>
+ Block and phrase templates
+ </h3>
+ <div id="template_1_7.block_and_phrase_templates">
+ <p>
+ Some <span class="bold"><strong>text</strong></span>
+ </p>
+ <p>
+ A &lt;emphasis&gt;paragraph&lt;/emphasis&gt;.
+ </p>
+ <p>
+ Some *text* A <span class="emphasis"><em>paragraph</em></span>.
+ </p>
+ <p>
+ <h3>
+ Things
+ </h3>
+ </p>
+ <div class="informaltable">
+ <table>
+ <tbody>
+ </tbody>
+ </table>
+ </div>
+ <div class="informaltable">
+ <table>
+ <tbody>
+ </tbody>
+ </table>
+ </div>
+ <p>
+ Text2 afterwards. Text3 before.
+ </p>
+ <div class="informaltable">
+ <table>
+ <tbody>
+ </tbody>
+ </table>
+ </div>
+ <p>
+ Text4 before.
+ </p>
+ <div class="informaltable">
+ <table>
+ <tbody>
+ </tbody>
+ </table>
+ </div>
+ <p>
+ Text4 afterwards.
+ </p>
+ <div class="informaltable">
+ <table>
+ <tbody>
+ </tbody>
+ </table>
+ </div>
+ <p>
+ * Not a list.
+ </p>
+ <div class="informaltable">
+ <table>
+ <tbody>
+ </tbody>
+ </table>
+ </div>
+ <p>
+ * Not a list.
+ </p>
+ </div>
+ </div>
+ <div id="template_1_7.template_body">
+ <h3>
+ Skipping the template body correctly
+ </h3>
+ <div id="template_1_7.template_body">
+ <p>
+ <span class="emphasis"><em>Argument</em></span>
+ </p>
+ <ol>
+ <li>
+<pre class="programlisting"><span class="identifier">code</span></pre>
+ </li>
+ </ol>
+ <ol>
+ <li>
+ <div>
+ <code><span class="identifier">code</span></code>
+ </div>
+ </li>
+ </ol>
+ </div>
+ </div>
+ <div id="template_1_7.escaped_templates">
+ <h3>
+ Escaped templates
+ </h3>
+ <div id="template_1_7.escaped_templates">
+ <p>
+ Not real boostbook More fake boostbook
+ </p>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/templates-1_7.quickbook b/src/boost/tools/quickbook/test/templates-1_7.quickbook
new file mode 100644
index 000000000..bf1feaca2
--- /dev/null
+++ b/src/boost/tools/quickbook/test/templates-1_7.quickbook
@@ -0,0 +1,322 @@
+[article Template 1.7
+ [quickbook 1.7]
+]
+
+[section Templates]
+
+[/-------------------------------- nullary arg ]
+
+[template foo0 nullary_arg]
+
+[foo0]
+
+[/-------------------------------- unary arg, phrase syle ]
+
+[template foo1[bar] foo [bar]]
+
+[foo1 baz]
+
+[/-------------------------------- unary arg, block syle ]
+
+[template foo2[bar]
+foo [bar]
+]
+
+[foo2 baz]
+
+[template foo3[bar]
+This is a complete paragraph. [bar] [bar] [bar] [bar] [bar]
+[bar] [bar] [bar] [bar].... blah blah blah......
+]
+
+[foo3 kalamazoo]
+
+[/-------------------------------- unary arg, using punctuation ]
+
+[template |[bar] '''<hey>'''[bar]'''</hey>''']
+
+[|baz]
+
+[/-------------------------------- recursive templates ]
+
+[template foo4[bar]
+[foo3 [bar]]
+]
+
+[foo3 madagascar]
+
+[template foo5[x] zoom [x]]
+[template foo6[x] [x] zoom]
+
+[foo6[foo5 peanut]]
+
+[template kinda_weird[x y] [x] [y]]
+
+[kinda_weird exactly..xanadu]
+
+
+[/-------------------------------- space delimitted args ]
+
+[template simple1[a b] [a][b]]
+
+[simple1 w x]
+
+[template simple2[a b c d] [a][b][c][d]]
+
+[simple2 w x y z][simple2 w x y z trail]
+
+[/-------------------------------- John's templates ]
+
+[template code[x]
+ int main()
+ {
+ std::cout << ``[x]`` << std::endl;
+ }
+]
+
+[code "Hello\, World"]
+
+[template alpha '''&alpha;''']
+[template pow[a b] [a]'''<superscript>'''[b]'''</superscript>''' ]
+[template super[text]'''<superscript>'''[text]'''</superscript>''' ]
+
+[pow x 2]
+
+[pow [alpha] 2]
+
+x[super 2]
+
+[/-------------------------------- Some more ]
+
+[template banana got a banana?]
+[template plantation[bananarama] [bananarama]]
+
+[plantation [banana]]
+
+[/-------------------------------- Not a bug (there was a syntax error here) ]
+
+[template join1[a b] [b][a]]
+[template join2[a b] [a][b]]
+[template test[x] [join1 [join2 0 [x]]...0]]
+[test 0]
+
+[/-------------------------------- Mismatched template ]
+
+[template foo 1]
+[fool]
+
+[template blah 10]
+
+[endsect]
+
+[section Empty Templates]
+
+[template empty1]
+[template empty2 ]
+[template empty3 [/comment]]
+[template empty4 [/comment]
+
+]
+[template empty5
+]
+[template empty6
+
+]
+[template empty7
+[/comment]
+]
+[template empty8
+
+[/comment]
+]
+[template empty_arg1[x]]
+[template empty_arg2[x y]]
+
+[empty1]
+[empty2]
+[empty3]
+[empty4]
+[empty5]
+[empty6]
+[empty7]
+[empty8]
+[empty_arg1 1]
+[empty_arg2 1 2]
+
+[endsect]
+
+[/----------------------------------- Nested templates ]
+
+[section Nested Templates]
+
+[template block_foo[content]
+
+Start block template.
+
+[content]
+
+End block template.
+]
+
+[template phrase_foo[content] Start phrase template. [content] End phrase template.]
+
+Pre [block_foo [block_foo Hello!]] Post
+
+Pre [block_foo [phrase_foo Hello!]] Post
+
+Pre [phrase_foo [block_foo Hello!]] Post
+
+Pre [phrase_foo [phrase_foo Hello!]] Post
+
+[endsect]
+
+[/----------------------------------- Block Markup ]
+
+[section Block Markup]
+
+[template list
+* a
+* b]
+
+[template horizontal
+----]
+
+[template codeblock
+ int main() {}]
+
+[template paragraphs
+Paragraphs 1
+
+Paragraphs 2
+]
+
+[list][horizontal][codeblock][paragraphs]
+
+* [list]
+* [horizontal]
+* [codeblock]
+* [paragraphs]
+
+[endsect]
+
+[/----------------------------------- 1.5+ use static scoping ]
+
+[section Static Scoping]
+
+[template x static scoping]
+[template static_test1[] [x]]
+[template static_test2[x] [static_test1]]
+[static_test2 dynamic scoping]
+
+[/ This should be '[a]' because [a] isn't matched. ]
+[template test1[] [a]]
+[template test2[a] [test1]]
+[test2 1]
+
+[/ In 1.5 template arguments are scoped at the point they are defined]
+
+[template y new]
+[template static_test3[a y] [a]]
+[static_test3 [y] old]
+
+[/ From https://svn.boost.org/trac/boost/ticket/2034 ]
+
+[template same[x] [x]]
+[template echo[a b] [a] [b]]
+[template echo_twice[x] [echo [same [x]]..[same [x]]]]
+[echo_twice foo]
+
+[endsect]
+
+[/----------------------------------- 1.5+ template arguments ]
+
+[section Template Arguments]
+
+[template binary[x y] {[x]-[y]}]
+[binary 1..2] [/ {1-2} ]
+[binary 1 2] [/ {1-2} ]
+[binary 1..2 3 4] [/ {1-2 3 4} ]
+[binary 1 2..3 4] [/ {1 2-3 4} ]
+[binary 1 2 3..4] [/ {1 2 3-4} ]
+[binary 1.\.2..3] [/ {1..2-3} ]
+[binary 1.\.2 3] [/ {1..2-3} ]
+
+[binary [binary 1 2..3]..4] [/ { {1 2-3}-4} ]
+[binary [binary 1 2..3] 4] [/ { {1 2-3}-4} ]
+[binary [binary 1 2 3]..4] [/ { {1-2 3}-4} ]
+
+[binary \[1 2\] 3] [/ {[1-2] 3} ]
+[binary \[1..2\] 3] [/ {[1-2] 3} ]
+[binary \[1 2] [/ {(1-2} ]
+
+[template ternary[x y z] {[x]-[y]-[z]}]
+[ternary 1..2..3] [/ {1-2-3} ]
+[ternary 1 2 3] [/ {1-2-3} ]
+
+[endsect]
+
+[/----------------------------------- Block and phrases ]
+
+[section Block and phrase templates]
+
+[template phrase_template[] Some *text*]
+[template block_template[]
+
+A <emphasis>paragraph</emphasis>.
+]
+
+[phrase_template]
+[block_template]
+[`phrase_template]
+[`block_template]
+
+[/ Trailing newline shouldn't be included]
+
+[template named_index[type title]
+'''<index type="'''[type]'''"><title>'''[title]'''</title></index>'''
+]
+
+[named_index things Things]
+
+[/ Blocks in phrase templates ]
+
+[template phrase_block1[] [table]]
+[template phrase_block2[] [table] Text2 afterwards.]
+[template phrase_block3[] Text3 before. [table]]
+[template phrase_block4[] Text4 before. [table] Text4 afterwards.]
+[template phrase_block5[] [table] * Not a list.]
+[template phrase_block6[] [table]
+* Not a list.]
+
+[phrase_block1][phrase_block2][phrase_block3][phrase_block4]
+[phrase_block5][phrase_block6]
+
+[endsect]
+
+[/-------------------------------- Skipping template body ]
+
+[section:template_body Skipping the template body correctly]
+
+[template args1[x] [`x]]
+[template args2[] [ordered_list [``code``]]]
+[/ Due to a bug in the template parser need to stop the parser
+ thinking that the code is an escaped template. ]
+[template args3[] [ordered_list [\ `code`]]]
+
+[args1 <emphasis>Argument</emphasis>]
+[args2]
+[args3]
+
+[endsect]
+
+[/----------------------------------- Escaped templates ]
+
+[section Escaped templates]
+
+[template raw_markup <thingbob>Not real boostbook</thingbob>]
+[template escaped1 [x] [`x]]
+
+[`raw_markup]
+[escaped1 <thingbob>More fake boostbook</thingbob>]
+
+[endsect]
diff --git a/src/boost/tools/quickbook/test/unicode_escape-1_5.gold b/src/boost/tools/quickbook/test/unicode_escape-1_5.gold
new file mode 100644
index 000000000..c2a8859eb
--- /dev/null
+++ b/src/boost/tools/quickbook/test/unicode_escape-1_5.gold
@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="utf_8_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>UTF-8 test</title>
+ <bridgehead renderas="sect2" id="utf_8_test.h0">
+ <phrase id="utf_8_test.i__xf1_t__xeb_rn__xe2_ti__xf4_n__xe0_liz__xe6_ti__xf8_n"/><link
+ linkend="utf_8_test.i__xf1_t__xeb_rn__xe2_ti__xf4_n__xe0_liz__xe6_ti__xf8_n">I&#xF1;t&#xEB;rn&#xE2;ti&#xF4;n&#xE0;liz&#xE6;ti&#xF8;n</link>
+ </bridgehead>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ &#x391;&#x3B1; Alpha
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x392;&#x3B2; Beta
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x393;&#x3B3; Gamma
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x394;&#x3B4; Delta
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x395;&#x3B5; Epsilon
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x396;&#x3B6; Zeta
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x397;&#x3B7; Eta
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x398;&#x3B8; Theta
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x399;&#x3B9; Iota
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x39A;&#x3BA; Kappa
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x39B;&#x3BB; Lambda
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x39C;&#x3BC; Mu
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x39D;&#x3BD; Nu
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x39E;&#x3BE; Xi
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x39F;&#x3BF; Omicron
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x3A0;&#x3C0; Pi
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x3A1;&#x3C1; Rho
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x3A3;&#x3C3;&#x3C2; Sigma
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x3A4;&#x3C4; Tau
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x3A5;&#x3C5; Upsilon
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x3A6;&#x3C6; Phi
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x3A7;&#x3C7; Chi
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x3A8;&#x3C8; Psi
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x3A9;&#x3C9; Omega
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ In the unlikely event that you've got a Mahjong font:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ &#x1F000; East Wind
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x1F001; South Wind
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x1F002; West Wind
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &#x1F003; North Wind
+ </simpara>
+ </listitem>
+ </itemizedlist>
+</article>
diff --git a/src/boost/tools/quickbook/test/unicode_escape-1_5.gold-html b/src/boost/tools/quickbook/test/unicode_escape-1_5.gold-html
new file mode 100644
index 000000000..ab8409f10
--- /dev/null
+++ b/src/boost/tools/quickbook/test/unicode_escape-1_5.gold-html
@@ -0,0 +1,159 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ UTF-8 test
+ </h3>
+ <h2 id="utf_8_test.i__xf1_t__xeb_rn__xe2_ti__xf4_n__xe0_liz__xe6_ti__xf8_n">
+ I&#xF1;t&#xEB;rn&#xE2;ti&#xF4;n&#xE0;liz&#xE6;ti&#xF8;n
+ </h2>
+ <ul>
+ <li>
+ <div>
+ &#x391;&#x3B1; Alpha
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x392;&#x3B2; Beta
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x393;&#x3B3; Gamma
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x394;&#x3B4; Delta
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x395;&#x3B5; Epsilon
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x396;&#x3B6; Zeta
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x397;&#x3B7; Eta
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x398;&#x3B8; Theta
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x399;&#x3B9; Iota
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x39A;&#x3BA; Kappa
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x39B;&#x3BB; Lambda
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x39C;&#x3BC; Mu
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x39D;&#x3BD; Nu
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x39E;&#x3BE; Xi
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x39F;&#x3BF; Omicron
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x3A0;&#x3C0; Pi
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x3A1;&#x3C1; Rho
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x3A3;&#x3C3;&#x3C2; Sigma
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x3A4;&#x3C4; Tau
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x3A5;&#x3C5; Upsilon
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x3A6;&#x3C6; Phi
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x3A7;&#x3C7; Chi
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x3A8;&#x3C8; Psi
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x3A9;&#x3C9; Omega
+ </div>
+ </li>
+ </ul>
+ <p>
+ In the unlikely event that you've got a Mahjong font:
+ </p>
+ <ul>
+ <li>
+ <div>
+ &#x1F000; East Wind
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x1F001; South Wind
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x1F002; West Wind
+ </div>
+ </li>
+ <li>
+ <div>
+ &#x1F003; North Wind
+ </div>
+ </li>
+ </ul>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/unicode_escape-1_5.quickbook b/src/boost/tools/quickbook/test/unicode_escape-1_5.quickbook
new file mode 100644
index 000000000..becdef6b8
--- /dev/null
+++ b/src/boost/tools/quickbook/test/unicode_escape-1_5.quickbook
@@ -0,0 +1,37 @@
+[article UTF-8 test
+ [quickbook 1.5]
+]
+
+[heading I\u00F1t\u00EBrn\u00E2ti\u00F4n\u00E0liz\u00E6ti\u00F8n]
+
+* \u0391\u03B1 Alpha
+* \u0392\u03B2 Beta
+* \u0393\u03B3 Gamma
+* \u0394\u03B4 Delta
+* \u0395\u03B5 Epsilon
+* \u0396\u03B6 Zeta
+* \u0397\u03B7 Eta
+* \u0398\u03B8 Theta
+* \u0399\u03B9 Iota
+* \u039A\u03BA Kappa
+* \u039B\u03BB Lambda
+* \u039C\u03BC Mu
+* \u039D\u03BD Nu
+* \u039E\u03BE Xi
+* \u039F\u03BF Omicron
+* \u03A0\u03C0 Pi
+* \u03A1\u03C1 Rho
+* \u03A3\u03C3\u03C2 Sigma
+* \u03A4\u03C4 Tau
+* \u03A5\u03C5 Upsilon
+* \u03A6\u03C6 Phi
+* \u03A7\u03C7 Chi
+* \u03A8\u03C8 Psi
+* \u03A9\u03C9 Omega
+
+In the unlikely event that you've got a Mahjong font:
+
+* \U0001F000 East Wind
+* \U0001F001 South Wind
+* \U0001F002 West Wind
+* \U0001F003 North Wind \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/unit/Jamfile.v2 b/src/boost/tools/quickbook/test/unit/Jamfile.v2
new file mode 100644
index 000000000..43271b48c
--- /dev/null
+++ b/src/boost/tools/quickbook/test/unit/Jamfile.v2
@@ -0,0 +1,31 @@
+#
+# Copyright (c) 2011 Daniel James
+#
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+#
+
+import testing ;
+
+project quickbook/test/unit-tests
+ : requirements
+ <include>../../src
+ <warnings>all
+ <library>/boost//filesystem
+ <toolset>gcc:<cflags>-g0
+ <toolset>darwin:<cflags>-g0
+ <toolset>msvc:<cflags>/wd4709
+ ;
+
+run values_test.cpp ../../src/values.cpp ../../src/files.cpp ;
+run post_process_test.cpp ../../src/post_process.cpp ;
+run source_map_test.cpp ../../src/files.cpp ;
+run glob_test.cpp ../../src/glob.cpp ;
+run utils_test.cpp ../../src/id_xml.cpp ../../src/utils.cpp ;
+run cleanup_test.cpp ;
+run path_test.cpp ../../src/path.cpp ../../src/native_text.cpp ../../src/utils.cpp ;
+
+# Copied from spirit
+run symbols_tests.cpp ;
+run symbols_find_null.cpp ;
diff --git a/src/boost/tools/quickbook/test/unit/cleanup_test.cpp b/src/boost/tools/quickbook/test/unit/cleanup_test.cpp
new file mode 100644
index 000000000..4952c991a
--- /dev/null
+++ b/src/boost/tools/quickbook/test/unit/cleanup_test.cpp
@@ -0,0 +1,80 @@
+
+/*=============================================================================
+ Copyright (c) 2017 Daniel James
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+=============================================================================*/
+
+#include <vector>
+#include <boost/core/lightweight_test.hpp>
+#include "cleanup.hpp"
+
+struct counted
+{
+ static int count;
+ static std::vector<int> destroyed;
+ static void reset()
+ {
+ count = 0;
+ destroyed.clear();
+ }
+
+ int value;
+
+ counted(int v) : value(v)
+ {
+ BOOST_TEST(value != -1);
+ ++count;
+ }
+
+ counted(counted const& x) : value(x.value)
+ {
+ BOOST_TEST(value != -1);
+ ++count;
+ }
+
+ ~counted()
+ {
+ BOOST_TEST(value != -1);
+ destroyed.push_back(value);
+ value = -1;
+ BOOST_TEST(count > 0);
+ --count;
+ }
+};
+
+int counted::count = 0;
+std::vector<int> counted::destroyed;
+
+int main()
+{
+ counted::reset();
+ {
+ quickbook::cleanup c;
+ }
+ BOOST_TEST(counted::count == 0);
+
+ counted::reset();
+ {
+ quickbook::cleanup c;
+ counted& v1 = c.add(new counted(1));
+ counted& v2 = c.add(new counted(2));
+ BOOST_TEST(v1.value == 1);
+ BOOST_TEST(v2.value == 2);
+ }
+ BOOST_TEST(counted::count == 0);
+ BOOST_TEST(counted::destroyed.size() == 2);
+ BOOST_TEST(counted::destroyed[0] == 2);
+ BOOST_TEST(counted::destroyed[1] == 1);
+
+ counted::reset();
+ {
+ quickbook::cleanup c;
+ int& x = c.add(new int(10));
+ BOOST_TEST(x == 10);
+ }
+
+ return boost::report_errors();
+}
diff --git a/src/boost/tools/quickbook/test/unit/glob_test.cpp b/src/boost/tools/quickbook/test/unit/glob_test.cpp
new file mode 100644
index 000000000..27d2611b3
--- /dev/null
+++ b/src/boost/tools/quickbook/test/unit/glob_test.cpp
@@ -0,0 +1,163 @@
+/*=============================================================================
+ Copyright (c) 2013 Daniel James
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+=============================================================================*/
+
+#include <boost/detail/lightweight_test.hpp>
+#include "glob.hpp"
+
+void glob_tests()
+{
+ BOOST_TEST(quickbook::glob("", ""));
+
+ BOOST_TEST(!quickbook::glob("*", ""));
+ BOOST_TEST(quickbook::glob("*", "a"));
+ BOOST_TEST(quickbook::glob("*b", "b"));
+ BOOST_TEST(quickbook::glob("*b", "ab"));
+ BOOST_TEST(quickbook::glob("*b", "bab"));
+ BOOST_TEST(quickbook::glob("*b*", "b"));
+ BOOST_TEST(quickbook::glob("*b*", "ab"));
+ BOOST_TEST(quickbook::glob("*b*", "bc"));
+ BOOST_TEST(quickbook::glob("*b*", "abc"));
+ BOOST_TEST(!quickbook::glob("*b*", ""));
+ BOOST_TEST(!quickbook::glob("*b*", "a"));
+ BOOST_TEST(!quickbook::glob("*b*", "ac"));
+
+ BOOST_TEST(quickbook::glob("hello.txt", "hello.txt"));
+ BOOST_TEST(!quickbook::glob("world.txt", "helloworld.txt"));
+ BOOST_TEST(quickbook::glob("*world.txt", "helloworld.txt"));
+ BOOST_TEST(!quickbook::glob("world.txt*", "helloworld.txt"));
+ BOOST_TEST(!quickbook::glob("hello", "helloworld.txt"));
+ BOOST_TEST(!quickbook::glob("*hello", "helloworld.txt"));
+ BOOST_TEST(quickbook::glob("hello*", "helloworld.txt"));
+ BOOST_TEST(quickbook::glob("*world*", "helloworld.txt"));
+
+ BOOST_TEST(quickbook::glob("?", "a"));
+ BOOST_TEST(!quickbook::glob("?", ""));
+ BOOST_TEST(!quickbook::glob("?", "ab"));
+ BOOST_TEST(quickbook::glob("a?", "ab"));
+ BOOST_TEST(quickbook::glob("?b", "ab"));
+ BOOST_TEST(quickbook::glob("?bc", "abc"));
+ BOOST_TEST(quickbook::glob("a?c", "abc"));
+ BOOST_TEST(quickbook::glob("ab?", "abc"));
+ BOOST_TEST(!quickbook::glob("?bc", "aac"));
+ BOOST_TEST(!quickbook::glob("a?c", "bbc"));
+ BOOST_TEST(!quickbook::glob("ab?", "abcd"));
+
+ BOOST_TEST(quickbook::glob("[a]", "a"));
+ BOOST_TEST(!quickbook::glob("[^a]", "a"));
+ BOOST_TEST(!quickbook::glob("[b]", "a"));
+ BOOST_TEST(quickbook::glob("[^b]", "a"));
+ BOOST_TEST(quickbook::glob("[a-z]", "a"));
+ BOOST_TEST(!quickbook::glob("[^a-z]", "a"));
+ BOOST_TEST(!quickbook::glob("[b-z]", "a"));
+ BOOST_TEST(quickbook::glob("[^b-z]", "a"));
+ BOOST_TEST(quickbook::glob("[-a]", "a"));
+ BOOST_TEST(quickbook::glob("[-a]", "-"));
+ BOOST_TEST(!quickbook::glob("[-a]", "b"));
+ BOOST_TEST(!quickbook::glob("[^-a]", "a"));
+ BOOST_TEST(!quickbook::glob("[^-a]", "-"));
+ BOOST_TEST(quickbook::glob("[^-a]", "b"));
+ BOOST_TEST(quickbook::glob("[a-]", "a"));
+ BOOST_TEST(quickbook::glob("[a-]", "-"));
+ BOOST_TEST(!quickbook::glob("[a-]", "b"));
+ BOOST_TEST(!quickbook::glob("[^a-]", "a"));
+ BOOST_TEST(!quickbook::glob("[^a-]", "-"));
+ BOOST_TEST(quickbook::glob("[^a-]", "b"));
+ BOOST_TEST(quickbook::glob("[a-ce-f]", "a"));
+ BOOST_TEST(!quickbook::glob("[a-ce-f]", "d"));
+ BOOST_TEST(quickbook::glob("[a-ce-f]", "f"));
+ BOOST_TEST(!quickbook::glob("[a-ce-f]", "g"));
+ BOOST_TEST(!quickbook::glob("[^a-ce-f]", "a"));
+ BOOST_TEST(quickbook::glob("[^a-ce-f]", "d"));
+ BOOST_TEST(!quickbook::glob("[^a-ce-f]", "f"));
+ BOOST_TEST(quickbook::glob("[^a-ce-f]", "g"));
+ BOOST_TEST(!quickbook::glob("[b]", "a"));
+ BOOST_TEST(quickbook::glob("[a]bc", "abc"));
+ BOOST_TEST(quickbook::glob("a[b]c", "abc"));
+ BOOST_TEST(quickbook::glob("ab[c]", "abc"));
+ BOOST_TEST(quickbook::glob("a[a-c]c", "abc"));
+ BOOST_TEST(quickbook::glob("*[b]*", "abc"));
+ BOOST_TEST(quickbook::glob("[\\]]", "]"));
+ BOOST_TEST(!quickbook::glob("[^\\]]", "]"));
+
+ BOOST_TEST(quickbook::glob("b*ana", "banana"));
+ BOOST_TEST(quickbook::glob("1234*1234*1234", "123412341234"));
+ BOOST_TEST(!quickbook::glob("1234*1234*1234", "1234123341234"));
+ BOOST_TEST(quickbook::glob("1234*1234*1234", "123412312312341231231234"));
+ BOOST_TEST(!quickbook::glob("1234*1234*1234", "12341231231234123123123"));
+}
+
+void invalid_glob_tests()
+{
+ // Note that glob only throws an exception when the pattern matches up to
+ // the point where the error occurs.
+ BOOST_TEST_THROWS(quickbook::glob("[", "a"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::glob("[^", "a"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::glob("[xyz", "a"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::glob("[xyz\\", "a"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::glob("[x\\y", "a"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::glob("[a-", "a"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::glob("[a-z", "a"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::glob("[a-\\", "a"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::glob("[a-\\a", "a"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::glob("xyx[", "xyxa"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::glob("]", "a"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::glob("abc]", "abcd"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::glob("]def", "a"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::glob("[]", "a"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::glob("[[]", "a"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::glob("[]]", "a"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::glob("**", "a"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::glob("[/]", "a"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::glob("[\\/]", "a"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::glob("[ -/]", "a"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::glob("[ -\\/]", "a"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::glob("\\", "a"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::glob("\\\\", "a"), quickbook::glob_error);
+}
+
+void check_glob_tests()
+{
+ BOOST_TEST(!quickbook::check_glob(""));
+ BOOST_TEST(!quickbook::check_glob("file"));
+ BOOST_TEST(!quickbook::check_glob("file\\[\\]"));
+ BOOST_TEST(quickbook::check_glob("[x]"));
+ BOOST_TEST(quickbook::check_glob("abc[x]"));
+ BOOST_TEST(quickbook::check_glob("[x]abd"));
+ BOOST_TEST_THROWS(quickbook::check_glob("["), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::check_glob("[^"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::check_glob("[xyz"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::check_glob("[xyz\\"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::check_glob("[x\\y"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::check_glob("[a-"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::check_glob("[a-z"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::check_glob("[a-\\"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::check_glob("[a-\\a"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::check_glob("xyx["), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::check_glob("]"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::check_glob("abc]"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::check_glob("]def"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::check_glob("[]"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::check_glob("[[]"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::check_glob("[]]"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::check_glob("**"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::check_glob("[/]"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::check_glob("[\\/]"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::check_glob("[ -/]"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::check_glob("[ -\\/]"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::check_glob("\\"), quickbook::glob_error);
+ BOOST_TEST_THROWS(quickbook::check_glob("\\\\"), quickbook::glob_error);
+}
+
+int main()
+{
+ glob_tests();
+ invalid_glob_tests();
+ check_glob_tests();
+
+ return boost::report_errors();
+}
diff --git a/src/boost/tools/quickbook/test/unit/path_test.cpp b/src/boost/tools/quickbook/test/unit/path_test.cpp
new file mode 100644
index 000000000..734769ef6
--- /dev/null
+++ b/src/boost/tools/quickbook/test/unit/path_test.cpp
@@ -0,0 +1,189 @@
+/*=============================================================================
+ Copyright (c) 2015 Daniel James
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+=============================================================================*/
+
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/filesystem/operations.hpp>
+#include <boost/predef.h>
+#include "path.hpp"
+
+void file_path_to_url_tests()
+{
+ using boost::filesystem::path;
+ using quickbook::file_path_to_url;
+
+ BOOST_TEST_EQ(std::string(), file_path_to_url(path()));
+ BOOST_TEST_EQ(std::string("."), file_path_to_url(path(".")));
+ BOOST_TEST_EQ(std::string("./"), file_path_to_url(path("./")));
+ BOOST_TEST_EQ(std::string("a/b"), file_path_to_url(path("a/b")));
+ BOOST_TEST_EQ(std::string("a/b/"), file_path_to_url(path("a/b/")));
+ BOOST_TEST_EQ(std::string("./a/b"), file_path_to_url(path("./a/./././b")));
+ BOOST_TEST_EQ(std::string("../a/b"), file_path_to_url(path("../a/b")));
+ BOOST_TEST_EQ(
+ std::string("A%20B%2bC%2520"), file_path_to_url(path("A B+C%20")));
+ BOOST_TEST_EQ(std::string("file:///"), file_path_to_url(path("/")));
+ BOOST_TEST_EQ(std::string("file:///a/b"), file_path_to_url(path("/a/b")));
+ BOOST_TEST_EQ(std::string("file:///a/b/"), file_path_to_url(path("/a/b/")));
+ BOOST_TEST_EQ(
+ std::string("file://hello/a/b"), file_path_to_url(path("//hello/a/b")));
+
+#if BOOST_OS_WINDOWS || BOOST_OS_CYGWIN
+ // Should this be file:///c:/x ?
+ BOOST_TEST_EQ(
+ std::string("file://?/a:/x"), file_path_to_url(path("\\\\?\\a:\\x")));
+ BOOST_TEST_EQ(std::string("file:///a"), file_path_to_url(path("\\a")));
+ BOOST_TEST_EQ(std::string("file:///c:/"), file_path_to_url(path("c:\\")));
+ BOOST_TEST_EQ(
+ std::string("file:///c:/foo/bar"),
+ file_path_to_url(path("c:\\foo\\bar")));
+ BOOST_TEST_EQ(
+ std::string("file://localhost/c:/foo/bar"),
+ file_path_to_url(path("\\\\localhost\\c:\\foo\\bar")));
+
+ // Really not sure what to do with these examples.
+ // Maybe an error?
+ BOOST_TEST_EQ(std::string("file:///c:"), file_path_to_url(path("c:")));
+ BOOST_TEST_EQ(
+ std::string("file:///c:foo/bar"), file_path_to_url(path("c:foo\\bar")));
+#endif
+}
+
+void dir_path_to_url_tests()
+{
+ using boost::filesystem::path;
+ using quickbook::dir_path_to_url;
+
+ BOOST_TEST_EQ(std::string("./"), dir_path_to_url(path()));
+ BOOST_TEST_EQ(std::string("./"), dir_path_to_url(path(".")));
+ BOOST_TEST_EQ(std::string("./"), dir_path_to_url(path("./")));
+ BOOST_TEST_EQ(std::string("a/b/"), dir_path_to_url(path("a/b")));
+ BOOST_TEST_EQ(std::string("a/b/"), dir_path_to_url(path("a/b/")));
+ BOOST_TEST_EQ(std::string("./a/b/"), dir_path_to_url(path("./a/./././b")));
+ BOOST_TEST_EQ(std::string("../a/b/"), dir_path_to_url(path("../a/b")));
+ BOOST_TEST_EQ(
+ std::string("A%20B%2bC%2520/"), dir_path_to_url(path("A B+C%20")));
+ BOOST_TEST_EQ(std::string("file:///"), dir_path_to_url(path("/")));
+ BOOST_TEST_EQ(std::string("file:///a/b/"), dir_path_to_url(path("/a/b")));
+ BOOST_TEST_EQ(std::string("file:///a/b/"), dir_path_to_url(path("/a/b/")));
+ BOOST_TEST_EQ(
+ std::string("file://hello/a/b/"), dir_path_to_url(path("//hello/a/b")));
+
+#if BOOST_OS_WINDOWS || BOOST_OS_CYGWIN
+ // Should this be file:///c:/x/ ?
+ BOOST_TEST_EQ(
+ std::string("file://?/a:/x/"), dir_path_to_url(path("\\\\?\\a:\\x")));
+ BOOST_TEST_EQ(std::string("file:///a/"), dir_path_to_url(path("\\a")));
+ BOOST_TEST_EQ(std::string("file:///c:/"), dir_path_to_url(path("c:\\")));
+ BOOST_TEST_EQ(
+ std::string("file:///c:/foo/bar/"),
+ dir_path_to_url(path("c:\\foo\\bar")));
+ BOOST_TEST_EQ(
+ std::string("file://localhost/c:/foo/bar/"),
+ dir_path_to_url(path("\\\\localhost\\c:\\foo\\bar")));
+
+ // Really not sure what to do with these examples.
+ // Maybe an error?
+ BOOST_TEST_EQ(std::string("file:///c:"), dir_path_to_url(path("c:")));
+ BOOST_TEST_EQ(
+ std::string("file:///c:foo/bar/"), dir_path_to_url(path("c:foo\\bar")));
+#endif
+}
+
+void path_difference_tests()
+{
+ using boost::filesystem::current_path;
+ using boost::filesystem::path;
+ using quickbook::path_difference;
+
+ BOOST_TEST(path(".") == path_difference(path(""), path("")));
+ BOOST_TEST(path(".") == path_difference(path("a"), path("a")));
+ BOOST_TEST(path(".") == path_difference(path("a/../b"), path("b")));
+ BOOST_TEST(path(".") == path_difference(current_path(), current_path()));
+ BOOST_TEST(path("..") == path_difference(path("a"), path("")));
+ BOOST_TEST(
+ path("..") == path_difference(current_path() / "a", current_path()));
+ BOOST_TEST(path("a") == path_difference(path(""), path("a")));
+ BOOST_TEST(
+ path("a") == path_difference(current_path(), current_path() / "a"));
+ BOOST_TEST(path("b") == path_difference(path("a"), path("a/b")));
+ BOOST_TEST(
+ path("b") ==
+ path_difference(current_path() / "a", current_path() / "a" / "b"));
+ BOOST_TEST(path("../a/b") == path_difference(path("c"), path("a/b")));
+ BOOST_TEST(
+ path("../a/b") ==
+ path_difference(current_path() / "c", current_path() / "a" / "b"));
+ BOOST_TEST(path("..") == path_difference(path(""), path("..")));
+ BOOST_TEST(
+ path("..") ==
+ path_difference(current_path(), current_path().parent_path()));
+ BOOST_TEST(path("b") == path_difference(path("a/c/.."), path("a/b")));
+ BOOST_TEST(path("b") == path_difference(path("b/c/../../a"), path("a/b")));
+ BOOST_TEST(
+ path("b") ==
+ path_difference(path("b/c/../../a"), path("d/f/../../a/b")));
+ BOOST_TEST(
+ path("../../x/a/b") ==
+ path_difference(path("b/c/../../a"), path("d/f/../../../x/a/b")));
+
+ // path_difference to a file, try to include the filename in the result,
+ // although not always possible. Maybe nonsense calls should be an error?
+ //
+ // Commented out cases are wrong because path_difference resolves the paths
+ // to the current working directory. In use this doesn't matter as it's
+ // always called with the full path, but it'd be nice to get this right.
+ // Or maybe just add the pre-condition to path_difference?
+ std::cout << path_difference(path(""), path(""), true) << std::endl;
+ // BOOST_TEST(path(".") == path_difference(path(""), path(""), true));
+ BOOST_TEST(path("../a") == path_difference(path("a"), path("a"), true));
+ BOOST_TEST(
+ path("../../a") == path_difference(path("a/b"), path("a"), true));
+ BOOST_TEST(
+ path("../b") == path_difference(path("a/../b"), path("b"), true));
+ BOOST_TEST(
+ ".." / current_path().filename() ==
+ path_difference(current_path(), current_path(), true));
+ // BOOST_TEST(path("..") == path_difference(path("a"), path(""), true));
+ BOOST_TEST(
+ "../.." / current_path().filename() ==
+ path_difference(current_path() / "a", current_path(), true));
+ BOOST_TEST(path("a") == path_difference(path(""), path("a"), true));
+ BOOST_TEST(
+ path("a") ==
+ path_difference(current_path(), current_path() / "a", true));
+ BOOST_TEST(path("b") == path_difference(path("a"), path("a/b"), true));
+ BOOST_TEST(
+ path("b") ==
+ path_difference(
+ current_path() / "a", current_path() / "a" / "b", true));
+ BOOST_TEST(path("../a/b") == path_difference(path("c"), path("a/b"), true));
+ BOOST_TEST(
+ path("../a/b") ==
+ path_difference(
+ current_path() / "c", current_path() / "a" / "b", true));
+ // BOOST_TEST(path("..") == path_difference(path(""), path(".."), true));
+ BOOST_TEST(
+ "../.." / current_path().parent_path().filename() ==
+ path_difference(current_path(), current_path().parent_path(), true));
+ BOOST_TEST(path("b") == path_difference(path("a/c/.."), path("a/b"), true));
+ BOOST_TEST(
+ path("b") == path_difference(path("b/c/../../a"), path("a/b"), true));
+ BOOST_TEST(
+ path("b") ==
+ path_difference(path("b/c/../../a"), path("d/f/../../a/b"), true));
+ BOOST_TEST(
+ path("../../x/a/b") ==
+ path_difference(path("b/c/../../a"), path("d/f/../../../x/a/b"), true));
+}
+
+int main()
+{
+ file_path_to_url_tests();
+ dir_path_to_url_tests();
+ path_difference_tests();
+ return boost::report_errors();
+}
diff --git a/src/boost/tools/quickbook/test/unit/post_process_test.cpp b/src/boost/tools/quickbook/test/unit/post_process_test.cpp
new file mode 100644
index 000000000..e7681c72d
--- /dev/null
+++ b/src/boost/tools/quickbook/test/unit/post_process_test.cpp
@@ -0,0 +1,27 @@
+/*=============================================================================
+ Copyright (c) 2011 Daniel James
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+=============================================================================*/
+
+#include <boost/detail/lightweight_test.hpp>
+#include "post_process.hpp"
+
+#define EXPECT_EXCEPTION(test, msg) \
+ try { \
+ test; \
+ BOOST_ERROR(msg); \
+ } catch (quickbook::post_process_failure&) { \
+ }
+
+int main()
+{
+ EXPECT_EXCEPTION(
+ quickbook::post_process("</thing>"), "Succeeded with unbalanced tag");
+ EXPECT_EXCEPTION(
+ quickbook::post_process("<"), "Succeeded with badly formed tag");
+
+ return boost::report_errors();
+}
diff --git a/src/boost/tools/quickbook/test/unit/source_map_test.cpp b/src/boost/tools/quickbook/test/unit/source_map_test.cpp
new file mode 100644
index 000000000..6248ac1f6
--- /dev/null
+++ b/src/boost/tools/quickbook/test/unit/source_map_test.cpp
@@ -0,0 +1,444 @@
+/*=============================================================================
+ Copyright (c) 2012 Daniel James
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+=============================================================================*/
+
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/range/algorithm/find.hpp>
+#include "files.hpp"
+#include "fwd.hpp"
+#include "string_view.hpp"
+
+void simple_map_tests()
+{
+ quickbook::string_view source("First Line\nSecond Line");
+ quickbook::file_ptr fake_file =
+ new quickbook::file("(fake file)", source, 105u);
+
+ quickbook::string_iterator line1 = fake_file->source().begin();
+ quickbook::string_iterator line1_end =
+ boost::find(fake_file->source(), '\n');
+ quickbook::string_iterator line2 = line1_end + 1;
+ quickbook::string_iterator line2_end = fake_file->source().end();
+
+ quickbook::mapped_file_builder builder;
+
+ { // Empty test
+ builder.start(fake_file);
+ BOOST_TEST(builder.empty());
+ quickbook::file_ptr f1 = builder.release();
+ BOOST_TEST(f1->source().empty());
+ }
+
+ { // Add full text
+ builder.start(fake_file);
+ builder.add(quickbook::string_view(line1, line2_end - line1));
+ quickbook::file_ptr f1 = builder.release();
+ BOOST_TEST_EQ(f1->source(), source);
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin()),
+ quickbook::file_position(1, 1));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin() + 2),
+ quickbook::file_position(1, 3));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin() + (line1_end - line1)),
+ quickbook::file_position(1, line1_end - line1 + 1));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin() + (line2 - line1)),
+ quickbook::file_position(2, 1));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().end()),
+ fake_file->position_of(fake_file->source().end()));
+ }
+
+ { // Add first line
+ builder.start(fake_file);
+ builder.add(quickbook::string_view(line1, line1_end - line1));
+ quickbook::file_ptr f1 = builder.release();
+ BOOST_TEST_EQ(
+ f1->source(),
+ quickbook::string_view(source.begin(), line1_end - line1));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin()),
+ quickbook::file_position(1, 1));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin() + 2),
+ quickbook::file_position(1, 3));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().end()),
+ quickbook::file_position(1, line1_end - line1 + 1));
+ }
+
+ { // Add second line
+ builder.start(fake_file);
+ builder.add(quickbook::string_view(line2, line2_end - line2));
+ quickbook::file_ptr f1 = builder.release();
+ BOOST_TEST_EQ(f1->source(), quickbook::string_view("Second Line"));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin()),
+ quickbook::file_position(2, 1));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin() + 2),
+ quickbook::file_position(2, 3));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().end()),
+ quickbook::file_position(2, line2_end - line2 + 1));
+ }
+
+ { // Out of order
+ builder.start(fake_file);
+ builder.add(quickbook::string_view(line2, line2_end - line2));
+ builder.add(quickbook::string_view(line1_end, 1));
+ builder.add(quickbook::string_view(line1, line1_end - line1));
+ quickbook::file_ptr f1 = builder.release();
+ BOOST_TEST_EQ(
+ f1->source(), quickbook::string_view("Second Line\nFirst Line"));
+
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin()),
+ quickbook::file_position(2, 1));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin() + 2),
+ quickbook::file_position(2, 3));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin() + (line2_end - line2 - 1)),
+ quickbook::file_position(2, line2_end - line2));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin() + (line2_end - line2)),
+ quickbook::file_position(1, (line1_end - line1 + 1)));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin() + (line2_end - line2 + 1)),
+ quickbook::file_position(1, 1));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().end()),
+ quickbook::file_position(1, line1_end - line1 + 1));
+ }
+
+ { // Repeated text
+ builder.start(fake_file);
+ builder.add(quickbook::string_view(line2, line2_end - line2));
+ builder.add(quickbook::string_view(line1_end, 1));
+ builder.add(quickbook::string_view(line2, line2_end - line2));
+ quickbook::file_ptr f1 = builder.release();
+ BOOST_TEST_EQ(
+ f1->source(), quickbook::string_view("Second Line\nSecond Line"));
+
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin()),
+ quickbook::file_position(2, 1));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin() + 2),
+ quickbook::file_position(2, 3));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin() + (line2_end - line2 - 1)),
+ quickbook::file_position(2, line2_end - line2));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin() + (line2_end - line2)),
+ quickbook::file_position(1, (line1_end - line1 + 1)));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin() + (line2_end - line2 + 1)),
+ quickbook::file_position(2, 1));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().end()),
+ quickbook::file_position(2, line2_end - line2 + 1));
+ }
+
+ { // Generated text
+ builder.start(fake_file);
+ builder.add_at_pos("------\n", line1);
+ builder.add(quickbook::string_view(line1, line1_end - line1));
+ builder.add_at_pos("\n------\n", line1_end);
+ quickbook::file_ptr f1 = builder.release();
+ BOOST_TEST_EQ(
+ f1->source(),
+ quickbook::string_view("------\nFirst Line\n------\n"));
+
+ quickbook::string_iterator newline = boost::find(f1->source(), '\n');
+
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin()),
+ quickbook::file_position(1, 1));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin() + 2),
+ quickbook::file_position(1, 1));
+ BOOST_TEST_EQ(f1->position_of(newline), quickbook::file_position(1, 1));
+ BOOST_TEST_EQ(
+ f1->position_of(newline + 1), quickbook::file_position(1, 1));
+ BOOST_TEST_EQ(
+ f1->position_of(newline + 2), quickbook::file_position(1, 2));
+ BOOST_TEST_EQ(
+ f1->position_of(newline + (line1_end - line1)),
+ quickbook::file_position(1, line1_end - line1));
+ BOOST_TEST_EQ(
+ f1->position_of(newline + (line1_end - line1 + 1)),
+ quickbook::file_position(1, line1_end - line1 + 1));
+ BOOST_TEST_EQ(
+ f1->position_of(newline + (line1_end - line1 + 2)),
+ quickbook::file_position(1, line1_end - line1 + 1));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().end()),
+ quickbook::file_position(1, line1_end - line1 + 1));
+ }
+}
+
+void indented_map_tests()
+{
+ quickbook::string_view source(" Code line1\n"
+ " Code line2\n");
+ quickbook::file_ptr fake_file =
+ new quickbook::file("(fake file)", source, 105u);
+
+ quickbook::mapped_file_builder builder;
+
+ {
+ builder.start(fake_file);
+ builder.unindent_and_add(fake_file->source());
+ quickbook::file_ptr f1 = builder.release();
+ BOOST_TEST_EQ(
+ f1->source(), quickbook::string_view("Code line1\nCode line2\n"));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin()),
+ quickbook::file_position(1, 4));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin() + 1),
+ quickbook::file_position(1, 5));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin() + 5),
+ quickbook::file_position(1, 9));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin() + 10),
+ quickbook::file_position(1, 14));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin() + 11),
+ quickbook::file_position(2, 4));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().end()),
+ quickbook::file_position(3, 1));
+ }
+
+ {
+ builder.start(fake_file);
+ {
+ quickbook::mapped_file_builder builder2;
+ builder2.start(fake_file);
+ builder2.unindent_and_add(fake_file->source());
+ builder.add(builder2);
+ }
+ quickbook::file_ptr f1 = builder.release();
+
+ BOOST_TEST_EQ(
+ f1->source(), quickbook::string_view("Code line1\nCode line2\n"));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin()),
+ quickbook::file_position(1, 4));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin() + 1),
+ quickbook::file_position(1, 5));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin() + 5),
+ quickbook::file_position(1, 9));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin() + 10),
+ quickbook::file_position(1, 14));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin() + 11),
+ quickbook::file_position(2, 4));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().end()),
+ quickbook::file_position(3, 1));
+ }
+
+ {
+ builder.start(fake_file);
+ builder.unindent_and_add(quickbook::string_view(
+ fake_file->source().begin() + 3,
+ fake_file->source().end() - (fake_file->source().begin() + 3)));
+ quickbook::file_ptr f1 = builder.release();
+ BOOST_TEST_EQ(
+ f1->source(),
+ quickbook::string_view("Code line1\n Code line2\n"));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin()),
+ quickbook::file_position(1, 4));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin() + 1),
+ quickbook::file_position(1, 5));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin() + 5),
+ quickbook::file_position(1, 9));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin() + 10),
+ quickbook::file_position(1, 14));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin() + 11),
+ quickbook::file_position(2, 1));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().end()),
+ quickbook::file_position(3, 1));
+ }
+}
+
+void indented_map_tests2()
+{
+ quickbook::string_view source(" Code line1\n"
+ "\n"
+ " Code line2\n");
+ quickbook::file_ptr fake_file =
+ new quickbook::file("(fake file)", source, 105u);
+
+ quickbook::mapped_file_builder builder;
+
+ {
+ builder.start(fake_file);
+ builder.unindent_and_add(fake_file->source());
+ quickbook::file_ptr f1 = builder.release();
+ BOOST_TEST_EQ(
+ f1->source(), quickbook::string_view("Code line1\n\nCode line2\n"));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin()),
+ quickbook::file_position(1, 4));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin() + 1),
+ quickbook::file_position(1, 5));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin() + 5),
+ quickbook::file_position(1, 9));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin() + 10),
+ quickbook::file_position(1, 14));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin() + 11),
+ quickbook::file_position(2, 1));
+ BOOST_TEST_EQ(
+ f1->position_of(f1->source().begin() + 12),
+ quickbook::file_position(3, 4));
+ }
+}
+
+void indented_map_leading_blanks_test()
+{
+ quickbook::mapped_file_builder builder;
+
+ {
+ quickbook::string_view source("\n\n Code line1\n");
+ quickbook::file_ptr fake_file =
+ new quickbook::file("(fake file)", source, 105u);
+ builder.start(fake_file);
+ builder.unindent_and_add(fake_file->source());
+ quickbook::file_ptr f1 = builder.release();
+ BOOST_TEST_EQ(f1->source(), quickbook::string_view("Code line1\n"));
+ }
+
+ {
+ quickbook::string_view source(" \n \n Code line1\n");
+ quickbook::file_ptr fake_file =
+ new quickbook::file("(fake file)", source, 105u);
+ builder.start(fake_file);
+ builder.unindent_and_add(fake_file->source());
+ quickbook::file_ptr f1 = builder.release();
+ BOOST_TEST_EQ(f1->source(), quickbook::string_view("Code line1\n"));
+ }
+
+ {
+ quickbook::string_view source(" Code line1\n \n Code line2");
+ quickbook::file_ptr fake_file =
+ new quickbook::file("(fake file)", source, 105u);
+ builder.start(fake_file);
+ builder.unindent_and_add(fake_file->source());
+ quickbook::file_ptr f1 = builder.release();
+ BOOST_TEST_EQ(
+ f1->source(), quickbook::string_view("Code line1\n\nCode line2"));
+ }
+}
+
+void indented_map_trailing_blanks_test()
+{
+ quickbook::mapped_file_builder builder;
+
+ {
+ quickbook::string_view source("\n\n Code line1\n ");
+ quickbook::file_ptr fake_file =
+ new quickbook::file("(fake file)", source, 105u);
+ builder.start(fake_file);
+ builder.unindent_and_add(fake_file->source());
+ quickbook::file_ptr f1 = builder.release();
+ BOOST_TEST_EQ(f1->source(), quickbook::string_view("Code line1\n"));
+ }
+
+ {
+ quickbook::string_view source(" \n \n Code line1\n ");
+ quickbook::file_ptr fake_file =
+ new quickbook::file("(fake file)", source, 105u);
+ builder.start(fake_file);
+ builder.unindent_and_add(fake_file->source());
+ quickbook::file_ptr f1 = builder.release();
+ BOOST_TEST_EQ(f1->source(), quickbook::string_view("Code line1\n "));
+ }
+
+ {
+ quickbook::string_view source(" Code line1\n \n Code line2\n ");
+ quickbook::file_ptr fake_file =
+ new quickbook::file("(fake file)", source, 105u);
+ builder.start(fake_file);
+ builder.unindent_and_add(fake_file->source());
+ quickbook::file_ptr f1 = builder.release();
+ BOOST_TEST_EQ(
+ f1->source(), quickbook::string_view("Code line1\n\nCode line2\n"));
+ }
+}
+
+void indented_map_mixed_test()
+{
+ quickbook::mapped_file_builder builder;
+
+ {
+ quickbook::string_view source("\tCode line 1\n Code line 2\n\t "
+ "Code line 3\n \tCode line 4");
+ quickbook::file_ptr fake_file =
+ new quickbook::file("(fake file)", source, 105u);
+ builder.start(fake_file);
+ builder.unindent_and_add(fake_file->source());
+ quickbook::file_ptr f1 = builder.release();
+ BOOST_TEST_EQ(
+ f1->source(),
+ quickbook::string_view(
+ "Code line 1\nCode line 2\n Code line 3\n Code line 4"));
+ }
+
+ {
+ quickbook::string_view source(" Code line 1\n\tCode line 2");
+ quickbook::file_ptr fake_file =
+ new quickbook::file("(fake file)", source, 105u);
+ builder.start(fake_file);
+ builder.unindent_and_add(fake_file->source());
+ quickbook::file_ptr f1 = builder.release();
+ BOOST_TEST_EQ(
+ f1->source(), quickbook::string_view("Code line 1\n Code line 2"));
+ }
+
+ {
+ quickbook::string_view source(" Code line 1\n \tCode line 2");
+ quickbook::file_ptr fake_file =
+ new quickbook::file("(fake file)", source, 105u);
+ builder.start(fake_file);
+ builder.unindent_and_add(fake_file->source());
+ quickbook::file_ptr f1 = builder.release();
+ BOOST_TEST_EQ(
+ f1->source(), quickbook::string_view("Code line 1\n\tCode line 2"));
+ }
+}
+
+int main()
+{
+ simple_map_tests();
+ indented_map_tests();
+ indented_map_tests2();
+ indented_map_leading_blanks_test();
+ indented_map_trailing_blanks_test();
+ indented_map_mixed_test();
+ return boost::report_errors();
+}
diff --git a/src/boost/tools/quickbook/test/unit/symbols_find_null.cpp b/src/boost/tools/quickbook/test/unit/symbols_find_null.cpp
new file mode 100644
index 000000000..0be8ab1e5
--- /dev/null
+++ b/src/boost/tools/quickbook/test/unit/symbols_find_null.cpp
@@ -0,0 +1,36 @@
+/*=============================================================================
+ Copyright (c) 2004 Joao Abecasis
+ http://spirit.sourceforge.net/
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+=============================================================================*/
+
+#include <boost/spirit/include/classic_scanner.hpp>
+#include <boost/utility/addressof.hpp>
+#include "symbols.hpp"
+
+typedef char char_type;
+typedef char const* iterator;
+
+char_type data_[] = "whatever";
+
+iterator begin = data_;
+iterator end =
+ data_ +
+ sizeof(data_) / sizeof(char_type); // Yes, this is an intentional bug ;)
+
+int main()
+{
+ typedef BOOST_SPIRIT_CLASSIC_NS::scanner<> scanner;
+ typedef quickbook::tst<void*, char_type> symbols;
+
+ symbols symbols_;
+
+ symbols_.add(begin, end - 1, (void*)boost::addressof(symbols_));
+
+ // The symbol table parser should not choke on input containing the null
+ // character.
+ symbols_.find(scanner(begin, end));
+}
diff --git a/src/boost/tools/quickbook/test/unit/symbols_tests.cpp b/src/boost/tools/quickbook/test/unit/symbols_tests.cpp
new file mode 100644
index 000000000..41f37b5e7
--- /dev/null
+++ b/src/boost/tools/quickbook/test/unit/symbols_tests.cpp
@@ -0,0 +1,374 @@
+/*=============================================================================
+ Copyright (c) 1998-2003 Joel de Guzman
+ Copyright (c) 2003 Martin Wille
+ http://spirit.sourceforge.net/
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+=============================================================================*/
+#include <iostream>
+#include <string>
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/spirit/include/classic_core.hpp>
+#include <boost/spirit/include/classic_symbols.hpp>
+#include <boost/swap.hpp>
+#include "symbols.hpp"
+
+///////////////////////////////////////////////////////////////////////////////
+using namespace std;
+using namespace BOOST_SPIRIT_CLASSIC_NS;
+
+///////////////////////////////////////////////////////////////////////////////
+
+template <typename IteratorT> bool equal(IteratorT p, IteratorT q)
+{
+ while (*p && *p == *q) {
+ ++p;
+ ++q;
+ }
+ return *p == *q;
+}
+
+template <class SymbolsT, typename CharT>
+void docheck(
+ SymbolsT const& sym,
+ CharT const* candidate,
+ bool hit,
+ CharT const* result,
+ int length)
+{
+ parse_info<CharT const*> info = parse(candidate, sym);
+
+#define correctly_matched hit == info.hit
+#define correct_match_length unsigned(length) == info.length
+#define correct_tail equal(candidate + (hit ? 1 : 0) * length, result)
+
+ BOOST_TEST(correctly_matched);
+
+ if (hit) {
+ BOOST_TEST(correct_match_length);
+ BOOST_TEST(correct_tail);
+ }
+ else {
+ BOOST_TEST(correct_tail);
+ }
+}
+
+template <typename T> struct store_action
+{
+ store_action(T const& v) : value(v) {}
+ void operator()(T& v) const { v = value; }
+
+ private:
+ T const value;
+};
+
+template <typename T> store_action<T> store(T const& v) { return v; }
+
+template <typename T> struct check_action
+{
+ check_action(T const& v) : value(v) {}
+
+#define correct_value_stored (v == value)
+ void operator()(T const& v) const { BOOST_TEST(correct_value_stored); }
+
+ private:
+ T const value;
+};
+
+template <typename T> check_action<T> docheck(T const& v) { return v; }
+
+static void default_constructible()
+{ // this actually a compile time test
+ symbols<int, char, quickbook::tst<int, char> > ns1;
+ symbols<int, wchar_t, quickbook::tst<int, wchar_t> > ws1;
+ symbols<std::string, char, quickbook::tst<std::string, char> > ns2;
+ symbols<std::string, wchar_t, quickbook::tst<std::string, wchar_t> > ws2;
+
+ (void)ns1;
+ (void)ws1;
+ (void)ns2;
+ (void)ws2;
+}
+
+typedef symbols<int, char, quickbook::tst<int, char> > nsymbols;
+typedef symbols<int, wchar_t, quickbook::tst<int, wchar_t> > wsymbols;
+
+static void narrow_match_tests()
+{
+ nsymbols sym;
+ sym = "pineapple", "orange", "banana", "applepie", "apple";
+
+ docheck(sym, "pineapple", true, "", 9);
+ docheck(sym, "orange", true, "", 6);
+ docheck(sym, "banana", true, "", 6);
+ docheck(sym, "apple", true, "", 5);
+ docheck(sym, "pizza", false, "pizza", -1);
+ docheck(sym, "steak", false, "steak", -1);
+ docheck(sym, "applepie", true, "", 8);
+ docheck(sym, "bananarama", true, "rama", 6);
+ docheck(sym, "applet", true, "t", 5);
+ docheck(sym, "applepi", true, "pi", 5);
+ docheck(sym, "appl", false, "appl", -1);
+
+ docheck(sym, "pineapplez", true, "z", 9);
+ docheck(sym, "orangez", true, "z", 6);
+ docheck(sym, "bananaz", true, "z", 6);
+ docheck(sym, "applez", true, "z", 5);
+ docheck(sym, "pizzaz", false, "pizzaz", -1);
+ docheck(sym, "steakz", false, "steakz", -1);
+ docheck(sym, "applepiez", true, "z", 8);
+ docheck(sym, "bananaramaz", true, "ramaz", 6);
+ docheck(sym, "appletz", true, "tz", 5);
+ docheck(sym, "applepix", true, "pix", 5);
+}
+
+static void narrow_copy_ctor_tests()
+{
+ nsymbols sym;
+ sym = "pineapple", "orange", "banana", "applepie", "apple";
+
+ nsymbols sym2(sym);
+ docheck(sym2, "pineapple", true, "", 9);
+ docheck(sym2, "pizza", false, "pizza", -1);
+ docheck(sym2, "bananarama", true, "rama", 6);
+}
+
+static void narrow_assigment_operator_tests()
+{
+ nsymbols sym;
+ sym = "pineapple", "orange", "banana", "applepie", "apple";
+
+ nsymbols sym2;
+ sym2 = sym;
+
+ docheck(sym2, "pineapple", true, "", 9);
+ docheck(sym2, "pizza", false, "pizza", -1);
+ docheck(sym2, "bananarama", true, "rama", 6);
+}
+
+static void narrow_swap_tests()
+{
+ nsymbols sym, sym2;
+ sym = "pineapple", "orange", "banana", "applepie", "apple";
+ sym2 = "potato", "cucumber", "cauliflower", "carrot";
+
+ boost::swap(sym, sym2);
+
+ docheck(sym2, "pineapple", true, "", 9);
+ docheck(sym2, "pizza", false, "pizza", -1);
+ docheck(sym2, "bananarama", true, "rama", 6);
+ docheck(sym, "potatoe", true, "e", 6);
+ docheck(sym, "cauliflour", false, "cauliflour", -1);
+}
+
+static void narrow_value_tests()
+{ // also tests the add member functions
+ nsymbols sym;
+
+ sym = "orange", "banana";
+ sym.add("pineapple", 1234);
+ sym.add("lemon");
+
+ parse("orange", sym[store(12345)]);
+ parse("orange", sym[docheck(12345)]);
+ parse("pineapple", sym[docheck(1234)]);
+ parse("banana", sym[docheck(int())]);
+ parse("lemon", sym[docheck(int())]);
+}
+
+static void narrow_free_functions_tests()
+{
+ nsymbols sym;
+
+#define add_returned_non_null_value (res != 0)
+#define add_returned_null (res == 0)
+#define find_returned_non_null_value (res != 0)
+#define find_returned_null (res == 0)
+
+ int* res = add(sym, "pineapple");
+ BOOST_TEST(add_returned_non_null_value);
+ res = add(sym, "pineapple");
+ BOOST_TEST(add_returned_null);
+
+ res = find(sym, "pineapple");
+ BOOST_TEST(find_returned_non_null_value);
+ res = find(sym, "banana");
+ BOOST_TEST(find_returned_null);
+}
+
+static void wide_match_tests()
+{
+ wsymbols sym;
+ sym = L"pineapple", L"orange", L"banana", L"applepie", L"apple";
+
+ docheck(sym, L"pineapple", true, L"", 9);
+ docheck(sym, L"orange", true, L"", 6);
+ docheck(sym, L"banana", true, L"", 6);
+ docheck(sym, L"apple", true, L"", 5);
+ docheck(sym, L"pizza", false, L"pizza", -1);
+ docheck(sym, L"steak", false, L"steak", -1);
+ docheck(sym, L"applepie", true, L"", 8);
+ docheck(sym, L"bananarama", true, L"rama", 6);
+ docheck(sym, L"applet", true, L"t", 5);
+ docheck(sym, L"applepi", true, L"pi", 5);
+ docheck(sym, L"appl", false, L"appl", -1);
+
+ docheck(sym, L"pineapplez", true, L"z", 9);
+ docheck(sym, L"orangez", true, L"z", 6);
+ docheck(sym, L"bananaz", true, L"z", 6);
+ docheck(sym, L"applez", true, L"z", 5);
+ docheck(sym, L"pizzaz", false, L"pizzaz", -1);
+ docheck(sym, L"steakz", false, L"steakz", -1);
+ docheck(sym, L"applepiez", true, L"z", 8);
+ docheck(sym, L"bananaramaz", true, L"ramaz", 6);
+ docheck(sym, L"appletz", true, L"tz", 5);
+ docheck(sym, L"applepix", true, L"pix", 5);
+}
+
+static void wide_copy_ctor_tests()
+{
+ wsymbols sym;
+ sym = L"pineapple", L"orange", L"banana", L"applepie", L"apple";
+
+ wsymbols sym2(sym);
+ docheck(sym2, L"pineapple", true, L"", 9);
+ docheck(sym2, L"pizza", false, L"pizza", -1);
+ docheck(sym2, L"bananarama", true, L"rama", 6);
+}
+
+static void wide_assigment_operator_tests()
+{
+ wsymbols sym;
+ sym = L"pineapple", L"orange", L"banana", L"applepie", L"apple";
+
+ wsymbols sym2;
+ sym2 = sym;
+
+ docheck(sym2, L"pineapple", true, L"", 9);
+ docheck(sym2, L"pizza", false, L"pizza", -1);
+ docheck(sym2, L"bananarama", true, L"rama", 6);
+}
+
+static void wide_swap_tests()
+{
+ wsymbols sym, sym2;
+ sym = L"pineapple", L"orange", L"banana", L"applepie", L"apple";
+ sym2 = L"potato", L"cucumber", L"cauliflower", L"carrot";
+
+ boost::swap(sym, sym2);
+
+ docheck(sym2, L"pineapple", true, L"", 9);
+ docheck(sym2, L"pizza", false, L"pizza", -1);
+ docheck(sym2, L"bananarama", true, L"rama", 6);
+ docheck(sym, L"potatoe", true, L"e", 6);
+ docheck(sym, L"cauliflour", false, L"cauliflour", -1);
+}
+
+static void wide_value_tests()
+{ // also tests the add member functions
+ wsymbols sym;
+
+ sym = L"orange", L"banana";
+ sym.add(L"pineapple", 1234);
+ sym.add(L"lemon");
+
+ parse(L"orange", sym[store(12345)]);
+ parse(L"orange", sym[docheck(12345)]);
+ parse(L"pineapple", sym[docheck(1234)]);
+ parse(L"banana", sym[docheck(int())]);
+ parse(L"lemon", sym[docheck(int())]);
+}
+
+static void wide_free_functions_tests()
+{
+ wsymbols sym;
+
+ int* res = add(sym, L"pineapple");
+ BOOST_TEST(add_returned_non_null_value);
+ res = add(sym, L"pineapple");
+ BOOST_TEST(add_returned_null);
+
+ res = find(sym, L"pineapple");
+ BOOST_TEST(find_returned_non_null_value);
+ res = find(sym, L"banana");
+ BOOST_TEST(find_returned_null);
+}
+
+static void free_add_find_functions_tests()
+{
+ nsymbols sym;
+ BOOST_TEST(*add(sym, "a", 0) == 0);
+ BOOST_TEST(*add(sym, "a2", 1) == 1);
+ BOOST_TEST(add(sym, "a2", 2) == 0);
+ BOOST_TEST(find(sym, "a2"));
+ BOOST_TEST(find(sym, "a"));
+}
+
+// The original teneray search tree implementation contained a bug when
+// inserting duplicate values. I want this implementation to be as
+// close as possible to the original (so they can be easily switched)
+// so check that the bug remains the same.
+
+struct check_parse_value
+{
+ explicit check_parse_value(int value) : value_(value) {}
+
+ void operator()(int value) const { BOOST_TEST(value == value_); }
+
+ int value_;
+};
+
+// My version is different to the original, if there's an existing value
+// it replaces it with the new one.
+
+static void duplicate_add_tests()
+{
+ char const* foo1 = "foo";
+ char const* foo2 = foo1 + 3;
+
+ nsymbols sym;
+ sym.add(foo1, foo2, 1);
+ nsymbols sym2 = sym;
+ sym.add(foo1, foo2, 2);
+ sym2.add(foo1, foo2, 3);
+
+ BOOST_TEST(find(sym, "foo") && *find(sym, "foo") == 2);
+ BOOST_TEST(find(sym2, "foo") && *find(sym2, "foo") == 3);
+
+ parse_info<char const*> info;
+
+ info = parse("foo ", sym[check_parse_value(2)]);
+ BOOST_TEST(info.hit && info.length == 3);
+
+ info = parse("foo", sym[check_parse_value(2)]);
+ BOOST_TEST(info.hit && info.length == 3);
+
+ info = parse("foo ", sym2[check_parse_value(3)]);
+ BOOST_TEST(info.hit && info.length == 3);
+
+ info = parse("foo", sym2[check_parse_value(3)]);
+ BOOST_TEST(info.hit && info.length == 3);
+}
+
+int main()
+{
+ default_constructible();
+ narrow_match_tests();
+ narrow_copy_ctor_tests();
+ narrow_assigment_operator_tests();
+ narrow_swap_tests();
+ narrow_value_tests();
+ narrow_free_functions_tests();
+ wide_match_tests();
+ wide_copy_ctor_tests();
+ wide_assigment_operator_tests();
+ wide_swap_tests();
+ wide_value_tests();
+ wide_free_functions_tests();
+ free_add_find_functions_tests();
+ duplicate_add_tests();
+
+ return boost::report_errors();
+}
diff --git a/src/boost/tools/quickbook/test/unit/utils_test.cpp b/src/boost/tools/quickbook/test/unit/utils_test.cpp
new file mode 100644
index 000000000..6a54dccfe
--- /dev/null
+++ b/src/boost/tools/quickbook/test/unit/utils_test.cpp
@@ -0,0 +1,67 @@
+
+/*=============================================================================
+ Copyright (c) 2017 Daniel James
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+=============================================================================*/
+
+#include <boost/detail/lightweight_test.hpp>
+#include "utils.hpp"
+
+#include <iostream>
+
+void linkify_test()
+{
+ using quickbook::detail::linkify;
+
+ BOOST_TEST(linkify("abc", "link") == "<link linkend=\"link\">abc</link>");
+ BOOST_TEST(
+ linkify("<link linkend=\"something\">abc</link>", "link") ==
+ "<link linkend=\"something\">abc</link>");
+ BOOST_TEST(
+ linkify("abc <link linkend=\"something\">def</link>", "link") ==
+ "abc <link linkend=\"something\">def</link>");
+ BOOST_TEST(
+ linkify("<link linkend=\"something\">abc</link> def", "link") ==
+ "<link linkend=\"something\">abc</link> def");
+}
+
+void decode_string_test()
+{
+ using quickbook::detail::decode_string;
+ BOOST_TEST_EQ(std::string("<A&B>"), decode_string("&lt;A&amp;B&gt;"));
+ BOOST_TEST_EQ(std::string("<A&B>"), decode_string("&lt;A&B&gt;"));
+ BOOST_TEST_EQ(std::string("a"), decode_string("&#97;"));
+ BOOST_TEST_EQ(std::string("OO"), decode_string("&#x4f;&#x4F;"));
+ // Unicode examples taken from wikipedia.
+ // https://en.wikipedia.org/wiki/UTF-8#Examples
+ BOOST_TEST_EQ(
+ std::string("\x24\xc2\xa2\xe2\x82\xAC\xF0\x90\x8D\x88"),
+ decode_string("&#x24;&#xA2;&#x20AC;&#x10348;"));
+}
+
+void encode_string_test()
+{
+ using quickbook::detail::encode_string;
+ BOOST_TEST_EQ(std::string("&lt;A&amp;B&gt;"), encode_string("<A&B>"));
+}
+
+void escape_uri_test()
+{
+ using quickbook::detail::escape_uri;
+ using quickbook::detail::partially_escape_uri;
+
+ BOOST_TEST_EQ(std::string("%2520%2525%25"), escape_uri("%20%25%"));
+ BOOST_TEST_EQ(std::string("%20%25%25"), partially_escape_uri("%20%25%"));
+}
+
+int main()
+{
+ linkify_test();
+ decode_string_test();
+ encode_string_test();
+ escape_uri_test();
+ return boost::report_errors();
+}
diff --git a/src/boost/tools/quickbook/test/unit/values_test.cpp b/src/boost/tools/quickbook/test/unit/values_test.cpp
new file mode 100644
index 000000000..d0036d428
--- /dev/null
+++ b/src/boost/tools/quickbook/test/unit/values_test.cpp
@@ -0,0 +1,128 @@
+/*=============================================================================
+ Copyright (c) 2010-2011 Daniel James
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+=============================================================================*/
+
+// Some very light testing for quickbook::value and friends.
+// Just for a few issues that came up during development.
+
+#include <vector>
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/range/algorithm/equal.hpp>
+#include "files.hpp"
+#include "values.hpp"
+
+void empty_tests()
+{
+ quickbook::value q;
+ BOOST_TEST(q.empty());
+ BOOST_TEST(!q.is_list());
+ BOOST_TEST(!q.is_encoded());
+}
+
+void qbk_tests()
+{
+ std::string source = "Source";
+ quickbook::value q;
+ {
+ quickbook::file_ptr fake_file =
+ new quickbook::file("(fake file)", source, 105u);
+ q = quickbook::qbk_value(
+ fake_file, fake_file->source().begin(), fake_file->source().end());
+ }
+ BOOST_TEST_EQ(q.get_quickbook(), quickbook::string_view(source));
+}
+
+void sort_test()
+{
+ quickbook::value_builder b;
+ b.insert(quickbook::encoded_value("a", 10));
+ b.insert(quickbook::encoded_value("b", 2));
+ b.insert(quickbook::encoded_value("c", 5));
+ b.insert(quickbook::encoded_value("d", 8));
+ b.sort_list();
+
+ quickbook::value_consumer c = b.release();
+ BOOST_TEST(c.check(2));
+ BOOST_TEST_EQ(c.consume(2).get_encoded(), "b");
+ BOOST_TEST(c.check(5));
+ c.consume(5);
+ BOOST_TEST(c.check(8));
+ c.consume(8);
+ BOOST_TEST(c.check(10));
+ c.consume(10);
+ BOOST_TEST(!c.check());
+}
+
+void multiple_list_test()
+{
+ quickbook::value_builder list1;
+ quickbook::value_builder list2;
+
+ list1.insert(quickbook::encoded_value("b", 10));
+
+ {
+ quickbook::value p1 = quickbook::encoded_value("a", 5);
+ list1.insert(p1);
+ list2.insert(p1);
+ }
+
+ list2.insert(quickbook::encoded_value("c", 3));
+
+ quickbook::value_consumer l1 = list1.release();
+ quickbook::value_consumer l2 = list2.release();
+
+ BOOST_TEST(l1.check(10));
+ BOOST_TEST_EQ(l1.consume(10).get_encoded(), "b");
+ BOOST_TEST(l1.check(5));
+ BOOST_TEST_EQ(l1.consume(5).get_encoded(), "a");
+ BOOST_TEST(!l1.check());
+
+ BOOST_TEST(l2.check(5));
+ BOOST_TEST_EQ(l2.consume(5).get_encoded(), "a");
+ BOOST_TEST(l2.check(3));
+ BOOST_TEST_EQ(l2.consume(3).get_encoded(), "c");
+ BOOST_TEST(!l2.check());
+}
+
+void equality_tests()
+{
+ std::vector<quickbook::value> distinct_values;
+
+ quickbook::value_builder builder;
+ quickbook::value nil;
+
+ // 0: nil
+ distinct_values.push_back(nil);
+
+ // 1: []
+ distinct_values.push_back(builder.release());
+
+ // 2: [nil]
+ builder.insert(nil);
+ distinct_values.push_back(builder.release());
+
+ for (std::size_t i = 0; i < distinct_values.size(); ++i) {
+ for (std::size_t j = 0; j < distinct_values.size(); ++j) {
+ if ((i == j) != (distinct_values[i] == distinct_values[j])) {
+ BOOST_ERROR("Value mismatch.");
+ BOOST_LIGHTWEIGHT_TEST_OSTREAM << "\tat " << i << ", " << j
+ << std::endl;
+ }
+ }
+ }
+}
+
+int main()
+{
+ empty_tests();
+ qbk_tests();
+ sort_test();
+ multiple_list_test();
+ equality_tests();
+
+ return boost::report_errors();
+}
diff --git a/src/boost/tools/quickbook/test/unmatched_element-1_5.gold b/src/boost/tools/quickbook/test/unmatched_element-1_5.gold
new file mode 100644
index 000000000..735503ac5
--- /dev/null
+++ b/src/boost/tools/quickbook/test/unmatched_element-1_5.gold
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="unmatched_elements" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Unmatched elements</title>
+ <para>
+ <emphasis role="bold">[non-element</emphasis>]
+ </para>
+ <para>
+ [non-element]
+ </para>
+</article>
diff --git a/src/boost/tools/quickbook/test/unmatched_element-1_5.gold-html b/src/boost/tools/quickbook/test/unmatched_element-1_5.gold-html
new file mode 100644
index 000000000..a705860f6
--- /dev/null
+++ b/src/boost/tools/quickbook/test/unmatched_element-1_5.gold-html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Unmatched elements
+ </h3>
+ <p>
+ <span class="bold"><strong>[non-element</strong></span>]
+ </p>
+ <p>
+ [non-element]
+ </p>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/unmatched_element-1_5.quickbook b/src/boost/tools/quickbook/test/unmatched_element-1_5.quickbook
new file mode 100644
index 000000000..84ea298d0
--- /dev/null
+++ b/src/boost/tools/quickbook/test/unmatched_element-1_5.quickbook
@@ -0,0 +1,12 @@
+[article Unmatched elements
+[quickbook 1.5]
+]
+
+[template identity[x]
+
+[x]
+]
+
+[* [non-element]]
+
+[identity [non-element]] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/unmatched_element-1_6.gold b/src/boost/tools/quickbook/test/unmatched_element-1_6.gold
new file mode 100644
index 000000000..ad52f651a
--- /dev/null
+++ b/src/boost/tools/quickbook/test/unmatched_element-1_6.gold
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="unmatched_elements" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Unmatched elements</title>
+ <para>
+ <emphasis role="bold">[non-element]</emphasis>
+ </para>
+ <para>
+ [non-element]
+ </para>
+</article>
diff --git a/src/boost/tools/quickbook/test/unmatched_element-1_6.gold-html b/src/boost/tools/quickbook/test/unmatched_element-1_6.gold-html
new file mode 100644
index 000000000..20a7f3223
--- /dev/null
+++ b/src/boost/tools/quickbook/test/unmatched_element-1_6.gold-html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Unmatched elements
+ </h3>
+ <p>
+ <span class="bold"><strong>[non-element]</strong></span>
+ </p>
+ <p>
+ [non-element]
+ </p>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/unmatched_element-1_6.quickbook b/src/boost/tools/quickbook/test/unmatched_element-1_6.quickbook
new file mode 100644
index 000000000..689e9828a
--- /dev/null
+++ b/src/boost/tools/quickbook/test/unmatched_element-1_6.quickbook
@@ -0,0 +1,12 @@
+[article Unmatched elements
+[quickbook 1.6]
+]
+
+[template identity[x]
+
+[x]
+]
+
+[* [non-element]]
+
+[identity [non-element]] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/utf16be_bom-1_5-fail.quickbook b/src/boost/tools/quickbook/test/utf16be_bom-1_5-fail.quickbook
new file mode 100644
index 000000000..be2bcbc44
--- /dev/null
+++ b/src/boost/tools/quickbook/test/utf16be_bom-1_5-fail.quickbook
Binary files differ
diff --git a/src/boost/tools/quickbook/test/utf16le_bom-1_5-fail.quickbook b/src/boost/tools/quickbook/test/utf16le_bom-1_5-fail.quickbook
new file mode 100644
index 000000000..d9782a465
--- /dev/null
+++ b/src/boost/tools/quickbook/test/utf16le_bom-1_5-fail.quickbook
Binary files differ
diff --git a/src/boost/tools/quickbook/test/utf8-1_5.gold b/src/boost/tools/quickbook/test/utf8-1_5.gold
new file mode 100644
index 000000000..088b314b3
--- /dev/null
+++ b/src/boost/tools/quickbook/test/utf8-1_5.gold
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="utf_8_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>UTF-8 test</title>
+ <bridgehead renderas="sect2" id="utf_8_test.h0">
+ <phrase id="utf_8_test.i__t__rn__ti__n__liz__ti__n"/><link linkend="utf_8_test.i__t__rn__ti__n__liz__ti__n">Iñtërnâtiônàlizætiøn</link>
+ </bridgehead>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Αα Alpha
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ββ Beta
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Γγ Gamma
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Δδ Delta
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Εε Epsilon
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ζζ Zeta
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ηη Eta
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Θθ Theta
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ιι Iota
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Κκ Kappa
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Λλ Lambda
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Μμ Mu
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Νν Nu
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ξξ Xi
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Οο Omicron
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ππ Pi
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ρρ Rho
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Σσς Sigma
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ττ Tau
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Υυ Upsilon
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Φφ Phi
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Χχ Chi
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ψψ Psi
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ωω Omega
+ </simpara>
+ </listitem>
+ </itemizedlist>
+</article>
diff --git a/src/boost/tools/quickbook/test/utf8-1_5.gold-html b/src/boost/tools/quickbook/test/utf8-1_5.gold-html
new file mode 100644
index 000000000..adf6b9569
--- /dev/null
+++ b/src/boost/tools/quickbook/test/utf8-1_5.gold-html
@@ -0,0 +1,134 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ UTF-8 test
+ </h3>
+ <h2 id="utf_8_test.i__t__rn__ti__n__liz__ti__n">
+ Iñtërnâtiônàlizætiøn
+ </h2>
+ <ul>
+ <li>
+ <div>
+ Αα Alpha
+ </div>
+ </li>
+ <li>
+ <div>
+ Ββ Beta
+ </div>
+ </li>
+ <li>
+ <div>
+ Γγ Gamma
+ </div>
+ </li>
+ <li>
+ <div>
+ Δδ Delta
+ </div>
+ </li>
+ <li>
+ <div>
+ Εε Epsilon
+ </div>
+ </li>
+ <li>
+ <div>
+ Ζζ Zeta
+ </div>
+ </li>
+ <li>
+ <div>
+ Ηη Eta
+ </div>
+ </li>
+ <li>
+ <div>
+ Θθ Theta
+ </div>
+ </li>
+ <li>
+ <div>
+ Ιι Iota
+ </div>
+ </li>
+ <li>
+ <div>
+ Κκ Kappa
+ </div>
+ </li>
+ <li>
+ <div>
+ Λλ Lambda
+ </div>
+ </li>
+ <li>
+ <div>
+ Μμ Mu
+ </div>
+ </li>
+ <li>
+ <div>
+ Νν Nu
+ </div>
+ </li>
+ <li>
+ <div>
+ Ξξ Xi
+ </div>
+ </li>
+ <li>
+ <div>
+ Οο Omicron
+ </div>
+ </li>
+ <li>
+ <div>
+ Ππ Pi
+ </div>
+ </li>
+ <li>
+ <div>
+ Ρρ Rho
+ </div>
+ </li>
+ <li>
+ <div>
+ Σσς Sigma
+ </div>
+ </li>
+ <li>
+ <div>
+ Ττ Tau
+ </div>
+ </li>
+ <li>
+ <div>
+ Υυ Upsilon
+ </div>
+ </li>
+ <li>
+ <div>
+ Φφ Phi
+ </div>
+ </li>
+ <li>
+ <div>
+ Χχ Chi
+ </div>
+ </li>
+ <li>
+ <div>
+ Ψψ Psi
+ </div>
+ </li>
+ <li>
+ <div>
+ Ωω Omega
+ </div>
+ </li>
+ </ul>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/utf8-1_5.quickbook b/src/boost/tools/quickbook/test/utf8-1_5.quickbook
new file mode 100644
index 000000000..96f02f4f4
--- /dev/null
+++ b/src/boost/tools/quickbook/test/utf8-1_5.quickbook
@@ -0,0 +1,30 @@
+[article UTF-8 test
+ [quickbook 1.5]
+]
+
+[heading Iñtërnâtiônàlizætiøn]
+
+* Αα Alpha
+* Ββ Beta
+* Γγ Gamma
+* Δδ Delta
+* Εε Epsilon
+* Ζζ Zeta
+* Ηη Eta
+* Θθ Theta
+* Ιι Iota
+* Κκ Kappa
+* Λλ Lambda
+* Μμ Mu
+* Νν Nu
+* Ξξ Xi
+* Οο Omicron
+* Ππ Pi
+* Ρρ Rho
+* Σσς Sigma
+* Ττ Tau
+* Υυ Upsilon
+* Φφ Phi
+* Χχ Chi
+* Ψψ Psi
+* Ωω Omega \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/utf8_bom-1_5.gold b/src/boost/tools/quickbook/test/utf8_bom-1_5.gold
new file mode 100644
index 000000000..088b314b3
--- /dev/null
+++ b/src/boost/tools/quickbook/test/utf8_bom-1_5.gold
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="utf_8_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>UTF-8 test</title>
+ <bridgehead renderas="sect2" id="utf_8_test.h0">
+ <phrase id="utf_8_test.i__t__rn__ti__n__liz__ti__n"/><link linkend="utf_8_test.i__t__rn__ti__n__liz__ti__n">Iñtërnâtiônàlizætiøn</link>
+ </bridgehead>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Αα Alpha
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ββ Beta
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Γγ Gamma
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Δδ Delta
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Εε Epsilon
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ζζ Zeta
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ηη Eta
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Θθ Theta
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ιι Iota
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Κκ Kappa
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Λλ Lambda
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Μμ Mu
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Νν Nu
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ξξ Xi
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Οο Omicron
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ππ Pi
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ρρ Rho
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Σσς Sigma
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ττ Tau
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Υυ Upsilon
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Φφ Phi
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Χχ Chi
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ψψ Psi
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Ωω Omega
+ </simpara>
+ </listitem>
+ </itemizedlist>
+</article>
diff --git a/src/boost/tools/quickbook/test/utf8_bom-1_5.gold-html b/src/boost/tools/quickbook/test/utf8_bom-1_5.gold-html
new file mode 100644
index 000000000..adf6b9569
--- /dev/null
+++ b/src/boost/tools/quickbook/test/utf8_bom-1_5.gold-html
@@ -0,0 +1,134 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ UTF-8 test
+ </h3>
+ <h2 id="utf_8_test.i__t__rn__ti__n__liz__ti__n">
+ Iñtërnâtiônàlizætiøn
+ </h2>
+ <ul>
+ <li>
+ <div>
+ Αα Alpha
+ </div>
+ </li>
+ <li>
+ <div>
+ Ββ Beta
+ </div>
+ </li>
+ <li>
+ <div>
+ Γγ Gamma
+ </div>
+ </li>
+ <li>
+ <div>
+ Δδ Delta
+ </div>
+ </li>
+ <li>
+ <div>
+ Εε Epsilon
+ </div>
+ </li>
+ <li>
+ <div>
+ Ζζ Zeta
+ </div>
+ </li>
+ <li>
+ <div>
+ Ηη Eta
+ </div>
+ </li>
+ <li>
+ <div>
+ Θθ Theta
+ </div>
+ </li>
+ <li>
+ <div>
+ Ιι Iota
+ </div>
+ </li>
+ <li>
+ <div>
+ Κκ Kappa
+ </div>
+ </li>
+ <li>
+ <div>
+ Λλ Lambda
+ </div>
+ </li>
+ <li>
+ <div>
+ Μμ Mu
+ </div>
+ </li>
+ <li>
+ <div>
+ Νν Nu
+ </div>
+ </li>
+ <li>
+ <div>
+ Ξξ Xi
+ </div>
+ </li>
+ <li>
+ <div>
+ Οο Omicron
+ </div>
+ </li>
+ <li>
+ <div>
+ Ππ Pi
+ </div>
+ </li>
+ <li>
+ <div>
+ Ρρ Rho
+ </div>
+ </li>
+ <li>
+ <div>
+ Σσς Sigma
+ </div>
+ </li>
+ <li>
+ <div>
+ Ττ Tau
+ </div>
+ </li>
+ <li>
+ <div>
+ Υυ Upsilon
+ </div>
+ </li>
+ <li>
+ <div>
+ Φφ Phi
+ </div>
+ </li>
+ <li>
+ <div>
+ Χχ Chi
+ </div>
+ </li>
+ <li>
+ <div>
+ Ψψ Psi
+ </div>
+ </li>
+ <li>
+ <div>
+ Ωω Omega
+ </div>
+ </li>
+ </ul>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/utf8_bom-1_5.quickbook b/src/boost/tools/quickbook/test/utf8_bom-1_5.quickbook
new file mode 100644
index 000000000..443f6c6c0
--- /dev/null
+++ b/src/boost/tools/quickbook/test/utf8_bom-1_5.quickbook
@@ -0,0 +1,30 @@
+[article UTF-8 test
+ [quickbook 1.5]
+]
+
+[heading Iñtërnâtiônàlizætiøn]
+
+* Αα Alpha
+* Ββ Beta
+* Γγ Gamma
+* Δδ Delta
+* Εε Epsilon
+* Ζζ Zeta
+* Ηη Eta
+* Θθ Theta
+* Ιι Iota
+* Κκ Kappa
+* Λλ Lambda
+* Μμ Mu
+* Νν Nu
+* Ξξ Xi
+* Οο Omicron
+* Ππ Pi
+* Ρρ Rho
+* Σσς Sigma
+* Ττ Tau
+* Υυ Upsilon
+* Φφ Phi
+* Χχ Chi
+* Ψψ Psi
+* Ωω Omega \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/variablelist-1_5-fail.quickbook b/src/boost/tools/quickbook/test/variablelist-1_5-fail.quickbook
new file mode 100644
index 000000000..a7e589680
--- /dev/null
+++ b/src/boost/tools/quickbook/test/variablelist-1_5-fail.quickbook
@@ -0,0 +1,5 @@
+[article Parse error [quickbook 1.4]]
+
+[variablelist Variable List
+[[1234]]
+]
diff --git a/src/boost/tools/quickbook/test/variablelist-1_5.gold b/src/boost/tools/quickbook/test/variablelist-1_5.gold
new file mode 100644
index 000000000..08d66133e
--- /dev/null
+++ b/src/boost/tools/quickbook/test/variablelist-1_5.gold
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="variable_list_tests" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Variable List Tests</title>
+ <variablelist>
+ <title>Empty</title>
+ </variablelist>
+ <variablelist>
+ <title>One entry</title>
+ <varlistentry>
+ <term>a</term>
+ <listitem>
+ <para>
+ b
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <variablelist>
+ <title>One entry, multiple items</title>
+ <varlistentry>
+ <term>a</term>
+ <listitem>
+ <para>
+ b
+ </para>
+ <para>
+ c
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <variablelist>
+ <title>Several entries</title>
+ <varlistentry>
+ <term>a</term>
+ <listitem>
+ <para>
+ b
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>a</term>
+ <listitem>
+ <para>
+ b
+ </para>
+ <para>
+ c
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>a</term>
+ <listitem>
+ <para>
+ b
+ </para>
+ <para>
+ c
+ </para>
+ <para>
+ d
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>a</term>
+ <listitem>
+ <para>
+ b
+ </para>
+ <para>
+ c
+ </para>
+ <para>
+ d
+ </para>
+ <para>
+ e
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>a</term>
+ <listitem>
+ <para>
+ b
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <anchor id="id1"/>
+ <variablelist>
+ <title>Variable List with anchors</title>
+ <varlistentry>
+ <term><anchor id="id2"/>a<anchor id="id3"/></term>
+ <listitem>
+ <para>
+ <anchor id="id4"/>b<anchor id="id5"/>
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+</article>
diff --git a/src/boost/tools/quickbook/test/variablelist-1_5.gold-html b/src/boost/tools/quickbook/test/variablelist-1_5.gold-html
new file mode 100644
index 000000000..b430fdafd
--- /dev/null
+++ b/src/boost/tools/quickbook/test/variablelist-1_5.gold-html
@@ -0,0 +1,103 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Variable List Tests
+ </h3>
+ <dl>
+ <dt>
+ a
+ </dt>
+ <dd>
+ <p>
+ b
+ </p>
+ </dd>
+ </dl>
+ <dl>
+ <dt>
+ a
+ </dt>
+ <dd>
+ <p>
+ b
+ </p>
+ <p>
+ c
+ </p>
+ </dd>
+ </dl>
+ <dl>
+ <dt>
+ a
+ </dt>
+ <dd>
+ <p>
+ b
+ </p>
+ </dd>
+ <dt>
+ a
+ </dt>
+ <dd>
+ <p>
+ b
+ </p>
+ <p>
+ c
+ </p>
+ </dd>
+ <dt>
+ a
+ </dt>
+ <dd>
+ <p>
+ b
+ </p>
+ <p>
+ c
+ </p>
+ <p>
+ d
+ </p>
+ </dd>
+ <dt>
+ a
+ </dt>
+ <dd>
+ <p>
+ b
+ </p>
+ <p>
+ c
+ </p>
+ <p>
+ d
+ </p>
+ <p>
+ e
+ </p>
+ </dd>
+ <dt>
+ a
+ </dt>
+ <dd>
+ <p>
+ b
+ </p>
+ </dd>
+ </dl>
+ <span id="id1"></span>
+ <dl>
+ <dt>
+ <span id="id2"></span>a<span id="id3"></span>
+ </dt>
+ <dd>
+ <p>
+ <span id="id4"></span>b<span id="id5"></span>
+ </p>
+ </dd>
+ </dl>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/variablelist-1_5.quickbook b/src/boost/tools/quickbook/test/variablelist-1_5.quickbook
new file mode 100644
index 000000000..cb68a6df7
--- /dev/null
+++ b/src/boost/tools/quickbook/test/variablelist-1_5.quickbook
@@ -0,0 +1,30 @@
+[article Variable List Tests
+[quickbook 1.5]
+]
+
+[variablelist Empty
+]
+
+[variablelist One entry
+ [[a][b]]
+]
+
+[variablelist One entry, multiple items
+ [[a][b][c]]
+]
+
+[variablelist Several entries
+ [[a][b]]
+ [[a][b][c]]
+ [[a][b][c][d]]
+ [[a][b][c][d][e]]
+ [[a][b]]
+]
+
+[#id1]
+[variablelist Variable List with anchors
+ [
+ [[#id2]a[#id3]]
+ [[#id4]b[#id5]]
+ ]
+]
diff --git a/src/boost/tools/quickbook/test/version-0_1-fail.quickbook b/src/boost/tools/quickbook/test/version-0_1-fail.quickbook
new file mode 100644
index 000000000..ac3c51250
--- /dev/null
+++ b/src/boost/tools/quickbook/test/version-0_1-fail.quickbook
@@ -0,0 +1,5 @@
+[article Non-existent version of quickbook
+ [quickbook 0.1]
+]
+
+This should fail... \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/version-1_8-fail.quickbook b/src/boost/tools/quickbook/test/version-1_8-fail.quickbook
new file mode 100644
index 000000000..4311034ba
--- /dev/null
+++ b/src/boost/tools/quickbook/test/version-1_8-fail.quickbook
@@ -0,0 +1,5 @@
+[article Future version of quickbook
+ [quickbook 1.8]
+]
+
+This should fail... \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/version-2_0-fail.quickbook b/src/boost/tools/quickbook/test/version-2_0-fail.quickbook
new file mode 100644
index 000000000..973b174f6
--- /dev/null
+++ b/src/boost/tools/quickbook/test/version-2_0-fail.quickbook
@@ -0,0 +1,5 @@
+[article Far future version of quickbook
+ [quickbook 2.0]
+]
+
+This should fail... \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/versions/Jamfile.v2 b/src/boost/tools/quickbook/test/versions/Jamfile.v2
new file mode 100644
index 000000000..dd185d587
--- /dev/null
+++ b/src/boost/tools/quickbook/test/versions/Jamfile.v2
@@ -0,0 +1,19 @@
+#
+# Copyright (c) 2011 Daniel James
+#
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+#
+
+project quickbook/test/versions
+ : requirements
+ <toolset>msvc:<debug-symbols>off
+ ;
+
+import quickbook-testing : quickbook-test quickbook-error-test ;
+
+test-suite quickbook.test :
+ [ quickbook-test versions-1_6 ]
+ [ quickbook-test invalid_macro-1_6 ]
+ ;
diff --git a/src/boost/tools/quickbook/test/versions/invalid_macro-1_6.gold b/src/boost/tools/quickbook/test/versions/invalid_macro-1_6.gold
new file mode 100644
index 000000000..cb6241247
--- /dev/null
+++ b/src/boost/tools/quickbook/test/versions/invalid_macro-1_6.gold
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="invalid_macro_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Invalid macro test</title>
+ <para>
+ Import:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ okay
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ __invalid\macro__
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Include:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ okay
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ bad
+ </simpara>
+ </listitem>
+ </itemizedlist>
+</article>
diff --git a/src/boost/tools/quickbook/test/versions/invalid_macro-1_6.gold-html b/src/boost/tools/quickbook/test/versions/invalid_macro-1_6.gold-html
new file mode 100644
index 000000000..52455ec95
--- /dev/null
+++ b/src/boost/tools/quickbook/test/versions/invalid_macro-1_6.gold-html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Invalid macro test
+ </h3>
+ <p>
+ Import:
+ </p>
+ <ul>
+ <li>
+ <div>
+ okay
+ </div>
+ </li>
+ <li>
+ <div>
+ __invalid\macro__
+ </div>
+ </li>
+ </ul>
+ <p>
+ Include:
+ </p>
+ <ul>
+ <li>
+ <div>
+ okay
+ </div>
+ </li>
+ <li>
+ <div>
+ bad
+ </div>
+ </li>
+ </ul>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/versions/invalid_macro-1_6.quickbook b/src/boost/tools/quickbook/test/versions/invalid_macro-1_6.quickbook
new file mode 100644
index 000000000..860d58b71
--- /dev/null
+++ b/src/boost/tools/quickbook/test/versions/invalid_macro-1_6.quickbook
@@ -0,0 +1,14 @@
+[article Invalid macro test
+[quickbook 1.6]
+]
+
+Import:
+
+[import invalid_macro-inc-1_1.quickbook]
+
+* __valid__
+* __invalid\macro__
+
+Include:
+
+[include invalid_macro-inc-1_1.quickbook]
diff --git a/src/boost/tools/quickbook/test/versions/invalid_macro-inc-1_1.quickbook b/src/boost/tools/quickbook/test/versions/invalid_macro-inc-1_1.quickbook
new file mode 100644
index 000000000..c44bd6741
--- /dev/null
+++ b/src/boost/tools/quickbook/test/versions/invalid_macro-inc-1_1.quickbook
@@ -0,0 +1,7 @@
+[quickbook 1.1]
+
+[def __valid__ okay]
+[def __invalid\macro__ bad]
+
+* __valid__
+* __invalid\macro__
diff --git a/src/boost/tools/quickbook/test/versions/templates-inc-1_1.quickbook b/src/boost/tools/quickbook/test/versions/templates-inc-1_1.quickbook
new file mode 100644
index 000000000..be5365055
--- /dev/null
+++ b/src/boost/tools/quickbook/test/versions/templates-inc-1_1.quickbook
@@ -0,0 +1,15 @@
+[article 1.1 Templates
+[quickbook 1.1]
+]
+
+[template section_1_1[]
+[section In a 1.1 template]
+Some text
+[endsect]
+]
+
+[section 1.1 Document]
+[section_1_1]
+[section_1_4]
+[section_1_5]
+[endsect]
diff --git a/src/boost/tools/quickbook/test/versions/templates-inc-1_4.quickbook b/src/boost/tools/quickbook/test/versions/templates-inc-1_4.quickbook
new file mode 100644
index 000000000..8b565512d
--- /dev/null
+++ b/src/boost/tools/quickbook/test/versions/templates-inc-1_4.quickbook
@@ -0,0 +1,20 @@
+[article 1.4 Templates
+[quickbook 1.4]
+]
+
+[template section_1_4[]
+[section In a 1.4 template]
+Some text
+[endsect]
+]
+
+[section 1.4 Document]
+[section_1_1]
+[section_1_4]
+[section_1_5]
+[endsect]
+
+[/ Odd test for calling 1.4 -> 1.5 -> 1.4 template]
+
+[template skip_1_5[a] [skip_1_5_2 wrong]]
+[template skip_1_5_3[] [a]]
diff --git a/src/boost/tools/quickbook/test/versions/templates-inc-1_5.quickbook b/src/boost/tools/quickbook/test/versions/templates-inc-1_5.quickbook
new file mode 100644
index 000000000..9dd07f693
--- /dev/null
+++ b/src/boost/tools/quickbook/test/versions/templates-inc-1_5.quickbook
@@ -0,0 +1,19 @@
+[article 1.5 Templates
+[quickbook 1.5]
+]
+
+[template section_1_5[]
+[section In a 1.5 template]
+Some text
+[endsect]
+]
+
+[section 1.5 Document]
+[section_1_1]
+[section_1_4]
+[section_1_5]
+[endsect]
+
+[/ Odd test for calling 1.4 -> 1.5 -> 1.4 template]
+
+[template skip_1_5_2[a] [skip_1_5_3]]
diff --git a/src/boost/tools/quickbook/test/versions/versions-1_6.gold b/src/boost/tools/quickbook/test/versions/versions-1_6.gold
new file mode 100644
index 000000000..7b89fdc3d
--- /dev/null
+++ b/src/boost/tools/quickbook/test/versions/versions-1_6.gold
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="mixed_version_tests" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Mixed version tests</title>
+ <para>
+ correct
+ </para>
+ <section id="mixed_version_tests.section_ids">
+ <title><link linkend="mixed_version_tests.section_ids">Section ids in templates</link></title>
+ <section id="mixed_version_tests.section_ids.in_a_1_1_template">
+ <title><link linkend="mixed_version_tests.section_ids.in_a_1_1_template">In
+ a 1.1 template</link></title>
+ <para>
+ Some text
+ </para>
+ </section>
+ <section id="mixed_version_tests.section_ids.in_a_1_4_template">
+ <title><link linkend="mixed_version_tests.section_ids.in_a_1_4_template">In
+ a 1.4 template</link></title>
+ <para>
+ Some text
+ </para>
+ </section>
+ <section id="mixed_version_tests.section_ids.in_a_1_5_template">
+ <title><link linkend="mixed_version_tests.section_ids.in_a_1_5_template">In
+ a 1.5 template</link></title>
+ <para>
+ Some text
+ </para>
+ </section>
+ </section>
+ <article id="1_1_templates" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>1.1 Templates</title>
+ <section id="1_1_templates.1_1_document">
+ <title>1.1 Document</title>
+ <section id="1_1_templates.in_a_1_1_template">
+ <title>In a 1.1 template</title>
+ <para>
+ Some text
+ </para>
+ </section>
+ <section id="1_1_templates.in_a_1_4_template">
+ <title>In a 1.4 template</title>
+ <para>
+ Some text
+ </para>
+ </section>
+ <section id="1_1_templates.in_a_1_5_template">
+ <title>In a 1.5 template</title>
+ <para>
+ Some text
+ </para>
+ </section>
+ </section>
+ </article>
+ <article id="1_4_templates" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>1.4 Templates</title>
+ <section id="1_4_templates.1_4_document">
+ <title><link linkend="1_4_templates.1_4_document">1.4 Document</link></title>
+ <section id="1_4_templates.1_4_document.in_a_1_1_template">
+ <title><link linkend="1_4_templates.1_4_document.in_a_1_1_template">In a
+ 1.1 template</link></title>
+ <para>
+ Some text
+ </para>
+ </section>
+ <section id="1_4_templates.1_4_document.in_a_1_4_template">
+ <title><link linkend="1_4_templates.1_4_document.in_a_1_4_template">In a
+ 1.4 template</link></title>
+ <para>
+ Some text
+ </para>
+ </section>
+ <section id="1_4_templates.1_4_document.in_a_1_5_template">
+ <title><link linkend="1_4_templates.1_4_document.in_a_1_5_template">In a
+ 1.5 template</link></title>
+ <para>
+ Some text
+ </para>
+ </section>
+ </section>
+ </article>
+ <article id="1_5_templates" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>1.5 Templates</title>
+ <section id="1_5_templates.1_5_document">
+ <title><link linkend="1_5_templates.1_5_document">1.5 Document</link></title>
+ <section id="1_5_templates.1_5_document.in_a_1_1_template">
+ <title><link linkend="1_5_templates.1_5_document.in_a_1_1_template">In a
+ 1.1 template</link></title>
+ <para>
+ Some text
+ </para>
+ </section>
+ <section id="1_5_templates.1_5_document.in_a_1_4_template">
+ <title><link linkend="1_5_templates.1_5_document.in_a_1_4_template">In a
+ 1.4 template</link></title>
+ <para>
+ Some text
+ </para>
+ </section>
+ <section id="1_5_templates.1_5_document.in_a_1_5_template">
+ <title><link linkend="1_5_templates.1_5_document.in_a_1_5_template">In a
+ 1.5 template</link></title>
+ <para>
+ Some text
+ </para>
+ </section>
+ </section>
+ </article>
+</article>
diff --git a/src/boost/tools/quickbook/test/versions/versions-1_6.gold-html b/src/boost/tools/quickbook/test/versions/versions-1_6.gold-html
new file mode 100644
index 000000000..f895a387f
--- /dev/null
+++ b/src/boost/tools/quickbook/test/versions/versions-1_6.gold-html
@@ -0,0 +1,239 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Mixed version tests
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#mixed_version_tests.section_ids">Section ids in templates</a>
+ </li>
+ <li>
+ <a href="#1_1_templates">1.1 Templates</a>
+ <ul>
+ <li>
+ <a href="#1_1_templates.1_1_document">1.1 Document</a>
+ </li>
+ </ul>
+ </li>
+ <li>
+ <a href="#1_4_templates">1.4 Templates</a>
+ <ul>
+ <li>
+ <a href="#1_4_templates.1_4_document">1.4 Document</a>
+ </li>
+ </ul>
+ </li>
+ <li>
+ <a href="#1_5_templates">1.5 Templates</a>
+ <ul>
+ <li>
+ <a href="#1_5_templates.1_5_document">1.5 Document</a>
+ </li>
+ </ul>
+ </li>
+ </ul>
+ </div>
+ <p>
+ correct
+ </p>
+ <div id="mixed_version_tests.section_ids">
+ <h3>
+ Section ids in templates
+ </h3>
+ <div id="mixed_version_tests.section_ids">
+ </div>
+ <div id="mixed_version_tests.section_ids.in_a_1_1_template">
+ <h3>
+ In a 1.1 template
+ </h3>
+ <div id="mixed_version_tests.section_ids.in_a_1_1_template">
+ <p>
+ Some text
+ </p>
+ </div>
+ </div>
+ <div id="mixed_version_tests.section_ids.in_a_1_4_template">
+ <h3>
+ In a 1.4 template
+ </h3>
+ <div id="mixed_version_tests.section_ids.in_a_1_4_template">
+ <p>
+ Some text
+ </p>
+ </div>
+ </div>
+ <div id="mixed_version_tests.section_ids.in_a_1_5_template">
+ <h3>
+ In a 1.5 template
+ </h3>
+ <div id="mixed_version_tests.section_ids.in_a_1_5_template">
+ <p>
+ Some text
+ </p>
+ </div>
+ </div>
+ </div>
+ <div id="1_1_templates">
+ <h3>
+ 1.1 Templates
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#1_1_templates.1_1_document">1.1 Document</a>
+ </li>
+ </ul>
+ </div>
+ <div id="1_1_templates.1_1_document">
+ <h3>
+ 1.1 Document
+ </h3>
+ <div id="1_1_templates.1_1_document">
+ </div>
+ <div id="1_1_templates.in_a_1_1_template">
+ <h3>
+ In a 1.1 template
+ </h3>
+ <div id="1_1_templates.in_a_1_1_template">
+ <p>
+ Some text
+ </p>
+ </div>
+ </div>
+ <div id="1_1_templates.in_a_1_4_template">
+ <h3>
+ In a 1.4 template
+ </h3>
+ <div id="1_1_templates.in_a_1_4_template">
+ <p>
+ Some text
+ </p>
+ </div>
+ </div>
+ <div id="1_1_templates.in_a_1_5_template">
+ <h3>
+ In a 1.5 template
+ </h3>
+ <div id="1_1_templates.in_a_1_5_template">
+ <p>
+ Some text
+ </p>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="1_4_templates">
+ <h3>
+ 1.4 Templates
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#1_4_templates.1_4_document">1.4 Document</a>
+ </li>
+ </ul>
+ </div>
+ <div id="1_4_templates.1_4_document">
+ <h3>
+ 1.4 Document
+ </h3>
+ <div id="1_4_templates.1_4_document">
+ </div>
+ <div id="1_4_templates.1_4_document.in_a_1_1_template">
+ <h3>
+ In a 1.1 template
+ </h3>
+ <div id="1_4_templates.1_4_document.in_a_1_1_template">
+ <p>
+ Some text
+ </p>
+ </div>
+ </div>
+ <div id="1_4_templates.1_4_document.in_a_1_4_template">
+ <h3>
+ In a 1.4 template
+ </h3>
+ <div id="1_4_templates.1_4_document.in_a_1_4_template">
+ <p>
+ Some text
+ </p>
+ </div>
+ </div>
+ <div id="1_4_templates.1_4_document.in_a_1_5_template">
+ <h3>
+ In a 1.5 template
+ </h3>
+ <div id="1_4_templates.1_4_document.in_a_1_5_template">
+ <p>
+ Some text
+ </p>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="1_5_templates">
+ <h3>
+ 1.5 Templates
+ </h3>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#1_5_templates.1_5_document">1.5 Document</a>
+ </li>
+ </ul>
+ </div>
+ <div id="1_5_templates.1_5_document">
+ <h3>
+ 1.5 Document
+ </h3>
+ <div id="1_5_templates.1_5_document">
+ </div>
+ <div id="1_5_templates.1_5_document.in_a_1_1_template">
+ <h3>
+ In a 1.1 template
+ </h3>
+ <div id="1_5_templates.1_5_document.in_a_1_1_template">
+ <p>
+ Some text
+ </p>
+ </div>
+ </div>
+ <div id="1_5_templates.1_5_document.in_a_1_4_template">
+ <h3>
+ In a 1.4 template
+ </h3>
+ <div id="1_5_templates.1_5_document.in_a_1_4_template">
+ <p>
+ Some text
+ </p>
+ </div>
+ </div>
+ <div id="1_5_templates.1_5_document.in_a_1_5_template">
+ <h3>
+ In a 1.5 template
+ </h3>
+ <div id="1_5_templates.1_5_document.in_a_1_5_template">
+ <p>
+ Some text
+ </p>
+ </div>
+ </div>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/versions/versions-1_6.quickbook b/src/boost/tools/quickbook/test/versions/versions-1_6.quickbook
new file mode 100644
index 000000000..fed5a93ea
--- /dev/null
+++ b/src/boost/tools/quickbook/test/versions/versions-1_6.quickbook
@@ -0,0 +1,26 @@
+[quickbook 1.6]
+[article Mixed version tests]
+
+[import templates-inc-1_1.quickbook]
+[import templates-inc-1_4.quickbook]
+[import templates-inc-1_5.quickbook]
+
+[/ This test calls a 1.4 template -> 1.5 template -> 1.4 template.
+ The name lookup in the 1.4 template should skip the 1.5 template
+ when doing dynamic name lookup. ]
+[skip_1_5 correct]
+
+[/ When calling templates from old versions, the ids should
+ be consistent with their context ]
+
+[section:section_ids Section ids in templates]
+[section_1_1]
+[section_1_4]
+[section_1_5]
+[endsect]
+
+[/ For comparison]
+
+[include templates-inc-1_1.quickbook]
+[include templates-inc-1_4.quickbook]
+[include templates-inc-1_5.quickbook]
diff --git a/src/boost/tools/quickbook/test/xinclude/Jamfile.v2 b/src/boost/tools/quickbook/test/xinclude/Jamfile.v2
new file mode 100644
index 000000000..4e18d4f17
--- /dev/null
+++ b/src/boost/tools/quickbook/test/xinclude/Jamfile.v2
@@ -0,0 +1,31 @@
+#
+# Copyright (c) 2005 João Abecasis
+#
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+#
+
+project quickbook/test/xinclude
+ : requirements
+ <toolset>msvc:<debug-symbols>off
+ ;
+
+import quickbook-testing : quickbook-test quickbook-error-test ;
+
+path-constant xinclude_base1 : ../.. ;
+path-constant xinclude_base2 : sub ;
+path-constant xinclude_base3 : . ;
+
+test-suite quickbook.test :
+ [ quickbook-test xinclude-1_1 : : : <quickbook-xinclude-base>$(xinclude_base1) ]
+ [ quickbook-test xmlbase1-1_6 : : : <quickbook-xinclude-base>$(xinclude_base1) ]
+ [ quickbook-test xmlbase2-1_6 : : : <quickbook-xinclude-base>$(xinclude_base1) ]
+ [ quickbook-test xinclude-1_1-alt : xinclude-1_1.quickbook : xinclude-1_1-alt.gold : <quickbook-xinclude-base>$(xinclude_base2) ]
+ [ quickbook-test xmlbase1-1_6-alt : xmlbase1-1_6.quickbook : xmlbase1-1_6-alt.gold : <quickbook-xinclude-base>$(xinclude_base2) ]
+ [ quickbook-test xmlbase2-1_6-alt : xmlbase2-1_6.quickbook : xmlbase2-1_6-alt.gold : <quickbook-xinclude-base>$(xinclude_base2) ]
+ [ quickbook-test xinclude-1_1-alt2 : xinclude-1_1.quickbook : xinclude-1_1-alt2.gold : <quickbook-xinclude-base>$(xinclude_base3) ]
+ [ quickbook-test xmlbase1-1_6-alt2 : xmlbase1-1_6.quickbook : xmlbase1-1_6-alt2.gold : <quickbook-xinclude-base>$(xinclude_base3) ]
+ [ quickbook-test xmlbase2-1_6-alt2 : xmlbase2-1_6.quickbook : xmlbase2-1_6-alt2.gold : <quickbook-xinclude-base>$(xinclude_base3) ]
+ [ quickbook-error-test xmlbase-1_6-fail ]
+ ;
diff --git a/src/boost/tools/quickbook/test/xinclude/sub/boost-no-inspect b/src/boost/tools/quickbook/test/xinclude/sub/boost-no-inspect
new file mode 100644
index 000000000..099a233ec
--- /dev/null
+++ b/src/boost/tools/quickbook/test/xinclude/sub/boost-no-inspect
@@ -0,0 +1,2 @@
+This directory just contains simple test files, which might be disrupted by
+adding copyright etc.
diff --git a/src/boost/tools/quickbook/test/xinclude/sub/stub.xml b/src/boost/tools/quickbook/test/xinclude/sub/stub.xml
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/src/boost/tools/quickbook/test/xinclude/sub/stub.xml
diff --git a/src/boost/tools/quickbook/test/xinclude/xinclude-1_1-alt.gold b/src/boost/tools/quickbook/test/xinclude/xinclude-1_1-alt.gold
new file mode 100644
index 000000000..cffe5296c
--- /dev/null
+++ b/src/boost/tools/quickbook/test/xinclude/xinclude-1_1-alt.gold
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="include" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include</title>
+ <xi:include href="../../stub.xml" />
+ <xi:include href="../stub.xml" />
+ <xi:include href="stub.xml" />
+ <xi:include href="../../xinclude" />
+</article>
diff --git a/src/boost/tools/quickbook/test/xinclude/xinclude-1_1-alt.gold-html b/src/boost/tools/quickbook/test/xinclude/xinclude-1_1-alt.gold-html
new file mode 100644
index 000000000..8046a7261
--- /dev/null
+++ b/src/boost/tools/quickbook/test/xinclude/xinclude-1_1-alt.gold-html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Include
+ </h3>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/xinclude/xinclude-1_1-alt2.gold b/src/boost/tools/quickbook/test/xinclude/xinclude-1_1-alt2.gold
new file mode 100644
index 000000000..7c2e40063
--- /dev/null
+++ b/src/boost/tools/quickbook/test/xinclude/xinclude-1_1-alt2.gold
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="include" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include</title>
+ <xi:include href="../stub.xml" />
+ <xi:include href="stub.xml" />
+ <xi:include href="sub/stub.xml" />
+ <xi:include href="../xinclude" />
+</article>
diff --git a/src/boost/tools/quickbook/test/xinclude/xinclude-1_1.gold b/src/boost/tools/quickbook/test/xinclude/xinclude-1_1.gold
new file mode 100644
index 000000000..0a5707f78
--- /dev/null
+++ b/src/boost/tools/quickbook/test/xinclude/xinclude-1_1.gold
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="include" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Include</title>
+ <xi:include href="test/stub.xml" />
+ <xi:include href="test/xinclude/stub.xml" />
+ <xi:include href="test/xinclude/sub/stub.xml" />
+ <xi:include href="test/xinclude" />
+</article>
diff --git a/src/boost/tools/quickbook/test/xinclude/xinclude-1_1.gold-html b/src/boost/tools/quickbook/test/xinclude/xinclude-1_1.gold-html
new file mode 100644
index 000000000..8046a7261
--- /dev/null
+++ b/src/boost/tools/quickbook/test/xinclude/xinclude-1_1.gold-html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Include
+ </h3>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/xinclude/xinclude-1_1.quickbook b/src/boost/tools/quickbook/test/xinclude/xinclude-1_1.quickbook
new file mode 100644
index 000000000..9405e4e78
--- /dev/null
+++ b/src/boost/tools/quickbook/test/xinclude/xinclude-1_1.quickbook
@@ -0,0 +1,6 @@
+[article Include]
+
+[xinclude ../stub.xml]
+[xinclude stub.xml]
+[xinclude sub/stub.xml]
+[xinclude ../xinclude]
diff --git a/src/boost/tools/quickbook/test/xinclude/xmlbase-1_6-fail.quickbook b/src/boost/tools/quickbook/test/xinclude/xmlbase-1_6-fail.quickbook
new file mode 100644
index 000000000..899b4a2b4
--- /dev/null
+++ b/src/boost/tools/quickbook/test/xinclude/xmlbase-1_6-fail.quickbook
@@ -0,0 +1,4 @@
+[article Xmlbase fail
+[quickbook 1.5]
+[xmlbase non-existent]
+]
diff --git a/src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6-alt.gold b/src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6-alt.gold
new file mode 100644
index 000000000..29a84ca26
--- /dev/null
+++ b/src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6-alt.gold
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="xinclude_with_xmlbase" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xml:base="../" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>XInclude with xmlbase</title>
+ <xi:include href="../stub.xml" />
+ <xi:include href="stub.xml" />
+ <xi:include href="sub/stub.xml" />
+ <xi:include href="../xinclude" />
+</article>
diff --git a/src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6-alt.gold-html b/src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6-alt.gold-html
new file mode 100644
index 000000000..76a1871b7
--- /dev/null
+++ b/src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6-alt.gold-html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ XInclude with xmlbase
+ </h3>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6-alt2.gold b/src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6-alt2.gold
new file mode 100644
index 000000000..1c2ccc2fc
--- /dev/null
+++ b/src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6-alt2.gold
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="xinclude_with_xmlbase" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xml:base="./" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>XInclude with xmlbase</title>
+ <xi:include href="../stub.xml" />
+ <xi:include href="stub.xml" />
+ <xi:include href="sub/stub.xml" />
+ <xi:include href="../xinclude" />
+</article>
diff --git a/src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6.gold b/src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6.gold
new file mode 100644
index 000000000..4c97e0de9
--- /dev/null
+++ b/src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6.gold
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="xinclude_with_xmlbase" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xml:base="test/xinclude/" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>XInclude with xmlbase</title>
+ <xi:include href="../stub.xml" />
+ <xi:include href="stub.xml" />
+ <xi:include href="sub/stub.xml" />
+ <xi:include href="../xinclude" />
+</article>
diff --git a/src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6.gold-html b/src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6.gold-html
new file mode 100644
index 000000000..76a1871b7
--- /dev/null
+++ b/src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6.gold-html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ XInclude with xmlbase
+ </h3>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6.quickbook b/src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6.quickbook
new file mode 100644
index 000000000..2656c7abf
--- /dev/null
+++ b/src/boost/tools/quickbook/test/xinclude/xmlbase1-1_6.quickbook
@@ -0,0 +1,9 @@
+[article XInclude with xmlbase
+[quickbook 1.6]
+[xmlbase .]
+]
+
+[xinclude ../stub.xml]
+[xinclude stub.xml]
+[xinclude sub/stub.xml]
+[xinclude ../xinclude]
diff --git a/src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6-alt.gold b/src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6-alt.gold
new file mode 100644
index 000000000..6cfa197b5
--- /dev/null
+++ b/src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6-alt.gold
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="xinclude_with_xmlbase" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xml:base="../../include/" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>XInclude with xmlbase</title>
+ <xi:include href="../stub.xml" />
+ <xi:include href="../xinclude/stub.xml" />
+ <xi:include href="../xinclude/sub/stub.xml" />
+ <xi:include href="../xinclude" />
+</article>
diff --git a/src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6-alt.gold-html b/src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6-alt.gold-html
new file mode 100644
index 000000000..76a1871b7
--- /dev/null
+++ b/src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6-alt.gold-html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ XInclude with xmlbase
+ </h3>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6-alt2.gold b/src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6-alt2.gold
new file mode 100644
index 000000000..e3b2f6274
--- /dev/null
+++ b/src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6-alt2.gold
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="xinclude_with_xmlbase" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xml:base="../include/" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>XInclude with xmlbase</title>
+ <xi:include href="../stub.xml" />
+ <xi:include href="../xinclude/stub.xml" />
+ <xi:include href="../xinclude/sub/stub.xml" />
+ <xi:include href="../xinclude" />
+</article>
diff --git a/src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6.gold b/src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6.gold
new file mode 100644
index 000000000..f3507d337
--- /dev/null
+++ b/src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6.gold
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="xinclude_with_xmlbase" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xml:base="test/include/" xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>XInclude with xmlbase</title>
+ <xi:include href="../stub.xml" />
+ <xi:include href="../xinclude/stub.xml" />
+ <xi:include href="../xinclude/sub/stub.xml" />
+ <xi:include href="../xinclude" />
+</article>
diff --git a/src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6.gold-html b/src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6.gold-html
new file mode 100644
index 000000000..76a1871b7
--- /dev/null
+++ b/src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6.gold-html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ XInclude with xmlbase
+ </h3>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6.quickbook b/src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6.quickbook
new file mode 100644
index 000000000..252bacca1
--- /dev/null
+++ b/src/boost/tools/quickbook/test/xinclude/xmlbase2-1_6.quickbook
@@ -0,0 +1,9 @@
+[article XInclude with xmlbase
+[quickbook 1.6]
+[xmlbase ../include]
+]
+
+[xinclude ../stub.xml]
+[xinclude stub.xml]
+[xinclude sub/stub.xml]
+[xinclude ../xinclude]
diff --git a/src/boost/tools/quickbook/test/xml_escape-1_2.gold b/src/boost/tools/quickbook/test/xml_escape-1_2.gold
new file mode 100644
index 000000000..bd28ae439
--- /dev/null
+++ b/src/boost/tools/quickbook/test/xml_escape-1_2.gold
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<library id="test_that__amp____lt__are_being_escaped_" name="Test that &amp;, &lt; are being escaped."
+dirname="test_that__amp____lt__are_being_escaped_" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <libraryinfo>
+ <legalnotice id="test_that__amp____lt__are_being_escaped_.legal">
+ <para>
+ &amp; should be &amp;amp;, &lt; should &amp;lt;
+ </para>
+ </legalnotice>
+ <librarypurpose>
+ &amp; should be &amp;amp;, &lt; should &amp;lt;
+ </librarypurpose>
+ </libraryinfo>
+ <title>Test that &amp;, &lt; are being escaped.</title>
+ <section id="test_that__amp____lt__are_being_escaped_.escapes___explicitly_written_markup">
+ <title>Escapes &amp; explicitly written markup</title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ &amp; -&gt; &amp;amp;
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &lt; -&gt; &amp;lt;
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &gt; -&gt; &amp;gt;
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &quot; -&gt; &amp;quot;
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+</library>
diff --git a/src/boost/tools/quickbook/test/xml_escape-1_2.gold-html b/src/boost/tools/quickbook/test/xml_escape-1_2.gold-html
new file mode 100644
index 000000000..4b4bd7529
--- /dev/null
+++ b/src/boost/tools/quickbook/test/xml_escape-1_2.gold-html
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Test that &amp;, &lt; are being escaped.
+ </h3>
+ <div class="legalnotice">
+ <p>
+ &amp; should be &amp;amp;, &lt; should &amp;lt;
+ </p>
+ </div>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#test_that__amp____lt__are_being_escaped_.escapes___explicitly_written_markup">Escapes
+ &amp; explicitly written markup</a>
+ </li>
+ </ul>
+ </div>
+ <div id="test_that__amp____lt__are_being_escaped_.escapes___explicitly_written_markup">
+ <h3>
+ Escapes &amp; explicitly written markup
+ </h3>
+ <div id="test_that__amp____lt__are_being_escaped_.escapes___explicitly_written_markup">
+ <ul>
+ <li>
+ <div>
+ &amp; -&gt; &amp;amp;
+ </div>
+ </li>
+ <li>
+ <div>
+ &lt; -&gt; &amp;lt;
+ </div>
+ </li>
+ <li>
+ <div>
+ &gt; -&gt; &amp;gt;
+ </div>
+ </li>
+ <li>
+ <div>
+ &quot; -&gt; &amp;quot;
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/xml_escape-1_2.quickbook b/src/boost/tools/quickbook/test/xml_escape-1_2.quickbook
new file mode 100644
index 000000000..66a6086cc
--- /dev/null
+++ b/src/boost/tools/quickbook/test/xml_escape-1_2.quickbook
@@ -0,0 +1,14 @@
+[library Test that &amp;, &lt; are being escaped.
+ [quickbook 1.2]
+ [purpose &amp; should be &amp;amp;, &lt; should &amp;lt;]
+ [license &amp; should be &amp;amp;, &lt; should &amp;lt;]
+]
+
+[section Escapes & explicitly written markup]
+
+* & -> &amp;
+* < -> &lt;
+* > -> &gt;
+* " -> &quot;
+
+[endsect] \ No newline at end of file
diff --git a/src/boost/tools/quickbook/test/xml_escape-1_5.gold b/src/boost/tools/quickbook/test/xml_escape-1_5.gold
new file mode 100644
index 000000000..f8f33edd2
--- /dev/null
+++ b/src/boost/tools/quickbook/test/xml_escape-1_5.gold
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<library id="test_that__amp____lt__are_being_escaped_" name="Test that &amp;, &lt; are being escaped."
+dirname="test_that__amp____lt__are_being_escaped_" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <libraryinfo>
+ <legalnotice id="test_that__amp____lt__are_being_escaped_.legal">
+ <para>
+ &amp; should be &amp;amp;, &lt; should &amp;lt;
+ </para>
+ </legalnotice>
+ <librarypurpose>
+ &amp; should be &amp;amp;, &lt; should &amp;lt;
+ </librarypurpose>
+ </libraryinfo>
+ <title>Test that &amp;, &lt; are being escaped.</title>
+ <section id="test_that__amp____lt__are_being_escaped_.escapes___explicitly_written_markup">
+ <title><link linkend="test_that__amp____lt__are_being_escaped_.escapes___explicitly_written_markup">Escapes
+ &amp; explicitly written markup</link></title>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ &amp; -&gt; &amp;amp;
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &lt; -&gt; &amp;lt;
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &gt; -&gt; &amp;gt;
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ &quot; -&gt; &amp;quot;
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
+</library>
diff --git a/src/boost/tools/quickbook/test/xml_escape-1_5.gold-html b/src/boost/tools/quickbook/test/xml_escape-1_5.gold-html
new file mode 100644
index 000000000..4b4bd7529
--- /dev/null
+++ b/src/boost/tools/quickbook/test/xml_escape-1_5.gold-html
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<html>
+ <head></head>
+ <body>
+ <h3>
+ Test that &amp;, &lt; are being escaped.
+ </h3>
+ <div class="legalnotice">
+ <p>
+ &amp; should be &amp;amp;, &lt; should &amp;lt;
+ </p>
+ </div>
+ <div class="toc">
+ <p>
+ <b>Table of contents</b>
+ </p>
+ <ul>
+ <li>
+ <a href="#test_that__amp____lt__are_being_escaped_.escapes___explicitly_written_markup">Escapes
+ &amp; explicitly written markup</a>
+ </li>
+ </ul>
+ </div>
+ <div id="test_that__amp____lt__are_being_escaped_.escapes___explicitly_written_markup">
+ <h3>
+ Escapes &amp; explicitly written markup
+ </h3>
+ <div id="test_that__amp____lt__are_being_escaped_.escapes___explicitly_written_markup">
+ <ul>
+ <li>
+ <div>
+ &amp; -&gt; &amp;amp;
+ </div>
+ </li>
+ <li>
+ <div>
+ &lt; -&gt; &amp;lt;
+ </div>
+ </li>
+ <li>
+ <div>
+ &gt; -&gt; &amp;gt;
+ </div>
+ </li>
+ <li>
+ <div>
+ &quot; -&gt; &amp;quot;
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </body>
+</html>
diff --git a/src/boost/tools/quickbook/test/xml_escape-1_5.quickbook b/src/boost/tools/quickbook/test/xml_escape-1_5.quickbook
new file mode 100644
index 000000000..642e1b537
--- /dev/null
+++ b/src/boost/tools/quickbook/test/xml_escape-1_5.quickbook
@@ -0,0 +1,14 @@
+[library Test that &amp;, &lt; are being escaped.
+ [quickbook 1.5]
+ [purpose & should be &amp;, < should &lt;]
+ [license & should be &amp;, < should &lt;]
+]
+
+[section Escapes & explicitly written markup]
+
+* & -> &amp;
+* < -> &lt;
+* > -> &gt;
+* " -> &quot;
+
+[endsect] \ No newline at end of file