ManimCommunity / ManimCommunity/manim
Adding a TexMObject to keep formula parts in place?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 40.9k
- Forks
- 3.1k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 25
Description
## 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
```python
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the behavior of MathTex and TransformMatchingTex in the example, then read the related discussion in issue 657. Define how selected formula parts should retain fixed positions while other parts change, and verify the result with the two equations shown in this issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100