Sophie

Sophie

distrib > Mageia > 4 > i586 > media > core-release > by-pkgid > c95717a2237548a7bdaddf39c85b0f0f > files > 130

python-sphinx-doc-1.1.3-7.mga4.noarch.rpm



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Inline markup &mdash; Sphinx 1.1.3 documentation</title>
    
    <link rel="stylesheet" href="../_static/sphinxdoc.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '1.1.3',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="search" type="application/opensearchdescription+xml"
          title="Search within Sphinx 1.1.3 documentation"
          href="../_static/opensearch.xml"/>
    <link rel="top" title="Sphinx 1.1.3 documentation" href="../index.html" />
    <link rel="up" title="Sphinx Markup Constructs" href="index.html" />
    <link rel="next" title="Miscellaneous markup" href="misc.html" />
    <link rel="prev" title="Showing code examples" href="code.html" />
 
<style type="text/css">
  table.right { float: right; margin-left: 20px; }
  table.right td { border: 1px solid #ccc; }
</style>

  </head>
  <body>
<div style="background-color: white; text-align: left; padding: 10px 10px 15px 15px">
<img src="../_static/sphinx.png" alt="Sphinx logo" />
</div>

    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="misc.html" title="Miscellaneous markup"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="code.html" title="Showing code examples"
             accesskey="P">previous</a> |</li>
        <li><a href="../index.html">Sphinx home</a>&nbsp;|&nbsp;</li>
        <li><a href="../contents.html">Documentation</a>
          &raquo;</li>

          <li><a href="index.html" accesskey="U">Sphinx Markup Constructs</a> &raquo;</li> 
      </ul>
    </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../contents.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Inline markup</a><ul>
<li><a class="reference internal" href="#cross-referencing-syntax">Cross-referencing syntax</a><ul>
<li><a class="reference internal" href="#cross-referencing-objects">Cross-referencing objects</a></li>
<li><a class="reference internal" href="#cross-referencing-arbitrary-locations">Cross-referencing arbitrary locations</a></li>
<li><a class="reference internal" href="#cross-referencing-documents">Cross-referencing documents</a></li>
<li><a class="reference internal" href="#referencing-downloadable-files">Referencing downloadable files</a></li>
<li><a class="reference internal" href="#cross-referencing-other-items-of-interest">Cross-referencing other items of interest</a></li>
</ul>
</li>
<li><a class="reference internal" href="#other-semantic-markup">Other semantic markup</a></li>
<li><a class="reference internal" href="#substitutions">Substitutions</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="code.html"
                        title="previous chapter">Showing code examples</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="misc.html"
                        title="next chapter">Miscellaneous markup</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../_sources/markup/inline.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="inline-markup">
<span id="id1"></span><h1>Inline markup<a class="headerlink" href="#inline-markup" title="Permalink to this headline">¶</a></h1>
<p>Sphinx uses interpreted text roles to insert semantic markup into documents.
They are written as <tt class="docutils literal"><span class="pre">:rolename:`content`</span></tt>.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The default role (<tt class="docutils literal"><span class="pre">`content`</span></tt>) has no special meaning by default.  You are
free to use it for anything you like, e.g. variable names; use the
<a class="reference internal" href="../config.html#confval-default_role"><tt class="xref std std-confval docutils literal"><span class="pre">default_role</span></tt></a> config value to set it to a known role.</p>
</div>
<p>See <a class="reference internal" href="../domains.html#domains"><em>Sphinx Domains</em></a> for roles added by domains.</p>
<div class="section" id="cross-referencing-syntax">
<span id="xref-syntax"></span><h2>Cross-referencing syntax<a class="headerlink" href="#cross-referencing-syntax" title="Permalink to this headline">¶</a></h2>
<p>Cross-references are generated by many semantic interpreted text roles.
Basically, you only need to write <tt class="docutils literal"><span class="pre">:role:`target`</span></tt>, and a link will be created
to the item named <em>target</em> of the type indicated by <em>role</em>.  The links&#8217;s text
will be the same as <em>target</em>.</p>
<p>There are some additional facilities, however, that make cross-referencing roles
more versatile:</p>
<ul>
<li><p class="first">You may supply an explicit title and reference target, like in reST direct
hyperlinks: <tt class="docutils literal"><span class="pre">:role:`title</span> <span class="pre">&lt;target&gt;`</span></tt> will refer to <em>target</em>, but the link
text will be <em>title</em>.</p>
</li>
<li><p class="first">If you prefix the content with <tt class="docutils literal"><span class="pre">!</span></tt>, no reference/hyperlink will be created.</p>
</li>
<li><p class="first">If you prefix the content with <tt class="docutils literal"><span class="pre">~</span></tt>, the link text will only be the last
component of the target.  For example, <tt class="docutils literal"><span class="pre">:py:meth:`~Queue.Queue.get`</span></tt> will
refer to <tt class="docutils literal"><span class="pre">Queue.Queue.get</span></tt> but only display <tt class="docutils literal"><span class="pre">get</span></tt> as the link text.</p>
<p>In HTML output, the link&#8217;s <tt class="docutils literal"><span class="pre">title</span></tt> attribute (that is e.g. shown as a
tool-tip on mouse-hover) will always be the full target name.</p>
</li>
</ul>
<div class="section" id="cross-referencing-objects">
<h3>Cross-referencing objects<a class="headerlink" href="#cross-referencing-objects" title="Permalink to this headline">¶</a></h3>
<p>These roles are described with their respective domains:</p>
<ul class="simple">
<li><a class="reference internal" href="../domains.html#python-roles"><em>Python</em></a></li>
<li><a class="reference internal" href="../domains.html#c-roles"><em>C</em></a></li>
<li><a class="reference internal" href="../domains.html#cpp-roles"><em>C++</em></a></li>
<li><a class="reference internal" href="../domains.html#js-roles"><em>JavaScript</em></a></li>
<li><a class="reference internal" href="../domains.html#rst-roles"><em>ReST</em></a></li>
</ul>
</div>
<div class="section" id="cross-referencing-arbitrary-locations">
<span id="ref-role"></span><h3>Cross-referencing arbitrary locations<a class="headerlink" href="#cross-referencing-arbitrary-locations" title="Permalink to this headline">¶</a></h3>
<dl class="role">
<dt id="role-ref">
<tt class="descname">:ref:</tt><a class="headerlink" href="#role-ref" title="Permalink to this definition">¶</a></dt>
<dd><p>To support cross-referencing to arbitrary locations in any document, the
standard reST labels are used.  For this to work label names must be unique
throughout the entire documentation.  There are two ways in which you can
refer to labels:</p>
<ul>
<li><p class="first">If you place a label directly before a section title, you can reference to
it with <tt class="docutils literal"><span class="pre">:ref:`label-name`</span></tt>.  Example:</p>
<div class="highlight-rest"><pre>.. _my-reference-label:

