Refine documentation of Docutils table objects.
[docutils.git] / docs / ref / doctree.txt
blob1e4d3fdadf65cc78519fedecda35b9bf8222ec4b
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` that is typeset
2911 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_).
2948 ``math_block``
2949 ==============
2951 The ``math_block`` element contains a block of text in `LaTeX math
2952 format` that is typeset as mathematical notation (display formula).
2953 The ``math_block`` element is generated during the initial parse from a
2954 "math" directive.
2956 If the output format does not support math typesetting, the content is
2957 inserted verbatim.
2959 Details
2960 -------
2962 :Category:
2963     `Simple Body Elements`_
2965 :Parents:
2966     All elements employing the `%body.elements;`_ or
2967     `%structure.model;`_ parameter entities in their content models
2968     may contain ``math_block``.
2970 :Children:
2971     ``math_block`` elements may contain text data.
2973 :Analogues:
2974     ``math_block`` is analogous to a LaTeX "equation*" environment or
2975     a MathML "math" element displayed as block-level element.
2977 :Processing:
2978     Rendered in a block as mathematical notation, typically centered or with
2979     indentation
2981 Content Model
2982 -------------
2984 .. parsed-literal::
2986     `%text.model;`_
2988 :Attributes:
2989     The ``math`` element contains the `common attributes`_
2990     (ids_, names_, dupnames_, source_, and classes_).
2993 ``note``
2994 ========
2996 The ``note`` element is an admonition, a distinctive and
2997 self-contained notice.  Also see the other admonition elements
2998 Docutils offers (in alphabetical order): attention_, caution_,
2999 danger_, error_, hint_, important_, tip_, warning_, and the generic
3000 admonition_.
3003 Details
3004 -------
3006 :Category:
3007     `Compound Body Elements`_
3009 :Parents:
3010     All elements employing the `%body.elements;`_ or
3011     `%structure.model;`_ parameter entities in their content models
3012     may contain ``note``.
3014 :Children:
3015     ``note`` elements contain one or more `body elements`_.
3017 :Analogues:
3018     ``note`` is analogous to the DocBook "note" element.
3020 :Processing:
3021     Rendered distinctly (inset and/or in a box, etc.), with the
3022     generated title "Note" (or similar).
3025 Content Model
3026 -------------
3028 .. parsed-literal::
3030    (`%body.elements;`_)+
3032 :Attributes:
3033     The ``note`` element contains only the `common attributes`_: ids_,
3034     names_, dupnames_, source_, and classes_.
3036 :Parameter Entities:
3037     The `%body.elements;`_ parameter entity directly includes
3038     ``note``.  The `%structure.model;`_ parameter entity indirectly
3039     includes ``note``.
3042 Examples
3043 --------
3045 reStructuredText source::
3047     .. Note:: Admonitions can be handy to break up a
3048        long boring technical document.
3050 Pseudo-XML_ fragment from simple parsing::
3052     <note>
3053         <paragraph>
3054             Admonitions can be handy to break up a
3055             long boring technical document.
3057 ``option``
3058 ==========
3060 The ``option`` element groups an option string together with zero or
3061 more option argument placeholders.  Note that reStructuredText_
3062 currently supports only one argument per option.
3065 Details
3066 -------
3068 :Category:
3069     `Body Subelements`_
3071 :Parents:
3072     Only the option_group_ element contains ``option``.
3074 :Children:
3075     Each ``option`` element contains one option_string_ and zero or
3076     more option_argument_ elements.
3078 :Analogues:
3079     ``option`` has no direct analogues in common DTDs.
3081 :Processing:
3082     See option_list_.
3085 Content Model
3086 -------------
3088 .. parsed-literal::
3090    (option_string_, option_argument_ \*)
3092 :Attributes:
3093     The ``option`` element contains only the `common attributes`_:
3094     ids_, names_, dupnames_, source_, and classes_.
3097 Examples
3098 --------
3100 See the examples for the option_list_ element.
3103 ``option_argument``
3104 ===================
3106 The ``option_argument`` element contains placeholder text for option
3107 arguments.
3110 Details
3111 -------
3113 :Category:
3114     `Body Subelements`_
3116 :Parents:
3117     Only the option_ element contains ``option_argument``.
3119 :Children:
3120     ``option_argument`` elements contain text data only.
3122 :Analogues:
3123     ``option_argument`` has no direct analogues in common DTDs.
3125 :Processing:
3126     The value of the "delimiter" attribute is prefixed to the
3127     ``option_argument``, separating it from its option_string_ or a
3128     preceding ``option_argument``.  The ``option_argument`` text is
3129     typically rendered in a monospaced typeface, possibly italicized
3130     or otherwise altered to indicate its placeholder nature.
3133 Content Model
3134 -------------
3136 .. parsed-literal::
3138    (#PCDATA)
3140 :Attributes:
3141     The ``option_argument`` element contains the `common attributes`_ (ids_,
3142     names_, dupnames_, source_, and classes_), plus delimiter_.
3144     ``delimiter`` contains the text preceding the ``option_argument``:
3145     either the text separating it from the option_string_ (typically
3146     either "=" or " ") or the text between option arguments (typically
3147     either "," or " ").
3150 Examples
3151 --------
3153 See the examples for the option_list_ element.
3156 ``option_group``
3157 ================
3159 The ``option_group`` element groups together one or more option_
3160 elements, all synonyms.
3163 Details
3164 -------
3166 :Category:
3167     `Body Subelements`_
3169 :Parents:
3170     Only the option_list_item_ element contains ``option_group``.
3172 :Children:
3173     ``option_group`` elements contain one or more option_ elements.
3175     ``option_group`` is an empty element and has no children.
3177     Each ``option_group`` element contains one _ and
3178     one _ element.
3180 :Analogues:
3181     ``option_group`` has no direct analogues in common DTDs.
3183 :Processing:
3184     Typically option_ elements within an ``option_group`` are joined
3185     together in a comma-separated list.
3188 Content Model
3189 -------------
3191 .. parsed-literal::
3193    (option_group_, description_)
3195 :Attributes:
3196     The ``option_group`` element contains only the `common attributes`_:
3197     ids_, names_, dupnames_, source_, and classes_.
3200 Examples
3201 --------
3203 See the examples for the option_list_ element.
3206 ``option_list``
3207 ===============
3209 Each ``option_list`` element contains a two-column list of
3210 command-line options and descriptions, documenting a program's
3211 options.
3214 Details
3215 -------
3217 :Category:
3218     `Compound Body Elements`_
3220 :Parents:
3221     All elements employing the `%body.elements;`_ or
3222     `%structure.model;`_ parameter entities in their content models
3223     may contain ``option_list``.
3225 :Children:
3226     ``option_list`` elements contain one or more option_list_item_
3227     elements.
3229 :Analogues:
3230     ``option_list`` has no direct analogues in common DTDs.  It can be
3231     emulated with primitives such as tables.
3233 :Processing:
3234     An ``option_list`` is typically rendered as a two-column list,
3235     where the first column contains option strings and arguments, and
3236     the second column contains descriptions.
3239 Content Model
3240 -------------
3242 .. parsed-literal::
3244    (option_list_item_ +)
3246 :Attributes:
3247     The ``option_list`` element contains only the `common attributes`_:
3248     ids_, names_, dupnames_, source_, and classes_.
3250 :Parameter Entities:
3251     The `%body.elements;`_ parameter entity directly includes
3252     ``option_list``.  The `%structure.model;`_ parameter entity
3253     indirectly includes ``option_list``.
3256 Examples
3257 --------
3259 reStructuredText_ source::
3261     -a            command-line option "a"
3262     -1 file, --one=file, --two file
3263                   Multiple options with arguments.
3265 Pseudo-XML_ fragment from simple parsing::
3267     <option_list>
3268         <option_list_item>
3269             <option_group>
3270                 <option>
3271                     <option_string>
3272                         -a
3273             <description>
3274                 <paragraph>
3275                     command-line option "a"
3276         <option_list_item>
3277             <option_group>
3278                 <option>
3279                     <option_string>
3280                         -1
3281                     <option_argument delimiter=" ">
3282                         file
3283                 <option>
3284                     <option_string>
3285                         --one
3286                     <option_argument delimiter="=">
3287                         file
3288                 <option>
3289                     <option_string>
3290                         --two
3291                     <option_argument delimiter=" ">
3292                         file
3293             <description>
3294                 <paragraph>
3295                     Multiple options with arguments.
3298 ``option_list_item``
3299 ====================
3301 The ``option_list_item`` element is a container for a pair of
3302 option_group_ and description_ elements.
3305 Details
3306 -------
3308 :Category:
3309     `Body Subelements`_
3311 :Parents:
3312     Only the option_list_ element contains ``option_list_item``.
3314 :Children:
3315     Each ``option_list_item`` element contains one option_group_ and
3316     one description_ element.
3318 :Analogues:
3319     ``option_list_item`` has no direct analogues in common DTDs.
3321 :Processing:
3322     See option_list_.
3325 Content Model
3326 -------------
3328 .. parsed-literal::
3330    (option_group_, description_)
3332 :Attributes:
3333     The ``option_list_item`` element contains only the `common attributes`_:
3334     ids_, names_, dupnames_, source_, and classes_.
3337 Examples
3338 --------
3340 See the examples for the option_list_ element.
3343 ``option_string``
3344 =================
3346 The ``option_string`` element contains the text of a command-line
3347 option.
3350 Details
3351 -------
3353 :Category:
3354     `Body Subelements`_
3356 :Parents:
3357     Only the option_ element contains ``option_string``.
3359 :Children:
3360     ``option_string`` elements contain text data only.
3362 :Analogues:
3363     ``option_string`` has no direct analogues in common DTDs.
3365 :Processing:
3366     The ``option_string`` text is typically rendered in a monospaced
3367     typeface.
3370 Content Model
3371 -------------
3373 .. parsed-literal::
3375    (#PCDATA)
3377 :Attributes:
3378     The ``option_string`` element contains only the `common attributes`_:
3379     ids_, names_, dupnames_, source_, and classes_.
3382 Examples
3383 --------
3385 See the examples for the option_list_ element.
3388 ``organization``
3389 ================
3391 The ``organization`` element contains the name of document author's
3392 organization, or the organization responsible for the document.
3395 Details
3396 -------
3398 :Category:
3399     `Bibliographic Elements`_
3401 :Parents:
3402     Only the docinfo_ element contains ``organization``.
3404 :Children:
3405     ``organization`` elements may contain text data plus `inline
3406     elements`_.
3408 :Analogues:
3409     ``organization`` is analogous to the DocBook "orgname",
3410     "corpname", or "publishername" elements.
3412 :Processing:
3413     See docinfo_.
3416 Content Model
3417 -------------
3419 .. parsed-literal::
3421     `%text.model;`_
3423 :Attributes:
3424     The ``organization`` element contains only the `common attributes`_:
3425     ids_, names_, dupnames_, source_, and classes_.
3427 :Parameter Entities:
3428     The `%bibliographic.elements;`_ parameter entity directly includes
3429     ``organization``.
3432 Examples
3433 --------
3435 reStructuredText_ source::
3437     Document Title
3438     ==============
3440     :Organization: Humankind
3442 Complete pseudo-XML_ result after parsing and applying transforms::
3444     <document ids="document-title" names="document title">
3445         <title>
3446             Document Title
3447         <docinfo>
3448             <organization>
3449                 Humankind
3451 See docinfo_ for a more complete example, including processing
3452 context.
3455 ``paragraph``
3456 =============
3458 The ``paragraph`` element contains the text and inline elements of a
3459 single paragraph, a fundamental building block of documents.
3462 Details
3463 -------
3465 :Category:
3466     `Simple Body Elements`_
3468 :Parents:
3469     All elements employing the `%body.elements;`_ or
3470     `%structure.model;`_ parameter entities in their content models
3471     may contain ``paragraph``.
3473 :Children:
3474     ``paragraph`` elements may contain text data plus `inline
3475     elements`_.
3477 :Analogues:
3478     ``paragraph`` is analogous to the HTML "p" element and to the
3479     DocBook "para" elements.
3482 Content Model
3483 -------------
3485 .. parsed-literal::
3487     `%text.model;`_
3489 :Attributes:
3490     The ``paragraph`` element contains only the `common attributes`_:
3491     ids_, names_, dupnames_, source_, and classes_.
3493 :Parameter Entities:
3494     The `%body.elements;`_ parameter entity directly includes
3495     ``paragraph``.  The `%structure.model;`_ parameter entity
3496     indirectly includes ``paragraph``.
3499 Examples
3500 --------
3502 reStructuredText_ source::
3504     A paragraph.
3506 Pseudo-XML_ fragment from simple parsing::
3508     <paragraph>
3509         A paragraph.
3512 ``pending``
3513 ===========
3515 `To be completed`_.
3518 ``problematic``
3519 ===============
3521 `To be completed`_.
3524 ``raw``
3525 =======
3527 `To be completed`_.
3530 ``reference``
3531 =============
3533 `To be completed`_.
3536 ``revision``
3537 ============
3539 The ``revision`` element contains the revision number of the document.
3540 It can be used alone or in conjunction with version_.
3543 Details
3544 -------
3546 :Category:
3547     `Bibliographic Elements`_
3549 :Parents:
3550     Only the docinfo_ element contains ``revision``.
3552 :Children:
3553     ``revision`` elements may contain text data plus `inline
3554     elements`_.
3556 :Analogues:
3557     ``revision`` is analogous to but simpler than the DocBook
3558     "revision" element.  It closely matches the DocBook "revnumber"
3559     element, but in a simpler context.
3561 :Processing:
3562     Often used with the RCS/CVS keyword "Revision".  See docinfo_.
3565 Content Model
3566 -------------
3568 .. parsed-literal::
3570     `%text.model;`_
3572 :Attributes:
3573     The ``revision`` element contains only the `common attributes`_:
3574     ids_, names_, dupnames_, source_, and classes_.
3576 :Parameter Entities:
3577     The `%bibliographic.elements;`_ parameter entity directly includes
3578     ``revision``.
3581 Examples
3582 --------
3584 reStructuredText_ source::
3586     Document Title
3587     ==============
3589     :Version: 1
3590     :Revision: b
3592 Complete pseudo-XML_ result after parsing and applying transforms::
3594     <document ids="document-title" names="document title">
3595         <title>
3596             Document Title
3597         <docinfo>
3598             <version>
3599                 1
3600             <revision>
3601                 b
3603 See docinfo_ for a more complete example, including processing
3604 context.
3607 ``row``
3608 =======
3610 `To be completed`_.
3613 ``rubric``
3614 ==========
3616      rubric n. 1. a title, heading, or the like, in a manuscript,
3617      book, statute, etc., written or printed in red or otherwise
3618      distinguished from the rest of the text. ...
3620      -- Random House Webster's College Dictionary, 1991
3622 A rubric is like an informal heading that doesn't correspond to the
3623 document's structure.
3625 `To be completed`_.
3628 ``section``
3629 ===========
3631 The ``section`` element is the main unit of hierarchy for Docutils
3632 documents.  Docutils ``section`` elements are a recursive structure; a
3633 ``section`` may contain other ``section`` elements, without limit.
3634 Paragraphs and other body elements may occur before a ``section``, but
3635 not after it.
3638 Details
3639 -------
3641 :Category:
3642     `Structural Elements`_
3644 :Parents:
3645     The following elements may contain ``section``: document_,
3646     section_
3648 :Children:
3649     ``section`` elements begin with a title_, and may contain `body
3650     elements`_ as well as transition_, topic_, and sidebar_ elements.
3652 :Analogues:
3653     ``section`` is analogous to DocBook recursive "section" elements,
3654     and to HTML "div" elements combined with "h1" etc. title elements.
3657 Content Model
3658 -------------
3660 .. parsed-literal::
3662     (title_,
3663      `%structure.model;`_)
3665 See the `%structure.model;`_ parameter entity for details of the body
3666 of a ``section``.
3668 :Attributes:
3669     The ``section`` element contains only the `common attributes`_:
3670     ids_, names_, dupnames_, source_, and classes_.
3672 :Parameter Entities:
3673     The `%section.elements;`_ parameter entity directly includes
3674     ``section``.  The `%structure.model;`_ parameter entity indirectly
3675     includes ``section``.
3678 Examples
3679 --------
3681 reStructuredText_ source::
3683     Title 1
3684     =======
3685     Paragraph 1.
3687     Title 2
3688     -------
3689     Paragraph 2.
3691     Title 3
3692     =======
3693     Paragraph 3.
3695     Title 4
3696     -------
3697     Paragraph 4.
3699 Complete pseudo-XML_ result after parsing::
3701     <document>
3702         <section ids="title-1" names="title 1">
3703             <title>
3704                 Title 1
3705             <paragraph>
3706                 Paragraph 1.
3707             <section ids="title-2" names="title 2">
3708                 <title>
3709                     Title 2
3710                 <paragraph>
3711                     Paragraph 2.
3712         <section ids="title-3" names="title 3">
3713             <title>
3714                 Title 3
3715             <paragraph>
3716                 Paragraph 3.
3717             <section ids="title-4" names="title 4">
3718                 <title>
3719                     Title 4
3720                 <paragraph>
3721                     Paragraph 4.
3724 ``sidebar``
3725 ===========
3727 Sidebars are like miniature, parallel documents that occur inside
3728 other documents, providing related or reference material.  A
3729 ``sidebar`` is typically offset by a border and "floats" to the side
3730 of the page; the document's main text may flow around it.  Sidebars
3731 can also be likened to super-footnotes; their content is outside of
3732 the flow of the document's main text.
3734 The ``sidebar`` element is a nonrecursive section_-like construct
3735 which may occur at the top level of a section_ wherever a body element
3736 (list, table, etc.) is allowed.  In other words, ``sidebar`` elements
3737 cannot nest inside body elements, so you can't have a ``sidebar``
3738 inside a ``table`` or a ``list``, or inside another ``sidebar`` (or
3739 topic_).
3742 Details
3743 -------
3745 :Category:
3746     `Structural Elements`_
3748 :Parents:
3749     The following elements may contain ``sidebar``: document_,
3750     section_
3752 :Children:
3753     ``sidebar`` elements begin with a title_ and an optional subtitle_
3754     and contain `body elements`_ and topic_ elements.
3756 :Analogues:
3757     ``sidebar`` is analogous to the DocBook "sidebar" element.
3759 :Processing:
3760     A ``sidebar`` element should be set off from the rest of the
3761     document somehow, typically with a border.  Sidebars typically
3762     "float" to the side of the page and the document's main text flows
3763     around them.
3766 Content Model
3767 -------------
3769 .. parsed-literal::
3771     (title_, subtitle_?,
3772      (`%body.elements;`_ | topic_)+)
3774 :Attributes:
3775     The ``sidebar`` element contains only the `common attributes`_:
3776     ids_, names_, dupnames_, source_, and classes_.
3778 :Parameter Entities:
3779     The `%structure.model;`_ parameter entity directly includes
3780     ``sidebar``.
3783 Examples
3784 --------
3786 The `"sidebar" directive`_ is used to create a ``sidebar`` element.
3787 reStructuredText_ source::
3789     .. sidebar:: Title
3790        :subtitle: If Desired
3792        Body.
3794 Pseudo-XML_ fragment from simple parsing::
3796     <sidebar>
3797         <title>
3798             Title
3799         <subtitle>
3800             If Desired
3801         <paragraph>
3802             Body.
3804 .. _"sidebar" directive: rst/directives.html#sidebar
3807 ``status``
3808 ==========
3810 The ``status`` element contains a status statement for the document,
3811 such as "Draft", "Final", "Work In Progress", etc.
3814 Details
3815 -------
3817 :Category:
3818     `Bibliographic Elements`_
3820 :Parents:
3821     Only the docinfo_ element contains ``status``.
3823 :Children:
3824     ``status`` elements may contain text data plus `inline elements`_.
3826 :Analogues:
3827     ``status`` is analogous to the DocBook "status" element.
3829 :Processing:
3830     See docinfo_.
3833 Content Model
3834 -------------
3836 .. parsed-literal::
3838     `%text.model;`_
3840 :Attributes:
3841     The ``status`` element contains only the `common attributes`_:
3842     ids_, names_, dupnames_, source_, and classes_.
3844 :Parameter Entities:
3845     The `%bibliographic.elements;`_ parameter entity directly includes
3846     ``status``.
3849 Examples
3850 --------
3852 reStructuredText_ source::
3854     Document Title
3855     ==============
3857     :Status: Work In Progress
3859 Complete pseudo-XML_ result after parsing and applying transforms::
3861     <document ids="document-title" names="document title">
3862         <title>
3863             Document Title
3864         <docinfo>
3865             <status>
3866                 Work In Progress
3868 See docinfo_ for a more complete example, including processing
3869 context.
3872 ``strong``
3873 ==========
3875 `To be completed`_.
3878 ``subscript``
3879 =============
3881 `To be completed`_.
3884 ``substitution_definition``
3885 ===========================
3887 `To be completed`_.
3890 ``substitution_reference``
3891 ==========================
3893 `To be completed`_.
3896 ``subtitle``
3897 ============
3899 The ``subtitle`` element stores the subtitle of a document_.
3902 Details
3903 -------
3905 :Category:
3906     `Structural Subelements`_
3908 :Parents:
3909     The document_ and sidebar_ elements may contain ``subtitle``.
3911 :Children:
3912     ``subtitle`` elements may contain text data plus `inline
3913     elements`_.
3915 :Analogues:
3916     ``subtitle`` is analogous to HTML header elements ("h2" etc.) and
3917     to the DocBook "subtitle" element.
3919 :Processing:
3920     A document's subtitle is usually rendered smaller than its title_.
3923 Content Model
3924 -------------
3926 .. parsed-literal::
3928     `%text.model;`_
3930 :Attributes:
3931     The ``subtitle`` element contains only the `common attributes`_:
3932     ids_, names_, dupnames_, source_, and classes_.
3935 Examples
3936 --------
3938 reStructuredText_ source::
3940     =======
3941      Title
3942     =======
3943     ----------
3944      Subtitle
3945     ----------
3947     A paragraph.
3949 Complete pseudo-XML_ result after parsing and applying transforms::
3951     <document ids="title" names="title">
3952         <title>
3953             Title
3954         <subtitle ids="subtitle" names="subtitle">
3955             Subtitle
3956         <paragraph>
3957             A paragraph.
3959 Note how two section levels have collapsed, promoting their titles to
3960 become the document's title and subtitle.  Since there is only one
3961 structural element (document), the subsection's ``ids`` and ``names``
3962 attributes are stored in the ``subtitle`` element.
3965 ``superscript``
3966 ===============
3968 `To be completed`_.
3971 ``system_message``
3972 ==================
3974 `To be completed`_.
3977 ``table``
3978 =========
3980 Docutils tables are based on the Exchange subset of the CALS-table model
3981 (OASIS Technical Memorandum 9901:1999 "XML Exchange Table Model DTD",
3982 http://www.oasis-open.org/html/tm9901.htm).
3984 `To be completed`_.
3987 ``target``
3988 ==========
3990 `To be completed`_.
3993 ``tbody``
3994 =========
3996 `To be completed`_.
3999 ``term``
4000 ========
4002 The ``term`` element contains a word or phrase being defined in a
4003 definition_list_.
4006 Details
4007 -------
4009 :Category:
4010     `Body Subelements`_ (simple)
4012 :Parents:
4013     Only the definition_list_item_ element contains ``term``.
4015 :Children:
4016     ``term`` elements may contain text data plus `inline elements`_.
4018 :Analogues:
4019     ``term`` is analogous to the HTML "dt" element and to the DocBook
4020     "term" element.
4022 :Processing:
4023     See definition_list_item_.
4026 Content Model
4027 -------------
4029 .. parsed-literal::
4031     `%text.model;`_
4033 :Attributes:
4034     The ``term`` element contains only the `common attributes`_:
4035     ids_, names_, dupnames_, source_, and classes_.
4038 Examples
4039 --------
4041 See the examples for the definition_list_, definition_list_item_, and
4042 classifier_ elements.
4045 ``tgroup``
4046 ==========
4048 `To be completed`_.
4051 ``thead``
4052 =========
4054 `To be completed`_.
4057 ``tip``
4058 =======
4060 The ``tip`` element is an admonition, a distinctive and self-contained
4061 notice.  Also see the other admonition elements Docutils offers (in
4062 alphabetical order): attention_, caution_, danger_, error_, hint_,
4063 important_, note_, warning_, and the generic admonition_.
4066 Details
4067 -------
4069 :Category:
4070     `Compound Body Elements`_
4072 :Parents:
4073     All elements employing the `%body.elements;`_ or
4074     `%structure.model;`_ parameter entities in their content models
4075     may contain ``tip``.
4077 :Children:
4078     ``tip`` elements contain one or more `body elements`_.
4080 :Analogues:
4081     ``tip`` is analogous to the DocBook "tip" element.
4083 :Processing:
4084     Rendered distinctly (inset and/or in a box, etc.), with the
4085     generated title "Tip" (or similar).
4088 Content Model
4089 -------------
4091 .. parsed-literal::
4093    (`%body.elements;`_)+
4095 :Attributes:
4096     The ``tip`` element contains only the `common attributes`_: ids_,
4097     names_, dupnames_, source_, and classes_.
4099 :Parameter Entities:
4100     The `%body.elements;`_ parameter entity directly includes ``tip``.
4101     The `%structure.model;`_ parameter entity indirectly includes
4102     ``tip``.
4105 Examples
4106 --------
4108 reStructuredText source::
4110     .. Tip:: 15% if the service is good.
4112 Pseudo-XML_ fragment from simple parsing::
4114     <tip>
4115         <paragraph>
4116             15% if the service is good.
4119 .. _title:
4121 ``title``
4122 =========
4124 The ``title`` element stores the title of a document_, section_,
4125 topic_, sidebar_, or generic admonition_.
4128 Details
4129 -------
4131 :Category:
4132     `Structural Subelements`_
4134 :Parents:
4135     The following elements may contain ``title``: document_, section_,
4136     topic_, sidebar_, admonition_
4138 :Children:
4139     ``title`` elements may contain text data plus `inline elements`_.
4141 :Analogues:
4142     ``title`` is analogous to HTML "title" and header ("h1" etc.)
4143     elements, and to the DocBook "title" element.
4146 Content Model
4147 -------------
4149 .. parsed-literal::
4151     `%text.model;`_
4153 :Attributes:
4154     The ``title`` element contains the `common attributes`_ (ids_,
4155     names_, dupnames_, source_, and classes_), plus refid_ and auto_.
4157     ``refid`` is used as a backlink to a table of contents entry.
4159     ``auto`` is used to indicate (with value "1") that the ``title``
4160     has been numbered automatically.
4163 Examples
4164 --------
4166 reStructuredText_ source::
4168     A Title
4169     =======
4171     A paragraph.
4173 Pseudo-XML_ fragment from simple parsing::
4175     <section ids="a-title" names="a title">
4176         <title>
4177             A Title
4178         <paragraph>
4179             A paragraph.
4182 ``title_reference``
4183 ===================
4185 `To be completed`_.
4188 ``topic``
4189 =========
4191 The ``topic`` element is a nonrecursive section_-like construct which
4192 may occur at the top level of a section_ wherever a body element
4193 (list, table, etc.) is allowed.  In other words, ``topic`` elements
4194 cannot nest inside body elements, so you can't have a ``topic`` inside
4195 a ``table`` or a ``list``, or inside another ``topic``.
4198 Details
4199 -------
4201 :Category:
4202     `Structural Elements`_
4204 :Parents:
4205     The following elements may contain ``topic``: document_, section_,
4206     sidebar_
4208 :Children:
4209     ``topic`` elements begin with a title_ and may contain `body
4210     elements`_.
4212 :Analogues:
4213     ``topic`` is analogous to the DocBook "simplesect" element.
4215 :Processing:
4216     A ``topic`` element should be set off from the rest of the
4217     document somehow, such as with indentation or a border.
4220 Content Model
4221 -------------
4223 .. parsed-literal::
4225     (title_?,
4226      (`%body.elements;`_)+)
4228 :Attributes:
4229     The ``topic`` element contains only the `common attributes`_:
4230     ids_, names_, dupnames_, source_, and classes_.
4232 :Parameter Entities:
4233     The `%structure.model;`_ parameter entity directly includes
4234     ``topic``.
4237 Examples
4238 --------
4240 The `"topic" directive`_ is used to create a ``topic`` element.
4241 reStructuredText_ source::
4243     .. topic:: Title
4245        Body.
4247 Pseudo-XML_ fragment from simple parsing::
4249     <topic>
4250         <title>
4251             Title
4252         <paragraph>
4253             Body.
4255 .. _"topic" directive: rst/directives.html#topic
4258 ``transition``
4259 ==============
4261 The ``transition`` element is commonly seen in novels and short
4262 fiction, as a gap spanning one or more lines, with or without a type
4263 ornament such as a row of asterisks.  Transitions separate body
4264 elements and sections, dividing a section into untitled divisions.  A
4265 transition may not begin or end a section [#]_ or document, nor may
4266 two transitions be immediately adjacent.
4268 See `Doctree Representation of Transitions`__ in `A Record of
4269 reStructuredText Syntax Alternatives`__.
4271 .. [#] In reStructuredText markup, a transition may appear to fall at
4272    the end of a section immediately before another section.  A
4273    transform recognizes this case and moves the transition so it
4274    separates the sections.
4276 __ ../dev/rst/alternatives.html#doctree-representation-of-transitions
4277 __ ../dev/rst/alternatives.html
4280 Details
4281 -------
4283 :Category:
4284     `Structural Subelements`_
4286 :Parents:
4287     The following elements may contain ``transition``: document_,
4288     section_
4290 :Children:
4291     ``transition`` is an empty element and has no children.
4293 :Analogues:
4294     ``transition`` is analogous to the HTML "hr" element.
4296 :Processing:
4297     The ``transition`` element is typically rendered as vertical
4298     whitespace (more than that separating paragraphs), with or without
4299     a horizontal line or row of asterisks.  In novels, transitions are
4300     often represented as a row of three well-spaced asterisks with
4301     vertical space above and below.
4304 Content Model
4305 -------------
4309     EMPTY
4311 The ``transition`` element has no content; it is a "point element".
4313 :Attributes:
4314     The ``transition`` element contains only the `common attributes`_:
4315     ids_, names_, dupnames_, source_, and classes_.
4317 :Parameter Entities:
4318     The `%structure.model;`_ parameter entity directly includes
4319     ``transition``.
4322 Examples
4323 --------
4325 reStructuredText_ source::
4327     Paragraph 1.
4329     --------
4331     Paragraph 2.
4333 Complete pseudo-XML_ result after parsing::
4335     <document>
4336         <paragraph>
4337             Paragraph 1.
4338         <transition>
4339         <paragraph>
4340             Paragraph 2.
4343 ``version``
4344 ===========
4346 The ``version`` element contains the version number of the document.
4347 It can be used alone or in conjunction with revision_.
4350 Details
4351 -------
4353 :Category:
4354     `Bibliographic Elements`_
4356 :Parents:
4357     Only the docinfo_ element contains ``version``.
4359 :Children:
4360     ``version`` elements may contain text data plus `inline
4361     elements`_.
4363 :Analogues:
4364     ``version`` may be considered analogous to the DocBook "revision",
4365     "revnumber", or "biblioid" elements.
4367 :Processing:
4368     Sometimes used with the RCS/CVS keyword "Revision".  See docinfo_
4369     and revision_.
4372 Content Model
4373 -------------
4375 .. parsed-literal::
4377     `%text.model;`_
4379 :Attributes:
4380     The ``version`` element contains only the `common attributes`_:
4381     ids_, names_, dupnames_, source_, and classes_.
4383 :Parameter Entities:
4384     The `%bibliographic.elements;`_ parameter entity directly includes
4385     ``version``.
4388 Examples
4389 --------
4391 reStructuredText_ source::
4393     Document Title
4394     ==============
4396     :Version: 1.1
4398 Complete pseudo-XML_ result after parsing and applying transforms::
4400     <document ids="document-title" names="document title">
4401         <title>
4402             Document Title
4403         <docinfo>
4404             <version>
4405                 1.1
4407 See docinfo_ for a more complete example, including processing
4408 context.
4411 ``warning``
4412 ===========
4414 The ``warning`` element is an admonition, a distinctive and
4415 self-contained notice.  Also see the other admonition elements
4416 Docutils offers (in alphabetical order): attention_, caution_,
4417 danger_, error_, hint_, important_, note_, tip_.
4420 Details
4421 -------
4423 :Category:
4424     `Compound Body Elements`_
4426 :Parents:
4427     All elements employing the `%body.elements;`_ or
4428     `%structure.model;`_ parameter entities in their content models
4429     may contain ``warning``.
4431 :Children:
4432     ``warning`` elements contain one or more `body elements`_.
4434 :Analogues:
4435     ``warning`` is analogous to the DocBook "warning" element.
4437 :Processing:
4438     Rendered distinctly (inset and/or in a box, etc.), with the
4439     generated title "Warning" (or similar).
4442 Content Model
4443 -------------
4445 .. parsed-literal::
4447    (`%body.elements;`_)+
4449 :Attributes:
4450     The ``warning`` element contains only the `common attributes`_:
4451     ids_, names_, dupnames_, source_, and classes_.
4453 :Parameter Entities:
4454     The `%body.elements;`_ parameter entity directly includes
4455     ``warning``.  The `%structure.model;`_ parameter entity indirectly
4456     includes ``warning``.
4459 Examples
4460 --------
4462 reStructuredText source::
4464     .. WARNING:: Reader discretion is strongly advised.
4466 Pseudo-XML_ fragment from simple parsing::
4468     <warning>
4469         <paragraph>
4470             Reader discretion is strongly advised.
4473 ---------------------
4474  Attribute Reference
4475 ---------------------
4477 .. contents:: :local:
4478               :depth: 1
4480 _`Common Attributes`: Through the `%basic.atts;`_ parameter entity,
4481 all elements contain the following attributes: ids_, names_, dupnames_,
4482 source_, and classes_.
4484 .. _attribute type:
4486 Attribute types:
4488 ``CDATA``
4489     Character data.  ``CDATA`` attributes may contain arbitrary text.
4491 ``ID``
4492     Like a ``NMTOKEN``, but it must begin with a letter (a "name
4493     production").  Identical ``ID`` values must not appear more than
4494     once in a document; i.e., ID values must uniquely identify their
4495     elements.
4497 ``IDREF``
4498     A reference to an ``ID`` value (a name production) of another
4499     element.
4501 ``IDREFS``
4502     One or more space-separated ``ID`` references (name productions).
4504 ``NMTOKEN``
4505     A "name token".  One or more of letters, digits, ".", "-", and
4506     "_".
4508 ``NMTOKENS``
4509     One or more space-separated ``NMTOKEN`` names.
4511 ``%yesorno;``
4512     No if zero ("0"), yes if any other value.  This is a parameter
4513     entity which resolves to a ``NMTOKEN`` attribute type.
4515 ``%number;``
4516     This emphasizes that the attribute value must be a number.  This
4517     is a parameter entity which resolves to a ``NMTOKEN`` attribute
4518     type.
4520 enumeration
4521     The attribute value may be one of a specified list of values.
4524 ``anonymous``
4525 =============
4527 `Attribute type`_: ``%yesorno;``.  Default value: none (implies no).
4529 The ``anonymous`` attribute is used for unnamed hyperlinks in the
4530 target_ and reference_ elements (via the `%anonymous.att;`_ parameter
4531 entity).
4534 ``auto``
4535 ========
4537 `Attribute type`_: ``CDATA``.  Default value: none.
4539 The ``auto`` attribute is used to indicate automatically-numbered
4540 footnote_, footnote_reference_ and title_ elements (via the
4541 `%auto.att;`_ parameter entity).
4544 ``backrefs``
4545 ============
4547 `Attribute type`_: ``IDREFS``.  Default value: none.
4549 The ``backrefs`` attribute contains a space-separated list of ids_
4550 references, used for backlinks from footnote_, citation_, and
4551 system_message_ elements (via the `%backrefs.att;`_ parameter entity).
4554 ``bullet``
4555 ==========
4557 `Attribute type`_: ``CDATA``.  Default value: none.
4559 The ``bullet`` attribute is used in the bullet_list_ element.
4562 ``classes``
4563 ===========
4565 `Attribute type`_: ``NMTOKENS``.  Default value: none.
4567 The ``classes`` attribute is a list containing zero or more names used
4568 to classify an element. The names are converted to conform to the
4569 regular expression ``[a-z](-?[a-z0-9]+)*`` (see the `"class"
4570 directive`_ description for details and rationale_).
4572 The purpose of the attribute is to indicate
4573 an "is-a" variant relationship, to allow an extensible way of defining
4574 sub-classes of existing elements.  It can be used to carry context
4575 forward between a Docutils Reader and Writer, when a custom structure
4576 is reduced to a standardized document tree.  One common use is in
4577 conjunction with stylesheets, to add selection criteria.  It should
4578 not be used to carry formatting instructions or arbitrary content.
4580 The ``classes`` attribute's contents should be ignorable.  Writers that
4581 are not familiar with the variant expressed should be able to ignore
4582 the attribute.
4584 ``classes`` is one of the `common attributes`_, shared by all Docutils
4585 elements.
4587 .. _"class" directive: rst/directives.html#class
4588 .. _rationale: rst/directives.html#rationale
4590 ``delimiter``
4591 =============
4593 `Attribute type`_: ``CDATA``.  Default value: none.
4595 The ``delimiter`` attribute is used in the option_argument_ element.
4598 ``dupnames``
4599 ============
4601 `Attribute type`_: ``CDATA``.  Default value: none.
4603 The ``dupnames`` attribute is a list containing the names of an
4604 element when there has been a naming conflict.  The contents of the
4605 ``dupnames`` attribute would have been transferred from the `names`_
4606 attribute.  An element may have at most one of the ``names`` or
4607 ``dupnames`` attributes, but not both.  ``dupnames`` is one of the
4608 `common attributes`_, shared by all Docutils elements.
4611 ``enumtype``
4612 ============
4614 `Attribute type`_: enumeration, one of "arabic", "loweralpha",
4615 "upperalpha", "lowerroman", or "upperroman".  Default value: none.
4617 The ``enumtype`` attribute is used in the enumerated_list_ element.
4620 ``ids``
4621 =======
4623 `Attribute type`_: ``NMTOKENS``.  Default value: none.
4625 The ``ids`` attribute is a list containing one or more unique
4626 identifier keys.  ``ids`` is one of the `common attributes`_, shared
4627 by all Docutils elements.
4630 ``names``
4631 =========
4633 `Attribute type`_: ``CDATA``.  Default value: none.
4635 The ``names`` attribute is a list containing the names of an element,
4636 typically originating from the element's title or content.  Each name
4637 in ``names`` must be unique; if there are name conflicts (two or more
4638 elements want to the same name), the contents will be transferred to
4639 the `dupnames`_ attribute on the duplicate elements.  An element may
4640 have at most one of the ``names`` or ``dupnames`` attributes, but not
4641 both.  ``names`` is one of the `common attributes`_, shared by all
4642 Docutils elements.
4645 ``prefix``
4646 ==========
4648 `Attribute type`_: ``CDATA``.  Default value: none.
4650 The ``prefix`` attribute is used in the enumerated_list_ element.
4653 ``refid``
4654 =========
4656 `Attribute type`_: ``IDREF``.  Default value: none.
4658 The ``refid`` attribute contains references to `ids`_ attributes in
4659 other elements.  It is used by the target_, reference_,
4660 footnote_reference_, citation_reference_, title_ and problematic_
4661 elements (via the `%refid.att;`_ and `%reference.atts;`_ parameter
4662 entities).
4665 ``refname``
4666 ===========
4668 `Attribute type`_: ``NMTOKENS``.  Default value: none.
4670 The ``refname`` attribute contains an internal reference to the
4671 `names`_ attribute of another element.  On a `target`_ element,
4672 ``refname`` indicates an indirect target which may resolve to either
4673 an internal or external reference.  ``refname`` is used by the
4674 target_, reference_, footnote_reference_, citation_reference_, and
4675 substitution_reference_ elements (via the `%refname.att;`_ and
4676 `%reference.atts;`_ parameter entities).
4679 ``refuri``
4680 ==========
4682 `Attribute type`_: ``CDATA``.  Default value: none.
4684 The ``refuri`` attribute contains an external reference to a URI/URL.
4685 It is used by the target_, reference_, footnote_reference_, and
4686 citation_reference_ elements (via the `%reference.atts;`_ parameter
4687 entity).
4690 ``source``
4691 ==========
4693 `Attribute type`_: ``CDATA``.  Default value: none.
4695 The ``source`` attribute is used to store the path or URL to the
4696 source text that was used to produce the document tree.  It is one of
4697 the `common attributes`_, shared by all Docutils elements.
4700 ``start``
4701 =========
4703 `Attribute type`_: ``%number;``.  Default value: none.
4705 The ``start`` attribute is used in the enumerated_list_ element.
4708 ``suffix``
4709 ==========
4711 `Attribute type`_: ``CDATA``.  Default value: none.
4713 The ``suffix`` attribute is used in the enumerated_list_ element.
4716 ``xml:space``
4717 =============
4719 `Attribute type`_: one of "default" or "preserve".  Default value:
4720 "preserve" (fixed).
4722 The ``xml:space`` attribute is a standard XML attribute for
4723 whitespace-preserving elements.  It is used by the literal_block_,
4724 line_block_, doctest_block_, comment_, and raw_ elements (via the
4725 `%fixedspace.att;`_ parameter entity).  It is a fixed attribute, meant
4726 to communicate to an XML parser that the element contains significant
4727 whitespace.  The attribute value should not be set in a document
4728 instance.
4731 .. _title (attribute):
4733 ``title``
4734 =========
4736 `Attribute type`_: ``CDATA``.  Default value: none.
4738 The ``title`` attribute stores the title metadata of a document.  This
4739 title is typically not part of the rendered document.  It may for
4740 example be used in HTML's ``title`` element.
4743 ----------------------------
4744  Parameter Entity Reference
4745 ----------------------------
4747 .. contents:: :local:
4748               :depth: 1
4750 Parameter entities are used to simplify the DTD (to share definitions
4751 and reduce duplication) and to allow the DTD to be customized by
4752 wrapper DTDs (external client DTDs that use or import the Docutils
4753 DTD).  Parameter entities may be overridden by wrapper DTDs, replacing
4754 the definitions below with custom definitions.  Parameter entities
4755 whose names begin with "additional" are meant to allow easy extension
4756 by wrapper DTDs.
4759 ``%anonymous.att;``
4760 ===================
4762 The ``%anonymous.att;`` parameter entity contains the anonymous_
4763 attribute, used for unnamed hyperlinks.
4765 Entity definition:
4767 .. parsed-literal::
4769     anonymous_ %yesorno; #IMPLIED
4771 The reference_ and target_ elements directly employ the
4772 ``%anonymous.att;`` parameter entity in their attribute lists.
4775 ``%auto.att;``
4776 ==============
4778 The ``%auto.att;`` parameter entity contains the auto_ attribute, used
4779 to indicate an automatically-numbered footnote or title.
4781 Entity definition:
4783 .. parsed-literal::
4785     auto_     CDATA     #IMPLIED
4787 The footnote_, footnote_reference_, and title_ elements directly
4788 employ the ``%auto.att;`` parameter entity in their attribute lists.
4791 ``%backrefs.att;``
4792 ==================
4794 The ``%backrefs.att;`` parameter entity contains the backrefs_
4795 attribute, a space-separated list of id references, for backlinks.
4797 Entity definition:
4799 .. parsed-literal::
4801     backrefs_  IDREFS    #IMPLIED
4803 The citation_, footnote_, and system_message_ elements directly employ
4804 the ``%backrefs.att;`` parameter entity in their attribute lists.
4807 ``%basic.atts;``
4808 ================
4810 The ``%basic.atts;`` parameter entity lists attributes common to all
4811 Docutils elements.  See `Common Attributes`_.
4813 Entity definition:
4815 .. parsed-literal::
4817     ids_      NMTOKENS  #IMPLIED
4818     names_    CDATA     #IMPLIED
4819     dupnames_ CDATA     #IMPLIED
4820     source_   CDATA     #IMPLIED
4821     classes_  NMTOKENS  #IMPLIED
4822     %additional.basic.atts;
4824 The ``%additional.basic.atts;`` parameter entity can be used by
4825 wrapper DTDs to extend ``%basic.atts;``.
4828 ``%bibliographic.elements;``
4829 ============================
4831 The ``%bibliographic.elements;`` parameter entity contains an OR-list of all
4832 `bibliographic elements`_.
4834 Entity definition:
4836 .. parsed-literal::
4838     author_ | authors_ | organization_ | contact_ | address_
4839     | version_ | revision_ | status_ | date_ | copyright_
4840     | field_
4841     %additional.bibliographic.elements;
4843 The ``%additional.bibliographic.elements;`` parameter entity can be used by
4844 wrapper DTDs to extend ``%bibliographic.elements;``.
4846 Only the docinfo_ element directly employs the
4847 ``%bibliographic.elements;`` parameter entity in its content model.
4850 ``%body.elements;``
4851 ===================
4853 The ``%body.elements;`` parameter entity contains an OR-list of all
4854 `body elements`_.  ``%body.elements;`` is itself contained within the
4855 `%structure.model;`_ parameter entity.
4857 Entity definition:
4859 .. parsed-literal::
4861     admonition_ | attention_ | block_quote_ | bullet_list_ | caution_
4862     | citation_ | compound_ | comment_ | container_ | danger_ |
4863       definition_list_ | doctest_block_ | enumerated_list_ | error_ |
4864       field_list_ | figure_ | footnote_ | hint_ | image_ | important_
4865       | line_block_ | literal_block_ | note_ | option_list_ |
4866       paragraph_ | pending_ | raw_ reference_ | rubric_ |
4867       substitution_definition_ | system_message_ | table_ | target_ |
4868       tip_ | warning_ %additional.body.elements;
4870 The ``%additional.body.elements;`` parameter entity can be used by
4871 wrapper DTDs to extend ``%body.elements;``.
4873 The ``%body.elements;`` parameter entity is directly employed in the
4874 content models of the following elements: admonition_, attention_,
4875 block_quote_, caution_, citation_, compound_, danger_, definition_,
4876 description_, entry_, error_, field_body_, footer_, footnote_,
4877 header_, hint_, important_, legend_, list_item_, note_, sidebar_,
4878 system_message_, tip_, topic_, warning_
4880 Via `%structure.model;`_, the ``%body.elements;`` parameter entity is
4881 indirectly employed in the content models of the document_ and
4882 section_ elements.
4885 ``%fixedspace.att;``
4886 ====================
4888 The ``%fixedspace.att;`` parameter entity contains the `xml:space`_
4889 attribute, a standard XML attribute for whitespace-preserving
4890 elements.
4892 Entity definition:
4894 .. parsed-literal::
4896     `xml:space`_ (default | preserve) #FIXED 'preserve'
4898 The ``%fixedspace.att;`` parameter entity is directly employed in the
4899 attribute lists of the following elements: address_, comment_,
4900 doctest_block_, line_block_, literal_block_, raw_
4903 ``%inline.elements;``
4904 =====================
4906 The ``%inline.elements;`` parameter entity contains an OR-list of all
4907 `inline elements`_.
4909 Entity definition:
4911 .. parsed-literal::
4913     abbreviation_ | acronym_ | citation_reference_ | emphasis_ |
4914     footnote_reference_ | generated_ | image_ | inline_ | literal_ |
4915     problematic_ | raw_ | reference_ | strong_ | substitution_reference_ |
4916     subscript_ | superscript_ | target_ | title_reference_
4917     %additional.inline.elements;
4919 The ``%additional.inline.elements;`` parameter entity can be used by
4920 wrapper DTDs to extend ``%inline.elements;``.
4922 Via `%text.model;`_, the ``%inline.elements;`` parameter entity is
4923 indirectly employed in the content models of the following elements:
4924 abbreviation_, acronym_, address_, attribution_, author_, caption_,
4925 classifier_, contact_, copyright_, date_, doctest_block_, emphasis_,
4926 generated_, inline_, line_block_, literal_block_, math_, math_block_,
4927 organization_,
4928 paragraph_, problematic_, raw_, reference_, revision_, rubric_,
4929 status_, strong_, subscript_, substitution_definition_,
4930 substitution_reference_, subtitle_, superscript_, target_, term_,
4931 title_, title_reference_, version_
4934 ``%reference.atts;``
4935 ====================
4937 The ``%reference.atts;`` parameter entity groups together the refuri_,
4938 refid_, and refname_ attributes.
4940 Entity definition:
4942 .. parsed-literal::
4944     `%refuri.att;`_
4945     `%refid.att;`_
4946     `%refname.att;`_
4947     %additional.reference.atts;
4949 The ``%additional.reference.atts;`` parameter entity can be used by
4950 wrapper DTDs to extend ``%additional.reference.atts;``.
4952 The citation_reference_, footnote_reference_, reference_, and target_
4953 elements directly employ the ``%reference.att;`` parameter entity in
4954 their attribute lists.
4957 ``%refid.att;``
4958 ================
4960 The ``%refid.att;`` parameter entity contains the refid_ attribute, an
4961 internal reference to the `ids`_ attribute of another element.
4963 Entity definition:
4965 .. parsed-literal::
4967     refid_   CDATA     #IMPLIED
4969 The title_ and problematic_ elements directly employ the
4970 ``%refid.att;`` parameter entity in their attribute lists.
4972 Via `%reference.atts;`_, the ``%refid.att;`` parameter entity is
4973 indirectly employed in the attribute lists of the citation_reference_,
4974 footnote_reference_, reference_, and target_ elements.
4977 ``%refname.att;``
4978 =================
4980 The ``%refname.att;`` parameter entity contains the refname_
4981 attribute, an internal reference to the `names`_ attribute of another
4982 element.  On a `target`_ element, ``refname`` indicates an indirect
4983 target which may resolve to either an internal or external
4984 reference.
4986 Entity definition:
4988 .. parsed-literal::
4990     refname_  NMTOKENS  #IMPLIED
4992 The substitution_reference_ element directly employs the
4993 ``%refname.att;`` parameter entity in its attribute list.
4995 Via `%reference.atts;`_, the ``%refname.att;`` parameter entity is
4996 indirectly employed in the attribute lists of the citation_reference_,
4997 footnote_reference_, reference_, and target_ elements.
5000 ``%refuri.att;``
5001 ================
5003 The ``%refuri.att;`` parameter entity contains the refuri_ attribute,
5004 an external reference to a URI/URL.
5006 Entity definition:
5008 .. parsed-literal::
5010     refuri_   CDATA     #IMPLIED
5012 Via `%reference.atts;`_, the ``%refuri.att;`` parameter entity is
5013 indirectly employed in the attribute lists of the citation_reference_,
5014 footnote_reference_, reference_, and target_ elements.
5017 ``%section.elements;``
5018 ======================
5020 The ``%section.elements;`` parameter entity contains an OR-list of all
5021 section_-equivalent elements.  ``%section.elements;`` is itself
5022 contained within the `%structure.model;`_ parameter entity.
5024 Entity definition:
5026 .. parsed-literal::
5028     section_
5029     %additional.section.elements;
5031 The ``%additional.section.elements;`` parameter entity can be used
5032 by wrapper DTDs to extend ``%section.elements;``.
5034 Via `%structure.model;`_, the ``%section.elements;`` parameter entity
5035 is indirectly employed in the content models of the document_ and
5036 section_ elements.
5039 ``%structure.model;``
5040 =====================
5042 The ``%structure.model;`` parameter entity encapsulates the
5043 hierarchical structure of a document and of its constituent parts.
5044 See the discussion of the `element hierarchy`_ above.
5046 Entity definition:
5048 .. parsed-literal::
5050    ( ( (`%body.elements;`_ | topic_ | sidebar_)+, transition_? )*,
5051      ( (`%section.elements;`_), (transition_?, (`%section.elements;`_) )* )? )
5053 Each document_ or section_ contains zero or more body elements,
5054 topics, and/or sidebars, optionally interspersed with single
5055 transitions, followed by zero or more sections (whose contents are
5056 recursively the same as this model) optionally interspersed with
5057 transitions.
5059 The following restrictions are imposed by this model:
5061 * Transitions must be separated by other elements (body elements,
5062   sections, etc.).  In other words, a transition may not be
5063   immediately adjacent to another transition.
5065 * A transition may not occur at the beginning of a document or
5066   section.
5068 An additional restriction, which cannot be expressed in the language
5069 of DTDs, is imposed by software:
5071 * A transition may not occur at the end of a document or section.
5073 The `%structure.model;`_ parameter entity is directly employed in the
5074 content models of the document_ and section_ elements.
5077 ``%text.model;``
5078 ================
5080 The ``%text.model;`` parameter entity is used by many elements to
5081 represent text data mixed with `inline elements`_.
5083 Entity definition:
5085 .. parsed-literal::
5087     (#PCDATA | `%inline.elements;`_)*
5089 The ``%text.model;`` parameter entity is directly employed in the
5090 content models of the following elements: abbreviation_, acronym_,
5091 address_, author_, caption_, classifier_, contact_, copyright_, date_,
5092 doctest_block_, emphasis_, field_name_, generated_, line_block_,
5093 literal_block_, organization_, paragraph_, problematic_, raw_,
5094 reference_, revision_, status_, strong_, substitution_definition_,
5095 substitution_reference_, subtitle_, target_, term_, title_, version_
5100    Local Variables:
5101    mode: indented-text
5102    indent-tabs-mode: nil
5103    sentence-end-double-space: t
5104    fill-column: 70
5105    End: