Open 2black0 opened 2 years ago
This is a case of https://github.com/ipython/ipython/issues/9451: Ipython's rendering of sys._repr_latex_()
is not governed by the Sympy settings.
What console or terminal emulator is that? On my (Ubuntu) system, in jupyter console
I get a repr
output, and jupyter qtconsole
always has a white background. In a Jupyter Notebook terminal with dark theme, the font is white.
Spyder with the default black theme: https://www.spyder-ide.org
Their setup has some init code for Sympy, but it doesn't help us: https://github.com/spyder-ide/spyder/issues/3798
To be fixed by https://github.com/spyder-ide/spyder/pull/16957.
You can for now execute %colors Linux
in you console which should trigger slightly lighter colors (although the rendering is not that nice).
@oscargus, did you check that advice in Spyder? Because it does not seem to have an effect there.
@bnavigator You are correct. I mixed up where it actually helped (SymPy uses it as a guess if no color is provided when doing init_printing()
, but not IPython). Your PRs are what I had in mind as a follow-up when doing the color extensions in IPython, but never got around to dig into (primarily as it worked with SymPy and I wasn't aware of any other package relying on it). Thanks!
Still a bit surprising that @2black0 gets black printing though as the "ugly white outline" was expected.
(Got stuck with a crash when looking at using the matplotlib
backend which currently seems to crash, at least on my Windows laptop, https://github.com/matplotlib/matplotlib/issues/22006 )
Btw, it seems like matplotlib are not directly supporting a color argument anymore in the replacement function https://github.com/matplotlib/matplotlib/blob/c2a5e22baf6eeb4c5e49028d8ef10adf5a6f4f32/lib/matplotlib/mathtext.py#L566
How to change font color to tf result printed in ipython (spyder 5)?