Coloring subscripts/superscripts gets messed up
未關閉
- 主要語言
- Python
- 星號
- 93.9k
- 分支
- 7.7k
- 平均合併
- 2 天 13 小時
- 30 天內合併 PR
- 4
描述
Consider the following scene:
```python
class TestColor(Scene):
def construct(self):
t = TexMobject("e_1", "^2")
t[0].set_color(RED)
self.add(t)
self.wait(1)
```
When rendered, this scene makes the 2 red, but not the 1. You can workaround the issue by splitting it in three parts and write the superscript first, but it's still an annoying bug.
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
查看 manim/mobject/svg/tex_mobject.py 中的 TexMobject 類別以了解它如何解析 LaTeX 的 subscript 和 superscript。此 bug 可能與顏色如何套用到已解析表示式的子部分有關。執行提供的測試場景來重現該問題,然後追蹤 set_color 方法,查看為何它影響 superscript 而不影響 subscript。修正應確保顏色設定尊重預期的 subscript/superscript 分組。
由索引模型根據 Issue 內容生成。
評估
- 領域
- computer-graphics
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 描述清楚
- 新手友好度
- 45/100