csv-table formatting in Python docstrings (Sphinx) - multiple lines in one cell

这一生的挚爱 提交于 2019-12-01 20:03:28

Line blocks have a left margin value in the sphinx_rtd_theme. One way to get rid of them is to create a custom CSS file which imports the theme's style rules and add a rule for line blocks within tables without that margin. Assuming the standard file and path names of a Sphinx project:

Create a _static/css/mystyle.css file in your Sphinx project with the following content:

@import "theme.css";

table.docutils div.line-block {
    margin-left: 0;
}

Add the following option to the conf.py:

html_style = 'css/mystyle.css'

Rebuild the Sphinx project.

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