首页 / SPHINX / Sphinx-doc学习
Sphinx-doc学习
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了Sphinx-doc学习,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2914字,纯文字阅读大概需要5分钟。
内容图文
![Sphinx-doc学习](/upload/InfoBanner/zyjiaocheng/557/7bbda1f915094b61b43a6360d88ae8a0.jpg)
文档地址: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
粗体和斜体
**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')
原文地址:Sphinx-doc学习, 感谢原作者分享。
内容总结
以上是互联网集市为您收集整理的Sphinx-doc学习全部内容,希望文章能够帮你解决Sphinx-doc学习所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。