-
Notifications
You must be signed in to change notification settings - Fork 0
/
VSCodeExtension_Quickbook.test.qbk
416 lines (312 loc) · 8.14 KB
/
VSCodeExtension_Quickbook.test.qbk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
[article VSCodeExtension_Quickbook.test
[id Xperimental & Archive.VSCodeExtension_Quickbook.test]
[quickbook 1.7]
]
[import VSCodeExtension_Quickbook_include.test.qbk]
These examples liberally adapted from the
[@http://www.boost.org/doc/html/quickbook.html
Quickbook Documentation].
[/
Xperimental & Archive/VSCodeExtension_Quickbook.test.qbk
A test Quickbook documentation file.
See 'http://www.boost.org/doc/html/quickbook.html' for more.
[A template-like statement within a comment]
[A multi -
line -
template-like statement within a comment]
\[An escaped \[
[reference]
\] An escaped \]
]
[section Include File testing]
[include VSCodeExtension_Quickbook_include.test.qbk]
[endsect]
[section Import File testing]
* [templateProcessing Text 1]
* [templateProcessing Text 2]
* [templateProcessing Text 3]
[endsect]
General text, "double quoted text", 'single quoted text',
and `inline code`.
[teletype]
Example in C++: [!c++] `int main() {}`,
example with no highlighting: `int main() {}`.
``Code
Block 1``
``
Code Block 2
``
```
Code Block 3
```
'''Escaped BoostBook'''
[template other[p1]expanded [p1]]
[section Phrase formatting]
[section Template-type phrase formatting]
['italic], [*bold], [_underline],
[^teletype], [-strikethrough],[~replaceable]
[*['bold-italic]]
['italic [other template]], [*bold [other template]],
[_underline [other template]], [^teletype [other template]],
[-strikethrough [other template]], [~replaceable [other template]]
[*['bold-italic [other template]]]
['italic[other template2]], [*bold[other template2]],
[_underline[other template2]], [^teletype[other template2]],
[-strikethrough[other template2]], [~replaceable[other template2]]
[*['bold-italic[other template2]]]
["A question that sometimes drives me hazy: am I or are the others crazy?]--Einstein
["Here's the rule for bargains: ["Do other men, for they would do you.] That's
the true business precept.]
[endsect]
[section Simple Phrase Formatting]
/italic/, *bold*, _underline_, =teletype=
text *Bold*
text *Is bold*
text * Not bold*
text*Not bold*
Bullet list
*Bold*
*Is bold*
* Not bold* *Not bold * * Not bold *
[endsect]
[section Anchor & links]
[#named_anchor]
[@http://www.boost.org this is [*boost's] website....]
see [@http://spirit.sourceforge.net/]
[endsect]
[section Escapes]
\u03B1 + \u03B2
'''
escape (no processing/formatting)
'''
'''
<emphasis role="bold">This is direct XML markup</emphasis>
'''
[important
Be careful when using the escape. The text must conform to [@https://www.boost.org/doc/html/boostbook.html BoostBook]/[@http://www.docbook.org DocBook] syntax.]
[endsect]
[endsect]
[section Comment Playground]
[Not comment]
[/
[section Synopsis]
[Synopsis_VSCodeExtension_Quickbook.test]
[endsect]
]
not commented
[/
[section Synopsis]
[/Synopsis_VSCodeExtension_Quickbook.test]
[endsect]
]
[not comment [/Comment]]
[/
[Synopsis_VSCodeExtension_Quickbook.test]
]
Not Commented
[Test1
]
[/Test2
]
[/
]
[/]
[/Test 3]
[/
Test 4]
[endsect]
[section Bracket Test]
Level 0-Cursor 0 [ Level 1 - Cursor 1 [ level 2 - cursor 2 [Level3 - Cursor3] Level 2 Cursor 2 [ Level 3 - Cursor 4 ] Level 2 - Cursor 2] Level 1 - Cursor 1] Level 0 - Cursor 0 \] Still Level 0 - Cursor 0
Level 0-Cursor 0 [
Level 1 - Cursor 1
[ level 2 - cursor 2 [Level3 - Cursor3
] Level 2 Cursor 2
[ Level 3 - Cursor 4 ]
Level 2 - Cursor 2]
Level 1 - Cursor 1
] Level 0 - Cursor 0
\] Still Level 0 - Cursor 0
[endsect]
[section Other]
[section Images]
Image below
[$images/boost-quickbook-support.svg]
Image above & cat below
[$https://media.giphy.com/media/JIX9t2j0ZTN9S/giphy.gif]
Cat image above & Absolute Path Image below
__ABSOLUTE_PATH_IMAGE__
Image above
[endsect]
[section Macros & images]
[? __MACRO_1__ `__MACRO_`1`__` is defined: __MACRO_1__]
[?! __MACRO_1__ `__MACRO_1__` is not defined]
[? __MACRO_2__ `__MACRO_`2`__` is defined: __MACRO_2__]
[?! __MACRO_2__ `__MACRO_2__` is not defined]
[endsect]
[section Footnote]
Footnote: [footnote A sample footnote]
[endsect]
[section Macros]
Macro definition:
[def __a_macro_identifier__ Macro contents]
__a_macro_identifier__
Conditional Generation:
[? __a_macro_identifier__ to be or not to be]
[? __to_be__ but not to be]
[?! __to_be__ and to be again]
[endsect]
[endsect]
[section Block Level Elements]
[heading Ordered lists]
# One
# Two
# Three
[heading List Hierarchies]
# One
# Two
# Three
# Three.a
# Three.b
# Three.c
# Four
# Four.a
# Four.a.i
# Four.a.ii
# Five
[heading Unordered lists]
* First
* Second
* Third
[heading Mixed lists]
Mixed lists (ordered and unordered) are supported. Example:
# One
# Two
# Three
* Three.a
* Three.b
* Three.c
# Four
[heading Paragraphs in lists]
* List item 1, paragraph 1
List item 1, paragraph 2
* List item 2, paragraph 1
List item 2, paragraph 2
[heading Explicit list tags]
[ordered_list [item1][item2]]
[itemized_list [item1][item2]]
[heading Code & Callouts]
[!c++]
#include <iostream>
int main()
{
// Sample code
std::cout << "Hello, World\n";
return 0;
}
[!c++]
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! >*/
}
[heading Preformatted]
[pre
Some *preformatted* text Some *preformatted* text
Some *preformatted* text Some *preformatted* text
Some *preformatted* text Some *preformatted* text
]
[heading Blockquote]
[:sometext...]
[heading 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]
[heading Headings]
[h1 Heading 1]
[h2 Heading 2]
[h3 Heading 3]
[h4 Heading 4]
[h5 Heading 5]
[h6 Heading 6]
[heading Predefined Macros]
Today's date: __DATE__
The current time: __TIME__
Filename: "__FILENAME__"
[heading Nullary Templates]
[template alpha[]'''α''']
[template beta[]'''β''']
Some squigles...[*[alpha][beta]]
[template tag\ _tag]
`struct` x[tag];
[heading Punctuation Templates]
[template ~[bar] <hey>[bar]</hey>]
Now, expanding this:
[~baz] - Not working as expected... (Used '~' instead of '!')
[heading Blurbs]
[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++.
]
[section:tables Tables]
[table:id 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]]
]
[section Pedantics]
[table
[[Heading 1][Heading 2] [Heading 3]]
[ [Row1 Col1][Row1 Col2] [Row1 Col3]]
[[Row2 Col1] [Row2 \[Col2][Row2 Col3] ]
[[Row3 Col1] [Row3 Col2 -\]][Row3 Col3]]
]
[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]
]
]
[table Table with code
[[Comment] [Code]]
[
[My first program]
[``
#include <iostream>
int main()
{
std::cout << "Hello, World!" << std::endl;
return 0;
}
``]
]
]
[endsect]
[endsect:tables]
[section Variable Lists]
[variablelist A Variable List
[[term 1] [The definition of term 1]]
[[term 2] [The definition of term 2]]
[[term 3] [
The definition of term 3.
Definitions may contain paragraphs.
]]
]
[endsect]
[endsect]