Commits

Zoom Quiet committed 85200d4

+0.5H rst 完成80%

  • Participants
  • Parent commits 5a0e522
  • Branches doc-zh

Comments (0)

Files changed (1)

 除了规则,它是reST 的又一个扩展机制,
 Sphinx 大量使用了指令.
 
-Docutils 支持以下:
+Docutils 支持以下指令:
 
 * 警示 Admonitions: :dudir:`attention`, :dudir:`caution`, :dudir:`danger`,
   :dudir:`error`, :dudir:`hint`, :dudir:`important`, :dudir:`note`,
   :dudir:`tip`, :dudir:`warning` and the generic :dudir:`admonition`.
-  (Most themes style only "note" and "warning" specially.)
+  (多数样式目前仅支持 "note"  "warning" :sup:`好在都有针对的对象ID,很容易使用CSS进行定制` .)
 
 * 图像 Images:
 
-  - :dudir:`image` (see also Images_ below)
-  - :dudir:`figure` (an image with caption and optional legend)
+  - :dudir:`image` (参考后面的 Images_ )
+  - :dudir:`figure` (配有标题和图例 的图片)
 
 * 其它行文元素 Additional body elements:
 
-  - :dudir:`contents` (a local, i.e. for the current file only, table of
-    contents)
-  - :dudir:`container` (a container with a custom class, useful to generate an
-    outer ``<div>`` in HTML)
-  - :dudir:`rubric` (a heading without relation to the document sectioning)
-  - :dudir:`topic`, :dudir:`sidebar` (special highlighted body elements)
-  - :dudir:`parsed-literal` (literal block that supports inline markup)
-  - :dudir:`epigraph` (a block quote with optional attribution line)
-  - :dudir:`highlights`, :dudir:`pull-quote` (block quotes with their own
-    class attribute)
-  - :dudir:`compound` (a compound paragraph)
+  - :dudir:`contents` (对诸如 本地文件 的内容表单)
+  - :dudir:`container` (配有定制 class 的容器,以便生成HTML 中的 ``<div>`` )
+  - :dudir:`rubric` (没有到相对段落关系的标题 a heading without relation to the document sectioning)
+  - :dudir:`topic`, :dudir:`sidebar` (特殊高亮的正文元素 special highlighted body elements)
+  - :dudir:`parsed-literal` (支持内嵌标记的文本块)
+  - :dudir:`epigraph` (有可选归属行的引用文本块)
+  - :dudir:`highlights`, :dudir:`pull-quote` (有他们自己class属性的文本块)
+  - :dudir:`compound` (复合段落)
 
 * 特殊表格 Special tables:
 
-  - :dudir:`table` (a table with title)
-  - :dudir:`csv-table` (a table generated from comma-separated values)
-  - :dudir:`list-table` (a table generated from a list of lists)
+  - :dudir:`table` (有标题的表格)
+  - :dudir:`csv-table` (从csv数据生成的表格)
+  - :dudir:`list-table` (从列表数据生成的表格)
 
 * 特殊指令 Special directives:
 
-  - :dudir:`raw` (include raw target-format markup)
-  - :dudir:`include` (include reStructuredText from another file)
-    -- in Sphinx, when given an absolute include file path, this directive takes
-    it as relative to the source directory
-  - :dudir:`class` (assign a class attribute to the next element) [1]_
+  - :dudir:`raw` (包括原始文本的目标格式标记 include raw target-format markup)
+  - :dudir:`include` (从其它文件引入 reST )
+    -- 在Sphinx, 当给定包含文件的绝对路径时,指令会从源代码目录为起点进行相对路径查找.
+  - :dudir:`class` (将 class 属性绑定到下一个元素) [1]_
 
 * HTML 专用 specifics:
 
-  - :dudir:`meta` (generation of HTML ``<meta>`` tags)
-  - :dudir:`title` (override document title)
+  - :dudir:`meta` (生成 HTML 中的 ``<meta>`` 标签)
+  - :dudir:`title` (覆盖文件标题)
 
 * 影响标记 Influencing markup:
 
-  - :dudir:`default-role` (set a new default role)
-  - :dudir:`role` (create a new role)
+  - :dudir:`default-role` (设置新默认规则)
+  - :dudir:`role` (创建新规则)
 
-  Since these are only per-file, better use Sphinx' facilities for setting the
-  :confval:`default_role`.
+  由于这些指令都只能作用到单一文件,所以,更好的使用 Sphinx 的方式是设置 :confval:`default_role`.
 
-Do *not* use the directives :dudir:`sectnum`, :dudir:`header` and
-:dudir:`footer`.
+*不要* 使用指令 :dudir:`sectnum`, :dudir:`header` 和 :dudir:`footer`.
 
-Directives added by Sphinx are described in :ref:`sphinxmarkup`.
+Sphinx 增加的指令描述收集在:  :ref:`sphinxmarkup` .
 
 Basically, a directive consists of a name, arguments, options and content. (Keep
 this terminology in mind, it is used in the next chapter describing custom
-directives.)  Looking at this example, ::
+directives.)  Looking at this example, 
+基本上一个指令由名称,参数,选项和内容组成.
+(请记住这里提及的几个术语,
+它们将在之后章节描述自定义指令)
+从这个例子来看,::
 
    .. function:: foo(x)
                  foo(y, z)
 
       Return a line of text input from the user.
 
-``function`` is the directive name.  It is given two arguments here, the
-remainder of the first line and the second line, as well as one option
-``module`` (as you can see, options are given in the lines immediately following
-the arguments and indicated by the colons).  Options must be indented to the
-same level as the directive content.
+``function`` 是指令名,
+在头两行里给出了两个参数,
+紧接着给出了一个 ``module`` 选项
+(正如你所见,由冒号标明的 ``module`` 之后立即跟上参数)
+选项​​必须缩进和指令内容有相同的缩进.
 
-The directive content follows after a blank line and is indented relative to the
-directive start.
+.. The directive content follows after a blank line and is indented relative to the directive start.
+
+该指令的内容则是由一个空行和同样的缩进来接上.
+
 
 
 Images