Open
Description
Describe the bug
I used :width: 10%
in a table cell and got unsatisfactory results.

How to Reproduce
===================
FOO documentation
===================
image in table cell using width at 10%
======================================
+----------------------------+
| |
| .. image:: img.png |
| :width: 10% |
| |
+----------------------------+
+---+------------------------+
| a | b |
+---+------------------------+
| c | .. image:: img.png |
| | :width: 10% |
| | |
+---+------------------------+
+---+------------------------+
| a | b |
+---+------------------------+
| .. image:: img.png |
| :width: 10% |
| |
+---+------------------------+
Environment Information
Platform: darwin;
Python version: 3.13.3 (v3.13.3:6280bb54784, Apr 8 2025, 10:47:54) [Clang 15.0.0 (clang-1500.3.9.4)])
Python implementation: CPython
Sphinx version: 8.3.0+/e1bd9cb38
Docutils version: 0.21.2
Jinja2 version: 3.1.6
Pygments version: 2.19.1
Sphinx extensions
Additional context
Sphinx translates the 10%
into 0.100\linewidth
. But \linewidth
may be zero at some times of processing of tables 1. In the first two cases tabulary
fell back to its minium width of 10pt
. In the third case (merged cell), Sphinx emitted a varwidth
environment wrapper and seemingly \linewidth
had a normal interpretation.
Footnotes
-
it looks as I was going through a state of confusion here. It is not exactly clear what
\linewidth
is especially whentabulary
tries to find dynamically the best choice of column width, but it is not set to zero. Apologies. ↩