Section to cross-reference
--------------------------

This is the text of the section.

It refers to the section itself, see :ref:`my-reference-label`.</pre>
</div>
<p>The <tt class="docutils literal"><span class="pre">:ref:</span></tt> role would then generate a link to the section, with the link
title being &#8220;Section to cross-reference&#8221;.  This works just as well when
section and reference are in different source files.</p>
<p>Automatic labels also work with figures: given</p>
<div class="highlight-rest"><pre>.. _my-figure:

.. figure:: whatever

   Figure caption</pre>
</div>
<p>a reference <tt class="docutils literal"><span class="pre">:ref:`my-figure`</span></tt> would insert a reference to the figure
with link text &#8220;Figure caption&#8221;.</p>
<p>The same works for tables that are given an explicit caption using the
<a class="reference external" href="http://docutils.sourceforge.net/docs/ref/rst/directives.html#table">table</a> directive.</p>
</li>
<li><p class="first">Labels that aren&#8217;t placed before a section title can still be referenced
to, but you must give the link an explicit title, using this syntax:
<tt class="docutils literal"><span class="pre">:ref:`Link</span> <span class="pre">title</span> <span class="pre">&lt;label-name&gt;`</span></tt>.</p>
</li>
</ul>
<p>Using <a class="reference internal" href="#role-ref" title="ref role"><tt class="xref rst rst-role docutils literal"><span class="pre">ref</span></tt></a> is advised over standard reStructuredText links to sections
(like <tt class="docutils literal"><span class="pre">`Section</span> <span class="pre">title`_</span></tt>) because it works across files, when section
headings are changed, and for all builders that support cross-references.</p>
</dd></dl>

</div>
<div class="section" id="cross-referencing-documents">
<h3>Cross-referencing documents<a class="headerlink" href="#cross-referencing-documents" title="Permalink to this headline">¶</a></h3>
<p class="versionadded">
<span class="versionmodified">New in version 0.6.</span></p>
<p>There is also a way to directly link to documents:</p>
<dl class="role">
<dt id="role-doc">
<tt class="descname">:doc:</tt><a class="headerlink" href="#role-doc" title="Permalink to this definition">¶</a></dt>
<dd><p>Link to the specified document; the document name can be specified in
absolute or relative fashion.  For example, if the reference
<tt class="docutils literal"><span class="pre">:doc:`parrot`</span></tt> occurs in the document <tt class="docutils literal"><span class="pre">sketches/index</span></tt>, then the link
refers to <tt class="docutils literal"><span class="pre">sketches/parrot</span></tt>.  If the reference is <tt class="docutils literal"><span class="pre">:doc:`/people`</span></tt> or
<tt class="docutils literal"><span class="pre">:doc:`../people`</span></tt>, the link refers to <tt class="docutils literal"><span class="pre">people</span></tt>.</p>
<p>If no explicit link text is given (like usual: <tt class="docutils literal"><span class="pre">:doc:`Monty</span> <span class="pre">Python</span> <span class="pre">members</span>
<span class="pre">&lt;/people&gt;`</span></tt>), the link caption will be the title of the given document.</p>
</dd></dl>

</div>
<div class="section" id="referencing-downloadable-files">
<h3>Referencing downloadable files<a class="headerlink" href="#referencing-downloadable-files" title="Permalink to this headline">¶</a></h3>
<p class="versionadded">
<span class="versionmodified">New in version 0.6.</span></p>
<dl class="role">
<dt id="role-download">
<tt class="descname">:download:</tt><a class="headerlink" href="#role-download" title="Permalink to this definition">¶</a></dt>
<dd><p>This role lets you link to files within your source tree that are not reST
documents that can be viewed, but files that can be downloaded.</p>
<p>When you use this role, the referenced file is automatically marked for
inclusion in the output when building (obviously, for HTML output only).
All downloadable files are put into the <tt class="docutils literal"><span class="pre">_downloads</span></tt> subdirectory of the
output directory; duplicate filenames are handled.</p>
<p>An example:</p>
<div class="highlight-rest"><pre>See :download:`this example script &lt;../example.py&gt;`.</pre>
</div>
<p>The given filename is usually relative to the directory the current source
file is contained in, but if it absolute (starting with <tt class="docutils literal"><span class="pre">/</span></tt>), it is taken
as relative to the top source directory.</p>
<p>The <tt class="docutils literal"><span class="pre">example.py</span></tt> file will be copied to the output directory, and a
suitable link generated to it.</p>
</dd></dl>

</div>
<div class="section" id="cross-referencing-other-items-of-interest">
<h3>Cross-referencing other items of interest<a class="headerlink" href="#cross-referencing-other-items-of-interest" title="Permalink to this headline">¶</a></h3>
<p>The following roles do possibly create a cross-reference, but do not refer to
objects:</p>
<dl class="role">
<dt id="role-envvar">
<tt class="descname">:envvar:</tt><a class="headerlink" href="#role-envvar" title="Permalink to this definition">¶</a></dt>
<dd><p>An environment variable.  Index entries are generated.  Also generates a link
to the matching <a class="reference internal" href="../domains.html#directive-envvar" title="envvar directive"><tt class="xref rst rst-dir docutils literal"><span class="pre">envvar</span></tt></a> directive, if it exists.</p>
</dd></dl>

<dl class="role">
<dt id="role-token">
<tt class="descname">:token:</tt><a class="headerlink" href="#role-token" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of a grammar token (used to create links between
<a class="reference internal" href="para.html#directive-productionlist" title="productionlist directive"><tt class="xref rst rst-dir docutils literal"><span class="pre">productionlist</span></tt></a> directives).</p>
</dd></dl>

<dl class="role">
<dt id="role-keyword">
<tt class="descname">:keyword:</tt><a class="headerlink" href="#role-keyword" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of a keyword in Python.  This creates a link to a reference label
with that name, if it exists.</p>
</dd></dl>

<dl class="role">
<dt id="role-option">
<tt class="descname">:option:</tt><a class="headerlink" href="#role-option" title="Permalink to this definition">¶</a></dt>
<dd><p>A command-line option to an executable program.  The leading hyphen(s) must
be included.  This generates a link to a <a class="reference internal" href="../domains.html#directive-option" title="option directive"><tt class="xref rst rst-dir docutils literal"><span class="pre">option</span></tt></a> directive, if it
exists.</p>
</dd></dl>

<p>The following role creates a cross-reference to the term in the glossary:</p>
<dl class="role">
<dt id="role-term">
<tt class="descname">:term:</tt><a class="headerlink" href="#role-term" title="Permalink to this definition">¶</a></dt>
<dd><p>Reference to a term in the glossary.  The glossary is created using the
<tt class="docutils literal"><span class="pre">glossary</span></tt> directive containing a definition list with terms and
definitions.  It does not have to be in the same file as the <tt class="docutils literal"><span class="pre">term</span></tt> markup,
for example the Python docs have one global glossary in the <tt class="docutils literal"><span class="pre">glossary.rst</span></tt>
file.</p>
<p>If you use a term that&#8217;s not explained in a glossary, you&#8217;ll get a warning
during build.</p>
</dd></dl>

</div>
</div>
<div class="section" id="other-semantic-markup">
<h2>Other semantic markup<a class="headerlink" href="#other-semantic-markup" title="Permalink to this headline">¶</a></h2>
<p>The following roles don&#8217;t do anything special except formatting the text
in a different style:</p>
<dl class="role">
<dt id="role-abbr">
<tt class="descname">:abbr:</tt><a class="headerlink" href="#role-abbr" title="Permalink to this definition">¶</a></dt>
<dd><p>An abbreviation.  If the role content contains a parenthesized explanation,
it will be treated specially: it will be shown in a tool-tip in HTML, and
output only once in LaTeX.</p>
<p>Example: <tt class="docutils literal"><span class="pre">:abbr:`LIFO</span> <span class="pre">(last-in,</span> <span class="pre">first-out)`</span></tt>.</p>
<p class="versionadded">
<span class="versionmodified">New in version 0.6.</span></p>
</dd></dl>

<dl class="role">
<dt id="role-command">
<tt class="descname">:command:</tt><a class="headerlink" href="#role-command" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of an OS-level command, such as <tt class="docutils literal"><span class="pre">rm</span></tt>.</p>
</dd></dl>

<dl class="role">
<dt id="role-dfn">
<tt class="descname">:dfn:</tt><a class="headerlink" href="#role-dfn" title="Permalink to this definition">¶</a></dt>
<dd><p>Mark the defining instance of a term in the text.  (No index entries are
generated.)</p>
</dd></dl>

<dl class="role">
<dt id="role-file">
<tt class="descname">:file:</tt><a class="headerlink" href="#role-file" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of a file or directory.  Within the contents, you can use curly
braces to indicate a &#8220;variable&#8221; part, for example:</p>
<div class="highlight-rest"><pre>... is installed in :file:`/usr/lib/python2.{x}/site-packages` ...</pre>
</div>
<p>In the built documentation, the <tt class="docutils literal"><span class="pre">x</span></tt> will be displayed differently to
indicate that it is to be replaced by the Python minor version.</p>
</dd></dl>

<dl class="role">
<dt id="role-guilabel">
<tt class="descname">:guilabel:</tt><a class="headerlink" href="#role-guilabel" title="Permalink to this definition">¶</a></dt>
<dd><p>Labels presented as part of an interactive user interface should be marked
using <tt class="docutils literal"><span class="pre">guilabel</span></tt>.  This includes labels from text-based interfaces such as
those created using <tt class="xref py py-mod docutils literal"><span class="pre">curses</span></tt> or other text-based libraries.  Any label
used in the interface should be marked with this role, including button
labels, window titles, field names, menu and menu selection names, and even
values in selection lists.</p>
<p class="versionchanged">
<span class="versionmodified">Changed in version 1.0: </span>An accelerator key for the GUI label can be included using an ampersand;
this will be stripped and displayed underlined in the output (example:
<tt class="docutils literal"><span class="pre">:guilabel:`&amp;Cancel`</span></tt>).  To include a literal ampersand, double it.</p>
</dd></dl>

<dl class="role">
<dt id="role-kbd">
<tt class="descname">:kbd:</tt><a class="headerlink" href="#role-kbd" title="Permalink to this definition">¶</a></dt>
<dd><p>Mark a sequence of keystrokes.  What form the key sequence takes may depend
on platform- or application-specific conventions.  When there are no relevant
conventions, the names of modifier keys should be spelled out, to improve
accessibility for new users and non-native speakers.  For example, an
<em>xemacs</em> key sequence may be marked like <tt class="docutils literal"><span class="pre">:kbd:`C-x</span> <span class="pre">C-f`</span></tt>, but without
reference to a specific application or platform, the same sequence should be
marked as <tt class="docutils literal"><span class="pre">:kbd:`Control-x</span> <span class="pre">Control-f`</span></tt>.</p>
</dd></dl>

<dl class="role">
<dt id="role-mailheader">
<tt class="descname">:mailheader:</tt><a class="headerlink" href="#role-mailheader" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of an RFC 822-style mail header.  This markup does not imply that
the header is being used in an email message, but can be used to refer to any
header of the same &#8220;style.&#8221;  This is also used for headers defined by the
various MIME specifications.  The header name should be entered in the same
way it would normally be found in practice, with the camel-casing conventions
being preferred where there is more than one common usage. For example:
<tt class="docutils literal"><span class="pre">:mailheader:`Content-Type`</span></tt>.</p>
</dd></dl>

<dl class="role">
<dt id="role-makevar">
<tt class="descname">:makevar:</tt><a class="headerlink" href="#role-makevar" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of a <strong class="command">make</strong> variable.</p>
</dd></dl>

<dl class="role">
<dt id="role-manpage">
<tt class="descname">:manpage:</tt><a class="headerlink" href="#role-manpage" title="Permalink to this definition">¶</a></dt>
<dd><p>A reference to a Unix manual page including the section,
e.g. <tt class="docutils literal"><span class="pre">:manpage:`ls(1)`</span></tt>.</p>
</dd></dl>

<dl class="role">
<dt id="role-menuselection">
<tt class="descname">:menuselection:</tt><a class="headerlink" href="#role-menuselection" title="Permalink to this definition">¶</a></dt>
<dd><p>Menu selections should be marked using the <tt class="docutils literal"><span class="pre">menuselection</span></tt> role.  This is
used to mark a complete sequence of menu selections, including selecting
submenus and choosing a specific operation, or any subsequence of such a
sequence.  The names of individual selections should be separated by
<tt class="docutils literal"><span class="pre">--&gt;</span></tt>.</p>
<p>For example, to mark the selection &#8220;Start &gt; Programs&#8221;, use this markup:</p>
<div class="highlight-rest"><pre>:menuselection:`Start --&gt; Programs`</pre>
</div>
<p>When including a selection that includes some trailing indicator, such as the
ellipsis some operating systems use to indicate that the command opens a
dialog, the indicator should be omitted from the selection name.</p>
<p><tt class="docutils literal"><span class="pre">menuselection</span></tt> also supports ampersand accelerators just like
<a class="reference internal" href="#role-guilabel" title="guilabel role"><tt class="xref rst rst-role docutils literal"><span class="pre">guilabel</span></tt></a>.</p>
</dd></dl>

<dl class="role">
<dt id="role-mimetype">
<tt class="descname">:mimetype:</tt><a class="headerlink" href="#role-mimetype" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of a MIME type, or a component of a MIME type (the major or minor
portion, taken alone).</p>
</dd></dl>

<dl class="role">
<dt id="role-newsgroup">
<tt class="descname">:newsgroup:</tt><a class="headerlink" href="#role-newsgroup" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of a Usenet newsgroup.</p>
</dd></dl>

<dl class="role">
<dt id="role-program">
<tt class="descname">:program:</tt><a class="headerlink" href="#role-program" title="Permalink to this definition">¶</a></dt>
<dd><p>The name of an executable program.  This may differ from the file name for
the executable for some platforms.  In particular, the <tt class="docutils literal"><span class="pre">.exe</span></tt> (or other)
extension should be omitted for Windows programs.</p>
</dd></dl>

<dl class="role">
<dt id="role-regexp">
<tt class="descname">:regexp:</tt><a class="headerlink" href="#role-regexp" title="Permalink to this definition">¶</a></dt>
<dd><p>A regular expression. Quotes should not be included.</p>
</dd></dl>

<dl class="role">
<dt id="role-samp">
<tt class="descname">:samp:</tt><a class="headerlink" href="#role-samp" title="Permalink to this definition">¶</a></dt>
<dd><p>A piece of literal text, such as code.  Within the contents, you can use
curly braces to indicate a &#8220;variable&#8221; part, as in <a class="reference internal" href="#role-file" title="file role"><tt class="xref rst rst-role docutils literal"><span class="pre">file</span></tt></a>.  For
example, in <tt class="docutils literal"><span class="pre">:samp:`print</span> <span class="pre">1+{variable}`</span></tt>, the part <tt class="docutils literal"><span class="pre">variable</span></tt> would be
emphasized.</p>
<p>If you don&#8217;t need the &#8220;variable part&#8221; indication, use the standard
<tt class="docutils literal"><span class="pre">``code``</span></tt> instead.</p>
</dd></dl>

<p>There is also an <a class="reference internal" href="misc.html#role-index" title="index role"><tt class="xref rst rst-role docutils literal"><span class="pre">index</span></tt></a> role to generate index entries.</p>
<p>The following roles generate external links:</p>
<dl class="role">
<dt id="role-pep">
<tt class="descname">:pep:</tt><a class="headerlink" href="#role-pep" title="Permalink to this definition">¶</a></dt>
<dd><p>A reference to a Python Enhancement Proposal.  This generates appropriate
index entries. The text &#8220;PEP <em>number</em>&#8221; is generated; in the HTML output,
this text is a hyperlink to an online copy of the specified PEP.  You can
link to a specific section by saying <tt class="docutils literal"><span class="pre">:pep:`number#anchor`</span></tt>.</p>
</dd></dl>

<dl class="role">
<dt id="role-rfc">
<tt class="descname">:rfc:</tt><a class="headerlink" href="#role-rfc" title="Permalink to this definition">¶</a></dt>
<dd><p>A reference to an Internet Request for Comments.  This generates appropriate
index entries. The text &#8220;RFC <em>number</em>&#8221; is generated; in the HTML output,
this text is a hyperlink to an online copy of the specified RFC.  You can
link to a specific section by saying <tt class="docutils literal"><span class="pre">:rfc:`number#anchor`</span></tt>.</p>
</dd></dl>

<p>Note that there are no special roles for including hyperlinks as you can use
the standard reST markup for that purpose.</p>
</div>
<div class="section" id="substitutions">
<span id="default-substitutions"></span><h2>Substitutions<a class="headerlink" href="#substitutions" title="Permalink to this headline">¶</a></h2>
<p>The documentation system provides three substitutions that are defined by default.
They are set in the build configuration file.</p>
<dl class="describe">
<dt>
<tt class="descname">|release|</tt></dt>
<dd><p>Replaced by the project release the documentation refers to.  This is meant
to be the full version string including alpha/beta/release candidate tags,
e.g. <tt class="docutils literal"><span class="pre">2.5.2b3</span></tt>.  Set by <a class="reference internal" href="../config.html#confval-release"><tt class="xref std std-confval docutils literal"><span class="pre">release</span></tt></a>.</p>
</dd></dl>

<dl class="describe">
<dt>
<tt class="descname">|version|</tt></dt>
<dd><p>Replaced by the project version the documentation refers to. This is meant to
consist only of the major and minor version parts, e.g. <tt class="docutils literal"><span class="pre">2.5</span></tt>, even for
version 2.5.1.  Set by <a class="reference internal" href="../config.html#confval-version"><tt class="xref std std-confval docutils literal"><span class="pre">version</span></tt></a>.</p>
</dd></dl>

<dl class="describe">
<dt>
<tt class="descname">|today|</tt></dt>
<dd><p>Replaced by either today&#8217;s date (the date on which the document is read), or
the date set in the build configuration file.  Normally has the format
<tt class="docutils literal"><span class="pre">April</span> <span class="pre">14,</span> <span class="pre">2007</span></tt>.  Set by <a class="reference internal" href="../config.html#confval-today_fmt"><tt class="xref std std-confval docutils literal"><span class="pre">today_fmt</span></tt></a> and <a class="reference internal" href="../config.html#confval-today"><tt class="xref std std-confval docutils literal"><span class="pre">today</span></tt></a>.</p>
</dd></dl>

</div>
</div>


          </div>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="misc.html" title="Miscellaneous markup"
             >next</a> |</li>
        <li class="right" >
          <a href="code.html" title="Showing code examples"
             >previous</a> |</li>
        <li><a href="../index.html">Sphinx home</a>&nbsp;|&nbsp;</li>
        <li><a href="../contents.html">Documentation</a>
          &raquo;</li>

          <li><a href="index.html" >Sphinx Markup Constructs</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2007-2011, Georg Brandl.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
    </div>
  </body>
</html>