You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Boxes may leak colors from inside. Here is an example, with 5.x/5ffe1e87. It would have been even worse before merge of #10619 and also c327f09 (relates #10610).
How to Reproduce
Color leaks
===========
.. contents::
A section
---------
Paragraph should be black but isn't.
.. warning:: This is blue as requested.
BUT FRAMING IS INVISIBLE!
Paragraph should be black. It is... by luck probably.
.. caution:: Beware LaTeX color leaks! (which may make things invisible).
They are caused by an upstream framed.sty bug, but we know the cure.
Paragraph should be black.
and use this for conf.py
latex_elements = {
'preamble': r"""
\def\sphinxstyletopictitle #1{\leavevmode\color{red}% color for contents
\textcolor{green}{\textbf{#1}}% colored title
\par\medskip}
\renewenvironment{sphinxwarning}[1]
{\begin{sphinxheavybox}\sphinxstrong{#1} \color{blue}}{\end{sphinxheavybox}}
""",
}
Expected behavior
No color leaks...
Your project
See example
Screenshots
OS
Mac
Python version
CPython 3.10.4
Sphinx version
5.x/5ffe1e879
Sphinx extensions
No response
Extra tools
No response
Additional context
This is caused by an upstream framed.sty bug which constructs a \vbox without needed extra group for compatibility with the way \color command internally works.
I will push a fix next.
The text was updated successfully, but these errors were encountered:
Describe the bug
Boxes may leak colors from inside. Here is an example, with 5.x/5ffe1e87. It would have been even worse before merge of #10619 and also c327f09 (relates #10610).
How to Reproduce
and use this for
conf.py
Expected behavior
No color leaks...
Your project
See example
Screenshots
OS
Mac
Python version
CPython 3.10.4
Sphinx version
5.x/5ffe1e879
Sphinx extensions
No response
Extra tools
No response
Additional context
This is caused by an upstream framed.sty bug which constructs a
\vbox
without needed extra group for compatibility with the way\color
command internally works.I will push a fix next.
The text was updated successfully, but these errors were encountered: