7 [/-------------------------------- nullary arg ]
9 [template foo0 nullary_arg]
13 [/-------------------------------- unary arg, phrase syle ]
15 [template foo1[bar] foo [bar]]
19 [/-------------------------------- unary arg, block syle ]
28 This is a complete paragraph. [bar] [bar] [bar] [bar] [bar]
29 [bar] [bar] [bar] [bar].... blah blah blah......
34 [/-------------------------------- unary arg, using punctuation ]
36 [template |[bar] '''<hey>'''[bar]'''</hey>''']
40 [/-------------------------------- recursive templates ]
48 [template foo5[x] zoom [x]]
49 [template foo6[x] [x] zoom]
53 [template kinda_weird[x y] [x] [y]]
55 [kinda_weird exactly..xanadu]
58 [/-------------------------------- space delimitted args ]
60 [template simple1[a b] [a][b]]
64 [template simple2[a b c d] [a][b][c][d]]
66 [simple2 w x y z][simple2 w x y z trail]
68 [/-------------------------------- John's templates ]
73 std::cout << ``[x]`` << std::endl;
77 [code "Hello\, World"]
79 [template alpha '''α''']
80 [template pow[a b] [a]'''<superscript>'''[b]'''</superscript>''' ]
81 [template super[text]'''<superscript>'''[text]'''</superscript>''' ]
89 [/-------------------------------- Some more ]
91 [template banana got a banana?]
92 [template plantation[bananarama] [bananarama]]
96 [/-------------------------------- Not a bug (there was a syntax error here) ]
98 [template join1[a b] [b][a]]
99 [template join2[a b] [a][b]]
100 [template test[x] [join1 [join2 0 [x]]...0]]
103 [/-------------------------------- Mismatched template ]
112 [section Empty Templates]
116 [template empty3 [/comment]]
117 [template empty4 [/comment]
132 [template empty_arg1[x]]
133 [template empty_arg2[x y]]
148 [/----------------------------------- Nested templates ]
150 [section Nested Templates]
152 [template block_foo[content]
154 Start block template.
161 [template phrase_foo[content] Start phrase template. [content] End phrase template.]
163 Pre [block_foo [block_foo Hello!]] Post
165 Pre [block_foo [phrase_foo Hello!]] Post
167 Pre [phrase_foo [block_foo Hello!]] Post
169 Pre [phrase_foo [phrase_foo Hello!]] Post
173 [/----------------------------------- Block Markup ]
175 [section Block Markup]
193 [list][horizontal][codeblock][paragraphs]
202 [/----------------------------------- 1.5+ use static scoping ]
204 [section Static Scoping]
206 [template x static scoping]
207 [template static_test1[] [x]]
208 [template static_test2[x] [static_test1]]
209 [static_test2 dynamic scoping]
211 [/ This should be '[a]' because [a] isn't matched. ]
212 [template test1[] [a]]
213 [template test2[a] [test1]]
216 [/ In 1.5 template arguments are scoped at the point they are defined]
219 [template static_test3[a y] [a]]
220 [static_test3 [y] old]
222 [/ From https://svn.boost.org/trac/boost/ticket/2034 ]
224 [template same[x] [x]]
225 [template echo[a b] [a] [b]]
226 [template echo_twice[x] [echo [same [x]]..[same [x]]]]
231 [/----------------------------------- 1.5+ template arguments ]
233 [section Template Arguments]
235 [template binary[x y] {[x]-[y]}]
236 [binary 1..2] [/ {1-2} ]
237 [binary 1 2] [/ {1-2} ]
238 [binary 1..2 3 4] [/ {1-2 3 4} ]
239 [binary 1 2..3 4] [/ {1 2-3 4} ]
240 [binary 1 2 3..4] [/ {1 2 3-4} ]
241 [binary 1.\.2..3] [/ {1..2-3} ]
242 [binary 1.\.2 3] [/ {1..2-3} ]
244 [binary [binary 1 2..3]..4] [/ { {1 2-3}-4} ]
245 [binary [binary 1 2..3] 4] [/ { {1 2-3}-4} ]
246 [binary [binary 1 2 3]..4] [/ { {1-2 3}-4} ]
248 [binary \[1 2\] 3] [/ {[1-2] 3} ]
249 [binary \[1..2\] 3] [/ {[1-2] 3} ]
250 [binary \[1 2] [/ {(1-2} ]
252 [template ternary[x y z] {[x]-[y]-[z]}]
253 [ternary 1..2..3] [/ {1-2-3} ]
254 [ternary 1 2 3] [/ {1-2-3} ]
258 [/----------------------------------- Block and phrases ]
260 [section Block and phrase templates]
262 [template phrase_template[] Some *text*]
263 [template block_template[]
265 A <emphasis>paragraph</emphasis>.
273 [/ Trailing newline shouldn't be included]
275 [template named_index[type title]
276 '''<index type="'''[type]'''"><title>'''[title]'''</title></index>'''
279 [named_index things Things]
281 [/ Blocks in phrase templates ]
283 [template phrase_block1[] [table]]
284 [template phrase_block2[] [table] Text2 afterwards.]
285 [template phrase_block3[] Text3 before. [table]]
286 [template phrase_block4[] Text4 before. [table] Text4 afterwards.]
287 [template phrase_block5[] [table] * Not a list.]
288 [template phrase_block6[] [table]
291 [phrase_block1][phrase_block2][phrase_block3][phrase_block4]
292 [phrase_block5][phrase_block6]
296 [/-------------------------------- Skipping template body ]
298 [section:template_body Skipping the template body correctly]
300 [template args1[x] [`x]]
301 [template args2[] [ordered_list [``code``]]]
302 [/ Due to a bug in the template parser need to stop the parser
303 thinking that the code is an escaped template. ]
304 [template args3[] [ordered_list [\ `code`]]]
306 [args1 <emphasis>Argument</emphasis>]
312 [/----------------------------------- Escaped templates ]
314 [section Escaped templates]
316 [template raw_markup <thingbob>Not real boostbook</thingbob>]
317 [template escaped1 [x] [`x]]
320 [escaped1 <thingbob>More fake boostbook</thingbob>]