LaTeX: Footer overrun with longtable and merged vertical cells (original) (raw)

Describe the bug

The replicated example yields (poor resolution, missing right-hand table line) the following footer overrun table in LaTeX:

Image

An initial fix has been proposed in #14227.

How to Reproduce

.. |lorem| replace::

   Lorem ipsum dolor sit amet consectetur adipiscing elit. Quisque faucibus ex
   sapien vitae pellentesque sem placerat. In id cursus mi pretium tellus duis
   convallis. Tempus leo eu aenean sed diam urna tempor. Pulvinar vivamus
   fringilla lacus nec metus bibendum egestas. Iaculis massa nisl malesuada
   lacinia integer nunc posuere. Ut hendrerit semper vel class aptent taciti
   sociosqu. Ad litora torquent per conubia nostra inceptos himenaeos.


.. raw:: latex

   % some suitable vertical whitespace here

+-----------+-----------+
| |lorem|   | Cell 1    |
|           +-----------+
|           | Cell 2    |
|           +-----------+
|           | Cell 3    |
|           +-----------+
|           | Cell 4    |
|           +-----------+
|           | Cell 5    |
|           +-----------+
|           | Cell 6    |
|           +-----------+
|           | Cell 7    |
|           +-----------+
|           | Cell 8    |
|           +-----------+
|           | Cell 9    |
|           +-----------+
|           | Cell 10   |
|           +-----------+
|           | Cell 11   |
|           +-----------+
|           | Cell 12   |
|           +-----------+
|           | Cell 13   |
|           +-----------+
|           | Cell 14   |
|           +-----------+
|           | Cell 15   |
|           +-----------+
|           | Cell 16   |
+-----------+-----------+

Environment Information

Platform:              linux; (Linux-6.17.9-arch1-1-x86_64-with-glibc2.42)
Python version:        3.13.11 (main, Dec  7 2025, 13:01:45) [GCC 15.2.1 20251112])
Python implementation: CPython
Sphinx version:        9.1.0rc2
Docutils version:      0.22.4
Jinja2 version:        3.1.6
Pygments version:      2.19.2

Sphinx extensions

Additional context

No response