mirror of
https://github.com/boostorg/quickbook.git
synced 2026-01-27 19:12:17 +00:00
104 lines
1.7 KiB
Plaintext
104 lines
1.7 KiB
Plaintext
[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 '''α''']
|
|
[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]]
|
|
|
|
[/-------------------------------- Bugs! ]
|
|
|
|
[template join1[a b] [b][a]]
|
|
[template join2[a b] [a][b]]
|
|
[template test[x] [join1 [join2 0 [x]] 0]]
|
|
[test 0]
|
|
|
|
[endsect]
|