sreepathi-ravikumar commited on
Commit
4f3bedd
·
verified ·
1 Parent(s): c7adf67

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -2
app.py CHANGED
@@ -594,8 +594,20 @@ class GeneratedMathScene(Scene):
594
  continue
595
 
596
  elif slide_type == "text":
597
- obj = make_wrapped_paragraph(content, default_color, default_font, text_size, line_spacing=0.25)
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)