8

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

Thomas K
  • 35,785
  • 7
  • 76
  • 82
tal
  • 764
  • 5
  • 17
  • 1
    Possible duplicate of [Control LaTeX expression color in ipython qtconsole](http://stackoverflow.com/questions/18257270/control-latex-expression-color-in-ipython-qtconsole) – asmeurer Feb 22 '16 at 17:33
  • @asmeurer That answer is for sympy only, but ipython will display tex for any class that defines `_repr_latex_()` – endolith May 09 '16 at 23:31
  • 1
    @endolith sure, but this question is very clearly asking about SymPy. Furthermore, SymPy does its own LaTeX rendering in the qtconsole, so even if someone answered the related question of how to edit the color of `_repr_latex_` it wouldn't fix @tal's problem. – asmeurer May 09 '16 at 23:37

1 Answers1

1

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 !