Sphinx-doc学习

php中文网
发布: 2016-06-07 16:30:46
原创
1528人浏览过

文档地址:http:// python hosted.org/an_example_pypi_project/ sphinx .html#bold-italics 粗体和斜体 **bold***italics* 列表 * A thing.* B thing.或者1. Item 1.2. Item 2.3. Item 3.或者- A thing.- B thing.- C thing. headers H1 --- Top of page to

文档地址:http://pythonhosted.org/an_example_pypi_project/sphinx.html#bold-italics

课游记AI
课游记AI

AI原生学习产品

课游记AI 155
查看详情 课游记AI

粗体和斜体

**bold***italics*
登录后复制

列表

* A thing.* B thing.或者1. Item 1.2. Item 2.3. Item 3.或者- A thing.- B thing.- C thing.
登录后复制

headers

H1 --- Top of page tops*************************?H2 -- page sections=====================?H3 -- subsections-------------------?H4 -- subsubsections++++++++++++++++++++++++
登录后复制

表格

COMPLEX TABLE:?+------------+------------+-----------+| Header 1?? | Header 2?? | Header 3??|+============+============+===========+| body row 1 | column 2?? | column 3??|+------------+------------+-----------+| body row 2 | Cells may span columns.|+------------+------------+-----------+| body row 3 | Cells may??| - Cells?? |+------------+ span rows. | - contain || body row 4 |????????????| - blocks. |+------------+------------+-----------+?SIMPLE TABLE:?=====??=====??======?? Inputs???? Output------------??------??A??????B????A or B=====??=====??======False??False??FalseTrue?? False??TrueFalse??True?? TrueTrue?? True?? True=====??=====??======
登录后复制

链接
`Docs for this project `_`Table of Contents`_
登录后复制

图片(Images)

Images==================?.. _is_sweaty:.. figure:: .static/abc.jpg?? :align:?? center??? Proof that getting rich is mostly luck.?This picture is_sweaty_.
登录后复制

代码

Here is something I want to talk about::?????def my_fn(foo, bar=True):????????"""A really useful function.?????????Returns None????????"""????????pass????????if a ==b :print "1"?inlines--------------This is inline ``if __name__ == '__main__':``
登录后复制

函数定义
========================

.. function:: format_exception(etype, value, tb[, limit=None])??? Format the exception with a traceback.??? :param etype: exception type?? :param value: exception value?? :param tb: traceback object?? :param limit: maximum number of stack frames to show?? :type limit: integer or None?? :rtype: list of strings
登录后复制

python语法连接
=========================

I really like the :mod:`threading` module which has the:class:`threading.Thread` class.?Here is a link :func:`time.time`.
登录后复制

段落标识
=============================

.. note:: test?.. warning:: test?.. versionadded:: version?.. versionchanged:: version?.. seealso:: test??例子------------------------?This is a statement.?.. warning::??? Never, ever, use this code!?.. versionadded:: 0.0.1?It's okay to use this code.
登录后复制

需要注意的地方:
标题的长度,要小于等于====的长度。
否则会在编译的过程中出现title undline too short.的错误。
如果rst文件中出现了中文的,需要进行特殊处理,才能保证编译不会出现问题。

修改conf.pyimport sysreload(sys)sys.setdefaultencoding('utf8')
登录后复制

最佳 Windows 性能的顶级免费优化软件
最佳 Windows 性能的顶级免费优化软件

每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号