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

前端 未结 1 1256
独厮守ぢ
独厮守ぢ 2021-01-13 02:50

I\'m using Sphinx to document a Python project.

There seems to be a bit of inconsistency with the .. csv-table:: directive.

The main issue is a

相关标签:
1条回答
  • 2021-01-13 03:02

    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.

    0 讨论(0)
提交回复
热议问题