Skip to content

Commit

Permalink
Fix double word in doc of latex_table_style, improve it
Browse files Browse the repository at this point in the history
  • Loading branch information
jfbu committed Aug 11, 2022
1 parent 4ae595c commit 22339c6
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions doc/usage/configuration.rst
Expand Up @@ -2261,32 +2261,34 @@ These options influence LaTeX output.
If using ``'booktabs'`` or ``'borderless'`` it seems recommended to also
opt for ``'colorrows'``...

Each table can be styled in a way overriding the global setting, if
assigned classes (via ``:class:`` or ``.. rst-class::``, see
:ref:`table-directives`) among the following list: ``booktabs``,
``borderless``, ``standard``, ``colorrows``, ``nocolorrows``. Using
``standard`` means to render tables in the standard LaTeX way with both
horizontal and vertical lines and has no influence on colour status.
Each table can override the global style via ``:class:`` table directive
option, or ``.. rst-class::`` for no-directive table (cf.
:ref:`table-directives`). Currently recognized classes are ``booktabs``,
``borderless``, ``standard``, ``colorrows``, ``nocolorrows``. The latter
two can be combined with any of the first three. The ``standard`` class
produces tables with both horizontal and vertical lines (as has been the
default so far with Sphinx).

Merged contiguous cells located on a single row row will obey correctly the
row colour, if set.
A single-row multi-column merged cell will obey the row colour, if it is
set.

.. note::

- It is hard-coded in LaTeX that a single cell will obey the row colour
even if there is a column colour set via ``\columncolor`` from a custom
table column specification (cf. :rst:dir:`tabularcolumns`). If the
table column specification (using :rst:dir:`tabularcolumns`). If the
document is configured to use the ``'colorrows'`` table style, a table
wishing to use column colours should receive the ``nocolorrows``
class.

- Multi-row merged cells, whether single column or multi-column
currently suppress all kinds of cell colouring.
currently ignore any column, row, or cell colour. Only single-row
merged cells respond to colour, and only to the sole row colour.

- It is possible for a simple cell to set a custom colour via the
:rst:dir:`raw` directive and the ``\cellcolor`` LaTeX command located
at the very start of the cell contents. But this is currently
without effect for any kind of merged cell.
:dudir:`raw` directive and the ``\cellcolor`` LaTeX command located
at the very start of the cell contents. This currently will remain
effectless if used in a merged cell, whatever its kind.

.. versionadded:: 5.2.0

Expand All @@ -2305,7 +2307,8 @@ These options influence LaTeX output.
white gap between the bottom row and the bottom rule, and between the
first body row and the (mid or top) rule above it. It is possible to
extend the background colouring to touch the rules, via some extra LaTeX
coding. This may be added to Sphinx in case of feature request.
coding. This may be added to Sphinx in case of feature request, but
this whitespace is considered currently a quality rather than a defect.

.. confval:: latex_elements

Expand Down

0 comments on commit 22339c6

Please sign in to comment.