sphinx/doc/extdev
Jean-François B e7c0881992
LaTeX: support for booktabs-style and zebra-striped tables (#10759)
This is a combination of 2 + 28 + 7 + and some more commits...

* Cherry-pick: Add support for booktabs-style tables to LaTeX builder

* Cherry-pick: Add support for zebra-striped tables to LaTeX builder

Co-authored-by: Stefan Wiehler <stefan.wiehler@missinglinkelectronics.com>

Above work originally initiated by @sephalon (thanks!)

Development refactored and continued by @jfbu

* latex_table_style configuration, support booktabs, colorrows, borderless

Some details:

- Simplify a bit a conditional in the longtable template

  This also puts the target for a longtable with a label but no caption
  above the toprule for better hyperlinking (testing shows hyperlink
  target can not end up alone at bottom of previous page).

- Extend allowed syntax for colour assignments via 'sphinxsetup'

- latex_table_style new configuration value and coloured rows

  For the user interface I tried to look for inspiration in
  https://docutils.sourceforge.io/docs/user/config.html#table-style
  which mentions booktabs and borderless.  They also mention
  captionbelow which we can implement later, now that architecture
  is here.  They don't mention coloured rows.

- Test on our own document... looks fine!

- Work-around an incompatibility of \cline with row colours

- Reverse priority of classes to allow overruling booktabs by standard
  after parsing source but before letting LaTeX writer act

- Closes #8220

  Commit
  bb859c6696
  already improved a bit, this finishes it (as :rst:dir:`rst-class` was
  actually not linking to anywhere).

- Let booktabs style defaults to *not* using \cmidrule.  They actually
  don't make much sense there, as all \hline's are removed.

- Add \sphinxnorowcolor which allows construct such as this one in
  a tabularcolumns directive:

    >{\columncolor{blue}\sphinxnorowcolor}

  else LaTeX always overrides column colour by row colour

- Add TableMergeColorHeader, TableMergeColorOdd, TableMergeColorEven
  so single-row merged cells can be styled especially

- Extend row colours to all header rows not only the first one
  (all header rows will share same colour settings)

- Auto-adjust to a no '|'-colspec for optimal handling of merged cell

- Add \sphinxcolorblend

- Workaround LaTeX's \cline features and other grid tables matters

- Add \sphinxbuildwarning for important warnings

- Fix some white gaps in merged cells of tables with vlines and
  colorrows

- Work around LaTeX's \cline serious deficiencies for complex grid
  tables

  This commit corrects \cline badly impacting vertical spacing and
  making tables look even more cramped as they usually are in LaTeX
  (although one sees it clearly only with \arrarrulewidth a bit more
  than the LaTeX default of 0.4pt).

  Most importantly this commit solves the problem that \cline's got
  masked by colour panels from the row below.

- Update CHANGES for PR #10759

- Improve documentation of new latex_table_style regarding colours
2022-10-12 17:15:40 +02:00
..
appapi.rst Mention nitpick_ignore(_regex) in docs of warn-missing-reference 2022-01-18 22:01:52 +01:00
builderapi.rst Fix #9637: Add Builder.allow_parallel to the list of builder APIs 2021-09-18 01:26:12 +09:00
collectorapi.rst Update docs for collectors API 2017-01-28 20:44:40 +09:00
deprecated.rst LaTeX: support for booktabs-style and zebra-striped tables (#10759) 2022-10-12 17:15:40 +02:00
domainapi.rst Add contents entries for domain objects (#10807) 2022-09-13 20:20:02 +01:00
envapi.rst Make EventManager portable 2019-04-16 14:06:36 +09:00
i18n.rst doc: Upgraded babel.pocoo.org links to HTTPS 2021-05-16 16:37:51 +03:00
index.rst Do not apply epigraph style to all block quotes 2022-09-12 19:54:36 +01:00
logging.rst doclinter: restrict by 90 columns 2019-05-26 10:53:53 +09:00
markupapi.rst doc: Upgrade docutils.sourceforge.io links to HTTPS 2021-05-16 15:53:49 +03:00
nodes.rst Decl styling, make desc_inline node 2021-04-12 19:06:44 +02:00
parserapi.rst doc: Update docs for sphinx.parsers.Parser 2022-03-27 19:27:53 +09:00
projectapi.rst Add sphinx.project; a manipulator for project and documents 2018-10-16 10:34:58 +09:00
utils.rst Make EventManager portable 2019-04-16 14:06:36 +09:00