-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
issue:bugSomething isn't working... For use in issuesSomething isn't working... For use in issues
Description
Description of bug / unexpected behavior
Hi guys. I had a problem. I had a problem with the animation Write. When I split strings on MathTex and one of these contains \\sqrt
or \\sqrt{
(I know if there is one of these strings, that represents two indexes), the mobject is written as you can see in the next video.
How to reproduce the issue
Code and video for reproducing the problem
Video.mp4
from manim import *
class Video(Scene):
def construct(self):
limit = MathTex("\\lim_{", "x", "\\to", "-\\infty}", "{", "\\sqrt{", "x", "^2", "+", "1}", "\\over", "x}").scale(2)
limit[1].set_color(ORANGE)
limit[6].set_color(ORANGE)
limit[11].set_color(ORANGE)
forsolve = Text("Para resolver este límite", font="Orbitron", weight=BOLD, color=BLACK).to_edge(UP)
rec1 = SurroundingRectangle(forsolve, color=ORANGE, stroke_color=WHITE, fill_opacity=1.0, buff=0.3)
self.play(Write(limit), DrawBorderThenFill(rec1), run_time=2)
self.play(FadeIn(forsolve, shift=UP))
Additional media files
However, when I do the same thing with self.add
, it's working fine.
from manim import *
class Thumbnail(Scene):
def construct(self):
title = Text("Calcula el siguiente límite",
font="Orbitron",
weight=BOLD,
color=BLACK).to_edge(UP)
rec = SurroundingRectangle(title,
color=ORANGE,
stroke_color=WHITE,
fill_opacity=1.0,
buff=0.3)
limit = MathTex("\\lim_{", "x", "\\to", "-\\infty}", "{", "\\sqrt{", "x", "^2", "+", "1}", "\\over", "x}").scale(2)
limit[1].set_color(ORANGE)
limit[6].set_color(ORANGE)
limit[11].set_color(ORANGE)
svg = SVGMobject("deafness.svg").to_corner(DR)
text = Tex("Video inclusivo", color=ORANGE).scale(1.5).to_edge(DOWN)
self.add(rec, title, limit, svg, text)
Metadata
Metadata
Assignees
Labels
issue:bugSomething isn't working... For use in issuesSomething isn't working... For use in issues
Type
Projects
Status
🆕 New