Skip to content

LaTeX: contrarily to doc, div.topic_box-shadow if used with a single dimension only sets the x-offset, and y-offset remains nil #12778

Closed
@jfbu

Description

@jfbu

Describe the bug

Our docs say:

  • <prefix>_box-shadow is special in so far as it may be:
    • the none keyword,
    • or a single dimension (giving both x-offset and y-offset),
    • or two dimensions (separated by a space),
    • or two dimensions followed by the keyword inset.

but in case a single dimension is used only x-offset is set, the y-offset of the shadow remains nil.

How to Reproduce

latex_elements = {
    'sphinxsetup': 'div.topic_box-shadow=10pt',
}

and index.rst:

.. topic:: Title

   contents

then make latexpdf with Sphinx v5.1.0 or later. Then there is a 10pt wide "shadow" on the right but nothing below. Versions of Sphinx prior to v6.2.1 additionally have a strange shortening of the box width. Starting at v6.2.1 at least the lateral shadow is in margin as described in documentation.

Environment Information

Python version:        3.12.3 (v3.12.3:f6650f9ad7, Apr  9 2024, 08:18:48) [Clang 13.0.0 (clang-1300.0.29.30)])
Python implementation: CPython
Sphinx version:        6.2.1
Docutils version:      0.21.2
Jinja2 version:        3.1.4
Pygments version:      2.18.0

Sphinx extensions

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions