blob: 222f109c0b8ced54b46c11eb530897e01efb9bac (
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
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
|
<?xml version="1.0"?>
<!DOCTYPE TEI.2 SYSTEM "/home/paul/Documents/data/dtds/docbookx.dtd">
<TEI.2><teiHeader><fileDesc><titleStmt><title>
Example of reStructure document that can be converted to docbook
</title><author>
<first>
<p>
Paul
</p>
</first>
<surname>
Tremblay
</surname>
<email>
<p>
<ref target="">
phthenry@earthlink.net
</ref>
</p>
</email>
</author></titleStmt><publicationStmt><distributor>
none
</distributor></publicationStmt><sourceDesc><p>no source--a manuscript</p></sourceDesc></fileDesc></teiHeader><text><body>
<!--
author: Paul Tremblay Won't work like that
-->
<!--
start body
-->
<div rend="1" id="using-snippets-of-code" type="using snippets of code">
<head>
Using snippets of code
</head>
<p>
How to represent a snippet of code:
</p>
<example program="">
<title>
<p>
Processing a variable
</p>
</title>
<literal_block xml:space="preserve">
if var = 5
self.__process(var)
</literal_block>
</example>
<p>
Keep in mind that the docbook should look like:
</p>
<literal_block xml:space="preserve">
<example>
<title>A formal example</title>
<programlisting>
if var = 5
self.__process(var)
</programlisting>
</example>
</literal_block>
<!--
end of example
-->
</div>
</body></text></TEI.2>
|