Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display with dark themes #36

Open
maillardj opened this issue Apr 6, 2021 · 11 comments
Open

Display with dark themes #36

maillardj opened this issue Apr 6, 2021 · 11 comments
Labels

Comments

@maillardj
Copy link

Hello!
Thank you for the package!

In Dark Themes IPython the display output is hardly readable because the text colour is black.

image

Does anyone know :

  • how to fix it?
  • how to automatically adapt to the user theme?
@erwanp erwanp added the good first issue good to start helping on the project ! label Apr 6, 2021
@sambiddledev
Copy link

Looking into this. Has something to do with the IPython.core.display. Can you share the steps to recreate this issue? Were you just using Ipython in the console? My console is not showing any LaTex output with IPython.

@erwanp
Copy link
Owner

erwanp commented Apr 9, 2021

I also have it here. I simply run it from the IPython 7.20.0 embedded in Spyder 4.2.1, and I get the LaTeX output.

@erwanp
Copy link
Owner

erwanp commented Apr 9, 2021

If you manage to find out why it's not happening in your own iPython, it would be nice if we can set it by default : it's very convenient to check the equations in your code

@sambiddledev
Copy link

sambiddledev commented Apr 9, 2021

Awesome. Thanks for sharing that. I'm going to look into it a bit more closely. Tried to reproduce using Jupyter notebook with a theme and it looked fine, so we may need to get it to ignore the theme in certain cases:
Jupyter Notebook Dark Mode Success

@sambiddledev
Copy link

@erwanp no equation displays when I use the IPython interpreter straight from my zsh terminal window on a mac. I'll look into that a bit more. Could be worthy of an issue as well?

@sambiddledev
Copy link

VS code seems to work without issue, also. So it appears to be interpreter specific. See example from Jupyter notebook embedded in vs code:
VScode Dark Mode

@erwanp
Copy link
Owner

erwanp commented Apr 10, 2021

Nice! So we have so far :

  • jupyter notebook in VS code : ✔️
  • IPython in mac terminal : ❌ (nothing appears)
  • IPython in Spyder, Windows : ✅ (but wrong background)

@maillardj was it also in a Spyder IPython? Does it work in a IPython spawned from the console?

@maillardj
Copy link
Author

Hello! Yes, it was in a spyder IPython. From gitbash console it doesn't print the equation!

@erwanp
Copy link
Owner

erwanp commented Apr 12, 2021

Extra search systematically pointed me to Jupyter Notebooks to render equations (which works well, as you showed @sambiddledev ) . IPython simply inherits the limitations of the console/terminal, which wasn't developed to show images.

I think we won't fix it !

@erwanp erwanp added wontfix and removed good first issue good to start helping on the project ! labels Apr 12, 2021
@sambiddledev
Copy link

sambiddledev commented Apr 12, 2021 via email

@erwanp
Copy link
Owner

erwanp commented Apr 12, 2021

Good idea, but the message shouldn't appear on a JupyterNotebook. Hard to know how which environment the line is executed.

Possible hack : what about subclassing the IPython.core.display.Latex name, which is shown here :

image

to something like pytexit.use_a_jupyter_notebook_to_view_latex_rendering

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants