Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change the color of Latex output in IPython (Jupyter)

I am using ipython qtconsole (today it is called jupyter console). When printing latex (with sympy or any other way), the resulting output in a nice latex in black.

Is there a way to change the color to white because if the background of the terminal is not white (like what happens if you run qtconsole --style monokai), the output is unreadable.

Example:

>>> from sympy import *
>>> init_printing()
>>> k = symbols('k')
>>> Sum(k**2,(k,1,100))

enter image description here

So now it is unreadable. Is there any way to turn it white

like image 673
tal Avatar asked Feb 21 '16 17:02

tal


1 Answers

If you change the black color background, you might get some other visual issues, however you can change the latex output color from black to white, using:

printing.init_printing(use_latex=True,forecolor="White")

Hope that works for you !

like image 73
GERMÁN ORLANDO CUEVA ESTRADA Avatar answered Oct 16 '22 10:10

GERMÁN ORLANDO CUEVA ESTRADA