TransformMatchingTex

Qualified name: manim.animation.transform\_matching\_parts.TransformMatchingTex

class TransformMatchingTex(mobject=None, *args, use_override=True, **kwargs)[source]

Bases: manim.animation.transform_matching_parts.TransformMatchingAbstractBase

A transformation trying to transform rendered LaTeX strings.

Two submobjects match if their tex_string matches.

Examples

Example: MatchingEquationParts

from manim import *

class MatchingEquationParts(Scene):
    def construct(self):
        eq1 = MathTex("{{a^2}} + {{b^2}} = {{c^2}}")
        eq2 = MathTex("{{a^2}} = {{c^2}} - {{b^2}}")
        self.add(eq1)
        self.wait(0.5)
        self.play(TransformMatchingTex(eq1, eq2))
        self.wait(0.5)

Methods

get_mobject_key

get_mobject_parts