summaryrefslogtreecommitdiff
path: root/tools/quickbook/test/preformatted-1_1.quickbook
blob: e41f83b5da831feef4d3895e3b09f2bc5fba9d56 (plain)
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
[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]