Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/wp-file-.../lib/codemirr.../mode/rst
File: index.html
<!doctype html>
[0] Fix | Delete
[1] Fix | Delete
<title>CodeMirror: reStructuredText mode</title>
[2] Fix | Delete
<meta charset="utf-8"/>
[3] Fix | Delete
<link rel=stylesheet href="../../doc/docs.css">
[4] Fix | Delete
[5] Fix | Delete
<link rel="stylesheet" href="../../lib/codemirror.css">
[6] Fix | Delete
<script src="../../lib/codemirror.js"></script>
[7] Fix | Delete
<script src="../../addon/mode/overlay.js"></script>
[8] Fix | Delete
<script src="rst.js"></script>
[9] Fix | Delete
<style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
[10] Fix | Delete
<div id=nav>
[11] Fix | Delete
<a href="http://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png"></a>
[12] Fix | Delete
[13] Fix | Delete
<ul>
[14] Fix | Delete
<li><a href="../../index.html">Home</a>
[15] Fix | Delete
<li><a href="../../doc/manual.html">Manual</a>
[16] Fix | Delete
<li><a href="https://github.com/codemirror/codemirror">Code</a>
[17] Fix | Delete
</ul>
[18] Fix | Delete
<ul>
[19] Fix | Delete
<li><a href="../index.html">Language modes</a>
[20] Fix | Delete
<li><a class=active href="#">reStructuredText</a>
[21] Fix | Delete
</ul>
[22] Fix | Delete
</div>
[23] Fix | Delete
[24] Fix | Delete
<article>
[25] Fix | Delete
<h2>reStructuredText mode</h2>
[26] Fix | Delete
<form><textarea id="code" name="code">
[27] Fix | Delete
.. This is an excerpt from Sphinx documentation: http://sphinx.pocoo.org/_sources/rest.txt
[28] Fix | Delete
[29] Fix | Delete
.. highlightlang:: rest
[30] Fix | Delete
[31] Fix | Delete
.. _rst-primer:
[32] Fix | Delete
[33] Fix | Delete
reStructuredText Primer
[34] Fix | Delete
=======================
[35] Fix | Delete
[36] Fix | Delete
This section is a brief introduction to reStructuredText (reST) concepts and
[37] Fix | Delete
syntax, intended to provide authors with enough information to author documents
[38] Fix | Delete
productively. Since reST was designed to be a simple, unobtrusive markup
[39] Fix | Delete
language, this will not take too long.
[40] Fix | Delete
[41] Fix | Delete
.. seealso::
[42] Fix | Delete
[43] Fix | Delete
The authoritative `reStructuredText User Documentation
[44] Fix | Delete
&lt;http://docutils.sourceforge.net/rst.html&gt;`_. The "ref" links in this
[45] Fix | Delete
document link to the description of the individual constructs in the reST
[46] Fix | Delete
reference.
[47] Fix | Delete
[48] Fix | Delete
[49] Fix | Delete
Paragraphs
[50] Fix | Delete
----------
[51] Fix | Delete
[52] Fix | Delete
The paragraph (:duref:`ref &lt;paragraphs&gt;`) is the most basic block in a reST
[53] Fix | Delete
document. Paragraphs are simply chunks of text separated by one or more blank
[54] Fix | Delete
lines. As in Python, indentation is significant in reST, so all lines of the
[55] Fix | Delete
same paragraph must be left-aligned to the same level of indentation.
[56] Fix | Delete
[57] Fix | Delete
[58] Fix | Delete
.. _inlinemarkup:
[59] Fix | Delete
[60] Fix | Delete
Inline markup
[61] Fix | Delete
-------------
[62] Fix | Delete
[63] Fix | Delete
The standard reST inline markup is quite simple: use
[64] Fix | Delete
[65] Fix | Delete
* one asterisk: ``*text*`` for emphasis (italics),
[66] Fix | Delete
* two asterisks: ``**text**`` for strong emphasis (boldface), and
[67] Fix | Delete
* backquotes: ````text```` for code samples.
[68] Fix | Delete
[69] Fix | Delete
If asterisks or backquotes appear in running text and could be confused with
[70] Fix | Delete
inline markup delimiters, they have to be escaped with a backslash.
[71] Fix | Delete
[72] Fix | Delete
Be aware of some restrictions of this markup:
[73] Fix | Delete
[74] Fix | Delete
* it may not be nested,
[75] Fix | Delete
* content may not start or end with whitespace: ``* text*`` is wrong,
[76] Fix | Delete
* it must be separated from surrounding text by non-word characters. Use a
[77] Fix | Delete
backslash escaped space to work around that: ``thisis\ *one*\ word``.
[78] Fix | Delete
[79] Fix | Delete
These restrictions may be lifted in future versions of the docutils.
[80] Fix | Delete
[81] Fix | Delete
reST also allows for custom "interpreted text roles"', which signify that the
[82] Fix | Delete
enclosed text should be interpreted in a specific way. Sphinx uses this to
[83] Fix | Delete
provide semantic markup and cross-referencing of identifiers, as described in
[84] Fix | Delete
the appropriate section. The general syntax is ``:rolename:`content```.
[85] Fix | Delete
[86] Fix | Delete
Standard reST provides the following roles:
[87] Fix | Delete
[88] Fix | Delete
* :durole:`emphasis` -- alternate spelling for ``*emphasis*``
[89] Fix | Delete
* :durole:`strong` -- alternate spelling for ``**strong**``
[90] Fix | Delete
* :durole:`literal` -- alternate spelling for ````literal````
[91] Fix | Delete
* :durole:`subscript` -- subscript text
[92] Fix | Delete
* :durole:`superscript` -- superscript text
[93] Fix | Delete
* :durole:`title-reference` -- for titles of books, periodicals, and other
[94] Fix | Delete
materials
[95] Fix | Delete
[96] Fix | Delete
See :ref:`inline-markup` for roles added by Sphinx.
[97] Fix | Delete
[98] Fix | Delete
[99] Fix | Delete
Lists and Quote-like blocks
[100] Fix | Delete
---------------------------
[101] Fix | Delete
[102] Fix | Delete
List markup (:duref:`ref &lt;bullet-lists&gt;`) is natural: just place an asterisk at
[103] Fix | Delete
the start of a paragraph and indent properly. The same goes for numbered lists;
[104] Fix | Delete
they can also be autonumbered using a ``#`` sign::
[105] Fix | Delete
[106] Fix | Delete
* This is a bulleted list.
[107] Fix | Delete
* It has two items, the second
[108] Fix | Delete
item uses two lines.
[109] Fix | Delete
[110] Fix | Delete
1. This is a numbered list.
[111] Fix | Delete
2. It has two items too.
[112] Fix | Delete
[113] Fix | Delete
#. This is a numbered list.
[114] Fix | Delete
#. It has two items too.
[115] Fix | Delete
[116] Fix | Delete
[117] Fix | Delete
Nested lists are possible, but be aware that they must be separated from the
[118] Fix | Delete
parent list items by blank lines::
[119] Fix | Delete
[120] Fix | Delete
* this is
[121] Fix | Delete
* a list
[122] Fix | Delete
[123] Fix | Delete
* with a nested list
[124] Fix | Delete
* and some subitems
[125] Fix | Delete
[126] Fix | Delete
* and here the parent list continues
[127] Fix | Delete
[128] Fix | Delete
Definition lists (:duref:`ref &lt;definition-lists&gt;`) are created as follows::
[129] Fix | Delete
[130] Fix | Delete
term (up to a line of text)
[131] Fix | Delete
Definition of the term, which must be indented
[132] Fix | Delete
[133] Fix | Delete
and can even consist of multiple paragraphs
[134] Fix | Delete
[135] Fix | Delete
next term
[136] Fix | Delete
Description.
[137] Fix | Delete
[138] Fix | Delete
Note that the term cannot have more than one line of text.
[139] Fix | Delete
[140] Fix | Delete
Quoted paragraphs (:duref:`ref &lt;block-quotes&gt;`) are created by just indenting
[141] Fix | Delete
them more than the surrounding paragraphs.
[142] Fix | Delete
[143] Fix | Delete
Line blocks (:duref:`ref &lt;line-blocks&gt;`) are a way of preserving line breaks::
[144] Fix | Delete
[145] Fix | Delete
| These lines are
[146] Fix | Delete
| broken exactly like in
[147] Fix | Delete
| the source file.
[148] Fix | Delete
[149] Fix | Delete
There are also several more special blocks available:
[150] Fix | Delete
[151] Fix | Delete
* field lists (:duref:`ref &lt;field-lists&gt;`)
[152] Fix | Delete
* option lists (:duref:`ref &lt;option-lists&gt;`)
[153] Fix | Delete
* quoted literal blocks (:duref:`ref &lt;quoted-literal-blocks&gt;`)
[154] Fix | Delete
* doctest blocks (:duref:`ref &lt;doctest-blocks&gt;`)
[155] Fix | Delete
[156] Fix | Delete
[157] Fix | Delete
Source Code
[158] Fix | Delete
-----------
[159] Fix | Delete
[160] Fix | Delete
Literal code blocks (:duref:`ref &lt;literal-blocks&gt;`) are introduced by ending a
[161] Fix | Delete
paragraph with the special marker ``::``. The literal block must be indented
[162] Fix | Delete
(and, like all paragraphs, separated from the surrounding ones by blank lines)::
[163] Fix | Delete
[164] Fix | Delete
This is a normal text paragraph. The next paragraph is a code sample::
[165] Fix | Delete
[166] Fix | Delete
It is not processed in any way, except
[167] Fix | Delete
that the indentation is removed.
[168] Fix | Delete
[169] Fix | Delete
It can span multiple lines.
[170] Fix | Delete
[171] Fix | Delete
This is a normal text paragraph again.
[172] Fix | Delete
[173] Fix | Delete
The handling of the ``::`` marker is smart:
[174] Fix | Delete
[175] Fix | Delete
* If it occurs as a paragraph of its own, that paragraph is completely left
[176] Fix | Delete
out of the document.
[177] Fix | Delete
* If it is preceded by whitespace, the marker is removed.
[178] Fix | Delete
* If it is preceded by non-whitespace, the marker is replaced by a single
[179] Fix | Delete
colon.
[180] Fix | Delete
[181] Fix | Delete
That way, the second sentence in the above example's first paragraph would be
[182] Fix | Delete
rendered as "The next paragraph is a code sample:".
[183] Fix | Delete
[184] Fix | Delete
[185] Fix | Delete
.. _rst-tables:
[186] Fix | Delete
[187] Fix | Delete
Tables
[188] Fix | Delete
------
[189] Fix | Delete
[190] Fix | Delete
Two forms of tables are supported. For *grid tables* (:duref:`ref
[191] Fix | Delete
&lt;grid-tables&gt;`), you have to "paint" the cell grid yourself. They look like
[192] Fix | Delete
this::
[193] Fix | Delete
[194] Fix | Delete
+------------------------+------------+----------+----------+
[195] Fix | Delete
| Header row, column 1 | Header 2 | Header 3 | Header 4 |
[196] Fix | Delete
| (header rows optional) | | | |
[197] Fix | Delete
+========================+============+==========+==========+
[198] Fix | Delete
| body row 1, column 1 | column 2 | column 3 | column 4 |
[199] Fix | Delete
+------------------------+------------+----------+----------+
[200] Fix | Delete
| body row 2 | ... | ... | |
[201] Fix | Delete
+------------------------+------------+----------+----------+
[202] Fix | Delete
[203] Fix | Delete
*Simple tables* (:duref:`ref &lt;simple-tables&gt;`) are easier to write, but
[204] Fix | Delete
limited: they must contain more than one row, and the first column cannot
[205] Fix | Delete
contain multiple lines. They look like this::
[206] Fix | Delete
[207] Fix | Delete
===== ===== =======
[208] Fix | Delete
A B A and B
[209] Fix | Delete
===== ===== =======
[210] Fix | Delete
False False False
[211] Fix | Delete
True False False
[212] Fix | Delete
False True False
[213] Fix | Delete
True True True
[214] Fix | Delete
===== ===== =======
[215] Fix | Delete
[216] Fix | Delete
[217] Fix | Delete
Hyperlinks
[218] Fix | Delete
----------
[219] Fix | Delete
[220] Fix | Delete
External links
[221] Fix | Delete
^^^^^^^^^^^^^^
[222] Fix | Delete
[223] Fix | Delete
Use ```Link text &lt;http://example.com/&gt;`_`` for inline web links. If the link
[224] Fix | Delete
text should be the web address, you don't need special markup at all, the parser
[225] Fix | Delete
finds links and mail addresses in ordinary text.
[226] Fix | Delete
[227] Fix | Delete
You can also separate the link and the target definition (:duref:`ref
[228] Fix | Delete
&lt;hyperlink-targets&gt;`), like this::
[229] Fix | Delete
[230] Fix | Delete
This is a paragraph that contains `a link`_.
[231] Fix | Delete
[232] Fix | Delete
.. _a link: http://example.com/
[233] Fix | Delete
[234] Fix | Delete
[235] Fix | Delete
Internal links
[236] Fix | Delete
^^^^^^^^^^^^^^
[237] Fix | Delete
[238] Fix | Delete
Internal linking is done via a special reST role provided by Sphinx, see the
[239] Fix | Delete
section on specific markup, :ref:`ref-role`.
[240] Fix | Delete
[241] Fix | Delete
[242] Fix | Delete
Sections
[243] Fix | Delete
--------
[244] Fix | Delete
[245] Fix | Delete
Section headers (:duref:`ref &lt;sections&gt;`) are created by underlining (and
[246] Fix | Delete
optionally overlining) the section title with a punctuation character, at least
[247] Fix | Delete
as long as the text::
[248] Fix | Delete
[249] Fix | Delete
=================
[250] Fix | Delete
This is a heading
[251] Fix | Delete
=================
[252] Fix | Delete
[253] Fix | Delete
Normally, there are no heading levels assigned to certain characters as the
[254] Fix | Delete
structure is determined from the succession of headings. However, for the
[255] Fix | Delete
Python documentation, this convention is used which you may follow:
[256] Fix | Delete
[257] Fix | Delete
* ``#`` with overline, for parts
[258] Fix | Delete
* ``*`` with overline, for chapters
[259] Fix | Delete
* ``=``, for sections
[260] Fix | Delete
* ``-``, for subsections
[261] Fix | Delete
* ``^``, for subsubsections
[262] Fix | Delete
* ``"``, for paragraphs
[263] Fix | Delete
[264] Fix | Delete
Of course, you are free to use your own marker characters (see the reST
[265] Fix | Delete
documentation), and use a deeper nesting level, but keep in mind that most
[266] Fix | Delete
target formats (HTML, LaTeX) have a limited supported nesting depth.
[267] Fix | Delete
[268] Fix | Delete
[269] Fix | Delete
Explicit Markup
[270] Fix | Delete
---------------
[271] Fix | Delete
[272] Fix | Delete
"Explicit markup" (:duref:`ref &lt;explicit-markup-blocks&gt;`) is used in reST for
[273] Fix | Delete
most constructs that need special handling, such as footnotes,
[274] Fix | Delete
specially-highlighted paragraphs, comments, and generic directives.
[275] Fix | Delete
[276] Fix | Delete
An explicit markup block begins with a line starting with ``..`` followed by
[277] Fix | Delete
whitespace and is terminated by the next paragraph at the same level of
[278] Fix | Delete
indentation. (There needs to be a blank line between explicit markup and normal
[279] Fix | Delete
paragraphs. This may all sound a bit complicated, but it is intuitive enough
[280] Fix | Delete
when you write it.)
[281] Fix | Delete
[282] Fix | Delete
[283] Fix | Delete
.. _directives:
[284] Fix | Delete
[285] Fix | Delete
Directives
[286] Fix | Delete
----------
[287] Fix | Delete
[288] Fix | Delete
A directive (:duref:`ref &lt;directives&gt;`) is a generic block of explicit markup.
[289] Fix | Delete
Besides roles, it is one of the extension mechanisms of reST, and Sphinx makes
[290] Fix | Delete
heavy use of it.
[291] Fix | Delete
[292] Fix | Delete
Docutils supports the following directives:
[293] Fix | Delete
[294] Fix | Delete
* Admonitions: :dudir:`attention`, :dudir:`caution`, :dudir:`danger`,
[295] Fix | Delete
:dudir:`error`, :dudir:`hint`, :dudir:`important`, :dudir:`note`,
[296] Fix | Delete
:dudir:`tip`, :dudir:`warning` and the generic :dudir:`admonition`.
[297] Fix | Delete
(Most themes style only "note" and "warning" specially.)
[298] Fix | Delete
[299] Fix | Delete
* Images:
[300] Fix | Delete
[301] Fix | Delete
- :dudir:`image` (see also Images_ below)
[302] Fix | Delete
- :dudir:`figure` (an image with caption and optional legend)
[303] Fix | Delete
[304] Fix | Delete
* Additional body elements:
[305] Fix | Delete
[306] Fix | Delete
- :dudir:`contents` (a local, i.e. for the current file only, table of
[307] Fix | Delete
contents)
[308] Fix | Delete
- :dudir:`container` (a container with a custom class, useful to generate an
[309] Fix | Delete
outer ``&lt;div&gt;`` in HTML)
[310] Fix | Delete
- :dudir:`rubric` (a heading without relation to the document sectioning)
[311] Fix | Delete
- :dudir:`topic`, :dudir:`sidebar` (special highlighted body elements)
[312] Fix | Delete
- :dudir:`parsed-literal` (literal block that supports inline markup)
[313] Fix | Delete
- :dudir:`epigraph` (a block quote with optional attribution line)
[314] Fix | Delete
- :dudir:`highlights`, :dudir:`pull-quote` (block quotes with their own
[315] Fix | Delete
class attribute)
[316] Fix | Delete
- :dudir:`compound` (a compound paragraph)
[317] Fix | Delete
[318] Fix | Delete
* Special tables:
[319] Fix | Delete
[320] Fix | Delete
- :dudir:`table` (a table with title)
[321] Fix | Delete
- :dudir:`csv-table` (a table generated from comma-separated values)
[322] Fix | Delete
- :dudir:`list-table` (a table generated from a list of lists)
[323] Fix | Delete
[324] Fix | Delete
* Special directives:
[325] Fix | Delete
[326] Fix | Delete
- :dudir:`raw` (include raw target-format markup)
[327] Fix | Delete
- :dudir:`include` (include reStructuredText from another file)
[328] Fix | Delete
-- in Sphinx, when given an absolute include file path, this directive takes
[329] Fix | Delete
it as relative to the source directory
[330] Fix | Delete
- :dudir:`class` (assign a class attribute to the next element) [1]_
[331] Fix | Delete
[332] Fix | Delete
* HTML specifics:
[333] Fix | Delete
[334] Fix | Delete
- :dudir:`meta` (generation of HTML ``&lt;meta&gt;`` tags)
[335] Fix | Delete
- :dudir:`title` (override document title)
[336] Fix | Delete
[337] Fix | Delete
* Influencing markup:
[338] Fix | Delete
[339] Fix | Delete
- :dudir:`default-role` (set a new default role)
[340] Fix | Delete
- :dudir:`role` (create a new role)
[341] Fix | Delete
[342] Fix | Delete
Since these are only per-file, better use Sphinx' facilities for setting the
[343] Fix | Delete
:confval:`default_role`.
[344] Fix | Delete
[345] Fix | Delete
Do *not* use the directives :dudir:`sectnum`, :dudir:`header` and
[346] Fix | Delete
:dudir:`footer`.
[347] Fix | Delete
[348] Fix | Delete
Directives added by Sphinx are described in :ref:`sphinxmarkup`.
[349] Fix | Delete
[350] Fix | Delete
Basically, a directive consists of a name, arguments, options and content. (Keep
[351] Fix | Delete
this terminology in mind, it is used in the next chapter describing custom
[352] Fix | Delete
directives.) Looking at this example, ::
[353] Fix | Delete
[354] Fix | Delete
.. function:: foo(x)
[355] Fix | Delete
foo(y, z)
[356] Fix | Delete
:module: some.module.name
[357] Fix | Delete
[358] Fix | Delete
Return a line of text input from the user.
[359] Fix | Delete
[360] Fix | Delete
``function`` is the directive name. It is given two arguments here, the
[361] Fix | Delete
remainder of the first line and the second line, as well as one option
[362] Fix | Delete
``module`` (as you can see, options are given in the lines immediately following
[363] Fix | Delete
the arguments and indicated by the colons). Options must be indented to the
[364] Fix | Delete
same level as the directive content.
[365] Fix | Delete
[366] Fix | Delete
The directive content follows after a blank line and is indented relative to the
[367] Fix | Delete
directive start.
[368] Fix | Delete
[369] Fix | Delete
[370] Fix | Delete
Images
[371] Fix | Delete
------
[372] Fix | Delete
[373] Fix | Delete
reST supports an image directive (:dudir:`ref &lt;image&gt;`), used like so::
[374] Fix | Delete
[375] Fix | Delete
.. image:: gnu.png
[376] Fix | Delete
(options)
[377] Fix | Delete
[378] Fix | Delete
When used within Sphinx, the file name given (here ``gnu.png``) must either be
[379] Fix | Delete
relative to the source file, or absolute which means that they are relative to
[380] Fix | Delete
the top source directory. For example, the file ``sketch/spam.rst`` could refer
[381] Fix | Delete
to the image ``images/spam.png`` as ``../images/spam.png`` or
[382] Fix | Delete
``/images/spam.png``.
[383] Fix | Delete
[384] Fix | Delete
Sphinx will automatically copy image files over to a subdirectory of the output
[385] Fix | Delete
directory on building (e.g. the ``_static`` directory for HTML output.)
[386] Fix | Delete
[387] Fix | Delete
Interpretation of image size options (``width`` and ``height``) is as follows:
[388] Fix | Delete
if the size has no unit or the unit is pixels, the given size will only be
[389] Fix | Delete
respected for output channels that support pixels (i.e. not in LaTeX output).
[390] Fix | Delete
Other units (like ``pt`` for points) will be used for HTML and LaTeX output.
[391] Fix | Delete
[392] Fix | Delete
Sphinx extends the standard docutils behavior by allowing an asterisk for the
[393] Fix | Delete
extension::
[394] Fix | Delete
[395] Fix | Delete
.. image:: gnu.*
[396] Fix | Delete
[397] Fix | Delete
Sphinx then searches for all images matching the provided pattern and determines
[398] Fix | Delete
their type. Each builder then chooses the best image out of these candidates.
[399] Fix | Delete
For instance, if the file name ``gnu.*`` was given and two files :file:`gnu.pdf`
[400] Fix | Delete
and :file:`gnu.png` existed in the source tree, the LaTeX builder would choose
[401] Fix | Delete
the former, while the HTML builder would prefer the latter.
[402] Fix | Delete
[403] Fix | Delete
.. versionchanged:: 0.4
[404] Fix | Delete
Added the support for file names ending in an asterisk.
[405] Fix | Delete
[406] Fix | Delete
.. versionchanged:: 0.6
[407] Fix | Delete
Image paths can now be absolute.
[408] Fix | Delete
[409] Fix | Delete
[410] Fix | Delete
Footnotes
[411] Fix | Delete
---------
[412] Fix | Delete
[413] Fix | Delete
For footnotes (:duref:`ref &lt;footnotes&gt;`), use ``[#name]_`` to mark the footnote
[414] Fix | Delete
location, and add the footnote body at the bottom of the document after a
[415] Fix | Delete
"Footnotes" rubric heading, like so::
[416] Fix | Delete
[417] Fix | Delete
Lorem ipsum [#f1]_ dolor sit amet ... [#f2]_
[418] Fix | Delete
[419] Fix | Delete
.. rubric:: Footnotes
[420] Fix | Delete
[421] Fix | Delete
.. [#f1] Text of the first footnote.
[422] Fix | Delete
.. [#f2] Text of the second footnote.
[423] Fix | Delete
[424] Fix | Delete
You can also explicitly number the footnotes (``[1]_``) or use auto-numbered
[425] Fix | Delete
footnotes without names (``[#]_``).
[426] Fix | Delete
[427] Fix | Delete
[428] Fix | Delete
Citations
[429] Fix | Delete
---------
[430] Fix | Delete
[431] Fix | Delete
Standard reST citations (:duref:`ref &lt;citations&gt;`) are supported, with the
[432] Fix | Delete
additional feature that they are "global", i.e. all citations can be referenced
[433] Fix | Delete
from all files. Use them like so::
[434] Fix | Delete
[435] Fix | Delete
Lorem ipsum [Ref]_ dolor sit amet.
[436] Fix | Delete
[437] Fix | Delete
.. [Ref] Book or article reference, URL or whatever.
[438] Fix | Delete
[439] Fix | Delete
Citation usage is similar to footnote usage, but with a label that is not
[440] Fix | Delete
numeric or begins with ``#``.
[441] Fix | Delete
[442] Fix | Delete
[443] Fix | Delete
Substitutions
[444] Fix | Delete
-------------
[445] Fix | Delete
[446] Fix | Delete
reST supports "substitutions" (:duref:`ref &lt;substitution-definitions&gt;`), which
[447] Fix | Delete
are pieces of text and/or markup referred to in the text by ``|name|``. They
[448] Fix | Delete
are defined like footnotes with explicit markup blocks, like this::
[449] Fix | Delete
[450] Fix | Delete
.. |name| replace:: replacement *text*
[451] Fix | Delete
[452] Fix | Delete
or this::
[453] Fix | Delete
[454] Fix | Delete
.. |caution| image:: warning.png
[455] Fix | Delete
:alt: Warning!
[456] Fix | Delete
[457] Fix | Delete
See the :duref:`reST reference for substitutions &lt;substitution-definitions&gt;`
[458] Fix | Delete
for details.
[459] Fix | Delete
[460] Fix | Delete
If you want to use some substitutions for all documents, put them into
[461] Fix | Delete
:confval:`rst_prolog` or put them into a separate file and include it into all
[462] Fix | Delete
documents you want to use them in, using the :rst:dir:`include` directive. (Be
[463] Fix | Delete
sure to give the include file a file name extension differing from that of other
[464] Fix | Delete
source files, to avoid Sphinx finding it as a standalone document.)
[465] Fix | Delete
[466] Fix | Delete
Sphinx defines some default substitutions, see :ref:`default-substitutions`.
[467] Fix | Delete
[468] Fix | Delete
[469] Fix | Delete
Comments
[470] Fix | Delete
--------
[471] Fix | Delete
[472] Fix | Delete
Every explicit markup block which isn't a valid markup construct (like the
[473] Fix | Delete
footnotes above) is regarded as a comment (:duref:`ref &lt;comments&gt;`). For
[474] Fix | Delete
example::
[475] Fix | Delete
[476] Fix | Delete
.. This is a comment.
[477] Fix | Delete
[478] Fix | Delete
You can indent text after a comment start to form multiline comments::
[479] Fix | Delete
[480] Fix | Delete
..
[481] Fix | Delete
This whole indented block
[482] Fix | Delete
is a comment.
[483] Fix | Delete
[484] Fix | Delete
Still in the comment.
[485] Fix | Delete
[486] Fix | Delete
[487] Fix | Delete
Source encoding
[488] Fix | Delete
---------------
[489] Fix | Delete
[490] Fix | Delete
Since the easiest way to include special characters like em dashes or copyright
[491] Fix | Delete
signs in reST is to directly write them as Unicode characters, one has to
[492] Fix | Delete
specify an encoding. Sphinx assumes source files to be encoded in UTF-8 by
[493] Fix | Delete
default; you can change this with the :confval:`source_encoding` config value.
[494] Fix | Delete
[495] Fix | Delete
[496] Fix | Delete
Gotchas
[497] Fix | Delete
-------
[498] Fix | Delete
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function