Skip to content

LaTeX: image using width set at 10% in nested lists or nested quoted paragraphs gets smaller and smaller #13662

Open
@jfbu

Description

@jfbu

Describe the bug

When using :width: 10% the effective dimension decreases in quoted paragraphes or list items. The result is counter-intuitive, because the text font size keep being the same only the effective text width diminishes. But surely 10% should refer either to page width or to text area width.

Image Image

How to Reproduce

===================
 FOO documentation
===================


image in quoted paragraphs using width at 10%
=============================================

|sphinx|

 |sphinx|

  |sphinx|

   |sphinx|

    |sphinx|

     |sphinx|

      |sphinx|


image in nested lists using width at 10%
========================================

1. |sphinx|

   1. |sphinx|

      1. |sphinx|

         1. |sphinx|

            we stop here, else needed to use ``'maxlistdepth'`` of
            ``latex_elements`` to avoid LaTeX error about too many
            levels of nesting.

.. |sphinx| 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

As per #13661, the cause is that Sphinx translates 10% into 0.100\linewidth.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions