summaryrefslogtreecommitdiffstats
path: root/tests/roots/test-root/markup.txt
blob: ff677eb54c68951f2e60557681545916e1fd188c (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
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
:tocdepth: 2

.. title:: set by title directive
.. _1024:

Testing various markup
======================

Meta markup
-----------

.. sectionauthor:: Georg Brandl
.. moduleauthor:: Georg Brandl

.. contents:: TOC

.. meta::
   :author: Me
   :keywords: docs, sphinx


Generic reST
------------

A |subst|!

.. |subst| replace:: global substitution

.. highlight:: none

.. _label:

::

   some code

Option list:

-h              help
--help          also help

Line block:

| line1
|   line2
|     line3
|       line4
|   line5
| line6
|   line7


Body directives
^^^^^^^^^^^^^^^

.. topic:: Title

   Topic body.

.. sidebar:: Sidebar
   :subtitle: Sidebar subtitle

   Sidebar body.

.. rubric:: Test rubric

.. epigraph:: Epigraph title

   Epigraph body.

   -- Author

.. highlights:: Highlights

   Highlights body.

.. pull-quote:: Pull-quote

   Pull quote body.

.. compound::

   a

   b

.. parsed-literal::

   with some *markup* inside


.. _admonition-section:

Admonitions
^^^^^^^^^^^

.. admonition:: My Admonition

   Admonition text.

.. note::
   Note text.

.. warning::

   Warning text.

.. _some-label:

.. tip::
   Tip text.

Indirect hyperlink targets

.. _other-label: some-label_

Inline markup
-------------

*Generic inline markup*

Adding \n to test unescaping.

* :command:`command\\n`
* :dfn:`dfn\\n`
* :guilabel:`guilabel with &accelerator and \\n`
* :kbd:`kbd\\n`
* :mailheader:`mailheader\\n`
* :makevar:`makevar\\n`
* :manpage:`manpage\\n`
* :mimetype:`mimetype\\n`
* :newsgroup:`newsgroup\\n`
* :program:`program\\n`
* :regexp:`regexp\\n`
* :menuselection:`File --> Close\\n`
* :menuselection:`&File --> &Print`
* :file:`a/{varpart}/b\\n`
* :samp:`print {i}\\n`

*Linking inline markup*

* :pep:`8`
* :pep:`Python Enhancement Proposal #8 <8>`
* :rfc:`1`
* :rfc:`Request for Comments #1 <1>`
* :envvar:`HOME`
* :keyword:`with`
* :token:`try statement <try_stmt>`
* :ref:`admonition-section`
* :ref:`here <some-label>`
* :ref:`there <other-label>`
* :ref:`my-figure`
* :ref:`my-figure-name`
* :ref:`my-table`
* :ref:`my-table-name`
* :ref:`my-code-block`
* :ref:`my-code-block-name`
* :ref:`1024`
* :numref:`my-figure`
* :numref:`my-figure-name`
* :numref:`my-table`
* :numref:`my-table-name`
* :numref:`my-code-block`
* :numref:`my-code-block-name`
* :doc:`subdir/includes`
* ``:download:`` is tested in includes.txt
* :option:`Python -c option <python -c>`

Test :abbr:`abbr (abbreviation)` and another :abbr:`abbr (abbreviation)`.

Testing the :index:`index` role, also available with
:index:`explicit <pair: title; explicit>` title.

.. _with:

With
----

(Empty section.)


Tables
------

.. tabularcolumns:: |L|p{5cm}|R|

.. _my-table:

.. table:: my table
   :name: my-table-name

   +----+----------------+----+
   | 1  | * Block elems  |  x |
   |    | * In table     |    |
   +----+----------------+----+
   | 2  | Empty cells:   |    |
   +----+----------------+----+

.. table:: empty cell in table header

   ===== ======
   \ 
   ===== ======
   1     2
   3     4
   ===== ======

Tables with multirow and multicol:

.. only:: latex

   +----+----------------+---------+
   | 1  | test!          | c       |
   +----+---------+------+         |
   | 2  | col     | col  |         |
   | y  +---------+------+----+----+
   | x  | multi-column cell   | x  |
   +----+---------------------+----+

   +----+
   | 1  |
   +    +
   |    |
   +----+

.. list-table::
   :header-rows: 0

   * - .. figure:: img.png

          figure in table


Figures
-------

.. _my-figure:

.. figure:: img.png
   :name: my-figure-name

   My caption of the figure

   My description paragraph of the figure.

   Description paragraph is wrapped with legend node.

.. figure:: rimg.png
   :align: right

   figure with align option

.. figure:: rimg.png
   :align: right
   :figwidth: 50%

   figure with align & figwidth option

.. figure:: rimg.png
   :align: right
   :width: 3cm

   figure with align & width option

Version markup
--------------

.. versionadded:: 0.6
   Some funny **stuff**.

.. versionchanged:: 0.6
   Even more funny stuff.

.. deprecated:: 0.6
   Boring stuff.

.. versionremoved:: 0.6
   Goodbye boring stuff.

.. versionadded:: 1.2

   First paragraph of versionadded.

.. versionchanged:: 1.2
   First paragraph of versionchanged.

   Second paragraph of versionchanged.


Code blocks
-----------

.. _my-code-block:

.. code-block:: ruby
   :linenos:
   :caption: my ruby code
   :name: my-code-block-name

   def ruby?
       false
   end

Misc stuff
----------

Stuff [#]_

Reference lookup: [Ref1]_ (defined in another file).
Reference lookup underscore: [Ref_1]_

.. seealso:: something, something else, something more

   `Google <https://www.google.com>`_
       For everything.

.. hlist::
   :columns: 4

   * This
   * is
   * a horizontal
   * list
   * with several
   * items

.. rubric:: Side note

This is a side note.

This tests :CLASS:`role names in uppercase`.

.. centered:: LICENSE AGREEMENT

.. acks::

   * Terry Pratchett
   * J. R. R. Tolkien
   * Monty Python

.. glossary::
   :sorted:

   boson
      Particle with integer spin.

   *fermion*
      Particle with half-integer spin.

   tauon
   myon
   electron
      Examples for fermions.

   über
      Gewisse

   ähnlich
      Dinge

.. productionlist::
   try_stmt: `try1_stmt` | `try2_stmt`
   try1_stmt: "try" ":" `suite`
            : ("except" [`expression` ["," `target`]] ":" `suite`)+
            : ["else" ":" `suite`]
            : ["finally" ":" `suite`]
   try2_stmt: "try" ":" `suite`
            : "finally" ":" `suite`


Index markup
------------

.. index::
   single: entry
   pair: entry; pair
   double: entry; double
   triple: index; entry; triple
   see: from; to
   seealso: fromalso; toalso

.. index::
   !Main, !Other
   !single: entry; pair

:index:`!Main`

.. _ölabel:

Ö... Some strange characters
----------------------------

Testing öäü...


Only directive
--------------

.. only:: html

   In HTML.

.. only:: latex

   In LaTeX.

.. only:: html or latex

   In both.

.. only:: confpytag and (testtag or nonexisting_tag)

   Always present, because set through conf.py/command line.


Any role
--------

.. default-role:: any

Test referencing to `headings <with>` and `objects <func_without_body>`.
Also `modules <mod>` and `classes <Time>`.

More domains:

* `JS <bar.baz>`
* `C <SphinxType>`
* `myobj` (user markup)
* `n::Array`
* `perl -c`

.. default-role::


Smart quotes
------------

* Smart "quotes" in English 'text'.
* Smart --- long and -- short dashes.
* Ellipsis...
* No smartypants in literal blocks: ``foo--"bar"...``.

.. only:: html

   .. LaTeX does not like Cyrillic letters in this test, so it is HTML only.

   .. rst-class:: language-ru

   Этот "абзац" должен использовать 'русские' кавычки.

   .. rst-class:: language-fr

   Il dit : "C'est 'super' !"

.. rubric:: Footnotes

.. [#] Like footnotes.