Debian Codegraph @

docs/ref/doctree.rst

raw
1 .. include:: ../header.rst
2
3 ============================
4 The Docutils Document Tree
5 ============================
6
7 A Guide to the `Docutils Generic` DTD
8 *************************************
9
10 :Author: David Goodger
11 :Contact: [email protected]
12 :Revision: $Revision: 10313 $
13 :Date: $Date: 2026-04-29 17:15:49 +0200 (Mi, 29. Apr 2026) $
14 :Copyright: This document has been placed in the public domain.
15
16 .. contents:: :depth: 1
17
18 This document describes the XML_ data structure of Docutils_ documents:
19 the relationships and semantics of elements and attributes.
20
21 .. _Docutils Generic DTD:
22
23 The Docutils document structure is formally defined by the
24 `Docutils Generic` XML document type definition (DTD) `<docutils.dtd>`__,
25 which is the definitive source for details of element structural relationships.
26 It should be used in conjunction with the description of the semantics of
27 the elements, attributes, and parameter entities in this document.
28
29 The reader is assumed to have some familiarity with XML or SGML,
30 and an understanding of the data structure meaning of "tree".
31 For a list of introductory articles, see, e.g.,
32 `Introducing the Extensible Markup Language (XML)`_.
33
34 Docutils implements the Document tree data structure in the Python_
35 module `docutils.nodes`. For details, see its internal API documentation
36 ("docstrings") and the source `nodes.py`_.
37
38 The reStructuredText_ markup language is used for illustrative examples
39 throughout this document. For a gentle introduction, see `A
40 ReStructuredText Primer`_. For complete technical details, see the
41 `reStructuredText Markup Specification`_.
42
43
44 -------------------
45 Element Hierarchy
46 -------------------
47
48 The Docutils document model uses strict element content models.
49
50 Below is a *simplified* diagram of the hierarchy of elements in the
51 Docutils document tree structure.
52 An element may contain elements immediately below it in the diagram.
53 Element types in *square brackets* indicate recursive or one-to-many
54 relationships: structural elements (sections) may contain sub-sections,
55 some body elements may contain other body elements, etc.
56 The `element reference`_ details valid parents and children
57 for each element.
58
59 .. raw:: html
60
61 <style type="text/css"><!--
62 table.e-hierarchy {border: 1px solid}
63 table.e-hierarchy td {border: 0px; padding: 0.5em}
64 table.e-hierarchy a {color: black; text-decoration: underline}
65 /* root element */
66 table.e-hierarchy tr:first-child {background: #eac9b2}
67 table.e-hierarchy td:nth-child(2) {background: #eac9b2}
68 table.e-hierarchy td:nth-child(3) {background: #eac9b2}
69 /* structural elements */
70 table.e-hierarchy tr:nth-child(2) {background: #e0ece0;}
71 table.e-hierarchy tr:nth-child(3) td:first-child {background: #e0ece0;}
72 table.e-hierarchy tr:nth-child(4) td:first-child {background: #e0ece0;}
73 /* structural subelements */
74 table.e-hierarchy tr:nth-child(3) td:nth-child(2) {background: #9ccfb3}
75 /* bibliograpinc elements */
76 table.e-hierarchy tr:nth-child(4) td:nth-child(2) {background: #accfd5}
77 /* decorative elements */
78 table.e-hierarchy tr:nth-child(4) td:nth-child(3) {background: #8cbfb3}
79 /* body elements */
80 table.e-hierarchy tr:nth-child(5) > td {background: #f7adad}
81 table.e-hierarchy tr:nth-child(6) td:nth-child(2){background: #f7adad}
82 table.e-hierarchy tr:nth-child(6) td:nth-child(3){background: #f7adad}
83 /* body subelements */
84 table.e-hierarchy tr:nth-child(6) > td {background: thistle}
85 table.e-hierarchy tr:nth-child(7) td:first-child {background: thistle}
86 /* inline elements */
87 table.e-hierarchy tr:nth-child(7) td:nth-child(2){background: #fffccc}
88 /* text */
89 table.e-hierarchy tr:last-child {background: #f9f8eb}
90 --></style>
91
92 .. table::
93 :class: e-hierarchy
94 :width: 90%
95 :widths: 1 1 1 1
96 :align: center
97
98 +-----------------------------------------------------------------+
99 | `root element`_ (`\<document>`_) |
100 +---+---------------------------------------------------------+---+
101 | [`structural elements`_] | |
102 +---+---------------------------------------------------------+ +
103 | | `structural subelements`_ | |
104 +---+-----------------------------+---------------------------+ +
105 | | `bibliographic elements`_ | `decorative elements`_ | |
106 +---+-----------------------------+---------------------------+---+
107 | [`body elements`_] |
108 +---+-----------------------------+---------------------------+---+
109 | [`body subelements`_] | | |
110 +---+-----------------------------+---------------------------+ +
111 | | [`inline elements`_] | |
112 +---+---------------------------------------------------------+---+
113 | text |
114 +-----------------------------------------------------------------+
115
116 Every element has a unique structure and semantics, but elements may be
117 classified into general categories according to their place and role in
118 the document. Some elements belong to more than one category.
119
120 .. contents:: :local:
121
122
123 Alternatively, we may classify elements by their content model:
124
125 .. class:: description
126
127 _`Compound elements`
128 | may contain child elements but no text data.
129 | Examples: `\<bullet_list>`_, `\<footnote>`_, `\<table>`_
130
131 _`Simple elements`
132 | may contain text data.
133 | Most simple elements have a mixed content model. However, only
134 `inline elements`_ may be intermixed with text (`%text.model`_). [#]_
135 | Examples: `\<paragraph>`_ (mixed), `\<literal_block>`_ (text-only)
136
137 _`Empty elements`
138 | contain neither child elements nor text.
139 | Category members: `\<colspec>`_, `\<image>`_, `\<meta>`_,
140 `\<pending>`_, `\<transition>`_
141
142 .. [#] This is unlike the much looser HTML_ document model,
143 where paragraphs and text data may occur at the same level.
144
145
146 Element Categories
147 ==================
148
149 Root Element
150 ------------
151
152 Every Docutils document contains exactly one root element.
153 The root element has no parent. It may contain `structural elements`_,
154 all `structural subelements`_, and `body elements`_.
155 It does not directly contain text.
156
157 .. class:: field-indent-11em
158
159 :Category members: `\<document>`_
160 :Docutils class: ``nodes.Root``
161
162
163 Structural Elements
164 -------------------
165
166 Structural elements group other elements to provide a document structure.
167 They are child elements of the `root element`_ or other structural
168 elements. Structural elements may contain specific structural elements,
169 `structural subelements`_, or `body elements`_.
170
171 .. class:: field-indent-11em
172
173 :Category members: `\<section>`_, `\<sidebar>`_, `\<topic>`_
174 :Docutils class: ``nodes.Structural``
175 :Parameter Entities:
176 `%structure.model`_ directly or indirectly includes all structural elements.
177
178
179 Structural Subelements
180 ----------------------
181
182 Structural subelements are child elements of the `root element`_ or
183 specific `structural elements`_. Their content model varies
184 (see the respective element reference section for details).
185
186 .. class:: narrow run-in
187
188 :Category members:
189 .. class:: narrow run-in
190
191 :empty: `\<meta>`_, `\<transition>`_
192 :simple: `\<title>`_, `\<subtitle>`_
193 :compound: `\<decoration>`_, `\<docinfo>`_
194
195 :Docutils class: ``nodes.SubStructural``
196
197
198 Decorative Elements
199 -------------------
200
201 Decorative elements are used to generate page headers and footers. They
202 are child elements of `\<decoration>`_ and contain `body elements`_.
203
204 .. class:: field-indent-11em
205
206 :Category members: `\<footer>`_, `\<header>`_
207 :Docutils class: ``nodes.Decorative``
208
209
210 Bibliographic Elements
211 ----------------------
212
213 Bibliographic elements store document meta-data like title or author.
214 They are child elements of `\<docinfo>`_.
215 Their content model varies (see the respective element reference section).
216
217 .. class:: narrow run-in
218
219 :Category members:
220 .. class:: narrow run-in
221
222 :simple: `\<address>`_, `\<author>`_, `\<contact>`_,
223 `\<copyright>`_, `\<date>`_, `\<organization>`_,
224 `\<revision>`_, `\<status>`_, `\<version>`_
225 :compound: `\<authors>`_, `\<field>`_
226
227 :Docutils class: ``nodes.Bibliographic``
228
229 :Parameter entity: `%bibliographic.elements`_
230
231
232 Body Elements
233 -------------
234
235 Body elements are children of the `root element`_, `structural elements`_,
236 or compound body elements.
237 _`Simple body elements` may contain text and `inline elements`_
238 or text data only (see the respective element reference section).
239 _`Compound body elements` may contain `body subelements`_ or further
240 body elements.
241
242 .. class:: narrow run-in
243
244 :Category members:
245 .. class:: narrow run-in
246
247 :empty:
248 `\<image>`_ , `\<pending>`_, `\<target>`_
249 :simple:
250 `\<comment>`_, `\<doctest_block>`_, `\<literal_block>`_, `\<math_block>`_,
251 `\<paragraph>`_, `\<raw>`_, `\<reference>`_, `\<rubric>`_,
252 `\<substitution_definition>`_
253 :compound:
254 `\<admonition>`_, `\<attention>`_, `\<block_quote>`_, `\<bullet_list>`_,
255 `\<caution>`_, `\<citation>`_, `\<compound>`_, `\<container>`_,
256 `\<danger>`_, `\<definition_list>`_, `\<enumerated_list>`_, `\<error>`_,
257 `\<field_list>`_, `\<figure>`_, `\<footnote>`_, `\<hint>`_,
258 `\<important>`_, `\<line_block>`_, `\<note>`_, `\<option_list>`_,
259 `\<system_message>`_, `\<table>`_, `\<tip>`_, `\<warning>`_
260
261 :Docutils class: ``nodes.Body``
262
263 :Parameter Entities:
264 `%body.elements`_ directly includes all body elements,
265 `%structure.model`_ indirectly includes all body elements.
266
267
268 Body Subelements
269 ----------------
270
271 Body subelements always occur within specific parent elements
272 (e.g. `\<bullet_list>`_ contains `\<list_item>`_), never at the
273 body element level (beside paragraphs, etc.).
274 Body subelements may be `compound elements`_ (containing `body elements`_ or
275 further body subelements) or `simple elements`_.
276
277 .. class:: narrow run-in
278
279 :Category members:
280 .. class:: narrow run-in
281
282 :empty:
283 `\<colspec>`_
284 :simple:
285 `\<attribution>`_, `\<caption>`_, `\<classifier>`_,
286 `\<field_name>`_, `\<label>`_, `\<line>`_,
287 `\<option_argument>`_, `\<option_string>`_, `\<term>`_, `\<title>`_
288 :compound:
289 `\<definition>`_, `\<definition_list_item>`_, `\<description>`_,
290 `\<entry>`_, `\<field>`_, `\<field_body>`_,
291 `\<legend>`_, `\<list_item>`_,
292 `\<option>`_, `\<option_group>`_, `\<option_list_item>`_,
293 `\<row>`_, `\<tbody>`_, `\<tgroup>`_, `\<thead>`_
294
295 :Docutils class: ``nodes.Part``
296
297
298 Inline Elements
299 ---------------
300
301 Inline elements are contained within simple `body elements`_ or other
302 inline elements.
303 Inline elements are `simple elements`_: All inline elements may contain
304 text data, most inline elements may also contain further inline elements.
305
306 .. class:: narrow run-in
307
308 :Category members:
309 `\<abbreviation>`_, `\<acronym>`_, `\<citation_reference>`_, `\<emphasis>`_,
310 `\<footnote_reference>`_, `\<generated>`_, `\<image>`_, `\<inline>`_,
311 `\<literal>`_, `\<math>`_, `\<problematic>`_, `\<raw>`_, `\<reference>`_,
312 `\<strong>`_, `\<subscript>`_, `\<substitution_reference>`_,
313 `\<superscript>`_, `\<target>`_, `\<title_reference>`_
314 :Docutils class:
315 ``nodes.Inline``
316 :Parameter Entities:
317 `%inline.elements`_ directly includes all inline elements,
318 `%text.model`_ indirectly includes all inline elements.
319
320
321 -------------------
322 Element Reference
323 -------------------
324
325 .. contents:: :local:
326 :depth: 1
327
328 Introduction
329 ============
330
331 Each element in the `Docutils Generic DTD`_ is described in its own
332 section below. Each section contains the following items:
333
334 * Summary description (up to two sentences).
335
336 * Details (of element relationships and semantics):
337
338 :Category: One or more references to the element categories in the
339 `Element Hierarchy`_ above. Some elements belong to more than one
340 category.
341
342 :Analogues: Analogous elements in well-known document
343 models such as `HTML` [html.spec]_ or `DocBook` [tdg5.1]_.
344 Describes similarities and differences.
345
346 :Processing: Formatting or rendering recommendations for the element.
347
348 :Parents: Elements which may contain the element.
349
350 :Children: Elements which may occur within the element.
351 Optionally followed by the formal XML content model from the
352 `Docutils Generic DTD`_.
353
354 :Attributes: XML Attributes that are defined for this element.
355
356 :Parameter Entities:
357 `Parameter entities`_ which directly or indirectly include the element
358 (if applicable and not already implied by the element category).
359
360 * Additional free text description and explanations (optional).
361
362 * Examples: reStructuredText_ examples are shown along with
363 fragments of the document trees resulting from parsing.
364 Pseudo-XML_ is used to display the results of parsing and processing.
365
366
367 <abbreviation>
368 ==============
369
370 The <abbreviation> element is an inline element representing an
371 *abbreviation*, a shortened or contracted form of a word or phrase
372 used to represent the whole.
373
374 :Category: `Inline Elements`_
375 :Analogues: <abbreviation> is analogous to the DocBook_ <abbrev> element.
376 The HTML_ <abbr> element is used for both, abbreviations
377 and acronyms.
378 :Processing: May be used to semantically mark the presence of an
379 abbreviation in the text for styling or scripting purposes.
380 Writers_ may ignore the element and just render its contents.
381 :Parents: all elements employing `%text.model`_ in their content models
382 :Children: text data plus `inline elements`_ (`%text.model`_)
383 :Attributes: only the `common attributes`_.
384
385 Examples
386 --------
387
388 The reStructuredText `"abbreviation" role`_ creates an <abbreviation> element::
389
390 :abbreviation:`St` is a common abbreviation for "street".
391
392 Pseudo-XML_ fragment from simple parsing::
393
394 <paragraph>
395 <abbreviation>
396 St
397 is a common abbreviation for "street".
398
399
400 <acronym>
401 =========
402
403 The <acronym> element is an inline element used to represent an
404 *acronym* (abbreviation formed by the initial letters of other words).
405
406 :Category: `Inline Elements`_
407 :Analogues: <acronym> is analogous to the DocBook_ <acronym> element.
408 The HTML_ <abbr> element is used for both, abbreviations
409 and acronyms.
410 :Processing: May be used to semantically mark the presence of an
411 acronym in the text for styling or scripting purposes.
412 Writers_ may ignore the element and just render its contents.
413 :Parents: all elements employing `%text.model`_ in their content models
414 :Children: text data plus `inline elements`_ (`%text.model`_)
415 :Attributes: only the `common attributes`_.
416
417 Examples
418 --------
419
420 The reStructuredText `"acronym" role`_ creates an <acronym> element::
421
422 `WWW`:acronym: is the acronym for the world wide web.
423
424 Pseudo-XML_ fragment from simple parsing::
425
426 <paragraph>
427 <acronym>
428 WWW
429 is the acronym for the world wide web.
430
431
432 <address>
433 ===========
434
435 The <address> element holds the surface mailing address information
436 for the author(s) (individual or group) of the document, or a third-party
437 contact address.
438
439 :Category: `Bibliographic Elements`_
440 :Analogues: <address> is analogous to the DocBook_ <address> element.
441 The HTML_ <address> element, in contrast, is analogous
442 to the `<contact>`_ element.
443 :Processing: As with the `\<literal_block>`_ element, newlines are
444 significant and must be preserved.
445 However, a monospaced typeface should not be used.
446 :Parents: `\<docinfo>`_, `\<authors>`_
447 :Children: text data plus `inline elements`_ (`%text.model`_)
448 :Attributes: the `common attributes`_ and `xml:space`_.
449
450 The <address> element is only valid in the bibliographic data (`\<docinfo>`_).
451 You may use a `\<line_block>`_ to format addresses in the document body.
452
453 Examples
454 --------
455
456 In reStructuredText, "address" is one of the registered
457 `bibliographic fields`_::
458
459 Document Title
460 ==============
461
462 :Address: 123 Example Ave.
463 Example, EX
464
465 Complete pseudo-XML_ result after parsing and applying transforms_::
466
467 <document ids="document-title" names="document title">
468 <title>
469 Document Title
470 <docinfo>
471 <address>
472 123 Example Ave.
473 Example, EX
474
475 See `\<docinfo>`_ for a more complete example, including processing
476 context.
477
478
479 <admonition>
480 ============
481
482 The <admonition> element is a generic, titled *admonition*,
483 a distinctive and self-contained notice.
484
485 :Category: `Compound Body Elements`_
486 :Analogues: The generic <admonition> has no direct analogues in common DTDs.
487 It can be emulated with primitives and type effects.
488 The specific admonitions `\<caution>`_, `\<note>`_,
489 `\<tip>`_, and `\<warning>`_ are analogous to the
490 respective DocBook_ elements.
491 :Processing: Rendered distinctly (inset and/or in a box, etc.).
492 :Parents: all elements employing `%body.elements`_ or
493 `%structure.model`_ in their content models
494 :Children: <admonition> elements begin with a `\<title>`_ and may contain
495 one or more `body elements`_.
496 :Attributes: only the `common attributes`_.
497
498 See also the _`specific admonition elements`
499 `\<attention>`_ `\<caution>`_, `\<danger>`_, `\<error>`_, `\<hint>`_,
500 `\<important>`_, `\<note>`_, `\<tip>`_, and `\<warning>`_.
501
502 Examples
503 --------
504
505 The reStructuredText `"admonition" directive`_ creates a generic
506 <admonition> element::
507
508 .. admonition:: By the way...
509
510 You can make up your own admonition too.
511
512 Pseudo-XML_ fragment from simple parsing::
513
514 <admonition class="admonition-by-the-way">
515 <title>
516 By the way...
517 <paragraph>
518 You can make up your own admonition too.
519
520
521 <attention>
522 ===========
523
524 The <attention> element is a specific *admonition*, a distinctive and
525 self-contained notice.
526
527 :Category: `Compound Body Elements`_
528 :Analogues: <attention> has no direct analogues in common DTDs.
529 It can be emulated with primitives and type effects.
530 :Processing: Rendered distinctly (inset and/or in a box, etc.),
531 with the generated title "Attention!" (or similar).
532 :Parents: all elements employing `%body.elements`_ or
533 `%structure.model`_ in their content models
534 :Children: one or more `body elements`_
535 :Attributes: only the `common attributes`_.
536
537 See also the generic `\<admonition>`_ and the other
538 `specific admonition elements`_.
539
540 Examples
541 --------
542
543 A reStructuredText `"attention" directive`_::
544
545 .. Attention:: All your base are belong to us.
546
547 Pseudo-XML_ fragment from simple parsing::
548
549 <attention>
550 <paragraph>
551 All your base are belong to us.
552
553
554 <attribution>
555 =============
556
557 The <attribution> element identifies the source of a `\<block_quote>`_.
558
559 :Category: `Body Subelements`_ (simple)
560 :Analogues: <attribution> is analogous to the DocBook_ <attribution> element.
561 :Processing: Placed below the block quote, usually be preceded by a dash,
562 right aligned, or otherwise set apart from the quotation.
563 :Parent: `\<block_quote>`_
564 :Children: text data plus `inline elements`_ (`%text.model`_)
565 :Attributes: only the `common attributes`_.
566
567 The Docutils HTML and LaTeX writers provide the `"attribution"`_ setting
568 to configure the formatting of the `\<attribution>`_.
569
570 Examples
571 --------
572
573 See `\<block_quote>`_.
574
575
576 <author>
577 ========
578
579 The <author> element holds the name of the author (or one of the authors)
580 of the document.
581
582 :Category: `Bibliographic Elements`_
583 :Analogues: <author> is analogous to the DocBook_ <personname> element.
584 :Processing: see `\<docinfo>`_
585 :Parents: `\<docinfo>`_, `\<authors>`_
586 :Children: text data plus `inline elements`_ (`%text.model`_)
587 :Attributes: only the `common attributes`_.
588
589 Examples
590 --------
591
592 In reStructuredText, "author" is one of the registered
593 `bibliographic fields`_::
594
595 Document Title
596 ==============
597
598 :Author: J. Random Hacker
599
600 Complete pseudo-XML_ result after parsing and applying transforms_::
601
602 <document ids="document-title" names="document title">
603 <title>
604 Document Title
605 <docinfo>
606 <author>
607 J. Random Hacker
608
609 See `\<docinfo>`_ for a more complete example, including processing
610 context.
611
612
613 <authors>
614 =========
615
616 The <authors> element is a container for author information for
617 documents with multiple authors.
618
619 :Category: `Bibliographic Elements`_
620
621 :Analogues: <authors> is analogous to the DocBook_ <authorgroup> element.
622
623 :Processing: See `\<docinfo>`_.
624
625 :Parent: `\<docinfo>`_
626
627 :Children: `\<author>`_, `\<organization>`_, `\<address>`_, `\<contact>`_::
628
629 ((author, organization?, address?, contact?)+)
630
631 :Attributes: only the `common attributes`_.
632
633 Examples
634 --------
635
636 In reStructuredText, the `"authors" field`_ is one of the registered
637 `bibliographic fields`_::
638
639 Document Title
640 ==============
641
642 :Authors: J. Random Hacker; Jane Doe
643
644 Complete pseudo-XML_ result after parsing and applying transforms_::
645
646 <document ids="document-title" names="document title">
647 <title>
648 Document Title
649 <docinfo>
650 <authors>
651 <author>
652 J. Random Hacker
653 <author>
654 Jane Doe
655
656 There is currently no way to represent an individual author's <organization>,
657 <address>, or <contact> in a reStructuredText `"authors" field`_.
658
659 See `\<docinfo>`_ for a more complete example, including processing
660 context.
661
662
663 <block_quote>
664 =============
665
666 The <block_quote> element is used for quotations set off from the
667 main text (standalone).
668
669 :Category: `Compound Body Elements`_
670 :Analogues: <block_quote> is analogous to the <blockquote> element
671 in both HTML_ and DocBook_.
672 :Processing: <block_quote> elements serve to set their contents off from the
673 main text, typically with indentation and/or other decoration.
674 :Parents: all elements employing `%body.elements`_ or
675 `%structure.model`_ in their content models
676 :Children: `body elements`_ followed by an optional `\<attribution>`_
677 :Attributes: only the `common attributes`_.
678
679 Examples
680 --------
681
682 In reStructuredText, an indented text block without preceding markup
683 is a `block quote`_::
684
685 As a great palaeontologist once said,
686
687 This theory, that is mine, is mine.
688
689 -- Anne Elk (Miss)
690
691 Pseudo-XML_ fragment from simple parsing::
692
693 <paragraph>
694 As a great palaeontologist once said,
695 <block_quote>
696 <paragraph>
697 This theory, that is mine, is mine.
698 <attribution>
699 Anne Elk (Miss)
700
701 The `"epigraph"`_ and `"pull-quote"`_ directives produce <block_quote>
702 elements, too.
703
704
705 <bullet_list>
706 =============
707
708 The <bullet_list> element contains `\<list_item>`_ elements which are
709 uniformly marked with bullets. Bullets are typically simple dingbats
710 (symbols) such as circles and squares.
711
712 :Category: `Compound Body Elements`_
713 :Analogues: <bullet_list> is analogous to the HTML_ <ul> element [#]_
714 and to the DocBook_ <itemizedlist> element.
715 :Processing: Each list item should begin a new vertical block,
716 prefaced by a bullet/dingbat.
717 :Parents: all elements employing `%body.elements`_ or
718 `%structure.model`_ in their content models
719 :Children: one or more `\<list_item>`_ elements
720 :Attributes: the `common attributes`_ and bullet_.
721
722 .. [#] HTML's <ul> is short for "unordered list", which we consider to be
723 a misnomer. "Unordered" implies that the list items may be randomly
724 rearranged without affecting the meaning of the list. Bullet lists
725 *are* often ordered; the ordering is simply left implicit.
726
727
728 Examples
729 --------
730
731 A reStructuredText `bullet list`_::
732
733 - Item 1, paragraph 1.
734
735 Item 1, paragraph 2.
736
737 - Item 2.
738
739 Pseudo-XML_ fragment from simple parsing::
740
741 <bullet_list bullet="-">
742 <list_item>
743 <paragraph>
744 Item 1, paragraph 1.
745 <paragraph>
746 Item 1, paragraph 2.
747 <list_item>
748 <paragraph>
749 Item 2.
750
751 See `\<list_item>`_ for another example.
752
753
754 <caption>
755 =========
756
757 The <caption> element represents the title/caption of a `\<figure>`_. [#]_
758
759 :Category: `Body Subelements`_ (simple)
760 :Analogues: The <caption> element is analogous to the DocBook_
761 <title> element (but specific to a `\<figure>`_).
762 The HTML_ <figcaption> element combines <caption>
763 and `\<legend>`_.
764 :Processing: Placed above, below, or besides the image it
765 describes. Often preceded by a figure number.
766 May be repeated in a generated "list of figures".
767 :Parent: `\<figure>`_
768 :Children: text data plus `inline elements`_ (`%text.model`_)
769 :Attributes: only the `common attributes`_.
770
771 Examples
772 --------
773
774 See `\<figure>`_.
775
776 .. [#] The title/caption of a `\<table>`_ is represented by
777 a `\<title>`_ element.
778
779
780 <caution>
781 =========
782
783 The <caution> element is a specific *admonition*, a distinctive and
784 self-contained notice. See also the generic `\<admonition>`_ and the
785 other `specific admonition elements`_.
786
787 :Category: `Compound Body Elements`_
788 :Analogues: <caution> is analogous to the `DocBook \<caution>`_ element.
789 :Processing: Rendered distinctly (inset and/or in a box, etc.), with the
790 generated title "Caution" (or similar).
791 :Parents: all elements employing `%body.elements`_ or
792 `%structure.model`_ in their content models
793 :Children: one or more `body elements`_
794 :Attributes: only the `common attributes`_.
795
796 Examples
797 --------
798
799 A reStructuredText `"caution" directive`_::
800
801 .. Caution:: Don't take any wooden nickels.
802
803 Pseudo-XML_ fragment from simple parsing::
804
805 <caution>
806 <paragraph>
807 Don't take any wooden nickels.
808
809
810 <citation>
811 ==========
812
813 The <citation> element contains a description of an external
814 bibliographic source. It is usually paired with one or more
815 `\<citation_reference>`_ elements that represent corresponding
816 reference marks in the running text.
817
818 :Category: `Compound Body Elements`_
819
820 :Analogues: <citation> is analogous to the DocBook_ <bibliomixed>
821 element. [#]_
822
823 The "doc-biblioentry" `DPub ARIA`_ role
824 (deprecated in version 1.1) can be used
825 to mark a `conforming HTML emulation`_.
826 The corresponding type in the
827 `EPUB 3 Structural Semantics Vocabulary`_ is "biblioentry".
828
829 :Processing: Formatted as entry in a bibliography
830 or similar to a `\<footnote>`_.
831
832 :Parents: all elements employing `%body.elements`_ or
833 `%structure.model`_ in their content models
834
835 :Children: <citation> elements begin with a `\<label>`_
836 and contain `body elements`_::
837
838 (label, (%body.elements;)+)
839
840 :Attributes: the `common attributes`_ and backrefs_.
841
842 .. [#] The DocBook_ <citation> element resembles a `\<citation_reference>`_.
843
844 Example
845 -------
846 See `\<citation_reference>`_.
847
848
849 <citation_reference>
850 ====================
851
852 The <citation_reference> element represents a cross reference
853 to a `\<citation>`_.
854
855 :Category: `Inline Elements`_
856 :Analogues: The <citation_reference> element is analogous
857 to the DocBook_ <citation> element.
858 There is no equivalent in HTML. The <a> element can be used
859 to provide a link to the corresponding citation.
860 :Processing: Typically enclosed in square brackets.
861 :Parents: all elements employing `%text.model`_ in their content models
862 :Children: only text data
863 :Attributes: refid_, refname_, and the `common attributes`_.
864
865 Example
866 -------
867
868 reStructuredText syntax for `citation references`_ is similar to a
869 `footnote reference`_ except for the use of a `simple reference name`_
870 instead of a numerical or symbolic label::
871
872 For details on brontosauruses, see [Elk:70]_.
873
874 .. [Elk:70] `My Theory on Brontosauruses`,
875 Anne Elk, London, 1972.
876
877 Pseudo-XML_ fragment simple parsing::
878
879 <paragraph>
880 For details on brontosauruses, see
881 <citation_reference ids="citation-reference-1" refname="elk:70">
882 Elk:70
883 .
884 <citation ids="elk-70" names="elk:70">
885 <label>
886 Elk:70
887 <paragraph>
888 <title_reference>
889 My Theory on Brontosauruses
890 ,
891 Anne Elk, London, 1972.
892
893 The ``references.Footnotes`` Docutils transform_ resolves this to::
894
895 <paragraph>
896 For details on brontosauruses, see
897 <citation_reference ids="citation-reference-1" refid="elk-70">
898 Elk:70
899 .
900 <citation backrefs="citation-reference-1" ids="elk-70" names="elk:70">
901 <label>
902 Elk:70
903 <paragraph>
904 <title_reference>
905 My Theory on Brontosauruses
906 ,
907 Anne Elk, London, 1972.
908
909
910 <classifier>
911 ============
912
913 The <classifier> element contains the classification or type
914 of the `\<term>`_ being defined in a `\<definition_list>`_.
915 For example, it can be used to indicate the type of a variable.
916
917 :Category: `Body Subelements`_ (simple)
918 :Analogues: <classifier> has no direct analogues in common DTDs.
919 It can be emulated with primitives or type effects.
920 :Processing: see `\<definition_list_item>`_
921 :Parent: `\<definition_list_item>`_
922 :Children: text data plus `inline elements`_ (`%text.model`_)
923 :Attributes: only the `common attributes`_.
924
925 Examples
926 --------
927
928 A reStructuredText `definition list`_ with classifiers::
929
930 name : string
931 Customer name.
932 i : int
933 Temporary index variable.
934
935 Pseudo-XML_ fragment from simple parsing::
936
937 <definition_list>
938 <definition_list_item>
939 <term>
940 name
941 <classifier>
942 string
943 <definition>
944 <paragraph>
945 Customer name.
946 <definition_list_item>
947 <term>
948 i
949 <classifier>
950 int
951 <definition>
952 <paragraph>
953 Temporary index variable.
954
955
956 <colspec>
957 =========
958
959 The <colspec> element contains specifications for a column in a `\<table>`_.
960 It is defined in the `Exchange Table Model`_.
961
962 :Category: `Body Subelements`_ (empty)
963 :Analogues: <colspec> is analogous to the DocBook_ <colspec> element.
964 The HTML_ <col> element is related but has different semantics.
965 :Processing: See `colspec`__ in the `Exchange Table Model`.
966 :Parent: `\<tgroup>`_
967 :Children: none (empty)
968 :Attributes: The `Exchange Table Model` defines the attributes
969 align_, char_, charoff_, colname_, colnum_, colsep_,
970 colwidth_, and rowsep_. [#]_
971 Via the `%tbl.colspec.att`_ parameter entity, <colspec>
972 also accepts the `common attributes`_ and `stub`_.
973
974 .. [#] Docutils ignores all attributes except colwidth_.
975
976 __ https://www.oasis-open.org/specs/tm9901.html#AEN446
977
978 Examples
979 --------
980
981 See `\<table>`_.
982
983
984 <comment>
985 =========
986
987 The <comment> element is used for explanatory notes that should not be
988 visible in the document rendering.
989
990 :Category: `Simple Body Elements`_
991 :Analogues: While most markup languages provide a syntax for comments,
992 the <comment> element has no direct analogues in HTML or DocBook.
993 :Processing: Included as comment or skipped in translations to other markup
994 languages. [#]_ Hidden from the document rendering.
995 :Parents: all elements employing `%body.elements`_, `%structure.model`_,
996 or `%text.model`_ in their content models
997 :Children: only text data
998 :Attributes: the `common attributes`_ and `xml:space`_.
999
1000 Examples
1001 --------
1002
1003 In reStructuredText, a comment_ block [#]_ is started by two full stops.
1004 No processing is done on the content but beware of a misinterpretation as
1005 `explicit markup construct`_::
1006
1007 .. This is a *comment*.
1008 .. [This] is a *citation*.
1009 ..
1010 [This] is another *comment*.
1011
1012 Pseudo-XML_ fragment from simple parsing::
1013
1014 <comment xml:space="preserve">
1015 This is a *comment*.
1016 <citation ids="this" names="this">
1017 <label>
1018 This
1019 <paragraph>
1020 is a
1021 <emphasis>
1022 citation
1023 .
1024 <comment xml:space="preserve">
1025 [This] is another *comment*.
1026
1027 .. [#] In Docutils, the `"strip_comments"`_ configuration setting
1028 triggers the removal of comment elements from the document tree.
1029 .. [#] There is no syntax for inline comments in reStructuredText.
1030
1031 <compound>
1032 ==========
1033
1034 The <compound> element combines multiple `body elements`_
1035 to a single logical paragraph.
1036
1037 :Category: `Compound Body Elements`_
1038 :Analogues: The <compound> element has no direct analogues in common DTDs.
1039 In HTML, it can be emulated with <div> and CSS styling. [#]_
1040 :Processing: Typically rendered as multiple distinct text blocks, with
1041 the possibility of variations to emphasize their logical
1042 unity (cf. the `"compound" directive`_).
1043 :Parents: all elements employing `%body.elements`_ or
1044 `%structure.model`_ in their content models
1045 :Children: one or more `body elements`_
1046 :Attributes: only the `common attributes`_.
1047
1048 .. [#] The Docutils counterpart to HTML’s <div> is the `\<container>`_ element.
1049
1050 Examples
1051 --------
1052
1053 The reStructuredText `"compound" directive`_ creates a
1054 <compound> element::
1055
1056 .. compound::
1057
1058 The 'rm' command is very dangerous. If you are logged
1059 in as root and enter ::
1060
1061 cd /
1062 rm -rf *
1063
1064 you will erase the entire contents of your file system.
1065
1066
1067 Pseudo-XML_ fragment from simple parsing::
1068
1069 <compound>
1070 <paragraph>
1071 The 'rm' command is very dangerous. If you are logged
1072 in as root and enter
1073 <literal_block xml:space="preserve">
1074 cd /
1075 rm -rf *
1076 <paragraph>
1077 you will erase the entire contents of your file system.
1078
1079
1080 <contact>
1081 =========
1082
1083 The <contact> element holds contact information for the author
1084 (individual or group) of the document, or a third-party contact.
1085 It is typically used for an email or web address.
1086
1087 :Category: `Bibliographic Elements`_
1088 :Analogues: <contact> is analogous to the DocBook_ <email> element
1089 and the HTML_ <address> element.
1090 :Processing: See `\<docinfo>`_.
1091 :Parents: `\<docinfo>`_, `\<authors>`_
1092 :Children: text data plus `inline elements`_ (`%text.model`_)
1093 :Attributes: only the `common attributes`_.
1094
1095 Examples
1096 --------
1097
1098 In reStructuredText, "contact" is one of the registered
1099 `bibliographic fields`_::
1100
1101 Document Title
1102 ==============
1103
1104 :Contact: [email protected]
1105
1106 Complete pseudo-XML_ result after parsing and applying transforms_::
1107
1108 <document ids="document-title" names="document title">
1109 <title>
1110 Document Title
1111 <docinfo>
1112 <contact>
1113 <reference refuri="mailto:[email protected]">
1114 [email protected]
1115
1116 See `\<docinfo>`_ for a more complete example, including processing
1117 context.
1118
1119
1120 <container>
1121 ===========
1122
1123 The <container> element groups multiple `body elements`_ for user- or
1124 application-specific purposes.
1125
1126 :Category: `Compound Body Elements`_
1127 :Analogues: The <container> element is analogous to the HTML_
1128 <div> element or the SVG <g> element.
1129 :Processing: Can be used for styling or scripting purposes.
1130 An example is a frame or background colour based
1131 on the value of the classes_ attribute.
1132 :Parents: all elements employing `%body.elements`_ or
1133 `%structure.model`_ in their content models
1134 :Children: one or more `body elements`_
1135 :Attributes: only the `common attributes`_.
1136
1137 Examples
1138 --------
1139
1140 The reStructuredText `"container" directive`_ creates a
1141 <container> element::
1142
1143 .. container:: green boxed-equation
1144
1145 .. math:: -1^2 = 1
1146
1147 This paragraph is in the box, too.
1148
1149 Pseudo-XML_ fragment from simple parsing::
1150
1151 <container classes="framed square">
1152 <math_block xml:space="preserve">
1153 -1^2 = 1
1154 <paragraph>
1155 This paragraph is in the box, too.
1156
1157 The HTML output can be placed in a common box with the custom CSS rule ::
1158
1159 div.framed {border: solid;
1160 padding: 1em;}
1161
1162
1163 <copyright>
1164 ===========
1165
1166 The <copyright> element contains the document's copyright statement.
1167
1168 :Category: `Bibliographic Elements`_
1169 :Analogues: <copyright> is analogous to the DocBook_ <copyright> element.
1170 :Processing: see `\<docinfo>`_
1171 :Parent: `\<docinfo>`_
1172 :Children: text data plus `inline elements`_ (`%text.model`_)
1173 :Attributes: only the `common attributes`_.
1174
1175 Examples
1176 --------
1177
1178 In reStructuredText, "copyright" is one of the registered
1179 `bibliographic fields`_::
1180
1181 Document Title
1182 ==============
1183
1184 :Copyright: This document has been placed in the public domain.
1185
1186 Complete pseudo-XML_ result after parsing and applying transforms_::
1187
1188 <document ids="document-title" names="document title">
1189 <title>
1190 Document Title
1191 <docinfo>
1192 <copyright>
1193 This document has been placed in the public domain.
1194
1195 See `\<docinfo>`_ for a more complete example,
1196 including processing context.
1197
1198
1199 <danger>
1200 ========
1201
1202 The <danger> element is a specific *admonition*, a distinctive and
1203 self-contained notice.
1204
1205 :Category: `Compound Body Elements`_
1206 :Analogues: <danger> has no direct analogues in common DTDs.
1207 It can be emulated with primitives and type effects.
1208 :Processing: Rendered distinctly (inset and/or in a box, etc.),
1209 with the generated title "!DANGER!" (or similar).
1210 :Parents: all elements employing `%body.elements`_ or
1211 `%structure.model`_ in their content models
1212 :Children: one or more `body elements`_
1213 :Attributes: only the `common attributes`_.
1214
1215 See also the generic `\<admonition>`_ and the other
1216 `specific admonition elements`_.
1217
1218 Examples
1219 --------
1220
1221 A reStructuredText `"danger" directive`_::
1222
1223 .. DANGER:: Mad scientist at work!
1224
1225 Pseudo-XML_ fragment from simple parsing::
1226
1227 <danger>
1228 <paragraph>
1229 Mad scientist at work!
1230
1231
1232 <date>
1233 ======
1234
1235 The <date> element contains the date of publication, release, or
1236 last modification of the document.
1237
1238 :Category: `Bibliographic Elements`_
1239 :Analogues: <date> is analogous to the DocBook_ <date> element.
1240 :Processing: Often used with the RCS/CVS keyword "Date". See `\<docinfo>`_.
1241 :Parent: `\<docinfo>`_
1242 :Children: text data plus `inline elements`_ (`%text.model`_)
1243 :Attributes: only the `common attributes`_.
1244
1245 Examples
1246 --------
1247
1248 In reStructuredText, "date" is one of the registered
1249 `bibliographic fields`_::
1250
1251 Document Title
1252 ==============
1253
1254 :Date: 2002-08-20
1255
1256 Complete pseudo-XML_ result after parsing and applying transforms_::
1257
1258 <document ids="document-title" names="document title">
1259 <title>
1260 Document Title
1261 <docinfo>
1262 <date>
1263 2002-08-20
1264
1265 See `\<docinfo>`_ for a more complete example,
1266 including processing context.
1267
1268
1269 <decoration>
1270 ============
1271
1272 The <decoration> element is a container for `\<header>`_ and `\<footer>`_
1273 elements and potential future extensions. These elements are used for
1274 notes, time/datestamp, processing information, etc.
1275
1276 :Category: `Structural Subelements`_
1277 :Analogues: There are no direct analogies to <decoration> in HTML or DocBook.
1278 :Processing: See the individual `decorative elements`_.
1279 :Parent: `\<document>`_
1280 :Children: The `decorative elements`_ `\<header>`_ and/or `\<footer>`_.
1281 Although the content model doesn't specifically require
1282 contents, no empty <decoration> elements are ever created.
1283 :Attributes: only the `common attributes`_.
1284
1285 Examples
1286 --------
1287 See `\<header>`_ and `\<footer>`_.
1288
1289
1290 <definition>
1291 ============
1292
1293 The <definition> element is a container for the body elements
1294 used to define a `\<term>`_ in a `\<definition_list>`_.
1295
1296 :Category: `Body Subelements`_ (compound)
1297 :Analogues: <definition> is analogous to the HTML_ <dd> element
1298 and to the DocBook_ <listitem> element
1299 (inside a <variablelistentry> element).
1300 :Processing: see `\<definition_list_item>`_
1301 :Parent: `\<definition_list_item>`_
1302 :Children: `body elements`_
1303 :Attributes: only the `common attributes`_.
1304
1305 Examples
1306 --------
1307 See the examples for the `\<definition_list>`_,
1308 `\<definition_list_item>`_, and `\<classifier>`_ elements.
1309
1310
1311 <definition_list>
1312 =================
1313
1314 The <definition_list> element contains a list of terms and their
1315 definitions. It can be used for glossaries or dictionaries, to
1316 describe or classify things, for dialogues, or to itemize subtopics.
1317
1318 :Category: `Compound Body Elements`_
1319 :Analogues: <definition_list> is analogous to the HTML_ <dl> element
1320 and to the DocBook_ <variablelist> element.
1321 :Processing: see `\<definition_list_item>`_
1322 :Parents: all elements employing `%body.elements`_ or
1323 `%structure.model`_ in their content models
1324 :Children: one or more `\<definition_list_item>`_ elements
1325 :Attributes: only the `common attributes`_.
1326
1327 See also `\<field_list>`_.
1328
1329 Examples
1330 --------
1331
1332 A reStructuredText `definition list`_. The classifier is optional. ::
1333
1334 Term
1335 Definition.
1336
1337 Term : classifier
1338 The ' : ' indicates a classifier in
1339 definition list item terms only.
1340
1341 Pseudo-XML_ fragment from simple parsing::
1342
1343 <definition_list>
1344 <definition_list_item>
1345 <term>
1346 Term
1347 <definition>
1348 <paragraph>
1349 Definition.
1350 <definition_list_item>
1351 <term>
1352 Term
1353 <classifier>
1354 classifier
1355 <definition>
1356 <paragraph>
1357 The ' : ' indicates a classifier in
1358 definition list item terms only.
1359
1360 See `\<definition_list_item>`_ and `\<classifier>`_ for further examples.
1361
1362
1363 <definition_list_item>
1364 ======================
1365
1366 A wrapper for a set of terms (with optional classifiers) and the
1367 associated definition in a `\<definition_list>`_.
1368
1369 :Category: `Body Subelements`_ (compound)
1370
1371 :Analogues: <definition_list_item> is analogous to the
1372 DocBook_ <variablelistentry> element.
1373
1374 :Processing: The optional `\<classifier>`_\ s can be rendered differently
1375 from the `\<term>`_. They should be separated visually,
1376 typically by spaces plus a colon or dash.
1377
1378 :Parent: `\<definition_list>`_
1379
1380 :Children: <definition_list_item> elements each contain
1381 one or more `\<term>`_ elements,
1382 zero or more `\<classifier>`_ elements,
1383 and a `\<definition>`_::
1384
1385 ((term, classifier*)+, definition)
1386
1387 Changed in Docutils 0.22: allow multiple terms.
1388
1389 :Attributes: only the `common attributes`_.
1390
1391 Examples
1392 --------
1393
1394 A complex reStructuredText_ `definition list`_::
1395
1396 Tyrannosaurus Rex : carnivore
1397 Big and scary; the "Tyrant King".
1398
1399 Brontosaurus : herbivore
1400 ..
1401
1402 All brontosauruses are thin at one end,
1403 much much thicker in the middle
1404 and then thin again at the far end.
1405
1406 -- Anne Elk (Miss)
1407
1408 Pseudo-XML_ fragment from simple parsing::
1409
1410 <definition_list>
1411 <definition_list_item>
1412 <term>
1413 Tyrannosaurus Rex
1414 <classifier>
1415 carnivore
1416 <definition>
1417 <paragraph>
1418 Big and scary; the "Tyrant King".
1419 <definition_list_item>
1420 <term>
1421 Brontosaurus
1422 <classifier>
1423 herbivore
1424 <definition>
1425 <comment xml:space="preserve">
1426 <block_quote>
1427 <paragraph>
1428 All brontosauruses are thin at one end,
1429 much much thicker in the middle
1430 and then thin again at the far end.
1431 <attribution>
1432 Anne Elk (Miss)
1433
1434 See `\<definition_list>`_ and `\<classifier>`_ for further examples.
1435
1436
1437 <description>
1438 =============
1439
1440 The <description> element is the part of an `\<option_list>`_ item that
1441 contains the description of a command-line option or group of options.
1442
1443 :Category: `Body Subelements`_ (compound)
1444 :Analogues: <description> has no direct analogues in common DTDs.
1445 :Processing: see `\<option_list>`_
1446 :Parent: `\<option_list_item>`_
1447 :Children: `body elements`_
1448 :Attributes: only the `common attributes`_.
1449
1450 Examples
1451 --------
1452 See `\<option_list>`_.
1453
1454
1455 <docinfo>
1456 =========
1457
1458 The <docinfo> element is a container for *displayed* document bibliographic
1459 data, or meta-data (data about the document). It corresponds to the
1460 front matter of a book, such as the title page and copyright page.
1461
1462 :Category: `Structural Subelements`_
1463
1464 :Analogues: There are no directly analogous HTML or DocBook elements.
1465 The DocBook_ <info> element is related but ususally
1466 suppressed in the output.
1467
1468 :Processing: The <docinfo> element may be rendered as a two-column table or
1469 in other styles. It may even be invisible or omitted from the
1470 processed output. Meta-data may be extracted from <docinfo>
1471 children; for example, HTML ``<meta>`` tags may be constructed.
1472
1473 When Docutils_ transforms a reStructuredText_ `\<field_list>`_
1474 into a <docinfo> element (see the examples below), RCS/CVS
1475 keywords are normally stripped from simple (one paragraph)
1476 field bodies. For complete details, please see `RCS Keywords`_
1477 in the `reStructuredText Markup Specification`_.
1478
1479 :Parent: `\<document>`_
1480
1481 :Children: `bibliographic elements`_
1482
1483 :Attributes: only the `common attributes`_.
1484
1485 See also the `\<meta>`_ element (for hidden meta-data).
1486
1487
1488 Examples
1489 --------
1490
1491 `Bibliographic data`_ is represented in reStructuredText by a
1492 `field list <rST field list_>`__ as the first visible element of a
1493 `document <rST document_>`__ (after optional document title and subtitle).
1494 The field list is transformed into a <docinfo> element and its children
1495 by the `DocInfo transform`_. [#abstract-dedication]_
1496
1497 Source::
1498
1499 Docinfo Example
1500 ===============
1501
1502 :Author: J. Random Hacker
1503 :Contact: [email protected]
1504 :Date: 2002-08-18
1505 :Status: Work In Progress
1506 :Version: 1
1507 :Filename: $RCSfile$
1508 :Copyright: This document has been placed in the public domain.
1509
1510 Complete pseudo-XML_ result after parsing and applying transforms_::
1511
1512 <document ids="docinfo-example" names="docinfo example">
1513 <title>
1514 Docinfo Example
1515 <docinfo>
1516 <author>
1517 J. Random Hacker
1518 <contact>
1519 <reference refuri="mailto:[email protected]">
1520 [email protected]
1521 <date>
1522 2002-08-18
1523 <status>
1524 Work In Progress
1525 <version>
1526 1
1527 <field classes="filename">
1528 <field_name>
1529 Filename
1530 <field_body>
1531 <paragraph>
1532 doctree.rst
1533 <copyright>
1534 This document has been placed in the public domain.
1535
1536 Note that "Filename" is a non-standard <docinfo> field, so becomes a
1537 generic ``field`` element. Also note that the "RCSfile" keyword
1538 syntax has been stripped from the "Filename" data.
1539
1540 See `\<field_list>`_ for a `reStructuredText field list`_ example
1541 in a non-bibliographic context. Also see the individual examples
1542 for the various `bibliographic elements`_.
1543
1544 .. [#abstract-dedication] Exceptions are the fields "abstract" and
1545 "dedication" that are transformed to `\<topic>`_ elements
1546 adjacent to the <docinfo>.
1547
1548
1549 <doctest_block>
1550 ===============
1551
1552 The <doctest_block> element is a Python-specific variant of a
1553 `\<literal_block>`_.
1554
1555 :Category: `Simple Body Elements`_
1556 :Analogues: <doctest_block> is analogous to the HTML_ <pre> element
1557 and the DocBook_ <programlisting> and <screen> elements.
1558 :Processing: As with `\<literal_block>`_, <doctest_block> elements are
1559 typically rendered in a monospaced typeface. It is crucial
1560 that all whitespace and line breaks are preserved in the
1561 rendered form.
1562 :Parents: all elements employing `%body.elements`_ or
1563 `%structure.model`_ in their content models
1564 :Children: text data plus `inline elements`_ (`%text.model`_)
1565 :Attributes: the `common attributes`_ and `xml:space`_.
1566
1567 Examples
1568 --------
1569
1570 A reStructuredText `doctest block`_::
1571
1572 This is an ordinary paragraph.
1573
1574 >>> print('this is a Doctest block')
1575 this is a Doctest block
1576
1577 Pseudo-XML_ fragment from simple parsing::
1578
1579 <paragraph>
1580 This is an ordinary paragraph.
1581 <doctest_block xml:space="preserve">
1582 >>> print('this is a Doctest block')
1583 this is a Doctest block
1584
1585 The <doctest_block> will be deprecated in Docutils 1.0, the
1586 reStructuredText parser will use a `\<literal_block>`_ instead.
1587
1588
1589 <document>
1590 ==========
1591
1592 The <document> element is the root (topmost) element of the Docutils
1593 document tree.
1594
1595 :Category: `Root Element`_
1596
1597 :Analogues: <document> is analogous to the HTML_ <html> element and to
1598 several DocBook_ elements such as <book>.
1599
1600 :Parents: The <document> element has no parents.
1601
1602 :Children: `structural elements`_, `structural subelements`_,
1603 and `body elements`_
1604
1605 .. parsed-literal::
1606
1607 ( (title, subtitle?)?,
1608 meta*,
1609 decoration?,
1610 (docinfo, transition?)?,
1611 `%structure.model`_; )
1612
1613 See the `%structure.model`_ parameter entity for details of
1614 the body of a <document>.
1615
1616 :Attributes: the `common attributes`_ and title_.
1617
1618 <document> is the direct or indirect ancestor of every other element in
1619 the tree. It encloses the entire document tree. It is the starting
1620 point for a document.
1621
1622
1623 Depending on the source of the data and the stage of processing,
1624 the <document> may not initially contain a `\<title>`_.
1625 A document title is not directly representable in reStructuredText_.
1626 Instead, the `DocTitle transform`_ may promote a lone top-level section
1627 title to become the document `\<title>`_, and similarly a lone
1628 second-level (sub)section's title to become the document `\<subtitle>`_.
1629
1630 The contents of "`\<decoration>`_" may be specified in a document,
1631 constructed programmatically, or both.
1632
1633 The "`\<docinfo>`_" may be transformed from an initial `\<field_list>`_.
1634
1635
1636 Examples
1637 --------
1638
1639 A minimal reStructuredText_ document with title::
1640
1641 A Title
1642 =======
1643
1644 A paragraph.
1645
1646 Complete pseudo-XML_ result from simple parsing::
1647
1648 <document>
1649 <section ids="a-title" names="a title">
1650 <title>
1651 A Title
1652 <paragraph>
1653 A paragraph.
1654
1655 After applying transforms_, the section title is promoted to become the
1656 document title::
1657
1658 <document ids="a-title" names="a title">
1659 <title>
1660 A Title
1661 <paragraph>
1662 A paragraph.
1663
1664
1665 <emphasis>
1666 ==========
1667
1668 The <emphasis> element is an inline element representing
1669 text that has *stress emphasis*.
1670
1671 :Category: `Inline Elements`_
1672 :Analogues: <emphasis> is analogous to the HTML_ <em> element
1673 and the DocBook_ <emphasis> element.
1674 :Processing: Typically displayed in italic type.
1675 :Parents: all elements employing `%text.model`_ in their content models
1676 :Children: text data plus `inline elements`_ (`%text.model`_)
1677 :Attributes: only the `common attributes`_.
1678
1679 Examples
1680 --------
1681
1682 The reStructuredText there are two `emphasis markup`_ alternatives::
1683
1684 There are :emphasis:`two` ways to *emphasize* text.
1685
1686 Pseudo-XML_ fragment from simple parsing::
1687
1688 <paragraph>
1689 There are
1690 <emphasis>
1691 two
1692 ways to
1693 <emphasis>
1694 emphasize
1695 text.
1696
1697
1698 <entry>
1699 =======
1700
1701 The <entry> element represents one cell of a `\<table>`_.
1702 It is defined in the `Exchange Table Model`_.
1703
1704 :Category: `Body Subelements`_ (compound)
1705 :Analogues: <entry> is analogous to the DocBook_ <entry> element.
1706 HTML_ differentiates between header entries <th>
1707 and data entries <td>.
1708 :Processing: Render content in a table cell. The morecols_ and morerows_
1709 attributes may be used to define an entry spanning several
1710 table cells.
1711 See entry__ in the `Exchange Table Model` for details.
1712 :Parents: `\<thead>`_, `\<tbody>`_
1713 :Children: `body elements`_ (via the `%tbl.entry.mdl`_ parameter entity)
1714 :Attributes: The <entry> element accepts the colname_, namest_,
1715 nameend_, morerows_, colsep_, rowsep_, align_, char_,
1716 charoff_, and valign_ attributes (ignored by Docutils) and
1717 (via the `%tbl.entry.att`_ parameter entity)
1718 the `common attributes`_ and morecols_.
1719
1720 __ https://www.oasis-open.org/specs/tm9901.html#AEN827
1721
1722 Examples
1723 --------
1724
1725 See `\<table>`_.
1726
1727
1728 <enumerated_list>
1729 =================
1730
1731 The <enumerated_list> element contains `\<list_item>`_ elements which are
1732 uniformly marked with enumerator labels.
1733
1734 :Category: `Compound Body Elements`_
1735 :Analogues: <enumerated_list> is analogous to the HTML_ <ol> element
1736 and to the DocBook_ <orderedlist> element.
1737 :Processing: Each list item should begin a new vertical block, prefaced
1738 by a enumeration marker (such as "1.").
1739 :Parents: all elements employing `%body.elements`_ or
1740 `%structure.model`_ in their content models
1741 :Children: one or more `\<list_item>`_ elements
1742 :Attributes: enumtype_, prefix_, suffix_, start_, and
1743 the `common attributes`_.
1744
1745 Examples
1746 --------
1747
1748 A reStructuredText `enumerated list`_::
1749
1750 1. Item 1.
1751
1752 (A) Item A.
1753 (B) Item B.
1754 (C) Item C.
1755
1756 2. Item 2.
1757
1758 Pseudo-XML_ fragment from simple parsing::
1759
1760 <enumerated_list enumtype="arabic" prefix="" suffix=".">
1761 <list_item>
1762 <paragraph>
1763 Item 1.
1764 <enumerated_list enumtype="upperalpha" prefix="(" suffix=")">
1765 <list_item>
1766 <paragraph>
1767 Item A.
1768 <list_item>
1769 <paragraph>
1770 Item B.
1771 <list_item>
1772 <paragraph>
1773 Item C.
1774 <list_item>
1775 <paragraph>
1776 Item 2.
1777
1778 See `\<list_item>`_ for another example.
1779
1780
1781 <error>
1782 =======
1783
1784 The <error> element is a specific *admonition*, a distinctive and
1785 self-contained notice.
1786
1787 :Category: `Compound Body Elements`_
1788 :Analogues: <error> has no direct analogues in common DTDs.
1789 It can be emulated with primitives and type effects.
1790 :Processing: Rendered distinctly (inset and/or in a box, etc.),
1791 with the generated title "Error" (or similar).
1792 :Parents: all elements employing `%body.elements`_ or
1793 `%structure.model`_ in their content models
1794 :Children: one or more `body elements`_
1795 :Attributes: only the `common attributes`_.
1796
1797 See also the generic `\<admonition>`_ and the other `specific admonition
1798 elements`_.
1799
1800 Examples
1801 --------
1802
1803 A reStructuredText `"error" directive`_::
1804
1805 .. Error:: Does not compute.
1806
1807 Pseudo-XML_ fragment from simple parsing::
1808
1809 <error>
1810 <paragraph>
1811 Does not compute.
1812
1813
1814 <field>
1815 =======
1816
1817 The <field> element contains one item of a `\<field_list>`_,
1818 a pair of `\<field_name>`_ and `\<field_body>`_ elements.
1819
1820 :Category: `Body Subelements`_ (compound), `Bibliographic Elements`_
1821 :Analogues: <field> has no direct analogues in common DTDs.
1822 HTML_ uses <div> elements inside <dl> lists for
1823 grouping <dt>/<dd> pairs.
1824 :Processing: See `\<field_list>`_.
1825 :Parents: `\<docinfo>`_, `\<field_list>`_
1826 :Children: one `\<field_name>`_ and one `\<field_body>`_ element
1827 :Attributes: only the `common attributes`_.
1828
1829 Examples
1830 --------
1831 See the examples for the `\<field_list>`_ and `\<docinfo>`_ elements.
1832
1833
1834 <field_body>
1835 ============
1836
1837 The <field_body> element is analogous to a database field's data.
1838
1839 :Category: `Body Subelements`_ (compound)
1840 :Analogues: <field_body> is analogous to the HTML_ <dd> element.
1841 :Processing: see `\<field_list>`_
1842 :Parent: `\<field>`_
1843 :Children: `body elements`_
1844 :Attributes: only the `common attributes`_.
1845
1846 Examples
1847 --------
1848 See the examples for the `\<field_list>`_ and `\<docinfo>`_ elements.
1849
1850
1851 <field_list>
1852 ============
1853
1854 The <field_list> element contains two-column table-like structures
1855 resembling database records (label & data pairs).
1856
1857 :Category: `Compound Body Elements`_
1858 :Analogues: <field_list> is analogue to the HTML_ <dl> element.
1859 :Processing: A <field_list> is typically rendered as a two-column list,
1860 where the first column contains "labels" (usually with a
1861 colon suffix). However, field lists are often used for
1862 extension syntax or special processing. Such structures do
1863 not survive as field lists to be rendered.
1864 :Parents: all elements employing `%body.elements`_ or
1865 `%structure.model`_ in their content models
1866 :Children: one or more `\<field>`_ elements
1867 :Attributes: only the `common attributes`_.
1868
1869 Field lists are often meant for further processing.
1870 In reStructuredText_, field lists are used to represent bibliographic
1871 fields (contents of the `\<docinfo>`_ element) and `directive`_ options.
1872
1873
1874 Examples
1875 --------
1876
1877 A reStructuredText `field list <rST field list_>`__::
1878
1879 :Author: Me
1880 :Version: 1
1881 :Date: 2001-08-11
1882 :Parameter i: integer
1883
1884 Pseudo-XML_ fragment from simple parsing::
1885
1886 <field_list>
1887 <field>
1888 <field_name>
1889 Author
1890 <field_body>
1891 <paragraph>
1892 Me
1893 <field>
1894 <field_name>
1895 Version
1896 <field_body>
1897 <paragraph>
1898 1
1899 <field>
1900 <field_name>
1901 Date
1902 <field_body>
1903 <paragraph>
1904 2001-08-11
1905 <field>
1906 <field_name>
1907 Parameter i
1908 <field_body>
1909 <paragraph>
1910 integer
1911
1912
1913 <field_name>
1914 ============
1915
1916 The <field_name> element is analogous to a database field's name.
1917
1918 :Category: `Body Subelements`_ (simple)
1919 :Analogues: <field_name> is analogous to the HTML_ <dt> element.
1920 :Processing: See `\<field_list>`_.
1921 :Parent: `\<field>`_
1922 :Children: text data plus `inline elements`_ (`%text.model`_)
1923 :Attributes: only the `common attributes`_.
1924
1925 Examples
1926 --------
1927 See the examples for the `\<field_list>`_ and `\<docinfo>`_ elements.
1928
1929
1930 <figure>
1931 ========
1932
1933 The <figure> element groups an `\<image>`_ with a `\<caption>`_
1934 and/or `\<legend>`_.
1935
1936 :Category: `Compound Body Elements`_
1937 :Analogues: The <figure> element is analogous to the HTML_ <figure>
1938 element and the DocBook_ <figure> and <informalfigure>
1939 elements but limited to images (while HTML and DocBook
1940 allow also other main content).
1941 :Processing: On paged media, figures may float to a different
1942 position if this helps the page layout.
1943 :Parents: all elements employing `%body.elements`_ or
1944 `%structure.model`_ in their content models
1945 :Children: `\<image>`_ or `\<reference>`_ (with nested <image>)
1946 followed by `\<caption>`_ or `\<legend>`_ or both.
1947 :Attributes: align_ (via `%align-h.att`_) , width_,
1948 and the `common attributes`_.
1949
1950 Examples
1951 --------
1952
1953 The reStructuredText `"figure" directive`_ creates a <figure> element::
1954
1955 .. figure:: larch-mini.jpg
1956 :alt: a larch
1957 :target: larch.jpg
1958 :class: thumbnail
1959 :figclass: numbered
1960
1961 The larch.
1962
1963 Larix decidua in Aletschwald.
1964
1965 Pseudo-XML_ fragment from simple parsing::
1966
1967 <figure classes="numbered">
1968 <reference refuri="larch.jpg">
1969 <image alt="a larch" classes="thumbnail" uri="larch-mini.jpg">
1970 <caption>
1971 The larch.
1972 <legend>
1973 <paragraph>
1974 Larix decidua in Aletschwald.
1975
1976
1977 <footer>
1978 ========
1979
1980 The <footer> element is a container element whose contents are meant
1981 to appear at the bottom of a web page, or repeated at the bottom of
1982 every printed page.
1983
1984 :Category: `Decorative Elements`_
1985 :Analogues: <footer> is analogous to the HTML_ <footer> element. There
1986 are no direct analogies to <footer> in HTML4 or DocBook.
1987 Equivalents are typically constructed from primitives and/or
1988 generated by the processing system.
1989 :Parent: `\<decoration>`_
1990 :Children: `body elements`_
1991 :Attributes: only the `common attributes`_.
1992
1993 The <footer> element may contain processing information (datestamp, a
1994 link to Docutils_, etc.) as well as custom content.
1995
1996
1997 Examples
1998 --------
1999
2000 A document may get a <footer> decoration even without use of the
2001 reStructuredText `"footer" directive`_::
2002
2003 A paragraph.
2004
2005 Complete pseudo-XML_ result after parsing and applying transforms_,
2006 assuming that the ``--date`` command-line option or `"datestamp"`_
2007 configuration setting has been supplied::
2008
2009 <document>
2010 <decoration>
2011 <footer>
2012 <paragraph>
2013 Generated on: 2002-08-20.
2014 <paragraph>
2015 A paragraph.
2016
2017
2018 <footnote>
2019 ==========
2020
2021 The <footnote> element is used for labelled notes_ that provide
2022 additional context to a passage of text (*footnotes* or *endnotes*).
2023 The corresponding footnote mark in running text is set by the
2024 `\<footnote_reference>`_ element.
2025
2026 .. _notes: https://en.wikipedia.org/wiki/Note_(typography)
2027
2028 :Category: `Compound Body Elements`_
2029
2030 :Analogues: <footnote> has no direct analogues in DocBook or HTML.
2031
2032 The `DocBook \<footnote>`_ element combines features of
2033 <footnote> and `\<footnote_reference>`_.
2034
2035 The HTML standard lists suggestions to `emulate footnotes`_.
2036 The `DPub ARIA`_ role "doc-footnote" may be used to mark a
2037 `conforming HTML emulation`_ (for collections of notes that
2038 occur at the end of a section, "doc-endnotes" is more
2039 appropriate).
2040 The corresponding types in the `EPUB 3 Structural Semantics
2041 Vocabulary`_ are "footnote" and "endnote".
2042
2043 :Processing: A <footnote> element should be set off from the rest of the
2044 document, e.g. with a border or using a smaller font size.
2045
2046 Footnotes may "float" to the bottom or margin of a page or a
2047 dedicated section.
2048
2049 :Parents: all elements employing `%body.elements`_ or
2050 `%structure.model`_ in their content models
2051
2052 :Children: <footnote> elements begin with an optional [#]_ `\<label>`_
2053 and contain `body elements`_::
2054
2055 (label?, (%body.elements;)+)
2056
2057 :Attributes: the `common attributes`_ plus auto_ and backrefs_.
2058
2059 .. [#] The footnote label will become mandatory in Docutils 1.0.
2060
2061 Examples
2062 --------
2063
2064 reStructuredText uses `explicit markup blocks`_ for `footnotes`_::
2065
2066 .. [1] This is a footnote.
2067
2068 Pseudo-XML_ fragment from simple parsing::
2069
2070 <footnote ids="id1" names="1">
2071 <label>
2072 1
2073 <paragraph>
2074 This is a footnote.
2075
2076
2077 <footnote_reference>
2078 ====================
2079
2080 The <footnote_reference> element is an inline element representing a
2081 cross reference to a `\<footnote>`_ (a footnote mark).
2082
2083 :Category: `Inline Elements`_
2084 :Analogues: The <footnote_reference> element resembles
2085 the `DocBook \<footnoteref>`_ element or
2086 the LaTeX ``\footnotemark`` command.
2087 There is no equivalent in HTML. The <a> element can be used
2088 to provide a link to the corresponding footnote.
2089 :Processing: A <footnote_reference> should generate a mark matching the
2090 `\<label>`_ of the referenced footnote. The mark is
2091 typically formatted as superscript or enclosed in square
2092 brackets.
2093 :Parents: all elements employing `%text.model`_ in their content models
2094 :Children: only text data
2095 :Attributes: auto_, refid_, refname_, and the `common attributes`_.
2096
2097 Examples
2098 --------
2099
2100 A reStructuredText `footnote reference`_ and footnote_::
2101
2102 [#]_ is an auto-numbered footnote reference.
2103
2104 .. [#] First auto-numbered footnote.
2105
2106 Pseudo-XML_ fragment from simple parsing::
2107
2108 <paragraph>
2109 <footnote_reference auto="1" ids="id1">
2110 is an auto-numbered footnote reference.
2111 <footnote auto="1" ids="id3">
2112 <paragraph>
2113 First auto-numbered footnote.
2114
2115 The ``references.Footnotes`` Docutils transform_ resolves this to::
2116
2117 <paragraph>
2118 <footnote_reference auto="1" ids="id1" refid="id2">
2119 1
2120 is an auto-numbered footnote reference.
2121 <footnote auto="1" backrefs="id1" ids="id2" names="1">
2122 <label>
2123 1
2124 <paragraph>
2125 First auto-numbered footnote.
2126
2127
2128 <generated>
2129 ===========
2130
2131 The <generated> element represents text that is not present in the
2132 document source but inserted by the processing system.
2133
2134 :Category: `Inline Elements`_
2135 :Analogues: There are no analogies to <generated> in HTML_ or DocBook_.
2136 :Processing: No special handling required.
2137 :Parents: all elements employing `%text.model`_ in their content models
2138 :Children: text data plus `inline elements`_ (`%text.model`_)
2139 :Attributes: only the `common attributes`_.
2140
2141 Examples
2142 --------
2143
2144 The reStructuredText `"sectnum" directive`_ automatically numbers
2145 sections and subsections in a document::
2146
2147 .. section-numbering::
2148
2149 Anagram quiz
2150 ============
2151
2152 Docutils wraps the generated section numbers in <generated> elements::
2153
2154 <section ids="anagram-quiz" names="anagram\ quiz">
2155 <title auto="1">
2156 <generated classes="sectnum">
2157 1   
2158 Anagram quiz
2159
2160
2161 <header>
2162 ========
2163
2164 The <header> element is a container element whose contents are meant
2165 to appear at the top of a web page, or at the top of every printed
2166 page.
2167
2168 :Category: `Decorative Elements`_
2169 :Analogues: <header> is analogous to the HTML_ <header> element.
2170 There are no direct analogies to <header> in HTML4 or DocBook.
2171 Equivalents are typically constructed from primitives and/or
2172 generated by the processing system.
2173 :Parent: `\<decoration>`_
2174 :Children: `body elements`_
2175 :Attributes: only the `common attributes`_.
2176
2177 Examples
2178 --------
2179
2180 A reStructuredText `"header" directive`_::
2181
2182 .. header:: This space for rent.
2183
2184 Pseudo-XML_ fragment from simple parsing::
2185
2186 <document>
2187 <decoration>
2188 <header>
2189 <paragraph>
2190 This space for rent.
2191
2192
2193 <hint>
2194 ======
2195
2196 The <hint> element is a specific *admonition*, a distinctive and
2197 self-contained notice.
2198
2199 :Category: `Compound Body Elements`_
2200 :Analogues: <hint> has no direct analogues in common DTDs.
2201 It can be emulated with primitives and type effects.
2202 :Processing: Rendered distinctly (inset and/or in a box, etc.),
2203 with the generated title "Hint" (or similar).
2204 :Parents: all elements employing `%body.elements`_ or
2205 `%structure.model`_ in their content models
2206 :Children: one or more `body elements`_
2207 :Attributes: only the `common attributes`_.
2208
2209 See also the generic `\<admonition>`_ and the other
2210 `specific admonition elements`_.
2211
2212 Examples
2213 --------
2214
2215 A reStructuredText `"hint" directive`_::
2216
2217 .. Hint:: It's bigger than a bread box.
2218
2219 Pseudo-XML_ fragment from simple parsing::
2220
2221 <hint>
2222 <paragraph>
2223 It's bigger than a bread box.
2224
2225
2226 <image>
2227 =======
2228
2229 The <image> element refers to an image resource that should be included
2230 in the document.
2231
2232 :Categories: `Body Elements`_, `Inline Elements`_
2233 :Analogues: <image> is analogous to the `HTML \<img>`_,
2234 `DocBook \<imagedata>`_, and `SVG \<image>`_ elements.
2235 :Processing: The specified image is included into the output document.
2236 Depending on the output format, this is done by referring to
2237 the image URI or by embedding the image data.
2238 :Parents: all elements employing `%body.elements`_, `%text.model`_,
2239 or `%structure.model`_ in their content models
2240 :Children: none (empty)
2241 :Attributes: uri_, alt_, align_, height_, width_, scale_, loading_,
2242 and the `common attributes`_.
2243
2244 It is up to the author to ensure compatibility of the image data format
2245 with the output format or user agent (LaTeX engine, HTML browser, ...).
2246 The `reStructuredText Directives` documentation contains a non exhaustive
2247 `table of compatible image formats`_.
2248
2249 Examples
2250 --------
2251
2252 A reStructuredText `"image" directive`_::
2253
2254 .. image:: picture.jpeg
2255 :width: 20 mm
2256 :alt: alternate text
2257
2258 Pseudo-XML_ fragment from simple parsing::
2259
2260 <image alt="alternate text" uri="picture.jpeg" width="20mm">
2261
2262 .. _HTML <img>: https://html.spec.whatwg.org/multipage/embedded-content.html
2263 #the-img-element
2264 .. _SVG <image>: https://svgwg.org/svg2-draft/embedded.html#ImageElement
2265
2266
2267 <important>
2268 ===========
2269
2270 The <important> element is a specific *admonition*, a distinctive and
2271 self-contained notice.
2272
2273 :Category: `Compound Body Elements`_
2274 :Analogues: <important> is analogous to the `DocBook \<important>`_ element.
2275 :Processing: Rendered distinctly (inset and/or in a box, etc.),
2276 with the generated title "Important" (or similar).
2277 :Parents: all elements employing `%body.elements`_ or
2278 `%structure.model`_ in their content models
2279 :Children: one or more `body elements`_
2280 :Attributes: only the `common attributes`_.
2281
2282 See also the generic `\<admonition>`_ and the other
2283 `specific admonition elements`_.
2284
2285 Examples
2286 --------
2287
2288 A reStructuredText `"important" directive`_::
2289
2290 .. Important::
2291
2292 * Wash behind your ears.
2293 * Clean up your room.
2294 * Back up your data.
2295
2296 Pseudo-XML_ fragment from simple parsing::
2297
2298 <important>
2299 <bullet_list>
2300 <list_item>
2301 <paragraph>
2302 Wash behind your ears.
2303 <list_item>
2304 <paragraph>
2305 Clean up your room.
2306 <list_item>
2307 <paragraph>
2308 Back up your data.
2309
2310
2311 <inline>
2312 ========
2313
2314 The <inline> element is a generic inline container.
2315
2316 :Category: `Inline Elements`_
2317 :Analogues: <inline> is analogous to the HTML_ <span> element and the
2318 DocBook_ <phrase> element.
2319 :Processing: Writers_ typically pass the classes_ attribute to the output
2320 document and leave styling to the backend or a custom
2321 stylesheet_. They may also process the classes_ attribute
2322 and convert the <inline> element to a specific element or
2323 render the content distinctly for specific class values.
2324 Moreover, writers may ignore the element and just render
2325 the content.
2326 :Parents: all elements employing `%text.model`_ in their content models
2327 :Children: text data plus `inline elements`_ (`%text.model`_)
2328 :Attributes: only the `common attributes`_.
2329
2330 Examples
2331 --------
2332
2333 `Custom interpreted text roles`_ create <inline> elements
2334 (unless they are based on a `standard role`_).
2335
2336 This reStructuredText source fragment creates and uses a custom role::
2337
2338 .. role:: custom
2339
2340 An example of using :custom:`interpreted text`
2341
2342 Pseudo-XML_ fragment from simple parsing::
2343
2344 <paragraph>
2345 An example of using
2346 <inline classes="custom">
2347 interpreted text
2348
2349
2350 <label>
2351 =======
2352
2353 The <label> element represents the reference label of
2354 a `\<footnote>`_ or `\<citation>`_.
2355
2356 :Category: `Body Subelements`_ (simple)
2357 :Analogues: The <label> element has no direct analogues in HTML.
2358 In DocBook_, the label of a footnote is stored as attribute
2359 of the <footnote> element and the label of a bibliographic entry
2360 is represented by an <abbrev> element.
2361 :Processing: Rendered prominently, as first token of the footnote or
2362 citation. Often enclosed in square brackets.
2363 :Parents: `\<footnote>`_, `\<citation>`_
2364 :Children: only text data
2365 :Attributes: only the `common attributes`_.
2366
2367 Examples
2368 --------
2369
2370 See `\<footnote>`_, `\<footnote_reference>`_, and `\<citation_reference>`_.
2371
2372
2373 <legend>
2374 ========
2375
2376 The <legend> element contains an extended description of a `\<figure>`_.
2377 It may complement or replace the figure `\<caption>`_.
2378
2379 :Category: `Body Subelements`_ (compound)
2380 :Analogues: The <legend> element is analogous to the DocBook_
2381 <caption> element (but specific to a `\<figure>`_).
2382 The HTML_ <figcaption> element combines `\<caption>`_
2383 and <legend>.
2384 :Processing: Formatted as a displayed block.
2385 :Parent: `\<figure>`_
2386 :Children: `body elements`_
2387 :Attributes: only the `common attributes`_.
2388
2389 Examples
2390 --------
2391 See `\<figure>`_.
2392
2393
2394 <line>
2395 ======
2396
2397 The <line> element contains a single line of text,
2398 part of a `\<line_block>`_.
2399
2400 :Category: `Body Subelements`_ (simple)
2401 :Analogues: <line> has no direct analogues in common DTDs.
2402 It can be emulated with primitives or type effects.
2403 :Processing: See `\<line_block>`_.
2404 :Parent: `\<line_block>`_
2405 :Children: text data plus `inline elements`_
2406 :Attributes: only the `common attributes`_.
2407
2408 Examples
2409 --------
2410 See `\<line_block>`_.
2411
2412
2413 <line_block>
2414 ============
2415
2416 The <line_block> element is a “plain list” of lines and nested line
2417 blocks. It is commonly used for verse and addresses.
2418
2419 :Category: `Compound Body Elements`_
2420 :Analogues: <line_block> has no direct analogues in common DTDs.
2421 Is is related to the DocBook_ <literallayout> element,
2422 however <literallayout> is a verbatim environment which
2423 directly contains text.
2424 :Processing: Each <line> should begin a new vertical block,
2425 without markers or additional spacing.
2426 Nested <line_blocks> should be indented.
2427 :Parents: all elements employing `%body.elements`_ or
2428 `%structure.model`_ in their content models
2429 :Children: `\<line>`_, <line_block>
2430 :Attributes: only the `common attributes`_.
2431
2432 See `\<literal_block>`_ for an alternative useful for
2433 program listings and interactive computer sessions.
2434
2435 Examples
2436 --------
2437
2438 A reStructuredText `line block`_::
2439
2440 Take it away, Eric the Orchestra Leader!
2441
2442 | A one, two, a one two three four
2443 |
2444 | Half a bee, philosophically,
2445 | must, *ipso facto*, half not be.
2446 | But half the bee has got to be,
2447 | *vis a vis* its entity. D'you see?
2448 |
2449 | But can a bee be said to be
2450 | or not to be an entire bee,
2451 | when half the bee is not a bee,
2452 | due to some ancient injury?
2453 |
2454 | Singing...
2455
2456 Pseudo-XML_ fragment from simple parsing::
2457
2458 <paragraph>
2459 Take it away, Eric the Orchestra Leader!
2460 <line_block>
2461 <line>
2462 A one, two, a one two three four
2463 <line>
2464 <line>
2465 Half a bee, philosophically,
2466 <line_block>
2467 <line>
2468 must,
2469 <emphasis>
2470 ipso facto
2471 , half not be.
2472 <line>
2473 But half the bee has got to be,
2474 <line_block>
2475 <line>
2476 <emphasis>
2477 vis a vis
2478 its entity. D'you see?
2479 <line>
2480 <line>
2481 But can a bee be said to be
2482 <line_block>
2483 <line>
2484 or not to be an entire bee,
2485 <line_block>
2486 <line>
2487 when half the bee is not a bee,
2488 <line_block>
2489 <line>
2490 due to some ancient injury?
2491 <line>
2492 <line>
2493 Singing...
2494
2495
2496 <list_item>
2497 ===========
2498
2499 The <list_item> element is a container for the elements of a list
2500 item.
2501
2502 :Category: `Body Subelements`_ (compound)
2503 :Analogues: <list_item> is analogous to the HTML_ <li> element
2504 and to the DocBook_ <listitem> element.
2505 :Processing: See `\<bullet_list>`_ or `\<enumerated_list>`_.
2506 :Parents: `\<bullet_list>`_, `\<enumerated_list>`_
2507 :Children: `body elements`_
2508 :Attributes: only the `common attributes`_.
2509
2510 Examples
2511 --------
2512
2513 A reStructuredText `enumerated list`_ with a nested `bullet list`_::
2514
2515 1. Outer list, item 1.
2516
2517 * Inner list, item 1.
2518 * Inner list, item 2.
2519
2520 2. Outer list, item 2.
2521
2522 Pseudo-XML_ fragment from simple parsing::
2523
2524 <enumerated_list enumtype="arabic" prefix="" suffix=".">
2525 <list_item>
2526 <paragraph>
2527 Outer list, item 1.
2528 <bullet_list bullet="*">
2529 <list_item>
2530 <paragraph>
2531 Inner list, item 1.
2532 <list_item>
2533 <paragraph>
2534 Inner list, item 2.
2535 <list_item>
2536 <paragraph>
2537 Outer list, item 2.
2538
2539 See `\<bullet_list>`_ or `\<enumerated_list>`_ for further examples.
2540
2541
2542 <literal>
2543 =========
2544
2545 The <literal> element represents inline text that is some literal value.
2546
2547 :Category: `Inline Elements`_
2548 :Analogues: <literal> is analogous to the DocBook_ <literal> element.
2549 HTML_ uses the specific elements <code>, <kbd>, and <samp>
2550 for code, input, and output.
2551 :Processing: Typically rendered in a monospace font.
2552 Preservation of line breaks and sequences of
2553 whitespace characters is not guaranteed.
2554 :Parents: all elements employing `%text.model`_ in their content models
2555 :Children: text data plus `inline elements`_ (`%text.model`_)
2556 :Attributes: only the `common attributes`_.
2557
2558 Examples
2559 --------
2560
2561 In reStructuredText, `inline literals`_, the `"literal" role`_,
2562 and the `"code" role`_ create <literal> elements.
2563 So do `custom roles`_ derived from "literal" or "code"::
2564
2565 .. role:: python(code)
2566 :language: python
2567
2568 The statement :python:`print("hello world")`
2569 writes ``"hello world"`` to standard output.
2570
2571 Pseudo-XML_ fragment from simple parsing::
2572
2573 <paragraph>
2574 The statement
2575 <literal classes="code python">
2576 <inline classes="name builtin">
2577 print
2578 <inline classes="punctuation">
2579 (
2580 <inline classes="literal string double">
2581 "hello world"
2582 <inline classes="punctuation">
2583 )
2584
2585 writes
2586 <literal>
2587 "hello world"
2588 to standard output.
2589
2590
2591 <literal_block>
2592 ===============
2593
2594 The <literal_block> element contains a block of text where line
2595 breaks and whitespace are significant and must be preserved.
2596
2597 Details
2598 -------
2599
2600 :Category: `Simple Body Elements`_
2601 :Analogues: <literal_block> is analogous to the HTML_ <pre> element
2602 and to the DocBook_ <programlisting> and <screen> elements.
2603 :Processing: <literal_block> elements are typically rendered in a
2604 monospaced typeface. It is crucial that all whitespace and
2605 line breaks are preserved in the rendered form.
2606 :Parents: all elements employing `%body.elements`_ or
2607 `%structure.model`_ in their content models
2608 :Children: text data plus `inline elements`_ (`%text.model`_)
2609 :Attributes: the `common attributes`_ and `xml:space`_.
2610
2611 <literal_block> elements are commonly used for program listings and
2612 interactive computer sessions.
2613 See `\<line_block>`_ for an alternative useful for verse and addresses.
2614
2615 Examples
2616 --------
2617
2618 A reStructuredText `"parsed-literal" directive`_::
2619
2620 .. parsed-literal::
2621
2622 if parsed_literal:
2623 text = 'is parsed for reStructuredText_ markup'
2624 spaces_and_linebreaks = 'are preserved'
2625 markup_processing = **True**
2626
2627 Pseudo-XML_ fragment from simple parsing::
2628
2629 <literal_block xml:space="preserve">
2630 if parsed_literal:
2631 text = 'is parsed for
2632 <reference name="reStructuredText" refid="restructuredtext">
2633 reStructuredText
2634 markup'
2635 spaces_and_linebreaks = 'are preserved'
2636 markup_processing =
2637 <strong>
2638 True
2639
2640 <literal-block> elements are also generated by a `literal block`_ and
2641 the `"code" directive`_, e.g. ::
2642
2643 .. code:: python
2644
2645 print(8/2)
2646
2647 Pseudo-XML_ fragment from simple parsing (with the `"syntax_highlight"`_
2648 setting at its default value "long")::
2649
2650 <literal_block classes="code python" xml:space="preserve">
2651 <inline classes="name builtin">
2652 print
2653 <inline classes="punctuation">
2654 (
2655 <inline classes="literal number integer">
2656 8
2657 <inline classes="operator">
2658 /
2659 <inline classes="literal number integer">
2660 2
2661 <inline classes="punctuation">
2662 )
2663
2664
2665 <math>
2666 ======
2667
2668 The <math> element contains text in `LaTeX math format` [#latex-math]_
2669 that is typeset as mathematical notation (inline formula).
2670
2671 :Category: `Inline Elements`_
2672 :Analogues: <math> is related to the <math> element in MathML and HTML.
2673 However, it contains text data only.
2674 :Processing: Rendered as mathematical notation.
2675 If the output format does not support math typesetting,
2676 the content may be inserted verbatim.
2677 :Parents: all elements employing `%text.model`_ in their content models
2678 :Children: only text data
2679 :Attributes: only the `common attributes`_.
2680
2681 Example
2682 -------
2683
2684 reStructuredText source::
2685
2686 Euler's identity is :math:`e^{\mathrm{i}\pi} + 1 = 0`.
2687
2688 Pseudo-XML_ fragment from simple parsing::
2689
2690 <paragraph>
2691 Euler’s identity is
2692 <math>
2693 e^{\mathrm{i}\pi} + 1 = 0
2694 .
2695
2696 .. [#latex-math] For details of the supported mathematical language, see
2697 the `"math" directive`_
2698
2699
2700 <math_block>
2701 ============
2702
2703 The <math_block> element contains a block of text in `LaTeX math format`
2704 [#latex-math]_ that is typeset as mathematical notation (display formula).
2705
2706 :Category: `Simple Body Elements`_
2707 :Analogues: <math_block> is analogous to a HTML/MathML <math> element
2708 displayed as block-level element or a LaTeX ``equation*``
2709 environment.
2710 :Processing: Rendered in a block as mathematical notation, typically
2711 centered or with indentation
2712 If the output format does not support math typesetting,
2713 the content may be inserted verbatim.
2714 :Parents: all elements employing `%body.elements`_ or
2715 `%structure.model`_ in their content models
2716 :Children: only text data
2717 :Attributes: the `common attributes`_ and `xml:space`_.
2718
2719 Example
2720 -------
2721
2722 The reStructuredText `"math" directive`_ generates a <math_block> element::
2723
2724 Euler's identity is the equation
2725
2726 .. math:: e^{\mathrm{i}\pi} + 1 = 0
2727
2728 Pseudo-XML_ fragment from simple parsing::
2729
2730 <paragraph>
2731 Euler’s identity is the equation
2732 <math_block xml:space="preserve">
2733 e^{\mathrm{i}\pi} + 1 = 0
2734
2735
2736 <meta>
2737 ======
2738
2739 The <meta> element is a container for "hidden" document
2740 bibliographic data, or meta-data (data about the document).
2741
2742 :Category: `Structural Subelements`_
2743
2744 :Analogues: <meta> is analogous to the `HTML <meta> element`_
2745 or the file properties in ODT or PDF documents.
2746
2747 :Processing: The <meta> element is stored as metadata if the export
2748 format supports this. It is typically invisible and may be
2749 omitted from the processed output.
2750
2751 Meta-data may also be extracted from `\<docinfo>`_ children
2752 or the `\<document>`_ attributes (title).
2753
2754 :Parent: `\<document>`_
2755
2756 :Children: none (empty)
2757
2758 :Attributes: the attributes *content*, *dir*, *http-equiv*, *lang*,
2759 *media*, name_, and *scheme* that correspond to the
2760 respective attributes of the `HTML <meta> element`_.
2761
2762 See also the `\<docinfo>`_ element for displayed meta-data.
2763 The document's `title attribute`_ stores the metadata document title.
2764
2765 Example
2766 -------
2767
2768 A reStructuredText `"meta" directive`_::
2769
2770 .. meta::
2771 :description lang=en: An amusing story
2772 :description lang=fr: Un histoire amusant
2773
2774 Pseudo-XML_ fragment from simple parsing::
2775
2776 <meta content="An amusing story" lang="en" name="description">
2777 <meta content="Un histoire amusant" lang="fr" name="description">
2778
2779 .. _HTML <meta> element:
2780 https://html.spec.whatwg.org/multipage/semantics.html#the-meta-element
2781
2782
2783 <note>
2784 ======
2785
2786 The <note> element is a specific *admonition*, a distinctive and
2787 self-contained notice.
2788
2789 :Category: `Compound Body Elements`_
2790 :Analogues: <note> is analogous to the `DocBook \<note>`_ element.
2791 :Processing: Rendered distinctly (inset and/or in a box, etc.),
2792 with the generated title "Note" (or similar).
2793 :Parents: all elements employing `%body.elements`_ or
2794 `%structure.model`_ in their content models
2795 :Children: one or more `body elements`_
2796 :Attributes: only the `common attributes`_.
2797
2798 See also the generic `\<admonition>`_ and the other
2799 `specific admonition elements`_.
2800
2801 Examples
2802 --------
2803
2804 A reStructuredText `"note" directive`_::
2805
2806 .. Note:: Admonitions can be handy to break up a
2807 long boring technical document.
2808
2809 Pseudo-XML_ fragment from simple parsing::
2810
2811 <note>
2812 <paragraph>
2813 Admonitions can be handy to break up a
2814 long boring technical document.
2815
2816
2817 <option>
2818 ========
2819
2820 The <option> element groups an option string together with zero or
2821 more option argument placeholders.
2822
2823 :Category: `Body Subelements`_ (compound)
2824 :Analogues: <option> has no direct analogues in common DTDs.
2825 :Processing: See `\<option_list>`_.
2826 :Parent: `\<option_group>`_
2827 :Children: <option> elements start with an `\<option_string>`_ and
2828 may contain `\<option_argument>`_ elements::
2829
2830 (option_string, option_argument*)
2831
2832 :Attributes: only the `common attributes`_.
2833
2834 Note that reStructuredText_ currently supports only one argument per
2835 option.
2836
2837 Examples
2838 --------
2839 See the examples for the `\<option_list>`_ element.
2840
2841
2842 <option_argument>
2843 =================
2844
2845 The <option_argument> element contains placeholder text for option
2846 arguments.
2847
2848 :Category: `Body Subelements`_ (simple)
2849 :Analogues: <option_argument> has no direct analogues in common DTDs.
2850 :Processing: The value of the "delimiter" attribute is prefixed to the
2851 <option_argument>, separating it from its
2852 `\<option_string>`_ or a preceding <option_argument>.
2853 The <option_argument> text is typically rendered in a
2854 monospaced typeface, possibly italicized or otherwise
2855 altered to indicate its placeholder nature.
2856 :Parent: `\<option>`_
2857 :Children: only text data
2858 :Attributes: the `common attributes`_ and delimiter_.
2859
2860 Examples
2861 --------
2862 See the examples for the `\<option_list>`_ element.
2863
2864
2865 <option_group>
2866 ==============
2867
2868 The <option_group> element groups together one or more `\<option>`_
2869 elements, all synonyms.
2870
2871 :Category: `Body Subelements`_ (compound)
2872 :Analogues: <option_group> has no direct analogues in common DTDs.
2873 :Processing: Typically `\<option>`_ elements within an <option_group> are
2874 joined together in a comma-separated list.
2875 :Parent: `\<option_list_item>`_
2876 :Children: one or more `\<option>`_ elements
2877 :Attributes: only the `common attributes`_.
2878
2879 Examples
2880 --------
2881 See the examples for the `\<option_list>`_ element.
2882
2883
2884 <option_list>
2885 =============
2886
2887 Each <option_list> element contains a two-column list of command-line
2888 options and descriptions, documenting a program's options.
2889
2890 :Category: `Compound Body Elements`_
2891 :Analogues: <option_list> has no direct analogues in common DTDs.
2892 It can be emulated with primitives such as tables.
2893 :Processing: An <option_list> is typically rendered as a two-column list,
2894 where the first column contains option strings and
2895 arguments, and the second column contains descriptions.
2896 :Parents: all elements employing `%body.elements`_ or
2897 `%structure.model`_ in their content models
2898 :Children: one or more `\<option_list_item>`_ elements
2899 :Attributes: only the `common attributes`_.
2900
2901 Examples
2902 --------
2903
2904 A reStructuredText `option list`_::
2905
2906 -a command-line option "a"
2907 -1 file, --one=file, --two file
2908 Multiple options with arguments.
2909
2910 Pseudo-XML_ fragment from simple parsing::
2911
2912 <option_list>
2913 <option_list_item>
2914 <option_group>
2915 <option>
2916 <option_string>
2917 -a
2918 <description>
2919 <paragraph>
2920 command-line option "a"
2921 <option_list_item>
2922 <option_group>
2923 <option>
2924 <option_string>
2925 -1
2926 <option_argument delimiter=" ">
2927 file
2928 <option>
2929 <option_string>
2930 --one
2931 <option_argument delimiter="=">
2932 file
2933 <option>
2934 <option_string>
2935 --two
2936 <option_argument delimiter=" ">
2937 file
2938 <description>
2939 <paragraph>
2940 Multiple options with arguments.
2941
2942
2943 <option_list_item>
2944 ==================
2945
2946 The <option_list_item> element is a container for a pair of
2947 `\<option_group>`_ and `\<description>`_ elements.
2948
2949 :Category: `Body Subelements`_ (compound)
2950 :Analogues: <option_list_item> has no direct analogues in common DTDs.
2951 :Processing: see `\<option_list>`_
2952 :Parent: `\<option_list>`_
2953 :Children: one `\<option_group>`_ and one `\<description>`_
2954 :Attributes: only the `common attributes`_.
2955
2956 Examples
2957 --------
2958 See the examples for the `\<option_list>`_ element.
2959
2960
2961 <option_string>
2962 ===============
2963
2964 The <option_string> element contains the text of a command-line option.
2965
2966 :Category: `Body Subelements`_ (simple)
2967 :Analogues: <option_string> has no direct analogues in common DTDs.
2968 :Processing: The <option_string> text is typically rendered in a
2969 monospaced typeface.
2970 :Parent: `\<option>`_
2971 :Children: only text data
2972 :Attributes: only the `common attributes`_.
2973
2974 Examples
2975 --------
2976 See the examples for the `\<option_list>`_ element.
2977
2978
2979 <organization>
2980 ==============
2981
2982 The <organization> element contains the name of document author's
2983 organization, or the organization responsible for the document.
2984
2985 :Category: `Bibliographic Elements`_
2986 :Analogues: <organization> is analogous to the <orgname>,
2987 <corpname>, or <publishername> DocBook_ elements.
2988 :Processing: See `\<docinfo>`_.
2989 :Parent: `\<docinfo>`_
2990 :Children: text data plus `inline elements`_ (`%text.model`_)
2991 :Attributes: only the `common attributes`_.
2992
2993 Examples
2994 --------
2995
2996 In reStructuredText, "organization" is one of the registered
2997 `bibliographic fields`_::
2998
2999 Document Title
3000 ==============
3001
3002 :Organization: Humankind
3003
3004 Complete pseudo-XML_ result after parsing and applying transforms_::
3005
3006 <document ids="document-title" names="document title">
3007 <title>
3008 Document Title
3009 <docinfo>
3010 <organization>
3011 Humankind
3012
3013 See `\<docinfo>`_ for a more complete example, including processing
3014 context.
3015
3016
3017 <paragraph>
3018 ===========
3019
3020 The <paragraph> element contains the text and inline elements of a
3021 single paragraph, a fundamental building block of documents.
3022
3023 :Category: `Simple Body Elements`_
3024 :Analogues: <paragraph> is analogous to the HTML_ <p> element
3025 and to the DocBook_ <para> element.
3026 :Parents: all elements employing `%body.elements`_ or
3027 `%structure.model`_ in their content models
3028 :Children: text data plus `inline elements`_ (`%text.model`_)
3029 :Attributes: only the `common attributes`_.
3030
3031 Examples
3032 --------
3033
3034 In reStructuredText_, blocks of left-aligned text are paragraphs unless
3035 marked up as another body element::
3036
3037 A paragraph must be
3038 left-aligned.
3039
3040 Pseudo-XML_ fragment from simple parsing::
3041
3042 <paragraph>
3043 A paragraph must be
3044 left-aligned.
3045
3046
3047 <pending>
3048 =========
3049
3050 The <pending> element is a placeholder for a pending transform_.
3051
3052 :Category: `Body Elements`_ (empty)
3053 :Analogues: <pending> has no direct analogues in common DTDs.
3054 :Processing: Usually replaced or removed by the associated transform_.
3055 Writers may ignore remaining <pending> elements.
3056 :Parents: all elements employing `%body.elements`_ or
3057 `%structure.model`_ in their content models
3058 :Children: none (empty)
3059 :Attributes: only the `common attributes`_.
3060
3061 Example
3062 -------
3063
3064 The reStructuredText `"contents" directive`_ indicates that an auto-generated
3065 table of contents (ToC) should be inserted at this point::
3066
3067 .. contents::
3068 :depth: 1
3069
3070 first section
3071 =============
3072
3073 second section
3074 ==============
3075
3076 As the ToC can't be generated until the entire document has been parsed,
3077 simple parsing adds a `\<topic>`_ with a <pending> element as placeholder::
3078
3079 <topic classes="contents" ids="contents" names="contents">
3080 <title>
3081 Contents
3082 <pending>
3083 .. internal attributes:
3084 .transform: docutils.transforms.parts.Contents
3085 .details:
3086 depth: 1
3087 <section ids="first-section" names="first\ section">
3088 <title>
3089 first section
3090 <section ids="second-section" names="second\ section">
3091 <title>
3092 second section
3093
3094 After parsing is completed, the associated `parts.Contents` transform_
3095 replaces the <pending> node with the table of contents::
3096
3097 <topic classes="contents" ids="contents" names="contents">
3098 <title>
3099 Contents
3100 <bullet_list>
3101 <list_item>
3102 <paragraph>
3103 <reference ids="toc-entry-1" refid="first-section">
3104 first section
3105 <list_item>
3106 <paragraph>
3107 <reference ids="toc-entry-2" refid="second-section">
3108 second section
3109 <section ids="first-section" names="first\ section">
3110 <title refid="toc-entry-1">
3111 first section
3112 <section ids="second-section" names="second\ section">
3113 <title refid="toc-entry-2">
3114 second section
3115
3116
3117 <problematic>
3118 =============
3119
3120 The <problematic> element highlights a source part that caused a parsing
3121 problem.
3122
3123 :Category: `Inline Elements`_
3124 :Analogues: <problematic> has no direct analogues in common DTDs.
3125 :Processing: Typically displayed in red colour.
3126 If the refid_ attribute is present, the element should
3127 point to the referenced element.
3128 :Parents: all elements employing `%text.model`_ in their content models
3129 :Children: text data plus `inline elements`_ (`%text.model`_)
3130 :Attributes: the `common attributes`_ and refid_.
3131
3132 Examples
3133 --------
3134
3135 The reStructuredText parser marks ambiguous or invalid inline syntax as
3136 <problematic> and adds a reference to the associated `\<system_message>`_.
3137 The behaviour can be configured with the `"report_level"`_ setting.
3138
3139 The following paragraph contains unbalanced `inline markup`_::
3140
3141 a single *star
3142
3143 Pseudo-XML_ fragment from simple parsing::
3144
3145 <paragraph>
3146 a single
3147 <problematic ids="problematic-1" refid="system-message-1">
3148 *
3149 star
3150 <system_message backrefs="problematic-1" ids="system-message-1"
3151 level="2" line="1" source="example.rst" type="WARNING">
3152 <paragraph>
3153 Inline emphasis start-string without end-string.
3154
3155
3156 <raw>
3157 =====
3158
3159 The <raw> element contains non-reStructuredText data that is to be passed
3160 untouched to the Writer.
3161
3162 :Category: `Simple Body Elements`_, `Inline Elements`_
3163 :Analogues: The <raw> element has no direct analogues in common DTDs.
3164 :Processing: Passed untouched to the Writer_.
3165 The interpretation is up to the Writer.
3166 A Writer may ignore <raw> elements not matching its format_.
3167 :Parents: all elements employing `%body.elements`_, `%structure.model`_,
3168 or `%text.model`_ in their content models
3169 :Children: only text data
3170 :Attributes: format_, `xml:space`_ and the `common attributes`_.
3171
3172 Examples
3173 --------
3174
3175 The reStructuredText `"raw" directive`_ [#]_ creates a <raw> element::
3176
3177 .. raw:: html
3178
3179 <hr width=50 size=10>
3180
3181 Pseudo-XML_ fragment from simple parsing::
3182
3183 <raw format="html" xml:space="preserve">
3184 <hr width=50 size=10>
3185
3186 .. [#] For raw data pass-through in inline context, use `custom
3187 interpreted text roles`_ derived from the `"raw" role`_.
3188
3189
3190 <reference>
3191 ===========
3192
3193 The <reference> element represents a cross reference
3194 to another element of the document or to an external ressource.
3195
3196 :Category: `Simple Body Elements`_, `Inline Elements`_
3197 :Analogues: The <reference> element is analogous to the DocBook_ <link>
3198 element and the HTML_ <a> (anchor) element.
3199 :Processing: If possible, make the content of the link element an active link.
3200 In print media, the target might be ignored, printed after the
3201 text of the <reference>, printed as a footnote [#]_, or rendered
3202 in some other way.
3203 :Parents: all elements employing `%body.elements`_, `%text.model`_,
3204 or `%structure.model`_ in their content models
3205 :Children: text data plus `inline elements`_ (`%text.model`_)
3206 :Attributes: anonymous_, name_ (deprecated), refid_, refname_, refuri_, and
3207 the `common attributes`_.
3208
3209 .. [#] See the `"target-notes" directive`_.
3210
3211 Examples
3212 --------
3213
3214 In reStructuredText `hyperlink references`_ are indicated by a trailing
3215 underscore::
3216
3217 References may use simple_ reference names,
3218 `phrase references`_, or `no reference name`__.
3219
3220 Matching targets must exist in the document, e.g., a
3221 _`simple` inline target or the explicit targets below.
3222
3223 .. _phrase references: doctree.rst
3224 __ http://example.org
3225
3226 Pseudo-XML_ fragment from simple parsing::
3227
3228 <paragraph>
3229 References may use
3230 <reference refname="simple">
3231 simple
3232 reference names,
3233 <reference refname="phrase references">
3234 phrase references
3235 , or
3236 <reference anonymous="1">
3237 no reference name
3238 .
3239 <paragraph>
3240 Matching targets must exist in the document, e.g., a
3241 <target ids="simple" names="simple">
3242 simple
3243 inline target or the explicit targets below.
3244 <target ids="phrase-refs" names="phrase\ refs" refuri="doctree.rst">
3245 <target anonymous="1" ids="target-1" refuri="http://example.org">
3246
3247 Docutils uses transforms_ to match references and targets and
3248 replace the refname_ with a refid_ or refuri_::
3249
3250 <paragraph>
3251 References may use
3252 <reference refid="simple">
3253 simple
3254 reference names,
3255 <reference refuri="doctree.rst">
3256 phrase references
3257 , or
3258 <reference anonymous="1" refuri="http://example.org">
3259 no reference name
3260 .
3261 <paragraph>
3262 Matching targets must exist in the document, e.g., a
3263 <target ids="simple" names="simple">
3264 simple
3265 inline target or the explicit targets below.
3266 <target ids="phrase-refs" names="phrase\ refs" refuri="doctree.rst">
3267 <target anonymous="1" ids="target-1" refuri="http://example.org">
3268
3269 `Standalone hyperlinks`_ and `clickable images <rst/directives.html#target>`__
3270 generate <reference> elements, too::
3271
3272 Visit https://hamburg.de.
3273
3274 .. image:: michel.jpg
3275 :target: https://hamburg.de
3276
3277 Pseudo-XML_ fragment from simple parsing::
3278
3279 <paragraph>
3280 Visit
3281 <reference refuri="https://hamburg.de">
3282 https://hamburg.de
3283 .
3284 <reference refuri="https://hamburg.de">
3285 <image uri="michel.jpg">
3286
3287
3288 <revision>
3289 ==========
3290
3291 The <revision> element contains the revision number of the document.
3292 It can be used alone or in conjunction with `\<version>`_.
3293
3294 :Category: `Bibliographic Elements`_
3295 :Analogues: <revision> is similar to (but simpler than) the
3296 DocBook_ <revision> element. It closely matches the
3297 DocBook_ <revnumber> element, but in a simpler context.
3298 :Processing: Often used with the RCS/CVS keyword "Revision".
3299 See `\<docinfo>`_.
3300 :Parent: `\<docinfo>`_
3301 :Children: text data plus `inline elements`_ (`%text.model`_)
3302 :Attributes: only the `common attributes`_.
3303
3304 Examples
3305 --------
3306
3307 In reStructuredText, "revision" is one of the registered
3308 `bibliographic fields`_::
3309
3310 Document Title
3311 ==============
3312
3313 :Version: 1
3314 :Revision: b
3315
3316 Complete pseudo-XML_ result after parsing and applying transforms_::
3317
3318 <document ids="document-title" names="document title">
3319 <title>
3320 Document Title
3321 <docinfo>
3322 <version>
3323 1
3324 <revision>
3325 b
3326
3327 See `\<docinfo>`_ for a more complete example, including processing
3328 context.
3329
3330
3331 <row>
3332 =====
3333
3334 The <row> element represents one row of a `\<table>`_.
3335 It is defined in the `Exchange Table Model`_.
3336
3337 :Category: `Body Subelements`_ (compound)
3338 :Analogues: <row> is analogous to the HTML_ <tr> element
3339 and the DocBook_ <row> element.
3340 :Processing: Render content as a table row.
3341 See row__ in the `Exchange Table Model` for details.
3342 :Parents: `\<thead>`_, `\<tbody>`_
3343 :Children: one or more `\<entry>`_ elements
3344 :Attributes: The <row> element may contain the rowsep_ and valign_
3345 attributes (ignored by Docutils) and (via the
3346 `%tbl.row.att`_ parameter entity) the `common attributes`_.
3347
3348 __ https://www.oasis-open.org/specs/tm9901.html#AEN741
3349
3350 Examples
3351 --------
3352
3353 See `\<table>`_.
3354
3355
3356 <rubric>
3357 ========
3358
3359 A <rubric> is an informal heading outside the document's section structure.
3360
3361 :Category: `Simple Body Elements`_
3362 :Analogues: <rubric> has no direct analogues in common DTDs.
3363 It shares some features with the <bridgehead> DocBook_ element.
3364 :Processing: Rendered similar to a section heading, traditionally highlighted
3365 in red (hence the name). Rubrics are not (auto)numbered
3366 and not included in the document's table of contents.
3367 :Parents: all elements employing `%body.elements`_ or
3368 `%structure.model`_ in their content models
3369 :Children: text data plus `inline elements`_ (`%text.model`_)
3370 :Attributes: only the `common attributes`_.
3371
3372 Example
3373 -------
3374
3375 The reStructuredText `"rubric" directive`_ can be used to get a
3376 heading at places where a section is not allowed::
3377
3378 .. sidebar:: Sidebar Title
3379
3380 This is a sidebar. It is for text outside the flow
3381 of the main text.
3382
3383 .. rubric:: A heading inside a sidebar
3384
3385 Sections are not supported in a sidebar.
3386 A rubric can be used to structure the content instead.
3387
3388 Pseudo-XML_ fragment from simple parsing::
3389
3390 <sidebar>
3391 <title>
3392 Sidebar Title
3393 <paragraph>
3394 This is a sidebar. It is for text outside the flow
3395 of the main text.
3396 <rubric>
3397 A heading inside a sidebar
3398 <paragraph>
3399 Sections are not supported in a sidebar.
3400 A rubric can be used to structure the content instead.
3401
3402
3403 <section>
3404 =========
3405
3406 The <section> element is the main unit of hierarchy for Docutils documents.
3407
3408 .. class:: run-in
3409
3410 :Category: `Structural Elements`_
3411
3412 :Analogues: <section> is analogous to the <section> elements in HTML_ and
3413 DocBook_.
3414
3415 :Parents: `\<document>`_, `\<section>`_
3416
3417 :Children: <section> elements begin with a `\<title>`_,
3418 followed by an optional `\<subtitle>`_.
3419 They may contain `structural elements`_, `body elements`_,
3420 and `\<transition>`_ elements:
3421
3422 .. parsed-literal::
3423
3424 (title, subtitle?, `%structure.model`_;)
3425
3426 :Attributes: only the `common attributes`_
3427
3428 :Parameter Entities: `%section.elements`_ directly includes <section>,
3429 `%structure.model`_ indirectly includes <section>.
3430
3431 The Docutils document model uses a simple, recursive model for section
3432 structure. A `\<document>`_ element may contain <section> elements.
3433 Sections in turn may contain other <section> elements, without limit.
3434 The level (depth) of a section element is determined from its physical
3435 nesting level.
3436
3437 Paragraphs and other `body elements`_ may occur before a <section>,
3438 but not after it.
3439
3440
3441 Examples
3442 --------
3443
3444 reStructuredText does not impose a fixed number and order of section_
3445 title adornment styles. The order enforced will be the order as
3446 encountered. ::
3447
3448 Title 1
3449 =======
3450 Paragraph 1.
3451
3452 Title 2
3453 -------
3454 Paragraph 2.
3455
3456 Title 3
3457 =======
3458 Paragraph 3.
3459
3460 Title 4
3461 -------
3462 Paragraph 4.
3463
3464 Complete pseudo-XML_ result after parsing::
3465
3466 <document>
3467 <section ids="title-1" names="title 1">
3468 <title>
3469 Title 1
3470 <paragraph>
3471 Paragraph 1.
3472 <section ids="title-2" names="title 2">
3473 <title>
3474 Title 2
3475 <paragraph>
3476 Paragraph 2.
3477 <section ids="title-3" names="title 3">
3478 <title>
3479 Title 3
3480 <paragraph>
3481 Paragraph 3.
3482 <section ids="title-4" names="title 4">
3483 <title>
3484 Title 4
3485 <paragraph>
3486 Paragraph 4.
3487
3488
3489 <sidebar>
3490 =========
3491
3492 Sidebars are like miniature, parallel documents that occur inside other
3493 documents, providing related or reference material.
3494 Their content is outside of the flow of the document's main text.
3495
3496 .. class:: run-in
3497
3498 :Category: `Structural Elements`_
3499
3500 :Analogues: <sidebar> is analogous to the DocBook_ <sidebar> element and
3501 the HTML_ <aside> element.
3502
3503 :Processing: A <sidebar> element should be set off from the rest of the
3504 document somehow, typically with a border. Sidebars
3505 typically "float" to the side of the page and the document's
3506 main text flows around them.
3507
3508 :Parents: `\<document>`_, `\<section>`_.
3509
3510 :Children: <sidebar> elements begin with optional
3511 `\<title>`_ and `\<subtitle>`_ and contain
3512 `body elements`_ and `\<topic>`_ elements.
3513 There must not be a <subtitle> without title. ::
3514
3515 ((title, subtitle?)?,
3516 (%body.elements; | topic)+)
3517
3518 :Attributes: only the `common attributes`_
3519
3520 :Parameter Entities: `%structure.model`_ directly includes <sidebar>.
3521
3522 The <sidebar> element is a non-recursive `\<section>`_-like construct.
3523 <sidebar> elements cannot nest inside body elements, so you can't have a
3524 <sidebar> inside a `\<table>`_ or a list, or inside another <sidebar>
3525 or `\<topic>`_.
3526
3527
3528 Examples
3529 --------
3530
3531 A reStructuredText `"sidebar" directive`_::
3532
3533 .. sidebar:: Optional Title
3534 :subtitle: If Desired
3535
3536 Body.
3537
3538 Pseudo-XML_ fragment from simple parsing::
3539
3540 <sidebar>
3541 <title>
3542 Optional Title
3543 <subtitle>
3544 If Desired
3545 <paragraph>
3546 Body.
3547
3548
3549 <status>
3550 ========
3551
3552 The <status> element contains a status statement for the document,
3553 such as "Draft", "Final", "Work In Progress", etc.
3554
3555 :Category: `Bibliographic Elements`_
3556 :Analogues: <status> is analogous to the DocBook_ <status> element.
3557 :Processing: See `\<docinfo>`_.
3558 :Parent: `\<docinfo>`_
3559 :Children: text data plus `inline elements`_ (`%text.model`_)
3560 :Attributes: only the `common attributes`_.
3561
3562 Examples
3563 --------
3564
3565 In reStructuredText, "status" is one of the registered
3566 `bibliographic fields`_::
3567
3568 Document Title
3569 ==============
3570
3571 :Status: Work In Progress
3572
3573 Complete pseudo-XML_ result after parsing and applying transforms_::
3574
3575 <document ids="document-title" names="document title">
3576 <title>
3577 Document Title
3578 <docinfo>
3579 <status>
3580 Work In Progress
3581
3582 See `\<docinfo>`_ for a more complete example, including processing
3583 context.
3584
3585
3586 <strong>
3587 ========
3588
3589 The <strong> element is an inline element representing
3590 text that has **strong importance**, **seriousness**, or **urgency**.
3591
3592 :Category: `Inline Elements`_
3593 :Analogues: <strong> is analogous to the HTML_ <strong> element.
3594 :Processing: Typically displayed in boldface.
3595 :Parents: all elements employing `%text.model`_ in their content models
3596 :Children: text data plus `inline elements`_ (`%text.model`_)
3597 :Attributes: only the `common attributes`_.
3598
3599 Examples
3600 --------
3601
3602 The reStructuredText there are two alternatives to mark text with
3603 `strong emphasis`_::
3604
3605 There are :strong:`two` ways to **strongly emphasize** text.
3606
3607 Pseudo-XML_ fragment from simple parsing::
3608
3609 <paragraph>
3610 There are
3611 <strong>
3612 two
3613 ways to
3614 <strong>
3615 strongly emphasize
3616 text.
3617
3618
3619 <subscript>
3620 ===========
3621
3622 The <subscript> element is an inline element representing text which
3623 should be displayed as subscript.
3624
3625 :Category: `Inline Elements`_
3626 :Analogues: <subscript> is analogous to the HTML_ <sub> element
3627 and the DocBook_ <subscript> element.
3628 :Processing: Typically rendered with a lowered baseline using smaller text.
3629 :Parents: all elements employing `%text.model`_ in their content models
3630 :Children: text data plus `inline elements`_ (`%text.model`_)
3631 :Attributes: only the `common attributes`_.
3632
3633 Examples
3634 --------
3635
3636 The reStructuredText `"subscript" role`_ creates a <subscript> element::
3637
3638 The chemical formula for water is H\ :sub:`2`\ O.
3639
3640 Pseudo-XML_ fragment from simple parsing::
3641
3642 <paragraph>
3643 The chemical formula for water is H
3644 <subscript>
3645 2
3646 O.
3647
3648
3649 <substitution_definition>
3650 =========================
3651
3652 The <substitution_definition> element stores content that shall
3653 replace matching `\<substitution_reference>`_ elements.
3654
3655 :Category: `Simple Body Elements`_
3656 :Analogues: Substitution definitions are analog to XML’s
3657 `internal entities`_ or programming language macros.
3658 :Processing: A <substitution_definition> is not directly rendered.
3659 :Parents: all elements employing `%body.elements`_ or
3660 `%structure.model`_ in their content models
3661 :Children: text data plus `inline elements`_ (`%text.model`_)
3662 :Attributes: ltrim_, rtrim_, and the `common attributes`_.
3663 The names_ attribute uses the "substitution" namespace_.
3664
3665 Examples
3666 --------
3667
3668 A reStructuredText `substitution definition`_ allows to include
3669 complex inline structures within text while keeping the details
3670 out of the text flow::
3671
3672 The chemical formula for water is |H2O|.
3673
3674 .. |H2O| replace:: H\ :sub:`2`\ O
3675
3676
3677 Pseudo-XML_ fragment from simple parsing::
3678
3679 <paragraph>
3680 The chemical formula for water is
3681 <substitution_reference refname="H2O">
3682 H2O
3683 .
3684 <substitution_definition names="H2O">
3685 H
3686 <subscript>
3687 2
3688 O
3689
3690 The `references.Substitutions` transform_ replaces the
3691 `\<substitution_reference>`_ with the content of the
3692 <substitution_definition>::
3693
3694 <paragraph>
3695 The chemical formula for water is
3696 H
3697 <subscript>
3698 2
3699 O
3700 .
3701 <substitution_definition names="H2O">
3702 H
3703 <subscript>
3704 2
3705 O
3706
3707 A substitution definition can also supply an `\<image>`_ for inline use::
3708
3709 The |biohazard| symbol must be used on
3710 medical waste containers.
3711
3712 .. |biohazard| image:: biohazard.png
3713
3714 Pseudo-XML_ fragment from simple parsing::
3715
3716 <paragraph>
3717 The
3718 <substitution_reference refname="biohazard">
3719 biohazard
3720 symbol must be used on
3721 medical waste containers.
3722 <substitution_definition names="biohazard">
3723 <image alt="biohazard" uri="biohazard.png">
3724
3725 After running the `references.Substitutions` transform_, we get::
3726
3727 <paragraph>
3728 The
3729 <image alt="biohazard" uri="biohazard.png">
3730 symbol must be used on
3731 medical waste containers.
3732 <substitution_definition names="biohazard">
3733 <image alt="biohazard" uri="biohazard.png">
3734
3735 For more usage examples, see `Substitution Definitions`_ in the
3736 `reStructuredText Markup Specification`_.
3737
3738
3739 <substitution_reference>
3740 ========================
3741
3742 The <substitution_reference> element is a placeholder for the content of
3743 the matching <substitution_definition>.
3744
3745 :Category: `Inline Elements`_
3746 :Analogues: A <substitution_reference> is analogue to an XML
3747 `entity reference`_.
3748 :Processing: Replaced by the content of a matching
3749 `\<substitution_definition>`_.
3750 :Parents: all elements employing `%text.model`_ in their content models
3751 :Children: text data plus `inline elements`_ (`%text.model`_)
3752 :Attributes: the `common attributes`_ plus refname_.
3753 The refname_ attribute uses the "substitution" namespace_.
3754
3755 Examples
3756 --------
3757
3758 See `\<substitution_definition>`_.
3759
3760
3761 <subtitle>
3762 ==========
3763
3764 The <subtitle> element stores the subtitle of a `\<document>`_,
3765 `\<section>`_, or `\<sidebar>`_.
3766
3767 :Category: `Structural Subelements`_
3768 :Analogues: <subtitle> is analogous to the DocBook_ <subtitle> element.
3769 In HTML, subtitles are represented by a <p> element inside
3770 a <hgroup_> element.
3771 :Processing: A document's subtitle is usually rendered smaller
3772 than its `\<title>`_.
3773 :Parents: `\<document>`_, `\<section>`_, and `\<sidebar>`_
3774 :Children: text data plus `inline elements`_ (`%text.model`_)
3775 :Attributes: only the `common attributes`_.
3776
3777 Examples
3778 --------
3779
3780 In reStructuredText, a lone second-level section title immediately after
3781 the “document title” can become the document subtitle::
3782
3783 =======
3784 Title
3785 =======
3786 ----------
3787 Subtitle
3788 ----------
3789
3790 A paragraph.
3791
3792 Complete pseudo-XML_ result after parsing and applying the
3793 `DocTitle transform`_::
3794
3795 <document ids="title" names="title">
3796 <title>
3797 Title
3798 <subtitle ids="subtitle" names="subtitle">
3799 Subtitle
3800 <paragraph>
3801 A paragraph.
3802
3803 Note how two section levels have collapsed, promoting their titles to
3804 become the document's title and subtitle. Since there is only one
3805 structural element (document), the subsection's ``ids`` and ``names``
3806 attributes are stored in the <subtitle> element.
3807
3808 .. _hgroup: https://html.spec.whatwg.org/multipage/sections.html
3809 #the-hgroup-element
3810
3811
3812 <superscript>
3813 =============
3814
3815 The <superscript> element is an inline element representing text which
3816 should be displayed as superscript.
3817
3818 :Category: `Inline Elements`_
3819 :Analogues: <superscript> is analogous to the HTML_ <sup> element
3820 and the DocBook_ <superscript> element.
3821 :Processing: Typically rendered with a raised baseline using smaller text.
3822 :Parents: all elements employing `%text.model`_ in their content models
3823 :Children: text data plus `inline elements`_ (`%text.model`_)
3824 :Attributes: only the `common attributes`_.
3825
3826 Examples
3827 --------
3828
3829 The reStructuredText `"superscript" role`_ creates a <superscript> element::
3830
3831 Key events of the 20\ :sup:`th` century.
3832
3833 Pseudo-XML_ fragment from simple parsing::
3834
3835 <paragraph>
3836 Key events of the 20
3837 <superscript>
3838 th
3839 century.
3840
3841
3842 <system_message>
3843 ================
3844
3845 The <system_message> element is used for feedback from the processing
3846 system.
3847
3848 :Category: `Compound Body Elements`_
3849 :Analogues: <system_message> has no direct analogues in common DTDs.
3850 It can be emulated with primitives and type effects.
3851 :Processing: Rendered similar to an `\<admonition>`_, with the generated
3852 title "System Message", its type_/level_ and, if available,
3853 source_ and line_.
3854 :Parents: all elements employing `%body.elements`_ or
3855 `%structure.model`_ in their content models
3856 :Children: one or more `body elements`_
3857 :Attributes: backrefs_, level_, line_, type_, and the `common attributes`_.
3858
3859 In Docutils, system messages with a level lower than the
3860 `"report_level"`_ setting are removed by the `universal.FilterMessages`
3861 transform_.
3862
3863 Examples
3864 --------
3865
3866 An undefined or misspelled directive_ generates an error message::
3867
3868 .. contants::
3869
3870 Pseudo-XML_ fragment from simple parsing::
3871
3872 <system_message level="3" line="8" source="example.rst" type="ERROR">
3873 <paragraph>
3874 Unknown directive type "contants".
3875 <literal_block xml:space="preserve">
3876 .. contants::
3877
3878 See also `\<problematic>`_.
3879
3880
3881 <table>
3882 =======
3883
3884 The <table> element represents a data arrangement with rows and columns.
3885 It is defined in the `Exchange Table Model`_.
3886
3887 :Category: `Compound Body Elements`_
3888
3889 :Analogues: <table> is analogous to the <table> element in HTML_ and DocBook_.
3890
3891 :Processing: Content is arranged in rows and columns forming a grid.
3892 See table__ in the `Exchange Table Model` for details.
3893
3894 :Parents: `\<document>`_, `\<section>`_ and all `body elements`_
3895
3896 :Children: <table> elements begin with an optional `\<title>`_ (caption)
3897 and may contain one or more `\<tgroup>`_ elements::
3898
3899 (title?, tgroup+)
3900
3901 :Attributes: The <table> element may contain the frame_, colsep_,
3902 rowsep_, and pgwide_ attributes (ignored by Docutils)
3903 and (via the `%bodyatt`_ parameter entity)
3904 the `common attributes`_, align_, and width_.
3905
3906 __ https://www.oasis-open.org/specs/tm9901.html#AEN142
3907
3908 Examples
3909 --------
3910
3911 In reStructuredText, tables can be specified via the
3912 `"table" <"table" directive_>`__, `"csv-table"`_, or `"list-table"`_
3913 directives or directly as `grid table`_ or `simple table`_, e.g. ::
3914
3915 ======== ====
3916 bread £2
3917 butter £30
3918 ======== ====
3919
3920 Pseudo-XML_ fragment from simple parsing::
3921
3922 <table>
3923 <tgroup cols="2">
3924 <colspec colwidth="8">
3925 <colspec colwidth="4">
3926 <tbody>
3927 <row>
3928 <entry>
3929 <paragraph>
3930 bread
3931 <entry>
3932 <paragraph>
3933 £2
3934 <row>
3935 <entry>
3936 <paragraph>
3937 butter
3938 <entry>
3939 <paragraph>
3940 £30
3941
3942
3943 <target>
3944 ========
3945
3946 The <target> element provides an end-point for a hypertext `\<reference>`_.
3947
3948 :Category: Empty `Body Elements`_, `Inline Elements`_ [#inline-targets]_
3949 :Analogues: As body element, <target> is similar to the DocBook_ <anchor>
3950 element. An inline <target> can be represented by a DocBook
3951 <phrase> or HTML_ <span> element.
3952 :Processing: <target> elements with refid_, refname_, or refuri_ attribute
3953 (indirect targets) act as a relay for links to one of the
3954 target's ids_ or names_.
3955 A <target> without refid_, refname_, or refuri_ attributes
3956 provides ids_ or names_ for its content or, if empty, the
3957 next element.
3958 :Parents: all elements employing `%body.elements`_, `%structure.model`_,
3959 or `%text.model`_ in their content models
3960 :Children: only text data [#target-content]_
3961 :Attributes: anonymous_, refid_, refname_, refuri_, and
3962 the `common attributes`_.
3963
3964
3965 .. [#inline-targets] Inline <target> elements will be deprecated in
3966 Docutils 1.0 and invalid in Docutils 2.0. The "rst" parser will
3967 use `\<inline>`_ elements for inline targets.
3968
3969 .. [#target-content] <target> elements with content will be deprecated in
3970 Docutils 1.0 and invalid in Docutils 2.0.
3971
3972 Examples
3973 --------
3974
3975 In reStructuredText, `hyperlink targets`_ are indicated by a leading
3976 underscore::
3977
3978 .. _inline: `inline target`_
3979 .. _example: https//:example.org
3980 .. _alias:
3981 .. _explicit target:
3982
3983 The hyperlink target above points to this paragraph
3984 with an _`inline target`.
3985
3986 Pseudo-XML_ fragment from simple parsing::
3987
3988 <target ids="inline" names="inline" refname="inline target">
3989 <target ids="example" names="example" refuri="https//:example.org">
3990 <target ids="alias" names="alias">
3991 <target ids="explicit-target" names="explicit\ target">
3992 <paragraph>
3993 The hyperlink target above points to this paragraph
3994 with an
3995 <target ids="inline-target" names="inline\ target">
3996 inline target
3997 .
3998
3999 After applying transforms_, the paragraph has two reference names and
4000 two IDs, transferred from the preceding targets::
4001
4002 <target ids="inline" names="inline" refid="inline-target">
4003 <target ids="example" names="example" refuri="https//:example.org">
4004 <target refid="alias">
4005 <target refid="explicit-target">
4006 <paragraph ids="explicit-target alias" names="explicit\ target alias">
4007 The hyperlink target above points to this paragraph
4008 with an
4009 <target ids="inline-target" names="inline\ target">
4010 inline target
4011 .
4012
4013 For more examples, see `\<reference>`_.
4014
4015
4016 <tbody>
4017 =======
4018
4019 The <tbody> element identifies the rows that form the *body* of a
4020 `\<table>`_ (as distinct from the header rows).
4021 It is defined in the `Exchange Table Model`_.
4022
4023 :Category: `Body Subelements`_ (compound)
4024 :Analogues: <tbody> is analogous to the <tbody> element in HTML_ and DocBook_.
4025 :Processing: Render content as table body.
4026 :Parent: `\<tgroup>`_
4027 :Children: one or more `\<row>`_ elements
4028 :Attributes: valign_ (ignored by Docutils) and the `common attributes`_
4029 (via the `%tbl.tbody.att`_ parameter entity).
4030
4031 Examples
4032 --------
4033
4034 See `\<table>`_.
4035
4036
4037 <term>
4038 ======
4039
4040 The <term> element contains a word or phrase being defined in a
4041 `\<definition_list>`_.
4042
4043 :Category: `Body Subelements`_ (simple)
4044 :Analogues: <term> is analogous to the HTML_ <dt> element
4045 and to the DocBook_ <term> element.
4046 :Processing: see `\<definition_list_item>`_
4047 :Parent: `\<definition_list_item>`_
4048 :Children: text data plus `inline elements`_ (`%text.model`_)
4049 :Attributes: only the `common attributes`_.
4050
4051 Examples
4052 --------
4053 See the examples for the `\<definition_list>`_,
4054 `\<definition_list_item>`_, and `\<classifier>`_ elements.
4055
4056
4057 <tgroup>
4058 ========
4059
4060 The <tgroup> element identifies a logically complete portion of a `\<table>`_.
4061 It is defined in the `Exchange Table Model`_.
4062
4063 :Category: `Body Subelements`_ (compound)
4064 :Analogues: <tgroup> is analogous to the DocBook_ <tgroup> element.
4065 There is no corresponding HTML element (the <colgroup>
4066 element has a different purpose and semantics).
4067 :Processing: See tgroup__ in the `Exchange Table Model`.
4068 :Parent: `\<table>`_
4069 :Children: One or more `\<colspec>`_ elements, followed by an optional
4070 `\<thead>`_ and a `\<tbody>`_ (cf. the `%tbl.tgroup.mdl`_
4071 parameter entity).
4072 The number of <colspec>s, must not exceed
4073 the value of the cols_ attribute. Docutils expects one
4074 <colspec> per column.
4075 :Attributes: The <tgroup> element must contain a cols_ attribute and may
4076 contain colsep_, rowsep_, and align_ (ignored by Docutils).
4077 Via the `%tbl.tgroup.att`_ parameter entity, <tgroup>
4078 supports the `common attributes`_.
4079
4080 __ https://www.oasis-open.org/specs/tm9901.html#AEN282
4081
4082 Tables usually consist of a single <tgroup>.
4083 Complex tables with widely varying column specifications may be
4084 easier to code using multiple <tgroup>s. However, this is
4085 not supported by `table markup in reStructuredText <rST tables_>`__
4086 and Docutils table handling routines.
4087
4088 Examples
4089 --------
4090
4091 See `\<table>`_.
4092
4093
4094 <thead>
4095 =======
4096
4097 The <thead> element identifies the row(s) that form the *head* of a
4098 `\<table>`_ (as distinct from the body rows).
4099 It is defined in the `Exchange Table Model`_.
4100
4101 :Category: `Body Subelements`_ (compound)
4102 :Analogues: <thead> is analogous to the <thead> element in HTML_ and DocBook_.
4103 :Processing: Header rows are always rendered at the beginning of the
4104 table and often presented in an alternate typographic style,
4105 such as boldface.
4106 In paged media, if a table spans across multiple pages,
4107 header rows are printed at the top of each new page.
4108 :Parent: `\<tgroup>`_
4109 :Children: one or more `\<row>`_ elements
4110 :Attributes: the valign_ attribute (ignored by Docutils) and
4111 (via the `%tbl.thead.att`_ parameter entity)
4112 the `common attributes`_.
4113
4114 Examples
4115 --------
4116
4117 See `\<table>`_.
4118
4119
4120 <tip>
4121 =====
4122
4123 The <tip> element is a specific *admonition*, a distinctive and
4124 self-contained notice.
4125
4126 :Category: `Compound Body Elements`_
4127 :Analogues: <tip> is analogous to the `DocBook \<tip>`_ element.
4128 :Processing: Rendered distinctly (inset and/or in a box, etc.),
4129 with the generated title "Tip" (or similar).
4130 :Parents: all elements employing `%body.elements`_ or
4131 `%structure.model`_ in their content models
4132 :Children: one or more `body elements`_
4133 :Attributes: only the `common attributes`_.
4134
4135 See also the generic `\<admonition>`_ and the other `specific admonition
4136 elements`_.
4137
4138 Examples
4139 --------
4140
4141 A reStructuredText `"tip" directive`_::
4142
4143 .. Tip:: 15% if the service is good.
4144
4145 Pseudo-XML_ fragment from simple parsing::
4146
4147 <tip>
4148 <paragraph>
4149 15% if the service is good.
4150
4151
4152 <title>
4153 =======
4154
4155 The <title> element stores the heading of a `\<document>`_, `structural
4156 elements`_, or a generic `\<admonition>`_. It is also used for the
4157 caption of a `\<table>`_.
4158
4159 :Category: `Structural Subelements`_, `Body Subelements`_ (simple)
4160
4161 :Analogues: <title> is analogous to the DocBook_ <title> element.
4162 In difference to the HTML_ section heading elements
4163 (<h1>, …, <h6>), the heading level is solely determined
4164 by the nesting level of the parent `\<section>`_.
4165 As child of a `\<table>`_, <title> corresponds to the
4166 HTML_ <caption> element.
4167
4168 .. Note:: The `HTML <title> element`_ corresponds to the
4169 document's `title attribute`_ (metadata title).
4170
4171 :Parents: `\<admonition>`_, `\<document>`_, `\<section>`_,
4172 `\<sidebar>`_, `\<table>`_, and `\<topic>`_
4173
4174 :Children: text data plus `inline elements`_ (`%text.model`_)
4175
4176 :Attributes: refid_ (used as a backlink to a table of contents entry),
4177 auto_ (for auto-numbered section titles),
4178 and the `common attributes`_.
4179
4180 The displayed <title> of a `\<document>`_ may differ from its
4181 *metadata title* that is stored in the `title attribute`_.
4182
4183 Examples
4184 --------
4185
4186 Section_ titles are marked up with "underlines" below the title text (or
4187 underlines and matching overlines)::
4188
4189 A Title
4190 =======
4191
4192 A paragraph.
4193
4194 Next section's title
4195 ====================
4196
4197 Pseudo-XML_ fragment from simple parsing::
4198
4199 <section ids="a-title" names="a\ title">
4200 <title>
4201 A Title
4202 <paragraph>
4203 A paragraph.
4204 <section ids="next-section-s-title" names="next\ section's\ title">
4205 <title>
4206 Next section’s title
4207
4208 See also the examples for `\<admonition>`_, `\<document>`_,
4209 `\<section>`_, `\<sidebar>`_, `\<subtitle>`_, `\<table>`_,
4210 and `\<topic>`_.
4211
4212
4213 <title_reference>
4214 =================
4215
4216 The <title_reference> element is an inline element representing
4217 the titles of a cited creative work.
4218
4219 :Category: `Inline Elements`_
4220 :Analogues: <title_reference> is analogous to the HTML_ <cite> element
4221 and the DocBook_ <citetitle> element.
4222 :Processing: Typically displayed in italic type.
4223 :Parents: all elements employing `%text.model`_ in their content models
4224 :Children: text data plus `inline elements`_ (`%text.model`_)
4225 :Attributes: only the `common attributes`_.
4226
4227 Examples
4228 --------
4229
4230 The reStructuredText `"title-reference" role`_ creates a <title_reference>
4231 element::
4232
4233 The term "spam" is derived from the 1970 :title:`Spam` sketch.
4234
4235
4236 Pseudo-XML_ fragment from simple parsing::
4237
4238 <paragraph>
4239 The term “spam” is derived from the 1970
4240 <title_reference>
4241 Spam
4242 sketch.
4243
4244
4245 <topic>
4246 =======
4247
4248 The <topic> element represents a non-recursive section-like construct for
4249 content that is separate from the flow of the document.
4250
4251 .. class:: run-in
4252
4253 :Category: `Structural Elements`_
4254
4255 :Analogues: <topic> is analogous to the HTML_ <aside> element.
4256 The DocBook_ <simplesect> element is similar, but you cannot
4257 place `body elements`_ after a <simplesect>.
4258
4259 :Processing: A <topic> element should be set off from the rest of the
4260 document somehow, such as with indentation or a border.
4261 In contrast to a `\<sidebar>`_, it should not float.
4262
4263 :Parents: `\<document>`_, `\<section>`_, and `\<sidebar>`_
4264
4265 :Children: <topic> elements may begin with a `\<title>`_ and contain
4266 `body elements`_::
4267
4268 (title?, (%body.elements;)+)
4269
4270 :Attributes: only the `common attributes`_
4271
4272 :Parameter Entities: `%structure.model`_ directly includes <topic>.
4273
4274 Topics are terminal, "leaf" mini-sections, like block quotes with titles,
4275 or textual figures. A <topic> is just like a `\<section>`_, except that
4276 it has no subsections, it does not get listed in the ToC, and it doesn't
4277 have to conform to section placement rules.
4278 You may place a <topic> in the middle of a <section> and continue the same
4279 section after it --- something that cannot be done with a nested <section>.
4280
4281 Topics cannot nest inside topics, or `body elements`_
4282 (tables, lists, block quotes, etc).
4283
4284 .. Tip:: Use a `\<rubric>`_ element to get an informal heading inside a
4285 table, list, or inside another <topic>.
4286
4287 Docutils uses the <topic> element also for a generated `table of contents`_,
4288 and the "abstract" and "dedication" `bibliographic fields`_.
4289
4290 Examples
4291 --------
4292
4293 A reStructuredText `"topic" directive`_::
4294
4295 .. topic:: Title
4296
4297 Body.
4298
4299 Pseudo-XML_ fragment from simple parsing::
4300
4301 <topic>
4302 <title>
4303 Title
4304 <paragraph>
4305 Body.
4306
4307
4308 <transition>
4309 ============
4310
4311 The <transition> element separates body elements and sections, dividing a
4312 `\<section>`_ into untitled divisions.
4313
4314 .. class:: run-in
4315
4316 :Category: `Structural Subelements`_
4317 :Analogues: <transition> is analogous to the HTML_ <hr> element.
4318 :Processing: The <transition> element is typically rendered as vertical
4319 whitespace (more than that separating paragraphs), with or
4320 without a horizontal line or row of asterisks. In novels,
4321 transitions are often represented as a row of three well-spaced
4322 asterisks or a vignette with vertical space above and below.
4323 :Parents: `\<document>`_, `\<section>`_ (cf. `%structure.model`_)
4324 :Children: none (empty)
4325 :Attributes: only the `common attributes`_
4326 :Parameter Entities: The `%structure.model`_ directly includes <transition>.
4327
4328 The document model sets additional restrictions
4329 on the placement of <transitions>: [#extra-rule]_
4330
4331 * A transition may not be immediately adjacent to another transition,
4332 i.e., <transition> elements must be separated by other elements.
4333
4334 * A transition may not start the text of a document or section, i.e., a
4335 <transition> is invalid as first child or preceded by only `\<title>`_,
4336 `\<subtitle>`_, or invisible elements [#invisible-or-moving]_.
4337
4338 * A transition may not occur at the end of a document or section. [#]_
4339 In other words, a <transition> is invalid as last child element
4340 or followed by only invisible elements [#invisible-or-moving]_.
4341
4342 See also `Doctree Representation of Transitions`__ in
4343 `A Record of reStructuredText Syntax Alternatives`__.
4344
4345 .. [#invisible-or-moving] The elements `\<meta>`_, `\<pending>`_,
4346 `\<substitution_definition>`_, and `\<target>`_ are not visible
4347 in the output document. The `\<decoration>`_ element contains
4348 `\<header>`_ and `\<footer>`_ which move to the respective places.
4349
4350 .. [#] In reStructuredText markup, a transition may appear to fall
4351 at the end of a section immediately before another section.
4352 The `misc.Transitions` transform_ recognizes this case and
4353 moves the transition so it separates the sections.
4354
4355 __ ../dev/rst/alternatives.html#doctree-representation-of-transitions
4356 __ ../dev/rst/alternatives.html
4357
4358
4359 Examples
4360 --------
4361
4362 A transition_ in the reStructuredText source::
4363
4364 Paragraph 1.
4365
4366 --------
4367
4368 Paragraph 2.
4369
4370 Complete pseudo-XML_ result after parsing::
4371
4372 <document>
4373 <paragraph>
4374 Paragraph 1.
4375 <transition>
4376 <paragraph>
4377 Paragraph 2.
4378
4379
4380 <version>
4381 =========
4382
4383 The <version> element contains the version number of the document.
4384 It can be used alone or in conjunction with `\<revision>`_.
4385
4386 :Category: `Bibliographic Elements`_
4387 :Analogues: <version> may be considered analogous to the <revision>,
4388 <revnumber>, or <biblioid> DocBook_ elements.
4389 :Processing: Sometimes used with the RCS/CVS keyword "Revision".
4390 See `\<docinfo>`_ and `\<revision>`_.
4391 :Parent: `\<docinfo>`_
4392 :Children: text data plus `inline elements`_ (`%text.model`_)
4393 :Attributes: only the `common attributes`_.
4394
4395 Examples
4396 --------
4397
4398 In reStructuredText, "version" is one of the registered
4399 `bibliographic fields`_::
4400
4401 Document Title
4402 ==============
4403
4404 :Version: 1.1
4405
4406 Complete pseudo-XML_ result after parsing and applying transforms_::
4407
4408 <document ids="document-title" names="document title">
4409 <title>
4410 Document Title
4411 <docinfo>
4412 <version>
4413 1.1
4414
4415 See `\<docinfo>`_ for a more complete example, including processing
4416 context.
4417
4418
4419 <warning>
4420 =========
4421
4422 The <warning> element is a specific *admonition*, a distinctive and
4423 self-contained notice.
4424
4425 :Category: `Compound Body Elements`_
4426 :Analogues: <warning> is analogous to the `DocBook \<warning>`_ element.
4427 :Processing: Rendered distinctly (inset and/or in a box, etc.),
4428 with the generated title "Warning" (or similar).
4429 :Parents: all elements employing `%body.elements`_ or
4430 `%structure.model`_ in their content models
4431 :Children: one or more `body elements`_
4432 :Attributes: only the `common attributes`_.
4433
4434 See also the generic `\<admonition>`_ and the other
4435 `specific admonition elements`_.
4436
4437 Examples
4438 --------
4439
4440 A reStructuredText `"warning" directive`_::
4441
4442 .. WARNING:: Reader discretion is strongly advised.
4443
4444 Pseudo-XML_ fragment from simple parsing::
4445
4446 <warning>
4447 <paragraph>
4448 Reader discretion is strongly advised.
4449
4450
4451 ---------------
4452 Attribute Types
4453 ---------------
4454
4455 .. contents:: :local:
4456
4457 Standard Attribute Types
4458 ========================
4459
4460 *Standard attribute types* are defined in the
4461 `attribute types <XML attribute types_>`__ section
4462 of the `XML 1.0 specification` [xml1.0]_.
4463
4464 _`CDATA`
4465 Character data. CDATA attributes may contain arbitrary text.
4466
4467 _`NMTOKEN`
4468 A "name token". One or more of letters, digits, ".", "-", and
4469 "_".
4470
4471 _`NMTOKENS`
4472 One or more space-separated NMTOKEN_ values.
4473
4474 _`EnumeratedType`
4475 The attribute value may be one of a specified list of values.
4476
4477
4478 Custom Attribute Types
4479 ======================
4480
4481 To highlight specific attribute value constraints, the `Docutils Generic
4482 DTD`_ defines *custom attribute types* via `parameter entities`_ that
4483 resolve to standard attribute types.
4484 In the docutils.nodes_ Python module, values are stored
4485 using the specified data types.
4486
4487 _`%classnames.type`
4488 | Space-separated list of `class names`_. Resolves to NMTOKEN_.
4489 | Used in the `classes`_ attribute. Python data type: ``list[str]``.
4490
4491 _`%idref.type`
4492 | A reference to another element by one of its identifiers_.
4493 Resolves to NMTOKEN_. [#id-vc]_
4494 | Used in the `refid`_ attribute. Python data type: ``str``.
4495
4496 .. _identifier: identifiers_
4497
4498 _`%idrefs.type`
4499 | Space separated list of references to other elements by their identifiers_.
4500 Resolves to NMTOKENS_. [#id-vc]_
4501 | Used in the `backrefs`_ attribute. Python data type: ``list[str]``.
4502
4503 _`%ids.type`
4504 | A space-separated list of unique `identifiers`_.
4505 Resolves to NMTOKENS_. [#id-vc]_
4506 | Used in the `ids`_ attribute. Python data type: ``list[str]``.
4507
4508 _`%measure`
4509 | A number which may be immediately followed by a unit or percent sign.
4510 ReStructuredText supports `CSS3 length units`_.
4511 Attributes may restrict the value to some range.
4512 Handling of values without unit depends on the writer/output format
4513 (see the writer-specific documentation in the `user documentation`__
4514 for details). Resolves to CDATA_.
4515 | Used in the `height`_ and `width`_ attributes. Python data type: ``str``.
4516
4517 __ ../index.html#writer-specific
4518
4519 _`%number`
4520 | The attribute value must be a positive interger. Resolves to NMTOKEN_.
4521 | Used in the level_, morecols_, morerows_, scale_, and start_ attributes.
4522 Python data type: ``int``.
4523
4524 _`%refname.type`
4525 | A `reference name`_. Resolves to CDATA_.
4526 | Used in the `refname`_ attribute. Python data type: ``str``.
4527
4528 _`%refnames.type`
4529 | Space-separated list of `reference names`_.
4530 (Backslash escaping is used for space characters inside
4531 a `reference name`.) Resolves to CDATA_.
4532 | Used in the `names`_ and `dupnames`_ attributes.
4533 Python data type: ``list[str]``.
4534
4535
4536 _`%yesorno`
4537 | Boolean: False if zero ("0"), true for any other value.
4538 Resolves to NMTOKEN_.
4539 | Used in the anonymous_, colsep_, ltrim_, rtrim_, rowsep_,
4540 and `stub`_ attributes.
4541 Python data type: ``bool``.
4542
4543
4544 .. _common attribute:
4545
4546 Common Attributes
4547 =================
4548
4549 Through the `%basic.atts`_ parameter entity, all elements except `\<meta>`_
4550 support the attributes classes_, dupnames_, ids_, names_, and source_.
4551
4552
4553 ---------------------
4554 Attribute Reference
4555 ---------------------
4556
4557 .. contents:: :local:
4558 :depth: 1
4559
4560 ``alt``
4561 =======
4562
4563 Attribute type: `CDATA`_. Default value: none.
4564
4565 The ``alt`` attribute is used to store a text description in the
4566 `\<image>`_ element.
4567
4568
4569 ``align``
4570 =========
4571
4572 Attribute type: EnumeratedType_. Default value: none (inherit).
4573
4574 The ``align`` attribute is used in the `\<figure>`_ and `\<table>`_
4575 elements via the `%align-h.att`_ parameter entity
4576 and in `\<image>`_ via the `%align-hv.att`_ parameter entity
4577 to specify the alignment of the element within its parent element.
4578
4579 The `Exchange Table Model`_ uses ``align`` in the `\<colspec>`_,
4580 `\<entry>`_, and `\<tgroup>`_ elements to specify the text alignment
4581 in table cells. It cannot be specified in reStructuredText and is
4582 ignored by Docutils.
4583
4584
4585 ``anonymous``
4586 =============
4587
4588 Attribute type: `%yesorno`_. Default value: none (implies no).
4589
4590 The ``anonymous`` attribute is used for unnamed hyperlinks in the
4591 `\<target>`_ and `\<reference>`_ elements (via the `%anonymous.att`_
4592 parameter entity).
4593
4594
4595 ``auto``
4596 ========
4597
4598 Attribute type: `CDATA`_. Default value: none.
4599
4600 The ``auto`` attribute is used to indicate automatically-numbered
4601 `\<footnote>`_, `\<footnote_reference>`_ and `\<title>`_ elements
4602 (via the `%auto.att`_ parameter entity).
4603 In `\<footnote>`_ and `\<footnote_reference>`_ elements, it also carries
4604 information about the label type ("1": auto-numbered_, "*": auto-symbol_).
4605
4606
4607 ``backrefs``
4608 ============
4609
4610 Attribute type: `%idrefs.type`_. Default value: none.
4611
4612 The ``backrefs`` attribute contains a space-separated list of identifier_
4613 references, used for backlinks in `\<footnote>`_, `\<citation>`_, and
4614 `\<system_message>`_ elements (via the `%backrefs.att`_ parameter entity).
4615
4616
4617 ``bullet``
4618 ==========
4619
4620 Attribute type: `CDATA`_. Default value: none.
4621
4622 The ``bullet`` attribute is used in the `\<bullet_list>`_ element to
4623 record the style of bullet from the input data. In documents processed
4624 from reStructuredText_, it contains one of "-", "+", or "*".
4625 It may be ignored in processing.
4626
4627
4628 ``classes``
4629 ===========
4630
4631 Attribute type: `%classnames.type`_. Default value: none.
4632
4633 The ``classes`` attribute is a space separated list containing zero or
4634 more `class names`_. It is one of the `common attributes`_, shared by
4635 all Docutils elements.
4636
4637 The purpose of the attribute is to indicate an "is-a" variant relationship,
4638 to allow an extensible way of defining sub-classes of existing elements.
4639 It can be used to carry context forward between a Docutils Reader_ and
4640 Writer_, when a custom structure is reduced to a standardized document
4641 tree. One common use is in conjunction with stylesheets, to add
4642 selection criteria. It should not be used to carry formatting
4643 instructions or arbitrary content.
4644
4645 The ``classes`` attribute's contents should be ignorable. Writers_ that
4646 are not familiar with the variant expressed should be able to ignore
4647 the attribute.
4648
4649
4650 ``char``
4651 ========
4652
4653 Attribute type: CDATA_. Default value: "" (no aligning character).
4654
4655 The ``char`` attribute is used in the `\<colspec>`_ and `\<entry>`_
4656 elements to specify an alignment character.
4657
4658 The attribute is defined in the `Exchange Table Model`_.
4659 It cannot be specified in reStructuredText and is ignored by Docutils.
4660
4661
4662 ``charoff``
4663 ===========
4664
4665 Attribute type: NMTOKEN_. Default value: "50" (i.e. 50%).
4666
4667 The ``charoff`` attribute is used in `\<colspec>`_ and `\<entry>`_
4668 elements to specify the horizontal offset of the alignment character
4669 when align_ is "char".
4670
4671 The attribute is defined in the `Exchange Table Model`_.
4672 It cannot be specified in reStructuredText and is ignored by Docutils.
4673
4674
4675 ``colname``
4676 ===========
4677
4678 Attribute type: NMTOKEN_. Default value: none.
4679
4680 The ``colname`` attribute is used in the `\<colspec>`_ element to name a
4681 table column and in the `\<entry>`_ element to reference a named column.
4682
4683 The attribute is defined in the `Exchange Table Model`_.
4684 It cannot be specified in reStructuredText and is ignored by Docutils.
4685
4686
4687 ``colnum``
4688 ===========
4689
4690 Attribute type: NMTOKEN_. Default value: none.
4691
4692 The ``colnum`` attribute is defined for the `\<colspec>`_ element
4693 by the `Exchange Table Model`_.
4694 It serves no functional purpose other than a consistency check.
4695
4696
4697 ``cols``
4698 =========
4699
4700 Attribute type: NMTOKEN_. Default value: none.
4701
4702 The ``cols`` attribute is used in the `\<tgroup>`_ element to
4703 store the number of columns in a table group.
4704
4705 The attribute is defined in the `Exchange Table Model`_
4706 (which `see for details`__).
4707
4708 __ http://www.oasis-open.org/html/tm9901.html#AEN350
4709
4710
4711 ``colsep``
4712 ==========
4713
4714 Attribute type: `%yesorno`_. Default value: none.
4715
4716 The ``colsep`` attribute is used in the `\<colspec>`_, `\<entry>`_,
4717 `\<table>`_, and `\<tgroup>`_ elements to specify the presence or absence
4718 of a column separator (vertical ruling).
4719
4720 The attribute is defined in the `Exchange Table Model`_
4721 It cannot be specified in reStructuredText and is ignored by Docutils.
4722
4723
4724 ``colwidth``
4725 ============
4726
4727 Attribute type: CDATA_. Default value: "1*"
4728
4729 The ``colwidth`` attribute is used in the `\<colspec>`_ element
4730 to specify the column width.
4731
4732 The attribute is defined in the `Exchange Table Model`_
4733 (which `see for details`__) as either a *proportional measure*
4734 (positive number followed by "*", e.g., "5*" for 5 times the
4735 `unit proportion`_ , or just "*" for one unit proportion)
4736 or a *fixed measure* (e.g., 2.5cm).
4737 Docutils supports only proportional measures.
4738
4739 .. important::
4740 Currently, Docutils stores "colwidth" values as numbers and
4741 interprets unitless values as proportional measures while the
4742 `Exchange Table Model` uses the default unit "pt".
4743 This will change__ in future versions of Docutils.
4744
4745 __ https://www.oasis-open.org/specs/tm9901.html#AEN530
4746 __ ../../RELEASE-NOTES.html#document-tree-docutils-dtd
4747
4748
4749 ``delimiter``
4750 =============
4751
4752 Attribute type: `CDATA`_. Default value: none.
4753
4754 The ``delimiter`` attribute is used in the `\<option_argument>`_ element
4755 and contains the text preceding the <option_argument>: either the text
4756 separating it from the `\<option_string>`_ (typically either "=" or " ")
4757 or the text between option arguments (typically either "," or " ").
4758
4759
4760 ``dupnames``
4761 ============
4762
4763 Attribute type: `%refnames.type`_. Default value: none.
4764
4765 ``dupnames`` is a `common attribute`_, shared by all Docutils elements.
4766 `Reference names`_ are moved from the `names`_ attribute to ``dupnames``
4767 in case of a naming conflict.
4768
4769
4770 ``enumtype``
4771 ============
4772
4773 Attribute type: EnumeratedType_, one of "arabic", "loweralpha",
4774 "upperalpha", "lowerroman", or "upperroman". Default value: none.
4775
4776 The ``enumtype`` attribute is used in the `\<enumerated_list>`_ element
4777 to record the intended enumeration sequence.
4778
4779 Supported values:
4780 .. class:: field-indent-8em
4781
4782 :arabic: 1, 2, 3, ...
4783 :loweralpha: a, b, c, ..., z
4784 :upperalpha: A, B, C, ..., Z
4785 :lowerroman: i, ii, iii, iv, ..., mmmmcmxcix [4999]
4786 :upperroman: I, II, III, IV, ..., MMMMCMXCIX [4999]
4787
4788
4789 ``format``
4790 ==========
4791
4792 Attribute type: NMTOKENS_. Default value: none.
4793
4794 The ``format`` attribute is used in the `\<raw>`_ element.
4795 It contains one or more space separated output format names.
4796
4797
4798 ``frame``
4799 =========
4800
4801 | Attribute type: EnumeratedType_ (top|bottom|topbot|all|sides|none).
4802 | Default value: none (implied).
4803
4804 The ``frame`` attribute may be used in the `\<table>`_ element to
4805 specify the table's outer frame.
4806
4807 The attribute is defined in the `Exchange Table Model`_.
4808 It cannot be specified in reStructuredText and is ignored by Docutils.
4809
4810
4811 ``height``
4812 ==========
4813
4814 Attribute type: `%measure`_. Default value: none.
4815
4816 The ``height`` attribute is used in the `\<image>`_ element.
4817
4818
4819 ``ids``
4820 =======
4821
4822 Attribute type: `%ids.type`_. Default value: none.
4823
4824 ``ids`` is one of *two* attributes for element identification (the
4825 other is names_). It is a space separated list containing one or
4826 more unique `identifiers`_, typically assigned by the system.
4827 ``ids`` is a `common attribute`_, shared by all Docutils elements.
4828
4829 An XPath_ expression to select the element with identifier `test` is ::
4830
4831 //*[contains(concat(' ', @ids, ' '), ' test ')]
4832
4833 (similar to `selecting an element by CSS class`__).
4834
4835 .. TODO:
4836 * Use 'id' for primary identifier key?
4837 * Keep additional keys in `ids`
4838 or in the preceding target elements?
4839
4840 __ https://stackoverflow.com/questions/1604471/how-can-i-find-an-element-by-css-class-with-xpath
4841
4842
4843 ``level``
4844 =========
4845
4846 Attribute type: `%number`_. Default value: none.
4847
4848 The ``level`` attribute is used in the `\<system_message>`_ element to
4849 indicate the message's `severity level`_. See also the "type_" attribute.
4850
4851
4852 ``line``
4853 =========
4854
4855 Attribute type: `%number`_. Default value: none.
4856
4857 The ``line`` attribute is used in the `\<system_message>`_ element to
4858 indicate the position of the reported problem in the document source.
4859 See also the source_ attribute.
4860
4861
4862 ``ltrim``
4863 =========
4864
4865 Attribute type: `%yesorno`_. Default value: none (implies no).
4866
4867 The ``ltrim`` attribute is used in the `\<substitution_definition>`_ element.
4868
4869
4870 ``loading``
4871 ===========
4872
4873 Attribute type: EnumeratedType_, one of "embed", "link", or "lazy".
4874 Default value: none.
4875
4876 The ``loading`` attribute is used in the `\<image>`_ and `\<figure>`_
4877 elements to indicate the preferred handling by the Docutils writer_. [#]_
4878 The default depends on the writer and the `"image_loading"`_
4879 configuration setting.
4880
4881 New in Docutils 0.21
4882
4883 .. [#] Currently only recognized by the HTML5 writer.
4884 The ODF/ODT writer always embeds images in the
4885 output document, XML and LaTeX writers link to the image.
4886 The behaviour may change for the ODT and XML writers
4887 (images cannot be embedded in a LaTeX source).
4888
4889
4890 ``morecols``
4891 ============
4892
4893 Attribute type: `%number`_. Default value: none.
4894
4895 The ``morecols`` attribute is used in the `\<entry>`_ element
4896 to specify an entry that spans several physical table columns.
4897 It is similar to the ``colspan`` attribute of HTML table cells
4898 (<th> and <td>).
4899
4900 The ``morecols`` attribute is defined in the `%tbl.entry.att`_
4901 parameter entity.
4902
4903
4904 ``morerows``
4905 ============
4906
4907 Attribute type: `%number`_. Default value: none.
4908
4909 The ``morerows`` attribute is used in the `\<entry>`_ element
4910 to specify an entry that spans several physical table rows.
4911 It is similar to the ``rowspan`` attribute of HTML table cells
4912 (<th> and <td>).
4913
4914 The attribute is defined in the `Exchange Table Model`_
4915 (which `see for details`__).
4916
4917 __ http://www.oasis-open.org/html/tm9901.html#AEN997
4918
4919
4920 ``name``
4921 =========
4922
4923 Attribute type: `NMTOKEN`_ or `CDATA`_.
4924 Default value: none.
4925
4926 The ``name`` attribute in the `\<meta>`_ element accepts `NMTOKEN`_ values.
4927 The output format may limit valid values to a set of keywords (EnumeratedType_).
4928
4929 The ``name`` attribute in the `\<reference>`_ element holds the
4930 `reference name`_ of the referenced element. Whitespace is normalized
4931 but case is preserved.
4932
4933 The attribute will no longer be used with <reference> elements in Docutils 1.0.
4934
4935
4936 ``names``
4937 =========
4938
4939 Attribute type: `%refnames.type`_. Default value: none.
4940
4941 ``names`` is one of *two* attributes for element identification (the
4942 other is ids_). It is a space-separated list containing `reference
4943 names`_ of an element (spaces inside a name are backslash-escaped).
4944 ``names`` is a `common attribute`_, shared by all Docutils elements.
4945
4946 .. _reference name removal:
4947
4948 Each reference name must be unique in its namespace_;
4949 if two or more elements want to use the same name, the affected name
4950 will be transferred to the `dupnames`_ attribute on the duplicate
4951 element(s) [#]_ and can no longer be used in hyperlinks. [#]_
4952
4953 .. [#] An element may have both ``names`` and ``dupnames`` attributes,
4954 if the ``dupnames`` are from conflicting `implicit hyperlink targets`_
4955 and the ``names`` from `explicit hyperlink targets`_ or a directive's
4956 `name option`_.
4957 .. [#] See `Implicit Hyperlink Targets`_ for details of conflict resolution.
4958
4959
4960 ``namest``
4961 ==========
4962
4963 Attribute type: NMTOKEN_. Default value: none.
4964
4965
4966 The ``namest`` attribute is used in the `\<entry>`_ element to specify the
4967 leftmost column of a span.
4968
4969 The attribute is defined in the `Exchange Table Model`_.
4970 It cannot be specified in reStructuredText and is ignored by Docutils
4971 which uses the morecols_ attribute instead.
4972
4973
4974 ``nameend``
4975 ===========
4976
4977 Attribute type: NMTOKEN_. Default value: none.
4978
4979 The ``nameend`` attribute is used in the `\<entry>`_ element to specify the
4980 rightmost column of a span.
4981
4982 The attribute is defined in the `Exchange Table Model`_.
4983 It cannot be specified in reStructuredText and is ignored by Docutils
4984 which uses the morecols_ attribute instead.
4985
4986
4987 ``pgwide``
4988 ==========
4989
4990 Attribute type: `%yesorno`_. Default value: none (implies no).
4991
4992 The ``pgwide`` attribute is used in the `\<table>`_ element to make the
4993 table span the full page width.
4994
4995 The attribute is defined in the `Exchange Table Model`_.
4996 It cannot be specified in reStructuredText and is ignored by Docutils.
4997
4998
4999 ``prefix``
5000 ==========
5001
5002 Attribute type: `CDATA`_. Default value: none.
5003
5004 The ``prefix`` attribute is used in the `\<enumerated_list>`_ element
5005 to store the formatting characters used before the enumerator.
5006
5007 In documents originating from reStructuredText_ data, it will contain
5008 either "" (empty string) or "(" (left parenthesis).
5009 Writers_ may ignore this attribute.
5010
5011
5012 ``refid``
5013 =========
5014
5015 Attribute type: `%idref.type`_. Default value: none.
5016
5017 The ``refid`` attribute contains a reference to another element via
5018 one of its `identifiers`_.
5019 It is used by the `\<citation_reference>`_, `\<footnote_reference>`_,
5020 `\<problematic>`_, `\<reference>`_, `\<target>`_, and `\<title>`_ elements
5021 (via the `%refid.att`_ and `%reference.atts`_ parameter entities).
5022
5023
5024 ``refname``
5025 ===========
5026
5027 Attribute type: `%refname.type`_. Default value: none.
5028
5029 The ``refname`` attribute contains a reference to one of the `names`_ of
5030 another element.
5031 It is used by the `\<citation_reference>`_, `\<footnote_reference>`_,
5032 `\<reference>`_, `\<substitution_reference>`_, and `\<target>`_ elements
5033 (via the `%refname.att`_ and `%reference.atts`_ parameter entities).
5034
5035
5036 On a `\<target>`_ element, ``refname`` indicates an `indirect target`_
5037 which may resolve to either an internal or external reference.
5038 Docutils transforms_ replace the ``refname`` attribute with
5039 a refid_ (refering to the same element) or a refuri_ (refering to an
5040 external ressource).
5041
5042
5043 ``refuri``
5044 ==========
5045
5046 Attribute type: `CDATA`_. Default value: none.
5047
5048 The ``refuri`` attribute contains an external reference to a URI.
5049 It is used by the `\<target>`_, `\<reference>`_,
5050 `\<footnote_reference>`_, and `\<citation_reference>`_ elements
5051 (via the `%reference.atts`_ parameter entity).
5052
5053
5054 ``rowsep``
5055 ==========
5056
5057 Attribute type: `%yesorno`_. Default value: none (implies no).
5058
5059 The ``rowsep`` attribute may be used in the `\<colspec>`_, `\<entry>`_,
5060 `\<row>`_, `\<table>`_, and `\<tgroup>`_ elements to specify the presence
5061 or absence of row separators (horizontal ruling).
5062
5063 The attribute is defined in the `Exchange Table Model`_.
5064 It cannot be specified in reStructuredText and is ignored by Docutils.
5065
5066
5067 ``rtrim``
5068 =========
5069
5070 Attribute type: `%yesorno`_. Default value: none (implies no).
5071
5072 The ``rtrim`` attribute is used in the `\<substitution_definition>`_ element.
5073
5074
5075 ``scale``
5076 ==========
5077
5078 Attribute type: `%number`_. Default value: none.
5079
5080 The ``scale`` attribute is used in the `\<image>`_ element to store
5081 a uniform scaling factor (integer percentage value).
5082
5083
5084 ``source``
5085 ==========
5086
5087 Attribute type: `CDATA`_. Default value: none.
5088
5089 The ``source`` attribute stores the path, URI, or a description
5090 of the source that was used to produce the document tree.
5091 It is one of the `common attributes`_ but typically only
5092 used with the `\<document>`_ and `\<system_message>`_ elements.
5093
5094 An element's ``source`` attribute may differ from the main document
5095 ``source`` if the document is assembled from several sources
5096 (e.g. via the `"include" directive`_).
5097
5098 .. note:: All ``docutils.nodes.Node`` instances also support
5099 *internal* ``source`` and ``line`` attributes
5100 for use in diagnostic output.
5101
5102
5103 ``start``
5104 =========
5105
5106 Attribute type: `%number`_. Default value: none (implies 1).
5107
5108 The ``start`` attribute is used in the `\<enumerated_list>`_ element to
5109 store the ordinal value of the first item in the list, in decimal notation.
5110
5111 For lists beginning at value 1 ("1", "a", "A", "i", or "I"),
5112 this attribute may be omitted.
5113
5114
5115 ``stub``
5116 =========
5117
5118 Attribute type: `%yesorno`_. Default value: none.
5119
5120 The ``stub`` attribute is used in the `\<colspec>`_ element to
5121 mark a table column as containing *stubs* (row titles, on the left).
5122 See also the `"csv-table"`_ and `"list-table"`_ directives.
5123
5124 The attribute is defined in the `%tbl.colspec.att`_ parameter entity.
5125
5126
5127 ``suffix``
5128 ==========
5129
5130 Attribute type: `CDATA`_. Default value: none.
5131
5132 The ``suffix`` attribute is used in the `\<enumerated_list>`_ element
5133 to store the formatting characters used after the enumerator.
5134
5135 In documents originating from reStructuredText_ data, it will contain
5136 either "." (period) or ")" (right parenthesis). Depending on the
5137 capabilities of the output format, this attribute may or may not affect
5138 processing.
5139
5140
5141 .. _title attribute:
5142
5143 ``title``
5144 =========
5145
5146 Attribute type: `CDATA`_. Default value: none.
5147
5148 The ``title`` attribute is used in the `\<document>`_ element to store the
5149 document's *metadata title*.
5150
5151 The attribute is set by the `"title" directive`_ or the
5152 `DocTitle transform`_. It is typically not part of the rendered document
5153 but, for example, used as `HTML <title> element`_ and shown in a
5154 browser's title bar, a user's history or bookmarks, or search results.
5155 Its value may may differ from the *displayed title* which is stored in a
5156 `\<title>`_ element.
5157
5158 .. _HTML <title> element:
5159 https://html.spec.whatwg.org/multipage/semantics.html#the-title-element
5160
5161
5162 ``type``
5163 =========
5164
5165 Attribute type: NMTOKEN_. Default value: none.
5166
5167 The ``type`` attribute is used in the `\<system_message>`_ element.
5168 It holds the name of the message's `severity level`_ (cf. the "level_"
5169 attribute).
5170
5171
5172 ``uri``
5173 =======
5174
5175 Attribute type: `CDATA`_. Default value: none.
5176
5177 The ``uri`` attribute is used in the `\<image>`_ and `\<figure>`_
5178 elements to refer to the image via a `URI Reference`_ [#]_. [rfc3986]_
5179
5180 Docutils applies the `"root_prefix"`_ configuration setting when a
5181 URI Reference starting with "/" is converted to a local filesystem path.
5182
5183 .. [#] Examples are a full URI, an *absolute-path reference* (begins with
5184 a single slash character) or a *relative-path reference* (does not
5185 begin with a slash character).
5186
5187 .. _URI reference: https://www.rfc-editor.org/rfc/rfc3986.html#section-4.1
5188
5189
5190 ``valign``
5191 ==========
5192
5193 | Attribute type: `EnumeratedType`_ (top|middle|bottom).
5194 | Default value: none (inherit).
5195
5196 The ``valign`` attribute is used in the `\<entry>`_, `\<row>`_,
5197 `\<tbody>`_, and `\<thead>`_ elements to specify the vertical text
5198 alignment within entries.
5199
5200 The attribute is defined in the `Exchange Table Model`_.
5201 It cannot be specified in reStructuredText and is ignored by Docutils.
5202
5203
5204 ``width``
5205 ==========
5206
5207 Attribute type: `%measure`_. Default value: none.
5208
5209 The ``width`` attribute is used in the `\<figure>`_, `\<image>`_,
5210 and `\<table>`_ elements.
5211
5212
5213 ``xml:space``
5214 =============
5215
5216 | Attribute type: `EnumeratedType`_, one of "default" or "preserve".
5217 | Default value: "preserve" (fixed).
5218
5219 The ``xml:space`` attribute is a standard XML attribute for
5220 whitespace-preserving elements. It is used by the `\<address>`_,
5221 `\<comment>`_, `\<doctest_block>`_, `\<literal_block>`_, `\<math_block>`_,
5222 and `\<raw>`_ elements (via the `%fixedspace.att`_ parameter entity).
5223 It is a fixed attribute, meant to communicate to an XML parser that the
5224 element contains significant whitespace. The attribute value should not
5225 be set in a document instance.
5226
5227
5228 .. _parameter entities:
5229
5230 ----------------------------
5231 Parameter Entity Reference
5232 ----------------------------
5233
5234 `Parameter entities <https://www.w3.org/TR/REC-xml/#dt-PE>`__ are used
5235 to simplify the `Docutils Generic DTD`_ (share definitions and reduce
5236 duplication) and to allow it to be customized by wrapper DTDs (external
5237 client DTDs that use or import the`Docutils Generic` DTD).
5238
5239 Parameter entities may be overridden by wrapper DTDs, replacing
5240 the definitions below with custom definitions.
5241
5242 .. contents:: :local:
5243
5244 In addition, the `Docutils Generic` DTD defines parameter entities for
5245 `custom attribute types`_.
5246
5247
5248 Attribute Entities
5249 ==================
5250
5251 ``%align-h.att``
5252 ----------------
5253
5254 The ``%align-h.att`` parameter entity contains the align_
5255 attribute for horizontal alignment.
5256
5257 Entity definition::
5258
5259 align (left | center | right) #IMPLIED
5260
5261 The `\<figure>`_ and `\<table>`_ elements directly employ the
5262 ``%align-h.att`` parameter entity in their attribute lists.
5263
5264
5265 ``%align-hv.att``
5266 -----------------
5267
5268 The ``%align-hv.att`` parameter entity contains the align_
5269 attribute for horizontal and vertical alignment.
5270
5271 Entity definition::
5272
5273 align (top | middle | bottom | left | center | right) #IMPLIED
5274
5275 The `\<image>`_ element directly employs the ``%align-hv.att``
5276 parameter entity in its attribute list.
5277
5278
5279 ``%anonymous.att``
5280 ------------------
5281
5282 The ``%anonymous.att`` parameter entity contains the anonymous_
5283 attribute, used for unnamed hyperlinks_.
5284
5285 Entity definition::
5286
5287 anonymous %yesorno; #IMPLIED
5288
5289 The `\<reference>`_ and `\<target>`_ elements directly employ the
5290 ``%anonymous.att`` parameter entity in their attribute lists.
5291
5292
5293 ``%auto.att``
5294 -------------
5295
5296 The ``%auto.att`` parameter entity contains the auto_ attribute, used
5297 to indicate an automatically-numbered footnote or title.
5298
5299 Entity definition::
5300
5301 auto CDATA #IMPLIED
5302
5303 The `\<footnote>`_, `\<footnote_reference>`_, and `\<title>`_ elements
5304 directly employ the ``%auto.att`` parameter entity in their attribute
5305 lists.
5306
5307
5308 ``%backrefs.att``
5309 -----------------
5310
5311 The ``%backrefs.att`` parameter entity contains the backrefs_
5312 attribute, a space-separated list of id references, for backlinks.
5313
5314 Entity definition::
5315
5316 backrefs %idrefs.type; #IMPLIED
5317
5318 The `\<citation>`_, `\<footnote>`_, and `\<system_message>`_ elements
5319 directly employ the ``%backrefs.att`` parameter entity in their
5320 attribute lists.
5321
5322
5323 ``%basic.atts``
5324 ---------------
5325
5326 The ``%basic.atts`` parameter entity lists the `common attributes`_.
5327 The `%additional.basic.atts`_ placeholder can be used by
5328 wrapper DTDs to extend ``%basic.atts``.
5329
5330 Entity definition:
5331
5332 .. parsed-literal::
5333
5334 ids_ NMTOKENS #IMPLIED
5335 names_ CDATA #IMPLIED
5336 dupnames_ CDATA #IMPLIED
5337 source_ CDATA #IMPLIED
5338 classes_ NMTOKENS #IMPLIED
5339 `%additional.basic.atts`_;
5340
5341 All elements except `\<meta>`_ directly employ the ``%basic.atts``
5342 parameter entity in their attribute lists.
5343
5344
5345 ``%bodyatt``
5346 ------------
5347
5348 The ``%bodyatt`` parameter entity is defined in the `Exchange Table Model`_
5349 to allow customization of the `\<table>`_ element's attribute list.
5350
5351 The `Docutils Generic DTD`_ redefines it to add align_, width_, and the
5352 `common attributes`_. (In Docutils versions ≥ 1.0, the `%tbl.table.att`_
5353 parameter entity will be redefined instead.)
5354
5355
5356 ``%fixedspace.att``
5357 -------------------
5358
5359 The ``%fixedspace.att`` parameter entity contains the `xml:space`_
5360 attribute, a standard XML attribute for whitespace-preserving
5361 elements.
5362
5363 Entity definition::
5364
5365 xml:space (default | preserve) #FIXED 'preserve'
5366
5367 The ``%fixedspace.att`` parameter entity is directly employed in the
5368 attribute lists of the following elements: `\<address>`_, `\<comment>`_,
5369 `\<doctest_block>`_, `\<literal_block>`_, `\<math_block>`_, `\<raw>`_.
5370
5371
5372 ``%reference.atts``
5373 -------------------
5374
5375 The ``%reference.atts`` parameter entity groups together the refuri_,
5376 refid_, and refname_ attributes.
5377 The `%additional.reference.atts`_ placeholder can be used by
5378 wrapper DTDs to extend ``%reference.atts``.
5379
5380 Entity definition:
5381
5382 .. parsed-literal::
5383
5384 `%refuri.att`_;
5385 `%refid.att`_;
5386 `%refname.att`_;
5387 `%additional.reference.atts`_;
5388
5389 The `\<citation_reference>`_, `\<footnote_reference>`_, `\<reference>`_,
5390 and `\<target>`_ elements directly employ the ``%reference.att``
5391 parameter entity in their attribute lists.
5392
5393
5394 ``%refid.att``
5395 --------------
5396
5397 The ``%refid.att`` parameter entity contains the refid_ attribute, an
5398 internal reference to the `ids`_ attribute of another element.
5399
5400 Entity definition::
5401
5402 refid %idref.type; #IMPLIED
5403
5404 The `\<title>`_ and `\<problematic>`_ elements directly employ the
5405 ``%refid.att`` parameter entity in their attribute lists.
5406
5407 Via `%reference.atts`_, the ``%refid.att`` parameter entity is
5408 indirectly employed in the attribute lists of the `\<citation_reference>`_,
5409 `\<footnote_reference>`_, `\<reference>`_, and `\<target>`_ elements.
5410
5411
5412 ``%refname.att``
5413 ----------------
5414
5415 The ``%refname.att`` parameter entity contains the refname_
5416 attribute, an internal reference to the `names`_ attribute of another
5417 element. On a `\<target>`_ element, ``refname`` indicates an indirect
5418 target which may resolve to either an internal or external
5419 reference.
5420
5421 Entity definition::
5422
5423 refname %refname.type; #IMPLIED
5424
5425 The `\<substitution_reference>`_ element directly employs the
5426 ``%refname.att`` parameter entity in its attribute list.
5427
5428 Via `%reference.atts`_, the ``%refname.att`` parameter entity is
5429 indirectly employed in the attribute lists of the `\<citation_reference>`_,
5430 `\<footnote_reference>`_, `\<reference>`_, and `\<target>`_ elements.
5431
5432
5433 ``%refuri.att``
5434 ---------------
5435
5436 The ``%refuri.att`` parameter entity contains the refuri_ attribute,
5437 an external reference to a URI.
5438
5439 Entity definition::
5440
5441 refuri CDATA #IMPLIED
5442
5443 Via `%reference.atts`_, the ``%refuri.att`` parameter entity is
5444 indirectly employed in the attribute lists of the `\<citation_reference>`_,
5445 `\<footnote_reference>`_, `\<reference>`_, and `\<target>`_ elements.
5446
5447
5448 ``%tbl.colspec.att``
5449 --------------------
5450
5451 The ``%tbl.colspec.att`` parameter entity is defined in the
5452 `Exchange Table Model`_ to allow customization of the `\<colspec>`_
5453 element's attribute list.
5454
5455 The `Docutils Generic DTD`_ redefines it to add stub_
5456 and the `common attributes`_.
5457
5458
5459 ``%tbl.entry.att``
5460 ------------------
5461
5462 The ``%tbl.entry.att`` parameter entity is defined in the
5463 `Exchange Table Model`_ to allow customization of the `\<entry>`_
5464 element's attribute list.
5465
5466 The `Docutils Generic DTD`_ redefines it to add morecols_
5467 and the `common attributes`_.
5468
5469
5470 ``%tbl.row.att``
5471 ----------------
5472
5473 The ``%tbl.row.att`` parameter entity is defined in the
5474 `Exchange Table Model`_ to allow customization of the `\<row>`_
5475 element's attribute list.
5476
5477 The `Docutils Generic DTD`_ redefines it to add the `common attributes`_.
5478
5479
5480 ``%tbl.table.att``
5481 ------------------
5482
5483 The ``%tbl.table.att`` parameter entity is defined in the `Exchange Table
5484 Model`_ to allow customization of the `\<table>`_ element's attribute
5485 list.
5486
5487 Docutils versions ≥ 1.0 will use ``%tbl.table.att`` (instead of the
5488 obsolete `%bodyatt`_) to add align_, width_, and the `common attributes`_.
5489
5490
5491 ``%tbl.tbody.att``
5492 ------------------
5493
5494 The ``%tbl.tbody.att`` parameter entity is defined in the
5495 `Exchange Table Model`_ to allow customization of the `\<tbody>`_
5496 element's attribute list.
5497
5498 The `Docutils Generic DTD`_ redefines it to add the `common attributes`_.
5499
5500
5501 ``%tbl.tgroup.att``
5502 -------------------
5503
5504 The ``%tbl.tgroup.att`` parameter entity is defined in the
5505 `Exchange Table Model`_ to allow customization of the `\<tgroup>`_
5506 element's attribute list.
5507
5508 The `Docutils Generic DTD`_ redefines it to add the `common attributes`_.
5509
5510
5511 ``%tbl.thead.att``
5512 ------------------
5513
5514 The ``%tbl.thead.att`` parameter entity is defined in the
5515 `Exchange Table Model`_ to allow customization of the `\<thead>`_
5516 element's attribute list.
5517
5518 The `Docutils Generic DTD`_ redefines it to add the `common attributes`_.
5519
5520
5521 Element Category Entities
5522 =========================
5523
5524 ``%bibliographic.elements``
5525 ---------------------------
5526
5527 The ``%bibliographic.elements`` parameter entity contains an OR-list of all
5528 `Bibliographic Elements`_.
5529
5530 .. include:: docutils.dtd
5531 :start-after: <!ENTITY % additional.bibliographic.elements "">
5532 :end-before:
5533 :literal:
5534
5535 The `%additional.bibliographic.elements`_ placeholder can be used by
5536 wrapper DTDs to extend ``%bibliographic.elements``.
5537
5538 Only the `\<docinfo>`_ element directly employs the
5539 ``%bibliographic.elements`` parameter entity in its content model.
5540
5541
5542 ``%body.elements``
5543 ------------------
5544
5545 The ``%body.elements`` parameter entity contains an OR-list of all
5546 `Body Elements`_:
5547
5548 .. include:: docutils.dtd
5549 :start-after: <!ENTITY % additional.body.elements "">
5550 :end-before:
5551 :literal:
5552
5553 The `%additional.body.elements`_ placeholder can be used by
5554 wrapper DTDs to extend ``%body.elements``.
5555
5556 The ``%body.elements`` parameter entity is directly employed in the
5557 content models of the following elements: `\<admonition>`_,
5558 `\<attention>`_, `\<block_quote>`_, `\<caution>`_, `\<citation>`_,
5559 `\<compound>`_, `\<danger>`_, `\<definition>`_, `\<description>`_,
5560 `\<entry>`_, `\<error>`_, `\<field_body>`_, `\<footer>`_, `\<footnote>`_,
5561 `\<header>`_, `\<hint>`_, `\<important>`_, `\<legend>`_, `\<list_item>`_,
5562 `\<note>`_, `\<sidebar>`_, `\<system_message>`_, `\<tip>`_, `\<topic>`_,
5563 and `\<warning>`_
5564
5565 Via `%structure.model`_, the ``%body.elements`` parameter entity is
5566 indirectly employed in the content models of the `\<document>`_ and
5567 `\<section>`_ elements.
5568
5569
5570 ``%inline.elements``
5571 --------------------
5572
5573 The ``%inline.elements`` parameter entity contains an OR-list of all
5574 `Inline Elements`_.
5575
5576 .. include:: docutils.dtd
5577 :start-after: <!ENTITY % additional.inline.elements "">
5578 :end-before:
5579 :literal:
5580
5581 The `%additional.inline.elements`_ placeholder can be used by
5582 wrapper DTDs to extend ``%inline.elements``.
5583
5584 The ``%inline.elements`` parameter entity is employed in the
5585 `%text.model`_ parameter entity.
5586
5587
5588 ``%section.elements``
5589 ---------------------
5590
5591 The ``%section.elements`` parameter entity contains the `\<section>`_
5592 element.
5593
5594 .. include:: docutils.dtd
5595 :start-after: <!ENTITY % additional.section.elements "">
5596 :end-before:
5597 :literal:
5598
5599 The `%additional.section.elements`_ placeholder can be used
5600 by wrapper DTDs to extend ``%section.elements``.
5601
5602 Via `%structure.model`_, the ``%section.elements`` parameter entity
5603 is indirectly employed in the content models of the `\<document>`_ and
5604 `\<section>`_ elements.
5605
5606
5607 Model Entities
5608 ==============
5609
5610 %calstblx
5611 ---------
5612
5613 .. _Exchange Table Model:
5614
5615 The `Docutils Generic DTD`_ includes via the %calstblx parameter entity
5616 the `XML Exchange Table Model DTD` [tm9901]_ as an `external DTD subset`_
5617 to define the elements `\<colspec>`_, `\<entry>`_, `\<row>`_,
5618 `\<table>`_, `\<tbody>`_, `\<tgroup>`_, and `\<thead>`_.
5619
5620 Entity definition::
5621
5622 <!ENTITY % calstblx PUBLIC
5623 "-//OASIS//DTD XML Exchange Table Model 19990315//EN"
5624 "soextblx.dtd">
5625
5626
5627 ``%structure.model``
5628 --------------------
5629
5630 The ``%structure.model`` parameter entity encapsulates the
5631 hierarchical structure of a document and of its constituent parts.
5632 It contains `body elements`_, `structural elements`_, and the
5633 `\<transition>`_ element.
5634 See the discussion in section `Element Hierarchy`_ above.
5635
5636 Simplified entity definition:
5637
5638 .. parsed-literal::
5639
5640 ( ( `%body.elements`_; | topic | sidebar | transition )*,
5641 ( `%section.elements`_; | transition )* )
5642
5643 Each `\<document>`_ or `\<section>`_ contains zero or more
5644 body elements, topics, sidebars, or transitions,
5645 followed by zero or more sections (whose contents include this model),
5646 or transitions.
5647
5648 The actual definition is more complex,
5649
5650 .. include:: docutils.dtd
5651 :start-after: <!-- The structure model may not end with a transition. -->
5652 :end-before:
5653 :literal:
5654
5655 because there are additional restrictions on `\<transition>`_\ s.
5656 [#extra-rule]_
5657
5658 The ``%structure.model`` parameter entity is directly employed in the
5659 content models of the `\<document>`_ and `\<section>`_ elements.
5660
5661 .. [#extra-rule] The restrictions cannot be fully expressed in the
5662 language of DTDs without making the definition overly complicated.
5663 Docutils checks them in the `misc.Transitions` transform_.
5664
5665
5666 ``%tbl.entry.mdl``
5667 -------------------
5668
5669 The ``%tbl.entry.mdl`` parameter entity is defined in the `Exchange Table
5670 Model`_ to allow customization of the `\<entry>`_ element's content model.
5671
5672 The `Docutils Generic DTD`_ changes it to allow all `body elements`_
5673 (including nested tables)::
5674
5675 (%body.elements;)*
5676
5677
5678 ``%tbl.tgroup.mdl``
5679 -------------------
5680
5681 The ``%tbl.tgroup.mdl`` parameter entity is defined in the
5682 `Exchange Table Model`_ to allow customization of the `\<tgroup>`_
5683 element's content model.
5684
5685 The `Docutils Generic DTD`_ changes it to require at least one
5686 <colspec> element::
5687
5688 colspec+,thead?,tbody
5689
5690
5691 ``%text.model``
5692 ---------------
5693
5694 The ``%text.model`` parameter entity is used by `simple elements`_ that
5695 may contain `phrasing content`_, i.e. text data mixed with `inline
5696 elements`_.
5697
5698 Entity definition:
5699
5700 .. parsed-literal::
5701
5702 (#PCDATA | `%inline.elements`_;)*
5703
5704 The ``%text.model`` parameter entity is directly employed in the content
5705 models of the following elements: `\<abbreviation>`_,
5706 `\<acronym>`_, `\<address>`_, `\<attribution>`_, `\<author>`_,
5707 `\<caption>`_, `\<classifier>`_, `\<contact>`_, `\<copyright>`_,
5708 `\<date>`_, `\<doctest_block>`_, `\<emphasis>`_, `\<field_name>`_,
5709 `\<generated>`_, `\<inline>`_, `\<line>`_, `\<literal>`_, `\<literal_block>`_,
5710 `\<organization>`_, `\<paragraph>`_, `\<problematic>`_,
5711 `\<reference>`_, `\<revision>`_, `\<rubric>`_,
5712 `\<status>`_, `\<strong>`_, `\<subscript>`_, `\<substitution_definition>`_,
5713 `\<substitution_reference>`_, `\<subtitle>`_, `\<superscript>`_,
5714 `\<target>`_, `\<term>`_, `\<title>`_, `\<title_reference>`_, `\<version>`_
5715
5716
5717 .. _%additional.basic.atts:
5718 .. _%additional.bibliographic.elements:
5719 .. _%additional.body.elements:
5720 .. _%additional.inline.elements:
5721 .. _%additional.reference.atts:
5722 .. _%additional.section.elements:
5723
5724 Placeholders
5725 ============
5726
5727 The following empty placeholders are employed to allow easy extension of
5728 the corresponding parameter entity by wrapper DTDs:
5729
5730 | ``%additional.basic.atts`` in `%basic.atts`_,
5731 | ``%additional.bibliographic.elements`` in `%bibliographic.elements`_,
5732 | ``%additional.body.elements`` in `%body.elements`_,
5733 | ``%additional.inline.elements`` in `%inline.elements`_,
5734 | ``%additional.reference.atts`` in `%reference.atts`_, and
5735 | ``%additional.section.elements`` in `%section.elements`_.
5736
5737
5738 --------
5739 Glossary
5740 --------
5741
5742 .. class:: description
5743
5744 _`Class names`
5745 define sub-classes of existing elements.
5746
5747 Class names are used in the classes_ attribute (`%classnames.type`_).
5748
5749 Docutils employs the `identifier normalization`_ to ensure class names
5750 conform to both, HTML4.1 and CSS1.0 name requirements (the regular
5751 expression ``[a-z](-?[a-z0-9]+)*``).
5752
5753 In reStructuredText, custom class names can be specified using the
5754 `"class" directive`_, a directive's `class option`_, or `custom
5755 interpreted text roles`_.
5756
5757
5758 _`Identifiers`
5759 are used for cross references in generated documents.
5760
5761 Identifiers are used in the ids_, refid_, and backrefs_ attributes
5762 (`%ids.type`_, `%idref.type`_, or `%idrefs.type`_) [#id-vc]_.
5763
5764 Identifiers cannot be specified directly in reStructuredText.
5765 Docutils generates them from `reference names`_ (applying the
5766 `identifier normalization`_ to comply with restrictions in the
5767 supported output formats) or the `"auto_id_prefix"`_.
5768 If specified, Docutils prepends the `"id_prefix"`_.
5769 Numbers may be appended for disambiguation if required.
5770
5771 .. [#id-vc] The `Docutils Generic DTD`_ cannot use the ID, IDREF,
5772 and IDREFS standard types because elements do not adhere
5773 to the `One ID per Element Type`_ validity constraint.
5774
5775 _`Phrasing content`
5776 is text data that may be intermixed with `inline elements`_
5777 (cf. the `%text.model`_ parameter entity).
5778
5779 _`Pseudo-XML`
5780 is a representation of XML where nesting is indicated by
5781 indentation and end-tags are not shown. Some of the precision
5782 of real XML is given up in exchange for easier readability.
5783 For example, the following are equivalent:
5784
5785 Real XML::
5786
5787 <document>
5788 <section ids="a-title" names="a title">
5789 <title>A Title</title>
5790 <paragraph>A paragraph.</paragraph>
5791 </section>
5792 </document>
5793
5794 Pseudo-XML::
5795
5796 <document>
5797 <section ids="a-title" names="a title">
5798 <title>
5799 A Title
5800 <paragraph>
5801 A paragraph.
5802
5803
5804
5805 .. _reference name:
5806
5807 _`Reference names`
5808 are assigned in the markup and used for internal cross-references and
5809 as base of element identifiers_.
5810
5811 Reference names are used in the name_, names_, refname_, and dupnames_
5812 attributes (`%refname.type`_ or `%refnames.type`_).
5813
5814 Reference names may consist of any text,
5815 whitespace is normalized. [#whitespace-normalization]_
5816 (Identifiers_ have additional constraints.)
5817
5818 In reStructuredText, `reference names <rST reference names_>`__
5819 originate from `internal hyperlink targets`_, a directive's `name
5820 option`_, or the element's title or content.
5821
5822 .. _namespace:
5823
5824 Almost all elements in a document share a common *namespace*
5825 for reference names and match them ignoring case.
5826 Only `\<substitution_definition>`_ and `\<substitution_reference>`_
5827 elements use a distinct namespace with `case-sensitive but forgiving`_
5828 matching of reference names.
5829
5830 .. [#whitespace-normalization] Adjacent spaces, horizontal or vertical
5831 tabs, newlines, carriage returns, or form feeds, are replaced by a
5832 single space. Leading and trailing whitespace is removed.
5833
5834 _`Unit proportion`
5835 is a length unit used in the definition of relative `table column widths`_
5836 in the `Exchange Table Model`_.
5837
5838 Its definition boils down to
5839
5840 …, the *unit proportion* is determined by starting with the target
5841 table width […].
5842 Reduce that by the sum of border widths, column ruling widths, and
5843 the fixed colwidths to get the available proportional width. […]
5844 Then the unit proportion is the available proportional width divided
5845 by the sum of the proportionality factors.
5846
5847 --- `Exchange Table Model, section 3.2.1`__
5848
5849 .. _table column widths: colwidth_
5850 __ https://www.oasis-open.org/specs/tm9901.html#AEN285
5851
5852
5853 ------------
5854 Bibliography
5855 ------------
5856
5857 .. [docutils.dtd] `Docutils Generic DTD`,
5858 David Goodger,
5859 https://docutils.sourceforge.io/docs/ref/docutils.dtd.
5860
5861 .. [dpub-aria] `Digital Publishing WAI-ARIA Module 1.0`,
5862 W3C Recommendation, https://www.w3.org/TR/dpub-aria-1.0/.
5863
5864 .. [epub-ssv] `EPUB 3 Structural Semantics Vocabulary`,
5865 W3C Group Note, https://www.w3.org/TR/epub-ssv-11/.
5866
5867 .. [html.spec] `HTML Living Standard`,
5868 WHATWG (Apple, Google, Mozilla, Microsoft),
5869 https://html.spec.whatwg.org.
5870
5871 .. [rfc3986] `Uniform Resource Identifier (URI): Generic Syntax`,
5872 T. Berners-Lee, R. Fielding, and L. Masinter,
5873 STD 66, RFC 3986, January 2005,
5874 https://www.rfc-editor.org/info/rfc3986.
5875
5876 .. [tdg5.1] `DocBook 5.1: The Definitive Guide`,
5877 Norman Walsh,
5878 https://tdg.docbook.org/tdg/5.1.
5879
5880 .. [tm9901] `XML Exchange Table Model Document Type Definition`,
5881 Norman Walsh,
5882 OASIS Technical Memorandum 9901:1999,
5883 http://www.oasis-open.org/html/tm9901.html.
5884
5885 .. [xml1.0] `Extensible Markup Language (XML) 1.0`,
5886 W3C Recommendation,
5887 https://www.w3.org/TR/xml/.
5888
5889
5890 .. _DocBook: https://tdg.docbook.org/tdg/5.1/part2
5891 .. _DocBook <caution>: https://tdg.docbook.org/tdg/5.1/caution.html
5892 .. _DocBook <footnote>: https://tdg.docbook.org/tdg/5.1/footnote.html
5893 .. _DocBook <footnoteref>: https://tdg.docbook.org/tdg/5.1/footnoteref.html
5894 .. _DocBook <imagedata>: https://tdg.docbook.org/tdg/5.1/imagedata
5895 .. _DocBook <important>: https://tdg.docbook.org/tdg/5.1/important.html
5896 .. _DocBook <note>: https://tdg.docbook.org/tdg/5.1/note.html
5897 .. _DocBook <tip>: https://tdg.docbook.org/tdg/5.1/tip.html
5898 .. _DocBook <warning>: https://tdg.docbook.org/tdg/5.1/warning.html
5899
5900 .. _DPub ARIA: https://www.w3.org/TR/dpub-aria-1.0/
5901 .. _conforming HTML emulation: https://www.w3.org/TR/html-aria/#docconformance
5902
5903 .. _EPUB 3 Structural Semantics Vocabulary:
5904 https://www.w3.org/TR/epub-ssv-11/
5905
5906 .. _HTML: https://html.spec.whatwg.org/multipage/#toc-semantics
5907 .. _emulate footnotes:
5908 https://html.spec.whatwg.org/multipage/semantics-other.html#footnotes
5909
5910 .. _Python: https://www.python.org/
5911
5912 .. _XML: https://developer.mozilla.org/en-US/docs/Web/XML/XML_introduction
5913 .. _Introducing the Extensible Markup Language (XML):
5914 http://xml.coverpages.org/xmlIntro.html
5915 .. _internal entities: https://www.w3.org/TR/xml/#sec-internal-ent
5916 .. _entity reference: https://www.w3.org/TR/xml/#dt-entref
5917 .. _external DTD subset: https://www.w3.org/TR/xml11/#sec-external-ent
5918 .. _XML attribute types: https://www.w3.org/TR/REC-xml/#sec-attribute-types
5919 .. _One ID per Element Type: https://www.w3.org/TR/REC-xml/#one-id-per-el
5920 .. _XPath: https://www.w3.org/TR/xpath/
5921
5922 .. _Docutils: https://docutils.sourceforge.io/
5923 .. _docutils.nodes:
5924 .. _nodes.py: ../../docutils/nodes.py
5925
5926 .. _"attribution": ../user/config.html#attribution
5927 .. _"auto_id_prefix": ../user/config.html#auto-id-prefix
5928 .. _"datestamp": ../user/config.html#datestamp
5929 .. _"id_prefix": ../user/config.html#id-prefix
5930 .. _"image_loading": ../user/config.html#image-loading
5931 .. _"report_level": ../user/config.html#report-level
5932 .. _"root_prefix": ../user/config.html#root-prefix
5933 .. _stylesheet: ../user/config.html#stylesheet
5934 .. _"strip_comments": ../user/config.html#strip-comments
5935 .. _"syntax_highlight": ../user/config.html#syntax-highlight
5936
5937 .. _transform:
5938 .. _transforms: ../api/transforms.html
5939 .. _DocInfo transform: ../api/transforms.html#docinfo
5940 .. _DocTitle transform: ../api/transforms.html#doctitle
5941
5942 .. _reader: ../peps/pep-0258.html#readers
5943 .. _severity level: ../peps/pep-0258.html#error-handling
5944 .. _writer:
5945 .. _writers: ../peps/pep-0258.html#writers
5946
5947 .. _reStructuredText: rst/introduction.html
5948 .. _A ReStructuredText Primer: ../user/rst/quickstart.html
5949
5950 .. _reStructuredText Markup Specification:
5951 rst/restructuredtext.html
5952 .. _auto-numbered: rst/restructuredtext.html#auto-numbered-footnotes
5953 .. _auto-symbol: rst/restructuredtext.html#auto-symbol-footnotes
5954 .. _bibliographic data:
5955 .. _bibliographic fields: rst/restructuredtext.html#bibliographic-fields
5956 .. _"authors" field: rst/restructuredtext.html#authors
5957 .. _block quote: rst/restructuredtext.html#block-quotes
5958 .. _bullet list: rst/restructuredtext.html#bullet-lists
5959 .. _case-sensitive but forgiving: rst/restructuredtext.html
5960 #case-sensitive-but-forgiving
5961 .. _CSS3 length units: rst/restructuredtext.html#length-units
5962 .. _citations: rst/restructuredtext.html#citations
5963 .. _citation references: rst/restructuredtext.html#citation-references
5964 .. _comment: rst/restructuredtext.html#comments
5965 .. _definition list: rst/restructuredtext.html#definition-lists
5966 .. _directive: rst/restructuredtext.html#directives
5967 .. _doctest block: rst/restructuredtext.html#doctest-blocks
5968 .. _emphasis markup: rst/restructuredtext.html#emphasis
5969 .. _enumerated list: rst/restructuredtext.html#enumerated-lists
5970 .. _explicit hyperlink targets: rst/restructuredtext.html#hyperlink-targets
5971 .. _explicit markup construct:
5972 .. _explicit markup blocks: rst/restructuredtext.html#explicit-markup-blocks
5973 .. _footnote reference: rst/restructuredtext.html#footnote-references
5974 .. _grid table: rst/restructuredtext.html#grid-tables
5975 .. _hyperlink references: rst/restructuredtext.html#hyperlink-references
5976 .. _implicit hyperlink targets: rst/restructuredtext.html#implicit-hyperlink-targets
5977 .. _indirect target: rst/restructuredtext.html#indirect-hyperlink-targets
5978 .. _inline literals: rst/restructuredtext.html#inline-literals
5979 .. _inline markup: rst/restructuredtext.html#inline-markup
5980 .. _internal hyperlink targets: rst/restructuredtext.html#internal-hyperlink-targets
5981 .. _line block: rst/restructuredtext.html#line-blocks
5982 .. _literal block: rst/restructuredtext.html#literal-blocks
5983 .. _footnotes:
5984 .. _footnote: rst/restructuredtext.html#footnotes
5985 .. _hyperlinks: rst/restructuredtext.html#hyperlinks
5986 .. _option list: rst/restructuredtext.html#option-lists
5987 .. _RCS Keywords: rst/restructuredtext.html#rcs-keywords
5988 .. _rST document: rst/restructuredtext.html#document
5989 .. _reStructuredText field list:
5990 .. _rST field list: rst/restructuredtext.html#field-lists
5991 .. _rST reference names: rst/restructuredtext.html#reference-names
5992 .. _rST tables: rst/restructuredtext.html#tables
5993 .. _section: rst/restructuredtext.html#sections
5994 .. _simple reference name: rst/restructuredtext.html#simple-reference-names
5995 .. _simple table: rst/restructuredtext.html#simple-tables
5996 .. _standalone hyperlinks: rst/restructuredtext.html#standalone-hyperlinks
5997 .. _strong emphasis: rst/restructuredtext.html#strong-emphasis
5998 .. _substitution definition:
5999 .. _substitution definitions:
6000 .. _substitutions: rst/restructuredtext.html#substitution-definitions
6001 .. _hyperlink targets: rst/restructuredtext.html#hyperlink-targets
6002 .. _transition: rst/restructuredtext.html#transitions
6003
6004 .. _standard role: rst/roles.html
6005 .. _"abbreviation" role: rst/roles.html#abbreviation
6006 .. _"acronym" role: rst/roles.html#acronym
6007 .. _"code" role: rst/roles.html#code
6008 .. _"literal" role: rst/roles.html#literal
6009 .. _"raw" role: rst/roles.html#raw
6010 .. _"subscript" role: rst/roles.html#subscript
6011 .. _"superscript" role: rst/roles.html#superscript
6012 .. _"title-reference" role: rst/roles.html#title-reference
6013
6014 .. _"admonition" directive: rst/directives.html#admonition
6015 .. _"attention" directive: rst/directives.html#attention
6016 .. _"caution" directive: rst/directives.html#caution
6017 .. _"class" directive: rst/directives.html#class-1
6018 .. _class option: rst/directives.html#class-option
6019 .. _"code" directive: rst/directives.html#code
6020 .. _"compound" directive: rst/directives.html#compound-paragraph
6021 .. _"container" directive: rst/directives.html#container
6022 .. _custom roles: rst/directives.html#role
6023 .. _table of contents:
6024 .. _"contents" directive: rst/directives.html#table-of-contents
6025 .. _"csv-table": rst/directives.html#csv-table
6026 .. _"danger" directive: rst/directives.html#danger
6027 .. _"date" directive: rst/directives.html#date
6028 .. _"epigraph": rst/directives.html#epigraph
6029 .. _"error" directive: rst/directives.html#error
6030 .. _"figure" directive: rst/directives.html#figure
6031 .. _"footer" directive: rst/directives.html#footer
6032 .. _"header" directive: rst/directives.html#header
6033 .. _"hint" directive: rst/directives.html#hint
6034 .. _identifier normalization: rst/directives.html#identifier-normalization
6035 .. _"image" directive: rst/directives.html#image
6036 .. _"important" directive: rst/directives.html#important
6037 .. _"include" directive: rst/directives.html#include
6038 .. _"list-table": rst/directives.html#list-table
6039 .. _"math" directive: rst/directives.html#math
6040 .. _"meta" directive: rst/directives.html#meta
6041 .. _name option: rst/directives.html#name
6042 .. _"note" directive: rst/directives.html#note
6043 .. _"parsed-literal" directive: rst/directives.html#parsed-literal
6044 .. _"pull-quote": rst/directives.html#pull-quote
6045 .. _"raw" directive: rst/directives.html#raw
6046 .. _"rubric" directive: rst/directives.html#rubric
6047 .. _"sectnum" directive: rst/directives.html#sectnum
6048 .. _"sidebar" directive: rst/directives.html#sidebar
6049 .. _"table" directive: rst/directives.html#table
6050 .. _"target-notes" directive: rst/directives.html#target-notes
6051 .. _"tip" directive: rst/directives.html#tip
6052 .. _"topic" directive: rst/directives.html#topic
6053 .. _"title" directive: rst/directives.html#title
6054 .. _"warning" directive: rst/directives.html#warning
6055 .. _custom interpreted text roles:
6056 rst/directives.html#custom-interpreted-text-roles
6057 .. _table of compatible image formats: rst/directives.html#image-formats
6058
6059
6060 .. Emacs settings
6061
6062 Local Variables:
6063 mode: indented-text
6064 indent-tabs-mode: nil
6065 sentence-end-double-space: t
6066 fill-column: 70
6067 End: