-
I have an equation written as |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
In your code, self.play(TransformFromCopy(eq[0][:2], eq2[0][2:4])) btw, if you want to learn more about |
Beta Was this translation helpful? Give feedback.
-
The other way to do this would be to wrap the parts you want to be separated with two curly braces. It's slightly awkward with fractions, since this functionality depends on the ordering of the parts of the string defining your Tex to match the ordering of symbols, so instead of using \frac{}{} you need to use \over.
You could also write
Once it's been initialized like this, you can call things like |
Beta Was this translation helpful? Give feedback.
In your code,
x_1
ineq
iseq[0][:2]
, and ineq2
iseq2[0][2:4]
. The whole index-mob maps ineq
andeq2
are:So you can try:
btw, if you want to learn more about
TexMobject
and it’s structure in manim, you can watch this video. (Although this video is in Chinese, it has no great influence on learning the content. You can just watch the screen and ignore the Chinese subtitles.)