简体   繁体   English

在Sphinx输出中显示缩进

[英]Showing indentations in Sphinx output

I am trying to build a restructuredText file such that sphinx renders a hierarchy structure in html. 我试图建立一个restructuredText文件,以便sphinx在html中呈现层次结构。 How can I build the RST format to implement a printout like the following: 如何构建RST格式以实现如下所示的打印输出:

This 这个

  Is An Example output 

.. code-block:: text where you manually indent the text is one option. .. code-block:: text ,您可以在其中手动缩进文本,这是一种选择。 If it is a file hierarchy, I like using tree to create the ASCII art diagram. 如果是文件层次结构,我喜欢使用来创建ASCII艺术图。

Nested lists are another. 嵌套列表是另一个。 Note the rules for nesting . 注意嵌套规则

Nested lists are possible, but be aware that they must be separated from the parent list items by blank lines: 嵌套列表是可能的,但请注意,它们必须与父列表项之间用空白行分隔:

* This

  * Is

    * An 

  * Example

    * output

If you don't care for the bullets, you could use CSS to remove them. 如果您不在乎子弹,则可以使用CSS删除它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM