/Doc/documenting/markup.rst

http://unladen-swallow.googlecode.com/ · ReStructuredText · 823 lines · 537 code · 286 blank · 0 comment · 0 complexity · 1449a5d251283f1c36726cb74eb39b05 MD5 · raw file

  1. .. highlightlang:: rest
  2. Additional Markup Constructs
  3. ============================
  4. Sphinx adds a lot of new directives and interpreted text roles to standard reST
  5. markup. This section contains the reference material for these facilities.
  6. Documentation for "standard" reST constructs is not included here, though
  7. they are used in the Python documentation.
  8. .. note::
  9. This is just an overview of Sphinx' extended markup capabilities; full
  10. coverage can be found in `its own documentation
  11. <http://sphinx.pocoo.org/contents.html>`_.
  12. Meta-information markup
  13. -----------------------
  14. .. describe:: sectionauthor
  15. Identifies the author of the current section. The argument should include
  16. the author's name such that it can be used for presentation (though it isn't)
  17. and email address. The domain name portion of the address should be lower
  18. case. Example::
  19. .. sectionauthor:: Guido van Rossum <guido@python.org>
  20. Currently, this markup isn't reflected in the output in any way, but it helps
  21. keep track of contributions.
  22. Module-specific markup
  23. ----------------------
  24. The markup described in this section is used to provide information about a
  25. module being documented. Each module should be documented in its own file.
  26. Normally this markup appears after the title heading of that file; a typical
  27. file might start like this::
  28. :mod:`parrot` -- Dead parrot access
  29. ===================================
  30. .. module:: parrot
  31. :platform: Unix, Windows
  32. :synopsis: Analyze and reanimate dead parrots.
  33. .. moduleauthor:: Eric Cleese <eric@python.invalid>
  34. .. moduleauthor:: John Idle <john@python.invalid>
  35. As you can see, the module-specific markup consists of two directives, the
  36. ``module`` directive and the ``moduleauthor`` directive.
  37. .. describe:: module
  38. This directive marks the beginning of the description of a module (or package
  39. submodule, in which case the name should be fully qualified, including the
  40. package name).
  41. The ``platform`` option, if present, is a comma-separated list of the
  42. platforms on which the module is available (if it is available on all
  43. platforms, the option should be omitted). The keys are short identifiers;
  44. examples that are in use include "IRIX", "Mac", "Windows", and "Unix". It is
  45. important to use a key which has already been used when applicable.
  46. The ``synopsis`` option should consist of one sentence describing the
  47. module's purpose -- it is currently only used in the Global Module Index.
  48. The ``deprecated`` option can be given (with no value) to mark a module as
  49. deprecated; it will be designated as such in various locations then.
  50. .. describe:: moduleauthor
  51. The ``moduleauthor`` directive, which can appear multiple times, names the
  52. authors of the module code, just like ``sectionauthor`` names the author(s)
  53. of a piece of documentation. It too does not result in any output currently.
  54. .. note::
  55. It is important to make the section title of a module-describing file
  56. meaningful since that value will be inserted in the table-of-contents trees
  57. in overview files.
  58. Information units
  59. -----------------
  60. There are a number of directives used to describe specific features provided by
  61. modules. Each directive requires one or more signatures to provide basic
  62. information about what is being described, and the content should be the
  63. description. The basic version makes entries in the general index; if no index
  64. entry is desired, you can give the directive option flag ``:noindex:``. The
  65. following example shows all of the features of this directive type::
  66. .. function:: spam(eggs)
  67. ham(eggs)
  68. :noindex:
  69. Spam or ham the foo.
  70. The signatures of object methods or data attributes should always include the
  71. type name (``.. method:: FileInput.input(...)``), even if it is obvious from the
  72. context which type they belong to; this is to enable consistent
  73. cross-references. If you describe methods belonging to an abstract protocol,
  74. such as "context managers", include a (pseudo-)type name too to make the
  75. index entries more informative.
  76. The directives are:
  77. .. describe:: cfunction
  78. Describes a C function. The signature should be given as in C, e.g.::
  79. .. cfunction:: PyObject* PyType_GenericAlloc(PyTypeObject *type, Py_ssize_t nitems)
  80. This is also used to describe function-like preprocessor macros. The names
  81. of the arguments should be given so they may be used in the description.
  82. Note that you don't have to backslash-escape asterisks in the signature,
  83. as it is not parsed by the reST inliner.
  84. .. describe:: cmember
  85. Describes a C struct member. Example signature::
  86. .. cmember:: PyObject* PyTypeObject.tp_bases
  87. The text of the description should include the range of values allowed, how
  88. the value should be interpreted, and whether the value can be changed.
  89. References to structure members in text should use the ``member`` role.
  90. .. describe:: cmacro
  91. Describes a "simple" C macro. Simple macros are macros which are used
  92. for code expansion, but which do not take arguments so cannot be described as
  93. functions. This is not to be used for simple constant definitions. Examples
  94. of its use in the Python documentation include :cmacro:`PyObject_HEAD` and
  95. :cmacro:`Py_BEGIN_ALLOW_THREADS`.
  96. .. describe:: ctype
  97. Describes a C type. The signature should just be the type name.
  98. .. describe:: cvar
  99. Describes a global C variable. The signature should include the type, such
  100. as::
  101. .. cvar:: PyObject* PyClass_Type
  102. .. describe:: data
  103. Describes global data in a module, including both variables and values used
  104. as "defined constants." Class and object attributes are not documented
  105. using this environment.
  106. .. describe:: exception
  107. Describes an exception class. The signature can, but need not include
  108. parentheses with constructor arguments.
  109. .. describe:: function
  110. Describes a module-level function. The signature should include the
  111. parameters, enclosing optional parameters in brackets. Default values can be
  112. given if it enhances clarity. For example::
  113. .. function:: Timer.repeat([repeat=3[, number=1000000]])
  114. Object methods are not documented using this directive. Bound object methods
  115. placed in the module namespace as part of the public interface of the module
  116. are documented using this, as they are equivalent to normal functions for
  117. most purposes.
  118. The description should include information about the parameters required and
  119. how they are used (especially whether mutable objects passed as parameters
  120. are modified), side effects, and possible exceptions. A small example may be
  121. provided.
  122. .. describe:: class
  123. Describes a class. The signature can include parentheses with parameters
  124. which will be shown as the constructor arguments.
  125. .. describe:: attribute
  126. Describes an object data attribute. The description should include
  127. information about the type of the data to be expected and whether it may be
  128. changed directly.
  129. .. describe:: method
  130. Describes an object method. The parameters should not include the ``self``
  131. parameter. The description should include similar information to that
  132. described for ``function``.
  133. .. describe:: opcode
  134. Describes a Python :term:`bytecode` instruction.
  135. .. describe:: cmdoption
  136. Describes a command line option or switch. Option argument names should be
  137. enclosed in angle brackets. Example::
  138. .. cmdoption:: -m <module>
  139. Run a module as a script.
  140. .. describe:: envvar
  141. Describes an environment variable that Python uses or defines.
  142. There is also a generic version of these directives:
  143. .. describe:: describe
  144. This directive produces the same formatting as the specific ones explained
  145. above but does not create index entries or cross-referencing targets. It is
  146. used, for example, to describe the directives in this document. Example::
  147. .. describe:: opcode
  148. Describes a Python bytecode instruction.
  149. Showing code examples
  150. ---------------------
  151. Examples of Python source code or interactive sessions are represented using
  152. standard reST literal blocks. They are started by a ``::`` at the end of the
  153. preceding paragraph and delimited by indentation.
  154. Representing an interactive session requires including the prompts and output
  155. along with the Python code. No special markup is required for interactive
  156. sessions. After the last line of input or output presented, there should not be
  157. an "unused" primary prompt; this is an example of what *not* to do::
  158. >>> 1 + 1
  159. 2
  160. >>>
  161. Syntax highlighting is handled in a smart way:
  162. * There is a "highlighting language" for each source file. Per default,
  163. this is ``'python'`` as the majority of files will have to highlight Python
  164. snippets.
  165. * Within Python highlighting mode, interactive sessions are recognized
  166. automatically and highlighted appropriately.
  167. * The highlighting language can be changed using the ``highlightlang``
  168. directive, used as follows::
  169. .. highlightlang:: c
  170. This language is used until the next ``highlightlang`` directive is
  171. encountered.
  172. * The values normally used for the highlighting language are:
  173. * ``python`` (the default)
  174. * ``c``
  175. * ``rest``
  176. * ``none`` (no highlighting)
  177. * If highlighting with the current language fails, the block is not highlighted
  178. in any way.
  179. Longer displays of verbatim text may be included by storing the example text in
  180. an external file containing only plain text. The file may be included using the
  181. ``literalinclude`` directive. [1]_ For example, to include the Python source file
  182. :file:`example.py`, use::
  183. .. literalinclude:: example.py
  184. The file name is relative to the current file's path. Documentation-specific
  185. include files should be placed in the ``Doc/includes`` subdirectory.
  186. Inline markup
  187. -------------
  188. As said before, Sphinx uses interpreted text roles to insert semantic markup in
  189. documents.
  190. Names of local variables, such as function/method arguments, are an exception,
  191. they should be marked simply with ``*var*``.
  192. For all other roles, you have to write ``:rolename:`content```.
  193. There are some additional facilities that make cross-referencing roles more
  194. versatile:
  195. * You may supply an explicit title and reference target, like in reST direct
  196. hyperlinks: ``:role:`title <target>``` will refer to *target*, but the link
  197. text will be *title*.
  198. * If you prefix the content with ``!``, no reference/hyperlink will be created.
  199. * For the Python object roles, if you prefix the content with ``~``, the link
  200. text will only be the last component of the target. For example,
  201. ``:meth:`~Queue.Queue.get``` will refer to ``Queue.Queue.get`` but only
  202. display ``get`` as the link text.
  203. In HTML output, the link's ``title`` attribute (that is e.g. shown as a
  204. tool-tip on mouse-hover) will always be the full target name.
  205. The following roles refer to objects in modules and are possibly hyperlinked if
  206. a matching identifier is found:
  207. .. describe:: mod
  208. The name of a module; a dotted name may be used. This should also be used for
  209. package names.
  210. .. describe:: func
  211. The name of a Python function; dotted names may be used. The role text
  212. should not include trailing parentheses to enhance readability. The
  213. parentheses are stripped when searching for identifiers.
  214. .. describe:: data
  215. The name of a module-level variable or constant.
  216. .. describe:: const
  217. The name of a "defined" constant. This may be a C-language ``#define``
  218. or a Python variable that is not intended to be changed.
  219. .. describe:: class
  220. A class name; a dotted name may be used.
  221. .. describe:: meth
  222. The name of a method of an object. The role text should include the type
  223. name and the method name. A dotted name may be used.
  224. .. describe:: attr
  225. The name of a data attribute of an object.
  226. .. describe:: exc
  227. The name of an exception. A dotted name may be used.
  228. The name enclosed in this markup can include a module name and/or a class name.
  229. For example, ``:func:`filter``` could refer to a function named ``filter`` in
  230. the current module, or the built-in function of that name. In contrast,
  231. ``:func:`foo.filter``` clearly refers to the ``filter`` function in the ``foo``
  232. module.
  233. Normally, names in these roles are searched first without any further
  234. qualification, then with the current module name prepended, then with the
  235. current module and class name (if any) prepended. If you prefix the name with a
  236. dot, this order is reversed. For example, in the documentation of the
  237. :mod:`codecs` module, ``:func:`open``` always refers to the built-in function,
  238. while ``:func:`.open``` refers to :func:`codecs.open`.
  239. A similar heuristic is used to determine whether the name is an attribute of
  240. the currently documented class.
  241. The following roles create cross-references to C-language constructs if they
  242. are defined in the API documentation:
  243. .. describe:: cdata
  244. The name of a C-language variable.
  245. .. describe:: cfunc
  246. The name of a C-language function. Should include trailing parentheses.
  247. .. describe:: cmacro
  248. The name of a "simple" C macro, as defined above.
  249. .. describe:: ctype
  250. The name of a C-language type.
  251. The following role does possibly create a cross-reference, but does not refer
  252. to objects:
  253. .. describe:: token
  254. The name of a grammar token (used in the reference manual to create links
  255. between production displays).
  256. The following role creates a cross-reference to the term in the glossary:
  257. .. describe:: term
  258. Reference to a term in the glossary. The glossary is created using the
  259. ``glossary`` directive containing a definition list with terms and
  260. definitions. It does not have to be in the same file as the ``term``
  261. markup, in fact, by default the Python docs have one global glossary
  262. in the ``glossary.rst`` file.
  263. If you use a term that's not explained in a glossary, you'll get a warning
  264. during build.
  265. ---------
  266. The following roles don't do anything special except formatting the text
  267. in a different style:
  268. .. describe:: command
  269. The name of an OS-level command, such as ``rm``.
  270. .. describe:: dfn
  271. Mark the defining instance of a term in the text. (No index entries are
  272. generated.)
  273. .. describe:: envvar
  274. An environment variable. Index entries are generated.
  275. .. describe:: file
  276. The name of a file or directory. Within the contents, you can use curly
  277. braces to indicate a "variable" part, for example::
  278. ... is installed in :file:`/usr/lib/python2.{x}/site-packages` ...
  279. In the built documentation, the ``x`` will be displayed differently to
  280. indicate that it is to be replaced by the Python minor version.
  281. .. describe:: guilabel
  282. Labels presented as part of an interactive user interface should be marked
  283. using ``guilabel``. This includes labels from text-based interfaces such as
  284. those created using :mod:`curses` or other text-based libraries. Any label
  285. used in the interface should be marked with this role, including button
  286. labels, window titles, field names, menu and menu selection names, and even
  287. values in selection lists.
  288. .. describe:: kbd
  289. Mark a sequence of keystrokes. What form the key sequence takes may depend
  290. on platform- or application-specific conventions. When there are no relevant
  291. conventions, the names of modifier keys should be spelled out, to improve
  292. accessibility for new users and non-native speakers. For example, an
  293. *xemacs* key sequence may be marked like ``:kbd:`C-x C-f```, but without
  294. reference to a specific application or platform, the same sequence should be
  295. marked as ``:kbd:`Control-x Control-f```.
  296. .. describe:: keyword
  297. The name of a keyword in Python.
  298. .. describe:: mailheader
  299. The name of an RFC 822-style mail header. This markup does not imply that
  300. the header is being used in an email message, but can be used to refer to any
  301. header of the same "style." This is also used for headers defined by the
  302. various MIME specifications. The header name should be entered in the same
  303. way it would normally be found in practice, with the camel-casing conventions
  304. being preferred where there is more than one common usage. For example:
  305. ``:mailheader:`Content-Type```.
  306. .. describe:: makevar
  307. The name of a :command:`make` variable.
  308. .. describe:: manpage
  309. A reference to a Unix manual page including the section,
  310. e.g. ``:manpage:`ls(1)```.
  311. .. describe:: menuselection
  312. Menu selections should be marked using the ``menuselection`` role. This is
  313. used to mark a complete sequence of menu selections, including selecting
  314. submenus and choosing a specific operation, or any subsequence of such a
  315. sequence. The names of individual selections should be separated by
  316. ``-->``.
  317. For example, to mark the selection "Start > Programs", use this markup::
  318. :menuselection:`Start --> Programs`
  319. When including a selection that includes some trailing indicator, such as the
  320. ellipsis some operating systems use to indicate that the command opens a
  321. dialog, the indicator should be omitted from the selection name.
  322. .. describe:: mimetype
  323. The name of a MIME type, or a component of a MIME type (the major or minor
  324. portion, taken alone).
  325. .. describe:: newsgroup
  326. The name of a Usenet newsgroup.
  327. .. describe:: option
  328. A command-line option to an executable program. The leading hyphen(s) must
  329. be included.
  330. .. describe:: program
  331. The name of an executable program. This may differ from the file name for
  332. the executable for some platforms. In particular, the ``.exe`` (or other)
  333. extension should be omitted for Windows programs.
  334. .. describe:: regexp
  335. A regular expression. Quotes should not be included.
  336. .. describe:: samp
  337. A piece of literal text, such as code. Within the contents, you can use
  338. curly braces to indicate a "variable" part, as in ``:file:``.
  339. If you don't need the "variable part" indication, use the standard
  340. ````code```` instead.
  341. .. describe:: var
  342. A Python or C variable or parameter name.
  343. The following roles generate external links:
  344. .. describe:: pep
  345. A reference to a Python Enhancement Proposal. This generates appropriate
  346. index entries. The text "PEP *number*\ " is generated; in the HTML output,
  347. this text is a hyperlink to an online copy of the specified PEP.
  348. .. describe:: rfc
  349. A reference to an Internet Request for Comments. This generates appropriate
  350. index entries. The text "RFC *number*\ " is generated; in the HTML output,
  351. this text is a hyperlink to an online copy of the specified RFC.
  352. Note that there are no special roles for including hyperlinks as you can use
  353. the standard reST markup for that purpose.
  354. .. _doc-ref-role:
  355. Cross-linking markup
  356. --------------------
  357. To support cross-referencing to arbitrary sections in the documentation, the
  358. standard reST labels are "abused" a bit: Every label must precede a section
  359. title; and every label name must be unique throughout the entire documentation
  360. source.
  361. You can then reference to these sections using the ``:ref:`label-name``` role.
  362. Example::
  363. .. _my-reference-label:
  364. Section to cross-reference
  365. --------------------------
  366. This is the text of the section.
  367. It refers to the section itself, see :ref:`my-reference-label`.
  368. The ``:ref:`` invocation is replaced with the section title.
  369. Paragraph-level markup
  370. ----------------------
  371. These directives create short paragraphs and can be used inside information
  372. units as well as normal text:
  373. .. describe:: note
  374. An especially important bit of information about an API that a user should be
  375. aware of when using whatever bit of API the note pertains to. The content of
  376. the directive should be written in complete sentences and include all
  377. appropriate punctuation.
  378. Example::
  379. .. note::
  380. This function is not suitable for sending spam e-mails.
  381. .. describe:: warning
  382. An important bit of information about an API that a user should be aware of
  383. when using whatever bit of API the warning pertains to. The content of the
  384. directive should be written in complete sentences and include all appropriate
  385. punctuation. This should only be chosen over ``note`` for information
  386. regarding the possibility of crashes, data loss, or security implications.
  387. .. describe:: versionadded
  388. This directive documents the version of Python which added the described
  389. feature to the library or C API. When this applies to an entire module, it
  390. should be placed at the top of the module section before any prose.
  391. The first argument must be given and is the version in question; you can add
  392. a second argument consisting of a *brief* explanation of the change.
  393. Example::
  394. .. versionadded:: 2.5
  395. The *spam* parameter.
  396. Note that there must be no blank line between the directive head and the
  397. explanation; this is to make these blocks visually continuous in the markup.
  398. .. describe:: versionchanged
  399. Similar to ``versionadded``, but describes when and what changed in the named
  400. feature in some way (new parameters, changed side effects, etc.).
  401. --------------
  402. .. describe:: seealso
  403. Many sections include a list of references to module documentation or
  404. external documents. These lists are created using the ``seealso`` directive.
  405. The ``seealso`` directive is typically placed in a section just before any
  406. sub-sections. For the HTML output, it is shown boxed off from the main flow
  407. of the text.
  408. The content of the ``seealso`` directive should be a reST definition list.
  409. Example::
  410. .. seealso::
  411. Module :mod:`zipfile`
  412. Documentation of the :mod:`zipfile` standard module.
  413. `GNU tar manual, Basic Tar Format <http://link>`_
  414. Documentation for tar archive files, including GNU tar extensions.
  415. .. describe:: rubric
  416. This directive creates a paragraph heading that is not used to create a
  417. table of contents node. It is currently used for the "Footnotes" caption.
  418. .. describe:: centered
  419. This directive creates a centered boldfaced paragraph. Use it as follows::
  420. .. centered::
  421. Paragraph contents.
  422. Table-of-contents markup
  423. ------------------------
  424. Since reST does not have facilities to interconnect several documents, or split
  425. documents into multiple output files, Sphinx uses a custom directive to add
  426. relations between the single files the documentation is made of, as well as
  427. tables of contents. The ``toctree`` directive is the central element.
  428. .. describe:: toctree
  429. This directive inserts a "TOC tree" at the current location, using the
  430. individual TOCs (including "sub-TOC trees") of the files given in the
  431. directive body. A numeric ``maxdepth`` option may be given to indicate the
  432. depth of the tree; by default, all levels are included.
  433. Consider this example (taken from the library reference index)::
  434. .. toctree::
  435. :maxdepth: 2
  436. intro.rst
  437. strings.rst
  438. datatypes.rst
  439. numeric.rst
  440. (many more files listed here)
  441. This accomplishes two things:
  442. * Tables of contents from all those files are inserted, with a maximum depth
  443. of two, that means one nested heading. ``toctree`` directives in those
  444. files are also taken into account.
  445. * Sphinx knows that the relative order of the files ``intro.rst``,
  446. ``strings.rst`` and so forth, and it knows that they are children of the
  447. shown file, the library index. From this information it generates "next
  448. chapter", "previous chapter" and "parent chapter" links.
  449. In the end, all files included in the build process must occur in one
  450. ``toctree`` directive; Sphinx will emit a warning if it finds a file that is
  451. not included, because that means that this file will not be reachable through
  452. standard navigation.
  453. The special file ``contents.rst`` at the root of the source directory is the
  454. "root" of the TOC tree hierarchy; from it the "Contents" page is generated.
  455. Index-generating markup
  456. -----------------------
  457. Sphinx automatically creates index entries from all information units (like
  458. functions, classes or attributes) like discussed before.
  459. However, there is also an explicit directive available, to make the index more
  460. comprehensive and enable index entries in documents where information is not
  461. mainly contained in information units, such as the language reference.
  462. The directive is ``index`` and contains one or more index entries. Each entry
  463. consists of a type and a value, separated by a colon.
  464. For example::
  465. .. index::
  466. single: execution; context
  467. module: __main__
  468. module: sys
  469. triple: module; search; path
  470. This directive contains five entries, which will be converted to entries in the
  471. generated index which link to the exact location of the index statement (or, in
  472. case of offline media, the corresponding page number).
  473. The possible entry types are:
  474. single
  475. Creates a single index entry. Can be made a subentry by separating the
  476. subentry text with a semicolon (this notation is also used below to describe
  477. what entries are created).
  478. pair
  479. ``pair: loop; statement`` is a shortcut that creates two index entries,
  480. namely ``loop; statement`` and ``statement; loop``.
  481. triple
  482. Likewise, ``triple: module; search; path`` is a shortcut that creates three
  483. index entries, which are ``module; search path``, ``search; path, module`` and
  484. ``path; module search``.
  485. module, keyword, operator, object, exception, statement, builtin
  486. These all create two index entries. For example, ``module: hashlib`` creates
  487. the entries ``module; hashlib`` and ``hashlib; module``.
  488. For index directives containing only "single" entries, there is a shorthand
  489. notation::
  490. .. index:: BNF, grammar, syntax, notation
  491. This creates four index entries.
  492. Grammar production displays
  493. ---------------------------
  494. Special markup is available for displaying the productions of a formal grammar.
  495. The markup is simple and does not attempt to model all aspects of BNF (or any
  496. derived forms), but provides enough to allow context-free grammars to be
  497. displayed in a way that causes uses of a symbol to be rendered as hyperlinks to
  498. the definition of the symbol. There is this directive:
  499. .. describe:: productionlist
  500. This directive is used to enclose a group of productions. Each production is
  501. given on a single line and consists of a name, separated by a colon from the
  502. following definition. If the definition spans multiple lines, each
  503. continuation line must begin with a colon placed at the same column as in the
  504. first line.
  505. Blank lines are not allowed within ``productionlist`` directive arguments.
  506. The definition can contain token names which are marked as interpreted text
  507. (e.g. ``unaryneg ::= "-" `integer```) -- this generates cross-references
  508. to the productions of these tokens.
  509. Note that no further reST parsing is done in the production, so that you
  510. don't have to escape ``*`` or ``|`` characters.
  511. .. XXX describe optional first parameter
  512. The following is an example taken from the Python Reference Manual::
  513. .. productionlist::
  514. try_stmt: try1_stmt | try2_stmt
  515. try1_stmt: "try" ":" `suite`
  516. : ("except" [`expression` ["," `target`]] ":" `suite`)+
  517. : ["else" ":" `suite`]
  518. : ["finally" ":" `suite`]
  519. try2_stmt: "try" ":" `suite`
  520. : "finally" ":" `suite`
  521. Substitutions
  522. -------------
  523. The documentation system provides three substitutions that are defined by default.
  524. They are set in the build configuration file :file:`conf.py`.
  525. .. describe:: |release|
  526. Replaced by the Python release the documentation refers to. This is the full
  527. version string including alpha/beta/release candidate tags, e.g. ``2.5.2b3``.
  528. .. describe:: |version|
  529. Replaced by the Python version the documentation refers to. This consists
  530. only of the major and minor version parts, e.g. ``2.5``, even for version
  531. 2.5.1.
  532. .. describe:: |today|
  533. Replaced by either today's date, or the date set in the build configuration
  534. file. Normally has the format ``April 14, 2007``.
  535. .. rubric:: Footnotes
  536. .. [1] There is a standard ``.. include`` directive, but it raises errors if the
  537. file is not found. This one only emits a warning.