Sphinx 中的第一行缩进

First line indentation in Sphinx

我无法强制 sphinx 对 ReadTheDoc 主题的段落应用首行缩进。我试过了

texinfo_elements = {'paragraphindent': 2}

但是好像不行。还有其他事情要做吗?

您可以使用自定义样式 text-indent

您可以将此样式添加到 custom.css 文件并将其作为配置选项包含在 conf.pyhtml_css_files

custom.css

p {
  text-indent: 1em;
}

conf.py

html_css_files = ['custom.css']