Info: | See <http://docutils.sf.net/rst.html> for introductory docs. |
---|---|
Author: | David Goodger <goodger@python.org> |
Date: | $Date: 2013-02-20 01:10:53 +0000 (Wed, 20 Feb 2013) $ |
Revision: | $Revision: 7612 $ |
Description: | This is a “docinfo block”, or bibliographic field list |
注解
If you are reading this as HTML, please readcheatsheet.txt instead to see the input syntax examples!
Section titles are underlined or overlined & underlined.
Grid table:
Paragraphs are flush-left,separated by blank lines.
| Literal block, preceded by ”::”: Indented or: > Quoted |
>>>print'Doctest block'Doctest block | |
Line blocks preserve line breaks & indents. [new in 0.3.6] Useful for addresses, verse, and adornment-free lists; longlines can be wrapped with continuation lines. |
Simple tables:
List Type | Examples (syntax in thetext source) | ||
---|---|---|---|
Bullet list |
| ||
Enumerated list |
| ||
Definition list |
| ||
Field list |
| ||
Option list |
|
Explicit Markup | Examples (visible in thetext source) | ||
---|---|---|---|
Footnote |
| ||
Citation |
| ||
Hyperlink Target | |||
Anonymous Target | |||
Directive (”::”) | ![]() | ||
Substitution Def | |||
Comment | |||
Empty Comment | (”..” on a line by itself, with blank lines before & after,used to separate indentation contexts) |
emphasis;strong emphasis;interpreted text;interpreted textwith role;inlineliteraltext; standalone hyperlink,http://docutils.sourceforge.net; named reference,reStructuredText;anonymous reference; footnote reference,[1]; citation reference,[CIT2002]; like an inline directive;inline internal target.
See <http://docutils.sf.net/docs/ref/rst/directives.html> for full info.
Directive Name | Description (Docutils version added to, in [brackets]) |
---|---|
attention | Specific admonition; also “caution”, “danger”,“error”, “hint”, “important”, “note”, “tip”, “warning” |
admonition | Generic titled admonition:..admonition::ByTheWay |
image | ..image::picture.png; many options possible |
figure | Like “image”, but with optional caption and legend |
topic | ..topic::Title; like a mini section |
sidebar | ..sidebar::Title; like a mini parallel document |
parsed-literal | A literal block with parsed inline markup |
rubric | ..rubric::InformalHeading |
epigraph | Block quote with class=”epigraph” |
highlights | Block quote with class=”highlights” |
pull-quote | Block quote with class=”pull-quote” |
compound | Compound paragraphs [0.3.6] |
container | Generic block-level container element [0.3.10] |
table | Create a titled table [0.3.1] |
list-table | Create a table from a uniform two-level bullet list [0.3.8] |
csv-table | Create a table from CSV data [0.3.4] |
contents | Generate a table of contents |
sectnum | Automatically number sections, subsections, etc. |
header, footer | Create document decorations [0.3.8] |
target-notes | Create an explicit footnote for each external target |
math | Mathematical notation (input in LaTeX format) |
meta | HTML-specific metadata |
include | Read an external reST file as if it were inline |
raw | Non-reST data passed untouched to the Writer |
replace | Replacement text for substitution definitions |
unicode | Unicode character code conversion for substitution defs |
date | Generates today’s date; for substitution defs |
class | Set a “class” attribute on the next element |
role | Create a custom interpreted text role [0.3.2] |
default-role | Set the default interpreted text role [0.3.10] |
title | Set the metadata document title [0.3.10] |
See <http://docutils.sf.net/docs/ref/rst/roles.html> for full info.
Role Name | Description |
---|---|
emphasis | Equivalent toemphasis |
literal | Equivalent toliteral but processes backslash escapes |
math | Mathematical notation (input in LaTeX format) |
PEP | Reference to a numbered Python Enhancement Proposal |
RFC | Reference to a numbered Internet Request For Comments |
raw | For non-reST data; cannot be used directly (see docs) [0.3.6] |
strong | Equivalent tostrong |
sub | Subscript |
sup | Superscript |
title | Title reference (book, etc.); standard default role |