Latex printing from sympy shows `\displaystyle` and doesn't print using graphics
IndianBoy42 opened this issue · 2 comments
IndianBoy42 commented
pipx install euporie
pipx inject euporie timg cairosvg mtable flatlatex ipython
euporie console
from sympy import init_sessions
x*x
\displaystylex²
joouha commented
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:
- I configure
flatlatex
to strip various latex style commands from the output (added here) - I've added
utftex
as a terminal latex renderer - this produces much more advanced output thanflatlatex
:
- Other terminal latex renderers will now take priority over
flatlatex
if installed (you can now installutftex
orpylatexenc
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:
The changes I've mentioned will be included in the next releases - I hope this helps!