diff --git a/.sphinx/_static/custom.css b/.sphinx/_static/custom.css index cad94b74..0f505692 100644 --- a/.sphinx/_static/custom.css +++ b/.sphinx/_static/custom.css @@ -13,6 +13,11 @@ div.page, h1, h2, h3, h4, h5, h6, .sidebar-tree .current-page>.reference, button th.head { text-transform: uppercase; font-size: var(--font-size--small); + text-align: initial; +} + +table.align-center th.head { + text-align: center } table.docutils { diff --git a/custom_conf.py b/custom_conf.py index 1ada583f..5578a10d 100644 --- a/custom_conf.py +++ b/custom_conf.py @@ -169,3 +169,9 @@ ############################################################ ## Add any configuration that is not covered by the common conf.py file. + +# Define a :center: role that can be used to center the content of table cells. +rst_prolog = ''' +.. role:: center + :class: align-center +''' diff --git a/doc-cheat-sheet.rst b/doc-cheat-sheet.rst index b12ebcdf..49f5316d 100644 --- a/doc-cheat-sheet.rst +++ b/doc-cheat-sheet.rst @@ -118,6 +118,16 @@ Tables | Cell 3 | Cell 4 | +----------------------+------------+ ++----------------------+------------------+ +| :center:`Header 1` | Header 2 | ++======================+==================+ +| Cell 1 | Cell 2 | +| | | +| Second paragraph | | ++----------------------+------------------+ +| Cell 3 | :center:`Cell 4` | ++----------------------+------------------+ + .. list-table:: :header-rows: 1