Le mardi 23 mars 2021 à 20:28:45 UTC+1, [email protected] a écrit :
> Because I created this years before Jupyter started...
>
Ah yes!
it would be great to redo it.
>
As a starting point, it would suffice to endow the class SageObject with a
method _repr_latex_ defined as something like
def _repr_latex_(self):
try:
return '$' + str(latex(self)) + '$'
except ...:
return None # if None is returned, the plain text is used
Certainly, this would require some fine tuning and the treatment of
specific cases.
Similar things could be done with _repr_svg_, _repr_png_, etc...
Eric.
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/sage-devel/b7177561-2775-4ef5-bd99-2f3c498fc211n%40googlegroups.com.