Overriding the default field name limit in sphinx/docutils

感情迁移 提交于 2019-11-30 06:59:05

Sphinx-1.2 will support docutils.conf for html writer if no objection. https://bitbucket.org/birkenfeld/sphinx/commits/67682aca

I think your approach doesn't work because sphinx uses its own html writer.

However I think it should work, if you adapt the style for field_name. I (once) used a custom css file with

.field-name {
    white-space: nowrap;
}

or set it to a fixed width.

One way to do this is to override the setting in custom sphinx builder class extending original html builder, and set self.settings.field_name_limit = 0 in prepare_writing(self, docnames) function. That said, this is a little overkill, unless you already have a custom builder class ...

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!