From b0abbb12e474bc07fc5ba74254dec5604daa339c Mon Sep 17 00:00:00 2001 From: ChenXin Date: Tue, 4 Jun 2019 21:38:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E9=87=8A=E6=A0=B7=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/source/index.rst | 1 + docs/source/user/example.rst | 104 +++++++++++++++++++++++++++++++++++ 2 files changed, 105 insertions(+) create mode 100644 docs/source/user/example.rst diff --git a/docs/source/index.rst b/docs/source/index.rst index 03a192dc..da510437 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -56,6 +56,7 @@ fastNLP 在 :mod:`~fastNLP.models` 模块中内置了如 :class:`~fastNLP.models 快速入门 详细指南 科研指南 + 注释语法 API 文档 ------------- diff --git a/docs/source/user/example.rst b/docs/source/user/example.rst new file mode 100644 index 00000000..ec7a6b74 --- /dev/null +++ b/docs/source/user/example.rst @@ -0,0 +1,104 @@ +====== +大标题 +====== + +.. note:: + 中文标题需要符号的数量至少是中文字数的两倍 + +.. warning:: + 符号的数量只可以多,不可以少。 + +小标题1 +########### + +小标题2 +********* + +小标题3(正常使用) +======================== + +小标题4 +------------------- + +参考 http://docutils.sourceforge.net/docs/user/rst/quickref.html + +常见语法 +============ + +*emphasis* + +**strong** + +`text` + +``inline literal`` + +http://docutils.sf.net/ 孤立的网址会自动生成链接 + +显示为特定的文字的链接 `sohu `_ + +突出显示的 + 上面文字 + +正常缩进 + + 形成锻炼 + + + +特殊模块 +============ + +选项会自动识别 + +-v An option +-o file Same with value +--delta A long option +--delta=len Same with value + + +图片 + +.. image:: ../figures/procedures.PNG + :height: 200 + :width: 560 + :scale: 50 + :alt: alternate text + :align: center + +显示一个冒号的代码块:: + + 中间要空一行 + +:: + + 不显示冒号的代码块 + +.. code-block:: python + :linenos: + :emphasize-lines: 1,3 + + print("专业的代码块") + print("") + print("有行号和高亮") + +数学块 + +.. math:: + + H_2O + Na = NaOH + H_2 \uparrow + + +各种连接 +=========== + +:doc:`/user/with_fitlog.rst` + +:mod:`~fastNLP.core.batch` + +:class:`~fastNLP.Batch` + +~表示指显示最后一项 + +:meth:`fastNLP.DataSet.apply` +