Update app.py
Browse files
app.py
CHANGED
|
@@ -594,8 +594,20 @@ class GeneratedMathScene(Scene):
|
|
| 594 |
continue
|
| 595 |
|
| 596 |
elif slide_type == "text":
|
| 597 |
-
|
| 598 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 599 |
elif slide_type == "equation":
|
| 600 |
eq_content = content
|
| 601 |
test = MathTex(eq_content, color=default_color, font_size=equation_size)
|
|
|
|
| 594 |
continue
|
| 595 |
|
| 596 |
elif slide_type == "text":
|
| 597 |
+
parts = content.split("#")
|
| 598 |
+
inline_items = []
|
| 599 |
+
for p in parts:
|
| 600 |
+
if not p.strip():
|
| 601 |
+
continue # ignore empty
|
| 602 |
+
|
| 603 |
+
if p.startswith("%"):
|
| 604 |
+
eq = p[1:] # remove %
|
| 605 |
+
eq_obj = MathTex(eq, color=default_color, font_size=equation_size)
|
| 606 |
+
inline_items.append(eq_obj)
|
| 607 |
+
else:
|
| 608 |
+
text_obj = make_wrapped_paragraph(p, default_color, default_font, text_size)
|
| 609 |
+
inline_items.append(text_obj)
|
| 610 |
+
obj = VGroup(*inline_items).arrange(RIGHT, aligned_edge=LEFT, buff=0.15)
|
| 611 |
elif slide_type == "equation":
|
| 612 |
eq_content = content
|
| 613 |
test = MathTex(eq_content, color=default_color, font_size=equation_size)
|