跳过 header 尺码顺序

Skip header size order

我想以无序方式放置 headers。这是在 markdown 中可以做到的:

h1

h3

#h1
###h3 
##h2

这样h3就不是下面的尺寸(h2)而是小了两个尺寸z(h3)。 如何使用 rst?

来自 docutil 关于 Sections 的文档:

Rather than imposing a fixed number and order of section title adornment styles, the order enforced will be the order as encountered. The first style encountered will be an outermost title (like HTML H1), the second style will be a subtitle, the third will be a subsubtitle, and so on.

...

...a document must be consistent in its use of section titles: once a hierarchy of title styles is established, sections must use that hierarchy.

因此您不能直接使用 reStructuredText 执行此操作。您将收到 SEVERE: Title level inconsistent: 警告。

正确,Sphinx 将强制执行层次结构。您可以改为使用 .css 指令来更灵活地格式化标题。