ReStructuredText 编号标题
首先有没有办法自动进行标题编号?这就像:
#. Some Section
===============
...
#. Some Subsection
------------------
...
#. Another Subsection
---------------------
...
#. Another Section
==================
...
会被渲染为:
1. 某个部分
...
1.1 某个小节
...
1.2 另一个小节
...
2. 另一个部分
...
Is there a way in rst to have automatic header numbering ? That is something like:
#. Some Section
===============
...
#. Some Subsection
------------------
...
#. Another Subsection
---------------------
...
#. Another Section
==================
...
that would be rendered as:
1. Some Section
...
1.1 Some Subsection
...
1.2 Another Subsection
...
2. Another Section
...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据 docutils 手册,您可以使用
sectnum
指令: http://docutils.sourceforge.net/0.7/docs/ref/rst/directives.html#automatic-section-numbering因此,您可以在非常中添加类似的内容第一行:
HTH
According to the docutils manual, you can use the
sectnum
directive: http://docutils.sourceforge.net/0.7/docs/ref/rst/directives.html#automatic-section-numberingSo you can add something like this in the very first line(s):
HTH