summaryrefslogtreecommitdiff
path: root/sandbox/xml2rst/tests/synthetic/expected/class.rst
blob: a55e9cfe3ca5bb2f37c3d9e558ef70b568122b5b (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
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
.. section-numbering::

.. class:: c1 c2

==============================
reStructuredText Test Document
==============================

.. class:: c3

-----------------------------
Examples of Syntax Constructs
-----------------------------

:author: David Goodger

.. bibliographic fields (which also require a transform):

.. class:: c5

:Address: 123 Example Street Example, EX Canada A1B 2C3

:Contact: goodger@users.sourceforge.net

:Authors: Me; Myself; I

:organization: humankind

:date: Now, or yesterday. Or maybe even *before* yesterday.

:status: This is a "work in progress"

:revision: is managed by a version control system.

:version: 1

:copyright: This document has been placed in the public domain. You may do with
    it as you wish. You may copy, modify, redistribute, reattribute,
    sell, buy, rent, lease, destroy, or improve it, quote it at length,
    excerpt, incorporate, collate, fold, staple, or mutilate it, or do
    anything else to it that your or anyone else's heart desires.

.. class:: c6

:field name: This is a "generic bibliographic field".

:field name "2": Generic bibliographic fields may contain multiple body elements.

    .. class:: c7

    Like this.

.. class:: c8

:Dedication: 
    .. class:: c9

    For Docutils users & co-developers.

.. class:: c10

:abstract: This is a test document, containing at least one example of each
    reStructuredText construct.

.. contents:: Table of Contents
   :class: c12 c11


.. class:: c13

Structural Elements
===================

.. class:: c14

Section Title
-------------

.. class:: c15

That's it, the text just above this line.

.. class:: c16

-----

.. class:: c17

A paragraph.

Bullet Lists
------------

.. class:: c18

- A bullet list

  .. class:: c19

  + Nested bullet list.

  .. class:: c20

  + Nested item 2.

Enumerated Lists
----------------

.. class:: c21

1. Arabic numerals.

   .. class:: c22

   a) lower alpha)

Definition Lists
----------------

.. class:: c23

Term
    .. class:: c24

    Definition

Field Lists
-----------

.. class:: c25

:how arg1 arg2: 
    .. class:: c26

    The field marker is a colon, the field name, and a colon.

    .. class:: c27

    The field body may contain one or more body elements, indented
    relative to the field marker.

Option Lists
------------

For listing command-line options:

.. class:: c28

-a
    command-line option "a"


.. class:: c29

-x, -y, -z
    Multiple options are an "option group".


Literal Blocks
--------------

Literal blocks are indicated with a double-colon ("::") at the end of
the preceding paragraph (over there ``-->``). They can be indented

.. class:: c30

::

    if literal_block:
        text = 'is left as-is'
        spaces_and_linebreaks = 'are preserved'
        markup_processing = None

Or they can be quoted without indentation

.. class:: c31

::

>> Great idea!
>
> Why didn't I think of that?

Line Blocks
-----------

This section tests line blocks. Line blocks are body elements which
consist of lines and other line blocks. Nested line blocks cause
indentation.

.. class:: c32

| This is a line block. It ends with a blank line.

.. class:: c33

| New lines begin with a vertical bar ("|").

Block Quotes
------------

Block quotes consist of indented body elements:

    .. class:: c34

    My theory by A. Elk. Brackets Miss, brackets. This theory goes as
    follows and begins now. All brontosauruses are thin at one end, much
    much thicker in the middle and then thin again at the far end. That
    is my theory, it is mine, and belongs to me and I own it, and what
    it is too.

    .. class:: c35

    -- Anne Elk (Miss)

Doctest Blocks
--------------

.. class:: c36

>>> print 'Python-specific usage examples; begun with ">>>"'
Python-specific usage examples; begun with ">>>"
>>> print '(cut and pasted from interactive Python sessions)'
(cut and pasted from interactive Python sessions)

Footnotes
---------

.. class:: c37

.. [1] A footnote contains body elements, consistently indented by at least
   3 spaces.

   .. class:: c38

   This is the footnote's second paragraph.

.. class:: c39

.. [#label] Footnotes may be numbered, either manually (as in [1]_) or
   automatically using a "#"-prefixed label. This footnote has a label
   so it can be referred to from multiple places, both as a footnote
   reference ([#label]_) and as a hyperlink reference (label_).

.. class:: c40

.. [#] This footnote is numbered automatically and anonymously using a label
   of "#" only.

.. class:: c41

.. [*] Footnotes may also use symbols, specified with a "*" label. Here's a
   reference to the next footnote: [*]_.

Citations
---------

.. class:: c42

.. [CIT2002] Citations are text-labeled footnotes. They may be rendered separately
   and differently from footnotes.

Targets
-------


.. _example:

.. _python: http://www.python.org/

.. class:: c43 c44

Some__ reference__.

__ targets_

__ http://www.example.com/

.. class:: c45 c46

Directives
----------

.. contents:: 
   :local:
   :class: c47


Images
~~~~~~

An image directive (also clickable -- a hyperlink reference):

.. image:: ../../../docs/user/rst/images/title.png
   :class: c48
   :target: directives_

A figure directive:

.. figure:: ../../../docs/user/rst/images/title.png
   :figclass: c49
   :alt: reStructuredText, the markup syntax

   A figure is an image with a caption and/or a legend:

   .. class:: c50

   +------------+-----------------------------------------------+
   | re         | Revised, revisited, based on 're' module.     |
   +------------+-----------------------------------------------+
   | Structured | Structure-enhanced text, structuredtext.      |
   +------------+-----------------------------------------------+
   | Text       | Well it is, isn't it?                         |
   +------------+-----------------------------------------------+

Admonitions
~~~~~~~~~~~

.. class:: c51

.. attention:: Directives at large.

.. class:: c52

.. caution:: Don't take any wooden nickels.

.. class:: c53

.. danger:: Mad scientist at work!

.. class:: c54

.. error:: Does not compute.

.. class:: c55

.. hint:: It's bigger than a bread box.

.. class:: c56

.. important:: 
   - Wash behind your ears.

   - Clean up your room.

   - Call your mother.

   - Back up your data.

.. class:: c57

.. note:: This is a note.

.. class:: c58

.. tip:: 15% if the service is good.

.. class:: c59

.. warning:: Strong prose may provoke extreme mental exertion. Reader discretion
   is strongly advised.

.. admonition:: And, by the way...
   :class: c60

   You can make up your own admonition too.

Topics, Sidebars, and Rubrics
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. sidebar:: Sidebar Title
   :subtitle: Optional Subtitle
   :class: c61

   This is a sidebar. It is for text outside the flow of the main text.

   .. rubric:: This is a rubric inside a sidebar
      :class: c62

   Sidebars often appears beside the main text with a border and
   background color.

.. topic:: Topic Title
   :class: c63

   This is a topic.

Compound Paragraph
~~~~~~~~~~~~~~~~~~

.. compound::
   :class: c64

   Compound 1, paragraph 1.

   Compound 1, paragraph 2.

   * Compound 1, list item one.

   * Compound 1, list item two.