manim icon indicating copy to clipboard operation
manim copied to clipboard

Adding a TexMObject to keep formula parts in place?

Open sambaPython24 opened this issue 1 year ago • 1 comments

Description of proposed feature

Hey, I would like to do what has been done in this post https://github.com/3b1b/manim/issues/657 So far, I am using

eq1 = MathTex(r"A",r"=",r"\int",r"\text d x",r"f(x)", color = BLACK)
eq2 = MathTex(r"A",r"=",r"\sum + \gamma - \eta + \elta",r"\text d x",r"f(x)", color = BLACK)

self.play(
    TransformMatchingTex(eq1,  eq2),
                            run_time = 0.2
         )

but this is not really working if an element of the MathTex that is not the last changes in size, in particular when it is in the frac operator: The other parts of the formula shift or even transform as well on the screen.

How can I keep certain elements at a fixed position, like the nominator in this case?

How can the new feature be used?

It can be used to fix certain parts of the formula while changing other parts. Overall, you gain more influence over the formula.

Additional comments

sambaPython24 avatar Apr 29 '23 09:04 sambaPython24