Skip to content

LaTeX: table spacing sometimes broken on 3.x branch from \sphinxAtStartPar mark-up #8838

@jfbu

Description

@jfbu

Describe the bug
A clear and concise description of what the bug is.

Extra vertical
Capture d’écran 2021-02-06 à 16 17 15
whitespace in table cells, particularly merged ones

To Reproduce
Steps to reproduce the behavior:

.. raw:: latex

   %\def\sphinxAtStartPar{}


.. table:: longtable not ok
   :class: longtable

   +------------------------+------------+----------+----------+
   | Header row, column 1   | Header 2   | Header 3 | Header 4 |
   +========================+============+==========+==========+
   | body row, merged columns            | column 3 | column 4 |
   +------------------------+------------+----------+----------+
   | body row               | ...        | ...      |          |
   +------------------------+------------+----------+----------+

.. table:: longtable not ok (2)
   :class: longtable

   +------------------------+------------+----------+----------+
   | Header row, column 1   | Header 2   | Header 3 | Header 4 |
   +========================+============+==========+==========+
   | body row               | ...        | ...      |          |
   +------------------------+------------+----------+----------+
   | body row, merged columns            | column 3 | column 4 |
   +------------------------+------------+----------+----------+


.. tabularcolumns:: |*{4}{l|}

.. table:: tabular not ok

   +------------------------+------------+----------+----------+
   | Header row, column 1   | Header 2   | Header 3 | Header 4 |
   +========================+============+==========+==========+
   | body row               | ...        | ...      |          |
   +------------------------+------------+----------+----------+
   | body row, merged columns            | column 3 | column 4 |
   +------------------------+------------+----------+----------+


.. table:: tabulary worse of all

   +------------------------+------------+----------+----------+
   | Header row, column 1   | Header 2   | Header 3 | Header 4 |
   +========================+============+==========+==========+
   | body row               | ...        | ...      |          |
   +------------------------+------------+----------+----------+
   | body row, merged columns            | column 3 | column 4 |
   +------------------------+------------+----------+----------+

Expected behavior

Capture d’écran 2021-02-06 à 16 18 39

One gets this by letting the raw directive inject \def\sphinxAtStartPar{}.

Environment info

  • OS: [e.g. Unix/Linux/Mac/Win/other with version]
  • Python version: [e.g. 3.7.1]
  • Sphinx version: current 3.x branch after
  • Sphinx extensions: [e.g. sphinx.ext.autodoc, recommonmark]
  • Extra tools: [e.g. Browser, tex or something else]

Caused by #8781 merge

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions