python sphinx - Paragraph tag not rendering in RestructuredText table cell -
i define following table in restructuredtext:
+-------------------------+--------------------+ | label |description | +=========================+====================+ | foo |two options: | | | | | |* thing 1 | | |* thing 2 | +-------------------------+--------------------+ | bar |bar something. | +-------------------------+--------------------+
when gets rendered in html (using sphinx), "two options:" text gets wrapped in paragraph tag. "bar something." text not rendered paragraph tag. when stylesheets applied, results in cell text looking different:
is there way force same behavior both cases?
sphinx' way change css declarations: add in conf.py line
templates_path = ['my_template_path']
and add in my_template_path file layout.html. there can override css classes of theme define layout of table contents. class names depend on theme. try find out developers features of browser. in theme definition of first paragraph class="first". here overwrite
td > p.first { margin: 0; }
the list ul has class="last simple", overwritten
td > ul.last.simple { margin: 0; }
the layout.html should have form
{% extends "!layout.html" %} <style type="text/css"> /* add class definitions here */ </style>
hope helps. more explanations here , in this stackoverflow-thread.
Comments
Post a Comment