ManimCommunity / ManimCommunity/manim

Add initialisation-using-substring support for `Text`, similar to `Tex`

Open
#741 22 comments 0 reactions 1 assignee View on GitHub

@SamuilYu is already working on this.

Since May 16, 2021.

enhancement
Dominant language
Python
Stars
40.9k
Forks
3.1k
Avg merge
3d 12h
Merged PRs (30d)
25

Description

## Enhancement proposal
Currently, `Tex` supports initialisation using multiple strings. This allows for easy access of substrings which is useful for say changing the color of a substring only. I think it would be great for `Text` to have this functionality as well.

```python3
class Example(Scene):
def construct(self):
tex = Tex("This is ", "tex (actually plain text)", "using multiple strings")
tex[0].set_color(RED)
tex[2].set_color(GREEN)
self.play(Write(tex))

text = Text("Can't initialise using multiple strings")
self.play(Write(text))
self.wait()
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.