How to define the the height of the csv table in reStructuredText?

后端 未结 1 1234
小鲜肉
小鲜肉 2021-01-26 21:22

I\'m using this code to create a table from csv for my documentation in readthedocs:

.. csv-table:: Markram et al. Model & Network configuration file
   :fi         


        
相关标签:
1条回答
  • 2021-01-26 22:05

    Immediately before your .. csv-table directive, put this above with a blank line separating (see https://stackoverflow.com/a/46195021/2214933):

    .. rst-class:: table-myclass
    
    .. csv-table:: blah blah blah
    

    The above will apply a class name to the rendered HTML table.

    Then in your Sphinx theme, add a custom style. Assuming you want to limit the height of each table row (not the table itself since 100px is pretty short for a lot of data) put the following:

    table.myclass tbody tr {height: 100px;}
    

    Adjust the CSS selector and style to taste.

    See how to create custom styles in Sphinx.

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