Skip to content

Can not use \textcolor , always render as white color #3783

@zhangsn

Description

@zhangsn

Description of bug / unexpected behavior

Same as title

Expected behavior

Should render the text in red color

How to reproduce the issue

Code for reproducing the problem
from manim import *

class Demo(Scene):
    def construct(self):
        myTemplate = TexTemplate()
        myTemplate.add_to_preamble(r"\usepackage{color}")
        mtex = MathTex(
            "\\textcolor{red}{red}",
            tex_template=myTemplate)
        self.add(mtex)

Logs

Terminal output
docker run --rm -it -v "/Users/zhangsn/Dev/manim:/manim" manimcommunity/manim manim -qm scenes.py Demo
Manim Community v0.18.1

[05/23/24 09:09:46] INFO                                                                                                                                                            scene_file_writer.py:737
                             File ready at '/manim/media/images/scenes/Demo_ManimCE_v0.18.1.png'                                                                                                            
                                                                                                                                                                                                            
                    INFO     Rendered Demo                                                                                                                                                      scene.py:247
                             Played 0 animations    

Demo_ManimCE_v0 18 1

System specifications

System Details
use docker manimcommunity/manim  Manim Community v0.18.1
LaTeX details
  • LaTeX distribution (e.g. TeX Live 2020):
  • Installed LaTeX packages:

Additional comments

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions