[proposal] Maths rendering #409
-
Hi WIll, Sorry I'm spamming you today, but I wanted to suggest an improvement for rich. I was wandering if you'd be interested in integrating it in For instance: from rich import print
from unicodeit import replace
class Math():
def __init__(self, expression):
self.expression = replace(expression)
def __rich_console__(self, *args):
yield self.expression
print(Math('\\alpha: \\Re \\to \\Im')) though it might be simpler to just add Let me know what you think of it! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I think unicodeit is so simple to use it doesn't need anything added to Rich. Like you said, it's easy to call In general, these things are best left as external libraries. I wouldn't want to add too many dependancies in the main lib. If you wanted to, you could publish a |
Beta Was this translation helpful? Give feedback.
I think unicodeit is so simple to use it doesn't need anything added to Rich. Like you said, it's easy to call
replace
as required. And if you prefer wrapping it in a renderable, that's just a few lines.In general, these things are best left as external libraries. I wouldn't want to add too many dependancies in the main lib. If you wanted to, you could publish a
rich-math
library on Pypi...