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

Latex printing from sympy shows \displaystyle and doesn't print using graphics #106

Closed
IndianBoy42 opened this issue Apr 16, 2024 · 2 comments

Comments

@IndianBoy42
Copy link

IndianBoy42 commented Apr 16, 2024

pipx install euporie
pipx inject euporie timg cairosvg mtable flatlatex ipython                      
euporie console
from sympy import init_sessions
x*x
\displaystylex² 
@joouha
Copy link
Owner

joouha commented May 1, 2024

Hi,

This appears to be because sympy uses the \displaystyle latex command in it's latex output, and flatlatex (the default latex renderer used in euporie) does not support this command.

I've made a few changes in the dev branch which hopefully help with this issue:

  1. I configure flatlatex to strip various latex style commands from the output (added here)
  2. I've added utftex as a terminal latex renderer - this produces much more advanced output than flatlatex:
    image
  3. Other terminal latex renderers will now take priority over flatlatex if installed (you can now install utftex or pylatexenc and they will be used instead.

Also, if your terminal supports terminal graphics, and you have a latex distribution with dvipng, or matplotlib, installed, then euporie will render and display latex graphically:

image

The changes I've mentioned will be included in the next releases - I hope this helps!

@joouha
Copy link
Owner

joouha commented Oct 10, 2024

These changes have been in euporie since v2.8.3

@joouha joouha closed this as completed Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants