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