add tinkerer
[docutils.git] / docs / ref / doctree.txt
blobeabbbe6c266353e56e06d8f19d8f9c94d01c7200
1 ============================
2  The Docutils Document Tree
3 ============================
5 A Guide to the Docutils DTD
6 ***************************
8 :Author: David Goodger
9 :Contact: docutils-develop@lists.sourceforge.net
10 :Revision: $Revision$
11 :Date: $Date$
12 :Copyright: This document has been placed in the public domain.
15 .. contents:: :depth: 1
18 This document describes the XML data structure of Docutils_ documents:
19 the relationships and semantics of elements and attributes.  The
20 Docutils document structure is formally defined by the `Docutils
21 Generic DTD`_ XML document type definition, docutils.dtd_, which is
22 the definitive source for details of element structural relationships.
24 This document does not discuss implementation details.  Those can be
25 found in internal documentation (docstrings) for the
26 ``docutils.nodes`` module, where the document tree data structure is
27 implemented in a class library.
29 The reader is assumed to have some familiarity with XML or SGML, and
30 an understanding of the data structure meaning of "tree".  For a list
31 of introductory articles, see `Introducing the Extensible Markup
32 Language (XML)`_.
34 The reStructuredText_ markup is used for illustrative examples
35 throughout this document.  For a gentle introduction, see `A
36 ReStructuredText Primer`_.  For complete technical details, see the
37 `reStructuredText Markup Specification`_.
40 .. _Docutils: http://docutils.sourceforge.net/
41 .. _Docutils Generic DTD:
42 .. _Docutils DTD:
43 .. _docutils.dtd: docutils.dtd
44 .. _Introducing the Extensible Markup Language (XML):
45    http://xml.coverpages.org/xmlIntro.html
46 .. _reStructuredText: http://docutils.sourceforge.net/rst.html
47 .. _A ReStructuredText Primer: ../user/rst/quickstart.html
48 .. _reStructuredText Markup Specification: rst/restructuredtext.html
51 -------------------
52  Element Hierarchy
53 -------------------
55 .. contents:: :local:
57 Below is a simplified diagram of the hierarchy of elements in the
58 Docutils document tree structure.  An element may contain any other
59 elements immediately below it in the diagram.  Notes are written in
60 square brackets.  Element types in parentheses indicate recursive or
61 one-to-many relationships; sections may contain (sub)sections, tables
62 contain further body elements, etc. ::
64   +--------------------------------------------------------------------+
65   | document  [may begin with a title, subtitle, decoration, docinfo]  |
66   |                             +--------------------------------------+
67   |                             | sections  [each begins with a title] |
68   +-----------------------------+-------------------------+------------+
69   | [body elements:]                                      | (sections) |
70   |         | - literal | - lists  |       | - hyperlink  +------------+
71   |         |   blocks  | - tables |       |   targets    |
72   | para-   | - doctest | - block  | foot- | - sub. defs  |
73   | graphs  |   blocks  |   quotes | notes | - comments   |
74   +---------+-----------+----------+-------+--------------+
75   | [text]+ | [text]    | (body elements)  | [text]       |
76   | (inline +-----------+------------------+--------------+
77   | markup) |
78   +---------+
80 The Docutils document model uses a simple, recursive model for section
81 structure.  A document_ node may contain body elements and section_
82 elements.  Sections in turn may contain body elements and sections.
83 The level (depth) of a section element is determined from its physical
84 nesting level; unlike other document models (``<h1>`` in HTML_,
85 ``<sect1>`` in DocBook_, ``<div1>`` in XMLSpec_) the level is not
86 incorporated into the element name.
88 The Docutils document model uses strict element content models.  Every
89 element has a unique structure and semantics, but elements may be
90 classified into general categories (below).  Only elements which are
91 meant to directly contain text data have a mixed content model, where
92 text data and inline elements may be intermixed.  This is unlike the
93 much looser HTML_ document model, where paragraphs and text data may
94 occur at the same level.
97 Structural Elements
98 ===================
100 Structural elements may only contain child elements; they do not
101 directly contain text data.  Structural elements may contain body
102 elements or further structural elements.  Structural elements can only
103 be child elements of other structural elements.
105 Category members: document_, section_, topic_, sidebar_
108 Structural Subelements
109 ----------------------
111 Structural subelements are child elements of structural elements.
112 Simple structuctural subelements (title_, subtitle_) contain text
113 data; the others are compound and do not directly contain text data.
115 Category members: title_, subtitle_, decoration_, docinfo_,
116 transition_
119 Bibliographic Elements
120 ``````````````````````
122 The docinfo_ element is an optional child of document_.  It groups
123 bibliographic elements together.  All bibliographic elements except
124 authors_ and field_ contain text data.  authors_ contains further
125 bibliographic elements (most notably author_).  field_ contains
126 field_name_ and field_body_ body subelements.
128 Category members: address_, author_, authors_, contact_, copyright_,
129 date_, field_, organization_, revision_, status_, version_
132 Decorative Elements
133 ```````````````````
135 The decoration_ element is also an optional child of document_.  It
136 groups together elements used to generate page headers and footers.
138 Category members: footer_, header_
141 Body Elements
142 =============
144 Body elements are contained within structural elements and compound
145 body elements.  There are two subcategories of body elements: simple
146 and compound.
148 Category members: admonition_, attention_, block_quote_, bullet_list_,
149 caution_, citation_, comment_, compound_, container_, danger_,
150 definition_list_, doctest_block_, enumerated_list_, error_,
151 field_list_, figure_, footnote_, hint_, image_, important_,
152 line_block_, literal_block_, note_, option_list_, paragraph_,
153 pending_, raw_, rubric_, substitution_definition_, system_message_,
154 table_, target_, tip_, warning_
157 Simple Body Elements
158 --------------------
160 Simple body elements are empty or directly contain text data.  Those
161 that contain text data may also contain inline elements.  Such
162 elements therefore have a "mixed content model".
164 Category members: comment_, doctest_block_, image_, literal_block_,
165 math_block_, paragraph_, pending_, raw_, rubric_, substitution_definition_,
166 target_
169 Compound Body Elements
170 ----------------------
172 Compound body elements contain local substructure (body subelements)
173 and further body elements.  They do not directly contain text data.
175 Category members: admonition_, attention_, block_quote_, bullet_list_,
176 caution_, citation_, compound_, container_, danger_, definition_list_,
177 enumerated_list_, error_, field_list_, figure_, footnote_, hint_,
178 important_, line_block, note_, option_list_, system_message_, table_,
179 tip_, warning_
182 Body Subelements
183 ````````````````
185 Compound body elements contain specific subelements (e.g. bullet_list_
186 contains list_item_).  Subelements may themselves be compound elements
187 (containing further child elements, like field_) or simple data
188 elements (containing text data, like field_name_).  These subelements
189 always occur within specific parent elements, never at the body
190 element level (beside paragraphs, etc.).
192 Category members (simple): attribution_, caption_, classifier_,
193 colspec_, field_name_, label_, line_, option_argument_,
194 option_string_, term_
196 Category members (compound): definition_, definition_list_item_,
197 description_, entry_, field_, field_body_, legend_, list_item_,
198 option_, option_group_, option_list_item_, row_, tbody_, tgroup_,
199 thead_
202 Inline Elements
203 ===============
205 Inline elements directly contain text data, and may also contain
206 further inline elements.  Inline elements are contained within simple
207 body elements.  Most inline elements have a "mixed content model".
209 Category members: abbreviation_, acronym_, citation_reference_,
210 emphasis_, footnote_reference_, generated_, image_, inline_, literal_,
211 math_, problematic_, reference_, strong_, subscript_,
212 substitution_reference_, superscript_, target_, title_reference_, raw_
215 .. _HTML: http://www.w3.org/MarkUp/
216 .. _DocBook: http://docbook.org/tdg/en/html/docbook.html
217 .. _XMLSpec: http://www.w3.org/XML/1998/06/xmlspec-report.htm
220 -------------------
221  Element Reference
222 -------------------
224 .. contents:: :local:
225               :depth: 1
227 Each element in the DTD (document type definition) is described in its
228 own section below.  Each section contains an introduction plus the
229 following subsections:
231 * Details (of element relationships and semantics):
233   - Category: One or more references to the element categories in
234     `Element Hierarchy`_ above.  Some elements belong to more than one
235     category.
237   - Parents: A list of elements which may contain the element.
239   - Children: A list of elements which may occur within the element.
241   - Analogues: Describes analogous elements in well-known document
242     models such as HTML_ or DocBook_.  Lists similarities and
243     differences.
245   - Processing: Lists formatting or rendering recommendations for the
246     element.
248 * Content Model:
250   The formal XML content model from the `Docutils DTD`_, followed by:
252   - Attributes: Describes (or refers to descriptions of) the possible
253     values and semantics of each attribute.
255   - Parameter Entities: Lists the parameter entities which directly or
256     indirectly include the element.
258 * Examples: reStructuredText_ examples are shown along with
259   fragments of the document trees resulting from parsing.
260   _`Pseudo-XML` is used for the results of parsing and processing.
261   Pseudo-XML is a representation of XML where nesting is indicated by
262   indentation and end-tags are not shown.  Some of the precision of
263   real XML is given up in exchange for easier readability.  For
264   example, the following are equivalent:
266   - Real XML::
268         <document>
269         <section ids="a-title" names="a title">
270         <title>A Title</title>
271         <paragraph>A paragraph.</paragraph>
272         </section>
273         </document>
275   - Pseudo-XML::
277         <document>
278             <section ids="a-title" names="a title">
279                 <title>
280                     A Title
281                 <paragraph>
282                     A paragraph.
284 --------------------
286 Many of the element reference sections below are marked "_`to be
287 completed`".  Please help complete this document by contributing to
288 its writing.
291 ``abbreviation``
292 ================
294 The ``abbreviation`` element is an inline element used to represent an
295 abbreviation being used in the document. An example of an abbreviation is 'St'
296 being used instead of 'Street'.
298 Details
299 -------
301 :Category:
302     `Inline Elements`_
304 :Parents:
305      All elements employing the %inline.elements; parameter entities in their
306      content models may contain ``abbreviation``.
308 :Children:
309     ``abbreviation`` elements may contain text data plus `inline elements`_.
311 :Analogues:
312     ``abbreviation`` is analogous to the HTML "abbr" element.
314 Content Model
315 -------------
317 .. parsed-literal::
319     `%text.model;`_
321 :Attributes:
322     The ``abbreviation`` element contains only the `common attributes`_:
323     ids_, names_, dupnames_, source_, and classes_.
325 Examples
326 --------
328 The ``abbreviation`` element is not exposed in default restructured text. It
329 can only be accessed through custom roles.
331 Pseudo-XML_ example from a custom `:abbr:` role::
333     <paragraph>
334         <abbreviation explanation="Street">
335             St
336         is a common abbreviation for "street".
339 ``acronym``
340 ===========
342 `To be completed`_.
345 ``address``
346 ===========
348 The ``address`` element holds the surface mailing address information
349 for the author (individual or group) of the document, or a third-party
350 contact address.  Its structure is identical to that of the
351 literal_block_ element: whitespace is significant, especially
352 newlines.
355 Details
356 -------
358 :Category:
359     `Bibliographic Elements`_
361 :Parents:
362     The following elements may contain ``address``: docinfo_, authors_
364 :Children:
365     ``address`` elements contain text data plus `inline elements`_.
367 :Analogues:
368     ``address`` is analogous to the DocBook "address" element.
370 :Processing:
371     As with the literal_block_ element, newlines and other whitespace
372     is significant and must be preserved.  However, a monospaced
373     typeface need not be used.
375     See also docinfo_.
378 Content Model
379 -------------
381 .. parsed-literal::
383     `%text.model;`_
385 :Attributes:
386     The ``address`` element contains the `common attributes`_ (ids_,
387     names_, dupnames_, source_, and classes_), plus `xml:space`_.
389 :Parameter Entities:
390     The `%bibliographic.elements;`_ parameter entity directly includes
391     ``address``.
394 Examples
395 --------
397 reStructuredText_ source::
399     Document Title
400     ==============
402     :Address: 123 Example Ave.
403               Example, EX
405 Complete pseudo-XML_ result after parsing and applying transforms::
407     <document ids="document-title" names="document title">
408         <title>
409             Document Title
410         <docinfo>
411             <address>
412                 123 Example Ave.
413                 Example, EX
415 See docinfo_ for a more complete example, including processing
416 context.
419 ``admonition``
420 ==============
422 This element is a generic, titled admonition.  Also see the specific
423 admonition elements Docutils offers (in alphabetical order): caution_,
424 danger_, error_, hint_, important_, note_, tip_, warning_.
427 Details
428 -------
430 :Category:
431     `Compound Body Elements`_
433 :Parents:
434     All elements employing the `%body.elements;`_ or
435     `%structure.model;`_ parameter entities in their content models
436     may contain ``admonition``.
438 :Children:
439     ``admonition`` elements begin with a title_ and may contain one or
440     more `body elements`_.
442 :Analogues:
443     ``admonition`` has no direct analogues in common DTDs.  It can be
444     emulated with primitives and type effects.
446 :Processing:
447     Rendered distinctly (inset and/or in a box, etc.).
450 Content Model
451 -------------
453 .. parsed-literal::
455    (title_, (`%body.elements;`_)+)
457 :Attributes:
458     The ``admonition`` element contains only the `common attributes`_:
459     ids_, names_, dupnames_, source_, and classes_.
461 :Parameter Entities:
462     The `%body.elements;`_ parameter entity directly includes
463     ``admonition``.  The `%structure.model;`_ parameter entity
464     indirectly includes ``admonition``.
467 Examples
468 --------
470 reStructuredText source::
472     .. admonition:: And, by the way...
474        You can make up your own admonition too.
476 Pseudo-XML_ fragment from simple parsing::
478     <admonition class="admonition-and-by-the-way">
479         <title>
480             And, by the way...
481         <paragraph>
482             You can make up your own admonition too.
485 ``attention``
486 =============
488 The ``attention`` element is an admonition, a distinctive and
489 self-contained notice.  Also see the other admonition elements
490 Docutils offers (in alphabetical order): caution_, danger_, error_,
491 hint_, important_, note_, tip_, warning_, and the generic admonition_.
494 Details
495 -------
497 :Category:
498     `Compound Body Elements`_
500 :Parents:
501     All elements employing the `%body.elements;`_ or
502     `%structure.model;`_ parameter entities in their content models
503     may contain ``attention``.
505 :Children:
506     ``attention`` elements contain one or more `body elements`_.
508 :Analogues:
509     ``attention`` has no direct analogues in common DTDs.  It can be
510     emulated with primitives and type effects.
512 :Processing:
513     Rendered distinctly (inset and/or in a box, etc.), with the
514     generated title "Attention!" (or similar).
517 Content Model
518 -------------
520 .. parsed-literal::
522    (`%body.elements;`_)+
524 :Attributes:
525     The ``attention`` element contains only the `common attributes`_:
526     ids_, names_, dupnames_, source_, and classes_.
528 :Parameter Entities:
529     The `%body.elements;`_ parameter entity directly includes
530     ``attention``.  The `%structure.model;`_ parameter entity
531     indirectly includes ``attention``.
534 Examples
535 --------
537 reStructuredText source::
539     .. Attention:: All your base are belong to us.
541 Pseudo-XML_ fragment from simple parsing::
543     <attention>
544         <paragraph>
545             All your base are belong to us.
548 ``attribution``
549 ===============
551 `To be completed`_.
554 ``author``
555 ==========
557 The ``author`` element holds the name of the author of the document.
560 Details
561 -------
563 :Category:
564     `Bibliographic Elements`_
566 :Parents:
567     The following elements may contain ``author``: docinfo_, authors_
569 :Children:
570     ``author`` elements may contain text data plus `inline elements`_.
572 :Analogues:
573     ``author`` is analogous to the DocBook "author" element.
575 :Processing:
576     See docinfo_.
579 Content Model
580 -------------
582 .. parsed-literal::
584     `%text.model;`_
586 :Attributes:
587     The ``author`` element contains only the `common attributes`_:
588     ids_, names_, dupnames_, source_, and classes_.
590 :Parameter Entities:
591     The `%bibliographic.elements;`_ parameter entity directly includes
592     ``author``.
595 Examples
596 --------
598 reStructuredText_ source::
600     Document Title
601     ==============
603     :Author: J. Random Hacker
605 Complete pseudo-XML_ result after parsing and applying transforms::
607     <document ids="document-title" names="document title">
608         <title>
609             Document Title
610         <docinfo>
611             <author>
612                 J. Random Hacker
614 See docinfo_ for a more complete example, including processing
615 context.
618 ``authors``
619 ===========
621 The ``authors`` element is a container for author information for
622 documents with multiple authors.
625 Details
626 -------
628 :Category:
629     `Bibliographic Elements`_
631 :Parents:
632     Only the docinfo_ element contains ``authors``.
634 :Children:
635     ``authors`` elements may contain the following elements: author_,
636     organization_, address_, contact_
638 :Analogues:
639     ``authors`` is analogous to the DocBook "authors" element.
641 :Processing:
642     See docinfo_.
645 Content Model
646 -------------
648 .. parsed-literal::
650     ((author_, organization_?, address_?, contact_?)+)
652 :Attributes:
653     The ``authors`` element contains only the `common attributes`_:
654     ids_, names_, dupnames_, source_, and classes_.
656 :Parameter Entities:
657     The `%bibliographic.elements;`_ parameter entity directly includes
658     ``authors``.
661 Examples
662 --------
664 reStructuredText_ source::
666     Document Title
667     ==============
669     :Authors: J. Random Hacker; Jane Doe
671 Complete pseudo-XML_ result after parsing and applying transforms::
673     <document ids="document-title" names="document title">
674         <title>
675             Document Title
676         <docinfo>
677             <authors>
678                 <author>
679                     J. Random Hacker
680                 <author>
681                     Jane Doe
683 In reStructuredText, multiple author's names are separated with
684 semicolons (";") or commas (","); semicolons take precedence.  There
685 is currently no way to represent the author's organization, address,
686 or contact in a reStructuredText "Authors" field.
688 See docinfo_ for a more complete example, including processing
689 context.
692 ``block_quote``
693 ===============
695 The ``block_quote`` element is used for quotations set off from the
696 main text (standalone).
699 Details
700 -------
702 :Category:
703     `Compound Body Elements`_
705 :Parents:
706     All elements employing the `%body.elements;`_ or
707     `%structure.model;`_ parameter entities in their content models
708     may contain ``block_quote``.
710 :Children:
711     ``block_quote`` elements contain `body elements`_ followed by an
712     optional attribution_ element.
714 :Analogues:
715     ``block_quote`` is analogous to the "blockquote" element in both
716     HTML and DocBook.
718 :Processing:
719     ``block_quote`` elements serve to set their contents off from the
720     main text, typically with indentation and/or other decoration.
723 Content Model
724 -------------
726 .. parsed-literal::
728    ((`%body.elements;`_)+, attribution_?)
730 :Attributes:
731     The ``block_quote`` element contains only the `common
732     attributes`_: ids_, names_, dupnames_, source_, and classes_.
734 :Parameter Entities:
735     The `%body.elements;`_ parameter entity directly includes
736     ``block_quote``.  The `%structure.model;`_ parameter entity
737     indirectly includes ``block_quote``.
740 Examples
741 --------
743 reStructuredText source::
745     As a great paleontologist once said,
747         This theory, that is mine, is mine.
749         -- Anne Elk (Miss)
751 Pseudo-XML_ fragment from simple parsing::
753     <paragraph>
754         As a great paleontologist once said,
755     <block_quote>
756         <paragraph>
757             This theory, that is mine, is mine.
758         <attribution>
759             Anne Elk (Miss)
762 ``bullet_list``
763 ===============
765 The ``bullet_list`` element contains list_item_ elements which are
766 uniformly marked with bullets.  Bullets are typically simple dingbats
767 (symbols) such as circles and squares.
770 Details
771 -------
773 :Category:
774     `Compound Body Elements`_
776 :Parents:
777     All elements employing the `%body.elements;`_ or
778     `%structure.model;`_ parameter entities in their content models
779     may contain ``bullet_list``.
781 :Children:
782     ``bullet_list`` elements contain one or more list_item_ elements.
784 :Analogues:
785     ``bullet_list`` is analogous to the HTML "ul" element and to the
786     DocBook "itemizedlist" element.  HTML's "ul" is short for
787     "unordered list", which we consider to be a misnomer.  "Unordered"
788     implies that the list items may be randomly rearranged without
789     affecting the meaning of the list.  Bullet lists *are* often
790     ordered; the ordering is simply left implicit.
792 :Processing:
793     Each list item should begin a new vertical block, prefaced by a
794     bullet/dingbat.
797 Content Model
798 -------------
800 .. parsed-literal::
802     (list_item_ +)
804 :Attributes:
805     The ``bullet_list`` element contains the `common attributes`_
806     (ids_, names_, dupnames_, source_, and classes_), plus bullet_.
808     ``bullet`` is used to record the style of bullet from the input
809     data.  In documents processed from reStructuredText_, it contains
810     one of "-", "+", or "*".  It may be ignored in processing.
812 :Parameter Entities:
813     The `%body.elements;`_ parameter entity directly includes
814     ``bullet_list``.  The `%structure.model;`_ parameter entity
815     indirectly includes ``bullet_list``.
818 Examples
819 --------
821 reStructuredText_ source::
823     - Item 1, paragraph 1.
825       Item 1, paragraph 2.
827     - Item 2.
829 Pseudo-XML_ fragment from simple parsing::
831     <bullet_list bullet="-">
832         <list_item>
833             <paragraph>
834                 Item 1, paragraph 1.
835             <paragraph>
836                 Item 1, paragraph 2.
837         <list_item>
838             <paragraph>
839                 Item 2.
841 See list_item_ for another example.
844 ``caption``
845 ===========
847 `To be completed`_.
850 ``caution``
851 ===========
853 The ``caution`` element is an admonition, a distinctive and
854 self-contained notice.  Also see the other admonition elements
855 Docutils offers (in alphabetical order): attention_, danger_, error_,
856 hint_, important_, note_, tip_, warning_, and the generic admonition_.
859 Details
860 -------
862 :Category:
863     `Compound Body Elements`_
865 :Parents:
866     All elements employing the `%body.elements;`_ or
867     `%structure.model;`_ parameter entities in their content models
868     may contain ``caution``.
870 :Children:
871     ``caution`` elements contain one or more `body elements`_.
873 :Analogues:
874     ``caution`` is analogous to the DocBook "caution" element.
876 :Processing:
877     Rendered distinctly (inset and/or in a box, etc.), with the
878     generated title "Caution" (or similar).
881 Content Model
882 -------------
884 .. parsed-literal::
886    (`%body.elements;`_)+
888 :Attributes:
889     The ``caution`` element contains only the `common attributes`_:
890     ids_, names_, dupnames_, source_, and classes_.
892 :Parameter Entities:
893     The `%body.elements;`_ parameter entity directly includes
894     ``caution``.  The `%structure.model;`_ parameter entity
895     indirectly includes ``caution``.
898 Examples
899 --------
901 reStructuredText source::
903     .. Caution:: Don't take any wooden nickels.
905 Pseudo-XML_ fragment from simple parsing::
907     <caution>
908         <paragraph>
909             Don't take any wooden nickels.
912 ``citation``
913 ============
915 `To be completed`_.
918 ``citation_reference``
919 ======================
921 `To be completed`_.
924 ``classifier``
925 ==============
927 The ``classifier`` element contains the classification or type of the
928 term_ being defined in a definition_list_.  For example, it can be
929 used to indicate the type of a variable.
932 Details
933 -------
935 :Category:
936     `Body Subelements`_ (simple)
938 :Parents:
939     Only the definition_list_item_ element contains ``classifier``.
941 :Children:
942     ``classifier`` elements may contain text data plus `inline elements`_.
944 :Analogues:
945     ``classifier`` has no direct analogues in common DTDs.  It can be
946     emulated with primitives or type effects.
948 :Processing:
949     See definition_list_item_.
952 Content Model
953 -------------
955 .. parsed-literal::
957     `%text.model;`_
959 :Attributes:
960     The ``classifier`` element contains only the `common attributes`_:
961     ids_, names_, dupnames_, source_, and classes_.
964 Examples
965 --------
967 Here is a hypothetical data dictionary.  reStructuredText_ source::
969     name : string
970         Customer name.
971     i : int
972         Temporary index variable.
974 Pseudo-XML_ fragment from simple parsing::
976     <definition_list>
977         <definition_list_item>
978             <term>
979                 name
980             <classifier>
981                 string
982             <definition>
983                 <paragraph>
984                     Customer name.
985         <definition_list_item>
986             <term>
987                 i
988             <classifier>
989                 int
990             <definition>
991                 <paragraph>
992                     Temporary index variable.
995 ``colspec``
996 ===========
998 `To be completed`_.
1001 ``comment``
1002 ===========
1004 `To be completed`_.
1007 ``compound``
1008 ============
1010 `To be completed`_.
1013 ``contact``
1014 ===========
1016 The ``contact`` element holds contact information for the author
1017 (individual or group) of the document, or a third-party contact.  It
1018 is typically used for an email or web address.
1021 Details
1022 -------
1024 :Category:
1025     `Bibliographic Elements`_
1027 :Parents:
1028     The following elements may contain ``contact``: docinfo_, authors_
1030 :Children:
1031     ``contact`` elements may contain text data plus `inline
1032     elements`_.
1034 :Analogues:
1035     ``contact`` is analogous to the DocBook "email" element.  The HTML
1036     "address" element serves a similar purpose.
1038 :Processing:
1039     See docinfo_.
1042 Content Model
1043 -------------
1045 .. parsed-literal::
1047     `%text.model;`_
1049 :Attributes:
1050     The ``contact`` element contains only the `common attributes`_:
1051     ids_, names_, dupnames_, source_, and classes_.
1053 :Parameter Entities:
1054     The `%bibliographic.elements;`_ parameter entity directly includes
1055     ``contact``.
1058 Examples
1059 --------
1061 reStructuredText_ source::
1063     Document Title
1064     ==============
1066     :Contact: jrh@example.com
1068 Complete pseudo-XML_ result after parsing and applying transforms::
1070     <document ids="document-title" names="document title">
1071         <title>
1072             Document Title
1073         <docinfo>
1074             <contact>
1075                 <reference refuri="mailto:jrh@example.com">
1076                     jrh@example.com
1078 See docinfo_ for a more complete example, including processing
1079 context.
1082 ``container``
1083 =============
1085 `To be completed`_.
1088 ``copyright``
1089 =============
1091 The ``copyright`` element contains the document's copyright statement.
1094 Details
1095 -------
1097 :Category:
1098     `Bibliographic Elements`_
1100 :Parents:
1101     Only the docinfo_ element contains ``copyright``.
1103 :Children:
1104     ``copyright`` elements may contain text data plus `inline
1105     elements`_.
1107 :Analogues:
1108     ``copyright`` is analogous to the DocBook "copyright" element.
1110 :Processing:
1111     See docinfo_.
1114 Content Model
1115 -------------
1117 .. parsed-literal::
1119     `%text.model;`_
1121 :Attributes:
1122     The ``copyright`` element contains only the `common attributes`_:
1123     ids_, names_, dupnames_, source_, and classes_.
1125 :Parameter Entities:
1126     The `%bibliographic.elements;`_ parameter entity directly includes
1127     ``copyright``.
1130 Examples
1131 --------
1133 reStructuredText_ source::
1135     Document Title
1136     ==============
1138     :Copyright: This document has been placed in the public domain.
1140 Complete pseudo-XML_ result after parsing and applying transforms::
1142     <document ids="document-title" names="document title">
1143         <title>
1144             Document Title
1145         <docinfo>
1146             <copyright>
1147                 This document has been placed in the public domain.
1149 See docinfo_ for a more complete example, including processing
1150 context.
1153 ``danger``
1154 ==========
1156 The ``danger`` element is an admonition, a distinctive and
1157 self-contained notice.  Also see the other admonition elements
1158 Docutils offers (in alphabetical order): attention_, caution_, error_,
1159 hint_, important_, note_, tip_, warning_, and the generic admonition_.
1162 Details
1163 -------
1165 :Category:
1166     `Compound Body Elements`_
1168 :Parents:
1169     All elements employing the `%body.elements;`_ or
1170     `%structure.model;`_ parameter entities in their content models
1171     may contain ``danger``.
1173 :Children:
1174     ``danger`` elements contain one or more `body elements`_.
1176 :Analogues:
1177     ``danger`` has no direct analogues in common DTDs.  It can be
1178     emulated with primitives and type effects.
1180 :Processing:
1181     Rendered distinctly (inset and/or in a box, etc.), with the
1182     generated title "!DANGER!" (or similar).
1185 Content Model
1186 -------------
1188 .. parsed-literal::
1190    (`%body.elements;`_)+
1192 :Attributes:
1193     The ``danger`` element contains only the `common attributes`_:
1194     ids_, names_, dupnames_, source_, and classes_.
1196 :Parameter Entities:
1197     The `%body.elements;`_ parameter entity directly includes
1198     ``danger``.  The `%structure.model;`_ parameter entity
1199     indirectly includes ``danger``.
1202 Examples
1203 --------
1205 reStructuredText source::
1207     .. DANGER:: Mad scientist at work!
1209 Pseudo-XML_ fragment from simple parsing::
1211     <danger>
1212         <paragraph>
1213             Mad scientist at work!
1216 ``date``
1217 ========
1219 The ``date`` element contains the date of publication, release, or
1220 last modification of the document.
1223 Details
1224 -------
1226 :Category:
1227     `Bibliographic Elements`_
1229 :Parents:
1230     Only the docinfo_ element contains ``date``.
1232 :Children:
1233     ``date`` elements may contain text data plus `inline elements`_.
1235 :Analogues:
1236     ``date`` is analogous to the DocBook "date" element.
1238 :Processing:
1239     Often used with the RCS/CVS keyword "Date".  See docinfo_.
1242 Content Model
1243 -------------
1245 .. parsed-literal::
1247     `%text.model;`_
1249 :Attributes:
1250     The ``date`` element contains only the `common attributes`_:
1251     ids_, names_, dupnames_, source_, and classes_.
1253 :Parameter Entities:
1254     The `%bibliographic.elements;`_ parameter entity directly includes
1255     ``date``.
1258 Examples
1259 --------
1261 reStructuredText_ source::
1263     Document Title
1264     ==============
1266     :Date: 2002-08-20
1268 Complete pseudo-XML_ result after parsing and applying transforms::
1270     <document ids="document-title" names="document title">
1271         <title>
1272             Document Title
1273         <docinfo>
1274             <date>
1275                 2002-08-20
1277 See docinfo_ for a more complete example, including processing
1278 context.
1281 ``decoration``
1282 ==============
1284 The ``decoration`` element is a container for header_ and footer_
1285 elements and potential future extensions.  These elements are used for
1286 notes, time/datestamp, processing information, etc.
1289 Details
1290 -------
1292 :Category:
1293     `Structural Subelements`_
1295 :Parents:
1296     Only the document_ element contains ``decoration``.
1298 :Children:
1299     ``decoration`` elements may contain `decorative elements`_.
1301 :Analogues:
1302     There are no direct analogies to ``decoration`` in HTML or in
1303     DocBook.  Equivalents are typically constructed from primitives
1304     and/or generated by the processing system.
1306 :Processing:
1307     See the individual `decorative elements`_.
1310 Content Model
1311 -------------
1313 .. parsed-literal::
1315     (header_?, footer_?)
1317 Although the content model doesn't specifically require contents, no
1318 empty ``decoration`` elements are ever created.
1320 :Attributes:
1321     The ``decoration`` element contains only the `common attributes`_:
1322     ids_, names_, dupnames_, source_, and classes_.
1325 Examples
1326 --------
1328 reStructuredText_ source::
1330     A paragraph.
1332 Complete pseudo-XML_ result after parsing and applying transforms,
1333 assuming that the datestamp command-line option or configuration
1334 setting has been supplied::
1336     <document>
1337         <decoration>
1338             <footer>
1339                 <paragraph>
1340                     Generated on: 2002-08-20.
1341         <paragraph>
1342             A paragraph.
1345 ``definition``
1346 ==============
1348 The ``definition`` element is a container for the body elements used
1349 to define a term_ in a definition_list_.
1352 Details
1353 -------
1355 :Category:
1356     `Body Subelements`_ (compound)
1358 :Parents:
1359     Only definition_list_item_ elements contain ``definition``.
1361 :Children:
1362     ``definition`` elements may contain `body elements`_.
1364 :Analogues:
1365     ``definition`` is analogous to the HTML "dd" element and to the
1366     DocBook "listitem" element (inside a "variablelistentry" element).
1368 :Processing:
1369     See definition_list_item_.
1372 Content Model
1373 -------------
1375 .. parsed-literal::
1377     (`%body.elements;`_)+
1379 :Attributes:
1380     The ``definition`` element contains only the `common attributes`_:
1381     ids_, names_, dupnames_, source_, and classes_.
1384 Examples
1385 --------
1387 See the examples for the definition_list_, definition_list_item_, and
1388 classifier_ elements.
1391 ``definition_list``
1392 ===================
1394 The ``definition_list`` element contains a list of terms and their
1395 definitions.  It can be used for glossaries or dictionaries, to
1396 describe or classify things, for dialogues, or to itemize subtopics
1397 (such as in this reference).
1400 Details
1401 -------
1403 :Category:
1404     `Compound Body Elements`_
1406 :Parents:
1407     All elements employing the `%body.elements;`_ or
1408     `%structure.model;`_ parameter entities in their content models
1409     may contain ``definition_list``.
1411 :Children:
1412     ``definition_list`` elements contain one or more
1413     definition_list_item_ elements.
1415 :Analogues:
1416     ``definition_list`` is analogous to the HTML "dl" element and to
1417     the DocBook "variablelist" element.
1419 :Processing:
1420     See definition_list_item_.
1423 Content Model
1424 -------------
1426 .. parsed-literal::
1428     (definition_list_item_ +)
1430 :Attributes:
1431     The ``definition_list`` element contains only the `common
1432     attributes`_: ids_, names_, dupnames_, source_, and classes_.
1434 :Parameter Entities:
1435     The `%body.elements;`_ parameter entity directly includes
1436     ``definition_list``.  The `%structure.model;`_ parameter entity
1437     indirectly includes ``definition_list``.
1440 Examples
1441 --------
1443 reStructuredText_ source::
1445     Term
1446       Definition.
1448     Term : classifier
1449         The ' : ' indicates a classifier in
1450         definition list item terms only.
1452 Pseudo-XML_ fragment from simple parsing::
1454     <definition_list>
1455         <definition_list_item>
1456             <term>
1457                 Term
1458             <definition>
1459                 <paragraph>
1460                     Definition.
1461         <definition_list_item>
1462             <term>
1463                 Term
1464             <classifier>
1465                 classifier
1466             <definition>
1467                 <paragraph>
1468                     The ' : ' indicates a classifier in
1469                     definition list item terms only.
1471 See definition_list_item_ and classifier_ for further examples.
1474 ``definition_list_item``
1475 ========================
1477 The ``definition_list_item`` element contains a single
1478 term_/definition_ pair (with optional classifier_).
1481 Details
1482 -------
1484 :Category:
1485     `Body Subelements`_ (compound)
1487 :Parents:
1488     Only the definition_list_ element contains
1489     ``definition_list_item``.
1491 :Children:
1492     ``definition_list_item`` elements each contain a single term_,
1493     an optional classifier_, and a definition_.
1495 :Analogues:
1496     ``definition_list_item`` is analogous to the DocBook
1497     "variablelistentry" element.
1499 :Processing:
1500     The optional classifier_ can be rendered differently from the
1501     term_.  They should be separated visually, typically by spaces
1502     plus a colon or dash.
1505 Content Model
1506 -------------
1508 .. parsed-literal::
1510     (term_, classifier_?, definition_)
1512 :Attributes:
1513     The ``definition_list_item`` element contains only the `common
1514     attributes`_: ids_, names_, dupnames_, source_, and classes_.
1517 Examples
1518 --------
1520 reStructuredText_ source::
1522     Tyrannosaurus Rex : carnivore
1523         Big and scary; the "Tyrant King".
1525     Brontosaurus : herbivore
1526         All brontosauruses are thin at one end,
1527         much much thicker in the middle
1528         and then thin again at the far end.
1530         -- Anne Elk (Miss)
1532 Pseudo-XML_ fragment from simple parsing::
1534     <definition_list>
1535         <definition_list_item>
1536             <term>
1537                 Tyrannosaurus Rex
1538             <classifier>
1539                 carnivore
1540             <definition>
1541                 <paragraph>
1542                     Big and scary; the "Tyrant King".
1543         <definition_list_item>
1544             <term>
1545                 Brontosaurus
1546             <classifier>
1547                 herbivore
1548             <definition>
1549                 <paragraph>
1550                     All brontosauruses are thin at one end,
1551                     much much thicker in the middle
1552                     and then thin again at the far end.
1553                 <paragraph>
1554                     -- Anne Elk (Miss)
1556 See definition_list_ and classifier_ for further examples.
1559 ``description``
1560 ===============
1562 The ``description`` element contains body elements, describing the
1563 purpose or effect of a command-line option or group of options.
1566 Details
1567 -------
1569 :Category:
1570     `Body Subelements`_
1572 :Parents:
1573     Only the option_list_item_ element contains ``description``.
1575 :Children:
1576     ``description`` elements may contain `body elements`_.
1578 :Analogues:
1579     ``description`` has no direct analogues in common DTDs.
1581 :Processing:
1582     See option_list_.
1585 Content Model
1586 -------------
1588 .. parsed-literal::
1590    (`%body.elements;`_)+
1592 :Attributes:
1593     The ``description`` element contains only the `common attributes`_:
1594     ids_, names_, dupnames_, source_, and classes_.
1597 Examples
1598 --------
1600 See the examples for the option_list_ element.
1603 ``docinfo``
1604 ===========
1606 The ``docinfo`` element is a container for document bibliographic
1607 data, or meta-data (data about the document).  It corresponds to the
1608 front matter of a book, such as the title page and copyright page.
1611 Details
1612 -------
1614 :Category:
1615     `Structural Subelements`_
1617 :Parents:
1618     Only the document_ element contains ``docinfo``.
1620 :Children:
1621     ``docinfo`` elements contain `bibliographic elements`_.
1623 :Analogues:
1624     ``docinfo`` is analogous to DocBook "info" elements ("bookinfo"
1625     etc.).  There are no directly analogous HTML elements; the "meta"
1626     element carries some of the same information, albeit invisibly.
1628 :Processing:
1629     The ``docinfo`` element may be rendered as a two-column table or
1630     in other styles.  It may even be invisible or omitted from the
1631     processed output.  Meta-data may be extracted from ``docinfo``
1632     children; for example, HTML ``<meta>`` tags may be constructed.
1634     When Docutils_ transforms a reStructuredText_ field_list_ into a
1635     ``docinfo`` element (see the examples below), RCS/CVS keywords are
1636     normally stripped from simple (one paragraph) field bodies.  For
1637     complete details, please see `RCS Keywords`_ in the
1638     `reStructuredText Markup Specification`_.
1640     .. _RCS Keywords: rst/restructuredtext.html#rcs-keywords
1643 Content Model
1644 -------------
1646 .. parsed-literal::
1648     (`%bibliographic.elements;`_)+
1650 :Attributes:
1651     The ``docinfo`` element contains only the `common attributes`_:
1652     ids_, names_, dupnames_, source_, and classes_.
1655 Examples
1656 --------
1658 Docinfo is represented in reStructuredText_ by a field_list_ in a
1659 bibliographic context: the first non-comment element of a document_,
1660 after any document title_/subtitle_.  The field list is transformed
1661 into a ``docinfo`` element and its children by a transform.  Source::
1663     Docinfo Example
1664     ===============
1666     :Author: J. Random Hacker
1667     :Contact: jrh@example.com
1668     :Date: 2002-08-18
1669     :Status: Work In Progress
1670     :Version: 1
1671     :Filename: $RCSfile$
1672     :Copyright: This document has been placed in the public domain.
1674 Complete pseudo-XML_ result after parsing and applying transforms::
1676     <document ids="docinfo-example" names="docinfo example">
1677         <title>
1678             Docinfo Example
1679         <docinfo>
1680             <author>
1681                 J. Random Hacker
1682             <contact>
1683                 <reference refuri="mailto:jrh@example.com">
1684                     jrh@example.com
1685             <date>
1686                 2002-08-18
1687             <status>
1688                 Work In Progress
1689             <version>
1690                 1
1691             <field>
1692                 <field_name>
1693                     Filename
1694                 <field_body>
1695                     <paragraph>
1696                         doctree.txt
1697             <copyright>
1698                 This document has been placed in the public domain.
1700 Note that "Filename" is a non-standard ``docinfo`` field, so becomes a
1701 generic ``field`` element.  Also note that the "RCSfile" keyword
1702 syntax has been stripped from the "Filename" data.
1704 See field_list_ for an example in a non-bibliographic context.  Also
1705 see the individual examples for the various `bibliographic elements`_.
1708 ``doctest_block``
1709 =================
1711 The ``doctest_block`` element is a Python-specific variant of
1712 literal_block_.  It is a block of text where line breaks and
1713 whitespace are significant and must be preserved.  ``doctest_block``
1714 elements are used for interactive Python interpreter sessions, which
1715 are distinguished by their input prompt: ``>>>``.  They are meant to
1716 illustrate usage by example, and provide an elegant and powerful
1717 testing environment via the `doctest module`_ in the Python standard
1718 library.
1720 .. _doctest module:
1721    http://www.python.org/doc/current/lib/module-doctest.html
1724 Details
1725 -------
1727 :Category:
1728     `Simple Body Elements`_
1730 :Parents:
1731     All elements employing the `%body.elements;`_ or
1732     `%structure.model;`_ parameter entities in their content models
1733     may contain ``doctest_block``.
1735 :Children:
1736     ``doctest_block`` elements may contain text data plus `inline
1737     elements`_.
1739 :Analogues:
1740     ``doctest_block`` is analogous to the HTML "pre" element and to
1741     the DocBook "programlisting" and "screen" elements.
1743 :Processing:
1744     As with literal_block_, ``doctest_block`` elements are typically
1745     rendered in a monospaced typeface.  It is crucial that all
1746     whitespace and line breaks are preserved in the rendered form.
1749 Content Model
1750 -------------
1752 .. parsed-literal::
1754    `%text.model;`_
1756 :Attributes:
1757     The ``doctest_block`` element contains the `common attributes`_
1758     (ids_, names_, dupnames_, source_, and classes_), plus `xml:space`_.
1760 :Parameter Entities:
1761     The `%body.elements;`_ parameter entity directly includes
1762     ``doctest_block``.  The `%structure.model;`_ parameter entity
1763     indirectly includes ``doctest_block``.
1766 Examples
1767 --------
1769 reStructuredText source::
1771     This is an ordinary paragraph.
1773     >>> print 'this is a Doctest block'
1774     this is a Doctest block
1776 Pseudo-XML_ fragment from simple parsing::
1778     <paragraph>
1779         This is an ordinary paragraph.
1780     <doctest_block xml:space="preserve">
1781         >>> print 'this is a Doctest block'
1782         this is a Doctest block
1785 ``document``
1786 ============
1788 The ``document`` element is the root (topmost) element of the Docutils
1789 document tree.  ``document`` is the direct or indirect ancestor of
1790 every other element in the tree.  It encloses the entire document
1791 tree.  It is the starting point for a document.
1794 Details
1795 -------
1797 :Category:
1798     `Structural Elements`_
1800 :Parents:
1801     The ``document`` element has no parents.
1803 :Children:
1804     ``document`` elements may contain `structural subelements`_,
1805     `structural elements`_, and `body elements`_.
1807 :Analogues:
1808     ``document`` is analogous to the HTML "html" element and to
1809     several DocBook elements such as "book".
1812 Content Model
1813 -------------
1815 .. parsed-literal::
1817     ( (title_, subtitle_?)?,
1818       decoration_?,
1819       (docinfo_, transition_?)?,
1820       `%structure.model;`_ )
1822 Depending on the source of the data and the stage of processing, the
1823 "document" may not initially contain a "title".  A document title is
1824 not directly representable in reStructuredText_.  Instead, a lone
1825 top-level section may have its title promoted to become the document
1826 title_, and similarly for a lone second-level (sub)section's title to
1827 become the document subtitle_.
1829 The contents of "decoration_" may be specified in a document,
1830 constructed programmatically, or both.  The "docinfo_" may be
1831 transformed from an initial field_list_.
1833 See the `%structure.model;`_ parameter entity for details of the body
1834 of a ``document``.
1836 :Attributes:
1837     The ``document`` element contains the `common attributes`_ (ids_,
1838     names_, dupnames_, source_, and classes_), plus an optional title__
1839     attribute which stores the document title metadata.
1841     __ `title (attribute)`_
1844 Examples
1845 --------
1847 reStructuredText_ source::
1849     A Title
1850     =======
1852     A paragraph.
1854 Complete pseudo-XML_ result from simple parsing::
1856     <document>
1857         <section ids="a-title" names="a title">
1858             <title>
1859                 A Title
1860             <paragraph>
1861                 A paragraph.
1863 After applying transforms, the section title is promoted to become the
1864 document title::
1866     <document ids="a-title" names="a title">
1867         <title>
1868             A Title
1869         <paragraph>
1870             A paragraph.
1873 ``emphasis``
1874 ============
1876 `To be completed`_.
1879 ``entry``
1880 =========
1882 `To be completed`_.
1885 ``enumerated_list``
1886 ===================
1888 The ``enumerated_list`` element contains list_item_ elements which are
1889 uniformly marked with enumerator labels.
1892 Details
1893 -------
1895 :Category:
1896     `Compound Body Elements`_
1898 :Parents:
1899     All elements employing the `%body.elements;`_ or
1900     `%structure.model;`_ parameter entities in their content models
1901     may contain ``enumerated_list``.
1903 :Children:
1904     ``enumerated_list`` elements contain one or more list_item_
1905     elements.
1907 :Analogues:
1908     ``enumerated_list`` is analogous to the HTML "ol" element and to
1909     the DocBook "orderedlist" element.
1911 :Processing:
1912     Each list item should begin a new vertical block, prefaced by a
1913     enumeration marker (such as "1.").
1916 Content Model
1917 -------------
1919 .. parsed-literal::
1921     (list_item_ +)
1923 :Attributes:
1924     The ``enumerated_list`` element contains the `common attributes`_
1925     (ids_, names_, dupnames_, source_, and classes_), plus enumtype_,
1926     prefix_, suffix_, and start_.
1928     ``enumtype`` is used to record the intended enumeration sequence,
1929     one of "arabic" (1, 2, 3, ...), "loweralpha" (a, b, c, ..., z),
1930     "upperalpha" (A, B, C, ..., Z), "lowerroman" (i, ii, iii, iv, ...,
1931     mmmmcmxcix [4999]), or "upperroman" (I, II, III, IV, ...,
1932     MMMMCMXCIX [4999]).
1934     ``prefix`` stores the formatting characters used before the
1935     enumerator.  In documents originating from reStructuredText_ data,
1936     it will contain either "" (empty string) or "(" (left
1937     parenthesis).  It may or may not affect processing.
1939     ``suffix`` stores the formatting characters used after the
1940     enumerator.  In documents originating from reStructuredText_ data,
1941     it will contain either "." (period) or ")" (right parenthesis).
1942     Depending on the capabilities of the output format, this attribute
1943     may or may not affect processing.
1945     ``start`` contains the ordinal value of the first item in the
1946     list, in decimal.  For lists beginning at value 1 ("1", "a", "A",
1947     "i", or "I"), this attribute may be omitted.
1949 :Parameter Entities:
1950     The `%body.elements;`_ parameter entity directly includes
1951     ``enumerated_list``.  The `%structure.model;`_ parameter entity
1952     indirectly includes ``enumerated_list``.
1955 Examples
1956 --------
1958 reStructuredText_ source::
1960     1. Item 1.
1962        (A) Item A.
1963        (B) Item B.
1964        (C) Item C.
1966     2. Item 2.
1968 Pseudo-XML_ fragment from simple parsing::
1970     <enumerated_list enumtype="arabic" prefix="" suffix=".">
1971         <list_item>
1972             <paragraph>
1973                 Item 1.
1974             <enumerated_list enumtype="upperalpha" prefix="(" suffix=")">
1975                 <list_item>
1976                     <paragraph>
1977                         Item A.
1978                 <list_item>
1979                     <paragraph>
1980                         Item B.
1981                 <list_item>
1982                     <paragraph>
1983                         Item C.
1984         <list_item>
1985             <paragraph>
1986                 Item 2.
1988 See list_item_ for another example.
1991 ``error``
1992 =========
1994 The ``error`` element is an admonition, a distinctive and
1995 self-contained notice.  Also see the other admonition elements
1996 Docutils offers (in alphabetical order): attention_, caution_,
1997 danger_, hint_, important_, note_, tip_, warning_, and the generic
1998 admonition_.
2001 Details
2002 -------
2004 :Category:
2005     `Compound Body Elements`_
2007 :Parents:
2008     All elements employing the `%body.elements;`_ or
2009     `%structure.model;`_ parameter entities in their content models
2010     may contain ``error``.
2012 :Children:
2013     ``error`` elements contain one or more `body elements`_.
2015 :Analogues:
2016     ``error`` has no direct analogues in common DTDs.  It can be
2017     emulated with primitives and type effects.
2019 :Processing:
2020     Rendered distinctly (inset and/or in a box, etc.), with the
2021     generated title "Error" (or similar).
2024 Content Model
2025 -------------
2027 .. parsed-literal::
2029    (`%body.elements;`_)+
2031 :Attributes:
2032     The ``error`` element contains only the `common attributes`_: ids_,
2033     names_, dupnames_, source_, and classes_.
2035 :Parameter Entities:
2036     The `%body.elements;`_ parameter entity directly includes
2037     ``error``.  The `%structure.model;`_ parameter entity indirectly
2038     includes ``error``.
2041 Examples
2042 --------
2044 reStructuredText source::
2046     .. Error:: Does not compute.
2048 Pseudo-XML_ fragment from simple parsing::
2050     <error>
2051         <paragraph>
2052             Does not compute.
2055 ``field``
2056 =========
2058 The ``field`` element contains a pair of field_name_ and field_body_
2059 elements.
2062 Details
2063 -------
2065 :Category:
2066     `Body Subelements`_
2068 :Parents:
2069     The following elements may contain ``field``: docinfo_,
2070     field_list_
2072 :Children:
2073     Each ``field`` element contains one field_name_ and one
2074     field_body_ element.
2076 :Analogues:
2077     ``field`` has no direct analogues in common DTDs.
2079 :Processing:
2080     See field_list_.
2083 Content Model
2084 -------------
2086 .. parsed-literal::
2088    (field_name_, field_body_)
2090 :Attributes:
2091     The ``field`` element contains only the `common attributes`_:
2092     ids_, names_, dupnames_, source_, and classes_.
2094 :Parameter Entities:
2095     The `%bibliographic.elements;`_ parameter entity directly includes
2096     ``field``.
2099 Examples
2100 --------
2102 See the examples for the field_list_ and docinfo_ elements.
2105 ``field_body``
2106 ==============
2108 The ``field_body`` element contains body elements.  It is analogous to
2109 a database field's data.
2112 Details
2113 -------
2115 :Category:
2116     `Body Subelements`_
2118 :Parents:
2119     Only the field_ element contains ``field_body``.
2121 :Children:
2122     ``field_body`` elements may contain `body elements`_.
2124 :Analogues:
2125     ``field_body`` has no direct analogues in common DTDs.
2127 :Processing:
2128     See field_list_.
2131 Content Model
2132 -------------
2134 .. parsed-literal::
2136    (`%body.elements;`_)*
2138 :Attributes:
2139     The ``field_body`` element contains only the `common attributes`_:
2140     ids_, names_, dupnames_, source_, and classes_.
2143 Examples
2144 --------
2146 See the examples for the field_list_ and docinfo_ elements.
2149 ``field_list``
2150 ==============
2152 The ``field_list`` element contains two-column table-like structures
2153 resembling database records (label & data pairs).  Field lists are
2154 often meant for further processing.  In reStructuredText_, field lists
2155 are used to represent bibliographic fields (contents of the docinfo_
2156 element) and directive options.
2159 Details
2160 -------
2162 :Category:
2163     `Compound Body Elements`_
2165 :Parents:
2166     All elements employing the `%body.elements;`_ or
2167     `%structure.model;`_ parameter entities in their content models
2168     may contain ``field_list``.
2170 :Children:
2171     ``field_list`` elements contain one or more field_ elements.
2173 :Analogues:
2174     ``field_list`` has no direct analogues in common DTDs.  It can be
2175     emulated with primitives such as tables.
2177 :Processing:
2178     A ``field_list`` is typically rendered as a two-column list, where
2179     the first column contains "labels" (usually with a colon suffix).
2180     However, field lists are often used for extension syntax or
2181     special processing.  Such structures do not survive as field lists
2182     to be rendered.
2185 Content Model
2186 -------------
2188 .. parsed-literal::
2190    (field_ +)
2192 :Attributes:
2193     The ``field_list`` element contains only the `common attributes`_:
2194     ids_, names_, dupnames_, source_, and classes_.
2196 :Parameter Entities:
2197     The `%body.elements;`_ parameter entity directly includes
2198     ``field_list``.  The `%structure.model;`_ parameter entity
2199     indirectly includes ``field_list``.
2202 Examples
2203 --------
2205 reStructuredText_ source::
2207     :Author: Me
2208     :Version: 1
2209     :Date: 2001-08-11
2210     :Parameter i: integer
2212 Pseudo-XML_ fragment from simple parsing::
2214     <field_list>
2215         <field>
2216             <field_name>
2217                 Author
2218             <field_body>
2219                 <paragraph>
2220                     Me
2221         <field>
2222             <field_name>
2223                 Version
2224             <field_body>
2225                 <paragraph>
2226                     1
2227         <field>
2228             <field_name>
2229                 Date
2230             <field_body>
2231                 <paragraph>
2232                     2001-08-11
2233         <field>
2234             <field_name>
2235                 Parameter i
2236             <field_body>
2237                 <paragraph>
2238                     integer
2241 ``field_name``
2242 ==============
2244 The ``field_name`` element contains text; it is analogous to a
2245 database field's name.
2248 Details
2249 -------
2251 :Category:
2252     `Body Subelements`_ (simple)
2254 :Parents:
2255     Only the field_ element contains ``field_name``.
2257 :Children:
2258     ``field_name`` elements may contain text data plus `inline elements`_.
2260 :Analogues:
2261     ``field_name`` has no direct analogues in common DTDs.
2263 :Processing:
2264     See field_list_.
2267 Content Model
2268 -------------
2270 .. parsed-literal::
2272     `%text.model;`_
2274 :Attributes:
2275     The ``field_name`` element contains only the `common attributes`_:
2276     ids_, names_, dupnames_, source_, and classes_.
2279 Examples
2280 --------
2282 See the examples for the field_list_ and docinfo_ elements.
2285 ``figure``
2286 ==========
2288 `To be completed`_.
2291 ``footer``
2292 ==========
2294 The ``footer`` element is a container element whose contents are meant
2295 to appear at the bottom of a web page, or repeated at the bottom of
2296 every printed page.  The ``footer`` element may contain processing
2297 information (datestamp, a link to Docutils_, etc.) as well as custom
2298 content.
2301 Details
2302 -------
2304 :Category:
2305     `Decorative Elements`_
2307 :Parents:
2308     Only the decoration_ element contains ``footer``.
2310 :Children:
2311     ``footer`` elements may contain `body elements`_.
2313 :Analogues:
2314     There are no direct analogies to ``footer`` in HTML or DocBook.
2315     Equivalents are typically constructed from primitives and/or
2316     generated by the processing system.
2319 Content Model
2320 -------------
2322 .. parsed-literal::
2324     (`%body.elements;`_)+
2326 :Attributes:
2327     The ``footer`` element contains only the `common attributes`_:
2328     ids_, names_, dupnames_, source_, and classes_.
2331 Examples
2332 --------
2334 reStructuredText_ source::
2336     A paragraph.
2338 Complete pseudo-XML_ result after parsing and applying transforms,
2339 assuming that the datestamp command-line option or configuration
2340 setting has been supplied::
2342     <document>
2343         <decoration>
2344             <footer>
2345                 <paragraph>
2346                     Generated on: 2002-08-20.
2347         <paragraph>
2348             A paragraph.
2351 ``footnote``
2352 ============
2354 `To be completed`_.
2357 ``footnote_reference``
2358 ======================
2360 `To be completed`_.
2363 ``generated``
2364 =============
2366 Docutils wraps ``generated`` elements around text that is inserted
2367 (generated) by Docutils; i.e., text that was not in the document, like
2368 section numbers inserted by the "sectnum" directive.
2370 `To be completed`_.
2373 ``header``
2374 ==========
2376 The ``header`` element is a container element whose contents are meant
2377 to appear at the top of a web page, or at the top of every printed
2378 page.
2381 Details
2382 -------
2384 :Category:
2385     `Decorative Elements`_
2387 :Parents:
2388     Only the decoration_ element contains ``header``.
2390 :Children:
2391     ``header`` elements may contain `body elements`_.
2393 :Analogues:
2394     There are no direct analogies to ``header`` in HTML or DocBook.
2395     Equivalents are typically constructed from primitives and/or
2396     generated by the processing system.
2399 Content Model
2400 -------------
2402 .. parsed-literal::
2404     (`%body.elements;`_)+
2406 :Attributes:
2407     The ``header`` element contains only the `common attributes`_:
2408     ids_, names_, dupnames_, source_, and classes_.
2411 Examples
2412 --------
2414 reStructuredText source fragment::
2416     .. header:: This space for rent.
2418 Pseudo-XML_ fragment from simple parsing::
2420     <document>
2421         <decoration>
2422             <header>
2423                 <paragraph>
2424                     This space for rent.
2427 ``hint``
2428 ========
2430 The ``hint`` element is an admonition, a distinctive and
2431 self-contained notice.  Also see the other admonition elements
2432 Docutils offers (in alphabetical order): attention_, caution_,
2433 danger_, error_, important_, note_, tip_, warning_, and the generic
2434 admonition_.
2437 Details
2438 -------
2440 :Category:
2441     `Compound Body Elements`_
2443 :Parents:
2444     All elements employing the `%body.elements;`_ or
2445     `%structure.model;`_ parameter entities in their content models
2446     may contain ``hint``.
2448 :Children:
2449     ``hint`` elements contain one or more `body elements`_.
2451 :Analogues:
2452     ``hint`` has no direct analogues in common DTDs.  It can be
2453     emulated with primitives and type effects.
2455 :Processing:
2456     Rendered distinctly (inset and/or in a box, etc.), with the
2457     generated title "Hint" (or similar).
2460 Content Model
2461 -------------
2463 .. parsed-literal::
2465    (`%body.elements;`_)+
2467 :Attributes:
2468     The ``hint`` element contains only the `common attributes`_: ids_,
2469     names_, dupnames_, source_, and classes_.
2471 :Parameter Entities:
2472     The `%body.elements;`_ parameter entity directly includes
2473     ``hint``.  The `%structure.model;`_ parameter entity indirectly
2474     includes ``hint``.
2477 Examples
2478 --------
2480 reStructuredText source::
2482     .. Hint:: It's bigger than a bread box.
2484 Pseudo-XML_ fragment from simple parsing::
2486     <hint>
2487         <paragraph>
2488             It's bigger than a bread box.
2491 ``image``
2492 =========
2494 `To be completed`_.
2497 ``important``
2498 =============
2500 The ``important`` element is an admonition, a distinctive and
2501 self-contained notice.  Also see the other admonition elements
2502 Docutils offers (in alphabetical order): attention_, caution_,
2503 danger_, error_, hint_, note_, tip_, warning_, and the generic
2504 admonition_.
2507 Details
2508 -------
2510 :Category:
2511     `Compound Body Elements`_
2513 :Parents:
2514     All elements employing the `%body.elements;`_ or
2515     `%structure.model;`_ parameter entities in their content models
2516     may contain ``important``.
2518 :Children:
2519     ``important`` elements contain one or more `body elements`_.
2521 :Analogues:
2522     ``important`` is analogous to the DocBook "important" element.
2524 :Processing:
2525     Rendered distinctly (inset and/or in a box, etc.), with the
2526     generated title "Important" (or similar).
2529 Content Model
2530 -------------
2532 .. parsed-literal::
2534    (`%body.elements;`_)+
2536 :Attributes:
2537     The ``important`` element contains only the `common attributes`_:
2538     ids_, names_, dupnames_, source_, and classes_.
2540 :Parameter Entities:
2541     The `%body.elements;`_ parameter entity directly includes
2542     ``important``.  The `%structure.model;`_ parameter entity
2543     indirectly includes ``important``.
2546 Examples
2547 --------
2549 reStructuredText source::
2551     .. Important::
2553        * Wash behind your ears.
2554        * Clean up your room.
2555        * Back up your data.
2556        * Call your mother.
2558 Pseudo-XML_ fragment from simple parsing::
2560     <important>
2561         <bullet_list>
2562             <list_item>
2563                 <paragraph>
2564                     Wash behind your ears.
2565             <list_item>
2566                 <paragraph>
2567                     Clean up your room.
2568             <list_item>
2569                 <paragraph>
2570                     Back up your data.
2571             <list_item>
2572                 <paragraph>
2573                     Call your mother.
2576 ``inline``
2577 ==========
2579 `To be completed`_.
2582 ``label``
2583 =========
2585 `To be completed`_.
2588 ``legend``
2589 ==========
2591 `To be completed`_.
2594 ``line``
2595 ========
2597 The ``line`` element contains a single line of text, part of a
2598 `line_block`_.
2601 Details
2602 -------
2604 :Category:
2605     `Body Subelements`_ (simple)
2607 :Parents:
2608     Only the `line_block`_ element contains ``line``.
2610 :Children:
2611     ``line`` elements may contain text data plus `inline elements`_.
2613 :Analogues:
2614     ``line`` has no direct analogues in common DTDs.  It can be
2615     emulated with primitives or type effects.
2617 :Processing:
2618     See `line_block`_.
2621 Content Model
2622 -------------
2624 .. parsed-literal::
2626    `%text.model;`_
2628 :Attributes:
2629     The ``line`` element contains the `common attributes`_ (ids_,
2630     names_, dupnames_, source_, and classes_), plus `xml:space`_.
2633 Examples
2634 --------
2636 See `line_block`_.
2639 ``line_block``
2640 ==============
2642 The ``line_block`` element contains a sequence of lines and nested
2643 line blocks.  Line breaks (implied between elements) and leading
2644 whitespace (indicated by nesting) is significant and must be
2645 preserved.  ``line_block`` elements are commonly used for verse and
2646 addresses.  See `literal_block`_ for an alternative useful for program
2647 listings and interactive computer sessions.
2650 Details
2651 -------
2653 :Category:
2654     `Compound Body Elements`_
2656 :Parents:
2657     All elements employing the `%body.elements;`_ or
2658     `%structure.model;`_ parameter entities in their content models
2659     may contain ``line_block``.
2661 :Children:
2662     ``line_block`` elements may contain line_ elements and nested
2663     ``line_block`` elements.
2665 :Analogues:
2666     ``line_block`` is analogous to the DocBook "literallayout" element
2667     and to the HTML "pre" element (with modifications to typeface
2668     styles).
2670 :Processing:
2671     Unlike ``literal_block``, ``line_block`` elements are typically
2672     rendered in an ordinary text typeface.  It is crucial that leading
2673     whitespace and line breaks are preserved in the rendered form.
2676 Content Model
2677 -------------
2679 .. parsed-literal::
2681    (line_ | line_block_)+
2683 :Attributes:
2684     The ``line_block`` element contains the `common attributes`_ (ids_,
2685     names_, dupnames_, source_, and classes_), plus `xml:space`_.
2687 :Parameter Entities:
2688     The `%body.elements;`_ parameter entity directly includes
2689     ``line_block``.  The `%structure.model;`_ parameter entity
2690     indirectly includes ``line_block``.
2693 Examples
2694 --------
2696 reStructuredText uses a directive to indicate a ``line_block``.
2697 Example source::
2699     Take it away, Eric the Orchestra Leader!
2701     | A one, two, a one two three four
2702     |
2703     | Half a bee, philosophically,
2704     |     must, *ipso facto*, half not be.
2705     | But half the bee has got to be,
2706     |     *vis a vis* its entity.  D'you see?
2707     |
2708     | But can a bee be said to be
2709     |     or not to be an entire bee,
2710     |         when half the bee is not a bee,
2711     |             due to some ancient injury?
2712     |
2713     | Singing...
2715 Pseudo-XML_ fragment from simple parsing::
2717     <paragraph>
2718         Take it away, Eric the Orchestra Leader!
2719     <line_block>
2720         <line>
2721             A one, two, a one two three four
2722         <line>
2723         <line>
2724             Half a bee, philosophically,
2725         <line_block>
2726             <line>
2727                 must,
2728                 <emphasis>
2729                     ipso facto
2730                 , half not be.
2731         <line>
2732             But half the bee has got to be,
2733         <line_block>
2734             <line>
2735                 <emphasis>
2736                     vis a vis
2737                  its entity.  D'you see?
2738             <line>
2739         <line>
2740             But can a bee be said to be
2741         <line_block>
2742             <line>
2743                 or not to be an entire bee,
2744             <line_block>
2745                 <line>
2746                     when half the bee is not a bee,
2747                 <line_block>
2748                     <line>
2749                         due to some ancient injury?
2750                     <line>
2751         <line>
2752             Singing...
2755 ``list_item``
2756 =============
2758 The ``list_item`` element is a container for the elements of a list
2759 item.
2762 Details
2763 -------
2765 :Category:
2766     `Body Subelements`_ (compound)
2768 :Parents:
2769     The bullet_list_ and enumerated_list_ elements contain
2770     ``list_item``.
2772 :Children:
2773     ``list_item`` elements may contain `body elements`_.
2775 :Analogues:
2776     ``list_item`` is analogous to the HTML "li" element and to the
2777     DocBook "listitem" element.
2779 :Processing:
2780     See bullet_list_ or enumerated_list_.
2783 Content Model
2784 -------------
2786 .. parsed-literal::
2788     (`%body.elements;`_)*
2790 :Attributes:
2791     The ``list_item`` element contains only the `common attributes`_:
2792     ids_, names_, dupnames_, source_, and classes_.
2795 Examples
2796 --------
2798 reStructuredText_ source::
2800     1. Outer list, item 1.
2802        * Inner list, item 1.
2803        * Inner list, item 2.
2805     2. Outer list, item 2.
2807 Pseudo-XML_ fragment from simple parsing::
2809     <enumerated_list enumtype="arabic" prefix="" suffix=".">
2810         <list_item>
2811             <paragraph>
2812                 Outer list, item 1.
2813             <bullet_list bullet="*">
2814                 <list_item>
2815                     <paragraph>
2816                         Inner list, item 1.
2817                 <list_item>
2818                     <paragraph>
2819                         Inner list, item 2.
2820         <list_item>
2821             <paragraph>
2822                 Outer list, item 2.
2824 See bullet_list_ or enumerated_list_ for further examples.
2827 ``literal``
2828 ===========
2830 `To be completed`_.
2833 ``literal_block``
2834 =================
2836 The ``literal_block`` element contains a block of text where line
2837 breaks and whitespace are significant and must be preserved.
2838 ``literal_block`` elements are commonly used for program listings and
2839 interactive computer sessions.  See `line_block`_ for an alternative
2840 useful for verse and addresses.
2843 Details
2844 -------
2846 :Category:
2847     `Simple Body Elements`_
2849 :Parents:
2850     All elements employing the `%body.elements;`_ or
2851     `%structure.model;`_ parameter entities in their content models
2852     may contain ``literal_block``.
2854 :Children:
2855     ``literal_block`` elements may contain text data plus `inline
2856     elements`_.
2858 :Analogues:
2859     ``literal_block`` is analogous to the HTML "pre" element and to
2860     the DocBook "programlisting" and "screen" elements.
2862 :Processing:
2863     ``literal_block`` elements are typically rendered in a monospaced
2864     typeface.  It is crucial that all whitespace and line breaks are
2865     preserved in the rendered form.
2868 Content Model
2869 -------------
2871 .. parsed-literal::
2873    `%text.model;`_
2875 :Attributes:
2876     The ``literal_block`` element contains the `common attributes`_
2877     (ids_, names_, dupnames_, source_, and classes_), plus `xml:space`_.
2879 :Parameter Entities:
2880     The `%body.elements;`_ parameter entity directly includes
2881     ``literal_block``.  The `%structure.model;`_ parameter entity
2882     indirectly includes ``literal_block``.
2885 Examples
2886 --------
2888 reStructuredText source::
2890     Here is a literal block::
2892         if literal_block:
2893             text = 'is left as-is'
2894             spaces_and_linebreaks = 'are preserved'
2895             markup_processing = None
2897 Pseudo-XML_ fragment from simple parsing::
2899     <paragraph>
2900         Here is a literal block:
2901     <literal_block xml:space="preserve">
2902         if literal_block:
2903             text = 'is left as-is'
2904             spaces_and_linebreaks = 'are preserved'
2905             markup_processing = None
2907 ``math``
2908 ========
2910 The ``math`` element contains text in `LaTeX math format` [#latex-math]_
2911 that is typeset as mathematical notation (inline formula).
2913 If the output format does not support math typesetting, the content is
2914 inserted verbatim.
2916 Details
2917 -------
2919 :Category:
2920     `Inline Elements`_
2922 :Parents:
2923     All elements employing the `%inline.elements;`_ parameter entities in
2924     their content models may contain ``math``.
2926 :Children:
2927     ``math`` elements may contain text data.
2929 :Analogues:
2930     ``math`` is analogous to a MathML "math" element or
2931     the LaTeX (``$ math $``) mode.
2933 :Processing:
2934     Rendered as mathematical notation.
2936 Content Model
2937 -------------
2939 .. parsed-literal::
2941     `%text.model;`_
2943 :Attributes:
2944     The ``math`` element contains the `common attributes`_
2945     (ids_, names_, dupnames_, source_, and classes_).
2947 .. [#latex-math] For details of the supported mathematical language, see
2948    the `"math" directive`_
2950 .. _"math" directive: rst/directives.html#math
2953 ``math_block``
2954 ==============
2956 The ``math_block`` element contains a block of text in `LaTeX math
2957 format` [#latex-math]_ that is typeset as mathematical notation
2958 (display formula). The ``math_block`` element is generated during
2959 the initial parse from a "math" directive.
2961 If the output format does not support math typesetting, the content is
2962 inserted verbatim.
2964 Details
2965 -------
2967 :Category:
2968     `Simple Body Elements`_
2970 :Parents:
2971     All elements employing the `%body.elements;`_ or
2972     `%structure.model;`_ parameter entities in their content models
2973     may contain ``math_block``.
2975 :Children:
2976     ``math_block`` elements may contain text data.
2978 :Analogues:
2979     ``math_block`` is analogous to a LaTeX "equation*" environment or
2980     a MathML "math" element displayed as block-level element.
2982 :Processing:
2983     Rendered in a block as mathematical notation, typically centered or with
2984     indentation
2986 Content Model
2987 -------------
2989 .. parsed-literal::
2991     (#PCDATA)
2993 :Attributes:
2994     The ``math`` element contains the `common attributes`_
2995     (ids_, names_, dupnames_, source_, and classes_).
2998 ``note``
2999 ========
3001 The ``note`` element is an admonition, a distinctive and
3002 self-contained notice.  Also see the other admonition elements
3003 Docutils offers (in alphabetical order): attention_, caution_,
3004 danger_, error_, hint_, important_, tip_, warning_, and the generic
3005 admonition_.
3008 Details
3009 -------
3011 :Category:
3012     `Compound Body Elements`_
3014 :Parents:
3015     All elements employing the `%body.elements;`_ or
3016     `%structure.model;`_ parameter entities in their content models
3017     may contain ``note``.
3019 :Children:
3020     ``note`` elements contain one or more `body elements`_.
3022 :Analogues:
3023     ``note`` is analogous to the DocBook "note" element.
3025 :Processing:
3026     Rendered distinctly (inset and/or in a box, etc.), with the
3027     generated title "Note" (or similar).
3030 Content Model
3031 -------------
3033 .. parsed-literal::
3035    (`%body.elements;`_)+
3037 :Attributes:
3038     The ``note`` element contains only the `common attributes`_: ids_,
3039     names_, dupnames_, source_, and classes_.
3041 :Parameter Entities:
3042     The `%body.elements;`_ parameter entity directly includes
3043     ``note``.  The `%structure.model;`_ parameter entity indirectly
3044     includes ``note``.
3047 Examples
3048 --------
3050 reStructuredText source::
3052     .. Note:: Admonitions can be handy to break up a
3053        long boring technical document.
3055 Pseudo-XML_ fragment from simple parsing::
3057     <note>
3058         <paragraph>
3059             Admonitions can be handy to break up a
3060             long boring technical document.
3062 ``option``
3063 ==========
3065 The ``option`` element groups an option string together with zero or
3066 more option argument placeholders.  Note that reStructuredText_
3067 currently supports only one argument per option.
3070 Details
3071 -------
3073 :Category:
3074     `Body Subelements`_
3076 :Parents:
3077     Only the option_group_ element contains ``option``.
3079 :Children:
3080     Each ``option`` element contains one option_string_ and zero or
3081     more option_argument_ elements.
3083 :Analogues:
3084     ``option`` has no direct analogues in common DTDs.
3086 :Processing:
3087     See option_list_.
3090 Content Model
3091 -------------
3093 .. parsed-literal::
3095    (option_string_, option_argument_ \*)
3097 :Attributes:
3098     The ``option`` element contains only the `common attributes`_:
3099     ids_, names_, dupnames_, source_, and classes_.
3102 Examples
3103 --------
3105 See the examples for the option_list_ element.
3108 ``option_argument``
3109 ===================
3111 The ``option_argument`` element contains placeholder text for option
3112 arguments.
3115 Details
3116 -------
3118 :Category:
3119     `Body Subelements`_
3121 :Parents:
3122     Only the option_ element contains ``option_argument``.
3124 :Children:
3125     ``option_argument`` elements contain text data only.
3127 :Analogues:
3128     ``option_argument`` has no direct analogues in common DTDs.
3130 :Processing:
3131     The value of the "delimiter" attribute is prefixed to the
3132     ``option_argument``, separating it from its option_string_ or a
3133     preceding ``option_argument``.  The ``option_argument`` text is
3134     typically rendered in a monospaced typeface, possibly italicized
3135     or otherwise altered to indicate its placeholder nature.
3138 Content Model
3139 -------------
3141 .. parsed-literal::
3143    (#PCDATA)
3145 :Attributes:
3146     The ``option_argument`` element contains the `common attributes`_ (ids_,
3147     names_, dupnames_, source_, and classes_), plus delimiter_.
3149     ``delimiter`` contains the text preceding the ``option_argument``:
3150     either the text separating it from the option_string_ (typically
3151     either "=" or " ") or the text between option arguments (typically
3152     either "," or " ").
3155 Examples
3156 --------
3158 See the examples for the option_list_ element.
3161 ``option_group``
3162 ================
3164 The ``option_group`` element groups together one or more option_
3165 elements, all synonyms.
3168 Details
3169 -------
3171 :Category:
3172     `Body Subelements`_
3174 :Parents:
3175     Only the option_list_item_ element contains ``option_group``.
3177 :Children:
3178     ``option_group`` elements contain one or more option_ elements.
3180     ``option_group`` is an empty element and has no children.
3182     Each ``option_group`` element contains one _ and
3183     one _ element.
3185 :Analogues:
3186     ``option_group`` has no direct analogues in common DTDs.
3188 :Processing:
3189     Typically option_ elements within an ``option_group`` are joined
3190     together in a comma-separated list.
3193 Content Model
3194 -------------
3196 .. parsed-literal::
3198    (option_group_, description_)
3200 :Attributes:
3201     The ``option_group`` element contains only the `common attributes`_:
3202     ids_, names_, dupnames_, source_, and classes_.
3205 Examples
3206 --------
3208 See the examples for the option_list_ element.
3211 ``option_list``
3212 ===============
3214 Each ``option_list`` element contains a two-column list of
3215 command-line options and descriptions, documenting a program's
3216 options.
3219 Details
3220 -------
3222 :Category:
3223     `Compound Body Elements`_
3225 :Parents:
3226     All elements employing the `%body.elements;`_ or
3227     `%structure.model;`_ parameter entities in their content models
3228     may contain ``option_list``.
3230 :Children:
3231     ``option_list`` elements contain one or more option_list_item_
3232     elements.
3234 :Analogues:
3235     ``option_list`` has no direct analogues in common DTDs.  It can be
3236     emulated with primitives such as tables.
3238 :Processing:
3239     An ``option_list`` is typically rendered as a two-column list,
3240     where the first column contains option strings and arguments, and
3241     the second column contains descriptions.
3244 Content Model
3245 -------------
3247 .. parsed-literal::
3249    (option_list_item_ +)
3251 :Attributes:
3252     The ``option_list`` element contains only the `common attributes`_:
3253     ids_, names_, dupnames_, source_, and classes_.
3255 :Parameter Entities:
3256     The `%body.elements;`_ parameter entity directly includes
3257     ``option_list``.  The `%structure.model;`_ parameter entity
3258     indirectly includes ``option_list``.
3261 Examples
3262 --------
3264 reStructuredText_ source::
3266     -a            command-line option "a"
3267     -1 file, --one=file, --two file
3268                   Multiple options with arguments.
3270 Pseudo-XML_ fragment from simple parsing::
3272     <option_list>
3273         <option_list_item>
3274             <option_group>
3275                 <option>
3276                     <option_string>
3277                         -a
3278             <description>
3279                 <paragraph>
3280                     command-line option "a"
3281         <option_list_item>
3282             <option_group>
3283                 <option>
3284                     <option_string>
3285                         -1
3286                     <option_argument delimiter=" ">
3287                         file
3288                 <option>
3289                     <option_string>
3290                         --one
3291                     <option_argument delimiter="=">
3292                         file
3293                 <option>
3294                     <option_string>
3295                         --two
3296                     <option_argument delimiter=" ">
3297                         file
3298             <description>
3299                 <paragraph>
3300                     Multiple options with arguments.
3303 ``option_list_item``
3304 ====================
3306 The ``option_list_item`` element is a container for a pair of
3307 option_group_ and description_ elements.
3310 Details
3311 -------
3313 :Category:
3314     `Body Subelements`_
3316 :Parents:
3317     Only the option_list_ element contains ``option_list_item``.
3319 :Children:
3320     Each ``option_list_item`` element contains one option_group_ and
3321     one description_ element.
3323 :Analogues:
3324     ``option_list_item`` has no direct analogues in common DTDs.
3326 :Processing:
3327     See option_list_.
3330 Content Model
3331 -------------
3333 .. parsed-literal::
3335    (option_group_, description_)
3337 :Attributes:
3338     The ``option_list_item`` element contains only the `common attributes`_:
3339     ids_, names_, dupnames_, source_, and classes_.
3342 Examples
3343 --------
3345 See the examples for the option_list_ element.
3348 ``option_string``
3349 =================
3351 The ``option_string`` element contains the text of a command-line
3352 option.
3355 Details
3356 -------
3358 :Category:
3359     `Body Subelements`_
3361 :Parents:
3362     Only the option_ element contains ``option_string``.
3364 :Children:
3365     ``option_string`` elements contain text data only.
3367 :Analogues:
3368     ``option_string`` has no direct analogues in common DTDs.
3370 :Processing:
3371     The ``option_string`` text is typically rendered in a monospaced
3372     typeface.
3375 Content Model
3376 -------------
3378 .. parsed-literal::
3380    (#PCDATA)
3382 :Attributes:
3383     The ``option_string`` element contains only the `common attributes`_:
3384     ids_, names_, dupnames_, source_, and classes_.
3387 Examples
3388 --------
3390 See the examples for the option_list_ element.
3393 ``organization``
3394 ================
3396 The ``organization`` element contains the name of document author's
3397 organization, or the organization responsible for the document.
3400 Details
3401 -------
3403 :Category:
3404     `Bibliographic Elements`_
3406 :Parents:
3407     Only the docinfo_ element contains ``organization``.
3409 :Children:
3410     ``organization`` elements may contain text data plus `inline
3411     elements`_.
3413 :Analogues:
3414     ``organization`` is analogous to the DocBook "orgname",
3415     "corpname", or "publishername" elements.
3417 :Processing:
3418     See docinfo_.
3421 Content Model
3422 -------------
3424 .. parsed-literal::
3426     `%text.model;`_
3428 :Attributes:
3429     The ``organization`` element contains only the `common attributes`_:
3430     ids_, names_, dupnames_, source_, and classes_.
3432 :Parameter Entities:
3433     The `%bibliographic.elements;`_ parameter entity directly includes
3434     ``organization``.
3437 Examples
3438 --------
3440 reStructuredText_ source::
3442     Document Title
3443     ==============
3445     :Organization: Humankind
3447 Complete pseudo-XML_ result after parsing and applying transforms::
3449     <document ids="document-title" names="document title">
3450         <title>
3451             Document Title
3452         <docinfo>
3453             <organization>
3454                 Humankind
3456 See docinfo_ for a more complete example, including processing
3457 context.
3460 ``paragraph``
3461 =============
3463 The ``paragraph`` element contains the text and inline elements of a
3464 single paragraph, a fundamental building block of documents.
3467 Details
3468 -------
3470 :Category:
3471     `Simple Body Elements`_
3473 :Parents:
3474     All elements employing the `%body.elements;`_ or
3475     `%structure.model;`_ parameter entities in their content models
3476     may contain ``paragraph``.
3478 :Children:
3479     ``paragraph`` elements may contain text data plus `inline
3480     elements`_.
3482 :Analogues:
3483     ``paragraph`` is analogous to the HTML "p" element and to the
3484     DocBook "para" elements.
3487 Content Model
3488 -------------
3490 .. parsed-literal::
3492     `%text.model;`_
3494 :Attributes:
3495     The ``paragraph`` element contains only the `common attributes`_:
3496     ids_, names_, dupnames_, source_, and classes_.
3498 :Parameter Entities:
3499     The `%body.elements;`_ parameter entity directly includes
3500     ``paragraph``.  The `%structure.model;`_ parameter entity
3501     indirectly includes ``paragraph``.
3504 Examples
3505 --------
3507 reStructuredText_ source::
3509     A paragraph.
3511 Pseudo-XML_ fragment from simple parsing::
3513     <paragraph>
3514         A paragraph.
3517 ``pending``
3518 ===========
3520 `To be completed`_.
3523 ``problematic``
3524 ===============
3526 `To be completed`_.
3529 ``raw``
3530 =======
3532 `To be completed`_.
3535 ``reference``
3536 =============
3538 `To be completed`_.
3541 ``revision``
3542 ============
3544 The ``revision`` element contains the revision number of the document.
3545 It can be used alone or in conjunction with version_.
3548 Details
3549 -------
3551 :Category:
3552     `Bibliographic Elements`_
3554 :Parents:
3555     Only the docinfo_ element contains ``revision``.
3557 :Children:
3558     ``revision`` elements may contain text data plus `inline
3559     elements`_.
3561 :Analogues:
3562     ``revision`` is analogous to but simpler than the DocBook
3563     "revision" element.  It closely matches the DocBook "revnumber"
3564     element, but in a simpler context.
3566 :Processing:
3567     Often used with the RCS/CVS keyword "Revision".  See docinfo_.
3570 Content Model
3571 -------------
3573 .. parsed-literal::
3575     `%text.model;`_
3577 :Attributes:
3578     The ``revision`` element contains only the `common attributes`_:
3579     ids_, names_, dupnames_, source_, and classes_.
3581 :Parameter Entities:
3582     The `%bibliographic.elements;`_ parameter entity directly includes
3583     ``revision``.
3586 Examples
3587 --------
3589 reStructuredText_ source::
3591     Document Title
3592     ==============
3594     :Version: 1
3595     :Revision: b
3597 Complete pseudo-XML_ result after parsing and applying transforms::
3599     <document ids="document-title" names="document title">
3600         <title>
3601             Document Title
3602         <docinfo>
3603             <version>
3604                 1
3605             <revision>
3606                 b
3608 See docinfo_ for a more complete example, including processing
3609 context.
3612 ``row``
3613 =======
3615 `To be completed`_.
3618 ``rubric``
3619 ==========
3621      rubric n. 1. a title, heading, or the like, in a manuscript,
3622      book, statute, etc., written or printed in red or otherwise
3623      distinguished from the rest of the text. ...
3625      -- Random House Webster's College Dictionary, 1991
3627 A rubric is like an informal heading that doesn't correspond to the
3628 document's structure.
3630 `To be completed`_.
3633 ``section``
3634 ===========
3636 The ``section`` element is the main unit of hierarchy for Docutils
3637 documents.  Docutils ``section`` elements are a recursive structure; a
3638 ``section`` may contain other ``section`` elements, without limit.
3639 Paragraphs and other body elements may occur before a ``section``, but
3640 not after it.
3643 Details
3644 -------
3646 :Category:
3647     `Structural Elements`_
3649 :Parents:
3650     The following elements may contain ``section``: document_,
3651     section_
3653 :Children:
3654     ``section`` elements begin with a title_, and may contain `body
3655     elements`_ as well as transition_, topic_, and sidebar_ elements.
3657 :Analogues:
3658     ``section`` is analogous to DocBook recursive "section" elements,
3659     and to HTML "div" elements combined with "h1" etc. title elements.
3662 Content Model
3663 -------------
3665 .. parsed-literal::
3667     (title_,
3668      `%structure.model;`_)
3670 See the `%structure.model;`_ parameter entity for details of the body
3671 of a ``section``.
3673 :Attributes:
3674     The ``section`` element contains only the `common attributes`_:
3675     ids_, names_, dupnames_, source_, and classes_.
3677 :Parameter Entities:
3678     The `%section.elements;`_ parameter entity directly includes
3679     ``section``.  The `%structure.model;`_ parameter entity indirectly
3680     includes ``section``.
3683 Examples
3684 --------
3686 reStructuredText_ source::
3688     Title 1
3689     =======
3690     Paragraph 1.
3692     Title 2
3693     -------
3694     Paragraph 2.
3696     Title 3
3697     =======
3698     Paragraph 3.
3700     Title 4
3701     -------
3702     Paragraph 4.
3704 Complete pseudo-XML_ result after parsing::
3706     <document>
3707         <section ids="title-1" names="title 1">
3708             <title>
3709                 Title 1
3710             <paragraph>
3711                 Paragraph 1.
3712             <section ids="title-2" names="title 2">
3713                 <title>
3714                     Title 2
3715                 <paragraph>
3716                     Paragraph 2.
3717         <section ids="title-3" names="title 3">
3718             <title>
3719                 Title 3
3720             <paragraph>
3721                 Paragraph 3.
3722             <section ids="title-4" names="title 4">
3723                 <title>
3724                     Title 4
3725                 <paragraph>
3726                     Paragraph 4.
3729 ``sidebar``
3730 ===========
3732 Sidebars are like miniature, parallel documents that occur inside
3733 other documents, providing related or reference material.  A
3734 ``sidebar`` is typically offset by a border and "floats" to the side
3735 of the page; the document's main text may flow around it.  Sidebars
3736 can also be likened to super-footnotes; their content is outside of
3737 the flow of the document's main text.
3739 The ``sidebar`` element is a nonrecursive section_-like construct
3740 which may occur at the top level of a section_ wherever a body element
3741 (list, table, etc.) is allowed.  In other words, ``sidebar`` elements
3742 cannot nest inside body elements, so you can't have a ``sidebar``
3743 inside a ``table`` or a ``list``, or inside another ``sidebar`` (or
3744 topic_).
3747 Details
3748 -------
3750 :Category:
3751     `Structural Elements`_
3753 :Parents:
3754     The following elements may contain ``sidebar``: document_,
3755     section_
3757 :Children:
3758     ``sidebar`` elements begin with a title_ and an optional subtitle_
3759     and contain `body elements`_ and topic_ elements.
3761 :Analogues:
3762     ``sidebar`` is analogous to the DocBook "sidebar" element.
3764 :Processing:
3765     A ``sidebar`` element should be set off from the rest of the
3766     document somehow, typically with a border.  Sidebars typically
3767     "float" to the side of the page and the document's main text flows
3768     around them.
3771 Content Model
3772 -------------
3774 .. parsed-literal::
3776     (title_, subtitle_?,
3777      (`%body.elements;`_ | topic_)+)
3779 :Attributes:
3780     The ``sidebar`` element contains only the `common attributes`_:
3781     ids_, names_, dupnames_, source_, and classes_.
3783 :Parameter Entities:
3784     The `%structure.model;`_ parameter entity directly includes
3785     ``sidebar``.
3788 Examples
3789 --------
3791 The `"sidebar" directive`_ is used to create a ``sidebar`` element.
3792 reStructuredText_ source::
3794     .. sidebar:: Title
3795        :subtitle: If Desired
3797        Body.
3799 Pseudo-XML_ fragment from simple parsing::
3801     <sidebar>
3802         <title>
3803             Title
3804         <subtitle>
3805             If Desired
3806         <paragraph>
3807             Body.
3809 .. _"sidebar" directive: rst/directives.html#sidebar
3812 ``status``
3813 ==========
3815 The ``status`` element contains a status statement for the document,
3816 such as "Draft", "Final", "Work In Progress", etc.
3819 Details
3820 -------
3822 :Category:
3823     `Bibliographic Elements`_
3825 :Parents:
3826     Only the docinfo_ element contains ``status``.
3828 :Children:
3829     ``status`` elements may contain text data plus `inline elements`_.
3831 :Analogues:
3832     ``status`` is analogous to the DocBook "status" element.
3834 :Processing:
3835     See docinfo_.
3838 Content Model
3839 -------------
3841 .. parsed-literal::
3843     `%text.model;`_
3845 :Attributes:
3846     The ``status`` element contains only the `common attributes`_:
3847     ids_, names_, dupnames_, source_, and classes_.
3849 :Parameter Entities:
3850     The `%bibliographic.elements;`_ parameter entity directly includes
3851     ``status``.
3854 Examples
3855 --------
3857 reStructuredText_ source::
3859     Document Title
3860     ==============
3862     :Status: Work In Progress
3864 Complete pseudo-XML_ result after parsing and applying transforms::
3866     <document ids="document-title" names="document title">
3867         <title>
3868             Document Title
3869         <docinfo>
3870             <status>
3871                 Work In Progress
3873 See docinfo_ for a more complete example, including processing
3874 context.
3877 ``strong``
3878 ==========
3880 `To be completed`_.
3883 ``subscript``
3884 =============
3886 `To be completed`_.
3889 ``substitution_definition``
3890 ===========================
3892 `To be completed`_.
3895 ``substitution_reference``
3896 ==========================
3898 `To be completed`_.
3901 ``subtitle``
3902 ============
3904 The ``subtitle`` element stores the subtitle of a document_.
3907 Details
3908 -------
3910 :Category:
3911     `Structural Subelements`_
3913 :Parents:
3914     The document_ and sidebar_ elements may contain ``subtitle``.
3916 :Children:
3917     ``subtitle`` elements may contain text data plus `inline
3918     elements`_.
3920 :Analogues:
3921     ``subtitle`` is analogous to HTML header elements ("h2" etc.) and
3922     to the DocBook "subtitle" element.
3924 :Processing:
3925     A document's subtitle is usually rendered smaller than its title_.
3928 Content Model
3929 -------------
3931 .. parsed-literal::
3933     `%text.model;`_
3935 :Attributes:
3936     The ``subtitle`` element contains only the `common attributes`_:
3937     ids_, names_, dupnames_, source_, and classes_.
3940 Examples
3941 --------
3943 reStructuredText_ source::
3945     =======
3946      Title
3947     =======
3948     ----------
3949      Subtitle
3950     ----------
3952     A paragraph.
3954 Complete pseudo-XML_ result after parsing and applying transforms::
3956     <document ids="title" names="title">
3957         <title>
3958             Title
3959         <subtitle ids="subtitle" names="subtitle">
3960             Subtitle
3961         <paragraph>
3962             A paragraph.
3964 Note how two section levels have collapsed, promoting their titles to
3965 become the document's title and subtitle.  Since there is only one
3966 structural element (document), the subsection's ``ids`` and ``names``
3967 attributes are stored in the ``subtitle`` element.
3970 ``superscript``
3971 ===============
3973 `To be completed`_.
3976 ``system_message``
3977 ==================
3979 `To be completed`_.
3982 ``table``
3983 =========
3985 Docutils tables are based on the Exchange subset of the CALS-table model
3986 (OASIS Technical Memorandum 9901:1999 "XML Exchange Table Model DTD",
3987 http://www.oasis-open.org/html/tm9901.htm).
3989 `To be completed`_.
3992 ``target``
3993 ==========
3995 `To be completed`_.
3998 ``tbody``
3999 =========
4001 `To be completed`_.
4004 ``term``
4005 ========
4007 The ``term`` element contains a word or phrase being defined in a
4008 definition_list_.
4011 Details
4012 -------
4014 :Category:
4015     `Body Subelements`_ (simple)
4017 :Parents:
4018     Only the definition_list_item_ element contains ``term``.
4020 :Children:
4021     ``term`` elements may contain text data plus `inline elements`_.
4023 :Analogues:
4024     ``term`` is analogous to the HTML "dt" element and to the DocBook
4025     "term" element.
4027 :Processing:
4028     See definition_list_item_.
4031 Content Model
4032 -------------
4034 .. parsed-literal::
4036     `%text.model;`_
4038 :Attributes:
4039     The ``term`` element contains only the `common attributes`_:
4040     ids_, names_, dupnames_, source_, and classes_.
4043 Examples
4044 --------
4046 See the examples for the definition_list_, definition_list_item_, and
4047 classifier_ elements.
4050 ``tgroup``
4051 ==========
4053 `To be completed`_.
4056 ``thead``
4057 =========
4059 `To be completed`_.
4062 ``tip``
4063 =======
4065 The ``tip`` element is an admonition, a distinctive and self-contained
4066 notice.  Also see the other admonition elements Docutils offers (in
4067 alphabetical order): attention_, caution_, danger_, error_, hint_,
4068 important_, note_, warning_, and the generic admonition_.
4071 Details
4072 -------
4074 :Category:
4075     `Compound Body Elements`_
4077 :Parents:
4078     All elements employing the `%body.elements;`_ or
4079     `%structure.model;`_ parameter entities in their content models
4080     may contain ``tip``.
4082 :Children:
4083     ``tip`` elements contain one or more `body elements`_.
4085 :Analogues:
4086     ``tip`` is analogous to the DocBook "tip" element.
4088 :Processing:
4089     Rendered distinctly (inset and/or in a box, etc.), with the
4090     generated title "Tip" (or similar).
4093 Content Model
4094 -------------
4096 .. parsed-literal::
4098    (`%body.elements;`_)+
4100 :Attributes:
4101     The ``tip`` element contains only the `common attributes`_: ids_,
4102     names_, dupnames_, source_, and classes_.
4104 :Parameter Entities:
4105     The `%body.elements;`_ parameter entity directly includes ``tip``.
4106     The `%structure.model;`_ parameter entity indirectly includes
4107     ``tip``.
4110 Examples
4111 --------
4113 reStructuredText source::
4115     .. Tip:: 15% if the service is good.
4117 Pseudo-XML_ fragment from simple parsing::
4119     <tip>
4120         <paragraph>
4121             15% if the service is good.
4124 .. _title:
4126 ``title``
4127 =========
4129 The ``title`` element stores the title of a document_, section_,
4130 topic_, sidebar_, or generic admonition_.
4133 Details
4134 -------
4136 :Category:
4137     `Structural Subelements`_
4139 :Parents:
4140     The following elements may contain ``title``: document_, section_,
4141     topic_, sidebar_, admonition_
4143 :Children:
4144     ``title`` elements may contain text data plus `inline elements`_.
4146 :Analogues:
4147     ``title`` is analogous to HTML "title" and header ("h1" etc.)
4148     elements, and to the DocBook "title" element.
4151 Content Model
4152 -------------
4154 .. parsed-literal::
4156     `%text.model;`_
4158 :Attributes:
4159     The ``title`` element contains the `common attributes`_ (ids_,
4160     names_, dupnames_, source_, and classes_), plus refid_ and auto_.
4162     ``refid`` is used as a backlink to a table of contents entry.
4164     ``auto`` is used to indicate (with value "1") that the ``title``
4165     has been numbered automatically.
4168 Examples
4169 --------
4171 reStructuredText_ source::
4173     A Title
4174     =======
4176     A paragraph.
4178 Pseudo-XML_ fragment from simple parsing::
4180     <section ids="a-title" names="a title">
4181         <title>
4182             A Title
4183         <paragraph>
4184             A paragraph.
4187 ``title_reference``
4188 ===================
4190 `To be completed`_.
4193 ``topic``
4194 =========
4196 The ``topic`` element is a nonrecursive section_-like construct which
4197 may occur at the top level of a section_ wherever a body element
4198 (list, table, etc.) is allowed.  In other words, ``topic`` elements
4199 cannot nest inside body elements, so you can't have a ``topic`` inside
4200 a ``table`` or a ``list``, or inside another ``topic``.
4203 Details
4204 -------
4206 :Category:
4207     `Structural Elements`_
4209 :Parents:
4210     The following elements may contain ``topic``: document_, section_,
4211     sidebar_
4213 :Children:
4214     ``topic`` elements begin with a title_ and may contain `body
4215     elements`_.
4217 :Analogues:
4218     ``topic`` is analogous to the DocBook "simplesect" element.
4220 :Processing:
4221     A ``topic`` element should be set off from the rest of the
4222     document somehow, such as with indentation or a border.
4225 Content Model
4226 -------------
4228 .. parsed-literal::
4230     (title_?,
4231      (`%body.elements;`_)+)
4233 :Attributes:
4234     The ``topic`` element contains only the `common attributes`_:
4235     ids_, names_, dupnames_, source_, and classes_.
4237 :Parameter Entities:
4238     The `%structure.model;`_ parameter entity directly includes
4239     ``topic``.
4242 Examples
4243 --------
4245 The `"topic" directive`_ is used to create a ``topic`` element.
4246 reStructuredText_ source::
4248     .. topic:: Title
4250        Body.
4252 Pseudo-XML_ fragment from simple parsing::
4254     <topic>
4255         <title>
4256             Title
4257         <paragraph>
4258             Body.
4260 .. _"topic" directive: rst/directives.html#topic
4263 ``transition``
4264 ==============
4266 The ``transition`` element is commonly seen in novels and short
4267 fiction, as a gap spanning one or more lines, with or without a type
4268 ornament such as a row of asterisks.  Transitions separate body
4269 elements and sections, dividing a section into untitled divisions.  A
4270 transition may not begin or end a section [#]_ or document, nor may
4271 two transitions be immediately adjacent.
4273 See `Doctree Representation of Transitions`__ in `A Record of
4274 reStructuredText Syntax Alternatives`__.
4276 .. [#] In reStructuredText markup, a transition may appear to fall at
4277    the end of a section immediately before another section.  A
4278    transform recognizes this case and moves the transition so it
4279    separates the sections.
4281 __ ../dev/rst/alternatives.html#doctree-representation-of-transitions
4282 __ ../dev/rst/alternatives.html
4285 Details
4286 -------
4288 :Category:
4289     `Structural Subelements`_
4291 :Parents:
4292     The following elements may contain ``transition``: document_,
4293     section_
4295 :Children:
4296     ``transition`` is an empty element and has no children.
4298 :Analogues:
4299     ``transition`` is analogous to the HTML "hr" element.
4301 :Processing:
4302     The ``transition`` element is typically rendered as vertical
4303     whitespace (more than that separating paragraphs), with or without
4304     a horizontal line or row of asterisks.  In novels, transitions are
4305     often represented as a row of three well-spaced asterisks with
4306     vertical space above and below.
4309 Content Model
4310 -------------
4314     EMPTY
4316 The ``transition`` element has no content; it is a "point element".
4318 :Attributes:
4319     The ``transition`` element contains only the `common attributes`_:
4320     ids_, names_, dupnames_, source_, and classes_.
4322 :Parameter Entities:
4323     The `%structure.model;`_ parameter entity directly includes
4324     ``transition``.
4327 Examples
4328 --------
4330 reStructuredText_ source::
4332     Paragraph 1.
4334     --------
4336     Paragraph 2.
4338 Complete pseudo-XML_ result after parsing::
4340     <document>
4341         <paragraph>
4342             Paragraph 1.
4343         <transition>
4344         <paragraph>
4345             Paragraph 2.
4348 ``version``
4349 ===========
4351 The ``version`` element contains the version number of the document.
4352 It can be used alone or in conjunction with revision_.
4355 Details
4356 -------
4358 :Category:
4359     `Bibliographic Elements`_
4361 :Parents:
4362     Only the docinfo_ element contains ``version``.
4364 :Children:
4365     ``version`` elements may contain text data plus `inline
4366     elements`_.
4368 :Analogues:
4369     ``version`` may be considered analogous to the DocBook "revision",
4370     "revnumber", or "biblioid" elements.
4372 :Processing:
4373     Sometimes used with the RCS/CVS keyword "Revision".  See docinfo_
4374     and revision_.
4377 Content Model
4378 -------------
4380 .. parsed-literal::
4382     `%text.model;`_
4384 :Attributes:
4385     The ``version`` element contains only the `common attributes`_:
4386     ids_, names_, dupnames_, source_, and classes_.
4388 :Parameter Entities:
4389     The `%bibliographic.elements;`_ parameter entity directly includes
4390     ``version``.
4393 Examples
4394 --------
4396 reStructuredText_ source::
4398     Document Title
4399     ==============
4401     :Version: 1.1
4403 Complete pseudo-XML_ result after parsing and applying transforms::
4405     <document ids="document-title" names="document title">
4406         <title>
4407             Document Title
4408         <docinfo>
4409             <version>
4410                 1.1
4412 See docinfo_ for a more complete example, including processing
4413 context.
4416 ``warning``
4417 ===========
4419 The ``warning`` element is an admonition, a distinctive and
4420 self-contained notice.  Also see the other admonition elements
4421 Docutils offers (in alphabetical order): attention_, caution_,
4422 danger_, error_, hint_, important_, note_, tip_.
4425 Details
4426 -------
4428 :Category:
4429     `Compound Body Elements`_
4431 :Parents:
4432     All elements employing the `%body.elements;`_ or
4433     `%structure.model;`_ parameter entities in their content models
4434     may contain ``warning``.
4436 :Children:
4437     ``warning`` elements contain one or more `body elements`_.
4439 :Analogues:
4440     ``warning`` is analogous to the DocBook "warning" element.
4442 :Processing:
4443     Rendered distinctly (inset and/or in a box, etc.), with the
4444     generated title "Warning" (or similar).
4447 Content Model
4448 -------------
4450 .. parsed-literal::
4452    (`%body.elements;`_)+
4454 :Attributes:
4455     The ``warning`` element contains only the `common attributes`_:
4456     ids_, names_, dupnames_, source_, and classes_.
4458 :Parameter Entities:
4459     The `%body.elements;`_ parameter entity directly includes
4460     ``warning``.  The `%structure.model;`_ parameter entity indirectly
4461     includes ``warning``.
4464 Examples
4465 --------
4467 reStructuredText source::
4469     .. WARNING:: Reader discretion is strongly advised.
4471 Pseudo-XML_ fragment from simple parsing::
4473     <warning>
4474         <paragraph>
4475             Reader discretion is strongly advised.
4478 ---------------------
4479  Attribute Reference
4480 ---------------------
4482 .. contents:: :local:
4483               :depth: 1
4485 _`Common Attributes`: Through the `%basic.atts;`_ parameter entity,
4486 all elements contain the following attributes: ids_, names_, dupnames_,
4487 source_, and classes_.
4489 .. _attribute type:
4491 Attribute types:
4493 ``CDATA``
4494     Character data.  ``CDATA`` attributes may contain arbitrary text.
4496 ``ID``
4497     Like a ``NMTOKEN``, but it must begin with a letter (a "name
4498     production").  Identical ``ID`` values must not appear more than
4499     once in a document; i.e., ID values must uniquely identify their
4500     elements.
4502 ``IDREF``
4503     A reference to an ``ID`` value (a name production) of another
4504     element.
4506 ``IDREFS``
4507     One or more space-separated ``ID`` references (name productions).
4509 ``NMTOKEN``
4510     A "name token".  One or more of letters, digits, ".", "-", and
4511     "_".
4513 ``NMTOKENS``
4514     One or more space-separated ``NMTOKEN`` names.
4516 ``%yesorno;``
4517     No if zero ("0"), yes if any other value.  This is a parameter
4518     entity which resolves to a ``NMTOKEN`` attribute type.
4520 ``%number;``
4521     This emphasizes that the attribute value must be a number.  This
4522     is a parameter entity which resolves to a ``NMTOKEN`` attribute
4523     type.
4525 enumeration
4526     The attribute value may be one of a specified list of values.
4529 ``anonymous``
4530 =============
4532 `Attribute type`_: ``%yesorno;``.  Default value: none (implies no).
4534 The ``anonymous`` attribute is used for unnamed hyperlinks in the
4535 target_ and reference_ elements (via the `%anonymous.att;`_ parameter
4536 entity).
4539 ``auto``
4540 ========
4542 `Attribute type`_: ``CDATA``.  Default value: none.
4544 The ``auto`` attribute is used to indicate automatically-numbered
4545 footnote_, footnote_reference_ and title_ elements (via the
4546 `%auto.att;`_ parameter entity).
4549 ``backrefs``
4550 ============
4552 `Attribute type`_: ``IDREFS``.  Default value: none.
4554 The ``backrefs`` attribute contains a space-separated list of ids_
4555 references, used for backlinks from footnote_, citation_, and
4556 system_message_ elements (via the `%backrefs.att;`_ parameter entity).
4559 ``bullet``
4560 ==========
4562 `Attribute type`_: ``CDATA``.  Default value: none.
4564 The ``bullet`` attribute is used in the bullet_list_ element.
4567 ``classes``
4568 ===========
4570 `Attribute type`_: ``NMTOKENS``.  Default value: none.
4572 The ``classes`` attribute is a list containing zero or more names used
4573 to classify an element. The names are converted to conform to the
4574 regular expression ``[a-z](-?[a-z0-9]+)*`` (see the `"class"
4575 directive`_ description for details and rationale_).
4577 The purpose of the attribute is to indicate
4578 an "is-a" variant relationship, to allow an extensible way of defining
4579 sub-classes of existing elements.  It can be used to carry context
4580 forward between a Docutils Reader and Writer, when a custom structure
4581 is reduced to a standardized document tree.  One common use is in
4582 conjunction with stylesheets, to add selection criteria.  It should
4583 not be used to carry formatting instructions or arbitrary content.
4585 The ``classes`` attribute's contents should be ignorable.  Writers that
4586 are not familiar with the variant expressed should be able to ignore
4587 the attribute.
4589 ``classes`` is one of the `common attributes`_, shared by all Docutils
4590 elements.
4592 .. _"class" directive: rst/directives.html#class
4593 .. _rationale: rst/directives.html#rationale
4595 ``delimiter``
4596 =============
4598 `Attribute type`_: ``CDATA``.  Default value: none.
4600 The ``delimiter`` attribute is used in the option_argument_ element.
4603 ``dupnames``
4604 ============
4606 `Attribute type`_: ``CDATA``.  Default value: none.
4608 The ``dupnames`` attribute is a list containing the names of an
4609 element when there has been a naming conflict.  The contents of the
4610 ``dupnames`` attribute would have been transferred from the `names`_
4611 attribute.  An element may have at most one of the ``names`` or
4612 ``dupnames`` attributes, but not both.  ``dupnames`` is one of the
4613 `common attributes`_, shared by all Docutils elements.
4616 ``enumtype``
4617 ============
4619 `Attribute type`_: enumeration, one of "arabic", "loweralpha",
4620 "upperalpha", "lowerroman", or "upperroman".  Default value: none.
4622 The ``enumtype`` attribute is used in the enumerated_list_ element.
4625 ``ids``
4626 =======
4628 `Attribute type`_: ``NMTOKENS``.  Default value: none.
4630 The ``ids`` attribute is a list containing one or more unique
4631 identifier keys.  ``ids`` is one of the `common attributes`_, shared
4632 by all Docutils elements.
4635 ``names``
4636 =========
4638 `Attribute type`_: ``CDATA``.  Default value: none.
4640 The ``names`` attribute is a list containing the names of an element,
4641 typically originating from the element's title or content.  Each name
4642 in ``names`` must be unique; if there are name conflicts (two or more
4643 elements want to the same name), the contents will be transferred to
4644 the `dupnames`_ attribute on the duplicate elements.  An element may
4645 have at most one of the ``names`` or ``dupnames`` attributes, but not
4646 both.  ``names`` is one of the `common attributes`_, shared by all
4647 Docutils elements.
4650 ``prefix``
4651 ==========
4653 `Attribute type`_: ``CDATA``.  Default value: none.
4655 The ``prefix`` attribute is used in the enumerated_list_ element.
4658 ``refid``
4659 =========
4661 `Attribute type`_: ``IDREF``.  Default value: none.
4663 The ``refid`` attribute contains references to `ids`_ attributes in
4664 other elements.  It is used by the target_, reference_,
4665 footnote_reference_, citation_reference_, title_ and problematic_
4666 elements (via the `%refid.att;`_ and `%reference.atts;`_ parameter
4667 entities).
4670 ``refname``
4671 ===========
4673 `Attribute type`_: ``NMTOKENS``.  Default value: none.
4675 The ``refname`` attribute contains an internal reference to the
4676 `names`_ attribute of another element.  On a `target`_ element,
4677 ``refname`` indicates an indirect target which may resolve to either
4678 an internal or external reference.  ``refname`` is used by the
4679 target_, reference_, footnote_reference_, citation_reference_, and
4680 substitution_reference_ elements (via the `%refname.att;`_ and
4681 `%reference.atts;`_ parameter entities).
4684 ``refuri``
4685 ==========
4687 `Attribute type`_: ``CDATA``.  Default value: none.
4689 The ``refuri`` attribute contains an external reference to a URI/URL.
4690 It is used by the target_, reference_, footnote_reference_, and
4691 citation_reference_ elements (via the `%reference.atts;`_ parameter
4692 entity).
4695 ``source``
4696 ==========
4698 `Attribute type`_: ``CDATA``.  Default value: none.
4700 The ``source`` attribute is used to store the path or URL to the
4701 source text that was used to produce the document tree.  It is one of
4702 the `common attributes`_, shared by all Docutils elements.
4705 ``start``
4706 =========
4708 `Attribute type`_: ``%number;``.  Default value: none.
4710 The ``start`` attribute is used in the enumerated_list_ element.
4713 ``suffix``
4714 ==========
4716 `Attribute type`_: ``CDATA``.  Default value: none.
4718 The ``suffix`` attribute is used in the enumerated_list_ element.
4721 ``xml:space``
4722 =============
4724 `Attribute type`_: one of "default" or "preserve".  Default value:
4725 "preserve" (fixed).
4727 The ``xml:space`` attribute is a standard XML attribute for
4728 whitespace-preserving elements.  It is used by the literal_block_,
4729 line_block_, doctest_block_, comment_, and raw_ elements (via the
4730 `%fixedspace.att;`_ parameter entity).  It is a fixed attribute, meant
4731 to communicate to an XML parser that the element contains significant
4732 whitespace.  The attribute value should not be set in a document
4733 instance.
4736 .. _title (attribute):
4738 ``title``
4739 =========
4741 `Attribute type`_: ``CDATA``.  Default value: none.
4743 The ``title`` attribute stores the title metadata of a document.  This
4744 title is typically not part of the rendered document.  It may for
4745 example be used in HTML's ``title`` element.
4748 ----------------------------
4749  Parameter Entity Reference
4750 ----------------------------
4752 .. contents:: :local:
4753               :depth: 1
4755 Parameter entities are used to simplify the DTD (to share definitions
4756 and reduce duplication) and to allow the DTD to be customized by
4757 wrapper DTDs (external client DTDs that use or import the Docutils
4758 DTD).  Parameter entities may be overridden by wrapper DTDs, replacing
4759 the definitions below with custom definitions.  Parameter entities
4760 whose names begin with "additional" are meant to allow easy extension
4761 by wrapper DTDs.
4764 ``%anonymous.att;``
4765 ===================
4767 The ``%anonymous.att;`` parameter entity contains the anonymous_
4768 attribute, used for unnamed hyperlinks.
4770 Entity definition:
4772 .. parsed-literal::
4774     anonymous_ %yesorno; #IMPLIED
4776 The reference_ and target_ elements directly employ the
4777 ``%anonymous.att;`` parameter entity in their attribute lists.
4780 ``%auto.att;``
4781 ==============
4783 The ``%auto.att;`` parameter entity contains the auto_ attribute, used
4784 to indicate an automatically-numbered footnote or title.
4786 Entity definition:
4788 .. parsed-literal::
4790     auto_     CDATA     #IMPLIED
4792 The footnote_, footnote_reference_, and title_ elements directly
4793 employ the ``%auto.att;`` parameter entity in their attribute lists.
4796 ``%backrefs.att;``
4797 ==================
4799 The ``%backrefs.att;`` parameter entity contains the backrefs_
4800 attribute, a space-separated list of id references, for backlinks.
4802 Entity definition:
4804 .. parsed-literal::
4806     backrefs_  IDREFS    #IMPLIED
4808 The citation_, footnote_, and system_message_ elements directly employ
4809 the ``%backrefs.att;`` parameter entity in their attribute lists.
4812 ``%basic.atts;``
4813 ================
4815 The ``%basic.atts;`` parameter entity lists attributes common to all
4816 Docutils elements.  See `Common Attributes`_.
4818 Entity definition:
4820 .. parsed-literal::
4822     ids_      NMTOKENS  #IMPLIED
4823     names_    CDATA     #IMPLIED
4824     dupnames_ CDATA     #IMPLIED
4825     source_   CDATA     #IMPLIED
4826     classes_  NMTOKENS  #IMPLIED
4827     %additional.basic.atts;
4829 The ``%additional.basic.atts;`` parameter entity can be used by
4830 wrapper DTDs to extend ``%basic.atts;``.
4833 ``%bibliographic.elements;``
4834 ============================
4836 The ``%bibliographic.elements;`` parameter entity contains an OR-list of all
4837 `bibliographic elements`_.
4839 Entity definition:
4841 .. parsed-literal::
4843     author_ | authors_ | organization_ | contact_ | address_
4844     | version_ | revision_ | status_ | date_ | copyright_
4845     | field_
4846     %additional.bibliographic.elements;
4848 The ``%additional.bibliographic.elements;`` parameter entity can be used by
4849 wrapper DTDs to extend ``%bibliographic.elements;``.
4851 Only the docinfo_ element directly employs the
4852 ``%bibliographic.elements;`` parameter entity in its content model.
4855 ``%body.elements;``
4856 ===================
4858 The ``%body.elements;`` parameter entity contains an OR-list of all
4859 `body elements`_.  ``%body.elements;`` is itself contained within the
4860 `%structure.model;`_ parameter entity.
4862 Entity definition:
4864 .. parsed-literal::
4866     admonition_ | attention_ | block_quote_ | bullet_list_ | caution_
4867     | citation_ | compound_ | comment_ | container_ | danger_ |
4868       definition_list_ | doctest_block_ | enumerated_list_ | error_ |
4869       field_list_ | figure_ | footnote_ | hint_ | image_ | important_
4870       | line_block_ | literal_block_ | note_ | option_list_ |
4871       paragraph_ | pending_ | raw_ reference_ | rubric_ |
4872       substitution_definition_ | system_message_ | table_ | target_ |
4873       tip_ | warning_ %additional.body.elements;
4875 The ``%additional.body.elements;`` parameter entity can be used by
4876 wrapper DTDs to extend ``%body.elements;``.
4878 The ``%body.elements;`` parameter entity is directly employed in the
4879 content models of the following elements: admonition_, attention_,
4880 block_quote_, caution_, citation_, compound_, danger_, definition_,
4881 description_, entry_, error_, field_body_, footer_, footnote_,
4882 header_, hint_, important_, legend_, list_item_, note_, sidebar_,
4883 system_message_, tip_, topic_, warning_
4885 Via `%structure.model;`_, the ``%body.elements;`` parameter entity is
4886 indirectly employed in the content models of the document_ and
4887 section_ elements.
4890 ``%fixedspace.att;``
4891 ====================
4893 The ``%fixedspace.att;`` parameter entity contains the `xml:space`_
4894 attribute, a standard XML attribute for whitespace-preserving
4895 elements.
4897 Entity definition:
4899 .. parsed-literal::
4901     `xml:space`_ (default | preserve) #FIXED 'preserve'
4903 The ``%fixedspace.att;`` parameter entity is directly employed in the
4904 attribute lists of the following elements: address_, comment_,
4905 doctest_block_, line_block_, literal_block_, raw_
4908 ``%inline.elements;``
4909 =====================
4911 The ``%inline.elements;`` parameter entity contains an OR-list of all
4912 `inline elements`_.
4914 Entity definition:
4916 .. parsed-literal::
4918     abbreviation_ | acronym_ | citation_reference_ | emphasis_ |
4919     footnote_reference_ | generated_ | image_ | inline_ | literal_ |
4920     problematic_ | raw_ | reference_ | strong_ | substitution_reference_ |
4921     subscript_ | superscript_ | target_ | title_reference_
4922     %additional.inline.elements;
4924 The ``%additional.inline.elements;`` parameter entity can be used by
4925 wrapper DTDs to extend ``%inline.elements;``.
4927 Via `%text.model;`_, the ``%inline.elements;`` parameter entity is
4928 indirectly employed in the content models of the following elements:
4929 abbreviation_, acronym_, address_, attribution_, author_, caption_,
4930 classifier_, contact_, copyright_, date_, doctest_block_, emphasis_,
4931 generated_, inline_, line_block_, literal_block_, math_, math_block_,
4932 organization_,
4933 paragraph_, problematic_, raw_, reference_, revision_, rubric_,
4934 status_, strong_, subscript_, substitution_definition_,
4935 substitution_reference_, subtitle_, superscript_, target_, term_,
4936 title_, title_reference_, version_
4939 ``%reference.atts;``
4940 ====================
4942 The ``%reference.atts;`` parameter entity groups together the refuri_,
4943 refid_, and refname_ attributes.
4945 Entity definition:
4947 .. parsed-literal::
4949     `%refuri.att;`_
4950     `%refid.att;`_
4951     `%refname.att;`_
4952     %additional.reference.atts;
4954 The ``%additional.reference.atts;`` parameter entity can be used by
4955 wrapper DTDs to extend ``%additional.reference.atts;``.
4957 The citation_reference_, footnote_reference_, reference_, and target_
4958 elements directly employ the ``%reference.att;`` parameter entity in
4959 their attribute lists.
4962 ``%refid.att;``
4963 ================
4965 The ``%refid.att;`` parameter entity contains the refid_ attribute, an
4966 internal reference to the `ids`_ attribute of another element.
4968 Entity definition:
4970 .. parsed-literal::
4972     refid_   CDATA     #IMPLIED
4974 The title_ and problematic_ elements directly employ the
4975 ``%refid.att;`` parameter entity in their attribute lists.
4977 Via `%reference.atts;`_, the ``%refid.att;`` parameter entity is
4978 indirectly employed in the attribute lists of the citation_reference_,
4979 footnote_reference_, reference_, and target_ elements.
4982 ``%refname.att;``
4983 =================
4985 The ``%refname.att;`` parameter entity contains the refname_
4986 attribute, an internal reference to the `names`_ attribute of another
4987 element.  On a `target`_ element, ``refname`` indicates an indirect
4988 target which may resolve to either an internal or external
4989 reference.
4991 Entity definition:
4993 .. parsed-literal::
4995     refname_  NMTOKENS  #IMPLIED
4997 The substitution_reference_ element directly employs the
4998 ``%refname.att;`` parameter entity in its attribute list.
5000 Via `%reference.atts;`_, the ``%refname.att;`` parameter entity is
5001 indirectly employed in the attribute lists of the citation_reference_,
5002 footnote_reference_, reference_, and target_ elements.
5005 ``%refuri.att;``
5006 ================
5008 The ``%refuri.att;`` parameter entity contains the refuri_ attribute,
5009 an external reference to a URI/URL.
5011 Entity definition:
5013 .. parsed-literal::
5015     refuri_   CDATA     #IMPLIED
5017 Via `%reference.atts;`_, the ``%refuri.att;`` parameter entity is
5018 indirectly employed in the attribute lists of the citation_reference_,
5019 footnote_reference_, reference_, and target_ elements.
5022 ``%section.elements;``
5023 ======================
5025 The ``%section.elements;`` parameter entity contains an OR-list of all
5026 section_-equivalent elements.  ``%section.elements;`` is itself
5027 contained within the `%structure.model;`_ parameter entity.
5029 Entity definition:
5031 .. parsed-literal::
5033     section_
5034     %additional.section.elements;
5036 The ``%additional.section.elements;`` parameter entity can be used
5037 by wrapper DTDs to extend ``%section.elements;``.
5039 Via `%structure.model;`_, the ``%section.elements;`` parameter entity
5040 is indirectly employed in the content models of the document_ and
5041 section_ elements.
5044 ``%structure.model;``
5045 =====================
5047 The ``%structure.model;`` parameter entity encapsulates the
5048 hierarchical structure of a document and of its constituent parts.
5049 See the discussion of the `element hierarchy`_ above.
5051 Entity definition:
5053 .. parsed-literal::
5055    ( ( (`%body.elements;`_ | topic_ | sidebar_)+, transition_? )*,
5056      ( (`%section.elements;`_), (transition_?, (`%section.elements;`_) )* )? )
5058 Each document_ or section_ contains zero or more body elements,
5059 topics, and/or sidebars, optionally interspersed with single
5060 transitions, followed by zero or more sections (whose contents are
5061 recursively the same as this model) optionally interspersed with
5062 transitions.
5064 The following restrictions are imposed by this model:
5066 * Transitions must be separated by other elements (body elements,
5067   sections, etc.).  In other words, a transition may not be
5068   immediately adjacent to another transition.
5070 * A transition may not occur at the beginning of a document or
5071   section.
5073 An additional restriction, which cannot be expressed in the language
5074 of DTDs, is imposed by software:
5076 * A transition may not occur at the end of a document or section.
5078 The `%structure.model;`_ parameter entity is directly employed in the
5079 content models of the document_ and section_ elements.
5082 ``%text.model;``
5083 ================
5085 The ``%text.model;`` parameter entity is used by many elements to
5086 represent text data mixed with `inline elements`_.
5088 Entity definition:
5090 .. parsed-literal::
5092     (#PCDATA | `%inline.elements;`_)*
5094 The ``%text.model;`` parameter entity is directly employed in the
5095 content models of the following elements: abbreviation_, acronym_,
5096 address_, author_, caption_, classifier_, contact_, copyright_, date_,
5097 doctest_block_, emphasis_, field_name_, generated_, line_block_,
5098 literal_block_, organization_, paragraph_, problematic_, raw_,
5099 reference_, revision_, status_, strong_, substitution_definition_,
5100 substitution_reference_, subtitle_, target_, term_, title_, version_
5105    Local Variables:
5106    mode: indented-text
5107    indent-tabs-mode: nil
5108    sentence-end-double-space: t
5109    fill-column: 70
5110    End: